From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- .../newFileDialog/new-file-workflow-model.js | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 js/io/workflow/newFileDialog/new-file-workflow-model.js (limited to 'js/io/workflow/newFileDialog/new-file-workflow-model.js') diff --git a/js/io/workflow/newFileDialog/new-file-workflow-model.js b/js/io/workflow/newFileDialog/new-file-workflow-model.js new file mode 100644 index 00000000..49c9804d --- /dev/null +++ b/js/io/workflow/newFileDialog/new-file-workflow-model.js @@ -0,0 +1,121 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + + +//a singleton + +exports.NewFileWorkflowModel = Object.create(Object.prototype, { + prepareContents: { + value: function(id){ + var contents = []; + if(!!this.projectTypeData[id].children && (this.projectTypeData[id].children.length > 0)){ + this.projectTypeData[id].children.forEach(function(elem){ + if(!!this.projectTypeData[elem]){ + contents.push(this.projectTypeData[elem]); + } + }, this); + } + + return contents; + } + }, + projectTypeData:{ + writable:false, + enumerable:false, + value:{//dummy data for testing + "projectTypes":{ + "name":"Project Type", + "type":"directory", + "uri":"projectTypes", + "children":["newFile", "newProject", "fromTemplate"] + }, + "newProject":{ + "type":"directory", + "name":"New Project", + "uri":"newProject", + "children":["animation", "bannerAd", "montageComponent", "androidApp"] + }, + "newFile":{ + "name":"Blank Template", + "uri":"newFile", + "type":"directory", + "children":["htmlTemplate", "javascriptTemplate", "cssTemplate"] + }, + "fromTemplate":{ + "name":"From Template", + "uri":"fromTemplate", + "type":"directory", + "children":["xoomApp", "website", "iosApp"] + }, + "bannerAd":{ + "name":"Banner Ad", + "uri":"bannerAd", + "type":"file", + "children":["176x208", "176x220", "208x320", "230x240", "208x320", "230x240", "208x320", "230x240"] + }, + "animation":{ + "name":"Animation", + "uri":"animation", + "type":"file", + "children":["176x208", "176x220", "208x320", "230x240"] + }, + "montageComponent":{ + "name":"Montage Component", + "uri":"montageComponent", + "type":"file", + "children":["176x208", "176x208", "176x220", "208x320", "230x240","176x208", "176x220", "208x320", "230x240"] + }, + "androidApp":{ + "name":"Android App", + "uri":"androidApp", + "type":"file", + "children":["176x208", "176x220"] + }, + "xoomApp":{ + "name":"Xoom Application", + "uri":"xoomApp", + "type":"file", + "children":["176x208", "176x208", "176x220", "208x320", "176x220", "208x320", "230x240"] + }, + "iosApp":{ + "name":"iOS Application", + "uri":"iosApp", + "type":"file", + "children":["176x208"] + }, + "176x208":{ + "name":"176 x 208", + "uri":"176x208", + "type":"file" + }, + "176x220":{ + "name":"176 x 220", + "uri":"176x220", + "type":"file" + }, + "208x320":{ + "name":"208 x 320", + "uri":"208x320", + "type":"file" + }, + "htmlTemplate":{ + "name":"HTML", + "uri":"htmlTemplate", + "type":"file" + }, + "cssTemplate":{ + "name":"CSS", + "uri":"cssTemplate", + "type":"file" + }, + "javascriptTemplate":{ + "name":"Javascript", + "uri":"javascriptTemplate", + "type":"file" + } + } + } +}); -- cgit v1.2.3