X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=e6baa3b4ace9bca12c896ef64a7881977ee1ccfe;hb=52f0db54c74d3795c22f8c9578e52506c763c065;hp=d3b20b39d2d2e10d7e18146f60ec2455250007ed;hpb=5e669fb64d1190d298a236330395f6ba59fd235e;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index d3b20b39d2..e6baa3b4ac 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -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', @@ -47878,7 +47884,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { title : "Image Source URL", msg : "Enter the url for the image", buttons: Roo.MessageBox.OKCANCEL, - fn: function(val){ + fn: function(btn, val){ + if (btn != 'ok') { + return; + } b.image_src = val; b.updateElement(); syncValue(); @@ -47908,7 +47917,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { title : "Link URL", msg : "Enter the url for the link - leave blank to have no link", buttons: Roo.MessageBox.OKCANCEL, - fn: function(val){ + fn: function(btn, val){ + if (btn != 'ok') { + return; + } b.href = val; b.updateElement(); syncValue(); @@ -48105,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', @@ -48126,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 '' to encase stuff. + tag : 'i', + contenteditable : true, + html : captionhtml + } + ] } ] @@ -48155,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 ' + 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'); @@ -49862,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; @@ -49997,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); @@ -50031,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 }); @@ -50960,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??? @@ -51671,8 +51699,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, { */ }); - //