bastion 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmZkODBmYTE4ZGUzY2E3ZDAwYzFmNmZiOWRkMzMwYTI3NDY0MzBhOQ==
4
+ MmYwYjI1ZmU4ZGQyMjk3MjAwYWI3NzEyZjQyMGM4ODNiNDc3MWUyYw==
5
5
  data.tar.gz: !binary |-
6
- NDMyOGVjYzE2ZDZjM2Q4YjdhZWYzYzE4OTM4NmExNDY2MTc4NmY4MQ==
6
+ MTA0YTNkZjhjYzU0NjE2YmZhYWJiZmNjYTRhZjBmZWFlMTQ1MzM0NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTNlYTM4MDRjNWMwMmUxY2YwZGJlNzY1MTEwY2U4OTFhMjMzZjk0YmVmMjg4
10
- ZWJkNjVhOTVjODViZGQ2MjlhMDExNzNhZjZlMzVhYjhmNjJhZWY0NDVkOGYw
11
- M2E4ZTJkNjJjZWU4ODNhMDUzYmJjMjljYjk4YmMwZWM0MDhlZDU=
9
+ N2E2NGYyNTQ0NDVkYTc4NjlmNTI5ZDQyYmFjMDM0Nzc2NzFhOGQxODM4MjE4
10
+ MGFmMGIyMmYwNzJmYjM2YTNjNGZiMzY2OGFjY2Q1MDhjMWJiOTc5ZjdjYzg0
11
+ ZDE4MmMyOGNiNjZkYjliMDZkZTMzMjY0ZDk2ZTg0ZDI3ZTZjYWM=
12
12
  data.tar.gz: !binary |-
13
- MGQ1NTE2NjYwM2RjYjczZWE3ZTA4ZjQ2ZjQ3OTM4MDYzNmJkZTQ3NGU4MGU4
14
- YzMxNTVmMWE1MzJhNWFiYzM5NTJkZDk3YWEzMDM4NGNhYTI0OGY1N2EyYzE1
15
- MmM2NGQyOWQzOGFjMWFiY2Y4MWRlNzI0MzFhNzU0MzY2YmI4MDI=
13
+ MGE4ZWJhMGZjNDI5YWMzYTU0NzFmOTZiNDVhYWQxMWE0NjBhMTc1Njg0ZWMw
14
+ Mzc5NGE0NjJjYzY4MDA0Y2Q2MjBmZTRhY2FhZmYyZWVmNDU2MzI2NThiYTJi
15
+ NTJmYTA1ZTgyNjA2Mzg2OGQ3OTViZWYzMTc0ZmYyZDE5ZTE0YjU=
@@ -3,12 +3,14 @@
3
3
  * @name Bastion.components.directive:bstTable
4
4
  * @restrict A
5
5
  *
6
+ * @requires $window
7
+ *
6
8
  * @description
7
9
  *
8
10
  * @example
9
11
  */
10
12
  angular.module('Bastion.components')
11
- .directive('bstTable', [function () {
13
+ .directive('bstTable', ['$window', function ($window) {
12
14
  return {
13
15
  restrict: 'A',
14
16
  replace: true,
@@ -17,7 +19,22 @@ angular.module('Bastion.components')
17
19
  'rowSelect': '@',
18
20
  'rowChoice': '@'
19
21
  },
20
- controller: 'BstTableController'
22
+ controller: 'BstTableController',
23
+ link: function (scope) {
24
+ var resize = function () {
25
+ angular.element($window).trigger('resize');
26
+ };
27
+
28
+ // Trigger resize after resource $promise is resolved
29
+ scope.$watch('table.resource', function (resource) {
30
+ if (resource && resource.hasOwnProperty('$promise')) {
31
+ resource.$promise.then(resize);
32
+ }
33
+ });
34
+
35
+ // Trigger resize when rows change
36
+ scope.$watch('table.rows', resize);
37
+ }
21
38
  };
22
39
  }])
23
40
  .controller('BstTableController', ['$scope', function ($scope) {
@@ -52,14 +52,6 @@ angular.module('Bastion.components').directive('nutupaneTable', ['$compile', '$w
52
52
  angular.forEach(originalTable.find('th'), function (th, index) {
53
53
  $compile(clonedThs[index])(angular.element(th).scope());
54
54
  });
55
-
56
- originalTable.bind("DOMNodeInserted", function () {
57
- windowElement.trigger('resize');
58
- });
59
-
60
- originalTable.bind("DOMNodeInsertedIntoDocument", function () {
61
- windowElement.trigger('resize');
62
- });
63
55
  }
64
56
 
65
57
  scope.$on("$stateChangeSuccess", function (event, newState, newParams, oldState) {
@@ -1,3 +1,3 @@
1
1
  module Bastion
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bastion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katello
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-27 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: angular-rails-templates