From 60631959f66e1adbf90d18d52c732d0254d5098f Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 15 Mar 2022 15:37:09 +0800 Subject: [PATCH] sync --- docs/json/roodata.json | 104 ++++++++++++++++++++ docs/src/Roo_Button.js.html | 18 ++++ docs/src/Roo_HtmlEditorCore.js.html | 2 +- docs/src/Roo_htmleditor_BlockFigure.js.html | 12 ++- docs/symbols/Roo.Button.json | 26 +++++ docs/symbols/Roo.SplitButton.json | 26 +++++ docs/symbols/Roo.Toolbar.Button.json | 26 +++++ docs/symbols/Roo.Toolbar.SplitButton.json | 26 +++++ 8 files changed, 235 insertions(+), 5 deletions(-) diff --git a/docs/json/roodata.json b/docs/json/roodata.json index 7e1375f62c..49146ce23e 100644 --- a/docs/json/roodata.json +++ b/docs/json/roodata.json @@ -7969,6 +7969,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setText", "type" : "function", @@ -42849,6 +42875,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "Roo.Button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setText", "type" : "function", @@ -47810,6 +47862,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "Roo.Button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setText", "type" : "function", @@ -49651,6 +49729,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "Roo.Button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setText", "type" : "function", diff --git a/docs/src/Roo_Button.js.html b/docs/src/Roo_Button.js.html index cb40668362..5b352c6d16 100644 --- a/docs/src/Roo_Button.js.html +++ b/docs/src/Roo_Button.js.html @@ -369,6 +369,22 @@ 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. @@ -392,6 +408,8 @@ } }, + + /** * Focus the button */ diff --git a/docs/src/Roo_HtmlEditorCore.js.html b/docs/src/Roo_HtmlEditorCore.js.html index d8f122d9f7..16cfbc9d32 100644 --- a/docs/src/Roo_HtmlEditorCore.js.html +++ b/docs/src/Roo_HtmlEditorCore.js.html @@ -620,7 +620,7 @@ 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}); diff --git a/docs/src/Roo_htmleditor_BlockFigure.js.html b/docs/src/Roo_htmleditor_BlockFigure.js.html index 1ae477cd6e..25d4d24ec7 100644 --- a/docs/src/Roo_htmleditor_BlockFigure.js.html +++ b/docs/src/Roo_htmleditor_BlockFigure.js.html @@ -234,7 +234,10 @@ pressed : false, enableToggle : true, setValue : function(v) { - this.toggle(v == 'block' ? false : true); + // this trigger toggle. + + this.setText(v ? "Hide Caption" : "Show Caption"); + this.setPressed(v != 'block'); }, listeners : { toggle: function (btn, state) @@ -275,7 +278,6 @@ maxWidth : iw + ' !important', // this is not getting rendered? margin : m - } }; /* @@ -315,7 +317,8 @@ // we remove caption totally if its hidden... - will delete data.. but otherwise we end up with fake caption var captionhtml = this.caption_display == 'none' ? '' : (this.caption.length ? this.caption : "Caption"); - return { + + var ret = { tag: 'figure', 'data-block' : 'Figure', @@ -327,7 +330,7 @@ maxWidth : this.align == 'center' ? '100% !important' : (this.width + ' !important'), width : this.align == 'center' ? '100%' : this.width, margin: '0px', - padding: this.align == 'center' ? '10px 0' : '0', + padding: this.align == 'center' ? '0' : '0 10px' , textAlign : this.align // seems to work for email.. }, @@ -376,6 +379,7 @@ } ] }; + return ret; }, diff --git a/docs/symbols/Roo.Button.json b/docs/symbols/Roo.Button.json index 889eb8bb74..60c72c5378 100644 --- a/docs/symbols/Roo.Button.json +++ b/docs/symbols/Roo.Button.json @@ -390,6 +390,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setVisible", "type" : "function", diff --git a/docs/symbols/Roo.SplitButton.json b/docs/symbols/Roo.SplitButton.json index 7a9ef3ae1f..a8b0deb8cd 100644 --- a/docs/symbols/Roo.SplitButton.json +++ b/docs/symbols/Roo.SplitButton.json @@ -441,6 +441,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "Roo.Button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setVisible", "type" : "function", diff --git a/docs/symbols/Roo.Toolbar.Button.json b/docs/symbols/Roo.Toolbar.Button.json index 3e3c469969..1b5b7850fb 100644 --- a/docs/symbols/Roo.Toolbar.Button.json +++ b/docs/symbols/Roo.Toolbar.Button.json @@ -421,6 +421,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "Roo.Button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setVisible", "type" : "function", diff --git a/docs/symbols/Roo.Toolbar.SplitButton.json b/docs/symbols/Roo.Toolbar.SplitButton.json index b7f8855674..caf4eca11e 100644 --- a/docs/symbols/Roo.Toolbar.SplitButton.json +++ b/docs/symbols/Roo.Toolbar.SplitButton.json @@ -470,6 +470,32 @@ ], "returns" : [] }, + { + "name" : "setPressed", + "type" : "function", + "desc" : "Similar to toggle, but does not trigger event.", + "sig" : "(state)", + "static" : false, + "memberOf" : "Roo.Button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "[required] Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "setVisible", "type" : "function", -- 2.39.2