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

Commit 3e737a2

Browse files
committed
feat(release): cut the v2.0.0-rc.2 release
1 parent 1e3945e commit 3e737a2

Some content is hidden

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

82 files changed

+185
-154
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-strap",
33
"description": "AngularStrap - AngularJS directives for Twitter Bootstrap",
4-
"version": "2.0.0-rc.1",
4+
"version": "2.0.0-rc.2",
55
"keywords": [
66
"angular",
77
"bootstrap"

dist/angular-strap.js

+29-30
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* angular-strap
3-
* @version v2.0.0-rc.1 - 2014-01-29
3+
* @version v2.0.0-rc.2 - 2014-01-29
44
* @link http://mgcrea.github.io/angular-strap
55
* @author [object Object]
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -159,24 +159,19 @@
159159
};
160160
}
161161
]);
162-
angular.module('mgcrea.ngStrap.alert', []).run([
163-
'$templateCache',
164-
function ($templateCache) {
165-
var template = '' + '<div class="alert" 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>';
166-
$templateCache.put('$alert', template);
167-
}
168-
]).provider('$alert', function () {
162+
angular.module('mgcrea.ngStrap.alert', []).provider('$alert', function () {
169163
var defaults = this.defaults = {
170-
animation: 'animation-fade',
164+
animation: 'am-fade',
171165
prefixClass: 'alert',
172166
placement: null,
173-
template: '$alert',
167+
template: 'alert/alert.tpl.html',
174168
container: false,
175169
element: null,
176170
backdrop: false,
177171
keyboard: true,
178172
show: true,
179-
duration: false
173+
duration: false,
174+
type: false
180175
};
181176
this.$get = [
182177
'$modal',
@@ -260,7 +255,7 @@
260255
]);
261256
angular.module('mgcrea.ngStrap.aside', ['mgcrea.ngStrap.modal']).provider('$aside', function () {
262257
var defaults = this.defaults = {
263-
animation: 'animation-fadeAndSlideRight',
258+
animation: 'am-fade-and-slide-right',
264259
prefixClass: 'aside',
265260
placement: 'right',
266261
template: 'aside/aside.tpl.html',
@@ -460,7 +455,7 @@
460455
'mgcrea.ngStrap.tooltip'
461456
]).provider('$datepicker', function () {
462457
var defaults = this.defaults = {
463-
animation: 'animation-fade',
458+
animation: 'am-fade',
464459
prefixClass: 'datepicker',
465460
placement: 'bottom-left',
466461
template: 'datepicker/datepicker.tpl.html',
@@ -521,14 +516,14 @@
521516
$datepicker.$build();
522517
}
523518
};
524-
$datepicker.select = function (date, keepMode) {
519+
$datepicker.select = function (date, keep) {
525520
if (!angular.isDate(date))
526521
date = new Date(date);
527522
controller.$dateValue.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
528-
if (!scope.$mode || keepMode) {
523+
if (!scope.$mode || keep) {
529524
controller.$setViewValue(controller.$dateValue);
530525
controller.$render();
531-
if (options.autoclose && !keepMode) {
526+
if (options.autoclose && !keep) {
532527
$datepicker.hide(true);
533528
}
534529
} else {
@@ -958,7 +953,7 @@
958953
});
959954
angular.module('mgcrea.ngStrap.dropdown', ['mgcrea.ngStrap.tooltip']).provider('$dropdown', function () {
960955
var defaults = this.defaults = {
961-
animation: 'animation-fade',
956+
animation: 'am-fade',
962957
prefixClass: 'dropdown',
963958
placement: 'bottom-left',
964959
template: 'dropdown/dropdown.tpl.html',
@@ -1375,7 +1370,7 @@
13751370
});
13761371
angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).provider('$modal', function () {
13771372
var defaults = this.defaults = {
1378-
animation: 'animation-fade',
1373+
animation: 'am-fade',
13791374
prefixClass: 'modal',
13801375
placement: 'top',
13811376
template: 'modal/modal.tpl.html',
@@ -1399,12 +1394,12 @@
13991394
'dimensions',
14001395
function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, $timeout, dimensions) {
14011396
var forEach = angular.forEach;
1402-
var jqLite = angular.element;
14031397
var trim = String.prototype.trim;
1404-
var bodyElement = jqLite($window.document.body);
1398+
var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout;
1399+
var bodyElement = angular.element($window.document.body);
14051400
var htmlReplaceRegExp = /ng-bind="/gi;
14061401
var findElement = function (query, element) {
1407-
return jqLite((element || document).querySelectorAll(query));
1402+
return angular.element((element || document).querySelectorAll(query));
14081403
};
14091404
function ModalFactory(config) {
14101405
var $modal = {};
@@ -1454,7 +1449,7 @@
14541449
});
14551450
}
14561451
var modalLinker, modalElement;
1457-
var backdropElement = jqLite('<div class="' + options.prefixClass + '-backdrop"/>');
1452+
var backdropElement = angular.element('<div class="' + options.prefixClass + '-backdrop"/>');
14581453
$modal.$promise.then(function (template) {
14591454
if (angular.isObject(template))
14601455
template = template.data;
@@ -1490,7 +1485,7 @@
14901485
modalElement.css({ display: 'block' }).addClass(options.placement);
14911486
if (options.animation) {
14921487
if (options.backdrop) {
1493-
backdropElement.addClass('animation-fade');
1488+
backdropElement.addClass('am-fade');
14941489
}
14951490
modalElement.addClass(options.animation);
14961491
}
@@ -1502,7 +1497,10 @@
15021497
});
15031498
scope.$isShown = true;
15041499
scope.$$phase || scope.$digest();
1505-
$modal.focus();
1500+
var el = modalElement[0];
1501+
requestAnimationFrame(function () {
1502+
el.focus();
1503+
});
15061504
bodyElement.addClass(options.prefixClass + '-open');
15071505
if (options.backdrop) {
15081506
modalElement.on('click', hideOnBackdropClick);
@@ -1646,7 +1644,7 @@
16461644
]);
16471645
angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$popover', function () {
16481646
var defaults = this.defaults = {
1649-
animation: 'animation-fade',
1647+
animation: 'am-fade',
16501648
placement: 'right',
16511649
template: 'popover/popover.tpl.html',
16521650
contentTemplate: false,
@@ -1933,7 +1931,7 @@
19331931
'mgcrea.ngStrap.helpers.parseOptions'
19341932
]).provider('$select', function () {
19351933
var defaults = this.defaults = {
1936-
animation: 'animation-fade',
1934+
animation: 'am-fade',
19371935
prefixClass: 'select',
19381936
placement: 'bottom-left',
19391937
template: 'select/select.tpl.html',
@@ -2187,7 +2185,7 @@
21872185
}
21882186
]).provider('$tab', function () {
21892187
var defaults = this.defaults = {
2190-
animation: 'animation-fade',
2188+
animation: 'am-fade',
21912189
template: 'tab/tab.tpl.html'
21922190
};
21932191
this.$get = function () {
@@ -2240,7 +2238,7 @@
22402238
'mgcrea.ngStrap.tooltip'
22412239
]).provider('$timepicker', function () {
22422240
var defaults = this.defaults = {
2243-
animation: 'animation-fade',
2241+
animation: 'am-fade',
22442242
prefixClass: 'timepicker',
22452243
placement: 'bottom-left',
22462244
template: 'timepicker/timepicker.tpl.html',
@@ -2604,7 +2602,7 @@
26042602
]);
26052603
angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).provider('$tooltip', function () {
26062604
var defaults = this.defaults = {
2607-
animation: 'animation-fade',
2605+
animation: 'am-fade',
26082606
prefixClass: 'tooltip',
26092607
container: false,
26102608
placement: 'top',
@@ -2631,6 +2629,7 @@
26312629
function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, $timeout, dimensions) {
26322630
var trim = String.prototype.trim;
26332631
var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout;
2632+
var isTouch = 'createTouch' in $window.document;
26342633
var htmlReplaceRegExp = /ng-bind="/gi;
26352634
var findElement = function (query, element) {
26362635
return angular.element((element || document).querySelectorAll(query));
@@ -2937,7 +2936,7 @@
29372936
'mgcrea.ngStrap.helpers.parseOptions'
29382937
]).provider('$typeahead', function () {
29392938
var defaults = this.defaults = {
2940-
animation: 'animation-fade',
2939+
animation: 'am-fade',
29412940
prefixClass: 'typeahead',
29422941
placement: 'bottom-left',
29432942
template: 'typeahead/typeahead.tpl.html',

dist/angular-strap.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-strap.min.map

+1-1
Large diffs are not rendered by default.

dist/angular-strap.tpl.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
/**
22
* angular-strap
3-
* @version v2.0.0-rc.1 - 2014-01-29
3+
* @version v2.0.0-rc.2 - 2014-01-29
44
* @link http://mgcrea.github.io/angular-strap
55
* @author [object Object]
66
* @license MIT License, http://www.opensource.org/licenses/MIT
77
*/
88
(function(window, document, undefined) {
99
'use strict';
10+
// Source: dist/modules/alert.tpl.js
11+
angular.module('mgcrea.ngStrap.alert').run(['$templateCache', function($templateCache) {
12+
$templateCache.put('alert/alert.tpl.html',
13+
"<div class=\"alert\" 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>"
14+
);
15+
16+
}]);
17+
1018
// Source: dist/modules/aside.tpl.js
1119
angular.module('mgcrea.ngStrap.aside').run(['$templateCache', function($templateCache) {
1220
$templateCache.put('aside/aside.tpl.html',
@@ -18,7 +26,7 @@ $templateCache.put('aside/aside.tpl.html',
1826
// Source: dist/modules/datepicker.tpl.js
1927
angular.module('mgcrea.ngStrap.datepicker').run(['$templateCache', function($templateCache) {
2028
$templateCache.put('datepicker/datepicker.tpl.html',
21-
"<div class=\"dropdown-menu datepicker\" 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=\"5\"><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=\"labels\" ng-bind-html=\"labels\"></tr></thead><tbody><tr ng-repeat=\"(i, row) in rows\"><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>"
29+
"<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=\"labels\" 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>"
2230
);
2331

2432
}]);

0 commit comments

Comments
 (0)