bastion 3.3.0 → 3.3.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 +4 -4
- data/app/assets/javascripts/bastion/components/bst-edit.directive.js +4 -4
- data/app/assets/javascripts/bastion/components/nutupane.factory.js +6 -0
- data/app/assets/javascripts/bastion/layouts/nutupane.html +10 -1
- data/app/assets/stylesheets/bastion/nutupane.scss +1 -1
- data/lib/bastion/version.rb +1 -1
- data/package.json +2 -1
- metadata +2 -5
- data/app/assets/javascripts/bastion/utils/as.filter.js +0 -20
- data/test/utils/as.filter.test.js +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0d3d2dd8dba1c9d5e1e7ec97ea470cbbbf010b5
|
|
4
|
+
data.tar.gz: e1822a868e460069a8a2631f3a6987aaca73bd3c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b93d2e4416c5c77596546b67ecf596bd33c15aee450adc461fb1d274bde2ff747ffa73033281fe9cfa61b511888760ff2cf9a017a3921e9a73520a50b152ca94
|
|
7
|
+
data.tar.gz: 12d400337473db4c91e0e956974eacfbb5e3a6ccd873747323c5ff849a6df3416a05c3cd3a6603eb1d06893e7bb94c47fd6702fa835f4d02158084645d26cacd
|
|
@@ -28,7 +28,7 @@ angular.module('Bastion.components')
|
|
|
28
28
|
$scope.editMode = false;
|
|
29
29
|
$scope.workingMode = true;
|
|
30
30
|
|
|
31
|
-
if (angular.isDefined(action) &&
|
|
31
|
+
if (angular.isDefined(action) && 'then' in action) {
|
|
32
32
|
action.then(
|
|
33
33
|
function () {
|
|
34
34
|
$scope.updateDisplay($scope.model);
|
|
@@ -57,7 +57,7 @@ angular.module('Bastion.components')
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (angular.isDefined(options)) {
|
|
60
|
-
if (
|
|
60
|
+
if ('then' in options) {
|
|
61
61
|
$scope.workingMode = true;
|
|
62
62
|
$scope.editMode = false;
|
|
63
63
|
options.then(function (data) {
|
|
@@ -119,7 +119,7 @@ angular.module('Bastion.components')
|
|
|
119
119
|
|
|
120
120
|
handleDelete = $scope.handleDelete({ value: $scope.model });
|
|
121
121
|
|
|
122
|
-
if (angular.isDefined(handleDelete) &&
|
|
122
|
+
if (angular.isDefined(handleDelete) && 'then' in handleDelete) {
|
|
123
123
|
|
|
124
124
|
handleDelete.then(
|
|
125
125
|
function () {
|
|
@@ -344,7 +344,7 @@ angular.module('Bastion.components')
|
|
|
344
344
|
|
|
345
345
|
handleAdd = $scope.handleAdd(value);
|
|
346
346
|
|
|
347
|
-
if (angular.isDefined(handleAdd) &&
|
|
347
|
+
if (angular.isDefined(handleAdd) && 'then' in handleAdd) {
|
|
348
348
|
|
|
349
349
|
handleAdd.then(
|
|
350
350
|
function () {
|
|
@@ -63,6 +63,7 @@ angular.module('Bastion.components').factory('Nutupane',
|
|
|
63
63
|
if (table.initialLoad) {
|
|
64
64
|
table.refreshing = true;
|
|
65
65
|
table.initialLoad = false;
|
|
66
|
+
table.searchCompleted = false;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
params.page = table.resource.page + 1;
|
|
@@ -259,6 +260,11 @@ angular.module('Bastion.components').factory('Nutupane',
|
|
|
259
260
|
|
|
260
261
|
if (!self.table.working) {
|
|
261
262
|
self.table.refreshing = true;
|
|
263
|
+
if (searchTerm) {
|
|
264
|
+
self.table.searchCompleted = true;
|
|
265
|
+
} else {
|
|
266
|
+
self.table.searchCompleted = false;
|
|
267
|
+
}
|
|
262
268
|
self.query();
|
|
263
269
|
}
|
|
264
270
|
};
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
typeahead-empty
|
|
32
32
|
typeahead-template-url="components/views/autocomplete-scoped-search.html"/>
|
|
33
33
|
<span class="input-group-btn">
|
|
34
|
+
<button class="btn btn-default"
|
|
35
|
+
type="button"
|
|
36
|
+
ng-click='table.search("") && (table.searchCompleted = false)'
|
|
37
|
+
ng-show="table.searchCompleted && table.searchTerm">
|
|
38
|
+
<i class="fa fa-times"></i>
|
|
39
|
+
</button>
|
|
34
40
|
<button ng-click="table.search(table.searchTerm)" class="btn btn-default" type="button">
|
|
35
41
|
<i class="fa fa-search"></i>
|
|
36
42
|
<span translate>Search</span>
|
|
@@ -64,9 +70,12 @@
|
|
|
64
70
|
<span ng-hide="$root.$state.current.collapsed">{{ "Loading..." | translate }}</span>
|
|
65
71
|
</div>
|
|
66
72
|
|
|
67
|
-
<p bst-alert="info" ng-show="table.rows.length === 0 && !table.working">
|
|
73
|
+
<p bst-alert="info" ng-show="table.rows.length === 0 && !table.working && !table.searchTerm && !table.searchCompleted">
|
|
68
74
|
<span data-block="no-rows-message"></span>
|
|
69
75
|
</p>
|
|
76
|
+
<p bst-alert="info" ng-show="table.rows.length === 0 && !table.working && (table.searchTerm || table.searchCompleted)">
|
|
77
|
+
<span data-block="no-search-results-message"></span>
|
|
78
|
+
</p>
|
|
70
79
|
|
|
71
80
|
<div ng-show="table.rows.length > 0" bst-container-scroll data="table.rows">
|
|
72
81
|
<div infinite-scroll="table.nextPage()" infinite-scroll-container="'.container-scroll-wrapper'" infinite-scroll-listen-for-event="nutupane:loaded"
|
data/lib/bastion/version.rb
CHANGED
data/package.json
CHANGED
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.3.
|
|
4
|
+
version: 3.3.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: 2016-
|
|
12
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: angular-rails-templates
|
|
@@ -144,7 +144,6 @@ files:
|
|
|
144
144
|
- app/assets/javascripts/bastion/layouts/select-all-results.html
|
|
145
145
|
- app/assets/javascripts/bastion/menu/menu-expander.service.js
|
|
146
146
|
- app/assets/javascripts/bastion/menu/menu.module.js
|
|
147
|
-
- app/assets/javascripts/bastion/utils/as.filter.js
|
|
148
147
|
- app/assets/javascripts/bastion/utils/form-utils.service.js
|
|
149
148
|
- app/assets/javascripts/bastion/utils/urlencode.filter.js
|
|
150
149
|
- app/assets/javascripts/bastion/utils/utils.module.js
|
|
@@ -212,7 +211,6 @@ files:
|
|
|
212
211
|
- test/i18n/translate.service.test.js
|
|
213
212
|
- test/menu/menu-expander.service.test.js
|
|
214
213
|
- test/test-mocks.module.js
|
|
215
|
-
- test/utils/as.filter.test.js
|
|
216
214
|
- test/utils/form-utils.service.test.js
|
|
217
215
|
- test/utils/urlencode.filter.test.js
|
|
218
216
|
- vendor/assets/javascripts/bastion/angular-animate/angular-animate.js
|
|
@@ -1040,5 +1038,4 @@ test_files:
|
|
|
1040
1038
|
- test/bastion/bastion-resource.factory.test.js
|
|
1041
1039
|
- test/utils/form-utils.service.test.js
|
|
1042
1040
|
- test/utils/urlencode.filter.test.js
|
|
1043
|
-
- test/utils/as.filter.test.js
|
|
1044
1041
|
has_rdoc:
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ngdoc filter
|
|
3
|
-
* @name Bastion.utils.filter:as
|
|
4
|
-
*
|
|
5
|
-
* @requires $parse
|
|
6
|
-
*
|
|
7
|
-
* @description
|
|
8
|
-
* Adds variable to scope with the value passed in. This allows adding to the
|
|
9
|
-
* scope a variable that contains the result of multiple applied filters.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* <ul>
|
|
13
|
-
<li ng-repeat="item in items | filter:customFilter | as:filteredItems"></li>
|
|
14
|
-
</ul>
|
|
15
|
-
*/
|
|
16
|
-
angular.module('Bastion.utils').filter('as', ['$parse', function ($parse) {
|
|
17
|
-
return function (value, path) {
|
|
18
|
-
return $parse(path).assign(this, value);
|
|
19
|
-
};
|
|
20
|
-
}]);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
describe('Filter:as', function() {
|
|
2
|
-
var array, scope = {};
|
|
3
|
-
|
|
4
|
-
beforeEach(module('Bastion.utils'));
|
|
5
|
-
|
|
6
|
-
beforeEach(inject(function($filter) {
|
|
7
|
-
array = [
|
|
8
|
-
{id: 1, name: 'one'},
|
|
9
|
-
{id: 2, name: 'two'},
|
|
10
|
-
{id: 3, name: 'three'}
|
|
11
|
-
];
|
|
12
|
-
scope.asFilter = $filter('as')
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
it("should set items to the value of array", function() {
|
|
16
|
-
expect(scope.asFilter(array, 'items')).toEqual(array);
|
|
17
|
-
expect(scope.items).toEqual(array);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
});
|