From: himetani_cafe Date: Mon, 8 Feb 2016 09:09:28 +0000 (+0900) Subject: [Develop ang manual test] TagFilter at SelectCommand Modal X-Git-Tag: v0.3.0p0045 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0d8bdded5ad896318508faea20a28aab56176446;p=eos%2Fzephyr.git [Develop ang manual test] TagFilter at SelectCommand Modal On branch master Changes to be committed: modified: app/scripts/App.ts modified: app/scripts/controllers/SelectCommand.ts new file: app/scripts/filters/Tag.ts modified: app/scripts/reference.ts modified: app/templates/select-command.html modified: dist/bundle.js modified: dist/templates/select-command.html --- diff --git a/front-end/app/scripts/App.ts b/front-end/app/scripts/App.ts index b6524fe..d640627 100644 --- a/front-end/app/scripts/App.ts +++ b/front-end/app/scripts/App.ts @@ -36,7 +36,10 @@ namespace app { }); zephyr.service('APIEndPoint', services.APIEndPoint); + + zephyr.filter('Tag', filters.Tag); zephyr.controller('selectCommandController', controllers.SelectCommand); + zephyr.service('MyModal', services.MyModal); zephyr.controller('executionController', controllers.Execution); diff --git a/front-end/app/scripts/controllers/SelectCommand.ts b/front-end/app/scripts/controllers/SelectCommand.ts index 20637cc..ad5b060 100644 --- a/front-end/app/scripts/controllers/SelectCommand.ts +++ b/front-end/app/scripts/controllers/SelectCommand.ts @@ -20,8 +20,12 @@ namespace app.controllers { .$promise.then((result) => { controller.commands = result.info; }); - this.currnetTag = 'all'; + this.currentTag = 'all'; } + + private changeTag(tag: string) { + this.currentTag = tag; + } } } diff --git a/front-end/app/scripts/filters/Tag.ts b/front-end/app/scripts/filters/Tag.ts new file mode 100644 index 0000000..4a8bc14 --- /dev/null +++ b/front-end/app/scripts/filters/Tag.ts @@ -0,0 +1,16 @@ +namespace filters { + export function Tag() { + return function(commands, tag) { + var result = [] + angular.forEach(commands, function(command) { + var flag = false + angular.forEach(command.tags, function(value) { + if (tag === value) flag = true + }) + if(flag) result.push(command) + }) + return result + } + } +} + diff --git a/front-end/app/scripts/reference.ts b/front-end/app/scripts/reference.ts index e20acb8..401de15 100644 --- a/front-end/app/scripts/reference.ts +++ b/front-end/app/scripts/reference.ts @@ -15,3 +15,4 @@ /// /// +/// diff --git a/front-end/app/templates/select-command.html b/front-end/app/templates/select-command.html index 0486342..f8eeba8 100644 --- a/front-end/app/templates/select-command.html +++ b/front-end/app/templates/select-command.html @@ -6,7 +6,7 @@
- +
@@ -27,7 +27,7 @@ -
+
diff --git a/front-end/dist/bundle.js b/front-end/dist/bundle.js index f46514e..098d214 100644 --- a/front-end/dist/bundle.js +++ b/front-end/dist/bundle.js @@ -41438,13 +41438,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -41477,6 +41501,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -41935,13 +41960,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -41974,6 +42023,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -42432,13 +42482,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -42471,6 +42545,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -42929,13 +43004,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -42968,6 +43067,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -43426,13 +43526,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -43465,6 +43589,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -43923,13 +44048,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -43962,6 +44111,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -44420,13 +44570,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -44459,6 +44633,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -44917,13 +45092,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -44956,6 +45155,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -45414,13 +45614,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -45453,6 +45677,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -45911,13 +46136,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -45950,6 +46199,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -46408,13 +46658,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -46447,6 +46721,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); @@ -46905,13 +47180,37 @@ .$promise.then(function (result) { controller.commands = result.info; }); + this.currentTag = 'all'; } + SelectCommand.prototype.changeTag = function (tag) { + this.currentTag = tag; + console.log(this.currentTag); + }; SelectCommand.$inject = ['$scope', 'APIEndPoint']; return SelectCommand; })(); controllers.SelectCommand = SelectCommand; })(controllers = app.controllers || (app.controllers = {})); })(app || (app = {})); + var filters; + (function (filters) { + function Tag() { + return function (commands, tag) { + var result = []; + angular.forEach(commands, function (command) { + var flag = false; + angular.forEach(command.tags, function (value) { + if (tag === value) + flag = true; + }); + if (flag) + result.push(command); + }); + return result; + }; + } + filters.Tag = Tag; + })(filters || (filters = {})); var app; (function (app) { 'use strict'; @@ -46944,6 +47243,7 @@ }); }); app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.filter('Tag', filters.Tag); app.zephyr.controller('selectCommandController', app.controllers.SelectCommand); app.zephyr.service('MyModal', app.services.MyModal); app.zephyr.controller('executionController', app.controllers.Execution); diff --git a/front-end/dist/templates/select-command.html b/front-end/dist/templates/select-command.html index 0486342..f8eeba8 100644 --- a/front-end/dist/templates/select-command.html +++ b/front-end/dist/templates/select-command.html @@ -6,7 +6,7 @@
- +
@@ -27,7 +27,7 @@ -