bastion 3.2.1 → 3.2.2
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/app/assets/javascripts/bastion/bastion.module.js +10 -2
- data/app/assets/javascripts/bastion/components/bst-alert.directive.js +17 -5
- data/app/assets/javascripts/bastion/components/bst-container-scroll.directive.js +9 -3
- data/app/assets/javascripts/bastion/components/bst-table.directive.js +4 -1
- data/app/assets/javascripts/bastion/components/components.module.js +1 -1
- data/app/assets/javascripts/bastion/components/nutupane.factory.js +4 -3
- data/app/assets/stylesheets/bastion/animations.scss +10 -0
- data/app/assets/stylesheets/bastion/nutupane.scss +4 -0
- data/app/assets/stylesheets/bastion/overrides.scss +4 -0
- data/lib/bastion/version.rb +1 -1
- data/test/components/bst-container-scroll.directive.test.js +11 -0
- 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: cb88de97c9f4c944ef8dc4bdaa2658887a649946
|
4
|
+
data.tar.gz: eb1a8a31b204a4841e605eba9c887882b5436074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 060854ddc47304d5814abe27b1c09e8f6fafba5c03833e44084ce94c8d7e4f7aa034c11ea6e55ce6751c6d6ab4b1808c4ac3e668edde9ae176885f55ac630be4
|
7
|
+
data.tar.gz: 27bd7e7c4f50cacb71b4f3ef0a16f49b15cad9ead497aa475736727abc615fc425b50a3859ba6c09c3a3c5071c5c2f5ad32365c8d61b0d17a0a7ca0d1db18ff8
|
@@ -58,8 +58,16 @@ angular.module('Bastion').config(
|
|
58
58
|
});
|
59
59
|
|
60
60
|
$urlRouterProvider.otherwise(function ($injector, $location) {
|
61
|
-
var $window = $injector.get('$window')
|
62
|
-
|
61
|
+
var $window = $injector.get('$window'),
|
62
|
+
url = $location.absUrl();
|
63
|
+
|
64
|
+
// ensure we don't double encode +s
|
65
|
+
url = url.replace(/%2B/g, "+");
|
66
|
+
|
67
|
+
// Remove the old browser path if present
|
68
|
+
url = url.replace(oldBrowserBastionPath, '');
|
69
|
+
|
70
|
+
$window.location.href = url;
|
63
71
|
});
|
64
72
|
|
65
73
|
$locationProvider.html5Mode(true);
|
@@ -2,6 +2,9 @@
|
|
2
2
|
* @ngdoc directive
|
3
3
|
* @name Bastion.components.directive:bstAlert
|
4
4
|
*
|
5
|
+
* @requires $animate
|
6
|
+
* @requires $timeout
|
7
|
+
*
|
5
8
|
* @description
|
6
9
|
* Simple directive for encapsulating an alert display.
|
7
10
|
*
|
@@ -10,7 +13,9 @@
|
|
10
13
|
* <div bst-alert="success"></div>
|
11
14
|
* </pre>
|
12
15
|
*/
|
13
|
-
angular.module('Bastion.components').directive('bstAlert', function () {
|
16
|
+
angular.module('Bastion.components').directive('bstAlert', ['$animate', '$timeout', function ($animate, $timeout) {
|
17
|
+
var SUCCESS_FADEOUT = 3000;
|
18
|
+
|
14
19
|
return {
|
15
20
|
templateUrl: 'components/views/bst-alert.html',
|
16
21
|
transclude: true,
|
@@ -18,8 +23,15 @@ angular.module('Bastion.components').directive('bstAlert', function () {
|
|
18
23
|
type: '@bstAlert',
|
19
24
|
close: '&'
|
20
25
|
},
|
21
|
-
|
22
|
-
|
23
|
-
|
26
|
+
link: function (scope, element, attrs) {
|
27
|
+
scope.closeable = 'close' in attrs;
|
28
|
+
|
29
|
+
// Fade out success alerts after five seconds
|
30
|
+
if (scope.type === 'success') {
|
31
|
+
$timeout(function () {
|
32
|
+
$animate.leave(element.find('.alert'), scope.close);
|
33
|
+
}, SUCCESS_FADEOUT);
|
34
|
+
}
|
35
|
+
}
|
24
36
|
};
|
25
|
-
});
|
37
|
+
}]);
|
@@ -24,7 +24,7 @@ angular.module('Bastion.components').directive('bstContainerScroll', ['$window',
|
|
24
24
|
return function (scope, element) {
|
25
25
|
var windowElement = angular.element($window),
|
26
26
|
bottomPadding = parseInt(element.css('padding-bottom').replace('px', ''), 10),
|
27
|
-
addScroll;
|
27
|
+
newElementHeight, addScroll;
|
28
28
|
|
29
29
|
addScroll = function () {
|
30
30
|
var windowHeight = windowElement.height(),
|
@@ -34,8 +34,14 @@ angular.module('Bastion.components').directive('bstContainerScroll', ['$window',
|
|
34
34
|
offset = offset + bottomPadding;
|
35
35
|
}
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
newElementHeight = windowHeight - offset;
|
38
|
+
|
39
|
+
if (newElementHeight <= 100) {
|
40
|
+
newElementHeight = 300;
|
41
|
+
}
|
42
|
+
|
43
|
+
element.outerHeight(newElementHeight);
|
44
|
+
element.height(newElementHeight);
|
39
45
|
};
|
40
46
|
|
41
47
|
windowElement.bind('resize', addScroll);
|
@@ -44,7 +44,10 @@ angular.module('Bastion.components')
|
|
44
44
|
|
45
45
|
this.selection = {allSelected: false, selectAllDisabled: false};
|
46
46
|
|
47
|
-
|
47
|
+
if (!$scope.table.numSelected) {
|
48
|
+
$scope.table.numSelected = 0;
|
49
|
+
}
|
50
|
+
|
48
51
|
$scope.table.chosenRow = null;
|
49
52
|
|
50
53
|
$scope.table.getSelected = function () {
|
@@ -346,9 +346,10 @@ angular.module('Bastion.components').factory('Nutupane',
|
|
346
346
|
if (!column) {
|
347
347
|
return;
|
348
348
|
}
|
349
|
-
|
350
|
-
|
351
|
-
|
349
|
+
if (column.id) {
|
350
|
+
params["sort_by"] = column.id;
|
351
|
+
}
|
352
|
+
if (column.id === sort.by || column.id) {
|
352
353
|
params["sort_order"] = (sort.order === 'ASC') ? 'DESC' : 'ASC';
|
353
354
|
} else {
|
354
355
|
params["sort_order"] = 'ASC';
|
data/lib/bastion/version.rb
CHANGED
@@ -38,6 +38,17 @@ describe('Directive: bstContainerScroll', function() {
|
|
38
38
|
expect(tableElement.height()).toEqual(windowElement.height() - tableElement.offset().top);
|
39
39
|
});
|
40
40
|
|
41
|
+
it("should ensure that the element is at least 200px", function () {
|
42
|
+
windowElement.height('200px');
|
43
|
+
tableElement.css('padding-bottom', '200px');
|
44
|
+
|
45
|
+
compile(tableElement)(scope);
|
46
|
+
scope.$digest();
|
47
|
+
|
48
|
+
windowElement.trigger('resize');
|
49
|
+
expect(tableElement.height()).toEqual(300);
|
50
|
+
});
|
51
|
+
|
41
52
|
it("should add the nutupane details padding if it exists", function () {
|
42
53
|
tableElement.css('padding-bottom', '10px');
|
43
54
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bastion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric D Helms
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: angular-rails-templates
|