rails-angular-strap 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +21 -0
- data/lib/rails-angular-strap.rb +11 -0
- data/lib/rails-angular-strap/engine.rb +4 -0
- data/lib/rails-angular-strap/version.rb +4 -0
- data/vendor/assets/javascripts/angular-strap.js +2 -0
- data/vendor/assets/javascripts/angular-strap.min.js +2 -0
- data/vendor/assets/javascripts/angular-strap/angular-strap.js +5014 -0
- data/vendor/assets/javascripts/angular-strap/angular-strap.min.js +11 -0
- data/vendor/assets/javascripts/angular-strap/angular-strap.tpl.js +89 -0
- data/vendor/assets/javascripts/angular-strap/angular-strap.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/affix.js +249 -0
- data/vendor/assets/javascripts/angular-strap/modules/affix.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/affix.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/alert.js +120 -0
- data/vendor/assets/javascripts/angular-strap/modules/alert.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/alert.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/alert.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/alert.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/aside.js +96 -0
- data/vendor/assets/javascripts/angular-strap/modules/aside.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/aside.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/aside.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/aside.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/button.js +177 -0
- data/vendor/assets/javascripts/angular-strap/modules/button.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/button.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/collapse.js +273 -0
- data/vendor/assets/javascripts/angular-strap/modules/collapse.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/collapse.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/date-formatter.js +61 -0
- data/vendor/assets/javascripts/angular-strap/modules/date-formatter.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/date-formatter.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/date-parser.js +273 -0
- data/vendor/assets/javascripts/angular-strap/modules/date-parser.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/date-parser.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/datepicker.js +640 -0
- data/vendor/assets/javascripts/angular-strap/modules/datepicker.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/datepicker.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/datepicker.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/datepicker.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/debounce.js +62 -0
- data/vendor/assets/javascripts/angular-strap/modules/debounce.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/debounce.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/dimensions.js +156 -0
- data/vendor/assets/javascripts/angular-strap/modules/dimensions.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/dimensions.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/dropdown.js +149 -0
- data/vendor/assets/javascripts/angular-strap/modules/dropdown.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/dropdown.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/dropdown.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/dropdown.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/modal.js +349 -0
- data/vendor/assets/javascripts/angular-strap/modules/modal.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/modal.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/modal.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/modal.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/navbar.js +72 -0
- data/vendor/assets/javascripts/angular-strap/modules/navbar.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/navbar.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/parse-options.js +76 -0
- data/vendor/assets/javascripts/angular-strap/modules/parse-options.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/parse-options.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/popover.js +112 -0
- data/vendor/assets/javascripts/angular-strap/modules/popover.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/popover.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/popover.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/popover.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/raf.js +61 -0
- data/vendor/assets/javascripts/angular-strap/modules/raf.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/raf.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/scrollspy.js +261 -0
- data/vendor/assets/javascripts/angular-strap/modules/scrollspy.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/scrollspy.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/select.js +325 -0
- data/vendor/assets/javascripts/angular-strap/modules/select.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/select.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/select.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/select.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/tab.js +186 -0
- data/vendor/assets/javascripts/angular-strap/modules/tab.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/tab.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/tab.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/tab.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/timepicker.js +485 -0
- data/vendor/assets/javascripts/angular-strap/modules/timepicker.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/timepicker.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/timepicker.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/timepicker.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/tooltip.js +690 -0
- data/vendor/assets/javascripts/angular-strap/modules/tooltip.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/tooltip.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/tooltip.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/tooltip.tpl.min.js +8 -0
- data/vendor/assets/javascripts/angular-strap/modules/typeahead.js +266 -0
- data/vendor/assets/javascripts/angular-strap/modules/typeahead.min.js +9 -0
- data/vendor/assets/javascripts/angular-strap/modules/typeahead.min.js.map +1 -0
- data/vendor/assets/javascripts/angular-strap/modules/typeahead.tpl.js +14 -0
- data/vendor/assets/javascripts/angular-strap/modules/typeahead.tpl.min.js +8 -0
- metadata +143 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
"use strict";angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.helpers.dateFormatter","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",modelDateFormat:null,dayFormat:"dd",monthFormat:"MMM",yearFormat:"yyyy",monthTitleFormat:"MMMM yyyy",yearTitleFormat:"yyyy",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0,daysOfWeekDisabled:"",iconLeft:"glyphicon glyphicon-chevron-left",iconRight:"glyphicon glyphicon-chevron-right"};this.$get=["$window","$document","$rootScope","$sce","$dateFormatter","datepickerViews","$tooltip","$timeout",function(t,a,n,i,o,r,d,s){function l(t,a,n){function i(e){e.selected=l.$isSelected(e.date)}function o(){t[0].focus()}var l=d(t,angular.extend({},e,n)),g=n.scope,$=l.$options,m=l.$scope;$.startView&&($.startView-=$.minView);var f=r(l);l.$views=f.views;var h=f.viewDate;m.$mode=$.startView,m.$iconLeft=$.iconLeft,m.$iconRight=$.iconRight;var D=l.$views[m.$mode];m.$select=function(e){l.select(e)},m.$selectPane=function(e){l.$selectPane(e)},m.$toggleMode=function(){l.setMode((m.$mode+1)%l.$views.length)},l.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(l.$date=e,D.update.call(D,e)),l.$build(!0)},l.updateDisabledDates=function(e){$.disabledDateRanges=e;for(var t=0,a=m.rows.length;a>t;t++)angular.forEach(m.rows[t],l.$setDisabledEl)},l.select=function(e,t){angular.isDate(a.$dateValue)||(a.$dateValue=new Date(e)),!m.$mode||t?(a.$setViewValue(angular.copy(e)),a.$render(),$.autoclose&&!t&&s(function(){l.hide(!0)})):(angular.extend(h,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),l.setMode(m.$mode-1),l.$build())},l.setMode=function(e){m.$mode=e,D=l.$views[m.$mode],l.$build()},l.$build=function(e){e===!0&&D.built||(e!==!1||D.built)&&D.build.call(D)},l.$updateSelected=function(){for(var e=0,t=m.rows.length;t>e;e++)angular.forEach(m.rows[e],i)},l.$isSelected=function(e){return D.isSelected(e)},l.$setDisabledEl=function(e){e.disabled=D.isDisabled(e.date)},l.$selectPane=function(e){var t=D.steps,a=new Date(Date.UTC(h.year+(t.year||0)*e,h.month+(t.month||0)*e,1));angular.extend(h,{year:a.getUTCFullYear(),month:a.getUTCMonth(),date:a.getUTCDate()}),l.$build()},l.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),c){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},l.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return m.$mode?m.$apply(function(){l.setMode(m.$mode-1)}):l.hide(!0);D.onKeyDown(e),g.$digest()}};var y=l.init;l.init=function(){return u&&$.useNative?(t.prop("type","date"),void t.css("-webkit-appearance","textfield")):(c&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",o)),void y())};var p=l.destroy;l.destroy=function(){u&&$.useNative&&t.off("click",o),p()};var w=l.show;l.show=function(){w(),s(function(){l.$isShown&&(l.$element.on(c?"touchstart":"mousedown",l.$onMouseDown),$.keyboard&&t.on("keydown",l.$onKeyDown))},0,!1)};var b=l.hide;return l.hide=function(e){l.$isShown&&(l.$element.off(c?"touchstart":"mousedown",l.$onMouseDown),$.keyboard&&t.off("keydown",l.$onKeyDown),b(e))},l}var u=(angular.element(t.document.body),/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent)),c="createTouch"in t.document&&u;return e.lang||(e.lang=o.getDefaultLocale()),l.defaults=e,l}]}).directive("bsDatepicker",["$window","$parse","$q","$dateFormatter","$dateParser","$datepicker",function(e,t,a,n,i,o){var r=(o.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent));return{restrict:"EAC",require:"ngModel",link:function(e,t,a,d){function s(e){return e&&e.length?e:null}function l(e){if(angular.isDate(e)){var t=isNaN(g.$options.minDate)||e.getTime()>=g.$options.minDate,a=isNaN(g.$options.maxDate)||e.getTime()<=g.$options.maxDate,n=t&&a;d.$setValidity("date",n),d.$setValidity("min",t),d.$setValidity("max",a),n&&(d.$dateValue=e)}}function u(){return!d.$dateValue||isNaN(d.$dateValue.getTime())?"":m(d.$dateValue,c.dateFormat)}var c={scope:e,controller:d};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","modelDateFormat","dayFormat","strictFormat","startWeek","startDate","useNative","lang","startView","minView","iconLeft","iconRight","daysOfWeekDisabled","id"],function(e){angular.isDefined(a[e])&&(c[e]=a[e])}),a.bsShow&&e.$watch(a.bsShow,function(e){g&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(datepicker),?/i)),e===!0?g.show():g.hide())});var g=o(t,d,c);c=g.$options,r&&c.useNative&&(c.dateFormat="yyyy-MM-dd");var $=c.lang,m=function(e,t){return n.formatDate(e,t,$)},f=i({format:c.dateFormat,lang:$,strict:c.strictFormat});angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(a[e])&&a.$observe(e,function(t){g.$options[e]=f.getDateForAttribute(e,t),!isNaN(g.$options[e])&&g.$build(!1),l(d.$dateValue)})}),e.$watch(a.ngModel,function(){g.update(d.$dateValue)},!0),angular.isDefined(a.disabledDates)&&e.$watch(a.disabledDates,function(e,t){e=s(e),t=s(t),e&&g.updateDisabledDates(e)}),d.$parsers.unshift(function(e){if(!e)return d.$setValidity("date",!0),null;var t=f.parse(e,d.$dateValue);return!t||isNaN(t.getTime())?void d.$setValidity("date",!1):(l(t),"string"===c.dateType?m(t,c.modelDateFormat||c.dateFormat):"number"===c.dateType?d.$dateValue.getTime():"unix"===c.dateType?d.$dateValue.getTime()/1e3:"iso"===c.dateType?d.$dateValue.toISOString():new Date(d.$dateValue))}),d.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===c.dateType?f.parse(e,null,c.modelDateFormat):new Date("unix"===c.dateType?1e3*e:e),d.$dateValue=t,u()}),d.$render=function(){t.val(u())},e.$on("$destroy",function(){g&&g.destroy(),c=null,g=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var a=[];e.length>0;)a.push(e.splice(0,t));return a}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$dateFormatter","$dateParser","$sce",function(a,n,i){return function(o){var r=o.$scope,d=o.$options,s=d.lang,l=function(e,t){return a.formatDate(e,t,s)},u=n({format:d.dateFormat,lang:s,strict:d.strictFormat}),c=a.weekdaysShort(s),g=c.slice(d.startWeek).concat(c.slice(0,d.startWeek)),$=i.trustAsHtml('<th class="dow text-center">'+g.join('</th><th class="dow text-center">')+"</th>"),m=o.$date||(d.startDate?u.getDateForAttribute("startDate",d.startDate):new Date),f={year:m.getFullYear(),month:m.getMonth(),date:m.getDate()},h=(6e4*m.getTimezoneOffset(),[{format:d.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==f.year||e.getMonth()!==f.month?(angular.extend(f,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getDate()!==f.date&&(f.date=o.$date.getDate(),o.$updateSelected())},build:function(){var a=new Date(f.year,f.month,1),n=a.getTimezoneOffset(),i=new Date(+a-864e5*t(a.getDay()-d.startWeek,7)),s=i.getTimezoneOffset(),c=(new Date).toDateString();s!==n&&(i=new Date(+i+6e4*(s-n)));for(var g,m=[],h=0;42>h;h++)g=u.daylightSavingAdjust(new Date(i.getFullYear(),i.getMonth(),i.getDate()+h)),m.push({date:g,isToday:g.toDateString()===c,label:l(g,this.format),selected:o.$date&&this.isSelected(g),muted:g.getMonth()!==f.month,disabled:this.isDisabled(g)});r.title=l(a,d.monthTitleFormat),r.showLabels=!0,r.labels=$,r.rows=e(m,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()&&e.getDate()===o.$date.getDate()},isDisabled:function(e){var t=e.getTime();if(t<d.minDate||t>d.maxDate)return!0;if(-1!==d.daysOfWeekDisabled.indexOf(e.getDay()))return!0;if(d.disabledDateRanges)for(var a=0;a<d.disabledDateRanges.length;a++)if(t>=d.disabledDateRanges[a].start&&t<=d.disabledDateRanges[a].end)return!0;return!1},onKeyDown:function(e){if(o.$date){var t,a=o.$date.getTime();37===e.keyCode?t=new Date(a-864e5):38===e.keyCode?t=new Date(a-6048e5):39===e.keyCode?t=new Date(a+864e5):40===e.keyCode&&(t=new Date(a+6048e5)),this.isDisabled(t)||o.select(t,!0)}}},{name:"month",format:d.monthFormat,split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===f.year?e.getMonth()!==f.month&&(angular.extend(f,{month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected()):(angular.extend(f,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build())},build:function(){for(var t,a=(new Date(f.year,0,1),[]),n=0;12>n;n++)t=new Date(f.year,n,1),a.push({date:t,label:l(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});r.title=l(t,d.yearTitleFormat),r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return t<d.minDate||e.getTime()>d.maxDate},onKeyDown:function(e){if(o.$date){var t=o.$date.getMonth(),a=new Date(o.$date);37===e.keyCode?a.setMonth(t-1):38===e.keyCode?a.setMonth(t-4):39===e.keyCode?a.setMonth(t+1):40===e.keyCode&&a.setMonth(t+4),this.isDisabled(a)||o.select(a,!0)}}},{name:"year",format:d.yearFormat,split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(f.year/20,10)?(angular.extend(f,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getFullYear()!==f.year&&(angular.extend(f,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected())},build:function(){for(var t,a=f.year-f.year%(3*this.split),n=[],i=0;12>i;i++)t=new Date(a+i,0,1),n.push({date:t,label:l(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});r.title=n[0].label+"-"+n[n.length-1].label,r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return t<d.minDate||e.getTime()>d.maxDate},onKeyDown:function(e){if(o.$date){var t=o.$date.getFullYear(),a=new Date(o.$date);37===e.keyCode?a.setYear(t-1):38===e.keyCode?a.setYear(t-4):39===e.keyCode?a.setYear(t+1):40===e.keyCode&&a.setYear(t+4),this.isDisabled(a)||o.select(a,!0)}}}]);return{views:d.minView?Array.prototype.slice.call(h,d.minView):h,viewDate:f}}}]});
|
|
9
|
+
//# sourceMappingURL=datepicker.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["datepicker/datepicker.js"],"names":[],"mappings":"qBASQ,OAAA,4IAKF,cAAS,cAET,GAAU,KAAA,UACV,UAAM,UACN,YAAO,qCAEP,SAAA,iCACA,QAAA,QACA,WAAA,EACA,UAAA,EACA,MAAA,EACA,MAAA,EAEA,WAAA,EACA,SAAA,OACA,WAAA,YACA,gBAAW,KACX,UAAU,KACV,YAAU,MACV,WAAW,OACX,iBAAS,YACT,gBAAW,OACX,cAAA,EACA,WAAU,EACV,SAAA,6BAGF,QAAK,cAEH,mBAAa,GACb,SAAI,mCACJ,UAAI,0CAGJ,MAAS,UAAA,YAAkB,aAAqB,OAAQ,iBAAA,kBAAA,WAAA,WAAA,SAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,oEAsJtD,QAAA,KACE,EAAG,GAAA,0CA7ID,EAAc,EAAA,MAClB,EAAY,EAAS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,EAAM,MAAA,EAAA,EAAA,KAAA,QAAA,SAAA,EAAA,YAAA,GAAA,SAAA,KAAA,WAAA,gDAG3B,EAAA,YAAqB,EACnB,EAAI,KAAA,EAAY,EAAS,KAAK,OAC9B,KAAA,OAAO,GAET,WAAW,SAAS,GAClB,MAAK,GAAO,OAAO,EAAA,gBAAA,EAAA,MAAA,sCAGnB,GAAI,IAAA,GAAa,MAAO,EAAM,cAAA,EAAA,EAAA,SAC1B,GAAc,EAAK,SAAO,EAAA,UAAA,EAAA,mBAEvB,SAAA,MACF,EAAO,mCAIR,EAAM,GAAA,MAAW,EAAA,mEAIpB,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,GACoB,KAAlB,EAAQ,SAAgB,EAAA,QAAgB,EAAY,4GAQhE,SAAA","file":"datepicker.min.js","sourcesContent":["'use strict';\n\nangular.module('mgcrea.ngStrap.datepicker', [\n 'mgcrea.ngStrap.helpers.dateParser',\n 'mgcrea.ngStrap.helpers.dateFormatter',\n 'mgcrea.ngStrap.tooltip'])\n\n .provider('$datepicker', function() {\n\n var defaults = this.defaults = {\n animation: 'am-fade',\n prefixClass: 'datepicker',\n placement: 'bottom-left',\n template: 'datepicker/datepicker.tpl.html',\n trigger: 'focus',\n container: false,\n keyboard: true,\n html: false,\n delay: 0,\n // lang: $locale.id,\n useNative: false,\n dateType: 'date',\n dateFormat: 'shortDate',\n modelDateFormat: null,\n dayFormat: 'dd',\n monthFormat: 'MMM',\n yearFormat: 'yyyy',\n monthTitleFormat: 'MMMM yyyy',\n yearTitleFormat: 'yyyy',\n strictFormat: false,\n autoclose: false,\n minDate: -Infinity,\n maxDate: +Infinity,\n startView: 0,\n minView: 0,\n startWeek: 0,\n daysOfWeekDisabled: '',\n iconLeft: 'glyphicon glyphicon-chevron-left',\n iconRight: 'glyphicon glyphicon-chevron-right'\n };\n\n this.$get = function($window, $document, $rootScope, $sce, $dateFormatter, datepickerViews, $tooltip, $timeout) {\n\n var bodyEl = angular.element($window.document.body);\n var isNative = /(ip(a|o)d|iphone|android)/ig.test($window.navigator.userAgent);\n var isTouch = ('createTouch' in $window.document) && isNative;\n if(!defaults.lang) defaults.lang = $dateFormatter.getDefaultLocale();\n\n function DatepickerFactory(element, controller, config) {\n\n var $datepicker = $tooltip(element, angular.extend({}, defaults, config));\n var parentScope = config.scope;\n var options = $datepicker.$options;\n var scope = $datepicker.$scope;\n if(options.startView) options.startView -= options.minView;\n\n // View vars\n\n var pickerViews = datepickerViews($datepicker);\n $datepicker.$views = pickerViews.views;\n var viewDate = pickerViews.viewDate;\n scope.$mode = options.startView;\n scope.$iconLeft = options.iconLeft;\n scope.$iconRight = options.iconRight;\n var $picker = $datepicker.$views[scope.$mode];\n\n // Scope methods\n\n scope.$select = function(date) {\n $datepicker.select(date);\n };\n scope.$selectPane = function(value) {\n $datepicker.$selectPane(value);\n };\n scope.$toggleMode = function() {\n $datepicker.setMode((scope.$mode + 1) % $datepicker.$views.length);\n };\n\n // Public methods\n\n $datepicker.update = function(date) {\n // console.warn('$datepicker.update() newValue=%o', date);\n if(angular.isDate(date) && !isNaN(date.getTime())) {\n $datepicker.$date = date;\n $picker.update.call($picker, date);\n }\n // Build only if pristine\n $datepicker.$build(true);\n };\n\n $datepicker.updateDisabledDates = function(dateRanges) {\n options.disabledDateRanges = dateRanges;\n for(var i = 0, l = scope.rows.length; i < l; i++) {\n angular.forEach(scope.rows[i], $datepicker.$setDisabledEl);\n }\n };\n\n $datepicker.select = function(date, keep) {\n // console.warn('$datepicker.select', date, scope.$mode);\n if(!angular.isDate(controller.$dateValue)) controller.$dateValue = new Date(date);\n if(!scope.$mode || keep) {\n controller.$setViewValue(angular.copy(date));\n controller.$render();\n if(options.autoclose && !keep) {\n $timeout(function() { $datepicker.hide(true); });\n }\n } else {\n angular.extend(viewDate, {year: date.getFullYear(), month: date.getMonth(), date: date.getDate()});\n $datepicker.setMode(scope.$mode - 1);\n $datepicker.$build();\n }\n };\n\n $datepicker.setMode = function(mode) {\n // console.warn('$datepicker.setMode', mode);\n scope.$mode = mode;\n $picker = $datepicker.$views[scope.$mode];\n $datepicker.$build();\n };\n\n // Protected methods\n\n $datepicker.$build = function(pristine) {\n // console.warn('$datepicker.$build() viewDate=%o', viewDate);\n if(pristine === true && $picker.built) return;\n if(pristine === false && !$picker.built) return;\n $picker.build.call($picker);\n };\n\n $datepicker.$updateSelected = function() {\n for(var i = 0, l = scope.rows.length; i < l; i++) {\n angular.forEach(scope.rows[i], updateSelected);\n }\n };\n\n $datepicker.$isSelected = function(date) {\n return $picker.isSelected(date);\n };\n\n $datepicker.$setDisabledEl = function(el) {\n el.disabled = $picker.isDisabled(el.date);\n };\n\n $datepicker.$selectPane = function(value) {\n var steps = $picker.steps;\n // set targetDate to first day of month to avoid problems with\n // date values rollover. This assumes the viewDate does not\n // depend on the day of the month\n var targetDate = new Date(Date.UTC(viewDate.year + ((steps.year || 0) * value), viewDate.month + ((steps.month || 0) * value), 1));\n angular.extend(viewDate, {year: targetDate.getUTCFullYear(), month: targetDate.getUTCMonth(), date: targetDate.getUTCDate()});\n $datepicker.$build();\n };\n\n $datepicker.$onMouseDown = function(evt) {\n // Prevent blur on mousedown on .dropdown-menu\n evt.preventDefault();\n evt.stopPropagation();\n // Emulate click for mobile devices\n if(isTouch) {\n var targetEl = angular.element(evt.target);\n if(targetEl[0].nodeName.toLowerCase() !== 'button') {\n targetEl = targetEl.parent();\n }\n targetEl.triggerHandler('click');\n }\n };\n\n $datepicker.$onKeyDown = function(evt) {\n if (!/(38|37|39|40|13)/.test(evt.keyCode) || evt.shiftKey || evt.altKey) return;\n evt.preventDefault();\n evt.stopPropagation();\n\n if(evt.keyCode === 13) {\n if(!scope.$mode) {\n return $datepicker.hide(true);\n } else {\n return scope.$apply(function() { $datepicker.setMode(scope.$mode - 1); });\n }\n }\n\n // Navigate with keyboard\n $picker.onKeyDown(evt);\n parentScope.$digest();\n };\n\n // Private\n\n function updateSelected(el) {\n el.selected = $datepicker.$isSelected(el.date);\n }\n\n function focusElement() {\n element[0].focus();\n }\n\n // Overrides\n\n var _init = $datepicker.init;\n $datepicker.init = function() {\n if(isNative && options.useNative) {\n element.prop('type', 'date');\n element.css('-webkit-appearance', 'textfield');\n return;\n } else if(isTouch) {\n element.prop('type', 'text');\n element.attr('readonly', 'true');\n element.on('click', focusElement);\n }\n _init();\n };\n\n var _destroy = $datepicker.destroy;\n $datepicker.destroy = function() {\n if(isNative && options.useNative) {\n element.off('click', focusElement);\n }\n _destroy();\n };\n\n var _show = $datepicker.show;\n $datepicker.show = function() {\n _show();\n // use timeout to hookup the events to prevent\n // event bubbling from being processed imediately.\n $timeout(function() {\n // if $datepicker is no longer showing, don't setup events\n if(!$datepicker.$isShown) return;\n $datepicker.$element.on(isTouch ? 'touchstart' : 'mousedown', $datepicker.$onMouseDown);\n if(options.keyboard) {\n element.on('keydown', $datepicker.$onKeyDown);\n }\n }, 0, false);\n };\n\n var _hide = $datepicker.hide;\n $datepicker.hide = function(blur) {\n if(!$datepicker.$isShown) return;\n $datepicker.$element.off(isTouch ? 'touchstart' : 'mousedown', $datepicker.$onMouseDown);\n if(options.keyboard) {\n element.off('keydown', $datepicker.$onKeyDown);\n }\n _hide(blur);\n };\n\n return $datepicker;\n\n }\n\n DatepickerFactory.defaults = defaults;\n return DatepickerFactory;\n\n };\n\n })\n\n .directive('bsDatepicker', function($window, $parse, $q, $dateFormatter, $dateParser, $datepicker) {\n\n var defaults = $datepicker.defaults;\n var isNative = /(ip(a|o)d|iphone|android)/ig.test($window.navigator.userAgent);\n\n return {\n restrict: 'EAC',\n require: 'ngModel',\n link: function postLink(scope, element, attr, controller) {\n\n // Directive options\n var options = {scope: scope, controller: controller};\n angular.forEach(['placement', 'container', 'delay', 'trigger', 'keyboard', 'html', 'animation', 'template', 'autoclose', 'dateType', 'dateFormat', 'modelDateFormat', 'dayFormat', 'strictFormat', 'startWeek', 'startDate', 'useNative', 'lang', 'startView', 'minView', 'iconLeft', 'iconRight', 'daysOfWeekDisabled', 'id'], function(key) {\n if(angular.isDefined(attr[key])) options[key] = attr[key];\n });\n\n // Visibility binding support\n attr.bsShow && scope.$watch(attr.bsShow, function(newValue, oldValue) {\n if(!datepicker || !angular.isDefined(newValue)) return;\n if(angular.isString(newValue)) newValue = !!newValue.match(/true|,?(datepicker),?/i);\n newValue === true ? datepicker.show() : datepicker.hide();\n });\n\n // Initialize datepicker\n var datepicker = $datepicker(element, controller, options);\n options = datepicker.$options;\n // Set expected iOS format\n if(isNative && options.useNative) options.dateFormat = 'yyyy-MM-dd';\n\n var lang = options.lang;\n\n var formatDate = function(date, format) {\n return $dateFormatter.formatDate(date, format, lang);\n };\n\n var dateParser = $dateParser({format: options.dateFormat, lang: lang, strict: options.strictFormat});\n\n // Observe attributes for changes\n angular.forEach(['minDate', 'maxDate'], function(key) {\n // console.warn('attr.$observe(%s)', key, attr[key]);\n angular.isDefined(attr[key]) && attr.$observe(key, function(newValue) {\n // console.warn('attr.$observe(%s)=%o', key, newValue);\n datepicker.$options[key] = dateParser.getDateForAttribute(key, newValue);\n // Build only if dirty\n !isNaN(datepicker.$options[key]) && datepicker.$build(false);\n validateAgainstMinMaxDate(controller.$dateValue);\n });\n });\n\n // Watch model for changes\n scope.$watch(attr.ngModel, function(newValue, oldValue) {\n datepicker.update(controller.$dateValue);\n }, true);\n\n // Normalize undefined/null/empty array,\n // so that we don't treat changing from undefined->null as a change.\n function normalizeDateRanges(ranges) {\n if (!ranges || !ranges.length) return null;\n return ranges;\n }\n\n if (angular.isDefined(attr.disabledDates)) {\n scope.$watch(attr.disabledDates, function(disabledRanges, previousValue) {\n disabledRanges = normalizeDateRanges(disabledRanges);\n previousValue = normalizeDateRanges(previousValue);\n\n if (disabledRanges) {\n datepicker.updateDisabledDates(disabledRanges);\n }\n });\n }\n\n function validateAgainstMinMaxDate(parsedDate) {\n if (!angular.isDate(parsedDate)) return;\n var isMinValid = isNaN(datepicker.$options.minDate) || parsedDate.getTime() >= datepicker.$options.minDate;\n var isMaxValid = isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate;\n var isValid = isMinValid && isMaxValid;\n controller.$setValidity('date', isValid);\n controller.$setValidity('min', isMinValid);\n controller.$setValidity('max', isMaxValid);\n // Only update the model when we have a valid date\n if(isValid) controller.$dateValue = parsedDate;\n }\n\n // viewValue -> $parsers -> modelValue\n controller.$parsers.unshift(function(viewValue) {\n // console.warn('$parser(\"%s\"): viewValue=%o', element.attr('ng-model'), viewValue);\n // Null values should correctly reset the model value & validity\n if(!viewValue) {\n controller.$setValidity('date', true);\n // BREAKING CHANGE:\n // return null (not undefined) when input value is empty, so angularjs 1.3\n // ngModelController can go ahead and run validators, like ngRequired\n return null;\n }\n var parsedDate = dateParser.parse(viewValue, controller.$dateValue);\n if(!parsedDate || isNaN(parsedDate.getTime())) {\n controller.$setValidity('date', false);\n // return undefined, causes ngModelController to\n // invalidate model value\n return;\n } else {\n validateAgainstMinMaxDate(parsedDate);\n }\n if(options.dateType === 'string') {\n return formatDate(parsedDate, options.modelDateFormat || options.dateFormat);\n } else if(options.dateType === 'number') {\n return controller.$dateValue.getTime();\n } else if(options.dateType === 'unix') {\n return controller.$dateValue.getTime() / 1000;\n } else if(options.dateType === 'iso') {\n return controller.$dateValue.toISOString();\n } else {\n return new Date(controller.$dateValue);\n }\n });\n\n // modelValue -> $formatters -> viewValue\n controller.$formatters.push(function(modelValue) {\n // console.warn('$formatter(\"%s\"): modelValue=%o (%o)', element.attr('ng-model'), modelValue, typeof modelValue);\n var date;\n if(angular.isUndefined(modelValue) || modelValue === null) {\n date = NaN;\n } else if(angular.isDate(modelValue)) {\n date = modelValue;\n } else if(options.dateType === 'string') {\n date = dateParser.parse(modelValue, null, options.modelDateFormat);\n } else if(options.dateType === 'unix') {\n date = new Date(modelValue * 1000);\n } else {\n date = new Date(modelValue);\n }\n // Setup default value?\n // if(isNaN(date.getTime())) {\n // var today = new Date();\n // date = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0, 0);\n // }\n controller.$dateValue = date;\n return getDateFormattedString();\n });\n\n // viewValue -> element\n controller.$render = function() {\n // console.warn('$render(\"%s\"): viewValue=%o', element.attr('ng-model'), controller.$viewValue);\n element.val(getDateFormattedString());\n };\n\n function getDateFormattedString() {\n return !controller.$dateValue || isNaN(controller.$dateValue.getTime()) ? '' : formatDate(controller.$dateValue, options.dateFormat);\n }\n\n // Garbage collection\n scope.$on('$destroy', function() {\n if(datepicker) datepicker.destroy();\n options = null;\n datepicker = null;\n });\n\n }\n };\n\n })\n\n .provider('datepickerViews', function() {\n\n var defaults = this.defaults = {\n dayFormat: 'dd',\n daySplit: 7\n };\n\n // Split array into smaller arrays\n function split(arr, size) {\n var arrays = [];\n while(arr.length > 0) {\n arrays.push(arr.splice(0, size));\n }\n return arrays;\n }\n\n // Modulus operator\n function mod(n, m) {\n return ((n % m) + m) % m;\n }\n\n this.$get = function($dateFormatter, $dateParser, $sce) {\n\n return function(picker) {\n\n var scope = picker.$scope;\n var options = picker.$options;\n\n var lang = options.lang;\n var formatDate = function(date, format) {\n return $dateFormatter.formatDate(date, format, lang);\n };\n var dateParser = $dateParser({format: options.dateFormat, lang: lang, strict: options.strictFormat});\n\n var weekDaysMin = $dateFormatter.weekdaysShort(lang);\n var weekDaysLabels = weekDaysMin.slice(options.startWeek).concat(weekDaysMin.slice(0, options.startWeek));\n var weekDaysLabelsHtml = $sce.trustAsHtml('<th class=\"dow text-center\">' + weekDaysLabels.join('</th><th class=\"dow text-center\">') + '</th>');\n\n var startDate = picker.$date || (options.startDate ? dateParser.getDateForAttribute('startDate', options.startDate) : new Date());\n var viewDate = {year: startDate.getFullYear(), month: startDate.getMonth(), date: startDate.getDate()};\n var timezoneOffset = startDate.getTimezoneOffset() * 6e4;\n\n var views = [{\n format: options.dayFormat,\n split: 7,\n steps: { month: 1 },\n update: function(date, force) {\n if(!this.built || force || date.getFullYear() !== viewDate.year || date.getMonth() !== viewDate.month) {\n angular.extend(viewDate, {year: picker.$date.getFullYear(), month: picker.$date.getMonth(), date: picker.$date.getDate()});\n picker.$build();\n } else if(date.getDate() !== viewDate.date) {\n viewDate.date = picker.$date.getDate();\n picker.$updateSelected();\n }\n },\n build: function() {\n var firstDayOfMonth = new Date(viewDate.year, viewDate.month, 1), firstDayOfMonthOffset = firstDayOfMonth.getTimezoneOffset();\n var firstDate = new Date(+firstDayOfMonth - mod(firstDayOfMonth.getDay() - options.startWeek, 7) * 864e5), firstDateOffset = firstDate.getTimezoneOffset();\n var today = new Date().toDateString();\n // Handle daylight time switch\n if(firstDateOffset !== firstDayOfMonthOffset) firstDate = new Date(+firstDate + (firstDateOffset - firstDayOfMonthOffset) * 60e3);\n var days = [], day;\n for(var i = 0; i < 42; i++) { // < 7 * 6\n day = dateParser.daylightSavingAdjust(new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate() + i));\n days.push({date: day, isToday: day.toDateString() === today, label: formatDate(day, this.format), selected: picker.$date && this.isSelected(day), muted: day.getMonth() !== viewDate.month, disabled: this.isDisabled(day)});\n }\n scope.title = formatDate(firstDayOfMonth, options.monthTitleFormat);\n scope.showLabels = true;\n scope.labels = weekDaysLabelsHtml;\n scope.rows = split(days, this.split);\n this.built = true;\n },\n isSelected: function(date) {\n return picker.$date && date.getFullYear() === picker.$date.getFullYear() && date.getMonth() === picker.$date.getMonth() && date.getDate() === picker.$date.getDate();\n },\n isDisabled: function(date) {\n var time = date.getTime();\n\n // Disabled because of min/max date.\n if (time < options.minDate || time > options.maxDate) return true;\n\n // Disabled due to being a disabled day of the week\n if (options.daysOfWeekDisabled.indexOf(date.getDay()) !== -1) return true;\n\n // Disabled because of disabled date range.\n if (options.disabledDateRanges) {\n for (var i = 0; i < options.disabledDateRanges.length; i++) {\n if (time >= options.disabledDateRanges[i].start && time <= options.disabledDateRanges[i].end) {\n return true;\n }\n }\n }\n\n return false;\n },\n onKeyDown: function(evt) {\n if (!picker.$date) {\n return;\n }\n var actualTime = picker.$date.getTime();\n var newDate;\n\n if(evt.keyCode === 37) newDate = new Date(actualTime - 1 * 864e5);\n else if(evt.keyCode === 38) newDate = new Date(actualTime - 7 * 864e5);\n else if(evt.keyCode === 39) newDate = new Date(actualTime + 1 * 864e5);\n else if(evt.keyCode === 40) newDate = new Date(actualTime + 7 * 864e5);\n\n if (!this.isDisabled(newDate)) picker.select(newDate, true);\n }\n }, {\n name: 'month',\n format: options.monthFormat,\n split: 4,\n steps: { year: 1 },\n update: function(date, force) {\n if(!this.built || date.getFullYear() !== viewDate.year) {\n angular.extend(viewDate, {year: picker.$date.getFullYear(), month: picker.$date.getMonth(), date: picker.$date.getDate()});\n picker.$build();\n } else if(date.getMonth() !== viewDate.month) {\n angular.extend(viewDate, {month: picker.$date.getMonth(), date: picker.$date.getDate()});\n picker.$updateSelected();\n }\n },\n build: function() {\n var firstMonth = new Date(viewDate.year, 0, 1);\n var months = [], month;\n for (var i = 0; i < 12; i++) {\n month = new Date(viewDate.year, i, 1);\n months.push({date: month, label: formatDate(month, this.format), selected: picker.$isSelected(month), disabled: this.isDisabled(month)});\n }\n scope.title = formatDate(month, options.yearTitleFormat);\n scope.showLabels = false;\n scope.rows = split(months, this.split);\n this.built = true;\n },\n isSelected: function(date) {\n return picker.$date && date.getFullYear() === picker.$date.getFullYear() && date.getMonth() === picker.$date.getMonth();\n },\n isDisabled: function(date) {\n var lastDate = +new Date(date.getFullYear(), date.getMonth() + 1, 0);\n return lastDate < options.minDate || date.getTime() > options.maxDate;\n },\n onKeyDown: function(evt) {\n if (!picker.$date) {\n return;\n }\n var actualMonth = picker.$date.getMonth();\n var newDate = new Date(picker.$date);\n\n if(evt.keyCode === 37) newDate.setMonth(actualMonth - 1);\n else if(evt.keyCode === 38) newDate.setMonth(actualMonth - 4);\n else if(evt.keyCode === 39) newDate.setMonth(actualMonth + 1);\n else if(evt.keyCode === 40) newDate.setMonth(actualMonth + 4);\n\n if (!this.isDisabled(newDate)) picker.select(newDate, true);\n }\n }, {\n name: 'year',\n format: options.yearFormat,\n split: 4,\n steps: { year: 12 },\n update: function(date, force) {\n if(!this.built || force || parseInt(date.getFullYear()/20, 10) !== parseInt(viewDate.year/20, 10)) {\n angular.extend(viewDate, {year: picker.$date.getFullYear(), month: picker.$date.getMonth(), date: picker.$date.getDate()});\n picker.$build();\n } else if(date.getFullYear() !== viewDate.year) {\n angular.extend(viewDate, {year: picker.$date.getFullYear(), month: picker.$date.getMonth(), date: picker.$date.getDate()});\n picker.$updateSelected();\n }\n },\n build: function() {\n var firstYear = viewDate.year - viewDate.year % (this.split * 3);\n var years = [], year;\n for (var i = 0; i < 12; i++) {\n year = new Date(firstYear + i, 0, 1);\n years.push({date: year, label: formatDate(year, this.format), selected: picker.$isSelected(year), disabled: this.isDisabled(year)});\n }\n scope.title = years[0].label + '-' + years[years.length - 1].label;\n scope.showLabels = false;\n scope.rows = split(years, this.split);\n this.built = true;\n },\n isSelected: function(date) {\n return picker.$date && date.getFullYear() === picker.$date.getFullYear();\n },\n isDisabled: function(date) {\n var lastDate = +new Date(date.getFullYear() + 1, 0, 0);\n return lastDate < options.minDate || date.getTime() > options.maxDate;\n },\n onKeyDown: function(evt) {\n if (!picker.$date) {\n return;\n }\n var actualYear = picker.$date.getFullYear(),\n newDate = new Date(picker.$date);\n\n if(evt.keyCode === 37) newDate.setYear(actualYear - 1);\n else if(evt.keyCode === 38) newDate.setYear(actualYear - 4);\n else if(evt.keyCode === 39) newDate.setYear(actualYear + 1);\n else if(evt.keyCode === 40) newDate.setYear(actualYear + 4);\n\n if (!this.isDisabled(newDate)) picker.select(newDate, true);\n }\n }];\n\n return {\n views: options.minView ? Array.prototype.slice.call(views, options.minView) : views,\n viewDate: viewDate\n };\n\n };\n\n };\n\n });\n"],"sourceRoot":"/source/"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
angular.module('mgcrea.ngStrap.datepicker').run(['$templateCache', function($templateCache) {
|
|
11
|
+
|
|
12
|
+
$templateCache.put('datepicker/datepicker.tpl.html', '<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-show="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody></table></div>');
|
|
13
|
+
|
|
14
|
+
}]);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
"use strict";angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(t){t.put("datepicker/datepicker.tpl.html",'<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-show="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody></table></div>')}]);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
angular.module('mgcrea.ngStrap.helpers.debounce', [])
|
|
11
|
+
|
|
12
|
+
// @source jashkenas/underscore
|
|
13
|
+
// @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L693
|
|
14
|
+
.factory('debounce', ["$timeout", function($timeout) {
|
|
15
|
+
return function(func, wait, immediate) {
|
|
16
|
+
var timeout = null;
|
|
17
|
+
return function() {
|
|
18
|
+
var context = this,
|
|
19
|
+
args = arguments,
|
|
20
|
+
callNow = immediate && !timeout;
|
|
21
|
+
if(timeout) {
|
|
22
|
+
$timeout.cancel(timeout);
|
|
23
|
+
}
|
|
24
|
+
timeout = $timeout(function later() {
|
|
25
|
+
timeout = null;
|
|
26
|
+
if(!immediate) {
|
|
27
|
+
func.apply(context, args);
|
|
28
|
+
}
|
|
29
|
+
}, wait, false);
|
|
30
|
+
if(callNow) {
|
|
31
|
+
func.apply(context, args);
|
|
32
|
+
}
|
|
33
|
+
return timeout;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}])
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
// @source jashkenas/underscore
|
|
40
|
+
// @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L661
|
|
41
|
+
.factory('throttle', ["$timeout", function($timeout) {
|
|
42
|
+
return function(func, wait, options) {
|
|
43
|
+
var timeout = null;
|
|
44
|
+
options || (options = {});
|
|
45
|
+
return function() {
|
|
46
|
+
var context = this,
|
|
47
|
+
args = arguments;
|
|
48
|
+
if(!timeout) {
|
|
49
|
+
if(options.leading !== false) {
|
|
50
|
+
func.apply(context, args);
|
|
51
|
+
}
|
|
52
|
+
timeout = $timeout(function later() {
|
|
53
|
+
timeout = null;
|
|
54
|
+
if(options.trailing !== false) {
|
|
55
|
+
func.apply(context, args);
|
|
56
|
+
}
|
|
57
|
+
}, wait, false);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}]);
|
|
62
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
"use strict";angular.module("mgcrea.ngStrap.helpers.debounce",[]).factory("debounce",["$timeout",function(n){return function(t,u,r){var e=null;return function(){var a=this,l=arguments,c=r&&!e;return e&&n.cancel(e),e=n(function(){e=null,r||t.apply(a,l)},u,!1),c&&t.apply(a,l),e}}}]).factory("throttle",["$timeout",function(n){return function(t,u,r){var e=null;return r||(r={}),function(){var a=this,l=arguments;e||(r.leading!==!1&&t.apply(a,l),e=n(function(){e=null,r.trailing!==!1&&t.apply(a,l)},u,!1))}}}]);
|
|
9
|
+
//# sourceMappingURL=debounce.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["helpers/debounce.js"],"names":[],"mappings":"qBASI,OAAO,8CAIF,YAAS,WAAA,SAAA,SACV,UAAS,EAAO,EAAA,oBAElB,eACE,GAAU,KACV,EAAI,YACG,IAAe,cAEf,OAAA,KAEF,EAAM,kBAEb,sDAeG,YAAU,WAAA,SAAA,SACX,UAAG,EAAQ,EAAA,SACJ,sBAEP,cACE,GAAU,OACP,gCAGF,MAAM,EAAA,yBAId,EAAA,YAAA","file":"debounce.min.js","sourcesContent":["'use strict';\n\nangular.module('mgcrea.ngStrap.helpers.debounce', [])\n\n// @source jashkenas/underscore\n// @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L693\n.factory('debounce', function($timeout) {\n return function(func, wait, immediate) {\n var timeout = null;\n return function() {\n var context = this,\n args = arguments,\n callNow = immediate && !timeout;\n if(timeout) {\n $timeout.cancel(timeout);\n }\n timeout = $timeout(function later() {\n timeout = null;\n if(!immediate) {\n func.apply(context, args);\n }\n }, wait, false);\n if(callNow) {\n func.apply(context, args);\n }\n return timeout;\n };\n };\n})\n\n\n// @source jashkenas/underscore\n// @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L661\n.factory('throttle', function($timeout) {\n return function(func, wait, options) {\n var timeout = null;\n options || (options = {});\n return function() {\n var context = this,\n args = arguments;\n if(!timeout) {\n if(options.leading !== false) {\n func.apply(context, args);\n }\n timeout = $timeout(function later() {\n timeout = null;\n if(options.trailing !== false) {\n func.apply(context, args);\n }\n }, wait, false);\n }\n };\n };\n});\n\n"],"sourceRoot":"/source/"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
angular.module('mgcrea.ngStrap.helpers.dimensions', [])
|
|
11
|
+
|
|
12
|
+
.factory('dimensions', ["$document", "$window", function($document, $window) {
|
|
13
|
+
|
|
14
|
+
var jqLite = angular.element;
|
|
15
|
+
var fn = {};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Test the element nodeName
|
|
19
|
+
* @param element
|
|
20
|
+
* @param name
|
|
21
|
+
*/
|
|
22
|
+
var nodeName = fn.nodeName = function(element, name) {
|
|
23
|
+
return element.nodeName && element.nodeName.toLowerCase() === name.toLowerCase();
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Returns the element computed style
|
|
28
|
+
* @param element
|
|
29
|
+
* @param prop
|
|
30
|
+
* @param extra
|
|
31
|
+
*/
|
|
32
|
+
fn.css = function(element, prop, extra) {
|
|
33
|
+
var value;
|
|
34
|
+
if (element.currentStyle) { //IE
|
|
35
|
+
value = element.currentStyle[prop];
|
|
36
|
+
} else if (window.getComputedStyle) {
|
|
37
|
+
value = window.getComputedStyle(element)[prop];
|
|
38
|
+
} else {
|
|
39
|
+
value = element.style[prop];
|
|
40
|
+
}
|
|
41
|
+
return extra === true ? parseFloat(value) || 0 : value;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Provides read-only equivalent of jQuery's offset function:
|
|
46
|
+
* @required-by bootstrap-tooltip, bootstrap-affix
|
|
47
|
+
* @url http://api.jquery.com/offset/
|
|
48
|
+
* @param element
|
|
49
|
+
*/
|
|
50
|
+
fn.offset = function(element) {
|
|
51
|
+
var boxRect = element.getBoundingClientRect();
|
|
52
|
+
var docElement = element.ownerDocument;
|
|
53
|
+
return {
|
|
54
|
+
width: boxRect.width || element.offsetWidth,
|
|
55
|
+
height: boxRect.height || element.offsetHeight,
|
|
56
|
+
top: boxRect.top + (window.pageYOffset || docElement.documentElement.scrollTop) - (docElement.documentElement.clientTop || 0),
|
|
57
|
+
left: boxRect.left + (window.pageXOffset || docElement.documentElement.scrollLeft) - (docElement.documentElement.clientLeft || 0)
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Provides read-only equivalent of jQuery's position function
|
|
63
|
+
* @required-by bootstrap-tooltip, bootstrap-affix
|
|
64
|
+
* @url http://api.jquery.com/offset/
|
|
65
|
+
* @param element
|
|
66
|
+
*/
|
|
67
|
+
fn.position = function(element) {
|
|
68
|
+
|
|
69
|
+
var offsetParentRect = {top: 0, left: 0},
|
|
70
|
+
offsetParentElement,
|
|
71
|
+
offset;
|
|
72
|
+
|
|
73
|
+
// Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
|
|
74
|
+
if (fn.css(element, 'position') === 'fixed') {
|
|
75
|
+
|
|
76
|
+
// We assume that getBoundingClientRect is available when computed position is fixed
|
|
77
|
+
offset = element.getBoundingClientRect();
|
|
78
|
+
|
|
79
|
+
} else {
|
|
80
|
+
|
|
81
|
+
// Get *real* offsetParentElement
|
|
82
|
+
offsetParentElement = offsetParent(element);
|
|
83
|
+
|
|
84
|
+
// Get correct offsets
|
|
85
|
+
offset = fn.offset(element);
|
|
86
|
+
if (!nodeName(offsetParentElement, 'html')) {
|
|
87
|
+
offsetParentRect = fn.offset(offsetParentElement);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Add offsetParent borders
|
|
91
|
+
offsetParentRect.top += fn.css(offsetParentElement, 'borderTopWidth', true);
|
|
92
|
+
offsetParentRect.left += fn.css(offsetParentElement, 'borderLeftWidth', true);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Subtract parent offsets and element margins
|
|
96
|
+
return {
|
|
97
|
+
width: element.offsetWidth,
|
|
98
|
+
height: element.offsetHeight,
|
|
99
|
+
top: offset.top - offsetParentRect.top - fn.css(element, 'marginTop', true),
|
|
100
|
+
left: offset.left - offsetParentRect.left - fn.css(element, 'marginLeft', true)
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Returns the closest, non-statically positioned offsetParent of a given element
|
|
107
|
+
* @required-by fn.position
|
|
108
|
+
* @param element
|
|
109
|
+
*/
|
|
110
|
+
var offsetParent = function offsetParentElement(element) {
|
|
111
|
+
var docElement = element.ownerDocument;
|
|
112
|
+
var offsetParent = element.offsetParent || docElement;
|
|
113
|
+
if(nodeName(offsetParent, '#document')) return docElement.documentElement;
|
|
114
|
+
while(offsetParent && !nodeName(offsetParent, 'html') && fn.css(offsetParent, 'position') === 'static') {
|
|
115
|
+
offsetParent = offsetParent.offsetParent;
|
|
116
|
+
}
|
|
117
|
+
return offsetParent || docElement.documentElement;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Provides equivalent of jQuery's height function
|
|
122
|
+
* @required-by bootstrap-affix
|
|
123
|
+
* @url http://api.jquery.com/height/
|
|
124
|
+
* @param element
|
|
125
|
+
* @param outer
|
|
126
|
+
*/
|
|
127
|
+
fn.height = function(element, outer) {
|
|
128
|
+
var value = element.offsetHeight;
|
|
129
|
+
if(outer) {
|
|
130
|
+
value += fn.css(element, 'marginTop', true) + fn.css(element, 'marginBottom', true);
|
|
131
|
+
} else {
|
|
132
|
+
value -= fn.css(element, 'paddingTop', true) + fn.css(element, 'paddingBottom', true) + fn.css(element, 'borderTopWidth', true) + fn.css(element, 'borderBottomWidth', true);
|
|
133
|
+
}
|
|
134
|
+
return value;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Provides equivalent of jQuery's width function
|
|
139
|
+
* @required-by bootstrap-affix
|
|
140
|
+
* @url http://api.jquery.com/width/
|
|
141
|
+
* @param element
|
|
142
|
+
* @param outer
|
|
143
|
+
*/
|
|
144
|
+
fn.width = function(element, outer) {
|
|
145
|
+
var value = element.offsetWidth;
|
|
146
|
+
if(outer) {
|
|
147
|
+
value += fn.css(element, 'marginLeft', true) + fn.css(element, 'marginRight', true);
|
|
148
|
+
} else {
|
|
149
|
+
value -= fn.css(element, 'paddingLeft', true) + fn.css(element, 'paddingRight', true) + fn.css(element, 'borderLeftWidth', true) + fn.css(element, 'borderRightWidth', true);
|
|
150
|
+
}
|
|
151
|
+
return value;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
return fn;
|
|
155
|
+
|
|
156
|
+
}]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
"use strict";angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),e=t.nodeName=function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()};t.css=function(t,e,o){var n;return n=t.currentStyle?t.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(t)[e]:t.style[e],o===!0?parseFloat(n)||0:n},t.offset=function(t){var e=t.getBoundingClientRect(),o=t.ownerDocument;return{width:e.width||t.offsetWidth,height:e.height||t.offsetHeight,top:e.top+(window.pageYOffset||o.documentElement.scrollTop)-(o.documentElement.clientTop||0),left:e.left+(window.pageXOffset||o.documentElement.scrollLeft)-(o.documentElement.clientLeft||0)}},t.position=function(n){var s,i,r={top:0,left:0};return"fixed"===t.css(n,"position")?i=n.getBoundingClientRect():(s=o(n),i=t.offset(n),e(s,"html")||(r=t.offset(s)),r.top+=t.css(s,"borderTopWidth",!0),r.left+=t.css(s,"borderLeftWidth",!0)),{width:n.offsetWidth,height:n.offsetHeight,top:i.top-r.top-t.css(n,"marginTop",!0),left:i.left-r.left-t.css(n,"marginLeft",!0)}};var o=function(o){var n=o.ownerDocument,s=o.offsetParent||n;if(e(s,"#document"))return n.documentElement;for(;s&&!e(s,"html")&&"static"===t.css(s,"position");)s=s.offsetParent;return s||n.documentElement};return t.height=function(e,o){var n=e.offsetHeight;return o?n+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):n-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),n},t.width=function(e,o){var n=e.offsetWidth;return o?n+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):n-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),n},t}]);
|
|
9
|
+
//# sourceMappingURL=dimensions.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["helpers/dimensions.js"],"names":[],"mappings":"8HAcQ,wHAiBA,SAAQ,EAAc,EAAA,kBAExB,EAAO,oIAgBC,SAAQ,2TAiBhB,SAAW,SAAS,MAGlB,8FAeA,EAAA,EAAA,OAAiB,gCAMjB,EAAgB,KAAA,EAAA,IAAA,EAAA,kBAAA,GAChB,EAAY,MAAM,EAAA,IAAA,EAA8B,mBAAsB,wIAkBxE,GAAO,SAA2B,uMAiBlC,OAAO,SAAA,EAAA,iNAiBP,MAAO,SAAA,EAAA,gCAGT,GAAO,EAAA,IAAA,EAAA,cAAA,GAAA,EAAA,IAAA,EAAA,eAAA,GAEN,GAAA,EAAA,IAAA,EAAA,eAAA,GAAA,EAAA,IAAA,EAAA,gBAAA,GAAA,EAAA,IAAA,EAAA,mBAAA,GAAA,EAAA,IAAA,EAAA,oBAAA","file":"dimensions.min.js","sourcesContent":["'use strict';\n\nangular.module('mgcrea.ngStrap.helpers.dimensions', [])\n\n .factory('dimensions', function($document, $window) {\n\n var jqLite = angular.element;\n var fn = {};\n\n /**\n * Test the element nodeName\n * @param element\n * @param name\n */\n var nodeName = fn.nodeName = function(element, name) {\n return element.nodeName && element.nodeName.toLowerCase() === name.toLowerCase();\n };\n\n /**\n * Returns the element computed style\n * @param element\n * @param prop\n * @param extra\n */\n fn.css = function(element, prop, extra) {\n var value;\n if (element.currentStyle) { //IE\n value = element.currentStyle[prop];\n } else if (window.getComputedStyle) {\n value = window.getComputedStyle(element)[prop];\n } else {\n value = element.style[prop];\n }\n return extra === true ? parseFloat(value) || 0 : value;\n };\n\n /**\n * Provides read-only equivalent of jQuery's offset function:\n * @required-by bootstrap-tooltip, bootstrap-affix\n * @url http://api.jquery.com/offset/\n * @param element\n */\n fn.offset = function(element) {\n var boxRect = element.getBoundingClientRect();\n var docElement = element.ownerDocument;\n return {\n width: boxRect.width || element.offsetWidth,\n height: boxRect.height || element.offsetHeight,\n top: boxRect.top + (window.pageYOffset || docElement.documentElement.scrollTop) - (docElement.documentElement.clientTop || 0),\n left: boxRect.left + (window.pageXOffset || docElement.documentElement.scrollLeft) - (docElement.documentElement.clientLeft || 0)\n };\n };\n\n /**\n * Provides read-only equivalent of jQuery's position function\n * @required-by bootstrap-tooltip, bootstrap-affix\n * @url http://api.jquery.com/offset/\n * @param element\n */\n fn.position = function(element) {\n\n var offsetParentRect = {top: 0, left: 0},\n offsetParentElement,\n offset;\n\n // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\n if (fn.css(element, 'position') === 'fixed') {\n\n // We assume that getBoundingClientRect is available when computed position is fixed\n offset = element.getBoundingClientRect();\n\n } else {\n\n // Get *real* offsetParentElement\n offsetParentElement = offsetParent(element);\n\n // Get correct offsets\n offset = fn.offset(element);\n if (!nodeName(offsetParentElement, 'html')) {\n offsetParentRect = fn.offset(offsetParentElement);\n }\n\n // Add offsetParent borders\n offsetParentRect.top += fn.css(offsetParentElement, 'borderTopWidth', true);\n offsetParentRect.left += fn.css(offsetParentElement, 'borderLeftWidth', true);\n }\n\n // Subtract parent offsets and element margins\n return {\n width: element.offsetWidth,\n height: element.offsetHeight,\n top: offset.top - offsetParentRect.top - fn.css(element, 'marginTop', true),\n left: offset.left - offsetParentRect.left - fn.css(element, 'marginLeft', true)\n };\n\n };\n\n /**\n * Returns the closest, non-statically positioned offsetParent of a given element\n * @required-by fn.position\n * @param element\n */\n var offsetParent = function offsetParentElement(element) {\n var docElement = element.ownerDocument;\n var offsetParent = element.offsetParent || docElement;\n if(nodeName(offsetParent, '#document')) return docElement.documentElement;\n while(offsetParent && !nodeName(offsetParent, 'html') && fn.css(offsetParent, 'position') === 'static') {\n offsetParent = offsetParent.offsetParent;\n }\n return offsetParent || docElement.documentElement;\n };\n\n /**\n * Provides equivalent of jQuery's height function\n * @required-by bootstrap-affix\n * @url http://api.jquery.com/height/\n * @param element\n * @param outer\n */\n fn.height = function(element, outer) {\n var value = element.offsetHeight;\n if(outer) {\n value += fn.css(element, 'marginTop', true) + fn.css(element, 'marginBottom', true);\n } else {\n value -= fn.css(element, 'paddingTop', true) + fn.css(element, 'paddingBottom', true) + fn.css(element, 'borderTopWidth', true) + fn.css(element, 'borderBottomWidth', true);\n }\n return value;\n };\n\n /**\n * Provides equivalent of jQuery's width function\n * @required-by bootstrap-affix\n * @url http://api.jquery.com/width/\n * @param element\n * @param outer\n */\n fn.width = function(element, outer) {\n var value = element.offsetWidth;\n if(outer) {\n value += fn.css(element, 'marginLeft', true) + fn.css(element, 'marginRight', true);\n } else {\n value -= fn.css(element, 'paddingLeft', true) + fn.css(element, 'paddingRight', true) + fn.css(element, 'borderLeftWidth', true) + fn.css(element, 'borderRightWidth', true);\n }\n return value;\n };\n\n return fn;\n\n });\n"],"sourceRoot":"/source/"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
angular.module('mgcrea.ngStrap.dropdown', ['mgcrea.ngStrap.tooltip'])
|
|
11
|
+
|
|
12
|
+
.provider('$dropdown', function() {
|
|
13
|
+
|
|
14
|
+
var defaults = this.defaults = {
|
|
15
|
+
animation: 'am-fade',
|
|
16
|
+
prefixClass: 'dropdown',
|
|
17
|
+
placement: 'bottom-left',
|
|
18
|
+
template: 'dropdown/dropdown.tpl.html',
|
|
19
|
+
trigger: 'click',
|
|
20
|
+
container: false,
|
|
21
|
+
keyboard: true,
|
|
22
|
+
html: false,
|
|
23
|
+
delay: 0
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
this.$get = ["$window", "$rootScope", "$tooltip", "$timeout", function($window, $rootScope, $tooltip, $timeout) {
|
|
27
|
+
|
|
28
|
+
var bodyEl = angular.element($window.document.body);
|
|
29
|
+
var matchesSelector = Element.prototype.matchesSelector || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector;
|
|
30
|
+
|
|
31
|
+
function DropdownFactory(element, config) {
|
|
32
|
+
|
|
33
|
+
var $dropdown = {};
|
|
34
|
+
|
|
35
|
+
// Common vars
|
|
36
|
+
var options = angular.extend({}, defaults, config);
|
|
37
|
+
var scope = $dropdown.$scope = options.scope && options.scope.$new() || $rootScope.$new();
|
|
38
|
+
|
|
39
|
+
$dropdown = $tooltip(element, options);
|
|
40
|
+
var parentEl = element.parent();
|
|
41
|
+
|
|
42
|
+
// Protected methods
|
|
43
|
+
|
|
44
|
+
$dropdown.$onKeyDown = function(evt) {
|
|
45
|
+
if (!/(38|40)/.test(evt.keyCode)) return;
|
|
46
|
+
evt.preventDefault();
|
|
47
|
+
evt.stopPropagation();
|
|
48
|
+
|
|
49
|
+
// Retrieve focused index
|
|
50
|
+
var items = angular.element($dropdown.$element[0].querySelectorAll('li:not(.divider) a'));
|
|
51
|
+
if(!items.length) return;
|
|
52
|
+
var index;
|
|
53
|
+
angular.forEach(items, function(el, i) {
|
|
54
|
+
if(matchesSelector && matchesSelector.call(el, ':focus')) index = i;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Navigate with keyboard
|
|
58
|
+
if(evt.keyCode === 38 && index > 0) index--;
|
|
59
|
+
else if(evt.keyCode === 40 && index < items.length - 1) index++;
|
|
60
|
+
else if(angular.isUndefined(index)) index = 0;
|
|
61
|
+
items.eq(index)[0].focus();
|
|
62
|
+
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Overrides
|
|
66
|
+
|
|
67
|
+
var show = $dropdown.show;
|
|
68
|
+
$dropdown.show = function() {
|
|
69
|
+
show();
|
|
70
|
+
// use timeout to hookup the events to prevent
|
|
71
|
+
// event bubbling from being processed imediately.
|
|
72
|
+
$timeout(function() {
|
|
73
|
+
options.keyboard && $dropdown.$element.on('keydown', $dropdown.$onKeyDown);
|
|
74
|
+
bodyEl.on('click', onBodyClick);
|
|
75
|
+
}, 0, false);
|
|
76
|
+
parentEl.hasClass('dropdown') && parentEl.addClass('open');
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var hide = $dropdown.hide;
|
|
80
|
+
$dropdown.hide = function() {
|
|
81
|
+
if(!$dropdown.$isShown) return;
|
|
82
|
+
options.keyboard && $dropdown.$element.off('keydown', $dropdown.$onKeyDown);
|
|
83
|
+
bodyEl.off('click', onBodyClick);
|
|
84
|
+
parentEl.hasClass('dropdown') && parentEl.removeClass('open');
|
|
85
|
+
hide();
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var destroy = $dropdown.destroy;
|
|
89
|
+
$dropdown.destroy = function() {
|
|
90
|
+
bodyEl.off('click', onBodyClick);
|
|
91
|
+
destroy();
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// Private functions
|
|
95
|
+
|
|
96
|
+
function onBodyClick(evt) {
|
|
97
|
+
if(evt.target === element[0]) return;
|
|
98
|
+
return evt.target !== element[0] && $dropdown.hide();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return $dropdown;
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return DropdownFactory;
|
|
106
|
+
|
|
107
|
+
}];
|
|
108
|
+
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
.directive('bsDropdown', ["$window", "$sce", "$dropdown", function($window, $sce, $dropdown) {
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
restrict: 'EAC',
|
|
115
|
+
scope: true,
|
|
116
|
+
link: function postLink(scope, element, attr, transclusion) {
|
|
117
|
+
|
|
118
|
+
// Directive options
|
|
119
|
+
var options = {scope: scope};
|
|
120
|
+
angular.forEach(['placement', 'container', 'delay', 'trigger', 'keyboard', 'html', 'animation', 'template', 'id'], function(key) {
|
|
121
|
+
if(angular.isDefined(attr[key])) options[key] = attr[key];
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Support scope as an object
|
|
125
|
+
attr.bsDropdown && scope.$watch(attr.bsDropdown, function(newValue, oldValue) {
|
|
126
|
+
scope.content = newValue;
|
|
127
|
+
}, true);
|
|
128
|
+
|
|
129
|
+
// Visibility binding support
|
|
130
|
+
attr.bsShow && scope.$watch(attr.bsShow, function(newValue, oldValue) {
|
|
131
|
+
if(!dropdown || !angular.isDefined(newValue)) return;
|
|
132
|
+
if(angular.isString(newValue)) newValue = !!newValue.match(/true|,?(dropdown),?/i);
|
|
133
|
+
newValue === true ? dropdown.show() : dropdown.hide();
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// Initialize dropdown
|
|
137
|
+
var dropdown = $dropdown(element, options);
|
|
138
|
+
|
|
139
|
+
// Garbage collection
|
|
140
|
+
scope.$on('$destroy', function() {
|
|
141
|
+
if (dropdown) dropdown.destroy();
|
|
142
|
+
options = null;
|
|
143
|
+
dropdown = null;
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
}]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* angular-strap
|
|
3
|
+
* @version v2.1.6 - 2015-01-11
|
|
4
|
+
* @link http://mgcrea.github.io/angular-strap
|
|
5
|
+
* @author Olivier Louvignes (olivier@mg-crea.com)
|
|
6
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
7
|
+
*/
|
|
8
|
+
"use strict";angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",placement:"bottom-left",template:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip","$timeout",function(o,n,t,r){function a(o,a){function c(e){return e.target!==o[0]?e.target!==o[0]&&d.hide():void 0}{var d={},s=angular.extend({},e,a);d.$scope=s.scope&&s.scope.$new()||n.$new()}d=t(o,s);var p=o.parent();d.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var o=angular.element(d.$element[0].querySelectorAll("li:not(.divider) a"));if(o.length){var n;angular.forEach(o,function(e,o){l&&l.call(e,":focus")&&(n=o)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n<o.length-1?n++:angular.isUndefined(n)&&(n=0),o.eq(n)[0].focus()}}};var u=d.show;d.show=function(){u(),r(function(){s.keyboard&&d.$element.on("keydown",d.$onKeyDown),i.on("click",c)},0,!1),p.hasClass("dropdown")&&p.addClass("open")};var f=d.hide;d.hide=function(){d.$isShown&&(s.keyboard&&d.$element.off("keydown",d.$onKeyDown),i.off("click",c),p.hasClass("dropdown")&&p.removeClass("open"),f())};var w=d.destroy;return d.destroy=function(){i.off("click",c),w()},d}var i=angular.element(o.document.body),l=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector;return a}]}).directive("bsDropdown",["$window","$sce","$dropdown",function(e,o,n){return{restrict:"EAC",scope:!0,link:function(e,o,t){var r={scope:e};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","id"],function(e){angular.isDefined(t[e])&&(r[e]=t[e])}),t.bsDropdown&&e.$watch(t.bsDropdown,function(o){e.content=o},!0),t.bsShow&&e.$watch(t.bsShow,function(e){a&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(dropdown),?/i)),e===!0?a.show():a.hide())});var a=n(o,r);e.$on("$destroy",function(){a&&a.destroy(),r=null,a=null})}}}]);
|
|
9
|
+
//# sourceMappingURL=dropdown.min.js.map
|