X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=237ac4084ac4b3bfc9223acaaa96980acf939d33;hb=f2689269a2a28287e338dbca978ed7bbeaf2c060;hp=5a4847561643f15ff3f507aaef8dec83e2edfce0;hpb=b0d30caf9e3b263510c29db0caff01cc1444a907;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 5a48475616..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); } @@ -48132,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 + } + ] } ] @@ -48161,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'); @@ -50037,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 }); @@ -50966,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??? @@ -51688,7 +51701,6 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, { /** * @class Roo.form.HtmlEditor.ToolbarStandard * Basic Toolbar - * @children Roo.Toolbar.Item Roo.Toolbar.Button Roo.Toolbar.SplitButton Roo.form.Field * Usage: * @@ -51728,7 +51740,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, @@ -52206,14 +52218,16 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype, { createLink : function(){ //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); - } - }); + (function() { + Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) { + if (btn != 'ok') { + return; + } + if(url && url != 'http:/'+'/'){ + ec.relayCmd('createlink', url); + } + }); + }).defer(100, this); // we have to defer this , otherwise the mouse click gives focus to the main window. }, @@ -52458,7 +52472,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype, { item.enable(); }); } -}); +};