angular-ui-bootstrap-rails 0.6.0.0 → 0.7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/angular-ui-bootstrap-rails/version.rb +1 -1
- data/vendor/assets/javascripts/angular-ui-bootstrap-tpls.js +272 -226
- data/vendor/assets/javascripts/angular-ui-bootstrap.js +173 -129
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34c7bc88e97e955666817a1ab18f05ad64670a74
|
4
|
+
data.tar.gz: 6af26f8486ce531de5c73d972586dcb8136ad433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dd92ee6a1bb07bf530e3eea1b6f4f0c50efba5646aa11241d01df08f99556c22fb50766be54c9df9cef255d88a7f64b5e9f8442ee421940b4d3d3f3b866af30
|
7
|
+
data.tar.gz: 3e206e855ba16b9e36d4089141e238fd9ad4c49e67cd0c7dce09bf661b59dab123dec4cef40753dbfd31173e5136b01b9eec26340c9cc945eda85eb3b23d8ba8
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# angular-ui-bootstrap-rails
|
2
2
|
|
3
|
-
angular-ui-bootstrap-rails wraps the [Angular.js UI Bootstrap](http://angular-ui.github.com/bootstrap) library for use in Rails 3.1 and above. Assets will minify automatically during production.
|
3
|
+
angular-ui-bootstrap-rails wraps the [Angular.js UI Bootstrap: branch bootstrap3](http://angular-ui.github.com/bootstrap) library for use in Rails 3.1 and above. Assets will minify automatically during production.
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
@@ -15,6 +15,11 @@ Add the following directive to your Javascript manifest file (application.js):
|
|
15
15
|
If you would like to use the default bootstrap templates, use the following directive instead
|
16
16
|
|
17
17
|
//= require angular-ui-bootstrap-tpls
|
18
|
+
|
19
|
+
|
20
|
+
You may need to add 'ui.bootstrap' into your app declaration for example
|
21
|
+
|
22
|
+
app = angular.module('MyApp', ["ui.bootstrap"])
|
18
23
|
|
19
24
|
Gem based on Angularjs-rails(https://github.com/hiravgandhi/angularjs-rails) by Hirav Gandhi
|
20
25
|
|
@@ -107,23 +107,7 @@ angular.module('ui.bootstrap.collapse',['ui.bootstrap.transition'])
|
|
107
107
|
|
108
108
|
var isCollapsed;
|
109
109
|
var initialAnimSkip = true;
|
110
|
-
|
111
|
-
//The listener is called when scollHeight changes
|
112
|
-
//It actually does on 2 scenarios:
|
113
|
-
// 1. Parent is set to display none
|
114
|
-
// 2. angular bindings inside are resolved
|
115
|
-
//When we have a change of scrollHeight we are setting again the correct height if the group is opened
|
116
|
-
if (element[0].scrollHeight !== 0) {
|
117
|
-
if (!isCollapsed) {
|
118
|
-
if (initialAnimSkip) {
|
119
|
-
fixUpHeight(scope, element, element[0].scrollHeight + 'px');
|
120
|
-
} else {
|
121
|
-
fixUpHeight(scope, element, 'auto');
|
122
|
-
}
|
123
|
-
}
|
124
|
-
}
|
125
|
-
});
|
126
|
-
|
110
|
+
|
127
111
|
scope.$watch(attrs.collapse, function(value) {
|
128
112
|
if (value) {
|
129
113
|
collapse();
|
@@ -151,6 +135,7 @@ angular.module('ui.bootstrap.collapse',['ui.bootstrap.transition'])
|
|
151
135
|
initialAnimSkip = false;
|
152
136
|
if ( !isCollapsed ) {
|
153
137
|
fixUpHeight(scope, element, 'auto');
|
138
|
+
element.addClass('in');
|
154
139
|
}
|
155
140
|
} else {
|
156
141
|
doTransition({ height : element[0].scrollHeight + 'px' })
|
@@ -159,6 +144,7 @@ angular.module('ui.bootstrap.collapse',['ui.bootstrap.transition'])
|
|
159
144
|
// the group while the animation was still running
|
160
145
|
if ( !isCollapsed ) {
|
161
146
|
fixUpHeight(scope, element, 'auto');
|
147
|
+
element.addClass('in');
|
162
148
|
}
|
163
149
|
});
|
164
150
|
}
|
@@ -167,6 +153,7 @@ angular.module('ui.bootstrap.collapse',['ui.bootstrap.transition'])
|
|
167
153
|
|
168
154
|
var collapse = function() {
|
169
155
|
isCollapsed = true;
|
156
|
+
element.removeClass('in');
|
170
157
|
if (initialAnimSkip) {
|
171
158
|
initialAnimSkip = false;
|
172
159
|
fixUpHeight(scope, element, 0);
|
@@ -186,10 +173,13 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
|
|
186
173
|
})
|
187
174
|
|
188
175
|
.controller('AccordionController', ['$scope', '$attrs', 'accordionConfig', function ($scope, $attrs, accordionConfig) {
|
189
|
-
|
176
|
+
|
190
177
|
// This array keeps track of the accordion groups
|
191
178
|
this.groups = [];
|
192
179
|
|
180
|
+
// Keep reference to user's scope to properly assign `is-open`
|
181
|
+
this.scope = $scope;
|
182
|
+
|
193
183
|
// Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
|
194
184
|
this.closeOthers = function(openGroup) {
|
195
185
|
var closeOthers = angular.isDefined($attrs.closeOthers) ? $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers;
|
@@ -259,12 +249,9 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
|
|
259
249
|
getIsOpen = $parse(attrs.isOpen);
|
260
250
|
setIsOpen = getIsOpen.assign;
|
261
251
|
|
262
|
-
scope.$watch(
|
263
|
-
|
264
|
-
|
265
|
-
);
|
266
|
-
|
267
|
-
scope.isOpen = getIsOpen ? getIsOpen(scope.$parent) : false;
|
252
|
+
accordionCtrl.scope.$watch(getIsOpen, function(value) {
|
253
|
+
scope.isOpen = !!value;
|
254
|
+
});
|
268
255
|
}
|
269
256
|
|
270
257
|
scope.$watch('isOpen', function(value) {
|
@@ -272,7 +259,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
|
|
272
259
|
accordionCtrl.closeOthers(scope);
|
273
260
|
}
|
274
261
|
if ( setIsOpen ) {
|
275
|
-
setIsOpen(scope
|
262
|
+
setIsOpen(accordionCtrl.scope, value);
|
276
263
|
}
|
277
264
|
});
|
278
265
|
}
|
@@ -331,7 +318,7 @@ angular.module("ui.bootstrap.alert", []).directive('alert', function () {
|
|
331
318
|
type: '=',
|
332
319
|
close: '&'
|
333
320
|
},
|
334
|
-
link: function(scope, iElement, iAttrs
|
321
|
+
link: function(scope, iElement, iAttrs) {
|
335
322
|
scope.closeable = "close" in iAttrs;
|
336
323
|
}
|
337
324
|
};
|
@@ -349,19 +336,18 @@ angular.module('ui.bootstrap.bindHtml', [])
|
|
349
336
|
});
|
350
337
|
angular.module('ui.bootstrap.buttons', [])
|
351
338
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
339
|
+
.constant('buttonConfig', {
|
340
|
+
activeClass: 'active',
|
341
|
+
toggleEvent: 'click'
|
342
|
+
})
|
356
343
|
|
357
|
-
|
344
|
+
.directive('btnRadio', ['buttonConfig', function (buttonConfig) {
|
358
345
|
var activeClass = buttonConfig.activeClass || 'active';
|
359
346
|
var toggleEvent = buttonConfig.toggleEvent || 'click';
|
360
347
|
|
361
348
|
return {
|
362
|
-
|
363
|
-
|
364
|
-
link:function (scope, element, attrs, ngModelCtrl) {
|
349
|
+
require: 'ngModel',
|
350
|
+
link: function (scope, element, attrs, ngModelCtrl) {
|
365
351
|
|
366
352
|
//model -> UI
|
367
353
|
ngModelCtrl.$render = function () {
|
@@ -381,14 +367,13 @@ angular.module('ui.bootstrap.buttons', [])
|
|
381
367
|
};
|
382
368
|
}])
|
383
369
|
|
384
|
-
|
385
|
-
|
370
|
+
.directive('btnCheckbox', ['buttonConfig', function (buttonConfig) {
|
386
371
|
var activeClass = buttonConfig.activeClass || 'active';
|
387
372
|
var toggleEvent = buttonConfig.toggleEvent || 'click';
|
388
373
|
|
389
374
|
return {
|
390
|
-
require:'ngModel',
|
391
|
-
link:function (scope, element, attrs, ngModelCtrl) {
|
375
|
+
require: 'ngModel',
|
376
|
+
link: function (scope, element, attrs, ngModelCtrl) {
|
392
377
|
|
393
378
|
function getTrueValue() {
|
394
379
|
var trueValue = scope.$eval(attrs.btnCheckboxTrue);
|
@@ -415,6 +400,7 @@ angular.module('ui.bootstrap.buttons', [])
|
|
415
400
|
}
|
416
401
|
};
|
417
402
|
}]);
|
403
|
+
|
418
404
|
/**
|
419
405
|
* @ngdoc overview
|
420
406
|
* @name ui.bootstrap.carousel
|
@@ -803,9 +789,10 @@ angular.module('ui.bootstrap.position', [])
|
|
803
789
|
offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;
|
804
790
|
}
|
805
791
|
|
792
|
+
var boundingClientRect = element[0].getBoundingClientRect();
|
806
793
|
return {
|
807
|
-
width: element.prop('offsetWidth'),
|
808
|
-
height: element.prop('offsetHeight'),
|
794
|
+
width: boundingClientRect.width || element.prop('offsetWidth'),
|
795
|
+
height: boundingClientRect.height || element.prop('offsetHeight'),
|
809
796
|
top: elBCR.top - offsetParentBCR.top,
|
810
797
|
left: elBCR.left - offsetParentBCR.left
|
811
798
|
};
|
@@ -818,8 +805,8 @@ angular.module('ui.bootstrap.position', [])
|
|
818
805
|
offset: function (element) {
|
819
806
|
var boundingClientRect = element[0].getBoundingClientRect();
|
820
807
|
return {
|
821
|
-
width: element.prop('offsetWidth'),
|
822
|
-
height: element.prop('offsetHeight'),
|
808
|
+
width: boundingClientRect.width || element.prop('offsetWidth'),
|
809
|
+
height: boundingClientRect.height || element.prop('offsetHeight'),
|
823
810
|
top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),
|
824
811
|
left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft)
|
825
812
|
};
|
@@ -1082,25 +1069,49 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.position'])
|
|
1082
1069
|
|
1083
1070
|
.constant('datepickerPopupConfig', {
|
1084
1071
|
dateFormat: 'yyyy-MM-dd',
|
1085
|
-
|
1072
|
+
currentText: 'Today',
|
1073
|
+
toggleWeeksText: 'Weeks',
|
1074
|
+
clearText: 'Clear',
|
1075
|
+
closeText: 'Done',
|
1076
|
+
closeOnDateSelection: true,
|
1077
|
+
appendToBody: false
|
1086
1078
|
})
|
1087
1079
|
|
1088
|
-
.directive('datepickerPopup', ['$compile', '$parse', '$document', '$position', 'dateFilter', 'datepickerPopupConfig',
|
1089
|
-
function ($compile, $parse, $document, $position, dateFilter, datepickerPopupConfig) {
|
1080
|
+
.directive('datepickerPopup', ['$compile', '$parse', '$document', '$position', 'dateFilter', 'datepickerPopupConfig', 'datepickerConfig',
|
1081
|
+
function ($compile, $parse, $document, $position, dateFilter, datepickerPopupConfig, datepickerConfig) {
|
1090
1082
|
return {
|
1091
1083
|
restrict: 'EA',
|
1092
1084
|
require: 'ngModel',
|
1093
1085
|
link: function(originalScope, element, attrs, ngModel) {
|
1086
|
+
var dateFormat;
|
1087
|
+
attrs.$observe('datepickerPopup', function(value) {
|
1088
|
+
dateFormat = value || datepickerPopupConfig.dateFormat;
|
1089
|
+
ngModel.$render();
|
1090
|
+
});
|
1094
1091
|
|
1095
|
-
var closeOnDateSelection = angular.isDefined(attrs.closeOnDateSelection) ?
|
1096
|
-
var
|
1092
|
+
var closeOnDateSelection = angular.isDefined(attrs.closeOnDateSelection) ? originalScope.$eval(attrs.closeOnDateSelection) : datepickerPopupConfig.closeOnDateSelection;
|
1093
|
+
var appendToBody = angular.isDefined(attrs.datepickerAppendToBody) ? originalScope.$eval(attrs.datepickerAppendToBody) : datepickerPopupConfig.appendToBody;
|
1097
1094
|
|
1098
|
-
|
1095
|
+
// create a child scope for the datepicker directive so we are not polluting original scope
|
1099
1096
|
var scope = originalScope.$new();
|
1097
|
+
|
1100
1098
|
originalScope.$on('$destroy', function() {
|
1101
1099
|
scope.$destroy();
|
1102
1100
|
});
|
1103
1101
|
|
1102
|
+
attrs.$observe('currentText', function(text) {
|
1103
|
+
scope.currentText = angular.isDefined(text) ? text : datepickerPopupConfig.currentText;
|
1104
|
+
});
|
1105
|
+
attrs.$observe('toggleWeeksText', function(text) {
|
1106
|
+
scope.toggleWeeksText = angular.isDefined(text) ? text : datepickerPopupConfig.toggleWeeksText;
|
1107
|
+
});
|
1108
|
+
attrs.$observe('clearText', function(text) {
|
1109
|
+
scope.clearText = angular.isDefined(text) ? text : datepickerPopupConfig.clearText;
|
1110
|
+
});
|
1111
|
+
attrs.$observe('closeText', function(text) {
|
1112
|
+
scope.closeText = angular.isDefined(text) ? text : datepickerPopupConfig.closeText;
|
1113
|
+
});
|
1114
|
+
|
1104
1115
|
var getIsOpen, setIsOpen;
|
1105
1116
|
if ( attrs.isOpen ) {
|
1106
1117
|
getIsOpen = $parse(attrs.isOpen);
|
@@ -1135,12 +1146,12 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
|
|
1135
1146
|
};
|
1136
1147
|
|
1137
1148
|
// popup element used to display calendar
|
1138
|
-
var popupEl = angular.element('<datepicker-popup-wrap><datepicker></
|
1149
|
+
var popupEl = angular.element('<div datepicker-popup-wrap><div datepicker></div></div>');
|
1139
1150
|
popupEl.attr({
|
1140
1151
|
'ng-model': 'date',
|
1141
1152
|
'ng-change': 'dateSelection()'
|
1142
1153
|
});
|
1143
|
-
var datepickerEl = popupEl.
|
1154
|
+
var datepickerEl = angular.element(popupEl.children()[0]);
|
1144
1155
|
if (attrs.datepickerOptions) {
|
1145
1156
|
datepickerEl.attr(angular.extend({}, originalScope.$eval(attrs.datepickerOptions)));
|
1146
1157
|
}
|
@@ -1211,7 +1222,7 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
|
|
1211
1222
|
if (attrs.showWeeks) {
|
1212
1223
|
addWatchableAttribute(attrs.showWeeks, 'showWeeks', 'show-weeks');
|
1213
1224
|
} else {
|
1214
|
-
scope.showWeeks =
|
1225
|
+
scope.showWeeks = datepickerConfig.showWeeks;
|
1215
1226
|
datepickerEl.attr('show-weeks', 'showWeeks');
|
1216
1227
|
}
|
1217
1228
|
if (attrs.dateDisabled) {
|
@@ -1219,7 +1230,7 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
|
|
1219
1230
|
}
|
1220
1231
|
|
1221
1232
|
function updatePosition() {
|
1222
|
-
scope.position = $position.position(element);
|
1233
|
+
scope.position = appendToBody ? $position.offset(element) : $position.position(element);
|
1223
1234
|
scope.position.top = scope.position.top + element.prop('offsetHeight');
|
1224
1235
|
}
|
1225
1236
|
|
@@ -1255,14 +1266,19 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
|
|
1255
1266
|
$setModelValue(originalScope, null);
|
1256
1267
|
};
|
1257
1268
|
|
1258
|
-
|
1269
|
+
var $popup = $compile(popupEl)(scope);
|
1270
|
+
if ( appendToBody ) {
|
1271
|
+
$document.find('body').append($popup);
|
1272
|
+
} else {
|
1273
|
+
element.after($popup);
|
1274
|
+
}
|
1259
1275
|
}
|
1260
1276
|
};
|
1261
1277
|
}])
|
1262
1278
|
|
1263
|
-
.directive('datepickerPopupWrap',
|
1279
|
+
.directive('datepickerPopupWrap', function() {
|
1264
1280
|
return {
|
1265
|
-
restrict:'
|
1281
|
+
restrict:'EA',
|
1266
1282
|
replace: true,
|
1267
1283
|
transclude: true,
|
1268
1284
|
templateUrl: 'template/datepicker/popup.html',
|
@@ -1273,7 +1289,7 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
|
|
1273
1289
|
});
|
1274
1290
|
}
|
1275
1291
|
};
|
1276
|
-
}
|
1292
|
+
});
|
1277
1293
|
|
1278
1294
|
/*
|
1279
1295
|
* dropdownToggle - Provides dropdown menu functionality in place of bootstrap js
|
@@ -1308,7 +1324,7 @@ angular.module('ui.bootstrap.dropdownToggle', []).directive('dropdownToggle', ['
|
|
1308
1324
|
closeMenu();
|
1309
1325
|
}
|
1310
1326
|
|
1311
|
-
if (!elementWasOpen) {
|
1327
|
+
if (!elementWasOpen && !element.hasClass('disabled') && !element.prop('disabled')) {
|
1312
1328
|
element.parent().addClass('open');
|
1313
1329
|
openElement = element;
|
1314
1330
|
closeMenu = function (event) {
|
@@ -1327,6 +1343,7 @@ angular.module('ui.bootstrap.dropdownToggle', []).directive('dropdownToggle', ['
|
|
1327
1343
|
}
|
1328
1344
|
};
|
1329
1345
|
}]);
|
1346
|
+
|
1330
1347
|
angular.module('ui.bootstrap.modal', [])
|
1331
1348
|
|
1332
1349
|
/**
|
@@ -1386,31 +1403,21 @@ angular.module('ui.bootstrap.modal', [])
|
|
1386
1403
|
/**
|
1387
1404
|
* A helper directive for the $modal service. It creates a backdrop element.
|
1388
1405
|
*/
|
1389
|
-
.directive('modalBackdrop', ['$
|
1406
|
+
.directive('modalBackdrop', ['$timeout', function ($timeout) {
|
1390
1407
|
return {
|
1391
1408
|
restrict: 'EA',
|
1392
1409
|
replace: true,
|
1393
1410
|
templateUrl: 'template/modal/backdrop.html',
|
1394
1411
|
link: function (scope, element, attrs) {
|
1395
|
-
|
1396
1412
|
//trigger CSS transitions
|
1397
1413
|
$timeout(function () {
|
1398
1414
|
scope.animate = true;
|
1399
1415
|
});
|
1400
|
-
|
1401
|
-
scope.close = function (evt) {
|
1402
|
-
var modal = $modalStack.getTop();
|
1403
|
-
if (modal && modal.value.backdrop && modal.value.backdrop != 'static') {
|
1404
|
-
evt.preventDefault();
|
1405
|
-
evt.stopPropagation();
|
1406
|
-
$modalStack.dismiss(modal.key, 'backdrop click');
|
1407
|
-
}
|
1408
|
-
};
|
1409
1416
|
}
|
1410
1417
|
};
|
1411
1418
|
}])
|
1412
1419
|
|
1413
|
-
.directive('modalWindow', ['$timeout', function ($timeout) {
|
1420
|
+
.directive('modalWindow', ['$modalStack', '$timeout', function ($modalStack, $timeout) {
|
1414
1421
|
return {
|
1415
1422
|
restrict: 'EA',
|
1416
1423
|
scope: {
|
@@ -1426,6 +1433,15 @@ angular.module('ui.bootstrap.modal', [])
|
|
1426
1433
|
$timeout(function () {
|
1427
1434
|
scope.animate = true;
|
1428
1435
|
});
|
1436
|
+
|
1437
|
+
scope.close = function (evt) {
|
1438
|
+
var modal = $modalStack.getTop();
|
1439
|
+
if (modal && modal.value.backdrop && modal.value.backdrop != 'static' && (evt.target === evt.currentTarget)) {
|
1440
|
+
evt.preventDefault();
|
1441
|
+
evt.stopPropagation();
|
1442
|
+
$modalStack.dismiss(modal.key, 'backdrop click');
|
1443
|
+
}
|
1444
|
+
};
|
1429
1445
|
}
|
1430
1446
|
};
|
1431
1447
|
}])
|
@@ -1450,6 +1466,10 @@ angular.module('ui.bootstrap.modal', [])
|
|
1450
1466
|
return topBackdropIndex;
|
1451
1467
|
}
|
1452
1468
|
|
1469
|
+
$rootScope.$watch(openedWindows.length, function(noOfModals){
|
1470
|
+
body.toggleClass('modal-open', openedWindows.length() > 0);
|
1471
|
+
});
|
1472
|
+
|
1453
1473
|
$rootScope.$watch(backdropIndex, function(newBackdropIndex){
|
1454
1474
|
backdropScope.index = newBackdropIndex;
|
1455
1475
|
});
|
@@ -1465,7 +1485,7 @@ angular.module('ui.bootstrap.modal', [])
|
|
1465
1485
|
modalWindow.modalDomEl.remove();
|
1466
1486
|
|
1467
1487
|
//remove backdrop if no longer needed
|
1468
|
-
if (backdropIndex() == -1) {
|
1488
|
+
if (backdropDomEl && backdropIndex() == -1) {
|
1469
1489
|
backdropDomEl.remove();
|
1470
1490
|
backdropDomEl = undefined;
|
1471
1491
|
}
|
@@ -1513,9 +1533,9 @@ angular.module('ui.bootstrap.modal', [])
|
|
1513
1533
|
};
|
1514
1534
|
|
1515
1535
|
$modalStack.close = function (modalInstance, result) {
|
1516
|
-
var
|
1517
|
-
if (
|
1518
|
-
|
1536
|
+
var modalWindow = openedWindows.get(modalInstance).value;
|
1537
|
+
if (modalWindow) {
|
1538
|
+
modalWindow.deferred.resolve(result);
|
1519
1539
|
removeModalWindow(modalInstance);
|
1520
1540
|
}
|
1521
1541
|
};
|
@@ -1642,10 +1662,12 @@ angular.module('ui.bootstrap.modal', [])
|
|
1642
1662
|
|
1643
1663
|
return $modalProvider;
|
1644
1664
|
});
|
1665
|
+
|
1645
1666
|
angular.module('ui.bootstrap.pagination', [])
|
1646
1667
|
|
1647
1668
|
.controller('PaginationController', ['$scope', '$attrs', '$parse', '$interpolate', function ($scope, $attrs, $parse, $interpolate) {
|
1648
|
-
var self = this
|
1669
|
+
var self = this,
|
1670
|
+
setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
|
1649
1671
|
|
1650
1672
|
this.init = function(defaultItemsPerPage) {
|
1651
1673
|
if ($attrs.itemsPerPage) {
|
@@ -1670,7 +1692,8 @@ angular.module('ui.bootstrap.pagination', [])
|
|
1670
1692
|
};
|
1671
1693
|
|
1672
1694
|
this.calculateTotalPages = function() {
|
1673
|
-
|
1695
|
+
var totalPages = this.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / this.itemsPerPage);
|
1696
|
+
return Math.max(totalPages || 0, 1);
|
1674
1697
|
};
|
1675
1698
|
|
1676
1699
|
this.getAttributeValue = function(attribute, defaultValue, interpolate) {
|
@@ -1679,7 +1702,9 @@ angular.module('ui.bootstrap.pagination', [])
|
|
1679
1702
|
|
1680
1703
|
this.render = function() {
|
1681
1704
|
this.page = parseInt($scope.page, 10) || 1;
|
1682
|
-
|
1705
|
+
if (this.page > 0 && this.page <= $scope.totalPages) {
|
1706
|
+
$scope.pages = this.getPages(this.page, $scope.totalPages);
|
1707
|
+
}
|
1683
1708
|
};
|
1684
1709
|
|
1685
1710
|
$scope.selectPage = function(page) {
|
@@ -1689,14 +1714,16 @@ angular.module('ui.bootstrap.pagination', [])
|
|
1689
1714
|
}
|
1690
1715
|
};
|
1691
1716
|
|
1717
|
+
$scope.$watch('page', function() {
|
1718
|
+
self.render();
|
1719
|
+
});
|
1720
|
+
|
1692
1721
|
$scope.$watch('totalItems', function() {
|
1693
1722
|
$scope.totalPages = self.calculateTotalPages();
|
1694
1723
|
});
|
1695
1724
|
|
1696
1725
|
$scope.$watch('totalPages', function(value) {
|
1697
|
-
|
1698
|
-
$scope.numPages = value; // Readonly variable
|
1699
|
-
}
|
1726
|
+
setNumPages($scope.$parent, value); // Readonly variable
|
1700
1727
|
|
1701
1728
|
if ( self.page > value ) {
|
1702
1729
|
$scope.selectPage(value);
|
@@ -1704,10 +1731,6 @@ angular.module('ui.bootstrap.pagination', [])
|
|
1704
1731
|
self.render();
|
1705
1732
|
}
|
1706
1733
|
});
|
1707
|
-
|
1708
|
-
$scope.$watch('page', function() {
|
1709
|
-
self.render();
|
1710
|
-
});
|
1711
1734
|
}])
|
1712
1735
|
|
1713
1736
|
.constant('paginationConfig', {
|
@@ -1727,8 +1750,7 @@ angular.module('ui.bootstrap.pagination', [])
|
|
1727
1750
|
scope: {
|
1728
1751
|
page: '=',
|
1729
1752
|
totalItems: '=',
|
1730
|
-
onSelectPage:' &'
|
1731
|
-
numPages: '='
|
1753
|
+
onSelectPage:' &'
|
1732
1754
|
},
|
1733
1755
|
controller: 'PaginationController',
|
1734
1756
|
templateUrl: 'template/pagination/pagination.html',
|
@@ -1848,8 +1870,7 @@ angular.module('ui.bootstrap.pagination', [])
|
|
1848
1870
|
scope: {
|
1849
1871
|
page: '=',
|
1850
1872
|
totalItems: '=',
|
1851
|
-
onSelectPage:' &'
|
1852
|
-
numPages: '='
|
1873
|
+
onSelectPage:' &'
|
1853
1874
|
},
|
1854
1875
|
controller: 'PaginationController',
|
1855
1876
|
templateUrl: 'template/pagination/pager.html',
|
@@ -1922,9 +1943,9 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
1922
1943
|
* $tooltipProvider.options( { placement: 'left' } );
|
1923
1944
|
* });
|
1924
1945
|
*/
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1946
|
+
this.options = function( value ) {
|
1947
|
+
angular.extend( globalOptions, value );
|
1948
|
+
};
|
1928
1949
|
|
1929
1950
|
/**
|
1930
1951
|
* This allows you to extend the set of trigger mappings available. E.g.:
|
@@ -2002,6 +2023,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2002
2023
|
var appendToBody = angular.isDefined( options.appendToBody ) ? options.appendToBody : false;
|
2003
2024
|
var triggers = getTriggers( undefined );
|
2004
2025
|
var hasRegisteredTriggers = false;
|
2026
|
+
var hasEnableExp = angular.isDefined(attrs[prefix+'Enable']);
|
2005
2027
|
|
2006
2028
|
// By default, the tooltip is not open.
|
2007
2029
|
// TODO add ability to start tooltip opened
|
@@ -2017,6 +2039,9 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2017
2039
|
|
2018
2040
|
// Show the tooltip with delay if specified, otherwise show it immediately
|
2019
2041
|
function showTooltipBind() {
|
2042
|
+
if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {
|
2043
|
+
return;
|
2044
|
+
}
|
2020
2045
|
if ( scope.tt_popupDelay ) {
|
2021
2046
|
popupTimeout = $timeout( show, scope.tt_popupDelay );
|
2022
2047
|
} else {
|
@@ -2128,7 +2153,13 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
|
|
2128
2153
|
* Observe the relevant attributes.
|
2129
2154
|
*/
|
2130
2155
|
attrs.$observe( type, function ( val ) {
|
2131
|
-
|
2156
|
+
if (val) {
|
2157
|
+
scope.tt_content = val;
|
2158
|
+
} else {
|
2159
|
+
if ( scope.tt_isOpen ) {
|
2160
|
+
hide();
|
2161
|
+
}
|
2162
|
+
}
|
2132
2163
|
});
|
2133
2164
|
|
2134
2165
|
attrs.$observe( prefix+'Title', function ( val ) {
|
@@ -2361,29 +2392,20 @@ angular.module('ui.bootstrap.rating', [])
|
|
2361
2392
|
this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
|
2362
2393
|
this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
|
2363
2394
|
|
2364
|
-
this.
|
2365
|
-
var
|
2395
|
+
this.createRateObjects = function(states) {
|
2396
|
+
var defaultOptions = {
|
2366
2397
|
stateOn: this.stateOn,
|
2367
2398
|
stateOff: this.stateOff
|
2368
2399
|
};
|
2369
2400
|
|
2370
|
-
var states = new Array(len);
|
2371
|
-
for (var i = 0; i < len; i++) {
|
2372
|
-
states[i] = defaultStateObject;
|
2373
|
-
}
|
2374
|
-
return states;
|
2375
|
-
};
|
2376
|
-
|
2377
|
-
this.normalizeRange = function(states) {
|
2378
2401
|
for (var i = 0, n = states.length; i < n; i++) {
|
2379
|
-
states[i]
|
2380
|
-
states[i].stateOff = states[i].stateOff || this.stateOff;
|
2402
|
+
states[i] = angular.extend({ index: i }, defaultOptions, states[i]);
|
2381
2403
|
}
|
2382
2404
|
return states;
|
2383
2405
|
};
|
2384
2406
|
|
2385
2407
|
// Get objects used in template
|
2386
|
-
$scope.range = angular.isDefined($attrs.ratingStates) ? this.
|
2408
|
+
$scope.range = angular.isDefined($attrs.ratingStates) ? this.createRateObjects(angular.copy($scope.$parent.$eval($attrs.ratingStates))): this.createRateObjects(new Array(this.maxRange));
|
2387
2409
|
|
2388
2410
|
$scope.rate = function(value) {
|
2389
2411
|
if ( $scope.readonly || $scope.value === value) {
|
@@ -2447,11 +2469,9 @@ angular.module('ui.bootstrap.tabs', [])
|
|
2447
2469
|
};
|
2448
2470
|
})
|
2449
2471
|
|
2450
|
-
.controller('TabsetController', ['$scope',
|
2451
|
-
function TabsetCtrl($scope, $element) {
|
2452
|
-
|
2472
|
+
.controller('TabsetController', ['$scope', function TabsetCtrl($scope) {
|
2453
2473
|
var ctrl = this,
|
2454
|
-
|
2474
|
+
tabs = ctrl.tabs = $scope.tabs = [];
|
2455
2475
|
|
2456
2476
|
ctrl.select = function(tab) {
|
2457
2477
|
angular.forEach(tabs, function(tab) {
|
@@ -2488,6 +2508,7 @@ function TabsetCtrl($scope, $element) {
|
|
2488
2508
|
* Tabset is the outer container for the tabs directive
|
2489
2509
|
*
|
2490
2510
|
* @param {boolean=} vertical Whether or not to use vertical styling for the tabs.
|
2511
|
+
* @param {boolean=} justified Whether or not to use justified styling for the tabs.
|
2491
2512
|
* @param {string=} direction What direction the tabs should be rendered. Available:
|
2492
2513
|
* 'right', 'left', 'below'.
|
2493
2514
|
*
|
@@ -2495,14 +2516,18 @@ function TabsetCtrl($scope, $element) {
|
|
2495
2516
|
<example module="ui.bootstrap">
|
2496
2517
|
<file name="index.html">
|
2497
2518
|
<tabset>
|
2498
|
-
<tab heading="
|
2499
|
-
<tab heading="
|
2519
|
+
<tab heading="Tab 1"><b>First</b> Content!</tab>
|
2520
|
+
<tab heading="Tab 2"><i>Second</i> Content!</tab>
|
2500
2521
|
</tabset>
|
2501
2522
|
<hr />
|
2502
2523
|
<tabset vertical="true">
|
2503
2524
|
<tab heading="Vertical Tab 1"><b>First</b> Vertical Content!</tab>
|
2504
2525
|
<tab heading="Vertical Tab 2"><i>Second</i> Vertical Content!</tab>
|
2505
2526
|
</tabset>
|
2527
|
+
<tabset justified="true">
|
2528
|
+
<tab heading="Justified Tab 1"><b>First</b> Justified Content!</tab>
|
2529
|
+
<tab heading="Justified Tab 2"><i>Second</i> Justified Content!</tab>
|
2530
|
+
</tabset>
|
2506
2531
|
</file>
|
2507
2532
|
</example>
|
2508
2533
|
*/
|
@@ -2518,6 +2543,7 @@ function TabsetCtrl($scope, $element) {
|
|
2518
2543
|
compile: function(elm, attrs, transclude) {
|
2519
2544
|
return function(scope, element, attrs, tabsetCtrl) {
|
2520
2545
|
scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false;
|
2546
|
+
scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false;
|
2521
2547
|
scope.type = angular.isDefined(attrs.type) ? scope.$parent.$eval(attrs.type) : 'tabs';
|
2522
2548
|
scope.direction = angular.isDefined(attrs.direction) ? scope.$parent.$eval(attrs.direction) : 'top';
|
2523
2549
|
scope.tabsAbove = (scope.direction != 'below');
|
@@ -2608,8 +2634,7 @@ function TabsetCtrl($scope, $element) {
|
|
2608
2634
|
</file>
|
2609
2635
|
</example>
|
2610
2636
|
*/
|
2611
|
-
.directive('tab', ['$parse',
|
2612
|
-
function($parse, $http, $templateCache, $compile) {
|
2637
|
+
.directive('tab', ['$parse', function($parse) {
|
2613
2638
|
return {
|
2614
2639
|
require: '^tabset',
|
2615
2640
|
restrict: 'EA',
|
@@ -2631,8 +2656,13 @@ function($parse, $http, $templateCache, $compile) {
|
|
2631
2656
|
if (attrs.active) {
|
2632
2657
|
getActive = $parse(attrs.active);
|
2633
2658
|
setActive = getActive.assign;
|
2634
|
-
scope.$parent.$watch(getActive, function updateActive(value) {
|
2635
|
-
scope.active
|
2659
|
+
scope.$parent.$watch(getActive, function updateActive(value, oldVal) {
|
2660
|
+
// Avoid re-initializing scope.active as it is already initialized
|
2661
|
+
// below. (watcher is called async during init with value ===
|
2662
|
+
// oldVal)
|
2663
|
+
if (value !== oldVal) {
|
2664
|
+
scope.active = !!value;
|
2665
|
+
}
|
2636
2666
|
});
|
2637
2667
|
scope.active = getActive(scope.$parent);
|
2638
2668
|
} else {
|
@@ -2640,6 +2670,8 @@ function($parse, $http, $templateCache, $compile) {
|
|
2640
2670
|
}
|
2641
2671
|
|
2642
2672
|
scope.$watch('active', function(active) {
|
2673
|
+
// Note this watcher also initializes and assigns scope.active to the
|
2674
|
+
// attrs.active expression.
|
2643
2675
|
setActive(scope.$parent, active);
|
2644
2676
|
if (active) {
|
2645
2677
|
tabsetCtrl.select(scope);
|
@@ -2666,9 +2698,6 @@ function($parse, $http, $templateCache, $compile) {
|
|
2666
2698
|
scope.$on('$destroy', function() {
|
2667
2699
|
tabsetCtrl.removeTab(scope);
|
2668
2700
|
});
|
2669
|
-
if (scope.active) {
|
2670
|
-
setActive(scope.$parent, true);
|
2671
|
-
}
|
2672
2701
|
|
2673
2702
|
|
2674
2703
|
//We need to transclude later, once the content container is ready.
|
@@ -2694,7 +2723,7 @@ function($parse, $http, $templateCache, $compile) {
|
|
2694
2723
|
};
|
2695
2724
|
}])
|
2696
2725
|
|
2697
|
-
.directive('tabContentTransclude',
|
2726
|
+
.directive('tabContentTransclude', function() {
|
2698
2727
|
return {
|
2699
2728
|
restrict: 'A',
|
2700
2729
|
require: '^tabset',
|
@@ -2723,9 +2752,9 @@ function($parse, $http, $templateCache, $compile) {
|
|
2723
2752
|
node.tagName.toLowerCase() === 'data-tab-heading'
|
2724
2753
|
);
|
2725
2754
|
}
|
2726
|
-
}
|
2755
|
+
})
|
2727
2756
|
|
2728
|
-
.directive('tabsetTitles',
|
2757
|
+
.directive('tabsetTitles', function() {
|
2729
2758
|
return {
|
2730
2759
|
restrict: 'A',
|
2731
2760
|
require: '^tabset',
|
@@ -2742,10 +2771,7 @@ function($parse, $http, $templateCache, $compile) {
|
|
2742
2771
|
}
|
2743
2772
|
}
|
2744
2773
|
};
|
2745
|
-
}
|
2746
|
-
|
2747
|
-
;
|
2748
|
-
|
2774
|
+
});
|
2749
2775
|
|
2750
2776
|
angular.module('ui.bootstrap.timepicker', [])
|
2751
2777
|
|
@@ -3047,6 +3073,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3047
3073
|
//expressions used by typeahead
|
3048
3074
|
var parserResult = typeaheadParser.parse(attrs.typeahead);
|
3049
3075
|
|
3076
|
+
var hasFocus;
|
3050
3077
|
|
3051
3078
|
//pop-up element used to display matches
|
3052
3079
|
var popUpEl = angular.element('<typeahead-popup></typeahead-popup>');
|
@@ -3078,11 +3105,11 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3078
3105
|
|
3079
3106
|
var locals = {$viewValue: inputValue};
|
3080
3107
|
isLoadingSetter(originalScope, true);
|
3081
|
-
$q.when(parserResult.source(
|
3108
|
+
$q.when(parserResult.source(originalScope, locals)).then(function(matches) {
|
3082
3109
|
|
3083
3110
|
//it might happen that several async queries were in progress if a user were typing fast
|
3084
3111
|
//but we are interested only in responses that correspond to the current view value
|
3085
|
-
if (inputValue === modelCtrl.$viewValue) {
|
3112
|
+
if (inputValue === modelCtrl.$viewValue && hasFocus) {
|
3086
3113
|
if (matches.length > 0) {
|
3087
3114
|
|
3088
3115
|
scope.activeIdx = 0;
|
@@ -3127,7 +3154,8 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3127
3154
|
//$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue
|
3128
3155
|
modelCtrl.$parsers.unshift(function (inputValue) {
|
3129
3156
|
|
3130
|
-
|
3157
|
+
hasFocus = true;
|
3158
|
+
|
3131
3159
|
if (inputValue && inputValue.length >= minSearch) {
|
3132
3160
|
if (waitTime > 0) {
|
3133
3161
|
if (timeoutPromise) {
|
@@ -3139,13 +3167,22 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3139
3167
|
} else {
|
3140
3168
|
getMatchesAsync(inputValue);
|
3141
3169
|
}
|
3170
|
+
} else {
|
3171
|
+
isLoadingSetter(originalScope, false);
|
3172
|
+
resetMatches();
|
3142
3173
|
}
|
3143
3174
|
|
3144
3175
|
if (isEditable) {
|
3145
3176
|
return inputValue;
|
3146
3177
|
} else {
|
3147
|
-
|
3148
|
-
|
3178
|
+
if (!inputValue) {
|
3179
|
+
// Reset in case user had typed something previously.
|
3180
|
+
modelCtrl.$setValidity('editable', true);
|
3181
|
+
return inputValue;
|
3182
|
+
} else {
|
3183
|
+
modelCtrl.$setValidity('editable', false);
|
3184
|
+
return undefined;
|
3185
|
+
}
|
3149
3186
|
}
|
3150
3187
|
});
|
3151
3188
|
|
@@ -3199,6 +3236,9 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3199
3236
|
|
3200
3237
|
//typeahead is open and an "interesting" key was pressed
|
3201
3238
|
if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {
|
3239
|
+
if (evt.which === 13) {
|
3240
|
+
evt.preventDefault();
|
3241
|
+
}
|
3202
3242
|
return;
|
3203
3243
|
}
|
3204
3244
|
|
@@ -3225,6 +3265,10 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3225
3265
|
}
|
3226
3266
|
});
|
3227
3267
|
|
3268
|
+
element.bind('blur', function (evt) {
|
3269
|
+
hasFocus = false;
|
3270
|
+
});
|
3271
|
+
|
3228
3272
|
// Keep reference to click handler to unbind it.
|
3229
3273
|
var dismissClickHandler = function (evt) {
|
3230
3274
|
if (element[0] !== evt.target) {
|
@@ -3309,21 +3353,26 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
|
|
3309
3353
|
});
|
3310
3354
|
angular.module("template/accordion/accordion-group.html", []).run(["$templateCache", function($templateCache) {
|
3311
3355
|
$templateCache.put("template/accordion/accordion-group.html",
|
3312
|
-
"<div class=\"
|
3313
|
-
" <div class=\"
|
3314
|
-
"
|
3315
|
-
"
|
3356
|
+
"<div class=\"panel panel-default\">\n" +
|
3357
|
+
" <div class=\"panel-heading\">\n" +
|
3358
|
+
" <h4 class=\"panel-title\">\n" +
|
3359
|
+
" <a href=\"\" class=\"accordion-toggle\" ng-click=\"isOpen = !isOpen\" accordion-transclude=\"heading\">{{heading}}</a>\n" +
|
3360
|
+
" </h4>\n" +
|
3361
|
+
" </div>\n" +
|
3362
|
+
" <div class=\"panel-collapse\" collapse=\"!isOpen\">\n" +
|
3363
|
+
" <div class=\"panel-body\" ng-transclude></div>\n" +
|
3364
|
+
" </div>\n" +
|
3316
3365
|
"</div>");
|
3317
3366
|
}]);
|
3318
3367
|
|
3319
3368
|
angular.module("template/accordion/accordion.html", []).run(["$templateCache", function($templateCache) {
|
3320
3369
|
$templateCache.put("template/accordion/accordion.html",
|
3321
|
-
"<div class=\"
|
3370
|
+
"<div class=\"panel-group\" ng-transclude></div>");
|
3322
3371
|
}]);
|
3323
3372
|
|
3324
3373
|
angular.module("template/alert/alert.html", []).run(["$templateCache", function($templateCache) {
|
3325
3374
|
$templateCache.put("template/alert/alert.html",
|
3326
|
-
"<div class='alert' ng-class='
|
3375
|
+
"<div class='alert' ng-class='\"alert-\" + (type || \"warning\")'>\n" +
|
3327
3376
|
" <button ng-show='closeable' type='button' class='close' ng-click='close()'>×</button>\n" +
|
3328
3377
|
" <div ng-transclude></div>\n" +
|
3329
3378
|
"</div>\n" +
|
@@ -3337,8 +3386,8 @@ angular.module("template/carousel/carousel.html", []).run(["$templateCache", fun
|
|
3337
3386
|
" <li ng-repeat=\"slide in slides()\" ng-class=\"{active: isActive(slide)}\" ng-click=\"select(slide)\"></li>\n" +
|
3338
3387
|
" </ol>\n" +
|
3339
3388
|
" <div class=\"carousel-inner\" ng-transclude></div>\n" +
|
3340
|
-
" <a ng-click=\"prev()\"
|
3341
|
-
" <a ng-click=\"next()\"
|
3389
|
+
" <a class=\"left carousel-control\" ng-click=\"prev()\" ng-show=\"slides().length > 1\"><span class=\"icon-prev\"></span></a>\n" +
|
3390
|
+
" <a class=\"right carousel-control\" ng-click=\"next()\" ng-show=\"slides().length > 1\"><span class=\"icon-next\"></span></a>\n" +
|
3342
3391
|
"</div>\n" +
|
3343
3392
|
"");
|
3344
3393
|
}]);
|
@@ -3351,78 +3400,85 @@ angular.module("template/carousel/slide.html", []).run(["$templateCache", functi
|
|
3351
3400
|
" 'next': (next || active) && direction=='next',\n" +
|
3352
3401
|
" 'right': direction=='prev',\n" +
|
3353
3402
|
" 'left': direction=='next'\n" +
|
3354
|
-
" }\" class=\"item\" ng-transclude></div>\n" +
|
3403
|
+
" }\" class=\"item text-center\" ng-transclude></div>\n" +
|
3355
3404
|
"");
|
3356
3405
|
}]);
|
3357
3406
|
|
3358
3407
|
angular.module("template/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) {
|
3359
3408
|
$templateCache.put("template/datepicker/datepicker.html",
|
3360
|
-
"<table>\n" +
|
3361
|
-
"
|
3362
|
-
"
|
3363
|
-
"
|
3364
|
-
" <th
|
3365
|
-
"
|
3409
|
+
"<table style=\"table-layout:fixed;\" class=\"table-condensed\">\n" +
|
3410
|
+
" <!-- secondary: last month, disabled: disabled -->\n" +
|
3411
|
+
" <thead class=\"text-center\">\n" +
|
3412
|
+
" <tr>\n" +
|
3413
|
+
" <th style=\"overflow: hidden; min-width: 26px\">\n" +
|
3414
|
+
" <button type=\"button\" class=\"btn btn-xs btn-link\" ng-click=\"move(-1)\"> \n" +
|
3415
|
+
" <span class=\"glyphicon glyphicon-chevron-left\"> </span> \n" +
|
3416
|
+
" </button>\n" +
|
3417
|
+
" </th>\n" +
|
3418
|
+
" <th colspan=\"{{rows[0].length - 2 + showWeekNumbers}}\"><button type=\"button\" class=\"btn btn-md btn-link btn-block\" ng-click=\"toggleMode()\"><strong>{{title}}</strong></button></th>\n" +
|
3419
|
+
" <th style=\"overflow: hidden; min-width: 26px\">\n" +
|
3420
|
+
" <button type=\"button\" class=\"btn btn-xs btn-link\" ng-click=\"move(1)\"> \n" +
|
3421
|
+
" <span class=\"glyphicon glyphicon-chevron-right\"> </span> \n" +
|
3422
|
+
" </button>\n" +
|
3423
|
+
" </th>\n" +
|
3366
3424
|
" </tr>\n" +
|
3367
|
-
" <tr
|
3368
|
-
" <th ng-show=\"showWeekNumbers\">#</th>\n" +
|
3369
|
-
" <th ng-repeat=\"label in labels\">{{label}}</th>\n" +
|
3425
|
+
" <tr ng-show=\"labels.length > 0\">\n" +
|
3426
|
+
" <th class=\"text-center\" ng-show=\"showWeekNumbers\" style=\"overflow: hidden; min-width: 26px\"><h6>#</h6></th>\n" +
|
3427
|
+
" <th class=\"text-center\" ng-repeat=\"label in labels\" style=\"overflow: hidden; min-width: 26px\"><h6>{{label}}</h6></th>\n" +
|
3370
3428
|
" </tr>\n" +
|
3371
3429
|
" </thead>\n" +
|
3372
3430
|
" <tbody>\n" +
|
3373
3431
|
" <tr ng-repeat=\"row in rows\">\n" +
|
3374
|
-
" <td ng-show=\"showWeekNumbers\" class=\"text-center\"><em>{{ getWeekNumber(row) }}</em></td>\n" +
|
3375
|
-
" <td ng-repeat=\"dt in row\" class=\"text-center\">\n" +
|
3376
|
-
" <button type=\"button\" style=\"width:100
|
3432
|
+
" <td ng-show=\"showWeekNumbers\" class=\"text-center\" style=\"overflow: hidden; min-width: 26px\"><button type=\"button\" class=\"btn btn-xs btn-link\" disabled><strong><em>{{ getWeekNumber(row) }}</em></strong></button></td>\n" +
|
3433
|
+
" <td ng-repeat=\"dt in row\" class=\"text-center\" style=\"overflow: hidden; min-width: 26px\">\n" +
|
3434
|
+
" <button type=\"button\" style=\"width: 100%; border: 0px\" class=\"btn btn-xs\" ng-class=\"{'btn-primary': dt.selected, 'btn-default': !dt.selected}\" ng-click=\"select(dt.date)\" ng-disabled=\"dt.disabled\"><span ng-class=\"{'text-muted': dt.secondary && !dt.selected}\">{{dt.label}}</span></button>\n" +
|
3377
3435
|
" </td>\n" +
|
3378
3436
|
" </tr>\n" +
|
3379
3437
|
" </tbody>\n" +
|
3380
|
-
"</table
|
3381
|
-
"");
|
3438
|
+
"</table>");
|
3382
3439
|
}]);
|
3383
3440
|
|
3384
3441
|
angular.module("template/datepicker/popup.html", []).run(["$templateCache", function($templateCache) {
|
3385
3442
|
$templateCache.put("template/datepicker/popup.html",
|
3386
|
-
"<ul class=\"dropdown-menu\" ng-style=\"{display: (isOpen && 'block') || 'none', top: position.top+'px', left: position.left+'px'}\"
|
3387
|
-
"
|
3388
|
-
"
|
3389
|
-
"
|
3390
|
-
"
|
3391
|
-
"
|
3392
|
-
"
|
3393
|
-
"
|
3394
|
-
"
|
3395
|
-
"
|
3396
|
-
"
|
3397
|
-
"</ul
|
3443
|
+
"<ul class=\"dropdown-menu\" ng-style=\"{display: (isOpen && 'block') || 'none', top: position.top+'px', left: position.left+'px'}\">\n" +
|
3444
|
+
" <li ng-transclude></li>\n" +
|
3445
|
+
" <li class=\"divider\"></li>\n" +
|
3446
|
+
" <li style=\"padding: 9px;\">\n" +
|
3447
|
+
" <span class=\"btn-group\">\n" +
|
3448
|
+
" <button class=\"btn btn-xs btn-default\" ng-click=\"today()\">Today</button>\n" +
|
3449
|
+
" <button class=\"btn btn-xs btn-info\" ng-click=\"showWeeks = ! showWeeks\" ng-class=\"{active: showWeeks}\">Weeks</button>\n" +
|
3450
|
+
" <button class=\"btn btn-xs btn-danger\" ng-click=\"clear()\">Clear</button>\n" +
|
3451
|
+
" </span>\n" +
|
3452
|
+
" <button class=\"btn btn-xs btn-success pull-right\" ng-click=\"isOpen = false\">Close</button>\n" +
|
3453
|
+
" </li>\n" +
|
3454
|
+
"</ul>\n" +
|
3455
|
+
"");
|
3398
3456
|
}]);
|
3399
3457
|
|
3400
3458
|
angular.module("template/modal/backdrop.html", []).run(["$templateCache", function($templateCache) {
|
3401
3459
|
$templateCache.put("template/modal/backdrop.html",
|
3402
|
-
"<div class=\"modal-backdrop fade\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1040 + index*10}\"
|
3460
|
+
"<div class=\"modal-backdrop fade\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1040 + index*10}\"></div>");
|
3403
3461
|
}]);
|
3404
3462
|
|
3405
3463
|
angular.module("template/modal/window.html", []).run(["$templateCache", function($templateCache) {
|
3406
3464
|
$templateCache.put("template/modal/window.html",
|
3407
|
-
"<div class=\"modal fade {{ windowClass }}\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1050 + index*10}\" ng-
|
3465
|
+
"<div class=\"modal fade {{ windowClass }}\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1050 + index*10, display: 'block'}\" ng-click=\"close($event)\">\n" +
|
3466
|
+
" <div class=\"modal-dialog\"><div class=\"modal-content\" ng-transclude></div></div>\n" +
|
3467
|
+
"</div>");
|
3408
3468
|
}]);
|
3409
3469
|
|
3410
3470
|
angular.module("template/pagination/pager.html", []).run(["$templateCache", function($templateCache) {
|
3411
3471
|
$templateCache.put("template/pagination/pager.html",
|
3412
|
-
"<
|
3413
|
-
" <ul>\n" +
|
3472
|
+
"<ul class=\"pager\">\n" +
|
3414
3473
|
" <li ng-repeat=\"page in pages\" ng-class=\"{disabled: page.disabled, previous: page.previous, next: page.next}\"><a ng-click=\"selectPage(page.number)\">{{page.text}}</a></li>\n" +
|
3415
|
-
"
|
3416
|
-
"</div>\n" +
|
3417
|
-
"");
|
3474
|
+
"</ul>");
|
3418
3475
|
}]);
|
3419
3476
|
|
3420
3477
|
angular.module("template/pagination/pagination.html", []).run(["$templateCache", function($templateCache) {
|
3421
3478
|
$templateCache.put("template/pagination/pagination.html",
|
3422
|
-
"<
|
3479
|
+
"<ul class=\"pagination\">\n" +
|
3423
3480
|
" <li ng-repeat=\"page in pages\" ng-class=\"{active: page.active, disabled: page.disabled}\"><a ng-click=\"selectPage(page.number)\">{{page.text}}</a></li>\n" +
|
3424
|
-
"
|
3425
|
-
"</div>\n" +
|
3481
|
+
"</ul>\n" +
|
3426
3482
|
"");
|
3427
3483
|
}]);
|
3428
3484
|
|
@@ -3430,7 +3486,7 @@ angular.module("template/tooltip/tooltip-html-unsafe-popup.html", []).run(["$tem
|
|
3430
3486
|
$templateCache.put("template/tooltip/tooltip-html-unsafe-popup.html",
|
3431
3487
|
"<div class=\"tooltip {{placement}}\" ng-class=\"{ in: isOpen(), fade: animation() }\">\n" +
|
3432
3488
|
" <div class=\"tooltip-arrow\"></div>\n" +
|
3433
|
-
" <div class=\"tooltip-inner\"
|
3489
|
+
" <div class=\"tooltip-inner\" bind-html-unsafe=\"content\"></div>\n" +
|
3434
3490
|
"</div>\n" +
|
3435
3491
|
"");
|
3436
3492
|
}]);
|
@@ -3470,16 +3526,10 @@ angular.module("template/progressbar/progress.html", []).run(["$templateCache",
|
|
3470
3526
|
angular.module("template/rating/rating.html", []).run(["$templateCache", function($templateCache) {
|
3471
3527
|
$templateCache.put("template/rating/rating.html",
|
3472
3528
|
"<span ng-mouseleave=\"reset()\">\n" +
|
3473
|
-
"
|
3529
|
+
" <i ng-repeat=\"r in range\" ng-mouseenter=\"enter($index + 1)\" ng-click=\"rate($index + 1)\" class=\"glyphicon\" ng-class=\"$index < val && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')\"></i>\n" +
|
3474
3530
|
"</span>");
|
3475
3531
|
}]);
|
3476
3532
|
|
3477
|
-
angular.module("template/tabs/pane.html", []).run(["$templateCache", function($templateCache) {
|
3478
|
-
$templateCache.put("template/tabs/pane.html",
|
3479
|
-
"<div class=\"tab-pane\" ng-class=\"{active: selected}\" ng-show=\"selected\" ng-transclude></div>\n" +
|
3480
|
-
"");
|
3481
|
-
}]);
|
3482
|
-
|
3483
3533
|
angular.module("template/tabs/tab.html", []).run(["$templateCache", function($templateCache) {
|
3484
3534
|
$templateCache.put("template/tabs/tab.html",
|
3485
3535
|
"<li ng-class=\"{active: active, disabled: disabled}\">\n" +
|
@@ -3488,22 +3538,9 @@ angular.module("template/tabs/tab.html", []).run(["$templateCache", function($te
|
|
3488
3538
|
"");
|
3489
3539
|
}]);
|
3490
3540
|
|
3491
|
-
angular.module("template/tabs/tabs.html", []).run(["$templateCache", function($templateCache) {
|
3492
|
-
$templateCache.put("template/tabs/tabs.html",
|
3493
|
-
"<div class=\"tabbable\">\n" +
|
3494
|
-
" <ul class=\"nav nav-tabs\">\n" +
|
3495
|
-
" <li ng-repeat=\"pane in panes\" ng-class=\"{active:pane.selected}\">\n" +
|
3496
|
-
" <a ng-click=\"select(pane)\">{{pane.heading}}</a>\n" +
|
3497
|
-
" </li>\n" +
|
3498
|
-
" </ul>\n" +
|
3499
|
-
" <div class=\"tab-content\" ng-transclude></div>\n" +
|
3500
|
-
"</div>\n" +
|
3501
|
-
"");
|
3502
|
-
}]);
|
3503
|
-
|
3504
3541
|
angular.module("template/tabs/tabset-titles.html", []).run(["$templateCache", function($templateCache) {
|
3505
3542
|
$templateCache.put("template/tabs/tabset-titles.html",
|
3506
|
-
"<ul class=\"nav {{type && 'nav-' + type}}\" ng-class=\"{'nav-stacked': vertical}\">\n" +
|
3543
|
+
"<ul class=\"nav {{type && 'nav-' + type}}\" ng-class=\"{'nav-stacked': vertical, 'nav-justified': justified}\">\n" +
|
3507
3544
|
"</ul>\n" +
|
3508
3545
|
"");
|
3509
3546
|
}]);
|
@@ -3527,26 +3564,44 @@ angular.module("template/tabs/tabset.html", []).run(["$templateCache", function(
|
|
3527
3564
|
|
3528
3565
|
angular.module("template/timepicker/timepicker.html", []).run(["$templateCache", function($templateCache) {
|
3529
3566
|
$templateCache.put("template/timepicker/timepicker.html",
|
3530
|
-
"<
|
3531
|
-
"
|
3532
|
-
"
|
3533
|
-
"
|
3534
|
-
"
|
3535
|
-
"
|
3536
|
-
"
|
3537
|
-
"
|
3538
|
-
"
|
3539
|
-
"
|
3540
|
-
"
|
3541
|
-
"
|
3542
|
-
"
|
3543
|
-
"
|
3544
|
-
"
|
3545
|
-
"
|
3546
|
-
"
|
3547
|
-
"
|
3548
|
-
"
|
3549
|
-
"
|
3567
|
+
"<span>\n" +
|
3568
|
+
" <div class=\"row\">\n" +
|
3569
|
+
" <div class=\"col-xs-4 text-center\">\n" +
|
3570
|
+
" <a ng-click=\"incrementHours()\" class=\"btn btn-link\"><i class=\"glyphicon glyphicon-chevron-up\"></i></a>\n" +
|
3571
|
+
" </div>\n" +
|
3572
|
+
" <div class=\"col-xs-6 text-center\">\n" +
|
3573
|
+
" <a ng-click=\"incrementMinutes()\" class=\"btn btn-link\"><i class=\"glyphicon glyphicon-chevron-up\"></i></a>\n" +
|
3574
|
+
" </div>\n" +
|
3575
|
+
" <div class=\"col-xs-2\"> </div>\n" +
|
3576
|
+
" </div>\n" +
|
3577
|
+
"\n" +
|
3578
|
+
" <div class=\"row\">\n" +
|
3579
|
+
" <div class=\"col-xs-4\">\n" +
|
3580
|
+
" <div class=\"form-group\" ng-class=\"{'has-error': invalidHours}\" style=\"margin-bottom: 0px\">\n" +
|
3581
|
+
" <input type=\"text\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-mousewheel=\"incrementHours()\" ng-readonly=\"readonlyInput\" maxlength=\"2\"> \n" +
|
3582
|
+
" </div>\n" +
|
3583
|
+
" </div>\n" +
|
3584
|
+
" <div class=\"col-xs-6\">\n" +
|
3585
|
+
" <div class=\"input-group\" ng-class=\"{'has-error': invalidMinutes}\">\n" +
|
3586
|
+
" <span class=\"input-group-addon\">:</span>\n" +
|
3587
|
+
" <input type=\"text\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\">\n" +
|
3588
|
+
" </div>\n" +
|
3589
|
+
" </div>\n" +
|
3590
|
+
" <div class=\"col-xs-2\">\n" +
|
3591
|
+
" <button ng-click=\"toggleMeridian()\" class=\"btn btn-default text-center\" ng-show=\"showMeridian\">{{meridian}}</button>\n" +
|
3592
|
+
" </div>\n" +
|
3593
|
+
" </div>\n" +
|
3594
|
+
"\n" +
|
3595
|
+
" <div class=\"row\">\n" +
|
3596
|
+
" <div class=\"col-xs-4 text-center\">\n" +
|
3597
|
+
" <a ng-click=\"decrementHours()\" class=\"btn btn-link\"><i class=\"glyphicon glyphicon-chevron-down\"></i></a>\n" +
|
3598
|
+
" </div>\n" +
|
3599
|
+
" <div class=\"col-xs-6 text-center\">\n" +
|
3600
|
+
" <a ng-click=\"decrementMinutes()\" class=\"btn btn-link\"><i class=\"glyphicon glyphicon-chevron-down\"></i></a>\n" +
|
3601
|
+
" </div>\n" +
|
3602
|
+
" <div class=\"col-xs-2\"> </div>\n" +
|
3603
|
+
" </div>\n" +
|
3604
|
+
"</span>");
|
3550
3605
|
}]);
|
3551
3606
|
|
3552
3607
|
angular.module("template/typeahead/typeahead-match.html", []).run(["$templateCache", function($templateCache) {
|
@@ -3556,18 +3611,9 @@ angular.module("template/typeahead/typeahead-match.html", []).run(["$templateCac
|
|
3556
3611
|
|
3557
3612
|
angular.module("template/typeahead/typeahead-popup.html", []).run(["$templateCache", function($templateCache) {
|
3558
3613
|
$templateCache.put("template/typeahead/typeahead-popup.html",
|
3559
|
-
"<ul class=\"
|
3614
|
+
"<ul class=\"dropdown-menu\" ng-style=\"{display: isOpen()&&'block' || 'none', top: position.top+'px', left: position.left+'px'}\">\n" +
|
3560
3615
|
" <li ng-repeat=\"match in matches\" ng-class=\"{active: isActive($index) }\" ng-mouseenter=\"selectActive($index)\" ng-click=\"selectMatch($index)\">\n" +
|
3561
3616
|
" <typeahead-match index=\"$index\" match=\"match\" query=\"query\" template-url=\"templateUrl\"></typeahead-match>\n" +
|
3562
3617
|
" </li>\n" +
|
3563
3618
|
"</ul>");
|
3564
3619
|
}]);
|
3565
|
-
|
3566
|
-
angular.module("template/typeahead/typeahead.html", []).run(["$templateCache", function($templateCache) {
|
3567
|
-
$templateCache.put("template/typeahead/typeahead.html",
|
3568
|
-
"<ul class=\"typeahead dropdown-menu\" ng-style=\"{display: isOpen()&&'block' || 'none', top: position.top+'px', left: position.left+'px'}\">\n" +
|
3569
|
-
" <li ng-repeat=\"match in matches\" ng-class=\"{active: isActive($index) }\" ng-mouseenter=\"selectActive($index)\">\n" +
|
3570
|
-
" <a tabindex=\"-1\" ng-click=\"selectMatch($index)\" ng-bind-html-unsafe=\"match.label | typeaheadHighlight:query\"></a>\n" +
|
3571
|
-
" </li>\n" +
|
3572
|
-
"</ul>");
|
3573
|
-
}]);
|