',link:function(b,c,d,e){var f,g;e&&(f=c.children().eq(0),g=c.children().eq(1),f.length&&g.length&&(b.toggle=new a.views.Toggle({el:c[0],checkbox:f[0],handle:g[0]}),b.toggleIt=function(a){b.toggle.tap(a),e.$setViewValue(f[0].checked)},e.$render=function(){b.toggle.val(e.$viewValue)}))}}})}(window.ionic),function(){"use strict";angular.module("ionic.ui.virtRepeat",[]).directive("virtRepeat",function(){return{require:["?ngModel","^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(){return function(a,b,c,d){var e=d[1];
-e.listView.renderViewport=function(){}}}}})}(ionic),function(){"use strict";function a(a){var b=a.match(/^\s*([\$\w]+)\s+in\s+(\S*)\s*$/);if(!b)throw new Error("Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '"+a+"'.");return{value:b[1],collection:b[2]}}function b(a){var b={overflow:"auto"},c=window.getComputedStyle?window.getComputedStyle(a[0]):a[0].currentStyle,d=c&&c.getPropertyValue("max-height"),e=c&&c.getPropertyValue("height");d&&"0px"!==d?b.maxHeight=d:b.height=e&&"0px"!==e?e:window.innerHeight,a.css(b)}function c(a){var b={margin:0,padding:0,border:0,"box-sizing":"border-box"};a.css(b)}function d(a){var b=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,c=b&&b.getPropertyValue("max-height"),d=b&&b.getPropertyValue("height");if(d&&"0px"!==d&&"auto"!==d)$log.info('Row height is "%s" from css height',d);else if(c&&"0px"!==c&&"none"!==c)d=c,$log.info('Row height is "%s" from css max-height',d);else{if(!a.clientHeight)throw new Error("Unable to compute height of row");d=a.clientHeight+"px",$log.info('Row height is "%s" from client height',d)}return angular.element(a).css("height",d),parseInt(d,10)}angular.module("ionic.ui.virtualRepeat",[]).directive("virtualRepeat",["$log",function(e){return{require:["?ngModel, ^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(f,g){var h=a(g.sfVirtualRepeat);return function(a,f,g,i){function j(a,b,c){var d=c.$new();return d[h.value]=b[a],d.$index=a,d.$first=0===a,d.$last=a===b.length-1,d.$middle=!(d.$first||d.$last),d.$watch(function(){d[h.value]=b[a]}),d}function k(a,b,c,d,e){var f,g,h,i=document.createDocumentFragment(),k=[];for(g=a;g!==b;g++)h=j(g,c,d),f=linker(h,angular.noop),k.push(f),i.appendChild(f[0]);return e.after(i),k}function l(){var a=clip(v.firstActive,v.firstVisible-v.lowWater,v.firstVisible-v.highWater),b=clip(v.firstActive+v.active,v.firstVisible+v.visible+v.lowWater,v.firstVisible+v.visible+v.highWater);v.firstActive=Math.max(0,a),v.active=Math.min(b,v.total)-v.firstActive}function m(b){s&&a.$apply(function(){v.firstVisible=Math.floor(b.target.scrollTop/s),v.visible=Math.ceil(u.viewport[0].clientHeight/s),e.log("scroll to row %o",v.firstVisible),t=b.target.scrollTop+b.target.clientHeight>=b.target.scrollHeight,l(),e.log(" state is now %o",v),e.log(" sticky = %o",t)})}function n(a){var b=a.$eval(h.collection);return b.length!==v.total&&(v.total=b.length,l()),{start:v.firstActive,active:v.active,len:b.length}}function o(a,b){var c,d,e=Array.prototype[a];for(d=0;b>d;d++)c=e.call(r),c.scope().$destroy(),c.remove()}function p(a,b,c){var g,i=b.start+b.active,j=c.$eval(h.collection);if(a===b)e.info("initial listen"),g=k(a.start,i,j,c,f),r=g,r.length&&(s=d(g[0][0]));else{var l=a.start+a.active,m=a.start>=b.start,n=m?a.start-b.start:b.start-a.start,p=l>=i?l-i:i-l,q=n<(m?b.active:a.active);if(e.info("change by %o,%o rows %s",n,p,m?"forward":"backward"),q){if(m?(e.info("need to remove from the top"),o("shift",n)):n&&(e.info("need to add at the top"),g=k(a.start,b.start,j,c,f),r=g.concat(r)),i>l)e.info("need to remove from the bottom"),o("pop",i-l);else if(p){var v=r[r.length-1];e.info("need to add to the bottom"),g=k(i,l,j,c,v),r=r.concat(g)}}else e.info("non-contiguous change"),o("pop",r.length),r=k(a.start,l,j,c,f);!s&&r.length&&(s=d(r[0][0])),u.content.css({"padding-top":a.start*s+"px"})}u.content.css({height:a.len*s+"px"}),t&&(u.viewport[0].scrollTop=u.viewport[0].clientHeight+u.viewport[0].scrollHeight)}var q=i[1],r=[],s=0,t=!1,u=q.element,v="ngModel"in g?a.$eval(g.ngModel):{};v.firstActive=0,v.firstVisible=0,v.visible=0,v.active=0,v.total=0,v.lowWater=v.lowWater||100,v.highWater=v.highWater||300,c(u.content),b(u.viewport),u.bind("momentumScrolled",m),a.$on("$destroy",function(){u.unbind("momentumScrolled",m)}),a.$watch(n,p,!0)}}}}])}(ionic);
\ No newline at end of file
+angular.module("ionic.service",["ionic.service.platform","ionic.service.actionSheet","ionic.service.gesture","ionic.service.loading","ionic.service.modal","ionic.service.popup","ionic.service.templateLoad"]),angular.module("ionic.ui.service",["ionic.ui.service.scrollDelegate"]),angular.module("ionic.ui",["ionic.ui.content","ionic.ui.scroll","ionic.ui.tabs","ionic.ui.navRouter","ionic.ui.header","ionic.ui.sideMenu","ionic.ui.slideBox","ionic.ui.list","ionic.ui.checkbox","ionic.ui.toggle","ionic.ui.radio"]),angular.module("ionic",["ionic.service","ionic.ui.service","ionic.ui","ngAnimate","ngRoute","ngTouch","ngSanitize"]),function(){"use strict";angular.module("ionic.ui.service.scrollDelegate",[]).factory("ScrollDelegate",["$rootScope",function(a){return{scrollTop:function(b){a.$broadcast("scroll.scrollTop",b)},tapScrollToTop:function(a){var b=this;ionic.on("tap",function(c){var d=a[0],e=d.getBoundingClientRect();ionic.DomUtil.rectContains(c.gesture.touches[0].pageX,c.gesture.touches[0].pageY,e.left,e.top,e.left+e.width,e.top+20)&&b.scrollTop()},a[0])},register:function(a,b){b.bind("scroll",function(b){a.onScroll({event:b,scrollTop:b.detail?b.detail.scrollTop:b.originalEvent?b.originalEvent.detail.scrollTop:0,scrollLeft:b.detail?b.detail.scrollLeft:b.originalEvent?b.originalEvent.detail.scrollLeft:0})}),a.$parent.$on("scroll.resize",function(){$timeout(function(){a.$parent.scrollView&&a.$parent.scrollView.resize()})}),a.$parent.$on("scroll.refreshComplete",function(){a.$parent.scrollView&&a.$parent.scrollView.finishPullToRefresh()}),a.$parent.$on("scroll.scrollTop",function(b,c){a.$parent.scrollView&&a.$parent.scrollView.scrollTo(0,0,c===!1?!1:!0)})}}}])}(ionic),angular.module("ionic.service.actionSheet",["ionic.service.templateLoad","ionic.ui.actionSheet","ngAnimate"]).factory("ActionSheet",["$rootScope","$document","$compile","$animate","$timeout","TemplateLoader",function(a,b,c,d){return{show:function(e){var f=a.$new(!0);angular.extend(f,e);var g=c('')(f),h=angular.element(g[0].querySelector(".action-sheet")),i=function(a){d.leave(h,function(){a&&e.cancel()}),d.removeClass(g,"active",function(){f.$destroy()})};f.cancel=function(){i(!0)},f.buttonClicked=function(a){(e.buttonClicked&&e.buttonClicked(a))===!0&&i(!1)},f.destructiveButtonClicked=function(){(e.destructiveButtonClicked&&e.destructiveButtonClicked())===!0&&i(!1)},b[0].body.appendChild(g[0]);var j=new ionic.views.ActionSheet({el:g[0]});return f.sheet=j,d.addClass(g,"active"),d.enter(h,g,null,function(){}),j}}}]),angular.module("ionic.service.gesture",[]).factory("Gesture",[function(){return{on:function(a,b,c){return window.ionic.onGesture(a,b,c[0])},off:function(a,b,c){return window.ionic.offGesture(a,b,c)}}}]),angular.module("ionic.service.loading",["ionic.ui.loading"]).factory("Loading",["$rootScope","$document","$compile",function(a,b,c){return{show:function(d){var e={content:"",animation:"fade-in",showBackdrop:!0,maxWidth:200,showDelay:2e3};d=angular.extend(e,d);var f=a.$new(!0);angular.extend(f,d);var g=angular.element(b[0].querySelector(".loading-backdrop"));if(g.length&&(f=g.scope(),f.loading))return f.loading.show(),f.loading;var h=c(""+d.content+"")(f);b[0].body.appendChild(h[0]);var i=new ionic.views.Loading({el:h[0],maxWidth:d.maxWidth,showDelay:d.showDelay});return i.show(),f.loading=i,i}}}]),angular.module("ionic.service.modal",["ionic.service.templateLoad","ngAnimate"]).factory("Modal",["$rootScope","$document","$compile","$animate","$q","TemplateLoader",function(a,b,c,d,e,f){var g=ionic.views.Modal.inherit({initialize:function(a){ionic.views.Modal.prototype.initialize.call(this,a),this.animation=a.animation||"slide-in-up"},show:function(){var a=this,c=angular.element(this.el);c.parent().length||(angular.element(b[0].body).append(c),ionic.views.Modal.prototype.show.call(a)),d.addClass(c,this.animation,function(){})},hide:function(){var a=angular.element(this.el);d.removeClass(a,this.animation),ionic.views.Modal.prototype.hide.call(this)},remove:function(){angular.element(this.el),d.leave(angular.element(this.el),function(){scope.$destroy()})}}),h=function(b,d){var e=d.scope&&d.scope.$new()||a.$new(!0),f=c(b)(e);d.el=f[0];var h=new g(d);return h.scope=e,d.scope||(e.modal=h),h};return{fromTemplate:function(a,b){var c=h(a,b||{});return c},fromTemplateUrl:function(a,b,c){f.load(a).then(function(a){var d=h(a,c||{});b(d)})}}}]),function(){"use strict";angular.module("ionic.service.platform",[]).provider("Platform",function(){var a="web",b=!1;(window.cordova||window.PhoneGap||window.phonegap)&&(a="cordova");var c=function(){return"cordova"==a?window.device||window.Cordova:!0};return setTimeout(function d(){c()?ionic.Platform.detect():setTimeout(d,50)},10),{setPlatform:function(b){a=b},$get:["$q","$timeout",function(a,d){return{onHardwareBackButton:function(a){this.ready(function(){document.addEventListener("backbutton",a,!1)})},offHardwareBackButton:function(a){this.ready(function(){document.removeEventListener("backbutton",a)})},ready:function(e){var f=a.defer();return d(function g(){c()?(b=!0,f.resolve(),e()):d(g,50)},50),f.promise}}}]}})}(ionic),angular.module("ionic.service.popup",["ionic.service.templateLoad"]).factory("Popup",["$rootScope","$document","$compile","TemplateLoader",function(a,b,c){var d=function(){var a=angular.element(b[0].querySelector(".popup"));if(a.length){var c=a.scope();if(c.popup)return c}};return{alert:function(e,f){var g=d();if(g)return g.popup.alert(e);var h={title:e,animation:"fade-in"};opts=angular.extend(h,opts);var i=f&&f.$new()||a.$new(!0);angular.extend(i,opts);var j=c(""+opts.content+"")(i);b[0].body.appendChild(j[0]);var k=new ionic.views.Popup({el:j[0]});return k.alert(e),i.popup=k,k},confirm:function(){},prompt:function(){},show:function(){}}}]),angular.module("ionic.service.templateLoad",[]).factory("TemplateLoader",["$q","$http","$templateCache",function(a,b,c){return{load:function(d){var e=a.defer();return b({method:"GET",url:d,cache:c}).success(function(a){e.resolve(a&&a.trim())}).error(function(a){e.reject(a)}),e.promise}}}]),function(){"use strict";angular.module("ionic.ui.actionSheet",[]).directive("actionSheet",["$document",function(a){return{restrict:"E",scope:!0,replace:!0,link:function(b,c){var d=function(a){27==a.which&&(b.cancel(),b.$apply())},e=function(a){a.target==c[0]&&(b.cancel(),b.$apply())};b.$on("$destroy",function(){c.remove(),a.unbind("keyup",d)}),a.bind("keyup",d),c.bind("click",e)},template:'
',link:function(b,c,d,e){var f,g;e&&(f=c.children().eq(0),g=c.children().eq(1),f.length&&g.length&&(b.toggle=new a.views.Toggle({el:c[0],checkbox:f[0],handle:g[0]}),b.toggleIt=function(a){b.toggle.tap(a),e.$setViewValue(f[0].checked)},e.$render=function(){b.toggle.val(e.$viewValue)}))}}})}(window.ionic),function(){"use strict";angular.module("ionic.ui.virtRepeat",[]).directive("virtRepeat",function(){return{require:["?ngModel","^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(){return function(a,b,c,d){var e=d[1];e.listView.renderViewport=function(){}}}}})}(ionic),function(){"use strict";function a(a){var b=a.match(/^\s*([\$\w]+)\s+in\s+(\S*)\s*$/);
+if(!b)throw new Error("Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '"+a+"'.");return{value:b[1],collection:b[2]}}function b(a){var b={overflow:"auto"},c=window.getComputedStyle?window.getComputedStyle(a[0]):a[0].currentStyle,d=c&&c.getPropertyValue("max-height"),e=c&&c.getPropertyValue("height");d&&"0px"!==d?b.maxHeight=d:b.height=e&&"0px"!==e?e:window.innerHeight,a.css(b)}function c(a){var b={margin:0,padding:0,border:0,"box-sizing":"border-box"};a.css(b)}function d(a){var b=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,c=b&&b.getPropertyValue("max-height"),d=b&&b.getPropertyValue("height");if(d&&"0px"!==d&&"auto"!==d)$log.info('Row height is "%s" from css height',d);else if(c&&"0px"!==c&&"none"!==c)d=c,$log.info('Row height is "%s" from css max-height',d);else{if(!a.clientHeight)throw new Error("Unable to compute height of row");d=a.clientHeight+"px",$log.info('Row height is "%s" from client height',d)}return angular.element(a).css("height",d),parseInt(d,10)}angular.module("ionic.ui.virtualRepeat",[]).directive("virtualRepeat",["$log",function(e){return{require:["?ngModel, ^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(f,g){var h=a(g.sfVirtualRepeat);return function(a,f,g,i){function j(a,b,c){var d=c.$new();return d[h.value]=b[a],d.$index=a,d.$first=0===a,d.$last=a===b.length-1,d.$middle=!(d.$first||d.$last),d.$watch(function(){d[h.value]=b[a]}),d}function k(a,b,c,d,e){var f,g,h,i=document.createDocumentFragment(),k=[];for(g=a;g!==b;g++)h=j(g,c,d),f=linker(h,angular.noop),k.push(f),i.appendChild(f[0]);return e.after(i),k}function l(){var a=clip(v.firstActive,v.firstVisible-v.lowWater,v.firstVisible-v.highWater),b=clip(v.firstActive+v.active,v.firstVisible+v.visible+v.lowWater,v.firstVisible+v.visible+v.highWater);v.firstActive=Math.max(0,a),v.active=Math.min(b,v.total)-v.firstActive}function m(b){s&&a.$apply(function(){v.firstVisible=Math.floor(b.target.scrollTop/s),v.visible=Math.ceil(u.viewport[0].clientHeight/s),e.log("scroll to row %o",v.firstVisible),t=b.target.scrollTop+b.target.clientHeight>=b.target.scrollHeight,l(),e.log(" state is now %o",v),e.log(" sticky = %o",t)})}function n(a){var b=a.$eval(h.collection);return b.length!==v.total&&(v.total=b.length,l()),{start:v.firstActive,active:v.active,len:b.length}}function o(a,b){var c,d,e=Array.prototype[a];for(d=0;b>d;d++)c=e.call(r),c.scope().$destroy(),c.remove()}function p(a,b,c){var g,i=b.start+b.active,j=c.$eval(h.collection);if(a===b)e.info("initial listen"),g=k(a.start,i,j,c,f),r=g,r.length&&(s=d(g[0][0]));else{var l=a.start+a.active,m=a.start>=b.start,n=m?a.start-b.start:b.start-a.start,p=l>=i?l-i:i-l,q=n<(m?b.active:a.active);if(e.info("change by %o,%o rows %s",n,p,m?"forward":"backward"),q){if(m?(e.info("need to remove from the top"),o("shift",n)):n&&(e.info("need to add at the top"),g=k(a.start,b.start,j,c,f),r=g.concat(r)),i>l)e.info("need to remove from the bottom"),o("pop",i-l);else if(p){var v=r[r.length-1];e.info("need to add to the bottom"),g=k(i,l,j,c,v),r=r.concat(g)}}else e.info("non-contiguous change"),o("pop",r.length),r=k(a.start,l,j,c,f);!s&&r.length&&(s=d(r[0][0])),u.content.css({"padding-top":a.start*s+"px"})}u.content.css({height:a.len*s+"px"}),t&&(u.viewport[0].scrollTop=u.viewport[0].clientHeight+u.viewport[0].scrollHeight)}var q=i[1],r=[],s=0,t=!1,u=q.element,v="ngModel"in g?a.$eval(g.ngModel):{};v.firstActive=0,v.firstVisible=0,v.visible=0,v.active=0,v.total=0,v.lowWater=v.lowWater||100,v.highWater=v.highWater||300,c(u.content),b(u.viewport),u.bind("momentumScrolled",m),a.$on("$destroy",function(){u.unbind("momentumScrolled",m)}),a.$watch(n,p,!0)}}}}])}(ionic);
\ No newline at end of file
diff --git a/js/ext/angular/src/directive/ionicSideMenu.js b/js/ext/angular/src/directive/ionicSideMenu.js
index c3ca46fdb4..f660c035f0 100644
--- a/js/ext/angular/src/directive/ionicSideMenu.js
+++ b/js/ext/angular/src/directive/ionicSideMenu.js
@@ -60,8 +60,6 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture'])
var defaultPrevented = false;
var isDragging = false;
- ionic.on('mousedown', readDefaultPrevented);
-
// Listen for taps on the content to close the menu
/*
ionic.on('tap', function(e) {
@@ -133,7 +131,6 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture'])
Gesture.off(dragUpGesture, 'dragup', dragFn);
Gesture.off(dragDownGesture, 'dragdown', dragFn);
Gesture.off(releaseGesture, 'release', dragReleaseFn);
- ionic.off('mousedown', readDefaultPrevented);
});
};
}