Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3E45D119BF for ; Wed, 3 Sep 2014 00:17:35 +0000 (UTC) Received: (qmail 36388 invoked by uid 500); 3 Sep 2014 00:17:35 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 36294 invoked by uid 500); 3 Sep 2014 00:17:35 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 36176 invoked by uid 99); 3 Sep 2014 00:17:35 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 00:17:35 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AC903A05026; Wed, 3 Sep 2014 00:17:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Wed, 03 Sep 2014 00:17:39 -0000 Message-Id: <230688e0129141ebbc06687303cefeb2@git.apache.org> In-Reply-To: <122dfe147f634c11af20cd756e3dd86d@git.apache.org> References: <122dfe147f634c11af20cd756e3dd86d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [06/30] Radii8 code base as accepted by IP Clearance http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/renderers/ItemRendererButton.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/renderers/ItemRendererButton.mxml b/Radii8Library/src/com/flexcapacitor/views/renderers/ItemRendererButton.mxml new file mode 100644 index 0000000..cb37c38 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/renderers/ItemRendererButton.mxml @@ -0,0 +1,79 @@ + + + + + + [HostComponent("spark.components.List")] + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/renderers/LayersRenderer.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/renderers/LayersRenderer.mxml b/Radii8Library/src/com/flexcapacitor/views/renderers/LayersRenderer.mxml new file mode 100644 index 0000000..146b2a1 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/renderers/LayersRenderer.mxml @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/renderers/NumberRenderer.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/renderers/NumberRenderer.mxml b/Radii8Library/src/com/flexcapacitor/views/renderers/NumberRenderer.mxml new file mode 100644 index 0000000..31b3798 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/renderers/NumberRenderer.mxml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridRendererBase.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridRendererBase.mxml b/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridRendererBase.mxml new file mode 100644 index 0000000..1a092da --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridRendererBase.mxml @@ -0,0 +1,527 @@ + + + + + + 0) { + + if (formatDropDownList) { + if (valueIsField && labelField) { + actualValue = formatDropDownList.selectedItem[labelField]; + } + else { + actualValue = formatDropDownList.selectedItem; + } + } + else if (formatCombobox) { + if (valueIsField && labelField) { + actualValue = formatCombobox.selectedItem[labelField]; + } + else { + actualValue = formatCombobox.selectedItem; + } + } + } + else { + actualValue = Radiate.getTypedValue(targetValueText.text, type); + } + + // do not auto update if setting properties + settingProperties = true; + + if (isStyle) { + if (clearStyle) { + valueSuccessfullyApplied = Radiate.clearStyle(target, property); + } + else { + valueSuccessfullyApplied = Radiate.setStyle(target, property, actualValue); + } + } + else { + valueSuccessfullyApplied = Radiate.setProperty(target, property, actualValue); + } + + settingProperties = false; + } + + /** + * Get the value from the datagrid and + * show the correct sub component and + * set it's value. + * Depricated. Use non-XML data objects + * */ + public function updateSubComponentsValueXML():void { + var item:XML = data as XML; + var target:Object = Radiate.getInstance().target; + var actualValue:*; + var isStyle:Boolean; + var type:String; + var enumeration:Array; + var format:String; + var propertyObject:MetaData; + var property:String; + var value:String; + var nodename:String; + + if (!target) return; + + if (settingProperties) return; + + if (item) { + nodename = item.name(); + + if (nodename=="metadata") { + isStyle = true; + propertyObject = new StyleMetaData(item, target); + } + else if (nodename=="accessor") { + propertyObject = new AccessorMetaData(item, target); + } + else { + propertyObject = new MetaData(item, target); + } + + // property or style not found! + if (!propertyObject) { + return; + } + + value = String(propertyObject.value); + property = propertyObject.name; + type = propertyObject.type; + format = propertyObject.format; + enumeration = propertyObject.enumeration; + + + if (type=="Boolean") { + booleanEnabledRadioButton.selected = false; + booleanDisabledRadioButton.selected = false; + + if (value=="true") { + booleanEnabledRadioButton.selected = true; + } + else if (value=="false") { + booleanDisabledRadioButton.selected = true; + } + + clearStyleButton.visible = isStyle; + } + else if (format=="Color") { + colorChooser.selectedColor = value; + clearStyleButton.visible = isStyle; + } + else if (enumeration && enumeration.length>0) { + if (!formatsCollection) formatsCollection = new ArrayCollection(); + formatsCollection.source = enumeration; + formatCombobox.selectedItem = propertyObject.value; + clearStyleButton.visible = isStyle; + } + else if (type=="Number") { + numericStepper.value = propertyObject.value; + + if (!isNaN(propertyObject.minValue)) { + numericStepper.minimum = propertyObject.minValue; + } + else { + numericStepper.minimum = Number(int.MIN_VALUE); + } + if (!isNaN(propertyObject.maxValue)) { + numericStepper.maximum = propertyObject.maxValue; + } + else { + numericStepper.maximum = Number(int.MAX_VALUE); + } + + if (property.indexOf("lpha")!=-1) { + numericStepper.stepSize = .1; + + if (isNaN(propertyObject.minValue)) { + numericStepper.minimum = 0; + } + if (isNaN(propertyObject.maxValue)) { + numericStepper.maximum = 1; + } + } + else { + numericStepper.stepSize = 1; + } + + clearStyleButton.visible = isStyle; + } + else { + actualValue = Radiate.getTypedValue(targetValueText.text, type); + targetValueText.text= propertyObject.value; + clearStyleButton.visible = isStyle; + } + + + Radiate.getInstance().dispatchPropertySelectedEvent(property, propertyObject); + } + + } + + /** + * Get the value from the target and + * show the correct inspector with the correct target value. + * */ + public function updateSubComponentsValue():void { + var target:Object = Radiate.getInstance().target; + var propertyObject:MetaData = data as MetaData; + var isStyle:Boolean = propertyObject is StyleMetaData; + var actualValue:*; + var type:String; + var enumeration:Array; + var format:String; + var property:String; + var value:String; + var nodename:String; + + //if (!target) return; + + if (settingProperties) return; + + if (data) { + + value = String(propertyObject.value); + value = propertyObject.textValue; + property = propertyObject.name; + type = propertyObject.type; + format = propertyObject.format; + enumeration = propertyObject.enumeration; + + if (showClearButton && isStyle) { + clearStyleButton.visible = isStyle; + } + else { + clearStyleButton.visible = false; + } + + if (type=="Boolean") { + booleanEnabledRadioButton.selected = false; + booleanDisabledRadioButton.selected = false; + + if (value=="true") { + booleanEnabledRadioButton.selected = true; + } + else if (value=="false") { + booleanDisabledRadioButton.selected = true; + } + + } + else if (format=="Color") { + colorChooser.selectedColor = value; + } + else if ((enumeration && enumeration.length>0) || formatCombobox || formatDropDownList) { + + var dropDownListBase:DropDownListBase = formatCombobox ? formatCombobox : formatDropDownList; + + if (!formatsCollection) formatsCollection = new ArrayCollection(); + formatsCollection.source = enumeration; + + if (labelField) dropDownListBase.labelField = labelField; + + if (labelFunction!=null) dropDownListBase.labelFunction = labelFunction; + + + if (fieldIsValue && labelField) { + var length:int = enumeration.length; + //var value:Object = propertyObject.value; + + for (var i:int;i + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridValuesRenderer.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridValuesRenderer.mxml b/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridValuesRenderer.mxml new file mode 100644 index 0000000..813436d --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/renderers/PropertiesGridValuesRenderer.mxml @@ -0,0 +1,39 @@ + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/renderers/TextRenderer.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/renderers/TextRenderer.mxml b/Radii8Library/src/com/flexcapacitor/views/renderers/TextRenderer.mxml new file mode 100644 index 0000000..3233f62 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/renderers/TextRenderer.mxml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/skins/AutoSaveToggleButton.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/skins/AutoSaveToggleButton.mxml b/Radii8Library/src/com/flexcapacitor/views/skins/AutoSaveToggleButton.mxml new file mode 100644 index 0000000..dac07da --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/skins/AutoSaveToggleButton.mxml @@ -0,0 +1,60 @@ + + + + + + [HostComponent("spark.components.ToggleButton")] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/skins/LoopButton.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/skins/LoopButton.mxml b/Radii8Library/src/com/flexcapacitor/views/skins/LoopButton.mxml new file mode 100644 index 0000000..d8a06a0 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/skins/LoopButton.mxml @@ -0,0 +1,49 @@ + + + + + + [HostComponent("spark.components.ToggleButton")] + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/skins/OnlineToggleButton.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/skins/OnlineToggleButton.mxml b/Radii8Library/src/com/flexcapacitor/views/skins/OnlineToggleButton.mxml new file mode 100644 index 0000000..226f97c --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/skins/OnlineToggleButton.mxml @@ -0,0 +1,56 @@ + + + + + + [HostComponent("spark.components.ToggleButton")] + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/skins/OrientationButton.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/skins/OrientationButton.mxml b/Radii8Library/src/com/flexcapacitor/views/skins/OrientationButton.mxml new file mode 100644 index 0000000..43c3bca --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/skins/OrientationButton.mxml @@ -0,0 +1,54 @@ + + + + + + [HostComponent("spark.components.ToggleButton")] + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/skins/PropertiesDataGridSkin.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/skins/PropertiesDataGridSkin.mxml b/Radii8Library/src/com/flexcapacitor/views/skins/PropertiesDataGridSkin.mxml new file mode 100644 index 0000000..bcf5c67 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/skins/PropertiesDataGridSkin.mxml @@ -0,0 +1,359 @@ + + + + + + + + + + + + + [HostComponent("com.flexcapacitor.controls.DataGrid")] + + + + + + + + + + + + + 0)) + { + dataGrid.styleManager.getColorNames(colors); // lazily replace color names with ints + rowBackgroundFillColor.color = colors[rowIndex % colors.length]; + } + else + { + // This should be the same as bgFill.color. + rowBackgroundFillColor.color = 0xFFFFFF; + } + } + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/supportClasses/LayersDataDescriptor.as ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/supportClasses/LayersDataDescriptor.as b/Radii8Library/src/com/flexcapacitor/views/supportClasses/LayersDataDescriptor.as new file mode 100644 index 0000000..4cd0949 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/supportClasses/LayersDataDescriptor.as @@ -0,0 +1,90 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// + +package com.flexcapacitor.views.supportClasses { + import mx.controls.treeClasses.DefaultDataDescriptor; + import mx.core.IVisualElementContainer; + + import spark.components.Application; + + /** + * Describes how project data is displayed in a tree + * */ + public class LayersDataDescriptor extends DefaultDataDescriptor { + + + public function LayersDataDescriptor() { + super(); + } + + /** + * Get documents for now + * */ + /*override public function getChildren(node:Object, model:Object = null):ICollectionView { + if ("documents" in node) { + return node.documents; + } + + return null; + }*/ + + + /** + * Tests a node for termination. + * Branches are non-terminating but are not required to have any leaf nodes. + * If the node is XML, returns true if the node has children + * or a true isBranch attribute. + * If the node is an object, returns true if the node has a + * (possibly empty) children field. + * + * @param node The node object currently being evaluated. + * @param model The collection that contains the node; ignored by this class. + * + * @return true if this node is non-terminating. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion Flex 3 + */ + override public function isBranch(node:Object, model:Object = null):Boolean + { + if (node == null) + return false; + + var branch:Boolean = false; + + if (node is Object) + { + try + { + if (node.instance is IVisualElementContainer || node.instance is Application) + { + branch = true; + } + } + catch(e:Error) + { + } + } + return branch; + } + + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/supportClasses/Styles.as ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/supportClasses/Styles.as b/Radii8Library/src/com/flexcapacitor/views/supportClasses/Styles.as new file mode 100644 index 0000000..b41ae9f --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/supportClasses/Styles.as @@ -0,0 +1,80 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// + +package com.flexcapacitor.views.supportClasses { + + /** + * Styles for HTML elements + * */ + public class Styles { + + /** + * Constructor + * */ + public function Styles() { + + } + + public static const POSITION:String = "position"; + public static const RELATIVE:String = "relative"; + public static const ABSOLUTE:String = "absolute"; + public static const FIXED:String = "fixed"; + + public static const BLOCK:String = "block"; + public static const INLINE:String = "inline"; + public static const INLINE_BLOCK:String = "inline-block"; + + public static const MARGIN_CENTER:String = "auto auto"; + public static const MARGIN_HORIZONTAL_CENTER:String = "0 auto"; + public static const MARGIN_VERTICAL_CENTER:String = "auto 0"; + + + public static const PADDING_LEFT:String = "padding-left"; + public static const PADDING_RIGHT:String = "padding-right"; + public static const PADDING_TOP:String = "padding-top"; + public static const PADDING_BOTTOM:String = "padding-bottom"; + + + public static const MARGIN_LEFT:String = "margin-left"; + public static const MARGIN_RIGHT:String = "margin-right"; + public static const MARGIN_TOP:String = "margin-top"; + public static const MARGIN_BOTTOM:String = "margin-bottom"; + + + public var position:String; + public var display:String; + public var margin:String; + + public var paddingRight:String; + public var paddingLeft:String; + public var paddingTop:String; + public var paddingBottom:String; + + public var marginRight:String; + public var marginLeft:String; + public var marginTop:String; + public var marginBottom:String; + + public var left:String; + public var top:String; + public var right:String; + public var bottom:String; + + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/windows/AnimatedPanelWindow.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/windows/AnimatedPanelWindow.mxml b/Radii8Library/src/com/flexcapacitor/views/windows/AnimatedPanelWindow.mxml new file mode 100644 index 0000000..4efebb3 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/windows/AnimatedPanelWindow.mxml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/windows/ContactWindow.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/windows/ContactWindow.mxml b/Radii8Library/src/com/flexcapacitor/views/windows/ContactWindow.mxml new file mode 100644 index 0000000..a363162 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/windows/ContactWindow.mxml @@ -0,0 +1,427 @@ + + + + + + @namespace s "library://ns.adobe.com/flex/spark"; + @namespace c "com.flexcapacitor.controls.*"; + @namespace mx "library://ns.adobe.com/flex/mx"; + @namespace handlers "com.flexcapacitor.handlers.*"; + @namespace fc "com.flexcapacitor.effects.popup.*"; + + + + + -1; + + + if (Object(Capabilities).hasOwnProperty("cpuArchitecture")) { + cpu = Capabilities['cpuArchitecture']; + } + else { + cpu = ""; + } + + if (Object(Capabilities).hasOwnProperty("supports32BitProcesses")) { + supports32bit = Capabilities['supports32BitProcesses']; + supports64bit = Capabilities['supports64BitProcesses']; + } + else { + supports32bit = ""; + supports64bit = ""; + } + + if (Object(Capabilities).hasOwnProperty("touchscreenType")) { + touchscreenType = Capabilities['touchscreenType']; + } + else { + touchscreenType = ""; + } + + if (ExternalInterface.available) { + browser = ExternalInterface.call("eval", "navigator.userAgent"); + } + else { + browser = Capabilities.playerType; + } + } + + protected function featureRadioGroup_changeHandler(event:Event):void { + if (featureRadioButton.selected) { + currentState = FEATURE; + } + else { + currentState = BUG; + } + } + + + protected function sendButton_clickHandler():void { + var message:Object = new Object(); + var validResultEvent:ValidationResultEvent = emailValidator.validate(emailText.text); + //var validEmail:Boolean = emailValidator.validate(emailText.text); + + if (validResultEvent.results && validResultEvent.results.length!=0) { + //infoLabel.text = "Please enter a valid email before sending a message."; + infoLabel.text = validResultEvent.message; + return; + } + + if (messageTextArea.text=="" || messageTextArea.text.length<6) { + //StatusManager.show("Please enter a message."); + infoLabel.text = "Please enter a message"; + return; + } + + getPropertiesInfo(); + + message.os = os; + message.browser = browser; + message.player = player; + message.manufacturer = manufacturer; + message.cpu = cpu; + message.isDebugger = isDebugger; + message.language = language; + message.supports32bit = supports32bit; + message.supports64bit = supports64bit; + message.touchscreen = touchscreenType; + + message.email = emailText.text=="" ? emailText.prompt : emailText.text; + + if (currentState==BUG) { + message.message = bugMessageTextArea.text; + } + else if (currentState==FEATURE) { + message.message = messageTextArea.text; + } + + feedbackService.send(message); + } + + protected function feedbackService_resultHandler(event:ResultEvent):void { + var result:String = event.result as String; + //StatusManager.show("Message sent!", 3000, false, null, false, .75); + //nameText.text = ""; + //emailText.prompt = emailText.text!="" ? emailText.text : emailText.prompt; + //emailText.text = ""; + + if (currentState==BUG) { + bugMessageTextArea.text = bugText; + } + else if (currentState==FEATURE) { + messageTextArea.text = ""; + } + + if (result && result.indexOf("Mail sent")!=-1) { + playSentSuccessfulMessage(); + } + + } + + + protected function feedbackService_faultHandler(event:FaultEvent):void { + infoLabel.text = "An error occurred! Message may not have been sent. Please email contact@radii8.com."; + //StatusManager.show("An error occurred! Message may not have been sent. \n\n" + event.fault.message); + Radiate.log.error(event.fault.message); + } + + /** + * Sets the action to deleted, the label to deleted and closes the window after a second. + * */ + public function playSentSuccessfulMessage():void { + //infoLabel.text = "Sent!"; + //action = "Sent"; + + StatusManager.show("Message sent!", 1000, false, null, false, .20); + closePopUp.startDelay = 1000; + closePopUp.play(); + } + + protected function cancelButton_clickHandler(event:MouseEvent):void { + callLater(PopUpManager.removePopUp, [this]); + } + + protected function creationCompleteHandler(event:FlexEvent):void { + radiate = Radiate.getInstance(); + + if (radiate.isUserLoggedIn) { + emailText.text = radiate.userEmail; + } + + if (currentState==BUG) { + bugMessageTextArea.text = bugText; + //helpTextArea.text = bugExampleText; + } + else { + //messageTextArea.text = bugText; + //messageTextArea.text = bugExampleText; + } + } + + protected function stateChangeCompleteHandler(event:FlexEvent):void { + + if (currentState==BUG && bugMessageTextArea.text=="") { + bugMessageTextArea.text = bugText; + addMoveEffect(); + PopUpManager.centerPopUp(this); + } + else { + PopUpManager.centerPopUp(this); + } + } + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + event.preventDefault(); + event.currentTarget.insertText("\t"); + + Summarize the problem and list the steps to reproduce. + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/flex-radii8/blob/f370bfcf/Radii8Library/src/com/flexcapacitor/views/windows/DeleteDocumentWindow.mxml ---------------------------------------------------------------------- diff --git a/Radii8Library/src/com/flexcapacitor/views/windows/DeleteDocumentWindow.mxml b/Radii8Library/src/com/flexcapacitor/views/windows/DeleteDocumentWindow.mxml new file mode 100644 index 0000000..3e10603 --- /dev/null +++ b/Radii8Library/src/com/flexcapacitor/views/windows/DeleteDocumentWindow.mxml @@ -0,0 +1,309 @@ + + + + + + @namespace s "library://ns.adobe.com/flex/spark"; + @namespace c "com.flexcapacitor.controls.*"; + @namespace mx "library://ns.adobe.com/flex/mx"; + @namespace handlers "com.flexcapacitor.handlers.*"; + @namespace fc "com.flexcapacitor.effects.popup.*"; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +