From 9fa06a9fa78a955bf3a1c280c9b391f57a6ad898 Mon Sep 17 00:00:00 2001 From: himetani_cafe Date: Thu, 28 Jan 2016 04:22:47 +0900 Subject: [PATCH] =?utf8?q?[Develop=20and=20Manual=20test]=20/workspace=20?= =?utf8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E9=96=8B=E7=99=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit /workspaceに、workspace内の全てのファイルを表示。 On branch master Changes to be committed: modified: front-end/app/scripts/App.ts modified: front-end/app/scripts/controllers/Execution.ts modified: front-end/app/scripts/controllers/Workspace.ts modified: front-end/app/scripts/declares.ts modified: front-end/app/scripts/directives/Command.ts new file: front-end/app/scripts/directives/Directory.ts modified: front-end/app/scripts/entry.ts modified: front-end/app/scripts/reference.ts modified: front-end/app/scripts/services/APIEndPoint.ts modified: front-end/app/templates/command.html new file: front-end/app/templates/directory.html modified: front-end/app/templates/workspace.html modified: front-end/dist/bundle.js modified: front-end/dist/templates/command.html new file: front-end/dist/templates/directory.html modified: front-end/dist/templates/workspace.html --- front-end/app/scripts/App.ts | 2 + front-end/app/scripts/controllers/Execution.ts | 8 + front-end/app/scripts/controllers/Workspace.ts | 28 +- front-end/app/scripts/declares.ts | 12 +- front-end/app/scripts/directives/Command.ts | 4 +- front-end/app/scripts/directives/Directory.ts | 80 ++ front-end/app/scripts/entry.ts | 1 + front-end/app/scripts/reference.ts | 1 + front-end/app/scripts/services/APIEndPoint.ts | 1 - front-end/app/templates/command.html | 2 +- front-end/app/templates/directory.html | 23 + front-end/app/templates/workspace.html | 9 +- front-end/dist/bundle.js | 1258 ++++++++++++++++++++++-- front-end/dist/templates/command.html | 2 +- front-end/dist/templates/directory.html | 23 + front-end/dist/templates/workspace.html | 9 +- 16 files changed, 1358 insertions(+), 105 deletions(-) create mode 100644 front-end/app/scripts/directives/Directory.ts create mode 100644 front-end/app/templates/directory.html create mode 100644 front-end/dist/templates/directory.html diff --git a/front-end/app/scripts/App.ts b/front-end/app/scripts/App.ts index 617d1f0..9b819dc 100644 --- a/front-end/app/scripts/App.ts +++ b/front-end/app/scripts/App.ts @@ -43,9 +43,11 @@ namespace app { zephyr.controller('historyController', controllers.History); zephyr.controller('commandController', directives.CommandController); zephyr.controller('optionController', directives.OptionController); + zephyr.controller('directoryController', directives.DirectoryController); zephyr.directive('headerMenu', directives.HeaderMenu.Factory()); zephyr.directive('command', directives.Command.Factory()); zephyr.directive('option', directives.Option.Factory()); + zephyr.directive('directory', directives.Directory.Factory()); } diff --git a/front-end/app/scripts/controllers/Execution.ts b/front-end/app/scripts/controllers/Execution.ts index 22127e0..fc931f7 100644 --- a/front-end/app/scripts/controllers/Execution.ts +++ b/front-end/app/scripts/controllers/Execution.ts @@ -26,6 +26,14 @@ namespace app.controllers { public remove(index: number, list: declares.CommandInfo[]) { list.splice(index, 1); + + /** + * Commandディレクティブから実行する際にはExecution.commandInfoListの参照を取得できない。 + * ディレクティブ経由でExecution.commandInfoListの参照を取得。 + * this.commandInfoList.splice(index, 1); + * 上記のコードは実行できない。 + * thisがremoveの呼び出し元となるため。 + */ } public close() { diff --git a/front-end/app/scripts/controllers/Workspace.ts b/front-end/app/scripts/controllers/Workspace.ts index 76d1c77..273dd69 100644 --- a/front-end/app/scripts/controllers/Workspace.ts +++ b/front-end/app/scripts/controllers/Workspace.ts @@ -2,22 +2,32 @@ namespace app.controllers { export class Workspace { public page: string; - public fileInfo: declares.IFileInfo[]; + public directoryList: declares.IDirectoryInfo[]; public static $inject = ['$scope', 'APIEndPoint']; constructor(private $scope: ng.IScope, private APIEndPoint: services.APIEndPoint) { + this.directoryList = []; + var controller = this; + var directoryList = this.directoryList; - this.page = 'workspace'; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt:'', + path: '/' + }; + directoryList.push(o); - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') // rootのfileId - .$promise - .then(function(result) { - controller.fileInfo = result.info; - console.log(result); - }); } + + public addDirectory(info: declares.IDirectoryInfo, directoryList: declares.IDirectoryInfo[]) { + directoryList.push(info); + } + } } diff --git a/front-end/app/scripts/declares.ts b/front-end/app/scripts/declares.ts index 5214228..cd764b8 100644 --- a/front-end/app/scripts/declares.ts +++ b/front-end/app/scripts/declares.ts @@ -31,11 +31,21 @@ namespace app.declares { fileId: string, name: string, parentId: string, - fileType: number, + fileType: string, createdAt: string, updatedAt: string } + export interface IDirectoryInfo extends IFileInfo { + fileId: string, + name: string, + parentId: string, + fileType: string, + createdAt: string, + updatedAt: string, + path: string + } + export interface IResponse extends ng.resource.IResource { status: string, info: any diff --git a/front-end/app/scripts/directives/Command.ts b/front-end/app/scripts/directives/Command.ts index a40614f..ec6bec9 100644 --- a/front-end/app/scripts/directives/Command.ts +++ b/front-end/app/scripts/directives/Command.ts @@ -47,7 +47,7 @@ namespace app.directives { public static $inject = ['APIEndPoint', '$scope']; - // From parent directive.show bindToController property + // From parent directive bindToController property private index: string; private name: string; private remove: Function; @@ -64,6 +64,8 @@ namespace app.directives { constructor(private APIEndPoint: services.APIEndPoint, private $scope: ng.IScope) { var controller = this; + console.log(this.list); + // Get OptionControlFile and bind it to $scope.options this.APIEndPoint .getOptionControlFile('dcdFilePrint') diff --git a/front-end/app/scripts/directives/Directory.ts b/front-end/app/scripts/directives/Directory.ts new file mode 100644 index 0000000..e39bfae --- /dev/null +++ b/front-end/app/scripts/directives/Directory.ts @@ -0,0 +1,80 @@ +namespace app.directives { + + export class Directory implements ng.IDirective { + + public restrict: string; + public replace: boolean; + public templateUrl: string; + private fileInfo: declares.IFileInfo; + public controller: string; + public controllerAs: string; + public bindToController: Object; + + /** + * constructor + * + * @param + */ + constructor() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + + /** + * instance生成 + * @returns {function(): HeaderMenu} + * @constructor + */ + public static Factory(): ng.IDirectiveFactory { + var directive = () => { + return new Directory(); + }; + return directive; + } + } + + export class DirectoryController { + + public static $inject = ['APIEndPoint', '$scope']; + + // From parent directive bindToController property + public info: declares.IDirectoryInfo; + public files:declares.IFileInfo[]; + public add: Function; + public list: declares.IDirectoryInfo[]; + + constructor(private APIEndPoint: services.APIEndPoint, private $scope: ng.IScope) { + var controller = this; + + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then((result) => { + if(result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, (file) => { + if(file.fileType === '0') { + var o = file; + if(controller.info.path === '/') { + o.path = '/' + file.name; + } else { + o.path = controller.info.path + '/' + file.name; + } + + controller.add()(o, controller.list); + } + }); + }; + }); + } + } +} diff --git a/front-end/app/scripts/entry.ts b/front-end/app/scripts/entry.ts index 72e6eb6..00f169f 100644 --- a/front-end/app/scripts/entry.ts +++ b/front-end/app/scripts/entry.ts @@ -15,6 +15,7 @@ import './services/MyModal.ts'; import './directives/Option.ts'; import './directives/Command.ts'; import './directives/HeaderMenu.ts'; +import './directives/Directory.ts'; // controllers import './controllers/Execution.ts'; diff --git a/front-end/app/scripts/reference.ts b/front-end/app/scripts/reference.ts index 9e58a1c..3e70e6e 100644 --- a/front-end/app/scripts/reference.ts +++ b/front-end/app/scripts/reference.ts @@ -8,6 +8,7 @@ /// /// /// +/// /// /// diff --git a/front-end/app/scripts/services/APIEndPoint.ts b/front-end/app/scripts/services/APIEndPoint.ts index 5235d09..865b3bc 100644 --- a/front-end/app/scripts/services/APIEndPoint.ts +++ b/front-end/app/scripts/services/APIEndPoint.ts @@ -30,7 +30,6 @@ namespace app.services { if(fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); } } diff --git a/front-end/app/templates/command.html b/front-end/app/templates/command.html index 13ba289..f9beaed 100644 --- a/front-end/app/templates/command.html +++ b/front-end/app/templates/command.html @@ -1,5 +1,5 @@
- +

[{{ctrl.index}}: {{ctrl.name}}] diff --git a/front-end/app/templates/directory.html b/front-end/app/templates/directory.html new file mode 100644 index 0000000..150e1fd --- /dev/null +++ b/front-end/app/templates/directory.html @@ -0,0 +1,23 @@ +
+ + + + + + + + + + + + + + + + + + + + +
namefileIdparentIdfileTypecreatedAtupdatedAt
{{l.name}}{{l.fileId}}{{l.parentId}}{{l.fileType}}{{l.createdAt}}{{l.updatedAt}}
+
diff --git a/front-end/app/templates/workspace.html b/front-end/app/templates/workspace.html index bbd378c..bf7925a 100644 --- a/front-end/app/templates/workspace.html +++ b/front-end/app/templates/workspace.html @@ -1,3 +1,6 @@ -workspace - -{{c.page}} +
+
+ +
+ +
diff --git a/front-end/dist/bundle.js b/front-end/dist/bundle.js index f162847..bfadc62 100644 --- a/front-end/dist/bundle.js +++ b/front-end/dist/bundle.js @@ -58,6 +58,7 @@ __webpack_require__(15); __webpack_require__(16); __webpack_require__(17); + __webpack_require__(18); /***/ }, @@ -41034,7 +41035,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -41102,6 +41102,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -41210,6 +41211,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -41247,16 +41308,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -41315,9 +41383,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -41362,7 +41432,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -41430,6 +41499,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -41538,6 +41608,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -41575,16 +41705,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -41643,9 +41780,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -41690,7 +41829,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -41758,6 +41896,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -41866,6 +42005,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -41903,16 +42102,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -41971,9 +42177,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -42018,7 +42226,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -42086,6 +42293,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -42194,6 +42402,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -42231,16 +42499,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -42299,9 +42574,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -42346,7 +42623,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -42414,6 +42690,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -42522,6 +42799,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -42559,16 +42896,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -42627,9 +42971,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -42674,7 +43020,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -42742,6 +43087,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -42850,6 +43196,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -42887,16 +43293,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -42955,9 +43368,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -43002,7 +43417,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -43070,6 +43484,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -43178,6 +43593,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -43215,16 +43690,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -43283,9 +43765,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -43330,7 +43814,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -43398,6 +43881,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -43506,6 +43990,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -43543,16 +44087,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -43611,9 +44162,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -43658,7 +44211,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -43726,6 +44278,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -43834,6 +44387,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -43871,16 +44484,23 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; - this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') - .$promise - .then(function (result) { - controller.fileInfo = result.info; - console.log(result); - }); + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -43939,9 +44559,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); @@ -43986,7 +44608,6 @@ if (fileId) { endPoint += '/' + fileId; } - console.log(endPoint); return this.resource(endPoint).get(); }; return APIEndPoint; @@ -44054,6 +44675,7 @@ this.APIEndPoint = APIEndPoint; this.$scope = $scope; var controller = this; + console.log(this.list); this.APIEndPoint .getOptionControlFile('dcdFilePrint') .$promise @@ -44162,6 +44784,66 @@ })(app || (app = {})); var app; (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { var controllers; (function (controllers) { var Execution = (function () { @@ -44199,16 +44881,420 @@ function Workspace($scope, APIEndPoint) { this.$scope = $scope; this.APIEndPoint = APIEndPoint; + this.directoryList = []; var controller = this; - this.page = 'workspace'; + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); + } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; + Workspace.$inject = ['$scope', 'APIEndPoint']; + return Workspace; + })(); + controllers.Workspace = Workspace; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var History = (function () { + function History($scope) { + this.page = "History"; + } + History.$inject = ['$scope']; + return History; + })(); + controllers.History = History; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + 'use strict'; + var appName = 'zephyr'; + app.zephyr = angular.module(appName, ['ui.router', 'ngResource', 'ui.bootstrap']); + app.zephyr.config(function ($stateProvider, $urlRouterProvider, $locationProvider) { + $urlRouterProvider.otherwise('/execution'); + $locationProvider.html5Mode({ + enabled: true, + requireBase: false + }); + $stateProvider + .state('execution', { + url: '/execution', + templateUrl: 'templates/execution.html', + controller: 'executionController', + controllerAs: 'c' + }) + .state('workspace', { + url: '/workspace', + templateUrl: 'templates/workspace.html', + controller: 'workspaceController', + controllerAs: 'c' + }) + .state('history', { + url: '/history', + templateUrl: 'templates/history.html', + controller: 'historyController', + controllerAs: 'c' + }); + }); + app.zephyr.service('APIEndPoint', app.services.APIEndPoint); + app.zephyr.service('MyModal', app.services.MyModal); + app.zephyr.controller('executionController', app.controllers.Execution); + app.zephyr.controller('workspaceController', app.controllers.Workspace); + app.zephyr.controller('historyController', app.controllers.History); + app.zephyr.controller('commandController', app.directives.CommandController); + app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); + app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); + app.zephyr.directive('command', app.directives.Command.Factory()); + app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); + })(app || (app = {})); + + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + var app; + (function (app) { + var declares; + (function (declares) { + var CommandInfo = (function () { + function CommandInfo(name) { + this.name = name; + } + return CommandInfo; + })(); + declares.CommandInfo = CommandInfo; + })(declares = app.declares || (app.declares = {})); + })(app || (app = {})); + var app; + (function (app) { + var services; + (function (services) { + var APIEndPoint = (function () { + function APIEndPoint($resource) { + this.$resource = $resource; + } + APIEndPoint.prototype.resource = function (endPoint) { + var customAction = { + method: 'GET', + isArray: false + }; + return this.$resource(endPoint, {}, { customAction: customAction }); + }; + APIEndPoint.prototype.getOptionControlFile = function (command) { + var endPoint = '/api/optionControlFile/' + command; + return this.resource(endPoint).get(); + }; + APIEndPoint.prototype.getFiles = function (fileId) { + var endPoint = '/api/v1/workspace'; + if (fileId) { + endPoint += '/' + fileId; + } + return this.resource(endPoint).get(); + }; + return APIEndPoint; + })(); + services.APIEndPoint = APIEndPoint; + })(services = app.services || (app.services = {})); + })(app || (app = {})); + var app; + (function (app) { + var services; + (function (services) { + var MyModal = (function () { + function MyModal($uibModal) { + this.$uibModal = $uibModal; + this.modalOption = { + backdrop: true, + controller: null, + templateUrl: null, + size: null + }; + } + MyModal.prototype.open = function (modalName) { + if (modalName === 'SelectCommand') { + this.modalOption.templateUrl = 'templates/select-command.html'; + this.modalOption.size = 'lg'; + } + return this.$uibModal.open(this.modalOption); + }; + return MyModal; + })(); + services.MyModal = MyModal; + })(services = app.services || (app.services = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var Command = (function () { + function Command() { + this.restrict = 'E'; + this.replace = true; + this.scope = true; + this.controller = 'commandController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + index: '=', + name: '=', + remove: '&', + list: '=' + }; + this.templateUrl = 'templates/command.html'; + } + Command.Factory = function () { + var directive = function () { + return new Command(); + }; + directive.$inject = []; + return directive; + }; + return Command; + })(); + directives.Command = Command; + var CommandController = (function () { + function CommandController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + console.log(this.list); this.APIEndPoint - .getFiles('1f83f620-c1ed-11e5-9657-7942989daa04') + .getOptionControlFile('dcdFilePrint') .$promise .then(function (result) { - controller.fileInfo = result.info; console.log(result); + controller.options = result.info; }); + this.files = ['a.file', 'b.file', 'c.file']; + this.heading = "[" + this.index + "]: dcdFilePring"; + this.isOpen = true; + this.$scope.$on('close', function () { + controller.isOpen = false; + }); + } + CommandController.prototype.submit = function () { + var params = {}; + angular.forEach(this.options, function (option) { + var inputs = []; + angular.forEach(option.arg, function (arg) { + if (arg.input) { + inputs.push(arg.input); + } + }); + if (inputs.length > 0) { + params[option.option] = inputs; + } + }); + console.log(params); + }; + CommandController.prototype.removeMySelf = function (index) { + this.remove()(index, this.list); + }; + CommandController.$inject = ['APIEndPoint', '$scope']; + return CommandController; + })(); + directives.CommandController = CommandController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var HeaderMenu = (function () { + function HeaderMenu() { + this.restrict = 'E'; + this.replace = true; + this.templateUrl = 'templates/header-menu.html'; } + HeaderMenu.Factory = function () { + var directive = function () { + return new HeaderMenu(); + }; + return directive; + }; + return HeaderMenu; + })(); + directives.HeaderMenu = HeaderMenu; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var Option = (function () { + function Option() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'optionController'; + this.bindToController = { + info: '=', + files: '=' + }; + this.scope = true; + this.templateUrl = 'templates/option.html'; + this.controllerAs = 'ctrl'; + } + Option.Factory = function () { + var directive = function () { + return new Option(); + }; + directive.$inject = []; + return directive; + }; + return Option; + })(); + directives.Option = Option; + var OptionController = (function () { + function OptionController() { + var controller = this; + angular.forEach(controller.info.arg, function (arg) { + if (arg.initialValue) { + if (arg.formType === 'number') { + arg.input = parseInt(arg.initialValue); + } + else { + arg.input = arg.initialValue; + } + } + }); + } + OptionController.$inject = []; + return OptionController; + })(); + directives.OptionController = OptionController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var directives; + (function (directives) { + var Directory = (function () { + function Directory() { + this.restrict = 'E'; + this.replace = true; + this.controller = 'directoryController'; + this.controllerAs = 'ctrl'; + this.bindToController = { + info: '=', + add: '&', + list: '=', + files: '=' + }; + this.templateUrl = 'templates/directory.html'; + } + Directory.Factory = function () { + var directive = function () { + return new Directory(); + }; + return directive; + }; + return Directory; + })(); + directives.Directory = Directory; + var DirectoryController = (function () { + function DirectoryController(APIEndPoint, $scope) { + this.APIEndPoint = APIEndPoint; + this.$scope = $scope; + var controller = this; + this.APIEndPoint + .getFiles(this.info.fileId) + .$promise + .then(function (result) { + if (result.status === 'success') { + controller.files = result.info; + angular.forEach(result.info, function (file) { + if (file.fileType === '0') { + var o = file; + if (controller.info.path === '/') { + o.path = '/' + file.name; + } + else { + o.path = controller.info.path + '/' + file.name; + } + controller.add()(o, controller.list); + } + }); + } + ; + }); + } + DirectoryController.$inject = ['APIEndPoint', '$scope']; + return DirectoryController; + })(); + directives.DirectoryController = DirectoryController; + })(directives = app.directives || (app.directives = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Execution = (function () { + function Execution(MyModal, $scope) { + this.MyModal = MyModal; + this.$scope = $scope; + this.commandInfoList = []; + } + ; + Execution.prototype.add = function () { + this.$scope.$broadcast('close'); + this.commandInfoList.push(new app.declares.CommandInfo('dcdFilePrint')); + }; + Execution.prototype.open = function () { + var result = this.MyModal.open('SelectCommand'); + console.log(result); + }; + Execution.prototype.remove = function (index, list) { + list.splice(index, 1); + }; + Execution.prototype.close = function () { + console.log("close"); + }; + Execution.$inject = ['MyModal', '$scope']; + return Execution; + })(); + controllers.Execution = Execution; + })(controllers = app.controllers || (app.controllers = {})); + })(app || (app = {})); + var app; + (function (app) { + var controllers; + (function (controllers) { + var Workspace = (function () { + function Workspace($scope, APIEndPoint) { + this.$scope = $scope; + this.APIEndPoint = APIEndPoint; + this.directoryList = []; + var controller = this; + var directoryList = this.directoryList; + var o = { + fileId: '1f83f620-c1ed-11e5-9657-7942989daa00', + name: '', + parentId: '', + fileType: '', + createdAt: '', + updatedAt: '', + path: '/' + }; + directoryList.push(o); + } + Workspace.prototype.addDirectory = function (info, directoryList) { + directoryList.push(info); + }; Workspace.$inject = ['$scope', 'APIEndPoint']; return Workspace; })(); @@ -44267,9 +45353,11 @@ app.zephyr.controller('historyController', app.controllers.History); app.zephyr.controller('commandController', app.directives.CommandController); app.zephyr.controller('optionController', app.directives.OptionController); + app.zephyr.controller('directoryController', app.directives.DirectoryController); app.zephyr.directive('headerMenu', app.directives.HeaderMenu.Factory()); app.zephyr.directive('command', app.directives.Command.Factory()); app.zephyr.directive('option', app.directives.Option.Factory()); + app.zephyr.directive('directory', app.directives.Directory.Factory()); })(app || (app = {})); diff --git a/front-end/dist/templates/command.html b/front-end/dist/templates/command.html index 13ba289..f9beaed 100644 --- a/front-end/dist/templates/command.html +++ b/front-end/dist/templates/command.html @@ -1,5 +1,5 @@
- +

[{{ctrl.index}}: {{ctrl.name}}] diff --git a/front-end/dist/templates/directory.html b/front-end/dist/templates/directory.html new file mode 100644 index 0000000..150e1fd --- /dev/null +++ b/front-end/dist/templates/directory.html @@ -0,0 +1,23 @@ +
+ + + + + + + + + + + + + + + + + + + + +
namefileIdparentIdfileTypecreatedAtupdatedAt
{{l.name}}{{l.fileId}}{{l.parentId}}{{l.fileType}}{{l.createdAt}}{{l.updatedAt}}
+
diff --git a/front-end/dist/templates/workspace.html b/front-end/dist/templates/workspace.html index bbd378c..bf7925a 100644 --- a/front-end/dist/templates/workspace.html +++ b/front-end/dist/templates/workspace.html @@ -1,3 +1,6 @@ -workspace - -{{c.page}} +
+
+ +
+ +
-- 2.11.0