|
122 | 122 | var compressImages = false; |
123 | 123 | var changeTimer; |
124 | 124 | var lastImage=null; |
| 125 | + var touchmoved; |
| 126 | + |
125 | 127 |
|
126 | 128 | var lazyLoad = { |
127 | 129 | loadImage: function (item) { |
|
274 | 276 | divImg.setAttribute('index', i); |
275 | 277 | //divImg.onclick = plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable"? onClick : null; |
276 | 278 | divImg.addEventListener('click', plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable"? onClick : null); |
277 | | - divImg.addEventListener('touchstart',plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable"? onClick : null); |
278 | | - |
| 279 | + divImg.addEventListener('touchend',plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable"? onClick : null); |
| 280 | + divImg.addEventListener('touchmove',function(){touchmoved=true;}); |
| 281 | + divImg.addEventListener('touchstart',function(){touchmoved=false;}); |
279 | 282 | if (p.iconUrl || p.iconClassName) { |
280 | 283 | if (p.iconUrl) { |
281 | 284 | divImg.classList.add("hasImg"); |
|
313 | 316 | divBlackLayer.setAttribute('index', i); |
314 | 317 | //divBlackLayer.onclick = plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null; |
315 | 318 | divBlackLayer.addEventListener('click',plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null); |
316 | | - divBlackLayer.addEventListener('touchstart',plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null); |
| 319 | + divBlackLayer.addEventListener('touchend',plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null); |
| 320 | + divBlackLayer.addEventListener('touchmove',function(){touchmoved=true;}); |
| 321 | + divBlackLayer.addEventListener('touchstart',function(){touchmoved=false;}); |
317 | 322 | pluginItemDetails.appendChild(divBlackLayer); |
318 | 323 | } |
319 | 324 |
|
|
322 | 327 | divTitle.classList.add("media-holder-text"); |
323 | 328 | // divTitle.onclick = plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null; |
324 | 329 | divTitle.addEventListener('click', plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null); |
325 | | - divTitle.addEventListener('touchstart', plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null); |
| 330 | + divTitle.addEventListener('touchend', plugins[i].hasAccess|| obj.data.design.securedFeaturesOption =="Enable" ? onClick : null); |
| 331 | + divTitle.addEventListener('touchmove',function(){touchmoved=true;}); |
| 332 | + divTitle.addEventListener('touchstart',function(){touchmoved=false;}); |
326 | 333 | divTitle.setAttribute('index', i); |
327 | 334 |
|
328 | 335 | if ([4, 5].indexOf(layout) > -1) |
|
675 | 682 | } |
676 | 683 |
|
677 | 684 | function onClick(e) { |
678 | | - |
679 | | - var i = parseInt(this.getAttribute('index')); |
680 | | - var p = plugins[i]; |
681 | | - |
682 | | - buildfire.navigation.navigateTo({ |
683 | | - pluginId: p.pluginTypeId |
684 | | - , folderName: p.folderName |
685 | | - , instanceId: p.instanceId |
686 | | - , title: p.title |
687 | | - }); |
| 685 | + if(touchmoved != true){ |
| 686 | + var i = parseInt(this.getAttribute('index')); |
| 687 | + var p = plugins[i]; |
| 688 | + |
| 689 | + buildfire.navigation.navigateTo({ |
| 690 | + pluginId: p.pluginTypeId |
| 691 | + , folderName: p.folderName |
| 692 | + , instanceId: p.instanceId |
| 693 | + , title: p.title |
| 694 | + }); |
| 695 | + } |
688 | 696 | } |
689 | 697 |
|
690 | 698 | function shuffle(a,first,last) { |
|
0 commit comments