sync
[roojs1] / roojs-bootstrap-debug.js
index 1ad425e..f513d56 100644 (file)
@@ -2867,7 +2867,7 @@ Roo.extend(Roo.bootstrap.CardImageTop, Roo.bootstrap.Element,  {
  * @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
@@ -2911,22 +2911,25 @@ Roo.extend(Roo.bootstrap.ButtonUploader, Roo.bootstrap.Button,  {
     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),
-                {
-                    tag: 'input',
-                    multiple : 'multiple',
-                    type : 'file',
-                    cls : 'd-none  roo-card-upload-selector' 
-                  
-                }
-                 
+                im
 
             ]
         };
@@ -3576,6 +3579,7 @@ Roo.bootstrap.MenuMgr = function(){
  * @cfg {bool} hidden  if the menu should be hidden when rendered.
  * @cfg {bool} stopEvent (true|false)  Stop event after trigger press (default true)
  * @cfg {bool} isLink (true|false)  the menu has link disable auto expand and collaspe (default false)
+ * @cfg {bool} hideTrigger (true|false)  default false - hide the carret for trigger.
  * 
  * @constructor
  * Create a new Menu
@@ -3671,7 +3675,9 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
     
     isLink : false,
     
-    container_method : 'getDocumentBody',
+    container_method : 'getDocumentBody', // so the menu is rendered on the body and zIndex works.
+    
+    hideTrigger : false,
     
     
     getChildContainer : function() {
@@ -3687,7 +3693,7 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         
         var cfg = {
             tag : 'ul',
-            cls : 'dropdown-menu' ,
+            cls : 'dropdown-menu shadow' ,
             style : 'z-index:1000'
             
         };
@@ -3710,12 +3716,13 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         
         this.triggerEl.on(Roo.isTouch ? 'touchstart' : 'mouseup', this.onTriggerPress, this);
         
-       
-       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 if (!this.triggerEl.hasClass('no-dropdown-toggle')) {
-           this.triggerEl.addClass('dropdown-toggle');
+       if (!this.hideTrigger) {
+           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 {
+               this.triggerEl.addClass('dropdown-toggle');
+           }
        }
         if (Roo.isTouch) {
             this.el.on('touchstart'  , this.onTouch, this);