Changeset 2080
- Timestamp:
- 08/14/12 13:20:19 (12 years ago)
- Location:
- ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/Editor.mxml
r1988 r2080 8 8 label="Editor" 9 9 creationComplete="init()" 10 implements="clarin.cmdi.componentregistry.common.components.RegistryView" 10 implements="clarin.cmdi.componentregistry.common.components.RegistryView" xmlns:components="clarin.cmdi.componentregistry.common.components.*" 11 11 > 12 12 … … 21 21 saveClick="saveSpec(true, UploadService.UPDATE)" 22 22 saveAsNewClick="saveSpec(true, UploadService.NEW)" 23 publishClick="publishSpec()"/> 23 publishClick="publishSpec()" 24 cancelClick="cancel()" 25 /> 24 26 <mx:Text id="errorMessageField" 25 27 text="{uploadService.message}" -
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorAS.as
r1988 r2080 2 2 import clarin.cmdi.componentregistry.browser.BrowserColumns; 3 3 import clarin.cmdi.componentregistry.common.ItemDescription; 4 import clarin.cmdi.componentregistry.common.components.RegistryViewStack; 4 5 import clarin.cmdi.componentregistry.editor.model.CMDModelFactory; 5 6 import clarin.cmdi.componentregistry.editor.model.CMDSpec; … … 39 40 private var uploadService:UploadService = new UploadService(); 40 41 42 [Bindable] 43 private var viewStack:RegistryViewStack; 41 44 42 45 public function init():void { … … 47 50 uploadService.init(uploadProgress); 48 51 Config.instance.addEventListener(Config.USER_SPACE_TOGGLE_EVENT, toggleUserSpace); 52 viewStack = this.parent as RegistryViewStack; 49 53 } 50 54 … … 131 135 } 132 136 137 private function cancel():void { 138 Alert.show("Are you sure you want to cancel editing?", "Cancel editing", Alert.YES|Alert.NO, null, 139 function (eventObj:CloseEvent):void{ 140 if(eventObj.detail == Alert.YES){ 141 viewStack.switchToBrowse(itemDescription); 142 } 143 }); 144 } 145 133 146 /** 134 147 * Calls usage check for the specified component. If in use, asks user whether to proceed; if positive, initiates update. -
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorButtonBar.mxml
r1988 r2080 8 8 [Event(name="saveAsNewClick", type="flash.events.MouseEvent")] 9 9 [Event(name="publishClick", type="flash.events.MouseEvent")] 10 [Event(name="cancelClick", type="flash.events.MouseEvent")] 10 11 </mx:Metadata> 11 12 <mx:Button id="saveBtn" 12 label=" save"13 label="Save" 13 14 click="dispatchEvent(new MouseEvent('saveClick'))" 14 15 enabled="false" 15 16 /> 16 17 <mx:Button id="saveAsNewBtn" 17 label=" save as new"18 label="Save as new" 18 19 click="dispatchEvent(new MouseEvent('saveAsNewClick'))"/> 19 20 <mx:Button id="publishBtn" 20 label=" publish in public space"21 label="Publish in public space" 21 22 click="dispatchEvent(new MouseEvent('publishClick'))"/> 23 24 <mx:Button id="cancelBtn" 25 label="Cancel" 26 click="dispatchEvent(new MouseEvent('cancelClick'))"/> 22 27 </mx:HBox>
Note: See TracChangeset
for help on using the changeset viewer.