@@ -83,9 +83,6 @@ protected override void OnInit(EventArgs e)
83
83
84
84
if ( this . UmbracoPanel1 . hasMenu )
85
85
{
86
-
87
-
88
-
89
86
if ( ! CompatibilityHelper . IsVersion7OrNewer )
90
87
{
91
88
// add the save button
@@ -108,7 +105,6 @@ protected override void OnInit(EventArgs e)
108
105
109
106
if ( Request . QueryString [ "file" ] == WEB_CONFIG )
110
107
b . OnClientClick = "javascript:return confirm('You have modified the Web.config, are you sure that you still want to save?');" ;
111
-
112
108
}
113
109
}
114
110
}
@@ -170,6 +166,10 @@ protected void Page_Load(object sender, EventArgs e)
170
166
171
167
if ( ! string . IsNullOrEmpty ( fileContents ) )
172
168
this . editorSource . Text = fileContents ;
169
+
170
+ this . editorSource . CodeBase = configFile . EndsWith ( ".js" )
171
+ ? CodeArea . EditorType . JavaScript
172
+ : CodeArea . EditorType . XML ;
173
173
}
174
174
else
175
175
{
@@ -187,12 +187,22 @@ protected void Page_Load(object sender, EventArgs e)
187
187
}
188
188
}
189
189
190
- /// <summary>
191
- /// Handles the Click event of the MenuSave control.
192
- /// </summary>
193
- /// <param name="sender">The source of the event.</param>
194
- /// <param name="e">The <see cref="System.Web.UI.ImageClickEventArgs"/> instance containing the event data.</param>
195
- private void MenuSave_Click ( object sender , ImageClickEventArgs e )
190
+ protected override void OnPreRenderComplete ( EventArgs e )
191
+ {
192
+ base . OnPreRenderComplete ( e ) ;
193
+
194
+ if ( this . editorSource . CodeBase == CodeArea . EditorType . JavaScript )
195
+ {
196
+
197
+ }
198
+ }
199
+
200
+ /// <summary>
201
+ /// Handles the Click event of the MenuSave control.
202
+ /// </summary>
203
+ /// <param name="sender">The source of the event.</param>
204
+ /// <param name="e">The <see cref="System.Web.UI.ImageClickEventArgs"/> instance containing the event data.</param>
205
+ private void MenuSave_Click ( object sender , ImageClickEventArgs e )
196
206
{
197
207
Save ( ) ;
198
208
}
0 commit comments