Changes to Pythin (cshtml) xslt and template editors

This commit is contained in:
PerPloug
2012-08-22 11:55:57 -02:00
parent d25fae730d
commit fa3f79c0e4
3 changed files with 8 additions and 9 deletions

View File

@@ -12,12 +12,13 @@
closeErrorDiv();
var codeVal = jQuery('#<%= pythonSource.ClientID %>').val();
//if CodeMirror is not defined, then the code editor is disabled.
if (typeof (CodeMirror) != "undefined") {
codeVal = codeEditor.getCode();
codeVal = UmbEditor.GetCode();
}
umbraco.presentation.webservices.codeEditorSave.SaveDLRScript(jQuery('#<%= pythonFileName.ClientID %>').val(), '<%= pythonFileName.Text %>', codeVal, document.getElementById('<%= SkipTesting.ClientID %>').checked, submitSucces, submitFailure);
}
@@ -43,7 +44,6 @@
jQuery(id).hide();
}
}
</script>
</asp:Content>
<asp:Content ID="cp1" runat="server" ContentPlaceHolderID="body">
@@ -60,7 +60,7 @@
<div id="errorDiv" style="position: relative; display: none;" class="error">
-</div>
</cc1:PropertyPanel>
<cc1:CodeArea ID="pythonSource" ClientSaveMethod="doSubmit" CodeBase="Python" AutoResize="true" OffSetX="47"
<cc1:CodeArea ID="pythonSource" ClientSaveMethod="doSubmit" AutoSuggest="true" CodeBase="Razor" AutoResize="true" OffSetX="47"
OffSetY="55" runat="server" />
</cc1:Pane>
</cc1:UmbracoPanel>

View File

@@ -33,7 +33,7 @@
var codeVal = jQuery('#<%= editorSource.ClientID %>').val();
//if CodeMirror is not defined, then the code editor is disabled.
if (typeof (CodeMirror) != "undefined") {
codeVal = codeEditor.getCode();
codeVal = UmbEditor.GetCode();
}
umbraco.presentation.webservices.codeEditorSave.SaveXslt(jQuery('#<%= xsltFileName.ClientID %>').val(), '<%= xsltFileName.Text %>', codeVal, document.getElementById('<%= SkipTesting.ClientID %>').checked, submitSucces, submitFailure);
@@ -55,7 +55,6 @@
function xsltVisualize() {
xsltSnippet = UmbEditor.IsSimpleEditor
? jQuery("#<%= editorSource.ClientID %>").getSelection().text
: UmbEditor._editor.selection();
@@ -63,7 +62,7 @@
if (xsltSnippet == '') {
xsltSnippet = UmbEditor.IsSimpleEditor
? jQuery("#<%= editorSource.ClientID %>").val()
: UmbEditor._editor.getCode();
: UmbEditor.GetCode();
// alert('Please select the xslt to visualize');
}

View File

@@ -180,8 +180,8 @@
<asp:DropDownList ID="MasterTemplate" Width="350px" runat="server" />
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_source" runat="server">
<cc1:CodeArea ID="editorSource" runat="server" CodeBase="HTML" ClientSaveMethod="doSubmit"
AutoResize="true" OffSetX="37" OffSetY="54" CssClass="codepress html" />
<cc1:CodeArea ID="editorSource" runat="server" CodeBase="HtmlMixed" EditorMimeType="text/html" ClientSaveMethod="doSubmit"
AutoResize="true" OffSetX="37" OffSetY="54"/>
</cc1:PropertyPanel>
</cc1:Pane>
</cc1:UmbracoPanel>