bastion 1.0.0 → 1.0.1

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDZmYjQ1YTVjZTdlNTY3Yjc0ZDRlYTUyMzgxYWExMzZjNzg5ZGJhMQ==
4
+ OTA5OTk1ZThkOWY1YjgxNzBlZTk4ZmI2ZWUwOTQ2YzU4YWU2YmZkMA==
5
5
  data.tar.gz: !binary |-
6
- ZDc1ZDkwMmY4OTMzNzg3ZWEwNDk0NjRjMDJhM2RjMzgxZDA1NDI4Nw==
6
+ YjMxMjBlNTk3N2M0ZmU4YzhhMmQzM2E5Yjg0OGRmOTQyZmRkNWQ2ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTk3NzhkNmJlY2I3MmJiYTE5MWY5NGM2OTI4NmUyYWUyNzg4ZDliN2ZlMmZj
10
- ZjFkNDRlOTFhYTQ2NWEyNDgzYTIxNzYwMjEwOWJhNzk2NTMzNTcwNDVhNjVm
11
- ZmY0ZTdmNDUzNDc3MmVlYTVjNmFiMTg2NDljMGM2ZTZmZTIzYTg=
9
+ YjIyM2U4MzFlYWExODQzMDRhZWZiNTU0ZGUyNjZkYjRhNmMyYTI3NmFhNDQ2
10
+ ODM0NWZlOTc5MTQ2MTIyZjk2NjljZTZjYTgxMDczMDAwYThkNTNkMmI1MzBj
11
+ YWNhZDc5MDRjNzIyN2Y5MjhiOWJlOWYzYzBhMGYyZTI1Yzg5MGU=
12
12
  data.tar.gz: !binary |-
13
- NDMyM2IwMzEzYzU1YWIyM2UyNjM0ZjRlN2Q2NmE3NDBjYTEzOGFlZTAyNjJh
14
- NzVhYmEzNmVhNGZjZjJlNzFiZjIyNDY3MTlhYjE2OTUzYzFhNThkYzNhNzI0
15
- NmI3ZmExN2Y4NGU0NzgzMTEwMWVmYTY2MTcyODAxM2YxNzdjMDM=
13
+ MTJmZWQ2MjI4ZTBkMjVmYmE5MGU0ZWZmYmE0YThhNTc1ZDQ2N2ZkYTI2NTFm
14
+ MzU3YjEzM2Q5MTkxZDM5NGFhOWRlN2NkZTBmNGM3YjEyZTQ4M2M0YmNmZGJk
15
+ MTZjMDI1OWIwNzgwYzE4MjcwNjY1NmU4OTUwMzFlZjdhNDk4Yzk=
@@ -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) {
@@ -58,14 +58,6 @@ angular.module('Bastion.components').directive('nutupaneTable', ['$compile', '$w
58
58
  angular.forEach(originalTable.find('th'), function (th, index) {
59
59
  $compile(clonedThs[index])(angular.element(th).scope());
60
60
  });
61
-
62
- originalTable.bind("DOMNodeInserted", function () {
63
- windowElement.trigger('resize');
64
- });
65
-
66
- originalTable.bind("DOMNodeInsertedIntoDocument", function () {
67
- windowElement.trigger('resize');
68
- });
69
61
  }
70
62
 
71
63
  scope.$on("$stateChangeSuccess", function (event, newState, newParams, oldState) {
data/eslint.yaml CHANGED
@@ -17,6 +17,9 @@ rules:
17
17
  quotes: 0
18
18
  camelcase: 2
19
19
  indent: 2
20
+ new-cap:
21
+ - 2
22
+ - {"newIsCap": true, "capIsNew": false}
20
23
  no-mixed-spaces-and-tabs: 2
21
24
  no-multiple-empty-lines: 2
22
25
  no-trailing-spaces: 2
@@ -1,3 +1,3 @@
1
1
  module Bastion
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katello
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-03 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: angular-rails-templates