Ignore:
Timestamp:
Apr 12, 2011, 1:37:26 PM (13 years ago)
Author:
patdenice
Message:

Always load codemirror

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/LocalFilesEditor/admin.tpl

    r10307 r10309  
    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>
Note: See TracChangeset for help on using the changeset viewer.