[임대현] [NOBTS] 컴포넌트 업데이트

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@4019 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Denny Lim
2014-06-16 06:07:37 +00:00
parent 25a5534555
commit 410fac7d91
60 changed files with 160 additions and 130 deletions
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -21,7 +21,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler
keyboard: true,
show: true,
duration: false,
type: false
type: false,
dismissable: true
};
this.$get = [
'$modal',
@@ -32,7 +33,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler
// Common vars
var options = angular.extend({}, defaults, config);
$alert = $modal(options);
// Support scope as string options [/*title, content, */type]
// Support scope as string options [/*title, content, */ type, dismissable]
$alert.$scope.dismissable = !!options.dismissable;
if (options.type) {
$alert.$scope.type = options.type;
}
@@ -75,7 +77,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler
'html',
'container',
'animation',
'duration'
'duration',
'dismissable'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var t=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1};this.$get=["$modal","$timeout",function(e,n){function a(a){var r={},o=angular.extend({},t,a);r=e(o),o.type&&(r.$scope.type=o.type);var i=r.show;return o.duration&&(r.show=function(){i(),n(function(){r.hide()},1e3*o.duration)}),r}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(t,e,n,a){t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var o={scope:t,element:e,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration"],function(t){angular.isDefined(r[t])&&(o[t]=r[t])}),angular.forEach(["title","content","type"],function(e){r[e]&&r.$observe(e,function(a){t[e]=n.trustAsHtml(a)})}),r.bsAlert&&t.$watch(r.bsAlert,function(e){angular.isObject(e)?angular.extend(t,e):t.content=e},!0);var i=a(o);e.on(r.trigger||"click",i.toggle),t.$on("$destroy",function(){i.destroy(),o=null,i=null})}}}]);
"use strict";angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var t=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function(e,n){function a(a){var r={},i=angular.extend({},t,a);r=e(i),r.$scope.dismissable=!!i.dismissable,i.type&&(r.$scope.type=i.type);var o=r.show;return i.duration&&(r.show=function(){o(),n(function(){r.hide()},1e3*i.duration)}),r}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(t,e,n,a){t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var i={scope:t,element:e,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration","dismissable"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content","type"],function(e){r[e]&&r.$observe(e,function(a){t[e]=n.trustAsHtml(a)})}),r.bsAlert&&t.$watch(r.bsAlert,function(e){angular.isObject(e)?angular.extend(t,e):t.content=e},!0);var o=a(i);e.on(r.trigger||"click",o.toggle),t.$on("$destroy",function(){o.destroy(),i=null,o=null})}}}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -9,6 +9,6 @@
angular.module('mgcrea.ngStrap.alert').run([
'$templateCache',
function ($templateCache) {
$templateCache.put('alert/alert.tpl.html', '<div class="alert alert-dismissable" tabindex="-1" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-click="$hide()">&times;</button> <strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span></div>');
$templateCache.put('alert/alert.tpl.html', '<div class="alert" tabindex="-1" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">&times;</button> <strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span></div>');
}
]);
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(t){t.put("alert/alert.tpl.html",'<div class="alert alert-dismissable" tabindex="-1" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-click="$hide()">&times;</button> <strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span></div>')}]);
"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(t){t.put("alert/alert.tpl.html",'<div class="alert" tabindex="-1" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">&times;</button> <strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span></div>')}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -91,15 +91,17 @@ angular.module('mgcrea.ngStrap.helpers.dateParser', []).provider('$dateParser',
return !isNaN(date.getTime());
return regex.test(date);
};
$dateParser.parse = function (value, baseDate) {
$dateParser.parse = function (value, baseDate, format) {
var formatRegex = format ? regExpForFormat(format) : regex;
var formatSetMap = format ? setMapForFormat(format) : setMap;
if (angular.isDate(value))
return value;
var matches = regex.exec(value);
var matches = formatRegex.exec(value);
if (!matches)
return false;
var date = baseDate || new Date(0, 0, 1);
for (var i = 0; i < matches.length - 1; i++) {
setMap[i] && setMap[i].call(date, matches[i + 1]);
formatSetMap[i] && formatSetMap[i].call(date, matches[i + 1]);
}
return date;
};
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function(){var t=Date.prototype,e=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale",function(r){var s=function(s){function n(t){var e,r=Object.keys(f),s=[],n=[],i=t;for(e=0;e<r.length;e++)if(t.split(r[e]).length>1){var a=i.search(r[e]);t=t.split(r[e]).join(""),f[r[e]]&&(s[a]=f[r[e]])}return angular.forEach(s,function(t){n.push(t)}),n}function i(t){return t.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function a(t){var e,r=Object.keys(l),s=t;for(e=0;e<r.length;e++)s=s.split(r[e]).join("${"+e+"}");for(e=0;e<r.length;e++)s=s.split("${"+e+"}").join("("+l[r[e]]+")");return t=i(t),new RegExp("^"+s+"$",["i"])}var o,u,M=angular.extend({},e,s),c={},l={sss:"[0-9]{3}",ss:"[0-5][0-9]",s:M.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",mm:"[0-5][0-9]",m:M.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",HH:"[01][0-9]|2[0-3]",H:M.strict?"1?[0-9]|2[0-3]":"[01]?[0-9]|2[0-3]",hh:"[0][1-9]|[1][012]",h:M.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",a:"AM|PM",EEEE:r.DATETIME_FORMATS.DAY.join("|"),EEE:r.DATETIME_FORMATS.SHORTDAY.join("|"),dd:"0[1-9]|[12][0-9]|3[01]",d:M.strict?"[1-9]|[1-2][0-9]|3[01]":"0?[1-9]|[1-2][0-9]|3[01]",MMMM:r.DATETIME_FORMATS.MONTH.join("|"),MMM:r.DATETIME_FORMATS.SHORTMONTH.join("|"),MM:"0[1-9]|1[012]",M:M.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",yyyy:"[1]{1}[0-9]{3}|[2]{1}[0-9]{3}",yy:"[0-9]{2}",y:M.strict?"-?(0|[1-9][0-9]{0,3})":"-?0*[0-9]{1,4}"},f={sss:t.setMilliseconds,ss:t.setSeconds,s:t.setSeconds,mm:t.setMinutes,m:t.setMinutes,HH:t.setHours,H:t.setHours,hh:t.setHours,h:t.setHours,dd:t.setDate,d:t.setDate,a:function(t){var e=this.getHours();return this.setHours(t.match(/pm/i)?e+12:e)},MMMM:function(t){return this.setMonth(r.DATETIME_FORMATS.MONTH.indexOf(t))},MMM:function(t){return this.setMonth(r.DATETIME_FORMATS.SHORTMONTH.indexOf(t))},MM:function(t){return this.setMonth(1*t-1)},M:function(t){return this.setMonth(1*t-1)},yyyy:t.setFullYear,yy:function(t){return this.setFullYear(2e3+1*t)},y:t.setFullYear};return c.init=function(){c.$format=r.DATETIME_FORMATS[M.format]||M.format,o=a(c.$format),u=n(c.$format)},c.isValid=function(t){return angular.isDate(t)?!isNaN(t.getTime()):o.test(t)},c.parse=function(t,e){if(angular.isDate(t))return t;var r=o.exec(t);if(!r)return!1;for(var s=e||new Date(0,0,1),n=0;n<r.length-1;n++)u[n]&&u[n].call(s,r[n+1]);return s},c.init(),c};return s}]}]);
"use strict";angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function(){var t=Date.prototype,e=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale",function(r){var s=function(s){function n(t){var e,r=Object.keys(f),s=[],n=[],i=t;for(e=0;e<r.length;e++)if(t.split(r[e]).length>1){var a=i.search(r[e]);t=t.split(r[e]).join(""),f[r[e]]&&(s[a]=f[r[e]])}return angular.forEach(s,function(t){n.push(t)}),n}function i(t){return t.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function a(t){var e,r=Object.keys(l),s=t;for(e=0;e<r.length;e++)s=s.split(r[e]).join("${"+e+"}");for(e=0;e<r.length;e++)s=s.split("${"+e+"}").join("("+l[r[e]]+")");return t=i(t),new RegExp("^"+s+"$",["i"])}var o,u,M=angular.extend({},e,s),c={},l={sss:"[0-9]{3}",ss:"[0-5][0-9]",s:M.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",mm:"[0-5][0-9]",m:M.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",HH:"[01][0-9]|2[0-3]",H:M.strict?"1?[0-9]|2[0-3]":"[01]?[0-9]|2[0-3]",hh:"[0][1-9]|[1][012]",h:M.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",a:"AM|PM",EEEE:r.DATETIME_FORMATS.DAY.join("|"),EEE:r.DATETIME_FORMATS.SHORTDAY.join("|"),dd:"0[1-9]|[12][0-9]|3[01]",d:M.strict?"[1-9]|[1-2][0-9]|3[01]":"0?[1-9]|[1-2][0-9]|3[01]",MMMM:r.DATETIME_FORMATS.MONTH.join("|"),MMM:r.DATETIME_FORMATS.SHORTMONTH.join("|"),MM:"0[1-9]|1[012]",M:M.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",yyyy:"[1]{1}[0-9]{3}|[2]{1}[0-9]{3}",yy:"[0-9]{2}",y:M.strict?"-?(0|[1-9][0-9]{0,3})":"-?0*[0-9]{1,4}"},f={sss:t.setMilliseconds,ss:t.setSeconds,s:t.setSeconds,mm:t.setMinutes,m:t.setMinutes,HH:t.setHours,H:t.setHours,hh:t.setHours,h:t.setHours,dd:t.setDate,d:t.setDate,a:function(t){var e=this.getHours();return this.setHours(t.match(/pm/i)?e+12:e)},MMMM:function(t){return this.setMonth(r.DATETIME_FORMATS.MONTH.indexOf(t))},MMM:function(t){return this.setMonth(r.DATETIME_FORMATS.SHORTMONTH.indexOf(t))},MM:function(t){return this.setMonth(1*t-1)},M:function(t){return this.setMonth(1*t-1)},yyyy:t.setFullYear,yy:function(t){return this.setFullYear(2e3+1*t)},y:t.setFullYear};return c.init=function(){c.$format=r.DATETIME_FORMATS[M.format]||M.format,o=a(c.$format),u=n(c.$format)},c.isValid=function(t){return angular.isDate(t)?!isNaN(t.getTime()):o.test(t)},c.parse=function(t,e,r){var s=r?a(r):o,i=r?n(r):u;if(angular.isDate(t))return t;var M=s.exec(t);if(!M)return!1;for(var c=e||new Date(0,0,1),l=0;l<M.length-1;l++)i[l]&&i[l].call(c,M[l+1]);return c},c.init(),c};return s}]}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -23,6 +23,7 @@ angular.module('mgcrea.ngStrap.datepicker', [
useNative: false,
dateType: 'date',
dateFormat: 'shortDate',
modelDateFormat: null,
dayFormat: 'dd',
strictFormat: false,
autoclose: false,
@@ -30,7 +31,9 @@ angular.module('mgcrea.ngStrap.datepicker', [
maxDate: +Infinity,
startView: 0,
minView: 0,
startWeek: 0
startWeek: 0,
iconLeft: 'glyphicon glyphicon-chevron-left',
iconRight: 'glyphicon glyphicon-chevron-right'
};
this.$get = [
'$window',
@@ -59,6 +62,8 @@ angular.module('mgcrea.ngStrap.datepicker', [
$datepicker.$views = pickerViews.views;
var viewDate = pickerViews.viewDate;
scope.$mode = options.startView;
scope.$iconLeft = options.iconLeft;
scope.$iconRight = options.iconRight;
var $picker = $datepicker.$views[scope.$mode];
// Scope methods
scope.$select = function (date) {
@@ -253,6 +258,7 @@ angular.module('mgcrea.ngStrap.datepicker', [
'autoclose',
'dateType',
'dateFormat',
'modelDateFormat',
'dayFormat',
'strictFormat',
'startWeek',
@@ -314,14 +320,18 @@ angular.module('mgcrea.ngStrap.datepicker', [
controller.$setValidity('date', false);
return;
} else {
var isValid = (isNaN(datepicker.$options.minDate) || parsedDate.getTime() >= datepicker.$options.minDate) && (isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate);
var isMinValid = isNaN(datepicker.$options.minDate) || parsedDate.getTime() >= datepicker.$options.minDate;
var isMaxValid = isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate;
var isValid = isMinValid && isMaxValid;
controller.$setValidity('date', isValid);
controller.$setValidity('min', isMinValid);
controller.$setValidity('max', isMaxValid);
// Only update the model when we have a valid date
if (isValid)
controller.$dateValue = parsedDate;
}
if (options.dateType === 'string') {
return dateFilter(viewValue, options.dateFormat);
return dateFilter(parsedDate, options.modelDateFormat || options.dateFormat);
} else if (options.dateType === 'number') {
return controller.$dateValue.getTime();
} else if (options.dateType === 'iso') {
@@ -339,7 +349,7 @@ angular.module('mgcrea.ngStrap.datepicker', [
} else if (angular.isDate(modelValue)) {
date = modelValue;
} else if (options.dateType === 'string') {
date = dateParser.parse(modelValue);
date = dateParser.parse(modelValue, null, options.modelDateFormat);
} else {
date = new Date(modelValue);
}
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -9,6 +9,6 @@
angular.module('mgcrea.ngStrap.datepicker').run([
'$templateCache',
function ($templateCache) {
$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="glyphicon glyphicon-chevron-left"></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="glyphicon glyphicon-chevron-right"></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}" 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>');
$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}" 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>');
}
]);
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"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="glyphicon glyphicon-chevron-left"></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="glyphicon glyphicon-chevron-right"></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}" 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>')}]);
"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}" 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>')}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -48,8 +48,8 @@ angular.module('mgcrea.ngStrap.helpers.dimensions', []).factory('dimensions', [
var boxRect = element.getBoundingClientRect();
var docElement = element.ownerDocument;
return {
width: element.offsetWidth,
height: element.offsetHeight,
width: boxRect.width || element.offsetWidth,
height: boxRect.height || element.offsetHeight,
top: boxRect.top + (window.pageYOffset || docElement.documentElement.scrollTop) - (docElement.documentElement.clientTop || 0),
left: boxRect.left + (window.pageXOffset || docElement.documentElement.scrollLeft) - (docElement.documentElement.clientLeft || 0)
};
@@ -122,7 +122,7 @@ angular.module('mgcrea.ngStrap.helpers.dimensions', []).factory('dimensions', [
return value;
};
/**
* Provides equivalent of jQuery's height function
* Provides equivalent of jQuery's width function
* @required-by bootstrap-affix
* @url http://api.jquery.com/width/
* @param element
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"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:t.offsetWidth,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,r,i={top:0,left:0};return"fixed"===t.css(n,"position")?r=n.getBoundingClientRect():(s=o(n),r=t.offset(n),r=t.offset(n),e(s,"html")||(i=t.offset(s)),i.top+=t.css(s,"borderTopWidth",!0),i.left+=t.css(s,"borderLeftWidth",!0)),{width:n.offsetWidth,height:n.offsetHeight,top:r.top-i.top-t.css(n,"marginTop",!0),left:r.left-i.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}]);
"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),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}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -9,6 +9,6 @@
angular.module('mgcrea.ngStrap.dropdown').run([
'$templateCache',
function ($templateCache) {
$templateCache.put('dropdown/dropdown.tpl.html', '<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>');
$templateCache.put('dropdown/dropdown.tpl.html', '<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>');
}
]);
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(e){e.put("dropdown/dropdown.tpl.html",'<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>')}]);
"use strict";angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(e){e.put("dropdown/dropdown.tpl.html",'<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>')}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -142,7 +142,7 @@ angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).pr
scope.$emit(options.prefixEvent + '.show', $modal);
});
scope.$isShown = true;
scope.$$phase || scope.$root.$$phase || scope.$digest();
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
// Focus once the enter-animation has started
// Weird PhantomJS bug hack
var el = modalElement[0];
@@ -176,7 +176,7 @@ angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).pr
});
}
scope.$isShown = false;
scope.$$phase || scope.$root.$$phase || scope.$digest();
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
// Unbind events
if (options.backdrop) {
modalElement.off('click', hideOnBackdropClick);
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var n=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(e,t,o,a,i,r,c,l,s){function u(e){function a(n){n.target===n.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},n,e);i.$promise=m(r.template);var l=i.$scope=r.scope&&r.scope.$new()||t.$new();r.element||r.container||(r.container="body"),p(["title","content"],function(n){r[n]&&(l[n]=s.trustAsHtml(r[n]))}),l.$hide=function(){l.$$postDigest(function(){i.hide()})},l.$show=function(){l.$$postDigest(function(){i.show()})},l.$toggle=function(){l.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(n){var t=angular.element(n);return m(r.contentTemplate).then(function(n){var o=d('[ng-bind="content"]',t[0]).removeAttr("ng-bind").html(n);return e.template||o.next().remove(),t[0].outerHTML})}));var u,b,v=angular.element('<div class="'+r.prefixClass+'-backdrop"/>');return i.$promise.then(function(n){angular.isObject(n)&&(n=n.data),r.html&&(n=n.replace(g,'ng-bind-html="')),n=f.apply(n),u=o(n),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){b&&(b.remove(),b=null),v&&(v.remove(),v=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var n=r.container?d(r.container):null,e=r.container?null:r.element;b=i.$element=u(l,function(){}),b.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&v.addClass(r.backdropAnimation),b.addClass(r.animation)),r.backdrop&&c.enter(v,h,null,function(){}),c.enter(b,n,e,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root.$$phase||l.$digest();var t=b[0];$(function(){t.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(b.on("click",a),v.on("click",a)),r.keyboard&&b.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),c.leave(b,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&c.leave(v,function(){}),l.$isShown=!1,l.$$phase||l.$root.$$phase||l.$digest(),r.backdrop&&(b.off("click",a),v.off("click",a)),r.keyboard&&b.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){b[0].focus()},i.$onKeyUp=function(n){27===n.which&&i.hide()},i}function d(n,e){return angular.element((e||document).querySelectorAll(n))}function m(n){return a.when(i.get(n)||r.get(n)).then(function(e){return angular.isObject(e)?(i.put(n,e.data),e.data):e})}var p=angular.forEach,f=String.prototype.trim,$=e.requestAnimationFrame||e.setTimeout,h=angular.element(e.document.body),g=/ng-bind="/gi;return u}]}).directive("bsModal",["$window","$location","$sce","$modal",function(n,e,t,o){return{restrict:"EAC",scope:!0,link:function(n,e,a){var i={scope:n,element:e,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(n){angular.isDefined(a[n])&&(i[n]=a[n])}),angular.forEach(["title","content"],function(e){a[e]&&a.$observe(e,function(o){n[e]=t.trustAsHtml(o)})}),a.bsModal&&n.$watch(a.bsModal,function(e){angular.isObject(e)?angular.extend(n,e):n.content=e},!0);var r=o(i);e.on(a.trigger||"click",r.toggle),n.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]);
"use strict";angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var n=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(e,t,o,a,i,r,c,l,s){function u(e){function a(n){n.target===n.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},n,e);i.$promise=m(r.template);var l=i.$scope=r.scope&&r.scope.$new()||t.$new();r.element||r.container||(r.container="body"),p(["title","content"],function(n){r[n]&&(l[n]=s.trustAsHtml(r[n]))}),l.$hide=function(){l.$$postDigest(function(){i.hide()})},l.$show=function(){l.$$postDigest(function(){i.show()})},l.$toggle=function(){l.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(n){var t=angular.element(n);return m(r.contentTemplate).then(function(n){var o=d('[ng-bind="content"]',t[0]).removeAttr("ng-bind").html(n);return e.template||o.next().remove(),t[0].outerHTML})}));var u,b,v=angular.element('<div class="'+r.prefixClass+'-backdrop"/>');return i.$promise.then(function(n){angular.isObject(n)&&(n=n.data),r.html&&(n=n.replace(g,'ng-bind-html="')),n=f.apply(n),u=o(n),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){b&&(b.remove(),b=null),v&&(v.remove(),v=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var n=r.container?d(r.container):null,e=r.container?null:r.element;b=i.$element=u(l,function(){}),b.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&v.addClass(r.backdropAnimation),b.addClass(r.animation)),r.backdrop&&c.enter(v,h,null,function(){}),c.enter(b,n,e,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root&&l.$root.$$phase||l.$digest();var t=b[0];$(function(){t.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(b.on("click",a),v.on("click",a)),r.keyboard&&b.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),c.leave(b,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&c.leave(v,function(){}),l.$isShown=!1,l.$$phase||l.$root&&l.$root.$$phase||l.$digest(),r.backdrop&&(b.off("click",a),v.off("click",a)),r.keyboard&&b.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){b[0].focus()},i.$onKeyUp=function(n){27===n.which&&i.hide()},i}function d(n,e){return angular.element((e||document).querySelectorAll(n))}function m(n){return a.when(i.get(n)||r.get(n)).then(function(e){return angular.isObject(e)?(i.put(n,e.data),e.data):e})}var p=angular.forEach,f=String.prototype.trim,$=e.requestAnimationFrame||e.setTimeout,h=angular.element(e.document.body),g=/ng-bind="/gi;return u}]}).directive("bsModal",["$window","$location","$sce","$modal",function(n,e,t,o){return{restrict:"EAC",scope:!0,link:function(n,e,a){var i={scope:n,element:e,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(n){angular.isDefined(a[n])&&(i[n]=a[n])}),angular.forEach(["title","content"],function(e){a[e]&&a.$observe(e,function(o){n[e]=t.trustAsHtml(o)})}),a.bsModal&&n.$watch(a.bsModal,function(e){angular.isObject(e)?angular.extend(n,e):n.content=e},!0);var r=o(i);e.on(a.trigger||"click",r.toggle),n.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -9,6 +9,8 @@
angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$popover', function () {
var defaults = this.defaults = {
animation: 'am-fade',
container: false,
target: false,
placement: 'right',
template: 'popover/popover.tpl.html',
contentTemplate: false,
@@ -17,8 +19,7 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$
html: false,
title: '',
content: '',
delay: 0,
container: false
delay: 0
};
this.$get = [
'$tooltip',
@@ -54,6 +55,7 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$
'contentTemplate',
'placement',
'container',
'target',
'delay',
'trigger',
'keyboard',
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var t=this.defaults={animation:"am-fade",placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,container:!1};this.$get=["$tooltip",function(e){function n(n,o){var a=angular.extend({},t,o),r=e(n,a);return a.content&&(r.$scope.content=a.content),r}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(t,e,n,o){var a=t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var i={scope:t};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content"],function(e){r[e]&&r.$observe(e,function(o,r){t[e]=n.trustAsHtml(o),angular.isDefined(r)&&a(function(){c&&c.$applyPlacement()})})}),r.bsPopover&&t.$watch(r.bsPopover,function(e,n){angular.isObject(e)?angular.extend(t,e):t.content=e,angular.isDefined(n)&&a(function(){c&&c.$applyPlacement()})},!0);var c=o(e,i);t.$on("$destroy",function(){c.destroy(),i=null,c=null})}}}]);
"use strict";angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var t=this.defaults={animation:"am-fade",container:!1,target:!1,placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0};this.$get=["$tooltip",function(e){function n(n,o){var a=angular.extend({},t,o),r=e(n,a);return a.content&&(r.$scope.content=a.content),r}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(t,e,n,o){var a=t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var i={scope:t};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content"],function(e){r[e]&&r.$observe(e,function(o,r){t[e]=n.trustAsHtml(o),angular.isDefined(r)&&a(function(){c&&c.$applyPlacement()})})}),r.bsPopover&&t.$watch(r.bsPopover,function(e,n){angular.isObject(e)?angular.extend(t,e):t.content=e,angular.isDefined(n)&&a(function(){c&&c.$applyPlacement()})},!0);var c=o(e,i);t.$on("$destroy",function(){c.destroy(),i=null,c=null})}}}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -25,7 +25,8 @@ angular.module('mgcrea.ngStrap.select', [
caretHtml: '&nbsp;<span class="caret"></span>',
placeholder: 'Choose among the following...',
maxLength: 3,
maxLengthHtml: 'selected'
maxLengthHtml: 'selected',
iconCheckmark: 'glyphicon glyphicon-ok'
};
this.$get = [
'$window',
@@ -40,11 +41,11 @@ angular.module('mgcrea.ngStrap.select', [
// Common vars
var options = angular.extend({}, defaults, config);
$select = $tooltip(element, options);
var parentScope = config.scope;
var scope = $select.$scope;
scope.$matches = [];
scope.$activeIndex = 0;
scope.$isMultiple = options.multiple;
scope.$iconCheckmark = options.iconCheckmark;
scope.$activate = function (index) {
scope.$$postDigest(function () {
$select.activate(index);
@@ -79,21 +80,18 @@ angular.module('mgcrea.ngStrap.select', [
};
$select.select = function (index) {
var value = scope.$matches[index].value;
$select.activate(index);
if (options.multiple) {
controller.$setViewValue(scope.$activeIndex.map(function (index) {
return scope.$matches[index].value;
}));
} else {
controller.$setViewValue(value);
}
controller.$render();
if (parentScope)
parentScope.$digest();
// Hide if single select
if (!options.multiple) {
$select.hide();
}
scope.$apply(function () {
$select.activate(index);
if (options.multiple) {
controller.$setViewValue(scope.$activeIndex.map(function (index) {
return scope.$matches[index].value;
}));
} else {
controller.$setViewValue(value);
// Hide if single select
$select.hide();
}
});
// Emit event
scope.$emit('$select.select', value, index);
};
@@ -248,6 +246,7 @@ angular.module('mgcrea.ngStrap.select', [
scope.$watch(attr.ngModel, function (newValue, oldValue) {
// console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue);
select.$updateActiveIndex();
controller.$render();
}, true);
// Model rendering in view
controller.$render = function () {
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:'&nbsp;<span class="caret"></span>',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,i){function l(t,n,a){var l={},c=angular.extend({},e,a);l=i(t,c);var r=a.scope,u=l.$scope;u.$matches=[],u.$activeIndex=0,u.$isMultiple=c.multiple,u.$activate=function(e){u.$$postDigest(function(){l.activate(e)})},u.$select=function(e){u.$$postDigest(function(){l.select(e)})},u.$isVisible=function(){return l.$isVisible()},u.$isActive=function(e){return l.$isActive(e)},l.update=function(e){u.$matches=e,l.$updateActiveIndex()},l.activate=function(e){return c.multiple?(u.$activeIndex.sort(),l.$isActive(e)?u.$activeIndex.splice(u.$activeIndex.indexOf(e),1):u.$activeIndex.push(e),c.sort&&u.$activeIndex.sort()):u.$activeIndex=e,u.$activeIndex},l.select=function(e){var t=u.$matches[e].value;l.activate(e),n.$setViewValue(c.multiple?u.$activeIndex.map(function(e){return u.$matches[e].value}):t),n.$render(),r&&r.$digest(),c.multiple||l.hide(),u.$emit("$select.select",t,e)},l.$updateActiveIndex=function(){n.$modelValue&&u.$matches.length?u.$activeIndex=c.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return l.$getIndex(e)}):l.$getIndex(n.$modelValue):u.$activeIndex>=u.$matches.length&&(u.$activeIndex=c.multiple?[]:0)},l.$isVisible=function(){return c.minLength&&n?u.$matches.length&&n.$viewValue.length>=c.minLength:u.$matches.length},l.$isActive=function(e){return c.multiple?-1!==u.$activeIndex.indexOf(e):u.$activeIndex===e},l.$getIndex=function(e){var t=u.$matches.length,n=t;if(t){for(n=t;n--&&u.$matches[n].value!==e;);if(!(0>n))return n}},l.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),o){var t=angular.element(e.target);t.triggerHandler("click")}},l.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!c.multiple&&(13===e.keyCode||9===e.keyCode))return l.select(u.$activeIndex);38===e.keyCode&&u.$activeIndex>0?u.$activeIndex--:40===e.keyCode&&u.$activeIndex<u.$matches.length-1?u.$activeIndex++:angular.isUndefined(u.$activeIndex)&&(u.$activeIndex=0),u.$digest()}};var s=l.show;l.show=function(){s(),c.multiple&&l.$element.addClass("select-multiple"),setTimeout(function(){l.$element.on(o?"touchstart":"mousedown",l.$onMouseDown),c.keyboard&&t.on("keydown",l.$onKeyDown)})};var d=l.hide;return l.hide=function(){l.$element.off(o?"touchstart":"mousedown",l.$onMouseDown),c.keyboard&&t.off("keydown",l.$onKeyDown),d(!0)},l}var o=(angular.element(t.document.body),"createTouch"in t.document);return l.defaults=e,l}]}).directive("bsSelect",["$window","$parse","$q","$select","$parseOptions",function(e,t,n,a,i){var l=a.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,o){var c={scope:e};if(angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","placeholder","multiple","maxLength","maxLengthHtml"],function(e){angular.isDefined(n[e])&&(c[e]=n[e])}),"select"===t[0].nodeName.toLowerCase()){var r=t;r.css("display","none"),t=angular.element('<button type="button" class="btn btn-default"></button>'),r.after(t)}var u=i(n.ngOptions),s=a(t,o,c),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,o).then(function(e){s.update(e),o.$render()})},!0),e.$watch(n.ngModel,function(){s.$updateActiveIndex()},!0),o.$render=function(){var e,a;c.multiple&&angular.isArray(o.$modelValue)?(e=o.$modelValue.map(function(e){return a=s.$getIndex(e),angular.isDefined(a)?s.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(c.maxLength||l.maxLength)?e.length+" "+(c.maxLengthHtml||l.maxLengthHtml):e.join(", ")):(a=s.$getIndex(o.$modelValue),e=angular.isDefined(a)?s.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||l.placeholder)+l.caretHtml)},e.$on("$destroy",function(){s.destroy(),c=null,s=null})}}}]);
"use strict";angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:'&nbsp;<span class="caret"></span>',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected",iconCheckmark:"glyphicon glyphicon-ok"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,i){function l(t,n,a){var l={},c=angular.extend({},e,a);l=i(t,c);var r=l.$scope;r.$matches=[],r.$activeIndex=0,r.$isMultiple=c.multiple,r.$iconCheckmark=c.iconCheckmark,r.$activate=function(e){r.$$postDigest(function(){l.activate(e)})},r.$select=function(e){r.$$postDigest(function(){l.select(e)})},r.$isVisible=function(){return l.$isVisible()},r.$isActive=function(e){return l.$isActive(e)},l.update=function(e){r.$matches=e,l.$updateActiveIndex()},l.activate=function(e){return c.multiple?(r.$activeIndex.sort(),l.$isActive(e)?r.$activeIndex.splice(r.$activeIndex.indexOf(e),1):r.$activeIndex.push(e),c.sort&&r.$activeIndex.sort()):r.$activeIndex=e,r.$activeIndex},l.select=function(e){var t=r.$matches[e].value;r.$apply(function(){l.activate(e),c.multiple?n.$setViewValue(r.$activeIndex.map(function(e){return r.$matches[e].value})):(n.$setViewValue(t),l.hide())}),r.$emit("$select.select",t,e)},l.$updateActiveIndex=function(){n.$modelValue&&r.$matches.length?r.$activeIndex=c.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return l.$getIndex(e)}):l.$getIndex(n.$modelValue):r.$activeIndex>=r.$matches.length&&(r.$activeIndex=c.multiple?[]:0)},l.$isVisible=function(){return c.minLength&&n?r.$matches.length&&n.$viewValue.length>=c.minLength:r.$matches.length},l.$isActive=function(e){return c.multiple?-1!==r.$activeIndex.indexOf(e):r.$activeIndex===e},l.$getIndex=function(e){var t=r.$matches.length,n=t;if(t){for(n=t;n--&&r.$matches[n].value!==e;);if(!(0>n))return n}},l.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),o){var t=angular.element(e.target);t.triggerHandler("click")}},l.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!c.multiple&&(13===e.keyCode||9===e.keyCode))return l.select(r.$activeIndex);38===e.keyCode&&r.$activeIndex>0?r.$activeIndex--:40===e.keyCode&&r.$activeIndex<r.$matches.length-1?r.$activeIndex++:angular.isUndefined(r.$activeIndex)&&(r.$activeIndex=0),r.$digest()}};var u=l.show;l.show=function(){u(),c.multiple&&l.$element.addClass("select-multiple"),setTimeout(function(){l.$element.on(o?"touchstart":"mousedown",l.$onMouseDown),c.keyboard&&t.on("keydown",l.$onKeyDown)})};var s=l.hide;return l.hide=function(){l.$element.off(o?"touchstart":"mousedown",l.$onMouseDown),c.keyboard&&t.off("keydown",l.$onKeyDown),s(!0)},l}var o=(angular.element(t.document.body),"createTouch"in t.document);return l.defaults=e,l}]}).directive("bsSelect",["$window","$parse","$q","$select","$parseOptions",function(e,t,n,a,i){var l=a.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,o){var c={scope:e};if(angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","placeholder","multiple","maxLength","maxLengthHtml"],function(e){angular.isDefined(n[e])&&(c[e]=n[e])}),"select"===t[0].nodeName.toLowerCase()){var r=t;r.css("display","none"),t=angular.element('<button type="button" class="btn btn-default"></button>'),r.after(t)}var u=i(n.ngOptions),s=a(t,o,c),$=u.$match[7].replace(/\|.+/,"").trim();e.$watch($,function(){u.valuesFn(e,o).then(function(e){s.update(e),o.$render()})},!0),e.$watch(n.ngModel,function(){s.$updateActiveIndex(),o.$render()},!0),o.$render=function(){var e,a;c.multiple&&angular.isArray(o.$modelValue)?(e=o.$modelValue.map(function(e){return a=s.$getIndex(e),angular.isDefined(a)?s.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(c.maxLength||l.maxLength)?e.length+" "+(c.maxLengthHtml||l.maxLengthHtml):e.join(", ")):(a=s.$getIndex(o.$modelValue),e=angular.isDefined(a)?s.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||l.placeholder)+l.caretHtml)},e.$on("$destroy",function(){s.destroy(),c=null,s=null})}}}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -9,6 +9,6 @@
angular.module('mgcrea.ngStrap.select').run([
'$templateCache',
function ($templateCache) {
$templateCache.put('select/select.tpl.html', '<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><span ng-bind="match.label"></span> <i class="glyphicon glyphicon-ok pull-right" ng-if="$isMultiple && $isActive($index)"></i></a></li></ul>');
$templateCache.put('select/select.tpl.html', '<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><span ng-bind="match.label"></span> <i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i></a></li></ul>');
}
]);
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(e){e.put("select/select.tpl.html",'<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><span ng-bind="match.label"></span> <i class="glyphicon glyphicon-ok pull-right" ng-if="$isMultiple && $isActive($index)"></i></a></li></ul>')}]);
"use strict";angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(e){e.put("select/select.tpl.html",'<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><span ng-bind="match.label"></span> <i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i></a></li></ul>')}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -23,12 +23,15 @@ angular.module('mgcrea.ngStrap.timepicker', [
useNative: true,
timeType: 'date',
timeFormat: 'shortTime',
modelTimeFormat: null,
autoclose: false,
minTime: -Infinity,
maxTime: +Infinity,
length: 5,
hourStep: 1,
minuteStep: 5
minuteStep: 5,
iconUp: 'glyphicon glyphicon-chevron-up',
iconDown: 'glyphicon glyphicon-chevron-down'
};
this.$get = [
'$window',
@@ -60,7 +63,9 @@ angular.module('mgcrea.ngStrap.timepicker', [
millisecond: startDate.getMilliseconds()
};
var format = $locale.DATETIME_FORMATS[options.timeFormat] || options.timeFormat;
var formats = /(h+)[:]?(m+)[ ]?(a?)/i.exec(format).slice(1);
var formats = /(h+)([:\.])?(m+)[ ]?(a?)/i.exec(format).slice(1);
scope.$iconUp = options.iconUp;
scope.$iconDown = options.iconDown;
// Scope methods
scope.$select = function (date, index) {
$timepicker.select(date, index);
@@ -128,7 +133,7 @@ angular.module('mgcrea.ngStrap.timepicker', [
minute = new Date(1970, 0, 1, 0, viewDate.minute - (midIndex - i) * options.minuteStep);
minutes.push({
date: minute,
label: dateFilter(minute, formats[1]),
label: dateFilter(minute, formats[2]),
selected: $timepicker.$date && $timepicker.$isSelected(minute, 1),
disabled: $timepicker.$isDisabled(minute, 1)
});
@@ -141,8 +146,9 @@ angular.module('mgcrea.ngStrap.timepicker', [
]);
}
scope.rows = rows;
scope.showAM = !!formats[2];
scope.showAM = !!formats[3];
scope.isAM = ($timepicker.$date || hours[midIndex].date).getHours() < 12;
scope.timeSeparator = formats[1];
$timepicker.$isBuilt = true;
};
$timepicker.$isSelected = function (date, index) {
@@ -201,7 +207,7 @@ angular.module('mgcrea.ngStrap.timepicker', [
var hours = newDate.getHours(), hoursLength = dateFilter(newDate, 'h').length;
var minutes = newDate.getMinutes(), minutesLength = dateFilter(newDate, 'mm').length;
var lateralMove = /(37|39)/.test(evt.keyCode);
var count = 2 + !!formats[2] * 1;
var count = 2 + !!formats[3] * 1;
// Navigate indexes (left, right)
if (lateralMove) {
if (evt.keyCode === 37)
@@ -341,6 +347,7 @@ angular.module('mgcrea.ngStrap.timepicker', [
'autoclose',
'timeType',
'timeFormat',
'modelTimeFormat',
'useNative',
'hourStep',
'minuteStep',
@@ -400,7 +407,7 @@ angular.module('mgcrea.ngStrap.timepicker', [
controller.$dateValue = parsedTime;
}
if (options.timeType === 'string') {
return dateFilter(viewValue, options.timeFormat);
return dateFilter(parsedTime, options.modelTimeFormat || options.timeFormat);
} else if (options.timeType === 'number') {
return controller.$dateValue.getTime();
} else if (options.timeType === 'iso') {
@@ -418,7 +425,7 @@ angular.module('mgcrea.ngStrap.timepicker', [
} else if (angular.isDate(modelValue)) {
date = modelValue;
} else if (options.timeType === 'string') {
date = dateParser.parse(modelValue);
date = dateParser.parse(modelValue, null, options.modelTimeFormat);
} else {
date = new Date(modelValue);
}
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -9,6 +9,6 @@
angular.module('mgcrea.ngStrap.timepicker').run([
'$templateCache',
function ($templateCache) {
$templateCache.put('timepicker/timepicker.tpl.html', '<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 0)"><i class="glyphicon glyphicon-chevron-up"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 1)"><i class="glyphicon glyphicon-chevron-up"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? \':\' : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 0)"><i class="glyphicon glyphicon-chevron-down"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 1)"><i class="glyphicon glyphicon-chevron-down"></i></button></th></tr></tfoot></table></div>');
$templateCache.put('timepicker/timepicker.tpl.html', '<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 0)"><i class="{{$iconUp}}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 1)"><i class="{{$iconUp}}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 0)"><i class="{{$iconDown}}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 1)"><i class="{{$iconDown}}"></i></button></th></tr></tfoot></table></div>');
}
]);
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(t){t.put("timepicker/timepicker.tpl.html",'<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 0)"><i class="glyphicon glyphicon-chevron-up"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 1)"><i class="glyphicon glyphicon-chevron-up"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? \':\' : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 0)"><i class="glyphicon glyphicon-chevron-down"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 1)"><i class="glyphicon glyphicon-chevron-down"></i></button></th></tr></tfoot></table></div>')}]);
"use strict";angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(t){t.put("timepicker/timepicker.tpl.html",'<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 0)"><i class="{{$iconUp}}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 1)"><i class="{{$iconUp}}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 0)"><i class="{{$iconDown}}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 1)"><i class="{{$iconDown}}"></i></button></th></tr></tfoot></table></div>')}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -12,6 +12,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
prefixClass: 'tooltip',
prefixEvent: 'tooltip',
container: false,
target: false,
placement: 'top',
template: 'tooltip/tooltip.tpl.html',
contentTemplate: false,
@@ -31,10 +32,9 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
'$templateCache',
'$http',
'$animate',
'$timeout',
'dimensions',
'$$rAF',
function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, $timeout, dimensions, $$rAF) {
function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, dimensions, $$rAF) {
var trim = String.prototype.trim;
var isTouch = 'createTouch' in $window.document;
var htmlReplaceRegExp = /ng-bind="/gi;
@@ -125,6 +125,10 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
nodeName === 'button' && trigger !== 'hover' && element.on(isTouch ? 'touchstart' : 'mousedown', $tooltip.$onFocusElementMouseDown);
}
});
// Options: target
if (options.target) {
options.target = angular.isElement(options.target) ? options.target : findElement(options.target)[0];
}
// Options: show
if (options.show) {
scope.$$postDigest(function () {
@@ -150,6 +154,8 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
tipElement.remove();
tipElement = null;
}
// Cancel pending callbacks
clearTimeout(timeout);
// Destroy scope
scope.$destroy();
};
@@ -176,8 +182,8 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
});
// Set the initial positioning.
tipElement.css({
top: '0px',
left: '0px',
top: '-9999px',
left: '-9999px',
display: 'block'
}).addClass(options.placement);
// Options: animation
@@ -190,7 +196,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
scope.$emit(options.prefixEvent + '.show', $tooltip);
});
$tooltip.$isShown = scope.$isShown = true;
scope.$$phase || scope.$root.$$phase || scope.$digest();
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
$$rAF($tooltip.$applyPlacement);
// var a = bodyEl.offsetWidth + 1; ?
// Bind events
@@ -223,7 +229,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
scope.$emit(options.prefixEvent + '.hide', $tooltip);
});
$tooltip.$isShown = scope.$isShown = false;
scope.$$phase || scope.$root.$$phase || scope.$digest();
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
// Unbind events
if (options.keyboard && tipElement !== null) {
tipElement.off('keyup', $tooltip.$onKeyUp);
@@ -269,9 +275,9 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
// Private methods
function getPosition() {
if (options.container === 'body') {
return dimensions.offset(element[0]);
return dimensions.offset(options.target || element[0]);
} else {
return dimensions.position(element[0]);
return dimensions.position(options.target || element[0]);
}
}
function getCalculatedOffset(placement, position, actualWidth, actualHeight) {
@@ -362,6 +368,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).
'contentTemplate',
'placement',
'container',
'target',
'delay',
'trigger',
'keyboard',
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -68,8 +68,8 @@ angular.module('mgcrea.ngStrap.typeahead', [
$typeahead.select = function (index) {
var value = scope.$matches[index].value;
controller.$setViewValue(value);
scope.$resetMatches();
controller.$render();
scope.$resetMatches();
if (parentScope)
parentScope.$digest();
// Emit event
@@ -1,8 +1,8 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"use strict";angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function i(t,n,i){var o={},r=angular.extend({},e,i);o=a(t,r);var l=i.scope,c=o.$scope;c.$resetMatches=function(){c.$matches=[],c.$activeIndex=0},c.$resetMatches(),c.$activate=function(e){c.$$postDigest(function(){o.activate(e)})},c.$select=function(e){c.$$postDigest(function(){o.select(e)})},c.$isVisible=function(){return o.$isVisible()},o.update=function(e){c.$matches=e,c.$activeIndex>=e.length&&(c.$activeIndex=0)},o.activate=function(e){c.$activeIndex=e},o.select=function(e){var t=c.$matches[e].value;n.$setViewValue(t),c.$resetMatches(),n.$render(),l&&l.$digest(),c.$emit("$typeahead.select",t,e)},o.$isVisible=function(){return r.minLength&&n?c.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!c.$matches.length},o.$getIndex=function(e){var t=c.$matches.length,n=t;if(t){for(n=t;n--&&c.$matches[n].value!==e;);if(!(0>n))return n}},o.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},o.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&c.$matches.length?o.select(c.$activeIndex):38===e.keyCode&&c.$activeIndex>0?c.$activeIndex--:40===e.keyCode&&c.$activeIndex<c.$matches.length-1?c.$activeIndex++:angular.isUndefined(c.$activeIndex)&&(c.$activeIndex=0),c.$digest())};var s=o.show;o.show=function(){s(),setTimeout(function(){o.$element.on("mousedown",o.$onMouseDown),r.keyboard&&t.on("keydown",o.$onKeyDown)})};var u=o.hide;return o.hide=function(){o.$element.off("mousedown",o.$onMouseDown),r.keyboard&&t.off("keydown",o.$onKeyDown),u()},o}angular.element(t.document.body);return i.defaults=e,i}]}).directive("bsTypeahead",["$window","$parse","$q","$typeahead","$parseOptions",function(e,t,n,a,i){var o=a.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,r){var l={scope:e};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","filter","limit","minLength"],function(e){angular.isDefined(n[e])&&(l[e]=n[e])});var c=l.filter||o.filter,s=l.limit||o.limit,u=n.ngOptions;c&&(u+=" | "+c+":$viewValue"),s&&(u+=" | limitTo:"+s);var $=i(u),d=a(t,r,l);e.$watch(n.ngModel,function(t){e.$modelValue=t,$.valuesFn(e,r).then(function(e){e.length>s&&(e=e.slice(0,s)),(1!==e.length||e[0].value!==t)&&(d.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=d.$getIndex(r.$modelValue),n=angular.isDefined(e)?d.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){d.destroy(),l=null,d=null})}}}]);
"use strict";angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function i(t,n,i){var o={},r=angular.extend({},e,i);o=a(t,r);var l=i.scope,c=o.$scope;c.$resetMatches=function(){c.$matches=[],c.$activeIndex=0},c.$resetMatches(),c.$activate=function(e){c.$$postDigest(function(){o.activate(e)})},c.$select=function(e){c.$$postDigest(function(){o.select(e)})},c.$isVisible=function(){return o.$isVisible()},o.update=function(e){c.$matches=e,c.$activeIndex>=e.length&&(c.$activeIndex=0)},o.activate=function(e){c.$activeIndex=e},o.select=function(e){var t=c.$matches[e].value;n.$setViewValue(t),n.$render(),c.$resetMatches(),l&&l.$digest(),c.$emit("$typeahead.select",t,e)},o.$isVisible=function(){return r.minLength&&n?c.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!c.$matches.length},o.$getIndex=function(e){var t=c.$matches.length,n=t;if(t){for(n=t;n--&&c.$matches[n].value!==e;);if(!(0>n))return n}},o.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},o.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&c.$matches.length?o.select(c.$activeIndex):38===e.keyCode&&c.$activeIndex>0?c.$activeIndex--:40===e.keyCode&&c.$activeIndex<c.$matches.length-1?c.$activeIndex++:angular.isUndefined(c.$activeIndex)&&(c.$activeIndex=0),c.$digest())};var s=o.show;o.show=function(){s(),setTimeout(function(){o.$element.on("mousedown",o.$onMouseDown),r.keyboard&&t.on("keydown",o.$onKeyDown)})};var u=o.hide;return o.hide=function(){o.$element.off("mousedown",o.$onMouseDown),r.keyboard&&t.off("keydown",o.$onKeyDown),u()},o}angular.element(t.document.body);return i.defaults=e,i}]}).directive("bsTypeahead",["$window","$parse","$q","$typeahead","$parseOptions",function(e,t,n,a,i){var o=a.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,r){var l={scope:e};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","filter","limit","minLength"],function(e){angular.isDefined(n[e])&&(l[e]=n[e])});var c=l.filter||o.filter,s=l.limit||o.limit,u=n.ngOptions;c&&(u+=" | "+c+":$viewValue"),s&&(u+=" | limitTo:"+s);var $=i(u),d=a(t,r,l);e.$watch(n.ngModel,function(t){e.$modelValue=t,$.valuesFn(e,r).then(function(e){e.length>s&&(e=e.slice(0,s)),(1!==e.length||e[0].value!==t)&&(d.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=d.$getIndex(r.$modelValue),n=angular.isDefined(e)?d.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){d.destroy(),l=null,d=null})}}}]);
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.0.2 - 2014-04-27
* @version v2.0.3 - 2014-05-30
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT