Show
Ignore:
Timestamp:
04/12/11 13:41:57 (2 years ago)
Author:
patdenice
Message:

merge r10309 from trunk to branch 2.2
Always load codemirror

Location:
branches/2.2/plugins/LocalFilesEditor
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/2.2/plugins/LocalFilesEditor

  • branches/2.2/plugins/LocalFilesEditor/admin.tpl

    r10310 r10311  
    1515 
    1616{footer_script} 
    17 function loadCodemirror() {ldelim} 
    18   editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 
    19     matchBrackets: true, 
    20     mode: "{$CODEMIRROR_MODE}", 
    21     tabMode: "shift" 
    22   }); 
    23   jQuery("#showedit, #hideedit").toggle(); 
    24   jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "on"}); 
    25 } 
    26  
    27 function unloadCodemirror() {ldelim}  
    28   editor.toTextArea(); 
    29   jQuery("#showedit, #hideedit").toggle(); 
    30   jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "off"}); 
    31 } 
    32  
    33 {if $LOAD_CODEMIRROR == 'on'} 
    34 if (document.getElementById("text") != null) loadCodemirror(); 
    35 {/if} 
     17var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 
     18  matchBrackets: true, 
     19  mode: "{$CODEMIRROR_MODE}", 
     20  tabMode: "shift" 
     21}); 
    3622{/footer_script} 
    3723 
     
    9278 
    9379<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea> 
    94 <div id="editarea_buttons"> 
    95 <a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a> 
    96 <a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a> 
    97 </div> 
    9880 
    9981<br>