bastion 6.1.11 → 6.1.12
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,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f11831c757e085964eec515d0098685f75cbb377e37f520d7cc491e241a3ef8
|
4
|
+
data.tar.gz: f8aa80f861bc4f05bdc2cf907650325907369eae257e1b4d71815fb80bdf85ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 572b7dac5e2e6c73886d4af66cb1913f51af9091e3b014ca19dfc4e9b7e6905a2c78a417a7b3e1adbd3ba942c3775b0a0d35b23534efab033dca74fe41d94168
|
7
|
+
data.tar.gz: ae41ce75f9710d2021e26191ae466fed3c13aa7cd1f23896a8eb388bedbadc92b1f64415605da9309e55a6b4699f2e60e1e503b6adc1286014fdefc5afe5a678
|
@@ -31,15 +31,14 @@
|
|
31
31
|
}
|
32
32
|
|
33
33
|
scope.showSwitcher = function () {
|
34
|
-
var tableHasRows, isNewPage;
|
35
|
-
|
34
|
+
var tableHasRows, isNewPage, hideSwitcher;
|
36
35
|
// Must have at least two items to switch between them
|
37
36
|
tableHasRows = scope.table && scope.table.rows.length > 1;
|
38
|
-
|
37
|
+
hideSwitcher = scope.hideSwitcher;
|
39
38
|
// Don't show the switcher when creating a new product
|
40
39
|
isNewPage = /new$/.test($location.path());
|
41
40
|
|
42
|
-
return tableHasRows && !isNewPage;
|
41
|
+
return tableHasRows && !isNewPage && !hideSwitcher;
|
43
42
|
};
|
44
43
|
|
45
44
|
scope.changeResource = function (id) {
|
@@ -50,7 +49,7 @@
|
|
50
49
|
};
|
51
50
|
|
52
51
|
unregisterWatcher = scope.$watch('table.rows', function (rows) {
|
53
|
-
var currentId = parseInt($location.path().match(/\d+/)[0], 10);
|
52
|
+
var currentId = $location.path().match(/\d+/) ? parseInt($location.path().match(/\d+/)[0], 10) : null;
|
54
53
|
|
55
54
|
angular.forEach(rows, function (row) {
|
56
55
|
if (row.id === currentId) {
|
@@ -97,11 +97,7 @@
|
|
97
97
|
</li>
|
98
98
|
</ul>
|
99
99
|
|
100
|
-
<
|
101
|
-
Current Page
|
102
|
-
</label>
|
103
|
-
|
104
|
-
<input id="currentPage" ng-show="table.resource.subtotal > 0" class="pagination-pf-page" type="text" ng-model="table.params.page"
|
100
|
+
<input ng-show="table.resource.subtotal > 0" class="pagination-pf-page" type="text" ng-model="table.params.page"
|
105
101
|
ng-blur="table.changePage(table.params.page)" bst-on-enter="table.changePage(table.params.page)"/>
|
106
102
|
|
107
103
|
<input ng-show="table.resource.subtotal === 0" class="pagination-pf-page" type="text" readonly="true" ng-value="table.resource.subtotal"/>
|
data/lib/bastion/version.rb
CHANGED
@@ -35,7 +35,7 @@ describe('Directive: bstResourceSwitcher', function() {
|
|
35
35
|
TableCache = {
|
36
36
|
getTable: function () {}
|
37
37
|
};
|
38
|
-
|
38
|
+
hideSwitcher = true;
|
39
39
|
$provide.value('translateFilter', function(a) { return a; });
|
40
40
|
$provide.value('$breadcrumb', $breadcrumb);
|
41
41
|
$provide.value('$location', $location);
|
@@ -83,5 +83,27 @@ describe('Directive: bstResourceSwitcher', function() {
|
|
83
83
|
|
84
84
|
expect($location.path).toHaveBeenCalledWith('/fake/2');
|
85
85
|
});
|
86
|
+
|
87
|
+
it("be able to show the resource switcher", function () {
|
88
|
+
createDirective();
|
89
|
+
scope.table = {
|
90
|
+
rows : {
|
91
|
+
length : 5
|
92
|
+
}
|
93
|
+
};
|
94
|
+
scope.hideSwitcher = false;
|
95
|
+
expect(scope.showSwitcher()).toBe(true);
|
96
|
+
});
|
97
|
+
|
98
|
+
it("be able to hide the resource switcher", function () {
|
99
|
+
createDirective();
|
100
|
+
scope.table = {
|
101
|
+
rows : {
|
102
|
+
length : 5
|
103
|
+
}
|
104
|
+
};
|
105
|
+
scope.hideSwitcher = true;
|
106
|
+
expect(scope.showSwitcher()).toBe(false);
|
107
|
+
});
|
86
108
|
});
|
87
109
|
});
|
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: 6.1.
|
4
|
+
version: 6.1.12
|
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: 2018-
|
12
|
+
date: 2018-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: angular-rails-templates
|