bastion 6.1.0 → 6.1.1

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: d2624c30e050fec596f8341365cf7d757cfee32f
4
- data.tar.gz: 68769000b30bc44480bf3e56129779a0cd0ad568
3
+ metadata.gz: 7729db238b36593ee32fbb0c4292d496ec25a99e
4
+ data.tar.gz: 96f7b052e48d8b040dd4295b6c05d7df6c3e0023
5
5
  SHA512:
6
- metadata.gz: d0b6d2b4b1d9f8ec9dd994931f6d8ddf045e2ad4337d27a263eb595b69219f55b973a66c5c659977a865af367849ca16d80e3ebc9cdae7211ccd4d0ef0acbcb4
7
- data.tar.gz: b68dc2fdf849417d3f97dd922e40124403f2c87e95e965ae1d41420f6cf068cbca796794e26614d4f55fabff6002976c5c3a564e265903d10464b6cea0ca99d3
6
+ metadata.gz: cde5fb451f1ffcd5b3e10d5a38150ae92377adc37f15a22317d9f45c61bed2f4a6d65e23ab82dd3a365c93b4a558936a5731092fc377609baaab3e051322c941
7
+ data.tar.gz: 9c8206065bef6a78f548009b07f6af768d097bf30e86b113b297a1962528e515e7088c493d621f04b6929fefb3802f583a6d879eb558f01d1c3f972db96e57b8
@@ -30,6 +30,18 @@
30
30
  scope.table = TableCache.getTable(getTableName(listUrl));
31
31
  }
32
32
 
33
+ scope.showSwitcher = function () {
34
+ var tableHasRows, isNewPage;
35
+
36
+ // Must have at least two items to switch between them
37
+ tableHasRows = scope.table && scope.table.rows.length > 1;
38
+
39
+ // Don't show the switcher when creating a new product
40
+ isNewPage = /new$/.test($location.path());
41
+
42
+ return tableHasRows && !isNewPage;
43
+ };
44
+
33
45
  scope.changeResource = function (id) {
34
46
  var currentUrl, nextUrl;
35
47
  currentUrl = $location.path();
@@ -1,4 +1,4 @@
1
- <span uib-dropdown ng-show="table.rows" on-toggle="toggled(open)">
1
+ <span uib-dropdown ng-show="showSwitcher()" on-toggle="toggled(open)">
2
2
  <a uib-dropdown-toggle>
3
3
  <i class="fa fa-exchange"></i>
4
4
  </a>
@@ -1,3 +1,3 @@
1
1
  module Bastion
2
- VERSION = "6.1.0"
2
+ VERSION = "6.1.1"
3
3
  end
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.0
4
+ version: 6.1.1
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: 2017-09-25 00:00:00.000000000 Z
12
+ date: 2017-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: angular-rails-templates