split panels into seperate files, and fix code doc
[roojs1] / roojs-debug.js
index a33f95b..e6baa3b 100644 (file)
@@ -691,7 +691,7 @@ Roo.factory(conf, Roo.data);
                                        return 'xs'
                        }
                        
-               }
+               } 
         
     });
 
@@ -32403,7 +32403,11 @@ Roo.extend(Roo.PagingToolbar, Roo.Toolbar, {
             this.loading.disable();
         }
     },
-
+    /**
+     * event that occurs when you click on the navigation buttons - can be used to trigger load of a grid.
+     * @param {String} which (first|prev|next|last|refresh)  which button to press.
+     *
+     */
     // private
     onClick : function(which){
         var ds = this.ds;
@@ -34881,6 +34885,7 @@ Roo.MessageBox = function(){
                         }
                     }
                 });
+              
                 dlg.on("hide", handleHide);
                 mask = dlg.mask;
                 dlg.addKeyListener(27, handleEsc);
@@ -35124,6 +35129,7 @@ Roo.Msg.show({
                 d.animateTarget = null;
                 d.show(options.animEl);
             }
+            dlg.toFront();
             return this;
         },
 
@@ -45590,7 +45596,7 @@ Roo.htmleditor.Filter.prototype = {
         Roo.each( Array.from(dom.childNodes), function( e ) {
             switch(true) {
                 
-                case e.nodeType == 8 && typeof(this.replaceComment) != 'undefined': // comment
+                case e.nodeType == 8 &&  this.replaceComment  !== false: // comment
                     this.replaceComment(e);
                     return;
                 
@@ -45790,7 +45796,7 @@ Roo.extend(Roo.htmleditor.FilterBlack, Roo.htmleditor.Filter,
 {
     tag : true, // all elements.
    
-    replace : function(n)
+    replaceTag : function(n)
     {
         n.parentNode.removeChild(n);
     }
@@ -46815,7 +46821,7 @@ Roo.htmleditor.TidyWriter.prototype = {
 
 Roo.htmleditor.TidyWriter.inline_elements = [
         'SPAN','STRONG','B','EM','I','FONT','STRIKE','U','VAR',
-        'CITE','DFN','CODE','MARK','Q','SUP','SUB','SAMP'
+        'CITE','DFN','CODE','MARK','Q','SUP','SUB','SAMP', 'A'
 ];
 Roo.htmleditor.TidyWriter.shortend_elements = [
     'AREA','BASE','BASEFONT','BR','COL','FRAME','HR','IMG','INPUT',
@@ -48111,6 +48117,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             };
         }
         
+        var captionhtml = this.caption_display == 'hidden' ? this.caption : (this.caption.length ? this.caption : "Caption");
+        
         return  {
             tag: 'figure',
             'data-block' : 'Figure',
@@ -48132,17 +48140,23 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
               
                 {
                     tag: 'figcaption',
-                    contenteditable : true,
+                    
                     style : {
                         'text-align': 'left',
                         'margin-top' : '16px',
                         'font-size' : '16px',
                         'line-height' : '24px',
-                        'font-style': 'italic',
-                        display : this.caption_display
+                         display : this.caption_display
                     },
                     cls : this.cls.length > 0 ? (this.cls  + '-thumbnail' ) : '',
-                    html : this.caption
+                    cn : [
+                        {
+                            // we can not rely on yahoo syndication to use CSS elements - so have to use  '<i>' to encase stuff.
+                            tag : 'i',
+                            contenteditable : true,
+                            html : captionhtml
+                        }
+                    ]
                     
                 }
             ]
@@ -48161,6 +48175,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
          
         this.align = this.getVal(node, 'figure', 'align');
         this.caption = this.getVal(node, 'figcaption', 'html');
+        // remove '<i>
+        if (this.caption.trim().match(/^<i[^>]*>/i)) {
+            this.caption = this.caption.trim().replace(/^<i[^>]*>/i, '').replace(/^<\/i>$/i, '');
+        }
         //this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
         this.width = this.getVal(node, 'figure', 'style', 'max-width');
         //this.margin = this.getVal(node, 'figure', 'style', 'margin');
@@ -49868,8 +49886,10 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
                 new Roo.htmleditor.FilterParagraph({node : this.doc.body}); // paragraphs
                 new Roo.htmleditor.FilterSpan({node : this.doc.body}); // empty spans
             }
+            if (this.enableBlocks) {
+                Roo.htmleditor.Block.initAll(this.doc.body);
+            }
             
-            Roo.htmleditor.Block.initAll(this.doc.body);
             this.updateLanguage();
             
             var lc = this.doc.body.lastChild;
@@ -50003,7 +50023,8 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
         //Roo.log(imgs);
         // fixme..
         images = images.filter(function(g) { return !g.path.match(/^rtf\/(head|pgdsctbl|listtable)/); }) // ignore headers
-                       .map(function(g) { return g.toDataURL(); });
+                       .map(function(g) { return g.toDataURL(); })
+                       .filter(function(g) { return g != 'about:blank'; });
         
         
         html = this.cleanWordChars(html);
@@ -50037,7 +50058,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             });
             new Roo.htmleditor.FilterBlack({ node : d, tag : this.black});
             // should be fonts..
-            new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT' ]} );
+            new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT', 'O:P' ]} );
             new Roo.htmleditor.FilterParagraph({ node : d });
             new Roo.htmleditor.FilterSpan({ node : d });
             new Roo.htmleditor.FilterLongBr({ node : d });
@@ -50966,7 +50987,8 @@ Roo.HtmlEditorCore.black = [
         'IFRAME', 'LAYER',  'LINK',     'META',    'OBJECT',   
         'SCRIPT', 'STYLE' ,'TITLE',  'XML',
         //'FONT' // CLEAN LATER..
-        'COLGROUP', 'COL'  // messy tables.
+        'COLGROUP', 'COL'   // messy tables.
+        
         
 ];
 Roo.HtmlEditorCore.clean = [ // ?? needed???
@@ -51677,8 +51699,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
      */
 });
  
-    // <script type="text/javascript">
-/*
+    /*
  * Based on
  * Ext JS Library 1.1.1
  * Copyright(c) 2006-2007, Ext JS, LLC.
@@ -51687,9 +51708,9 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
  */
 
 /**
- * @class Roo.form.HtmlEditorToolbar1
+ * @class Roo.form.HtmlEditor.ToolbarStandard
  * Basic Toolbar
- * 
+
  * Usage:
  *
  new Roo.form.HtmlEditor({
@@ -51703,7 +51724,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
      
  * 
  * @cfg {Object} disable List of elements to disable..
- * @cfg {Array} btns List of additional buttons.
+ * @cfg {Roo.Toolbar.Item|Roo.Toolbar.Button|Roo.Toolbar.SplitButton|Roo.form.Field} btns[] List of additional buttons.
  * 
  * 
  * NEEDS Extra CSS? 
@@ -51728,7 +51749,7 @@ Roo.form.HtmlEditor.ToolbarStandard = function(config)
     // dont call parent... till later.
 }
 
-Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
+Roo.form.HtmlEditor.ToolbarStandard.prototype = {
     
     tb: false,
     
@@ -52204,16 +52225,44 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
     },
     // private used internally
     createLink : function(){
-        Roo.log("create link?");
+        //Roo.log("create link?");
         var ec = this.editorcore;
-        Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) {
-            if (btn != 'ok') {
-                return;
-            }
-            if(url && url != 'http:/'+'/'){
-                ec.relayCmd('createlink', url);
+        var ar = ec.getAllAncestors();
+        var n = false;
+        for(var i = 0;i< ar.length;i++) {
+            if (ar[i] && ar[i].nodeName == 'A') {
+                n = ar[i];
+                break;
             }
-        });
+        }
+        
+        (function() {
+            
+            Roo.MessageBox.show({
+                title : "Add / Edit Link URL",
+                msg : "Enter the url for the link",
+                buttons: Roo.MessageBox.OKCANCEL,
+                fn: function(btn, url){
+                    if (btn != 'ok') {
+                        return;
+                    }
+                    if(url && url != 'http:/'+'/'){
+                        if (n) {
+                            n.setAttribute('href', url);
+                        } else {
+                            ec.relayCmd('createlink', url);
+                        }
+                    }
+                },
+                minWidth:250,
+                prompt:true,
+                //multiline: multiline,
+                modal : true,
+                value :  n  ? n.getAttribute('href') : '' 
+            });
+            
+             
+        }).defer(100, this); // we have to defer this , otherwise the mouse click gives focus to the main window.
         
     },
 
@@ -52458,7 +52507,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
            item.enable();
         });
     }
-});
+};
 
 
 
@@ -60556,6 +60605,17 @@ layout.addxtype({
     }
 });
 
+
+
+
+
+
+
+
+
+
+
+
 /**
  * @class Roo.GridPanel
  * @extends Roo.ContentPanel
@@ -60639,7 +60699,7 @@ Roo.extend(Roo.GridPanel, Roo.ContentPanel, {
  * @class Roo.NestedLayoutPanel
  * @extends Roo.ContentPanel
  * @parent Roo.BorderLayout Roo.LayoutDialog builder
- * @cfg Roo.BorderLayout} layout   [required] The layout for this panel
+ * @cfg {Roo.BorderLayout} layout   [required] The layout for this panel
  *
  * 
  * @constructor
@@ -60678,6 +60738,8 @@ Roo.NestedLayoutPanel = function(layout, config)
 
 Roo.extend(Roo.NestedLayoutPanel, Roo.ContentPanel, {
 
+    layout : false,
+
     setSize : function(width, height){
         if(!this.ignoreResize(width, height)){
             var size = this.adjustForComponents(width, height);
@@ -60728,7 +60790,7 @@ Roo.extend(Roo.NestedLayoutPanel, Roo.ContentPanel, {
     
     /**
      * Returns the nested BorderLayout for this panel
-     * @return {Roo.BorderLayout} 
+     * @return {Roo.BorderLayout}
      */
     getLayout : function(){
         return this.layout;
@@ -60885,17 +60947,6 @@ Roo.extend(Roo.TreePanel, Roo.ContentPanel, {
     tree : false
 
 });
-
-
-
-
-
-
-
-
-
-
-
 /*
  * Based on:
  * Ext JS Library 1.1.1