From 8d1de3077fb6f5a5739ff1c5243721058071a526 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 3 Jun 2021 18:07:54 +0800 Subject: [PATCH] sync --- docs/src/Roo_bootstrap_ButtonUploader.js.html | 169 ++ .../symbols/Roo.bootstrap.ButtonUploader.json | 1368 +++++++++++++++++ less/roojs-bootstrap/menu.less | 8 + scss/roojs-bootstrap/menu.scss | 8 + 4 files changed, 1553 insertions(+) create mode 100644 docs/src/Roo_bootstrap_ButtonUploader.js.html create mode 100644 docs/symbols/Roo.bootstrap.ButtonUploader.json create mode 100644 less/roojs-bootstrap/menu.less create mode 100644 scss/roojs-bootstrap/menu.scss diff --git a/docs/src/Roo_bootstrap_ButtonUploader.js.html b/docs/src/Roo_bootstrap_ButtonUploader.js.html new file mode 100644 index 0000000000..bd5e0b6ea5 --- /dev/null +++ b/docs/src/Roo_bootstrap_ButtonUploader.js.html @@ -0,0 +1,169 @@ +Roo/bootstrap/ButtonUploader.js +/* +* Licence: LGPL +*/ + +/** + * @class Roo.bootstrap.ButtonUploader + * @extends Roo.bootstrap.Button + * Bootstrap Button Uploader class - it's a button which when you add files to it + * + * + * @cfg {Number} errorTimeout default 3000 + * @cfg {Array} images an array of ?? Img objects ??? when loading existing files.. + * @cfg {Array} html The button text. + * @cfg {Boolean} multiple (default true) Should the upload allow multiple files to be uploaded. + * + * @constructor + * Create a new CardUploader + * @param {Object} config The config object + */ + +Roo.bootstrap.ButtonUploader = function(config){ + + + + Roo.bootstrap.ButtonUploader.superclass.constructor.call(this, config); + + + this.addEvents({ + // raw events + /** + * @event beforeselect + * When button is pressed, before show upload files dialog is shown + * @param {Roo.bootstrap.UploaderButton} this + * + */ + 'beforeselect' : true, + /** + * @event fired when files have been selected, + * When a the download link is clicked + * @param {Roo.bootstrap.UploaderButton} this + * @param {Array} Array of files that have been uploaded + */ + 'uploaded' : true + + }); +}; + +Roo.extend(Roo.bootstrap.ButtonUploader, Roo.bootstrap.Button, { + + + errorTimeout : 3000, + + images : false, + + fileCollection : false, + allowBlank : true, + + multiple : true, + + getAutoCreate : function() + { + var im = { + tag: 'input', + type : 'file', + cls : 'd-none roo-card-upload-selector' + + }; + if (this.multiple) { + im.multiple = 'multiple'; + } + + return { + cls :'div' , + cn : [ + Roo.bootstrap.Button.prototype.getAutoCreate.call(this), + im + + ] + }; + + + }, + + + initEvents : function() + { + + Roo.bootstrap.Button.prototype.initEvents.call(this); + + + + + + this.urlAPI = (window.createObjectURL && window) || + (window.URL && URL.revokeObjectURL && URL) || + (window.webkitURL && webkitURL); + + + + + this.selectorEl = this.el.select('.roo-card-upload-selector', true).first(); + + this.selectorEl.on('change', this.onFileSelected, this); + + + + }, + + + onClick : function(e) + { + e.preventDefault(); + + if ( this.fireEvent('beforeselect', this) === false) { + return; + } + + this.selectorEl.dom.click(); + + }, + + onFileSelected : function(e) + { + e.preventDefault(); + + if(typeof(this.selectorEl.dom.files) == 'undefined' || !this.selectorEl.dom.files.length){ + return; + } + var files = Array.prototype.slice.call(this.selectorEl.dom.files); + this.selectorEl.dom.reset(); + + this.fireEvent('uploaded', this, files ); + + }, + + + + + /** + * addCard - add an Attachment to the uploader + * @param data - the data about the image to upload + * + * { + id : 123 + title : "Title of file", + is_uploaded : false, + src : "http://.....", + srcfile : { the File upload object }, + mimetype : file.type, + preview : false, + is_deleted : 0 + .. any other data... + } + * + * + */ + + reset: function() + { + + this.selectorEl + } + + + + +}); + \ No newline at end of file diff --git a/docs/symbols/Roo.bootstrap.ButtonUploader.json b/docs/symbols/Roo.bootstrap.ButtonUploader.json new file mode 100644 index 0000000000..55f3f46dfd --- /dev/null +++ b/docs/symbols/Roo.bootstrap.ButtonUploader.json @@ -0,0 +1,1368 @@ +{ + "name" : "Roo.bootstrap.ButtonUploader", + "augments" : [ + "Roo.bootstrap.Button", + "Roo.bootstrap.Component", + "Roo.Component", + "Roo.util.Observable" + ], + "desc" : "Bootstrap Button Uploader class - it's a button which when you add files to it", + "isSingleton" : false, + "isStatic" : false, + "isBuiltin" : false, + "memberOf" : "ButtonUploader", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "config", + "type" : "Object", + "desc" : "The config object", + "isOptional" : false + } + ], + "returns" : [], + "config" : [ + { + "name" : "toggle", + "type" : "Boolean", + "desc" : "is it a slidy toggle button", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "inverse", + "type" : "Boolean", + "desc" : "dark themed version", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "badge", + "type" : "String", + "desc" : "text for badge", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "hideMode", + "type" : "String", + "desc" : "How this component should hidden. Supported values are\n\"visibility\" (css visibility), \"offsets\" (negative offset position) and\n\"display\" (css display) - defaults to \"display\".", + "memberOf" : "Roo.Component", + "values" : [ + "(display", + "visibility)" + ] + }, + { + "name" : "images", + "type" : "Array", + "desc" : "an array of ?? Img objects ??? when loading existing files..", + "memberOf" : "Roo.bootstrap.ButtonUploader", + "values" : [] + }, + { + "name" : "xattr", + "type" : "Object", + "desc" : "extra attributes to add to 'element' (used by builder to store stuff.)", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "disabled", + "type" : "Boolean", + "desc" : "default false;", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "name", + "type" : "string", + "desc" : "Specifies name attribute", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "weight", + "type" : "String", + "desc" : "default", + "memberOf" : "Roo.bootstrap.Button", + "values" : [ + "(default", + "primary", + "secondary", + "success", + "info", + "warning", + "danger", + "link", + "light", + "dark)" + ] + }, + { + "name" : "grpup", + "type" : "Boolean", + "desc" : "if parent is a btn group - then it turns it into a toogleGroup.", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "tooltip", + "type" : "string", + "desc" : "Text for the tooltip", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "ontext", + "type" : "String", + "desc" : "text for on slidy toggle state", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "preventDefault", + "type" : "Boolean", + "desc" : "default true (stop click event triggering the URL if it's a link.)", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "theme", + "type" : "String", + "desc" : "", + "memberOf" : "Roo.bootstrap.Button", + "values" : [ + "(default", + "glow)" + ] + }, + { + "name" : "target", + "type" : "String", + "desc" : "target for a href.", + "memberOf" : "Roo.bootstrap.Button", + "values" : [ + "(_self", + "_blank", + "_parent", + "_top", + "other)" + ] + }, + { + "name" : "glyphicon", + "type" : "String", + "desc" : "depricated - use fa", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "allowDomMove", + "type" : "Boolean", + "desc" : "Whether the component can move the Dom node when rendering (defaults to true).", + "memberOf" : "Roo.Component", + "values" : [] + }, + { + "name" : "style", + "type" : "String", + "desc" : "any extra css", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "isClose", + "type" : "Boolean", + "desc" : "default false;", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "errorTimeout", + "type" : "Number", + "desc" : "default 3000", + "memberOf" : "Roo.bootstrap.ButtonUploader", + "values" : [] + }, + { + "name" : "actionMode", + "type" : "String", + "desc" : "which property holds the element that used for hide() / show() / disable() / enable()\ndefault is 'el' for forms you probably want to set this to fieldEl", + "memberOf" : "Roo.Component", + "values" : [] + }, + { + "name" : "listeners", + "type" : "Object", + "desc" : "list of events and functions to call for this object, \nFor example :\n
\n    listeners :  { \n       'click' : function(e) {\n           ..... \n        } ,\n        .... \n    } \n  
", + "memberOf" : "Roo.util.Observable", + "values" : [] + }, + { + "name" : "container_method", + "type" : "string", + "desc" : "method to fetch parents container element (used by NavHeaderbar - getHeaderChildContainer)", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "fa", + "type" : "String", + "desc" : "fontawesome icon - eg. 'comment' - without the fa/fas etc..", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "size", + "type" : "String", + "desc" : "", + "memberOf" : "Roo.bootstrap.Button", + "values" : [ + "(lg", + "sm", + "xs)" + ] + }, + { + "name" : "cls", + "type" : "String", + "desc" : "css class", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "badge_weight", + "type" : "String", + "desc" : "default (same as button)", + "memberOf" : "Roo.bootstrap.Button", + "values" : [ + "(default", + "primary", + "secondary", + "success", + "info", + "warning", + "danger", + "link", + "light", + "dark)" + ] + }, + { + "name" : "can_build_overlaid", + "type" : "Boolean", + "desc" : "True if element can be rebuild from a HTML page", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "disableClass", + "type" : "String", + "desc" : "CSS class added to the component when it is disabled (defaults to \"x-item-disabled\").", + "memberOf" : "Roo.Component", + "values" : [] + }, + { + "name" : "multiple", + "type" : "Boolean", + "desc" : "(default true) Should the upload allow multiple files to be uploaded.", + "memberOf" : "Roo.bootstrap.ButtonUploader", + "values" : [] + }, + { + "name" : "visibilityEl", + "type" : "string|object", + "desc" : "What element to use for visibility (@see getVisibilityEl())", + "memberOf" : "Roo.bootstrap.Component", + "values" : [ + "(el", + "parent)" + ] + }, + { + "name" : "href", + "type" : "String", + "desc" : "empty or href", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "tag", + "type" : "String", + "desc" : "", + "memberOf" : "Roo.bootstrap.Button", + "values" : [ + "(a", + "input", + "submit)" + ] + }, + { + "name" : "dataId", + "type" : "string", + "desc" : "cutomer id", + "memberOf" : "Roo.bootstrap.Component", + "values" : [] + }, + { + "name" : "outline", + "type" : "Boolean", + "desc" : "default false (except for weight=default which emulates old behaveiour with an outline)", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "offtext", + "type" : "String", + "desc" : "text for off slidy toggle state", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "removeClass", + "type" : "Boolean", + "desc" : "remove the standard class..", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + }, + { + "name" : "html", + "type" : "Array", + "desc" : "The button text.", + "memberOf" : "Roo.bootstrap.ButtonUploader", + "values" : [] + }, + { + "name" : "pressed", + "type" : "Boolean", + "desc" : "default null - if the button ahs active state", + "memberOf" : "Roo.bootstrap.Button", + "values" : [] + } + ], + "methods" : [ + { + "name" : "reset", + "desc" : "addCard - add an Attachment to the uploader", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.ButtonUploader", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "data", + "type" : "", + "desc" : "- the data about the image to upload\n\n{\n id : 123\n title : \"Title of file\",\n is_uploaded : false,\n src : \"http://.....\",\n srcfile : { the File upload object },\n mimetype : file.type,\n preview : false,\n is_deleted : 0\n .. any other data...\n }", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "setText", + "desc" : "set the text of the first selected button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "isActive", + "desc" : "get the current active state", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [ + { + "name" : "", + "type" : "boolean", + "desc" : "true if it's active" + } + ] + }, + { + "name" : "setActive", + "desc" : "sets the active state on/off,", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "state", + "type" : "Boolean", + "desc" : "(optional) Force a particular state", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "toggleActive", + "desc" : "toggles the current active state", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "getText", + "desc" : "get the text of the first selected button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "enable", + "desc" : "Enables this button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "disable", + "desc" : "Disable this button", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "tooltipEl", + "desc" : "Fetch the element to display the tooltip on.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [ + { + "name" : "", + "type" : "Roo.Element", + "desc" : "defaults to this.el" + } + ] + }, + { + "name" : "hide", + "desc" : "Hide a component - adds 'hidden' class", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "show", + "desc" : "Show a component - removes 'hidden' class", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "setVisibilityEl", + "desc" : "Set the element that will be used to show or hide", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "getVisibilityEl", + "desc" : "Get the element that will be used to show or hide", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "initEvents", + "desc" : "Initialize Events for the element", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "getChildContainer", + "desc" : "Fetch the element to add children to", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [ + { + "name" : "", + "type" : "Roo.Element", + "desc" : "defaults to this.el" + } + ] + }, + { + "name" : "getId", + "desc" : "Returns the id of this component.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [ + { + "name" : "", + "type" : "String", + "desc" : "" + } + ] + }, + { + "name" : "render", + "desc" : "If this is a lazy rendering component, render it to its container element.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "container", + "type" : "String/HTMLElement/Element", + "desc" : "(optional) The element this component should be rendered into. If it is being applied to existing markup, this should be left off.", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "destroy", + "desc" : "Destroys this component by purging any event listeners, removing the component's element from the DOM,\nremoving the component from its {@link Roo.Container} (if applicable) and unregistering it from {@link Roo.ComponentMgr}.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "isVisible", + "desc" : "Returns true if this component is visible.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "setDisabled", + "desc" : "Convenience function for setting disabled/enabled by boolean.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "disabled", + "type" : "Boolean", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "focus", + "desc" : "Try to focus this component.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "selectText", + "type" : "Boolean", + "desc" : "True to also select the text in this component (if applicable)", + "isOptional" : false + } + ], + "returns" : [ + { + "name" : "", + "type" : "Roo.Component", + "desc" : "this" + } + ] + }, + { + "name" : "setVisible", + "desc" : "Convenience function to hide or show this component by boolean.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "visible", + "type" : "Boolean", + "desc" : "True to show, false to hide", + "isOptional" : false + } + ], + "returns" : [ + { + "name" : "", + "type" : "Roo.Component", + "desc" : "this" + } + ] + }, + { + "name" : "getEl", + "desc" : "Returns the underlying {@link Roo.Element}.", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [ + { + "name" : "", + "type" : "Roo.Element", + "desc" : "The element" + } + ] + }, + { + "name" : "purgeListeners", + "desc" : "Removes all listeners for this object", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [], + "returns" : [] + }, + { + "name" : "on", + "desc" : "Appends an event handler to this element (shorthand for addListener)", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "eventName", + "type" : "String", + "desc" : "The type of event to listen for", + "isOptional" : false + }, + { + "name" : "handler", + "type" : "Function", + "desc" : "The method the event invokes", + "isOptional" : false + }, + { + "name" : "scope", + "type" : "Object", + "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.", + "isOptional" : false + }, + { + "name" : "options", + "type" : "Object", + "desc" : "(optional)", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "un", + "desc" : "Removes a listener (shorthand for removeListener)", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "eventName", + "type" : "String", + "desc" : "The type of event to listen for", + "isOptional" : false + }, + { + "name" : "handler", + "type" : "Function", + "desc" : "The handler to remove", + "isOptional" : false + }, + { + "name" : "scope", + "type" : "Object", + "desc" : "(optional) The scope (this object) for the handler", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "addEvents", + "desc" : "Used to define events on this Observable", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "object", + "type" : "Object", + "desc" : "The object with the events defined", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "releaseCapture", + "desc" : "Removes all added captures from the Observable.", + "isStatic" : true, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "o", + "type" : "Observable", + "desc" : "The Observable to release", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "removeListener", + "desc" : "Removes a listener", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "eventName", + "type" : "String", + "desc" : "The type of event to listen for", + "isOptional" : false + }, + { + "name" : "handler", + "type" : "Function", + "desc" : "The handler to remove", + "isOptional" : false + }, + { + "name" : "scope", + "type" : "Object", + "desc" : "(optional) The scope (this object) for the handler", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "fireEvent", + "desc" : "Fires the specified event with the passed parameters (minus the event name).", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "eventName", + "type" : "String", + "desc" : "", + "isOptional" : false + }, + { + "name" : "args", + "type" : "Object...", + "desc" : "Variable number of parameters are passed to handlers", + "isOptional" : false + } + ], + "returns" : [ + { + "name" : "", + "type" : "Boolean", + "desc" : "returns false if any of the handlers return false otherwise it returns true" + } + ] + }, + { + "name" : "hasListener", + "desc" : "Checks to see if this object has any listeners for a specified event", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "eventName", + "type" : "String", + "desc" : "The name of the event to check for", + "isOptional" : false + } + ], + "returns" : [ + { + "name" : "", + "type" : "Boolean", + "desc" : "True if the event is being listened for, else false" + } + ] + }, + { + "name" : "capture", + "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\nbefore the event is fired. If the supplied function returns false,\nthe event will not fire.", + "isStatic" : true, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "o", + "type" : "Observable", + "desc" : "The Observable to capture", + "isOptional" : false + }, + { + "name" : "fn", + "type" : "Function", + "desc" : "The function to call", + "isOptional" : false + }, + { + "name" : "scope", + "type" : "Object", + "desc" : "(optional) The scope (this object) for the fn", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "addListener", + "desc" : "Appends an event handler to this component", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "memberOf" : "Roo.util.Observable", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "eventName", + "type" : "String", + "desc" : "The type of event to listen for", + "isOptional" : false + }, + { + "name" : "handler", + "type" : "Function", + "desc" : "The method the event invokes", + "isOptional" : false + }, + { + "name" : "scope", + "type" : "Object", + "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.", + "isOptional" : false + }, + { + "name" : "options", + "type" : "Object", + "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:
\n

\nCombining Options
\nUsing the options argument, it is possible to combine different types of listeners:
\n
\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t

\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n    \t\tdelay: 100,\n    \t\tforumId: 4\n\t\t});\n\t\t
\n

\nAttaching multiple handlers in 1 call
\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n

\n\t\tel.on({\n\t\t\t'click': {\n        \t\tfn: this.onClick,\n        \t\tscope: this,\n        \t\tdelay: 100\n    \t\t}, \n    \t\t'mouseover': {\n        \t\tfn: this.onMouseOver,\n        \t\tscope: this\n    \t\t},\n    \t\t'mouseout': {\n        \t\tfn: this.onMouseOut,\n        \t\tscope: this\n    \t\t}\n\t\t});\n\t\t
\n

\nOr a shorthand syntax which passes the same scope object to all handlers:\n \t

\n\t\tel.on({\n\t\t\t'click': this.onClick,\n    \t\t'mouseover': this.onMouseOver,\n    \t\t'mouseout': this.onMouseOut,\n    \t\tscope: this\n\t\t});\n\t\t
", + "isOptional" : false + } + ], + "returns" : [] + } + ], + "events" : [ + { + "name" : "fired when files have been selected,", + "desc" : "When a the download link is clicked", + "memberOf" : "Roo.bootstrap.ButtonUploader", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.bootstrap.UploaderButton", + "desc" : "", + "isOptional" : false + }, + { + "name" : "Array", + "type" : "Array", + "desc" : "of files that have been uploaded", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "beforeselect", + "desc" : "When button is pressed, before show upload files dialog is shown", + "memberOf" : "Roo.bootstrap.ButtonUploader", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.bootstrap.UploaderButton", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "toggle", + "desc" : "After the button has been toggles", + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "btn", + "type" : "Roo.bootstrap.Button", + "desc" : "", + "isOptional" : false + }, + { + "name" : "e", + "type" : "Roo.EventObject", + "desc" : "", + "isOptional" : false + }, + { + "name" : "pressed", + "type" : "boolean", + "desc" : "(also available as button.pressed)", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "dblclick", + "desc" : "When a button is double clicked", + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "btn", + "type" : "Roo.bootstrap.Button", + "desc" : "", + "isOptional" : false + }, + { + "name" : "e", + "type" : "Roo.EventObject", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "click", + "desc" : "When a button is pressed", + "memberOf" : "Roo.bootstrap.Button", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "btn", + "type" : "Roo.bootstrap.Button", + "desc" : "", + "isOptional" : false + }, + { + "name" : "e", + "type" : "Roo.EventObject", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "childrenrendered", + "desc" : "Fires when the children have been rendered..", + "memberOf" : "Roo.bootstrap.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.bootstrap.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "beforerender", + "desc" : "Fires before the component is rendered. Return false to stop the render.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "disable", + "desc" : "Fires after the component is disabled.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "render", + "desc" : "Fires after the component is rendered.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "destroy", + "desc" : "Fires after the component is destroyed.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "hide", + "desc" : "Fires after the component is hidden.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "beforehide", + "desc" : "Fires before the component is hidden. Return false to stop the hide.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "show", + "desc" : "Fires after the component is shown.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "beforeshow", + "desc" : "Fires before the component is shown. Return false to stop the show.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "enable", + "desc" : "Fires after the component is enabled.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + }, + { + "name" : "beforedestroy", + "desc" : "Fires before the component is destroyed. Return false to stop the destroy.", + "memberOf" : "Roo.Component", + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "params" : [ + { + "name" : "this", + "type" : "Roo.Component", + "desc" : "", + "isOptional" : false + } + ], + "returns" : [] + } + ] +} \ No newline at end of file diff --git a/less/roojs-bootstrap/menu.less b/less/roojs-bootstrap/menu.less new file mode 100644 index 0000000000..c42ae376db --- /dev/null +++ b/less/roojs-bootstrap/menu.less @@ -0,0 +1,8 @@ + + +/* Menu - show the icons with a bit of padding */ + +.dropdown-item i.fa { + margin-left: -10px; + margin-right: 10px; +} \ No newline at end of file diff --git a/scss/roojs-bootstrap/menu.scss b/scss/roojs-bootstrap/menu.scss new file mode 100644 index 0000000000..c42ae376db --- /dev/null +++ b/scss/roojs-bootstrap/menu.scss @@ -0,0 +1,8 @@ + + +/* Menu - show the icons with a bit of padding */ + +.dropdown-item i.fa { + margin-left: -10px; + margin-right: 10px; +} \ No newline at end of file -- 2.39.2