FIX: Skrypt jquery.loggin.js nie działał w Safari 4.
[redakcja.git] / project / templates / explorer / panels / xmleditor.html
index bb225e4..dfe9477 100644 (file)
@@ -7,6 +7,7 @@
 
 <script type="text/javascript" charset="utf-8">
 (function() {
+
     function xmleditor_onload(event, panel) {
         var textareaId = 'xmleditor-' + Math.ceil(Math.random() * 1000000000);
         $('textarea', panel).attr('id', textareaId);
@@ -35,7 +36,6 @@
                     var tag = $(this).attr('p:tag');
                     var handler = function() {
                         var text = editor.selection();
-                        console.log(editor, editor.frame);
                         editor.replaceSelection('<' + tag + '>' + text + '</' + tag + '>');
                         if (text.length == 0) {
                             var pos = editor.cursorPosition();
@@ -71,8 +71,7 @@
         });
     };
     
-    function xmleditor_onunload(event, panel) {}
-    
-    panel(xmleditor_onload, xmleditor_onunload);
+       // define the callback
+       load_callback = xmleditor_onload;
 })();
 </script>