Kouhei Sutou
null+****@clear*****
Tue Dec 30 20:24:21 JST 2014
Kouhei Sutou 2014-12-30 20:24:21 +0900 (Tue, 30 Dec 2014) New Revision: c53f3f8a4bca38eac37dc549ceecb3e4d8bc99f6 https://github.com/groonga/groonga-admin/commit/c53f3f8a4bca38eac37dc549ceecb3e4d8bc99f6 Message: table show: use normal column to get property names Modified files: app/scripts/controllers/table-show-controller.js Modified: app/scripts/controllers/table-show-controller.js (+6 -3) =================================================================== --- app/scripts/controllers/table-show-controller.js 2014-12-30 20:11:25 +0900 (9b0adac) +++ app/scripts/controllers/table-show-controller.js 2014-12-30 20:24:21 +0900 (92666c6) @@ -39,9 +39,12 @@ angular.module('groongaAdminApp') $scope.table.columns = columns.sort(function(column1, column2) { return (column1.name > column2.name) ? 1 : -1; }); - if (columns.length > 0) { - var column = columns[columns.length - 1]; - angular.forEach(column.properties, function(value, key) { + var representingColumn = columns.find(function(column) { + return column.name[0] !== '_'; + }); + representingColumn = representingColumn || columns[0]; + if (representingColumn) { + angular.forEach(representingColumn.properties, function(value, key) { $scope.table.columnPropertyNames.push(key); }); } -------------- next part -------------- HTML����������������������������...Descargar