X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=afa4d7262c97a84e3d7ae04bd3bc66185306906d;hb=848a7d125ce535e50afbba079d7d22f25f909b36;hp=7064634aaa09939211ccdb5080118d9a0f71f728;hpb=4ed79f6289ef64f2f5b81ce2f0816e9883777ec0;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 7064634aaa..afa4d7262c 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -6642,7 +6642,23 @@ Roo.extend(Roo.Button, Roo.util.Observable, { this.hide(); } }, - + /** + * Similar to toggle, but does not trigger event. + * @param {Boolean} state [required] Force a particular state + */ + setPressed : function(state) + { + if(state != this.pressed){ + if(state){ + this.el.addClass("x-btn-pressed"); + this.pressed = true; + }else{ + this.el.removeClass("x-btn-pressed"); + this.pressed = false; + } + } + }, + /** * If a state it passed, it becomes the pressed state otherwise the current state is toggled. * @param {Boolean} state (optional) Force a particular state @@ -6665,6 +6681,8 @@ Roo.extend(Roo.Button, Roo.util.Observable, { } }, + + /** * Focus the button */ @@ -23576,10 +23594,9 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { enableToggle : true, setValue : function(v) { // this trigger toggle. - - var b = block(); - this.setText(b.caption_display == 'block' ? "Hide Caption" : "Show Caption"); - this.setPressed(b.caption_display == 'block' ? false: true); + + this.setText(v ? "Hide Caption" : "Show Caption"); + this.setPressed(!v); }, listeners : { toggle: function (btn, state) @@ -25619,7 +25636,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'], + attrib_white : ['href', 'src', 'name', 'align', 'colspan', 'rowspan', 'data-display'], attrib_clean : ['href', 'src' ] }); new Roo.htmleditor.FilterBlack({ node : d, tag : this.black});