Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit bc1cb5c

Browse files
committed
chore(release): cut the 2.3.12 release
1 parent 8331170 commit bc1cb5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+316
-316
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-strap",
33
"description": "AngularStrap - AngularJS directives for Bootstrap",
4-
"version": "2.3.11",
4+
"version": "2.3.12",
55
"keywords": [
66
"angular",
77
"bootstrap"

dist/angular-strap.compat.js

Lines changed: 119 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* angular-strap
3-
* @version v2.3.11 - 2017-01-26
3+
* @version v2.3.12 - 2017-01-26
44
* @link http://mgcrea.github.io/angular-strap
55
* @author Olivier Louvignes <[email protected]> (https://github.com/mgcrea)
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -3277,6 +3277,124 @@
32773277
}
32783278
};
32793279
} ]);
3280+
angular.module('mgcrea.ngStrap.button', []).provider('$bsButton', function() {
3281+
var defaults = this.defaults = {
3282+
activeClass: 'active',
3283+
toggleEvent: 'click'
3284+
};
3285+
this.$get = function() {
3286+
return {
3287+
defaults: defaults
3288+
};
3289+
};
3290+
}).directive('bsCheckboxGroup', function() {
3291+
return {
3292+
restrict: 'A',
3293+
require: 'ngModel',
3294+
compile: function postLink(element, attr) {
3295+
element.attr('data-toggle', 'buttons');
3296+
element.removeAttr('ng-model');
3297+
var children = element[0].querySelectorAll('input[type="checkbox"]');
3298+
angular.forEach(children, function(child) {
3299+
var childEl = angular.element(child);
3300+
childEl.attr('bs-checkbox', '');
3301+
childEl.attr('ng-model', attr.ngModel + '.' + childEl.attr('value'));
3302+
});
3303+
}
3304+
};
3305+
}).directive('bsCheckbox', ["$bsButton", "$$rAF", function($button, $$rAF) {
3306+
var defaults = $button.defaults;
3307+
var constantValueRegExp = /^(true|false|\d+)$/;
3308+
return {
3309+
restrict: 'A',
3310+
require: 'ngModel',
3311+
link: function postLink(scope, element, attr, controller) {
3312+
var options = defaults;
3313+
var isInput = element[0].nodeName === 'INPUT';
3314+
var activeElement = isInput ? element.parent() : element;
3315+
var trueValue = angular.isDefined(attr.trueValue) ? attr.trueValue : true;
3316+
if (constantValueRegExp.test(attr.trueValue)) {
3317+
trueValue = scope.$eval(attr.trueValue);
3318+
}
3319+
var falseValue = angular.isDefined(attr.falseValue) ? attr.falseValue : false;
3320+
if (constantValueRegExp.test(attr.falseValue)) {
3321+
falseValue = scope.$eval(attr.falseValue);
3322+
}
3323+
var hasExoticValues = typeof trueValue !== 'boolean' || typeof falseValue !== 'boolean';
3324+
if (hasExoticValues) {
3325+
controller.$parsers.push(function(viewValue) {
3326+
return viewValue ? trueValue : falseValue;
3327+
});
3328+
controller.$formatters.push(function(modelValue) {
3329+
return angular.equals(modelValue, trueValue);
3330+
});
3331+
}
3332+
controller.$render = function() {
3333+
var isActive = !!controller.$viewValue;
3334+
$$rAF(function() {
3335+
if (isInput) element[0].checked = isActive;
3336+
activeElement.toggleClass(options.activeClass, isActive);
3337+
});
3338+
};
3339+
element.bind(options.toggleEvent, function() {
3340+
scope.$apply(function() {
3341+
if (!isInput) {
3342+
controller.$setViewValue(!activeElement.hasClass('active'));
3343+
}
3344+
controller.$render();
3345+
});
3346+
});
3347+
}
3348+
};
3349+
} ]).directive('bsRadioGroup', function() {
3350+
return {
3351+
restrict: 'A',
3352+
require: 'ngModel',
3353+
compile: function postLink(element, attr) {
3354+
element.attr('data-toggle', 'buttons');
3355+
element.removeAttr('ng-model');
3356+
var children = element[0].querySelectorAll('input[type="radio"]');
3357+
angular.forEach(children, function(child) {
3358+
angular.element(child).attr('bs-radio', '');
3359+
angular.element(child).attr('ng-model', attr.ngModel);
3360+
});
3361+
}
3362+
};
3363+
}).directive('bsRadio', ["$bsButton", "$$rAF", function($button, $$rAF) {
3364+
var defaults = $button.defaults;
3365+
var constantValueRegExp = /^(true|false|\d+)$/;
3366+
return {
3367+
restrict: 'A',
3368+
require: 'ngModel',
3369+
link: function postLink(scope, element, attr, controller) {
3370+
var options = defaults;
3371+
var isInput = element[0].nodeName === 'INPUT';
3372+
var activeElement = isInput ? element.parent() : element;
3373+
var value;
3374+
attr.$observe('value', function(v) {
3375+
if (typeof v !== 'boolean' && constantValueRegExp.test(v)) {
3376+
value = scope.$eval(v);
3377+
} else {
3378+
value = v;
3379+
}
3380+
controller.$render();
3381+
});
3382+
controller.$render = function() {
3383+
var isActive = angular.equals(controller.$viewValue, value);
3384+
$$rAF(function() {
3385+
if (isInput) element[0].checked = isActive;
3386+
activeElement.toggleClass(options.activeClass, isActive);
3387+
});
3388+
};
3389+
element.bind(options.toggleEvent, function() {
3390+
scope.$apply(function() {
3391+
controller.$setViewValue(value);
3392+
controller.$render();
3393+
});
3394+
});
3395+
}
3396+
};
3397+
} ]);
32803398
angular.module('mgcrea.ngStrap.datepicker', [ 'mgcrea.ngStrap.helpers.dateParser', 'mgcrea.ngStrap.helpers.dateFormatter', 'mgcrea.ngStrap.tooltip' ]).provider('$bsDatepicker', function() {
32813399
var defaults = this.defaults = {
32823400
animation: 'am-fade',
@@ -4127,124 +4245,6 @@
41274245
}
41284246
};
41294247
} ]);
4130-
angular.module('mgcrea.ngStrap.button', []).provider('$bsButton', function() {
4131-
var defaults = this.defaults = {
4132-
activeClass: 'active',
4133-
toggleEvent: 'click'
4134-
};
4135-
this.$get = function() {
4136-
return {
4137-
defaults: defaults
4138-
};
4139-
};
4140-
}).directive('bsCheckboxGroup', function() {
4141-
return {
4142-
restrict: 'A',
4143-
require: 'ngModel',
4144-
compile: function postLink(element, attr) {
4145-
element.attr('data-toggle', 'buttons');
4146-
element.removeAttr('ng-model');
4147-
var children = element[0].querySelectorAll('input[type="checkbox"]');
4148-
angular.forEach(children, function(child) {
4149-
var childEl = angular.element(child);
4150-
childEl.attr('bs-checkbox', '');
4151-
childEl.attr('ng-model', attr.ngModel + '.' + childEl.attr('value'));
4152-
});
4153-
}
4154-
};
4155-
}).directive('bsCheckbox', ["$bsButton", "$$rAF", function($button, $$rAF) {
4156-
var defaults = $button.defaults;
4157-
var constantValueRegExp = /^(true|false|\d+)$/;
4158-
return {
4159-
restrict: 'A',
4160-
require: 'ngModel',
4161-
link: function postLink(scope, element, attr, controller) {
4162-
var options = defaults;
4163-
var isInput = element[0].nodeName === 'INPUT';
4164-
var activeElement = isInput ? element.parent() : element;
4165-
var trueValue = angular.isDefined(attr.trueValue) ? attr.trueValue : true;
4166-
if (constantValueRegExp.test(attr.trueValue)) {
4167-
trueValue = scope.$eval(attr.trueValue);
4168-
}
4169-
var falseValue = angular.isDefined(attr.falseValue) ? attr.falseValue : false;
4170-
if (constantValueRegExp.test(attr.falseValue)) {
4171-
falseValue = scope.$eval(attr.falseValue);
4172-
}
4173-
var hasExoticValues = typeof trueValue !== 'boolean' || typeof falseValue !== 'boolean';
4174-
if (hasExoticValues) {
4175-
controller.$parsers.push(function(viewValue) {
4176-
return viewValue ? trueValue : falseValue;
4177-
});
4178-
controller.$formatters.push(function(modelValue) {
4179-
return angular.equals(modelValue, trueValue);
4180-
});
4181-
}
4182-
controller.$render = function() {
4183-
var isActive = !!controller.$viewValue;
4184-
$$rAF(function() {
4185-
if (isInput) element[0].checked = isActive;
4186-
activeElement.toggleClass(options.activeClass, isActive);
4187-
});
4188-
};
4189-
element.bind(options.toggleEvent, function() {
4190-
scope.$apply(function() {
4191-
if (!isInput) {
4192-
controller.$setViewValue(!activeElement.hasClass('active'));
4193-
}
4194-
controller.$render();
4195-
});
4196-
});
4197-
}
4198-
};
4199-
} ]).directive('bsRadioGroup', function() {
4200-
return {
4201-
restrict: 'A',
4202-
require: 'ngModel',
4203-
compile: function postLink(element, attr) {
4204-
element.attr('data-toggle', 'buttons');
4205-
element.removeAttr('ng-model');
4206-
var children = element[0].querySelectorAll('input[type="radio"]');
4207-
angular.forEach(children, function(child) {
4208-
angular.element(child).attr('bs-radio', '');
4209-
angular.element(child).attr('ng-model', attr.ngModel);
4210-
});
4211-
}
4212-
};
4213-
}).directive('bsRadio', ["$bsButton", "$$rAF", function($button, $$rAF) {
4214-
var defaults = $button.defaults;
4215-
var constantValueRegExp = /^(true|false|\d+)$/;
4216-
return {
4217-
restrict: 'A',
4218-
require: 'ngModel',
4219-
link: function postLink(scope, element, attr, controller) {
4220-
var options = defaults;
4221-
var isInput = element[0].nodeName === 'INPUT';
4222-
var activeElement = isInput ? element.parent() : element;
4223-
var value;
4224-
attr.$observe('value', function(v) {
4225-
if (typeof v !== 'boolean' && constantValueRegExp.test(v)) {
4226-
value = scope.$eval(v);
4227-
} else {
4228-
value = v;
4229-
}
4230-
controller.$render();
4231-
});
4232-
controller.$render = function() {
4233-
var isActive = angular.equals(controller.$viewValue, value);
4234-
$$rAF(function() {
4235-
if (isInput) element[0].checked = isActive;
4236-
activeElement.toggleClass(options.activeClass, isActive);
4237-
});
4238-
};
4239-
element.bind(options.toggleEvent, function() {
4240-
scope.$apply(function() {
4241-
controller.$setViewValue(value);
4242-
controller.$render();
4243-
});
4244-
});
4245-
}
4246-
};
4247-
} ]);
42484248
angular.module('mgcrea.ngStrap.alert', [ 'mgcrea.ngStrap.modal' ]).provider('$bsAlert', function() {
42494249
var defaults = this.defaults = {
42504250
animation: 'am-fade',

dist/angular-strap.compat.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)