Changeset 2126
- Timestamp:
- 08/22/12 07:31:04 (12 years ago)
- Files:
-
- 28 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/CMDValidate
-
Property
svn:mergeinfo
set to
/ComponentRegistry/branches/ComponentRegistry-1.12.0/CMDValidate merged eligible
-
Property
svn:mergeinfo
set to
-
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/browser/Browse.mxml
r1946 r2126 6 6 width="100%" 7 7 height="100%" 8 label="Browser" 9 implements="clarin.cmdi.componentregistry.common.components.RegistryView"> 8 label="Component Browser" 9 implements="clarin.cmdi.componentregistry.common.components.RegistryView" xmlns:components="clarin.cmdi.componentregistry.common.components.*" 10 > 10 11 <mx:Metadata> 11 12 [Event(name="startItemLoaded",type="flash.events.Event")] … … 161 162 } 162 163 163 private static const USERSPACE_LABEL:String = "Work space";164 private static const PUBLICSPACE_LABEL:String = "Public space";165 [Bindable]166 public var spaces:ArrayCollection = new ArrayCollection([{label: PUBLICSPACE_LABEL, data: 1}, {label: USERSPACE_LABEL, data: 2}]);167 168 164 private function setUserSpace(event:Event = null):void { 169 165 if (Config.instance.userSpace) { … … 173 169 } 174 170 } 175 176 private function userSpaceCloseHandler(event:Event):void {177 if (Credentials.instance.isLoggedIn()) {178 Config.instance.userSpace = ComboBox(event.target).selectedItem.data == 2;179 } else if (userSpaceCB.selectedIndex != 0) {180 userSpaceCB.selectedIndex = 0;181 new Login().show(this, Config.VIEW_BROWSE, Config.SPACE_USER, null);182 }183 184 }185 171 ]]> 186 172 </mx:Script> … … 188 174 <browser:BrowserColumns id="browserColumns"/> 189 175 190 <mx:Panel layout="absolute" 191 width="100%" 176 <mx:Panel width="100%" 192 177 height="100%" 193 178 headerHeight="0" … … 196 181 borderThicknessBottom="0" 197 182 borderThicknessLeft="0" 183 layout="absolute" 184 horizontalAlign="center" 198 185 > 199 200 <mx:ComboBox right="0" 201 top="0" 202 id="userSpaceCB" 203 dataProvider="{spaces}" 204 width="110" 205 close="userSpaceCloseHandler(event);"/> 186 187 188 <mx:Box paddingTop="5" paddingLeft="5" 189 top="-5" 190 horizontalCenter="-110" 191 > 192 <components:SpaceSwitch id="userSpaceCB" width="110" /> 193 </mx:Box> 206 194 207 195 <mx:VBox left="0" 208 196 top="5" 209 197 borderStyle="none" 210 horizontalAlign="center"211 198 height="100%" 212 199 width="100%"> -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/BrowserOverviewList.mxml
r1946 r2126 34 34 [Bindable] 35 35 public var viewStack:RegistryViewStack; 36 37 [Bindable] 38 public var buttonsEnabled:Boolean = true; 39 40 [Bindable] 41 public var spaceSwitchEnabled:Boolean = false; 36 42 37 43 public function set browserDataProvider(dataProvider:ArrayCollection):void { … … 91 97 } 92 98 99 private function importItem():void{ 100 viewStack.switchToImport(); 101 } 102 93 103 private function dispatchCreateNewEvent():void{ 94 104 dispatchEvent(new CreateNewComponentEvent()); … … 100 110 paddingRight="5" 101 111 width="100%"> 102 112 113 <mx:Box paddingTop="5" paddingLeft="5" 114 visible="{spaceSwitchEnabled}" 115 includeInLayout="{spaceSwitchEnabled}"> 116 <comp:SpaceSwitch id="userSpaceCB" /> 117 </mx:Box> 118 103 119 <mx:HBox horizontalAlign="left" 104 120 verticalAlign="middle" 105 width="50%"> 121 width="70%" 122 visible="{buttonsEnabled}" 123 > 106 124 107 <!-- public space --> 125 <mx:Button label="Create new" 126 toolTip="Create a new item in the private workspace" 127 click="dispatchCreateNewEvent()" 128 /> 129 <mx:Button label="Edit" 130 toolTip="Edit the selected item in the editor" 131 visible="{Config.instance.userSpace}" 132 includeInLayout="{Config.instance.userSpace}" 133 enabled="{Config.instance.userSpace && dataGrid.selectedItem != null}" 134 click="editItem()" /> 108 135 <mx:Button label="Edit as new" 109 136 toolTip="Edit the selected item as a new item in the private workspace" 110 includeInLayout="{!Config.instance.userSpace}"111 visible="{!Config.instance.userSpace}"112 enabled="{ (dataGrid.selectedItem != null) && Credentials.instance.isLoggedIn()}"137 visible="{!Config.instance.userSpace}" 138 includeInLayout="{!Config.instance.userSpace}" 139 enabled="{!Config.instance.userSpace && dataGrid.selectedItem != null}" 113 140 click="editItem()" /> 114 <!-- private space --> 115 <mx:Button label="Create new" includeInLayout="{Config.instance.userSpace}" 116 toolTip="Create a new item in the private workspace" 117 visible="{Config.instance.userSpace}" 118 enabled="{Credentials.instance.isLoggedIn()}" 119 click="dispatchCreateNewEvent()" 120 /> 121 <mx:Button label="Edit" includeInLayout="{Config.instance.userSpace}" 122 toolTip="Edit the selected item in the editor" 123 visible="{Config.instance.userSpace}" 124 enabled="{dataGrid.selectedItem != null && Credentials.instance.isLoggedIn()}" 125 click="editItem()" /> 141 <mx:Button label="Import" 142 toolTip="Import an item from a local file" 143 click="importItem()" /> 126 144 </mx:HBox> 127 145 128 146 <mx:HBox horizontalAlign="right" 129 147 verticalAlign="middle" 130 width=" 50%">148 width="30%"> 131 149 132 150 <rictus:SearchBox id="searchBox" -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/BrowseContextMenu.as
r1090 r2126 2 2 import clarin.cmdi.componentregistry.common.ItemDescription; 3 3 import clarin.cmdi.componentregistry.common.ShowInfoPopUp; 4 import clarin.cmdi.componentregistry.services.Config; 4 5 import clarin.cmdi.componentregistry.services.DeleteService; 5 6 import clarin.cmdi.componentregistry.services.SaveItemDialog; 6 7 7 8 import flash.events.ContextMenuEvent; 8 9 import flash.geom.Point; 9 10 import flash.ui.ContextMenu; 10 11 import flash.ui.ContextMenuItem; 11 12 12 13 import mx.controls.Alert; 13 14 import mx.controls.DataGrid; … … 31 32 private var saveItemDialog:SaveItemDialog = new SaveItemDialog(); 32 33 private var isComponent:Boolean = false; 34 35 private var editMenuItem:ContextMenuItem; 36 private var editAsNewMenuItem:ContextMenuItem; 33 37 34 38 public function BrowseContextMenu(isComponent:Boolean = false) { … … 37 41 cm.hideBuiltInItems(); 38 42 cm.customItems = createMenuItems(); 43 setItemStates(); 44 45 Config.instance.addEventListener(Config.USER_SPACE_TOGGLE_EVENT, setItemStates); 39 46 } 40 47 … … 52 59 result.push(cmi); 53 60 } 54 cmi = new ContextMenuItem("Edit Item..."); 55 cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, editItem); 56 result.push(cmi); 61 editMenuItem = new ContextMenuItem("Edit Item..."); 62 editMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, editItem); 63 result.push(editMenuItem); 64 65 editAsNewMenuItem = new ContextMenuItem("Edit Item as New..."); 66 editAsNewMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, editItem); 67 result.push(editAsNewMenuItem); 68 57 69 cmi = new ContextMenuItem("Delete Item...", true); 58 70 cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleDelete); … … 61 73 return result; 62 74 } 75 76 private function setItemStates(event:Event = null):void { 77 editMenuItem.visible = Config.instance.userSpace; 78 editAsNewMenuItem.visible = !Config.instance.userSpace; 79 } 63 80 64 81 public function set dataGrid(dataGrid:DataGrid):void { 65 82 _dataGrid = dataGrid; 66 83 } 67 68 69 84 70 85 private function showInfo(event:ContextMenuEvent):void { -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/RegistryViewStack.as
r1946 r2126 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/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/CMDComponentXMLEditor.as
r1946 r2126 6 6 import clarin.cmdi.componentregistry.common.components.AddComponentLabelButton; 7 7 import clarin.cmdi.componentregistry.common.components.AddElementLabelButton; 8 import clarin.cmdi.componentregistry.common.components.LabelButton; 8 9 import clarin.cmdi.componentregistry.common.components.RemoveLabelButton; 9 10 import clarin.cmdi.componentregistry.editor.model.CMDComponent; … … 22 23 import mx.containers.FormItem; 23 24 import mx.containers.FormItemDirection; 25 import mx.containers.HBox; 24 26 import mx.controls.Alert; 25 27 import mx.controls.Label; … … 163 165 checkFirstDefiningComponent(_spec.cmdComponents); 164 166 handleHeader(_spec); 167 168 addChild(createCollapseExpandBox()); 169 165 170 handleElements(_firstComponent.cmdElements); 166 171 addElementAddButton(); 167 172 handleComponents(_firstComponent.cmdComponents); 168 173 addComponentAddButton(); 174 175 addChild(createCollapseExpandBox()); 176 169 177 trace("Created editor view in " + (getTimer() - start) + " ms."); 178 } 179 180 private function createCollapseExpandBox():HBox{ 181 var collapseExpandBox:HBox = new HBox(); 182 collapseExpandBox.addChild(createCollapseAllButton()); 183 collapseExpandBox.addChild(createExpandAllButton()); 184 return collapseExpandBox; 185 } 186 187 private function createCollapseAllButton():UIComponent{ 188 var button:LabelButton = new LabelButton(collapseAll, "Collapse all"); 189 button.setStyle("color","blue"); 190 button.toolTip = "Collapse all components and elements in this editor"; 191 return button; 192 } 193 194 private function collapseAll(event:Event):void{ 195 for(var i:int=0;i<numChildren;i++){ 196 var child:Object = getChildAt(i); 197 if(child is ElementEdit || child is ComponentEdit){ 198 ItemEdit(child).collapseAll(); 199 } 200 } 201 } 202 203 private function createExpandAllButton():UIComponent{ 204 var button:LabelButton = new LabelButton(expandAll, "Expand all"); 205 button.setStyle("color","blue"); 206 button.toolTip = "Expand all components and elements in this editor"; 207 return button; 208 } 209 210 private function expandAll(event:Event):void{ 211 for(var i:int=0;i<numChildren;i++){ 212 var child:Object = getChildAt(i); 213 if(child is ElementEdit || child is ComponentEdit){ 214 ItemEdit(child).expandAll(); 215 } 216 } 170 217 } 171 218 … … 237 284 var buttons:FormItem = new SelectTypeRadioButtons(spec); 238 285 head.addChild(buttons); 239 var startOverLabel:Label = createStartOverButton();240 startOverLabel.setStyle("paddingTop", "2");241 startOverLabel.height = buttons.height;242 286 var space:Spacer = new Spacer(); 243 287 space.width = 55; 244 288 head.addChild(space); 245 head.addChild(startOverLabel);246 289 addChild(head); 247 290 … … 371 414 removeChild(event.currentTarget as DisplayObject); 372 415 } 373 374 private function createStartOverButton():Label {375 var startOverButton:Label = new RemoveLabelButton();376 startOverButton.addEventListener(MouseEvent.CLICK, clearEditorHandler);377 startOverButton.toolTip = "Clears all input and removes added components";378 startOverButton.text = "start over";379 return startOverButton;380 }381 416 } 382 417 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentEdit.as
r2070 r2126 29 29 30 30 [Event(name="removeComponent", type="flash.events.Event")] 31 public class ComponentEdit extends Form{31 public class ComponentEdit extends ItemEdit { 32 32 public static const REMOVE_COMPONENT_EVENT:String = "removeComponent"; 33 33 private static const DRAG_ITEMS:String = "items"; … … 38 38 private var addComponentLabel:Label 39 39 private var addElementLabel:Label 40 41 40 42 41 public function ComponentEdit(component:CMDComponent, parent:UIComponent, parentComponent:CMDComponent) { … … 98 97 createComponentEditBar(); 99 98 99 addChild(getHideableForm()); 100 101 var summary:ComponentSummary = new ComponentSummary(); 102 summary.component = _component; 103 summary.visible = false; 104 105 setSummaryContainer(summary); 106 addChild(summary); 107 100 108 var componentLink:FormItem = createComponentLink(_component); 101 109 if (componentLink != null) { 102 110 addCardinalityInput(); 103 add Child(componentLink);111 addToHideableForm(componentLink); 104 112 } else { 105 113 addNameInput(); … … 148 156 149 157 private function addConceptLink():void { 150 add Child(new ConceptLinkInput(LabelConstants.CONCEPTLINK, _component.conceptLink, function(val:String):void {158 addToHideableForm(new ConceptLinkInput(LabelConstants.CONCEPTLINK, _component.conceptLink, function(val:String):void { 151 159 _component.conceptLink = val; 152 160 })); … … 163 171 _component.name = val; 164 172 }, new ChildNameValidator(_parentComponent, component)); 165 add Child(nameInput);173 addToHideableForm(nameInput); 166 174 } 167 175 168 176 private function addCardinalityInput():void { 169 add Child(new CardinalityInput(LabelConstants.CARDINALITY_MIN, _component.cardinalityMin, CardinalityInput.BOUNDED, function(val:String):void {177 addToHideableForm(new CardinalityInput(LabelConstants.CARDINALITY_MIN, _component.cardinalityMin, CardinalityInput.BOUNDED, function(val:String):void { 170 178 _component.cardinalityMin = val; 171 179 })); 172 add Child(new CardinalityInput(LabelConstants.CARDINALITY_MAX, _component.cardinalityMax, CardinalityInput.UNBOUNDED,function(val:String):void {180 addToHideableForm(new CardinalityInput(LabelConstants.CARDINALITY_MAX, _component.cardinalityMax, CardinalityInput.UNBOUNDED,function(val:String):void { 173 181 _component.cardinalityMax = val; 174 182 })); 175 183 } 176 184 185 private function createHidableForm():Form { 186 var form:Form = new Form(); 187 form.styleName = StyleConstants.XMLBROWSER; 188 form.setStyle("paddingTop","0"); 189 form.setStyle("paddingBottom","0"); 190 form.verticalScrollPolicy = "off"; 191 form.horizontalScrollPolicy = "off"; 192 return form; 193 } 194 177 195 private function createComponentEditBar():void { 178 196 var editBar:HBox = new HBox(); 197 198 editBar.addChild(getShowToggleBox()); 199 179 200 editBar.addChild(createHeading()); 180 201 var removeButton:Label = new RemoveLabelButton(); … … 236 257 237 258 private function handleCMDAttributeList():void { 238 add Child(new AttributeListEdit(_component, this));259 addToHideableForm(new AttributeListEdit(_component, this)); 239 260 } 240 261 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/Editor.mxml
r1942 r2126 6 6 width="100%" 7 7 height="100%" 8 label=" Editor"8 label="Component 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}" … … 46 48 <browser:BrowserOverviewList id="componentsPaletteOverview" 47 49 width="100%" height="90%" 50 buttonsEnabled="false" 51 spaceSwitchEnabled="true" 48 52 browserDataProvider="{componentsSrv.itemDescriptions}" 49 53 browserColumns="{browserColumns.getComponentColumns()}" -
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 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorButtonBar.mxml
r1839 r2126 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> -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ElementEdit.as
r2070 r2126 12 12 13 13 import mx.binding.utils.BindingUtils; 14 import mx.containers.Box; 14 15 import mx.containers.Form; 15 16 import mx.containers.FormItem; 16 17 import mx.containers.HBox; 18 import mx.containers.VBox; 17 19 import mx.controls.Button; 18 20 import mx.controls.Label; … … 21 23 22 24 [Event(name="removeElement", type="flash.events.Event")] 23 public class ElementEdit extends Form{25 public class ElementEdit extends ItemEdit { 24 26 public static const REMOVE_ELEMENT_EVENT:String = "removeElement"; 25 27 private var _element:CMDComponentElement; … … 33 35 this._parent = parent; 34 36 styleName = StyleConstants.XMLBROWSER; 37 38 setStyle("paddingBottom","5"); 39 verticalScrollPolicy = "off"; 40 horizontalScrollPolicy = "off"; 41 35 42 } 36 43 … … 45 52 protected override function createChildren():void { 46 53 super.createChildren(); 54 47 55 addChild(createEditBar()); 48 addNameInput(); 49 addChild(new ConceptLinkInput(LabelConstants.CONCEPTLINK, _element.conceptLink, function(val:String):void { 56 57 addChild(getHideableForm()); 58 59 var summary:ElementSummary = new ElementSummary(); 60 summary.element = _element; 61 summary.visible = false; 62 63 setSummaryContainer(summary); 64 addChild(summary); 65 66 addToHideableForm(createNameInput()); 67 addToHideableForm(new ConceptLinkInput(LabelConstants.CONCEPTLINK, _element.conceptLink, function(val:String):void { 50 68 _element.conceptLink = val; 51 69 })); 52 add Child(new FormItemInputLine(LabelConstants.DOCUMENTATION, _element.documentation, function(val:String):void {70 addToHideableForm(new FormItemInputLine(LabelConstants.DOCUMENTATION, _element.documentation, function(val:String):void { 53 71 _element.documentation = val; 54 72 })); 55 add Child(new DisplayPriorityInput(LabelConstants.DISPLAY_PRIORITY, _element.displayPriority, function(val:String):void {73 addToHideableForm(new DisplayPriorityInput(LabelConstants.DISPLAY_PRIORITY, _element.displayPriority, function(val:String):void { 56 74 _element.displayPriority = val; 57 75 })); … … 60 78 _element.cardinalityMin = val; 61 79 }); 62 add Child(cardinalityMinInput);80 addToHideableForm(cardinalityMinInput); 63 81 64 82 var cardinalityMaxInput:CardinalityInput = new CardinalityInput(LabelConstants.CARDINALITY_MAX, _element.cardinalityMax, CardinalityInput.UNBOUNDED, function(val:String):void { … … 69 87 cardinalityMaxInput.enabled = _element.multilingual != "true"; 70 88 }, _element, "multilingual"); 71 add Child(cardinalityMaxInput);89 addToHideableForm(cardinalityMaxInput); 72 90 73 add Child(AttributeListEdit.createAndAddValueScheme(_element));91 addToHideableForm(AttributeListEdit.createAndAddValueScheme(_element)); 74 92 var multiLingualCheck:CheckboxInput = new CheckboxInput(LabelConstants.MULTILINGUAL, _element.multilingual == "true", function(val:Boolean):void { 75 93 _element.multilingual = String(val); … … 85 103 }, _element, "valueSchemeSimple"); 86 104 87 add Child(multiLingualCheck);105 addToHideableForm(multiLingualCheck); 88 106 handleCMDAttributeList(); 89 107 } … … 91 109 private function createEditBar():HBox { 92 110 var editBar:HBox = new HBox(); 111 112 editBar.addChild(getShowToggleBox()); 113 93 114 editBar.addChild(createHeading()); 94 115 var removeButton:Label = new RemoveLabelButton(); … … 146 167 private function handleCMDAttributeList():void { 147 168 var attributeEdit:Container = new AttributeListEdit(_element, this); 148 add Child(attributeEdit);169 addToHideableForm(attributeEdit); 149 170 } 150 171 … … 156 177 } 157 178 158 private function addNameInput():void{179 private function createNameInput():NameInputLine { 159 180 var nameInput:NameInputLine = new NameInputLine(_element.name, function(val:String):void { 160 181 _element.name = val; 161 182 }, new ChildNameValidator(_parentComponent, element)); 162 addChild(nameInput);183 return nameInput; 163 184 } 164 185 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/IsocatSearchPopUp.mxml
r1913 r2126 105 105 <mx:Button id="okBtn" 106 106 label="OK" 107 click="handleOkClick()"/> 107 click="handleOkClick()" 108 enabled="{dataGrid.selectedItem != null}" 109 /> 108 110 <mx:Button label="Cancel" 109 111 click="cleanUp()"/> -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponent.as
r1954 r2126 7 7 import mx.events.CollectionEventKind; 8 8 9 [Bindable] 9 10 public class CMDComponent implements XmlAble, AttributeContainer, ChangeTrackingCMDElement { 10 11 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/importer/Importer.mxml
r1942 r2126 5 5 height="100%" 6 6 label="Import file" 7 implements="clarin.cmdi.componentregistry.common.components.RegistryView"> 7 implements="clarin.cmdi.componentregistry.common.components.RegistryView" 8 > 8 9 9 10 <mx:Script> 10 11 <![CDATA[ 12 import clarin.cmdi.componentregistry.common.ComponentMD; 13 import clarin.cmdi.componentregistry.common.Credentials; 14 import clarin.cmdi.componentregistry.common.ItemDescription; 15 import clarin.cmdi.componentregistry.common.LabelConstants; 16 import clarin.cmdi.componentregistry.common.Profile; 17 import clarin.cmdi.componentregistry.common.components.RegistryViewStack; 18 import clarin.cmdi.componentregistry.editor.InputValidators; 19 import clarin.cmdi.componentregistry.services.Config; 20 21 import mx.collections.ArrayCollection; 22 import mx.controls.Alert; 23 import mx.core.Application; 11 24 import mx.core.UIComponent; 12 import clarin.cmdi.componentregistry.common.ComponentMD;13 import clarin.cmdi.componentregistry.common.Profile;14 import clarin.cmdi.componentregistry.services.Config;15 25 import mx.events.ValidationResultEvent; 16 import mx.collections.ArrayCollection;17 26 import mx.validators.Validator; 18 import clarin.cmdi.componentregistry.editor.InputValidators;19 import clarin.cmdi.componentregistry.common.LabelConstants;20 import clarin.cmdi.componentregistry.common.Credentials;21 import mx.core.Application;22 import clarin.cmdi.componentregistry.common.ItemDescription;23 import mx.controls.Alert;24 27 25 28 private var validators:ArrayCollection = new ArrayCollection(); … … 51 54 } 52 55 } 56 57 private function close():void{ 58 var viewStack:RegistryViewStack = this.parent as RegistryViewStack; 59 viewStack.switchToBrowse(null); 60 } 53 61 54 62 private function validate():Boolean { … … 204 212 uploadComplete="registryChange(event)"/> 205 213 <mx:VBox> 214 206 215 <mx:Form> 207 216 <mx:HBox> … … 245 254 width="300"/> 246 255 </mx:FormItem> 247 <mx:Button label="Submit" 248 click="submit(event)"/> 256 257 <mx:HBox> 258 <mx:Button label="Submit" 259 click="submit(event)"/> 260 <mx:Button label="Close" 261 click="close()"/> 262 </mx:HBox> 263 249 264 <mx:ProgressBar id="uploadProgress" 250 265 label="" -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/main.mxml
r1793 r2126 72 72 flexSpyButton.label="FlexSpy"; 73 73 flexSpyButton.addEventListener(MouseEvent.CLICK,showFlexSpy); 74 topBar.addChild(flexSpyButton); 74 flexSpyButton.setStyle("right","0"); 75 flexSpyButton.setStyle("top","0"); 76 addChild(flexSpyButton); 75 77 } 76 78 } … … 86 88 height="100%" 87 89 layout="absolute" 88 title="Clarin Component Browser"90 title="Clarin Component Registry" 89 91 x="0" 90 92 y="0"> 91 92 <mx:VBox height="100%" 93 width="100%">94 <mx:HBox borderStyle="none" id="topBar"95 width="100%">96 <mx:ToggleButtonBar id="toggleBar"97 dataProvider="{viewStack}"/>98 <mx:Spacer width="90%"/>99 <mx:Label text="User: {Credentials.instance.userName}"/>100 <common:LoginLabelButton id="login" includeInLayout="{!Credentials.instance.isLoggedIn()}" visible="{!Credentials.instance.isLoggedIn()}"/>101 < common:UserSettingsLabelButton id="userSettings" includeInLayout="{Credentials.instance.isLoggedIn()}" visible="{Credentials.instance.isLoggedIn()}"/>93 94 <mx:VBox height="100%" width="100%"> 95 96 <mx:HBox width="100%" id="topBar" styleName="topBar" verticalAlign="middle"> 97 <mx:Label width="20%" styleName="sectionTitle" paddingLeft="5" text="{viewStack.selectedChild.label}" /> 98 99 <mx:HBox width="80%" horizontalAlign="right" paddingRight="5"> 100 <mx:Label text="User: {Credentials.instance.userName}"/> 101 <common:LoginLabelButton id="login" includeInLayout="{!Credentials.instance.isLoggedIn()}" visible="{!Credentials.instance.isLoggedIn()}" /> 102 <common:UserSettingsLabelButton id="userSettings" includeInLayout="{Credentials.instance.isLoggedIn()}" visible="{Credentials.instance.isLoggedIn()}"/> 103 </mx:HBox> 102 104 </mx:HBox> 105 103 106 <common:RegistryViewStack id="viewStack" 104 107 borderStyle="none" -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/resources/assets/css/main.css
r1705 r2126 63 63 } 64 64 65 .topBar{ 66 backgroundColor: #DDE3EF; 67 } 68 69 .sectionTitle { 70 fontWeight: bold; 71 fontSize: 18px; 72 } 65 73 66 74 -
ComponentRegistry/trunk/ComponentRegistry
- Property svn:mergeinfo changed
/ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentRegistry (added) merged: 2117
- Property svn:mergeinfo changed
-
ComponentRegistry/trunk/ComponentRegistry/CHANGES
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentRegistry/CHANGES merged eligible /ComponentRegistry/tags/ComponentRegistry-1.8.1/ComponentRegistry/CHANGES merged eligible /ComponentRegistry/tags/ComponentRegistry-1.9.1/ComponentRegistry/CHANGES merged eligible /ComponentRegistry/branches/ComponentRegistry-schematron/ComponentRegistry/CHANGES 1751-1797 /ComponentRegistry/branches/jeaferversion/ComponentRegistry/CHANGES 1631-1680
r1987 r2126 1 1 Bug Fixes and Features 2 2 3 Release ComponentRegistry-1.12.0 ( ?):3 Release ComponentRegistry-1.12.0 (21 august 2012): 4 4 - REST service produces 404 status when component requested that does not exist. 5 5 - Users can delete their own comments from the Flex UI. http://trac.clarin.eu/ticket/185 … … 11 11 - If string element is set to multilingual, max occurences field gets disabled. http://trac.clarin.eu/ticket/208 12 12 - Added 'close' link to user settings page. http://trac.clarin.eu/ticket/156 13 - Removed 'unbounded' option from minimal occurrences drop-down in editor. http://trac.clarin.eu/ticket/210 14 - Made elements and components in component editor collapsable. http://trac.clarin.eu/ticket/217 15 - Removed top-level tabs in the Flex UI, added buttons to browser, editor and import for navigation. http://trac.clarin.eu/ticket/218 13 16 14 17 Release ComponentRegistry-1.11.1 (10 april 2012): -
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
ComponentRegistry/trunk/ComponentRegistry/src/main/binding
- Property svn:mergeinfo changed (with no actual effect on merging)
-
ComponentRegistry/trunk/ComponentRegistry/src/main/binding/bindings.xjb
- Property svn:mergeinfo changed (with no actual effect on merging)
-
ComponentRegistry/trunk/ComponentRegistry/src/main/java
- Property svn:mergeinfo changed (with no actual effect on merging)
-
ComponentRegistry/trunk/ComponentRegistry/src/test/java
- Property svn:mergeinfo changed (with no actual effect on merging)
-
ComponentRegistry/trunk/README
- Property svn:mergeinfo changed (with no actual effect on merging)
-
ComponentRegistry/trunk/docs
- Property svn:mergeinfo changed (with no actual effect on merging)
-
ComponentRegistry/trunk/pom.xml
- Property svn:mergeinfo changed (with no actual effect on merging)
-
metadata/trunk/toolkit/general-component-schema.xsd
- Property svn:mergeinfo changed
/ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentRegistry/src/main/binding/general-component-schema.xsd (added) merged: 2071-2124
- Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.