Index: lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as =================================================================== diff -u -r3d826230b52cc8057e353796c9d9e18ce742793e -rfc186ff66bc135f13e9bb7f6465c2cd3e621949c --- lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as (.../WorkspaceDialog.as) (revision 3d826230b52cc8057e353796c9d9e18ce742793e) +++ lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as (.../WorkspaceDialog.as) (revision fc186ff66bc135f13e9bb7f6465c2cd3e621949c) @@ -32,7 +32,7 @@ private var name_lbl:Label; private var resourceTitle_txi:TextInput; private var new_btn:Button; - private var cut_btn:Button; + //private var cut_btn:Button; private var copy_btn:Button; private var paste_btn:Button; private var delete_btn:Button; @@ -83,6 +83,7 @@ //Set up this class to use the Flash event delegation model EventDispatcher.initialize(this); _resultDTO = new Object(); + //Create a clip that will wait a frame before dispatching init to give components time to setup this.onEnterFrame = init; } @@ -115,7 +116,8 @@ viewLicense_btn.label = Dictionary.getValue('ws_view_license_button'); //TODO: Dictionary calls for all the rest of the buttons - + //TODO: Make setStyles more efficient + setStyles(); //get focus manager + set focus to OK button, focus manager is available to all components through getFocusManager fm = _container.getFocusManager(); @@ -143,8 +145,7 @@ //Register as listener with StyleManager and set Styles themeManager.addEventListener('themeChanged',this); - //TODO: Make setStyles more efficient - //setStyles(); + treeview = location_dnd.getTree(); //Fire contentLoaded event, this is required by all dialogs so that creator of LFWindow can know content loaded _container.contentLoaded(); @@ -174,7 +175,7 @@ switchView_tab.setSelectedIndex(0); new_btn.addEventListener('click',Delegate.create(_workspaceController, _workspaceController.fileOperationRequest)); - cut_btn.addEventListener('click',Delegate.create(_workspaceController, _workspaceController.fileOperationRequest)); + //cut_btn.addEventListener('click',Delegate.create(_workspaceController, _workspaceController.fileOperationRequest)); copy_btn.addEventListener('click',Delegate.create(_workspaceController, _workspaceController.fileOperationRequest)); paste_btn.addEventListener('click',Delegate.create(_workspaceController, _workspaceController.fileOperationRequest)); delete_btn.addEventListener('click',Delegate.create(_workspaceController, _workspaceController.fileOperationRequest)); @@ -387,7 +388,7 @@ name_lbl.visible = v; resourceTitle_txi.visible = v; new_btn.visible = v; - cut_btn.visible = v; + //cut_btn.visible = v; copy_btn.visible = v; paste_btn.visible = v; delete_btn.visible = v; @@ -463,27 +464,27 @@ */ private function setStyles(){ //LFWindow, goes first to prevent being overwritten with inherited styles. - var styleObj = themeManager.getStyleObject('LFWindow'); - _container.setStyle('styleName',styleObj); + //var styleObj = themeManager.getStyleObject('LFWindow'); + //_container.setStyle('styleName',styleObj); //Get the button style from the style manager - styleObj = themeManager.getStyleObject('button'); + // styleObj = themeManager.getStyleObject('button'); //apply to both buttons - Debugger.log('styleObject : ' + styleObj,Debugger.GEN,'setStyles','org.lamsfoundation.lams.WorkspaceDialog'); - ok_btn.setStyle('styleName',styleObj); - cancel_btn.setStyle('styleName',styleObj); + // Debugger.log('styleObject : ' + styleObj,Debugger.GEN,'setStyles','org.lamsfoundation.lams.WorkspaceDialog'); + // ok_btn.setStyle('styleName',styleObj); + //cancel_btn.setStyle('styleName',styleObj); //Get label style and apply to label - styleObj = themeManager.getStyleObject('label'); - //myLabel_lbl.setStyle('styleName',styleObj); + var styleObj = themeManager.getStyleObject('label'); + name_lbl.setStyle('styleName',styleObj); //Apply treeview style - styleObj = themeManager.getStyleObject('treeview'); - treeview.setStyle('styleName',styleObj); + // styleObj = themeManager.getStyleObject('treeview'); + //treeview.setStyle('styleName',styleObj); //Apply datagrid style - styleObj = themeManager.getStyleObject('datagrid'); + // styleObj = themeManager.getStyleObject('datagrid'); //datagrid.setStyle('styleName',styleObj); /* @@ -532,7 +533,7 @@ //TODO: Validate you are allowed to use the name etc... Are you overwriting - NOTE Same names are nto allowed in this version var snode = treeview.selectedNode; - Debugger.log('_workspaceModel.currentMode: ' + _workspaceModel.currentMode,Debugger.GEN,'setStyles','org.lamsfoundation.lams.WorkspaceDialog'); + Debugger.log('_workspaceModel.currentMode: ' + _workspaceModel.currentMode,Debugger.GEN,'ok','org.lamsfoundation.lams.WorkspaceDialog'); if(_workspaceModel.currentMode=="SAVE" || _workspaceModel.currentMode=="SAVEAS"){ //var rid:Number = Number(snode.attributes.data.resourceID); if(snode.attributes.data.resourceType==_workspaceModel.RT_LD){ Index: lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceModel.as =================================================================== diff -u -r69d2deb96513526ef90c5c114273488e2fd83173 -rfc186ff66bc135f13e9bb7f6465c2cd3e621949c --- lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceModel.as (.../WorkspaceModel.as) (revision 69d2deb96513526ef90c5c114273488e2fd83173) +++ lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceModel.as (.../WorkspaceModel.as) (revision fc186ff66bc135f13e9bb7f6465c2cd3e621949c) @@ -235,9 +235,9 @@ // go throught the contents of DTO and add it aas children to the node to update. for(var i=0; i