소스 검색

code editor warnings

mjz 10 년 전
부모
커밋
644ea3151a
3개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/allplatforms/classes/HTMLEditor.js
  2. 2 0
      src/allplatforms/classes/MenuItemEditCSS.js
  3. 2 0
      src/allplatforms/classes/WidgetEditHTML.js

+ 1 - 1
src/allplatforms/classes/HTMLEditor.js

@@ -35,7 +35,7 @@ SC.loadPackage({ 'HTMLEditor': {
 
                 var warningText = document.createElement('div');
                     warningText.classList.add('sg-editing-superuser-warning');
-                    warningText.innerHTML = '<b>Caution:</b> Your are now editing the source code!';
+                    warningText.innerHTML = startConfig.warning ? startConfig.warning : '<b>Code Editor</b>';
                 self.get('content').appendChild(warningText);
 
 

+ 2 - 0
src/allplatforms/classes/MenuItemEditCSS.js

@@ -57,6 +57,8 @@ SC.loadPackage({ 'MenuItemEditCSS': {
                     SuperGlue.get('windowManager').do('createWindow', {
 
                         class:      'HTMLEditor',
+
+                        warning:    '<b>CSS Style Definitions</b> (Be careful, mistakes can break your page)',
                         
                         html:       rawCSS,
                         

+ 2 - 0
src/allplatforms/classes/WidgetEditHTML.js

@@ -34,6 +34,8 @@ SC.loadPackage({ 'WidgetEditHTML': {
                             SuperGlue.get('windowManager').do('createWindow', {
 
                                 class:      'HTMLEditor',
+
+                                warning:    '<b>Caution:</b> You are now editing HTML source code!',
                                 
                                 html:       rawHtml,