X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=237ac4084ac4b3bfc9223acaaa96980acf939d33;hb=d4ca53e333b848352644ab96ae0508a19111366c;hp=f37089110698c011ab9b2a899bcdcacbf95e8b37;hpb=762c7c6b61a22ac08ab3bd2d1f759f70e73bda6d;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index f370891106..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); } @@ -47866,24 +47868,86 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { xns : rooui.Toolbar //Boostrap? }, { - xtype : 'TextField', - allowBlank : false, - width : 150, - name : 'image_src', + xtype : 'Button', + text: 'Change Image URL', + listeners : { - keyup : function (combo, e) - { - toolbar.editorcore.selectNode(toolbar.tb.selectedNode); + click: function (btn, state) + { var b = block(); - b.image_src = this.getValue(); - b.updateElement(); - syncValue(); - toolbar.editorcore.onEditorEvent(); + + Roo.MessageBox.show({ + title : "Image Source URL", + msg : "Enter the url for the image", + buttons: Roo.MessageBox.OKCANCEL, + fn: function(btn, val){ + if (btn != 'ok') { + return; + } + b.image_src = val; + b.updateElement(); + syncValue(); + toolbar.editorcore.onEditorEvent(); + }, + minWidth:250, + prompt:true, + //multiline: multiline, + modal : true, + value : b.image_src + }); } }, - xns : rooui.form - + xns : rooui.Toolbar + }, + + { + xtype : 'Button', + text: 'Change Link URL', + + 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(btn, val){ + if (btn != 'ok') { + return; + } + b.href = val; + b.updateElement(); + syncValue(); + toolbar.editorcore.onEditorEvent(); + }, + minWidth:250, + prompt:true, + //multiline: multiline, + modal : true, + value : b.href + }); + } + }, + xns : rooui.Toolbar }, + { + xtype : 'Button', + text: 'Show Video URL', + + listeners : { + click: function (btn, state) + { + Roo.MessageBox.alert("Video URL", + block().video_url == '' ? 'This image is not linked ot a video' : + 'The image is linked to: ' + block().video_url + ''); + } + }, + xns : rooui.Toolbar + }, + + { xtype : 'TextItem', text : "Width: ", @@ -48070,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 + } + ] } ] @@ -48099,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'); @@ -49975,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 }); @@ -50904,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??? @@ -51615,8 +51690,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, { */ }); - //