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/show_default.tpl

    r10307 r10309  
    2020
    2121{footer_script}
    22 function loadCodemirror() {ldelim}
    23   editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim}
    24     matchBrackets: true,
    25     readOnly: true,
    26     mode: "{$CODEMIRROR_MODE}",
    27     tabMode: "shift"
    28   });
    29   jQuery("#showedit").hide();
    30   jQuery("#hideedit").show();
    31   jQuery.post("update_config.php", {ldelim} editarea: "on"});
    32 }
    33 
    34 function unloadCodemirror() {ldelim}
    35   editor.toTextArea();
    36   jQuery("#hideedit").hide();
    37   jQuery("#showedit").show();
    38   jQuery.post("update_config.php", {ldelim} editarea: "off"});
    39 }
    40 
    41 {if $LOAD_CODEMIRROR == 'on'}
    42 if (document.getElementById("text") != null) loadCodemirror();
    43 {/if}
     22var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim}
     23  matchBrackets: true,
     24  readOnly: true,
     25  mode: "{$CODEMIRROR_MODE}",
     26  tabMode: "shift"
     27});
    4428{/footer_script}
    4529
     
    4933<textarea id="text" rows="30" cols="90">{$DEFAULT_CONTENT}</textarea>
    5034
    51 <div id="editarea_buttons">
    52 <a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a>
    53 <a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a>
    5435</div>
    55 
    56 </div>
Note: See TracChangeset for help on using the changeset viewer.