X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=237ac4084ac4b3bfc9223acaaa96980acf939d33;hb=f2689269a2a28287e338dbca978ed7bbeaf2c060;hp=87999257fc38b12a65034a1b738864590617cc4d;hpb=529565bae1474a2832b202421e1ebda471c46a6c;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 87999257fc..237ac4084a 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -691,7 +691,7 @@ Roo.factory(conf, Roo.data); return 'xs' } - } + } }); @@ -34881,6 +34881,7 @@ Roo.MessageBox = function(){ } } }); + dlg.on("hide", handleHide); mask = dlg.mask; dlg.addKeyListener(27, handleEsc); @@ -35124,6 +35125,7 @@ Roo.Msg.show({ d.animateTarget = null; d.show(options.animEl); } + dlg.toFront(); return this; }, @@ -45590,7 +45592,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 +45792,7 @@ Roo.extend(Roo.htmleditor.FilterBlack, Roo.htmleditor.Filter, { tag : true, // all elements. - replace : function(n) + replaceTag : function(n) { n.parentNode.removeChild(n); } @@ -47872,15 +47874,18 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { listeners : { click: function (btn, state) { - + var b = block(); Roo.MessageBox.show({ title : "Image Source URL", msg : "Enter the url for the image", buttons: Roo.MessageBox.OKCANCEL, - fn: function(val){ - block().image_src = val; - block().updateElement(); + fn: function(btn, val){ + if (btn != 'ok') { + return; + } + b.image_src = val; + b.updateElement(); syncValue(); toolbar.editorcore.onEditorEvent(); }, @@ -47888,7 +47893,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { prompt:true, //multiline: multiline, modal : true, - value : block().image_src + value : b.image_src }); } }, @@ -47902,15 +47907,18 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { listeners : { click: function (btn, state) { - + var b = block(); Roo.MessageBox.show({ title : "Link URL", msg : "Enter the url for the link - leave blank to have no link", buttons: Roo.MessageBox.OKCANCEL, - fn: function(val){ - block().href = val; - block().updateElement(); + fn: function(btn, val){ + if (btn != 'ok') { + return; + } + b.href = val; + b.updateElement(); syncValue(); toolbar.editorcore.onEditorEvent(); }, @@ -47918,7 +47926,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { prompt:true, //multiline: multiline, modal : true, - value : block().href + value : b.href }); } }, @@ -48126,17 +48134,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 '' to encase stuff. + tag : 'i', + contenteditable : true, + html : this.caption + } + ] } ] @@ -48155,6 +48169,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { this.align = this.getVal(node, 'figure', 'align'); this.caption = this.getVal(node, 'figcaption', 'html'); + // remove ' + if (this.caption.trim().match(/^]*>/i)) { + this.caption = this.caption.trim().replace(/^]*>/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'); @@ -50031,7 +50049,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 }); @@ -50960,7 +50978,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??? @@ -51671,8 +51690,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, { */ }); - //