Index: lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as =================================================================== diff -u -r00390a938c3b1f164de78d9b92c63f7147165094 -r8d65a2490547840a2fa825b1093c2f4a4192a57e --- lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as (.../WorkspaceDialog.as) (revision 00390a938c3b1f164de78d9b92c63f7147165094) +++ lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as (.../WorkspaceDialog.as) (revision 8d65a2490547840a2fa825b1093c2f4a4192a57e) @@ -196,7 +196,7 @@ this.tabChildren = true; Cursor.showCursor(ApplicationParent.C_DEFAULT); setTabIndex(); - + //removeProps(_workspaceView.getModel(). } /** @@ -213,8 +213,8 @@ //get a ref to the controller and kkep it here to listen for events: _workspaceController = _workspaceView.getController(); Debugger.log('_workspaceController:'+_workspaceController,Debugger.GEN,'setUpContent','org.lamsfoundation.lams.common.ws.WorkspaceDialog'); + removeProps(_workspaceController.getWSModel()) - //Add event listeners for ok, cancel and close buttons ok_btn.addEventListener('click',Delegate.create(this, ok)); cancel_btn.addEventListener('click',Delegate.create(this, cancel)); @@ -353,7 +353,7 @@ if(wm.isForced() && nodeToOpen.attributes.data.resourceID == WorkspaceModel.ROOT_VFOLDER){ // select users root workspace folder - treeview.selectedNode = nodeToOpen.firstChild; + //treeview.selectedNode = nodeToOpen.firstChild; dispatchEvent({type:'change', target:this.treeview}); // no longer force open the Organisation virtual folder @@ -403,26 +403,45 @@ _workspaceController.onTreeNodeOpen({type:'nodeOpen',target:treeview,node:nodeToOpen}); } + private function removeProps(wm:WorkspaceModel):Void{ + if (wm.currentMode == Workspace.MODE_OPEN){ + switchView_tab.removeItemAt(1) + } + + } + private function restoreProps(wm:WorkspaceModel):Void{ + if(wm.currentMode == Workspace.MODE_OPEN){ + if (typeof(switchView_tab.getItemAt(1)) != "object"){ + switchView_tab.addItem({label:Dictionary.getValue('ws_dlg_properties_button'), data:'PROPERTIES'}); + } + } + + } + private function itemSelected(newSelectedNode:XMLNode,wm:WorkspaceModel){ //update the UI with the new info: //_global.breakpoint(); //Only update the details if the node if its a resource:a var nodeData = newSelectedNode.attributes.data; - + removeProps(wm); if(nodeData.resourceType == _workspaceModel.RT_FOLDER){ + resourceTitle_txi.text = ""; if(wm.currentMode != Workspace.MODE_SAVEAS || wm.currentMode != Workspace.MODE_SAVE){ + resourceDesc_txa.text = ""; license_txa.text = ""; licenseID_cmb.selectedIndex = 0; } + removeProps(wm) }else{ + restoreProps(wm); resourceTitle_txi.text = nodeData.name; if(StringUtils.isNull(nodeData.description)){ resourceDesc_txa.text = ""; @@ -437,10 +456,15 @@ for(var i=0; i