HAYASHI Kentaro
null+****@clear*****
Sun Nov 15 18:11:23 JST 2015
HAYASHI Kentaro 2015-11-15 18:11:23 +0900 (Sun, 15 Nov 2015) New Revision: 3e414e106ba4e156f69bac72ce76a6299d2e0c33 https://github.com/groonga/groonga-admin/commit/3e414e106ba4e156f69bac72ce76a6299d2e0c33 Merged b5291d1: Merge pull request #9 from kenhys/add-toggle-columns-feature Message: Toggle checked status of all columns quickly It is useful if many columns are defined in table. Modified files: app/scripts/controllers/table-search-controller.js app/views/tables/search.html Modified: app/scripts/controllers/table-search-controller.js (+9 -0) =================================================================== --- app/scripts/controllers/table-search-controller.js 2015-11-15 17:29:17 +0900 (763aef8) +++ app/scripts/controllers/table-search-controller.js 2015-11-15 18:11:23 +0900 (759c6df) @@ -64,6 +64,8 @@ angular.module('groongaAdminApp') $scope.clear = clear; $scope.toggleSort = toggleSort; $scope.selectDrilldown = selectDrilldown; + $scope.toggleAllColumns = toggleAllColumns; + $scope.toggleAllColumnsChecked = true; } function packColumns(columns) { @@ -211,6 +213,13 @@ angular.module('groongaAdminApp') } } + function toggleAllColumns() { + $scope.table.allColumns.forEach(function(columnInfo) { + columnInfo.output = $scope.toggleAllColumnsChecked; + }); + incrementalSearch(); + } + function toggleSort(column) { var columnInfo = findElement($scope.table.allColumns, function(columnInfo) { return columnInfo.name === column.name; Modified: app/views/tables/search.html (+3 -0) =================================================================== --- app/views/tables/search.html 2015-11-15 17:29:17 +0900 (62206f9) +++ app/views/tables/search.html 2015-11-15 18:11:23 +0900 (09de6d6) @@ -34,6 +34,9 @@ <tr> <th>Name</th> <th> + <input type="checkbox" + ng-model="toggleAllColumnsChecked" + ng-change="toggleAllColumns()"> <span title="Show" class="glyphicon glyphicon-eye-open"></span> </th> -------------- next part -------------- HTML����������������������������...Download