roojs-bootstrap.js
authoredward <edward@roojs.com>
Fri, 21 Jul 2017 04:16:44 +0000 (12:16 +0800)
committeredward <edward@roojs.com>
Fri, 21 Jul 2017 04:16:44 +0000 (12:16 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 7569234..cf85c93 100644 (file)
@@ -13870,6 +13870,41 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             ]
         };
         
+//        if(!this.multiple && this.showToggleBtn){
+//            
+//            var caret = {
+//                        tag: 'span',
+//                        cls: 'caret'
+//            };
+//            
+//            if (this.caret != false) {
+//                caret = {
+//                     tag: 'i',
+//                     cls: 'fa fa-' + this.caret
+//                };
+//                
+//            }
+//            
+//            combobox.cn.push({
+//                tag :'span',
+//                cls : 'input-group-addon btn dropdown-toggle',
+//                cn : [
+//                    caret,
+//                    {
+//                        tag: 'span',
+//                        cls: 'combobox-clear',
+//                        cn  : [
+//                            {
+//                                tag : 'i',
+//                                cls: 'icon-remove'
+//                            }
+//                        ]
+//                    }
+//                ]
+//
+//            })
+//        }
+        
         if(this.multiple){
             combobox.cls += ' roo-select2-container-multi';
         }
@@ -13920,7 +13955,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         
         this.originalValue = this.getValue();
         
-        this.inputEl().on("click", this.showTouchView, this);
+        this.inputEl().on("touch", this.showTouchView, this);
         
         this.touchViewFooterEl.select('.roo-touch-view-cancel', true).first().on('click', this.hideTouchView, this);
         this.touchViewFooterEl.select('.roo-touch-view-ok', true).first().on('click', this.setTouchViewValue, this);
@@ -30388,8 +30423,6 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
     
     onClick: function(e, el)
     {
-       // alert('click');
-        
         if(!Roo.isTouch){
             return;
         }
@@ -30427,6 +30460,8 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
     {
 //        e.preventDefault();
         
+        this.touchmoved = false;
+        
         if(!this.bgimage.length || !this.html.length){
             return;
         }
@@ -30435,27 +30470,26 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
         
         this.timer = new Date().getTime();
         
-        this.touchmoved = false;
     },
     
     onTouchMove: function(e, el)
     {
         this.touchmoved = true;
     },
+    
     onContextMenu : function(e,el)
     {
-            e.preventDefault();
-            e.stopPropagation();
-            return false;
+        e.preventDefault();
+        e.stopPropagation();
+        return false;
     },
     
-    
     onTouchEnd: function(e, el)
     {
 //        e.preventDefault();
         
         if((new Date().getTime() - this.timer > 1000) || !this.href.length || this.touchmoved){
-            
+        
             this.leave(e,el);
             
             return;
index 18a65f0..3782afc 100644 (file)
@@ -547,7 +547,7 @@ var A={cls:'form-group'};var B={tag:'input',id:id,type:this.inputType,cls:'form-
 ,C]};if(this.multiple){D={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[C]}]}]}};var E={cls:'roo-select2-container input-group',cn:[D]};if(this.multiple){E.cls+=' roo-select2-container-multi';
 }var F=this.labelAlign||this.parentLabelAlign();A.cn=E;if(this.fieldLabel.length&&this.labelWidth){var lw=F==='left'?('col-sm'+this.labelWidth):'';var cw=F==='left'?('col-sm'+(12-this.labelWidth)):'';A.cn=[{tag:'label',cls:'control-label '+lw,html:this.fieldLabel}
 ,{cls:cw,cn:[E]}];}var G=this;['xs','sm','md','lg'].map(function(H){if(G[H]){A.cls+=' col-'+H+'-'+G[H];}});return A;},initTouchView:function(){this.renderTouchView();this.touchViewEl.on('scroll',function(){this.el.dom.scrollTop=0;},this);this.originalValue=this.getValue();
-this.inputEl().on("click",this.showTouchView,this);this.touchViewFooterEl.select('.roo-touch-view-cancel',true).first().on('click',this.hideTouchView,this);this.touchViewFooterEl.select('.roo-touch-view-ok',true).first().on('click',this.setTouchViewValue,this);
+this.inputEl().on("touch",this.showTouchView,this);this.touchViewFooterEl.select('.roo-touch-view-cancel',true).first().on('click',this.hideTouchView,this);this.touchViewFooterEl.select('.roo-touch-view-ok',true).first().on('click',this.setTouchViewValue,this);
 this.maskEl=new Roo.LoadMask(this.touchViewEl,{store:this.store,msgCls:'roo-el-mask-msg'});this.store.on('beforeload',this.onTouchViewBeforeLoad,this);this.store.on('load',this.onTouchViewLoad,this);this.store.on('loadexception',this.onTouchViewLoadException,this);
 if(this.hiddenName){this.hiddenField=this.el.select('input.form-hidden-field',true).first();this.hiddenField.dom.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:'';this.el.dom.removeAttribute('name');this.hiddenField.dom.setAttribute('name',this.hiddenName);
 }if(this.multiple){this.choices=this.el.select('ul.roo-select2-choices',true).first();this.searchField=this.el.select('ul li.roo-select2-search-field',true).first();}if(this.removable&&!this.multiple){var A=this.closeTriggerEl();if(A){A.setVisibilityMode(Roo.Element.DISPLAY).hide();
@@ -1272,7 +1272,7 @@ break;default:break;}}else{if(!this.html.length&&!this.bgimage.length){A+=' maso
 case 'wide-thin':this.x=3;this.y=1;break;default:break;}if(Roo.isTouch){this.el.on('touchstart',this.onTouchStart,this);this.el.on('touchmove',this.onTouchMove,this);this.el.on('touchend',this.onTouchEnd,this);this.el.on('contextmenu',this.onContextMenu,this);
 }else{this.el.on('mouseenter',this.enter,this);this.el.on('mouseleave',this.leave,this);}if(typeof(this.parent().bricks)=='object'&&this.parent().bricks!=null){this.parent().bricks.push(this);}},onClick:function(e,el){if(!Roo.isTouch){return;}var A=this.endTimer-this.startTimer;
 if(A<1000){return;}e.preventDefault();},enter:function(e,el){e.preventDefault();if(this.bgimage.length&&this.html.length){this.el.select('.masonry-brick-paragraph',true).first().setOpacity(0.9,true);}},leave:function(e,el){e.preventDefault();if(this.bgimage.length&&this.html.length){this.el.select('.masonry-brick-paragraph',true).first().setOpacity(0,true);
-}},onTouchStart:function(e,el){if(!this.bgimage.length||!this.html.length){return;}this.el.select('.masonry-brick-paragraph',true).first().setOpacity(0.9,true);this.timer=new Date().getTime();this.touchmoved=false;},onTouchMove:function(e,el){this.touchmoved=true;
+}},onTouchStart:function(e,el){this.touchmoved=false;if(!this.bgimage.length||!this.html.length){return;}this.el.select('.masonry-brick-paragraph',true).first().setOpacity(0.9,true);this.timer=new Date().getTime();},onTouchMove:function(e,el){this.touchmoved=true;
 },onContextMenu:function(e,el){e.preventDefault();e.stopPropagation();return false;},onTouchEnd:function(e,el){if((new Date().getTime()-this.timer>1000)||!this.href.length||this.touchmoved){this.leave(e,el);return;}if(!this.bgimage.length||!this.html.length){if(this.href.length){window.location.href=this.href;
 }return;}this.el.select('.masonry-brick-paragraph',true).first().setOpacity(0,true);window.location.href=this.href;}});
 // Roo/bootstrap/Brick.js