Index: lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as =================================================================== diff -u -r366c29a1b9ba5d912ae9aa476d04990e4b4427ea -r6a5796d8bdfa3baf2331a2b97b5122fbd52c3f5a --- lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as (.../WorkspaceDialog.as) (revision 366c29a1b9ba5d912ae9aa476d04990e4b4427ea) +++ lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceDialog.as (.../WorkspaceDialog.as) (revision 6a5796d8bdfa3baf2331a2b97b5122fbd52c3f5a) @@ -112,7 +112,7 @@ //Set up this class to use the Flash event delegation model EventDispatcher.initialize(this); _resultDTO = new Object(); - + this.tabEnabled = true //Create a clip that will wait a frame before dispatching init to give components time to setup this.onEnterFrame = init; } @@ -125,6 +125,7 @@ delete this.onEnterFrame; //TODO: DC apply the themes here + //set the reference to the StyleManager themeManager = ThemeManager.getInstance(); @@ -190,6 +191,8 @@ //Fire contentLoaded event, this is required by all dialogs so that creator of LFWindow can know content loaded resourceTitle_txi.setFocus(); _container.contentLoaded(); + this.tabChildren = true; + setTabIndex(); } /** @@ -232,14 +235,15 @@ } + /** * Recieved update events from the WorkspaceModel. Dispatches to relevent handler depending on update.Type * @usage * @param event */ public function viewUpdate(event:Object):Void{ Debugger.log('Recived an Event dispather UPDATE!, updateType:'+event.updateType+', target'+event.target,4,'viewUpdate','org.lamsfoundation.lams.ws.WorkspaceDialog'); - //Update view from info object + //Update view from info object //Debugger.log('Recived an UPDATE!, updateType:'+infoObj.updateType,4,'update','CanvasView'); var wm:WorkspaceModel = event.target; //set a permenent ref to the model for ease (sorry mvc guru) @@ -552,7 +556,7 @@ resourceDesc_txa.visible = v; licenseImg_pnl.visible = v; viewLicense_btn.visible = v; - + licenseID_cmb.visible = v; if(licenseID_cmb.value.licenseID == OTHER_LICENSE_ID) { license_comment_lbl.visible = v; license_txa.visible = v; @@ -576,13 +580,14 @@ if(tabToSelect == "LOCATION"){ setLocationContentVisible(true); setPropertiesContentVisible(false); + //setTabIndex("LOCATION"); _currentTab = LOCATION_TAB; - + }else if(tabToSelect == "PROPERTIES"){ setLocationContentVisible(false); setPropertiesContentVisible(true); + //setTabIndex("PROPERTIES"); _currentTab = PROP_TAB; - } //set the right label on the 'doit' button @@ -599,7 +604,28 @@ } - + private function setTabIndex(selectedTab:String){ + + ok_btn.tabIndex = 25 + cancel_btn.tabIndex = 26 + switchView_tab.tabIndex = 1 + //think this is failing.... + //if(tabToSelect == "LOCATION"){ + new_btn.tabIndex = 2 + //cut_btn.addEventListener('click',Delegate.create(_workspaceController, _workspaceController.fileOperationRequest)); + copy_btn.tabIndex = 3 + paste_btn.tabIndex = 4 + delete_btn.tabIndex = 5 + rename_btn.tabIndex = 6 + location_dnd.tabIndex = 7 + treeview.tabIndex = 7 + //}else { + resourceDesc_txa.tabIndex = 8 + licenseID_cmb.tabIndex = 9 + viewLicense_btn.tabIndex = 10 + //} + + } /** * Event fired by StyleManager class to notify listeners that Theme has changed @@ -684,10 +710,16 @@ Debugger.log('_workspaceModel.currentMode: ' + _workspaceModel.currentMode,Debugger.GEN,'ok','org.lamsfoundation.lams.WorkspaceDialog'); - if(_workspaceModel.currentMode=="SAVE" || _workspaceModel.currentMode=="SAVEAS"){ - saveFile(snode); - } else { - openFile(snode); + if (resourceTitle_txi.text == "" || resourceTitle_txi.text == undefined || resourceTitle_txi.text == null){ + var sendMsg:String = Dictionary.getValue('ws_file_name_empty')+"\n"+Dictionary.getValue('ws_entre_file_name')+"\n\n"; + LFMessage.showMessageAlert(sendMsg,null); + resourceTitle_txi.setFocus(); + }else{ + if(_workspaceModel.currentMode=="SAVE" || _workspaceModel.currentMode=="SAVEAS"){ + saveFile(snode); + } else { + openFile(snode); + } } }