bastion 3.2.1 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39736e486baa7a52fa022a34eac73d2b89663f37
4
- data.tar.gz: 76967c212d01faba0a4a720ea7031b22edb04ff0
3
+ metadata.gz: cb88de97c9f4c944ef8dc4bdaa2658887a649946
4
+ data.tar.gz: eb1a8a31b204a4841e605eba9c887882b5436074
5
5
  SHA512:
6
- metadata.gz: cd66d25b82f12bceb3fd6ccddf92de267399a958a7029f4b0325e24161bbe828a5816af5cd01e3e3d47ce31b9b715c4caa8bf0c719fc9e84d2de2e16832278e3
7
- data.tar.gz: c488be0bbd988b1706af2f15b27a2cba0bbe885eb6afe34179b283aebdaf0d49e4ab6f1588023cefebce30b27bef67a18b166254fb79a5af92f464b6aa1b3d15
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
- $window.location.href = $location.absUrl().replace(oldBrowserBastionPath, '');
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
- controller: ['$scope', '$attrs', function ($scope, $attrs) {
22
- $scope.closeable = 'close' in $attrs;
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
- element.outerHeight(windowHeight - offset);
38
- element.height(windowHeight - offset);
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
- $scope.table.numSelected = 0;
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 () {
@@ -9,6 +9,6 @@
9
9
  * Cross application re-usable components
10
10
  */
11
11
  angular
12
- .module('Bastion.components', []);
12
+ .module('Bastion.components', ['ngAnimate']);
13
13
 
14
14
  })();
@@ -346,9 +346,10 @@ angular.module('Bastion.components').factory('Nutupane',
346
346
  if (!column) {
347
347
  return;
348
348
  }
349
-
350
- params["sort_by"] = column.id;
351
- if (column.id === sort.by) {
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';
@@ -13,3 +13,13 @@
13
13
  opacity:0;
14
14
  padding:0 10px;
15
15
  }
16
+
17
+ .alert.ng-leave {
18
+ -webkit-transition: all linear 1s;
19
+ transition: all linear 1s;
20
+ opacity: 1;
21
+ }
22
+
23
+ .alert.ng-leave.ng-leave-active {
24
+ opacity: 0;
25
+ }
@@ -64,6 +64,10 @@ td.row-select {
64
64
  a {
65
65
  color: #FFF;
66
66
  }
67
+
68
+ .bst-edit:hover {
69
+ color: #000;
70
+ }
67
71
  }
68
72
 
69
73
  th.sortable {
@@ -55,3 +55,7 @@ ul {
55
55
  padding-left: 15px;
56
56
  }
57
57
  }
58
+
59
+ .row {
60
+ margin-right: -7px;
61
+ }
@@ -1,3 +1,3 @@
1
1
  module Bastion
2
- VERSION = "3.2.1"
2
+ VERSION = "3.2.2"
3
3
  end
@@ -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.1
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-03-18 00:00:00.000000000 Z
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