Changeset 2126 for ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorAS.as
- Timestamp:
- 08/22/12 07:31:04 (12 years ago)
- Location:
- ComponentRegistry/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk
- Property svn:mergeinfo changed
/ComponentRegistry/branches/ComponentRegistry-1.12.0 (added) merged: 2071,2076,2079-2080,2082,2084,2090,2093-2096,2108-2113,2115-2119
- Property svn:mergeinfo changed
-
ComponentRegistry/trunk/ComponentBrowserGui
- Property svn:mergeinfo changed
/ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui (added) merged: 2071,2076,2079-2080,2082,2084,2090,2093-2096,2108-2113,2115-2116,2118-2119
- Property svn:mergeinfo changed
-
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorAS.as
r1946 r2126 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 … … 128 132 } else { 129 133 errorMessageField.text = "Validation errors: red colored fields are invalid."; 134 } 135 } 136 137 private function cancel():void { 138 if(xmlEditor.specHasChanges){ 139 Alert.show("There are pending changes. Cancelling will discard these. Are you sure you want to proceed?", "Discard changes?", Alert.YES|Alert.NO, null, 140 function (eventObj:CloseEvent):void{ 141 if(eventObj.detail == Alert.YES){ 142 viewStack.switchToBrowse(itemDescription); 143 } 144 }); 145 } else { 146 viewStack.switchToBrowse(itemDescription); 130 147 } 131 148 }
Note: See TracChangeset
for help on using the changeset viewer.