Changeset 2082
- Timestamp:
- 08/14/12 13:26:16 (12 years ago)
- Location:
- ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/RegistryViewStack.as
r1988 r2082 78 78 79 79 public function switchToEditor(itemDescription:ItemDescription):void { 80 // About to open item in editor, check if there are pending changes 81 if(itemDescription != null && editor.xmlEditor.specHasChanges){ 82 Alert.show("Doing this will discard all changes in the component that is currently being edited. Proceed?", "Discard changes", Alert.OK|Alert.CANCEL, this, 83 function(event:CloseEvent):void { 84 if(event.detail == Alert.OK) { 85 doSwitchToEditor(itemDescription); 86 } 87 } ); 88 } else { 89 doSwitchToEditor(itemDescription); 90 } 80 doSwitchToEditor(itemDescription); 91 81 } 92 82 -
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorAS.as
r2080 r2082 136 136 137 137 private function cancel():void { 138 Alert.show("Are you sure you want to cancel editing?", "Cancel editing", Alert.YES|Alert.NO, null, 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, 139 140 function (eventObj:CloseEvent):void{ 140 141 if(eventObj.detail == Alert.YES){ … … 142 143 } 143 144 }); 145 } else { 146 viewStack.switchToBrowse(itemDescription); 147 } 144 148 } 145 149
Note: See TracChangeset
for help on using the changeset viewer.