roojs-ui.js
[roojs1] / roojs-ui-debug.js
index 96f3c62..fdf8b12 100644 (file)
@@ -21862,33 +21862,6 @@ Roo.apply(Roo.htmleditor.FilterBlock.prototype,
         
     
 });
-/**
- * @class Roo.htmleditor.FilterAttributes
- * clean attributes and  styles including http:// etc.. in attribute
- * @constructor
-* Run a new Attribute Filter
-* @param {Object} config Configuration options
- */
-Roo.htmleditor.FilterFileWarning = function(cfg)
-{
-    
-    var atag = cfg.node.getElementsByTagName('a');
-    for(var i =0; i < atags.length;i++) {
-        var str = '' + atags.item(i).getAttribute('href');
-        if (str.match(/^file:/)) {
-            throw new Exception ("got file url");
-        }
-    }
-    // less likely
-    atag = cfg.node.getElementsByTagName('img');
-    for(var i =0; i < atags.length;i++) {
-        var str = '' + atags.item(i).getAttribute('src');
-        if (str.match(/^file:/)) {
-            throw new Exception ("got file url");
-        }
-    }
-}
-
 /***
  * This is based loosely on tinymce 
  * @class Roo.htmleditor.TidySerializer
@@ -23563,7 +23536,6 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 store : {
                     xtype : 'SimpleStore',
                     data : [
-                        ['auto'],
                         ['50%'],
                         ['80%'],
                         ['100%']
@@ -23707,7 +23679,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
         var ret =   {
             tag: 'figure',
             'data-block' : 'Figure',
-            
+            'data-width' : this.width, 
             contenteditable : 'false',
             
             style : {
@@ -23734,9 +23706,9 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                         fontSize : '16px',
                         lineHeight : '24px',
                         display : this.caption_display,
-                        maxWidth : this.width + ' !important',
+                        maxWidth : (this.align == 'center' ?  this.width : '100%' ) + ' !important',
                         margin: m,
-                        width: this.width
+                        width: this.align == 'center' ?  this.width : '100%' 
                     
                          
                     },
@@ -23788,7 +23760,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
 
         this.caption_display = this.getVal(node, 'figcaption', 'data-display');
         //this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
-        this.width = this.getVal(node, 'figcaption', 'style', 'width');
+        this.width = this.getVal(node, true, 'data-width');
         //this.margin = this.getVal(node, 'figure', 'style', 'margin');
         
     },
@@ -25668,7 +25640,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
             new Roo.htmleditor.FilterStyleToTag({ node : d });
             new Roo.htmleditor.FilterAttributes({
                 node : d,
-                attrib_white : ['href', 'src', 'name', 'align', 'colspan', 'rowspan', 'data-display'],
+                attrib_white : ['href', 'src', 'name', 'align', 'colspan', 'rowspan', 'data-display', 'data-width'],
                 attrib_clean : ['href', 'src' ] 
             });
             new Roo.htmleditor.FilterBlack({ node : d, tag : this.black});
@@ -25700,12 +25672,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
         if (this.enableBlocks) {
             Roo.htmleditor.Block.initAll(this.doc.body);
         }
-        
-        try {
-            new Roo.htmleditor.FilterFileWarning({ node : d });
-        } catch(e) {
-            Roo.MessageBox.alert("Invalid URLS in content", "The pasted Content contains file:// URLS - you probably want to check all the links in this file");
-        }
+         
         
         e.preventDefault();
         return false;