From 0e595c4e11ce9b44eff157de8616ed15fcd5d6fc Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 2 Feb 2012 12:37:29 -0800 Subject: refactoring some file names and locations, change made to maintain only one codemirror div. Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com> --- .../new-file-location.reel/new-file-location.css | 59 ++++++++++++++ .../new-file-location.reel/new-file-location.html | 90 ++++++++++++++++++++++ .../new-file-location.reel/new-file-location.js | 56 ++++++++++++++ 3 files changed, 205 insertions(+) create mode 100755 js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css create mode 100755 js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html create mode 100755 js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js (limited to 'js/io/ui/new-file-dialog/new-file-location.reel') diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css new file mode 100755 index 00000000..7f11c225 --- /dev/null +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css @@ -0,0 +1,59 @@ +/* <copyright> + This file contains proprietary software owned by Motorola Mobility, Inc.<br/> + No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> + (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. + </copyright> */ + +.newfileLocation .newFileName{ + width:70%; + margin-left:5px; +} + +.newfileLocation .newFileDirectory{ + width:70%; + margin-left:5px; +} + +.newfileLocation .templateSelection{ + float:left; + width:20%; + height:90%; + padding-right: 10px; +} + +.newfileLocation .templateSelection .template{ + width:80%; + height:60%; + background-color: #e1e1e1; + border:1px solid #000000; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8); +} + +.newfileLocation .locationSelection{ + float:left; + width:75%; +} + +.newfileLocation .locationSelection div{ + padding-bottom: 5px; +} + +.newfileLocation .locationSelection input{ + margin-left: 5px; + white-space: nowrap; +} + +.newfileLocation .templatePx{ + padding-left: 5px; + white-space: nowrap; +} + +.newfileLocation .nameText{ + margin-right:31px; +} + +.newfileLocation .hottextunit{ + float: none; + display: inline; +} + diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html new file mode 100755 index 00000000..d7fbc235 --- /dev/null +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html @@ -0,0 +1,90 @@ +<!DOCTYPE HTML> +<!-- <copyright> + This file contains proprietary software owned by Motorola Mobility, Inc.<br/> + No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> + (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. + </copyright> --> +<html> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" type="text/css" href="new-file-location.css"> + <script type="text/montage-serialization"> + { + "hottextHeight": { + "module": "js/components/hottextunit.reel", + "name": "HotTextUnit", + "properties": { + "element": {"#": "templateHeight"}, + "minValue":25, + "maxValue" :2000, + "stepSize" :5, + "acceptableUnits" : ["px"], + "units" : "px" + }, + "bindings": { + "value": { + "boundObject": {"@": "owner"}, + "boundObjectPropertyPath": "templateHeight", + "oneway": false + } + } + }, + + "hottextWidth": { + "module": "js/components/hottextunit.reel", + "name": "HotTextUnit", + "properties": { + "element": {"#": "templateWidth"}, + "minValue":25, + "maxValue" :2000, + "stepSize" :5, + "acceptableUnits" : ["px"], + "units" : "px" + }, + "bindings": { + "value": { + "boundObject": {"@": "owner"}, + "boundObjectPropertyPath": "templateWidth", + "oneway": false + } + } + }, + + "fileInputField":{ + "module": "js/components/ui/FilePicker/file-input-field.reel", + "name": "FileInputField", + "properties": { + "element": {"#": "fileInputField"} + } + }, + + "owner":{ + "module": "js/io/ui/new-file-dialog/new-file-location.reel", + "name": "NewFileLocation", + "properties": { + "element": {"#": "newfileLocation"}, + "fileInputField": {"@": "fileInputField"}, + "newFileName": {"#": "newFileName"} + } + } + } + </script> +</head> +<body> +<div id="newfileLocation" class="newfileLocation"> + <div class="templateSelection"> + <div class="template"></div> + </div> + <div class="locationSelection"> + <div><span class="nameText">NAME:</span><input id="newFileName" class="nj-skinned newFileName" type="search" value="" /></div> + <div> + <span>DIRECTORY:</span> + <div id="fileInputField"></div> + </div> + <br /> + <div><span>WIDTH:</span><span class="templatePx" id="templateWidth"></span></div> + <div><span>HEIGHT:</span><span class="templatePx" id="templateHeight"></span></div> + </div> +</div> +</body> +</html> \ No newline at end of file diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js new file mode 100755 index 00000000..7da13dfc --- /dev/null +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js @@ -0,0 +1,56 @@ +/* <copyright> +This file contains proprietary software owned by Motorola Mobility, Inc.<br/> +No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> +(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +</copyright> */ + +var Montage = require("montage/core/core").Montage; +var Component = require("montage/ui/component").Component; +var newFileWorkflowControllerModule = require("js/io/ui/new-file-dialog/new-file-workflow-controller"); + +var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { + + templateHeight:{ + enumerable: true, + value:"25 px" + }, + + templateWidth:{ + enumerable: true, + value:"25 px" + }, + + willDraw: { + enumerable: false, + value: function() {} + }, + + draw: { + enumerable: false, + value: function() {} + }, + + didDraw: { + enumerable: false, + value: function() { + var that=this; + + this.fileInputField.selectDirectory = true; + + this.newFileName.addEventListener("blur", function(evt){that.handleNewFileNameOnblur(evt);}, false); + } + + }, + + handleNewFileNameOnblur:{ + value:function(evt){ + if(this.newFileName.value !== ""){ + var newFileNameSetEvent = document.createEvent("Events"); + newFileNameSetEvent.initEvent("newFileNameSet", false, false); + newFileNameSetEvent.newFileName = this.newFileName.value; + this.eventManager.dispatchEvent(newFileNameSetEvent); + } + } + } + +}); \ No newline at end of file -- cgit v1.2.3