{
return this.el;
},
+ getDocumentBody : function() // used by menus - as they are attached to the body so zIndexes work
+ {
+ return Roo.get(document.body);
+ },
+
/**
* Fetch the element to display the tooltip on.
* @return {Roo.Element} defaults to this.el
/**
* @event fired when files have been selected,
* When a the download link is clicked
- * @param {Roo.bootstrap.Card} this
- * @param {Object} The image information data contains
+ * @param {Roo.bootstrap.UploaderButton} this
+ * @param {Array} Array of files that have been uploaded
*/
'uploaded' : true
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 );
- Roo.each(this.selectorEl.dom.files, function(file){
- var url = this.urlAPI.createObjectURL(file); // not sure...
- this.fireEvent('uploaded', this, [file, url]);
- }, this);
-
},
isLink : false,
+ container_method : 'getDocumentBody',
+
+
getChildContainer : function() {
return this.el;
},
this.triggerEl.on(Roo.isTouch ? 'touchstart' : 'mouseup', this.onTriggerPress, this);
- if (this.triggerEl.hasClass('nav-item')) {
+ if (this.triggerEl.hasClass('nav-item') && this.triggerEl.select('.nav-link',true).length) {
// dropdown toggle on the 'a' in BS4?
this.triggerEl.select('.nav-link',true).first().addClass('dropdown-toggle');
- } else {
+ } else if (!this.triggerEl.hasClass('no-dropdown-toggle')) {
this.triggerEl.addClass('dropdown-toggle');
}
if (Roo.isTouch) {
getAutoCreate : function(){
var cfg = {
tag : 'li',
- cls: 'divider'
+ cls: 'dropdown-divider divider'
};
return cfg;