From d006c985ff89509de77df05f14c51ea36aa16d59 Mon Sep 17 00:00:00 2001 From: himetani_cafe Date: Wed, 3 Feb 2016 16:45:45 +0900 Subject: [PATCH] [Develop] Command directive submit() assemble ExecObj On branch master Changes to be committed: modified: front-end/app/scripts/directives/Command.ts modified: front-end/dist/bundle.js --- front-end/app/scripts/directives/Command.ts | 22 ++- front-end/dist/bundle.js | 220 +++++++++++++++++++--------- 2 files changed, 170 insertions(+), 72 deletions(-) diff --git a/front-end/app/scripts/directives/Command.ts b/front-end/app/scripts/directives/Command.ts index 5f7daee..040c5f7 100644 --- a/front-end/app/scripts/directives/Command.ts +++ b/front-end/app/scripts/directives/Command.ts @@ -91,22 +91,32 @@ namespace app.directives { } public submit() { - var params = {}; + var opt = []; angular.forEach(this.options, (option) => { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, (arg) => { if(arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if(inputs.length > 0) { - params[option.option] = inputs; + if(obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + + console.log(execObj); } public removeMySelf(index:number) { diff --git a/front-end/dist/bundle.js b/front-end/dist/bundle.js index efb7398..0e28727 100644 --- a/front-end/dist/bundle.js +++ b/front-end/dist/bundle.js @@ -41125,19 +41125,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -41550,19 +41558,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -41975,19 +41991,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -42400,19 +42424,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -42825,19 +42857,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -43250,19 +43290,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -43675,19 +43723,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -44100,19 +44156,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -44525,19 +44589,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -44950,19 +45022,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); @@ -45375,19 +45455,27 @@ }); } CommandController.prototype.submit = function () { - var params = {}; + var opt = []; angular.forEach(this.options, function (option) { - var inputs = []; + var obj = { + name: option.option, + arguments: [] + }; angular.forEach(option.arg, function (arg) { if (arg.input) { - inputs.push(arg.input); + obj.arguments.push(arg.input); } }); - if (inputs.length > 0) { - params[option.option] = inputs; + if (obj.arguments.length > 0) { + opt.push(obj); } }); - console.log(params); + var execObj = { + command: this.name, + workspace: this.workspace.fileId, + option: opt + }; + console.log(execObj); }; CommandController.prototype.removeMySelf = function (index) { this.remove()(index, this.list); -- 2.11.0