Enable search in codemirror
authorTim Düsterhus <timwolla@googlemail.com>
Sun, 23 Jun 2013 12:03:43 +0000 (15:03 +0300)
committerTim Düsterhus <timwolla@googlemail.com>
Sun, 23 Jun 2013 12:03:43 +0000 (15:03 +0300)
see http://beta.woltlab.com/index.php/Thread/2211-CodeMirror-Browsersuchen-nicht-m%C3%B6glich/

wcfsetup/install/files/acp/templates/codemirror.tpl

index f803a26b4dca36cf0bd91c55dfdd51d6f4d88abe..ca871afc3b8a9f18c0b5685ba7ad4c1526f7574f 100644 (file)
@@ -1,12 +1,18 @@
 {if !$codemirrorLoaded|isset}
        <script type="text/javascript" src="{$__wcf->getPath()}js/3rdParty/codemirror/codemirror.js"></script>
+       <script type="text/javascript" src="{$__wcf->getPath()}js/3rdParty/codemirror/addon/dialog/dialog.js"></script>
+       <script type="text/javascript" src="{$__wcf->getPath()}js/3rdParty/codemirror/addon/search/searchcursor.js"></script>
+       <script type="text/javascript" src="{$__wcf->getPath()}js/3rdParty/codemirror/addon/search/search.js"></script>
 {/if}
 {if $codemirrorMode|isset}<script type="text/javascript" src="{$__wcf->getPath()}js/3rdParty/codemirror/mode/{$codemirrorMode}/{$codemirrorMode}.js"></script>{/if}
 {event name='javascriptIncludes'}
 
 <script type="text/javascript">
 //<![CDATA[
-       {if !$codemirrorLoaded|isset}$('<link rel="stylesheet" href="{$__wcf->getPath()}js/3rdParty/codemirror/codemirror.css" />').appendTo('head');{/if}
+       {if !$codemirrorLoaded|isset}
+               $('<link rel="stylesheet" href="{$__wcf->getPath()}js/3rdParty/codemirror/codemirror.css" />').appendTo('head');
+               $('<link rel="stylesheet" href="{$__wcf->getPath()}js/3rdParty/codemirror/addon/dialog/dialog.css" />').appendTo('head');
+       {/if}
        
        $(function() {
                var $elements = $('{$codemirrorSelector|encodeJS}');
@@ -48,4 +54,4 @@
        });
 //]]>
 </script>
-{assign var='codemirrorLoaded' value=true}
\ No newline at end of file
+{assign var='codemirrorLoaded' value=true}