Example #1
0
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "DeviceAccessRuleProperties";
            scriptDescriptor.AddComponentProperty("DeviceTypeSelector", base.ContentContainer.FindControl("pkrDeviceFamily").ClientID);
            scriptDescriptor.AddComponentProperty("DeviceModelSelector", base.ContentContainer.FindControl("pkrDeviceModel").ClientID);
            return(scriptDescriptor);
        }
Example #2
0
        public IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            var desc = new ScriptControlDescriptor("Zetbox.Client.ASPNET.View.LauncherView", containerCtrl.ClientID);

            desc.AddComponentProperty("ListModules", listModulesCtrl.ClientID);
            desc.AddComponentProperty("ListObjectClasses", listObjectClassesCtrl.ClientID);
            desc.AddComponentProperty("ListInstances", listInstancesCtrl.ClientID);
            yield return(desc);
        }
 private void BuildScriptDescriptor(ScriptControlDescriptor descriptor)
 {
     descriptor.AddElementProperty("GroupByDropDown", this.ddlGroupBy.ClientID, true);
     descriptor.AddElementProperty("DialPlanDropDown", this.ddlDialPlan.ClientID, true);
     descriptor.AddElementProperty("IPGatewayDropDown", this.ddlIPGateway.ClientID, true);
     descriptor.AddComponentProperty("ListView", this.listView.ClientID, true);
     descriptor.AddComponentProperty("ListViewDataSource", this.listViewDataSource.ClientID, true);
     descriptor.AddProperty("DialPlanToGatewaysMapping", this.dialPlanToGatewaysMapping);
 }
Example #4
0
        public override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            var descriptor = new ScriptControlDescriptor(typeof(DatePickerDesignerView).FullName, this.ClientID);

            descriptor.AddComponentProperty("minimumPicker", this.MinimumPicker.ClientID);
            descriptor.AddComponentProperty("maximumPicker", this.MaximumPicker.ClientID);

            return(new[] { descriptor });
        }
Example #5
0
 private void BuildScriptDescriptor(ScriptControlDescriptor descriptor)
 {
     descriptor.AddComponentProperty("ListView", this.listView.ClientID, true);
     descriptor.AddComponentProperty("ListViewDataSource", this.listViewDataSource.ClientID, true);
     descriptor.AddComponentProperty("ListViewRefreshMethod", this.listViewDataSource.RefreshWebServiceMethod.ClientID, true);
     if (this.pickerUMMailboxToSearch != null)
     {
         descriptor.AddComponentProperty("UMMailboxPicker", this.pickerUMMailboxToSearch.ClientID, true);
     }
 }
Example #6
0
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.AddComponentProperty("Properties", base.FindPropertiesParent().ClientID);
            scriptDescriptor.AddElementProperty("FileLocationLbl", this.fileLocationLabel.ClientID);
            scriptDescriptor.AddComponentProperty("UploaderImplementation", this.uploaderBase.ClientID);
            scriptDescriptor.AddProperty("ProgressDescription", this.ProgressDescription ?? OwaOptionStrings.PleaseWait);
            return(scriptDescriptor);
        }
Example #7
0
        protected virtual ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptControlDescriptor = new ScriptControlDescriptor("PropertyPage", this.ClientID);

            scriptControlDescriptor.AddProperty("UseSetObject", this.UseSetObject, true);
            scriptControlDescriptor.AddProperty("RequireDataAtInitialize", this.RequireDataAtInitialize, true);
            BaseForm baseForm = this.Page as BaseForm;

            if (baseForm != null)
            {
                scriptControlDescriptor.AddComponentProperty("Form", "aspnetForm", true);
            }
            scriptControlDescriptor.AddClientIdProperty("ContentContainerID", this.ContentContainer);
            if (null != this.ObjectIdentity)
            {
                scriptControlDescriptor.AddScriptProperty("ObjectIdentity", this.ObjectIdentity.ToJsonString(null));
            }
            if (this.Results != null)
            {
                scriptControlDescriptor.AddProperty("JsonResults", this.Results.ToJsonString(DDIService.KnownTypes.Value));
                if (!string.IsNullOrEmpty(this.SaveMethodExpression))
                {
                    scriptControlDescriptor.AddScriptProperty("SaveMethodExpression", "function($_){ return " + this.SaveMethodExpression + "}");
                }
            }
            if (this.Bindings != null)
            {
                scriptControlDescriptor.AddScriptProperty("Bindings", this.Bindings.ToJavaScript(null));
                WebControl captionLabel = this.GetCaptionLabel();
                if (captionLabel != null && !string.IsNullOrEmpty(this.CaptionTextField))
                {
                    scriptControlDescriptor.AddScriptProperty("CaptionTextField", "function($_){ return $_." + this.CaptionTextField + "; }");
                    scriptControlDescriptor.AddElementProperty("CaptionControl", captionLabel.ClientID);
                }
            }
            scriptControlDescriptor.AddComponentProperty("RefreshWebServiceMethod", this.RefreshWebServiceMethod);
            if (!this.ReadOnly)
            {
                scriptControlDescriptor.AddComponentProperty("SaveWebServiceMethod", this.SaveWebServiceMethod);
            }
            scriptControlDescriptor.AddProperty("UseWarningPanel", this.UseWarningPanel, true);
            scriptControlDescriptor.AddProperty("SuppressWarning", this.SuppressWarning, true);
            scriptControlDescriptor.AddClientIdProperty("WarningPanelID", this.warningPanel);
            scriptControlDescriptor.AddProperty("HideClientValidationError", this.HideClientValidationError, true);
            scriptControlDescriptor.AddProperty("SaveConfirmationText", this.SaveConfirmationText, true);
            if (!string.IsNullOrEmpty(this.OnRefreshSucceed))
            {
                scriptControlDescriptor.AddScriptProperty("OnRefreshSucceed", this.OnRefreshSucceed);
            }
            if (this.NameProperty != "Name")
            {
                scriptControlDescriptor.AddProperty("NameProperty", this.NameProperty);
            }
            return(scriptControlDescriptor);
        }
Example #8
0
        public override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            var descriptors = new List <ScriptDescriptor>();
            var descriptor  = new ScriptControlDescriptor(typeof(DonationsWidget).FullName, this.ClientID);

            descriptor.AddComponentProperty("donationAmountDropDown", this.DonationAmountDropDown.ClientID);
            descriptor.AddComponentProperty("otherAmount", this.OtherAmountControl.ClientID);

            descriptors.Add(descriptor);

            return(new[] { descriptor });
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.AddComponentProperty("PropertyPage", this.propertyPage.ClientID);
            scriptDescriptor.AddComponentProperty("WebServiceMethod", this.webServiceMethod.ClientID);
            scriptDescriptor.AddProperty("ProgressDescription", this.ProgressDescription ?? Strings.PleaseWait);
            scriptDescriptor.AddProperty("NextOnCancel", this.NextOnCancel);
            scriptDescriptor.AddProperty("NextOnError", this.NextOnError);
            scriptDescriptor.AddProperty("ShowErrors", this.ShowErrors);
            return(scriptDescriptor);
        }
Example #10
0
        public override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            var baseDescriptors = new List <ScriptDescriptor>(base.GetScriptDescriptors());
            var akismetSD       = new ScriptControlDescriptor(typeof(AkismetBasicSettingsView).FullName, this.ClientID);

            akismetSD.AddComponentProperty("protectCommentsField", this.ProtectCommentsField.ClientID);
            akismetSD.AddComponentProperty("protectForumsField", this.ProtectForumsField.ClientID);
            akismetSD.AddComponentProperty("apiKeyField", this.ApiKeyField.ClientID);
            akismetSD.AddComponentProperty("messageControl", this.Message.ClientID);
            akismetSD.AddElementProperty("saveButton", this.SaveButton.ClientID);

            baseDescriptors.Add(akismetSD);
            return(baseDescriptors);
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "UMHolidayScheduleProperties";
            scriptDescriptor.AddComponentProperty("HolidayPromptUploader", base.ContentContainer.FindControl("auGreetingFile").ClientID);
            scriptDescriptor.AddComponentProperty("StartDateChooser", base.ContentContainer.FindControl("dcStartDate").ClientID);
            scriptDescriptor.AddComponentProperty("EndDateChooser", base.ContentContainer.FindControl("dcEndDate").ClientID);
            scriptDescriptor.AddElementProperty("Name", base.ContentContainer.FindControl("txtName").ClientID);
            scriptDescriptor.AddElementProperty("StartDateForDisplay", base.ContentContainer.FindControl("txtStartDateDisplay").ClientID);
            scriptDescriptor.AddElementProperty("EndDateForDisplay", base.ContentContainer.FindControl("txtEndDateDisplay").ClientID);
            scriptDescriptor.AddProperty("UserDateFormat", EcpDateTimeHelper.GetUserDateFormat());
            scriptDescriptor.AddProperty("TodaysDate", ExDateTime.Now.ToUserExDateTime().ToString("yyyy/MM/dd", CultureInfo.InvariantCulture));
            return(scriptDescriptor);
        }
Example #12
0
        protected virtual IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            ScriptControlDescriptor descriptor = new ScriptControlDescriptor("Sys.Preview.UI.Controls.WebParts.WebPartZone", ClientID);

            descriptor.AddProperty("uniqueId", UniqueID);
            descriptor.AddComponentProperty("webPartManager", BaseWebPartManager.ClientID);
            descriptor.AddProperty("allowLayoutChange", AllowLayoutChange);
            yield return(descriptor);

            AtlasWebPartChrome chrome = new AtlasWebPartChrome(this, BaseWebPartManager);

            System.Web.UI.WebControls.WebParts.WebPartCollection webParts = WebParts;
            for (int i = 0; i < webParts.Count; i++)
            {
                System.Web.UI.WebControls.WebParts.WebPart webPart = webParts[i];
                ScriptControlDescriptor wpDescriptor = new ScriptControlDescriptor("Sys.Preview.UI.Controls.WebParts.WebPart", chrome.GetWebPartChromeClientID(webPart));

                // Only render titleElement in xml-script if the titleElement was actually rendered
                // in the HTML by WebPartChrome.
                System.Web.UI.WebControls.WebParts.PartChromeType effectiveChromeType =
                    GetEffectiveChromeType(webPart);
                if (effectiveChromeType == System.Web.UI.WebControls.WebParts.PartChromeType.TitleOnly ||
                    effectiveChromeType == System.Web.UI.WebControls.WebParts.PartChromeType.TitleAndBorder)
                {
                    wpDescriptor.AddElementProperty("titleElement", chrome.GetWebPartTitleClientID(webPart));
                }

                wpDescriptor.AddComponentProperty("zone", ClientID);
                wpDescriptor.AddProperty("zoneIndex", i.ToString());
                wpDescriptor.AddProperty("allowZoneChange", webPart.AllowZoneChange);
                yield return(wpDescriptor);
            }
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.AddComponentProperty("PropertyPage", base.FindPropertiesParent().ClientID);
            return(scriptDescriptor);
        }
Example #14
0
        /// <summary>
        /// Get list of all scripts used by control
        /// </summary>
        /// <returns>List of all scripts used by control</returns>
        public override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            var descriptor = new ScriptControlDescriptor(typeof(EmailDistributionDropDown).FullName, this.ClientID);

            descriptor.AddComponentProperty("dropDownList", this.DropDownList.ClientID);
            descriptor.AddProperty("dataFieldName", this.MetaField.FieldName);             //the field name of the corresponding widget
            return(new[] { descriptor });
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "VoicemailSettingsProperties";
            scriptDescriptor.AddComponentProperty("ResetPINWebServiceMethod", this.ResetPINWebServiceMethod.ClientID);
            return(scriptDescriptor);
        }
Example #16
0
        protected virtual ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptControlDescriptor = new ScriptControlDescriptor(this.ClientClassName, this.ClientID);

            scriptControlDescriptor.AddProperty("FvaEnabled", this.FvaEnabled, true);
            scriptControlDescriptor.AddProperty("Title", this.Title, true);
            scriptControlDescriptor.AddComponentProperty("Form", "aspnetForm");
            return(scriptControlDescriptor);
        }
Example #17
0
        private void AddComponentPropertyIfVisible(ScriptControlDescriptor descriptor, string name, string controlName)
        {
            Control control = base.ContentContainer.FindControl(controlName);

            if (control != null && control.Visible)
            {
                descriptor.AddComponentProperty(name, control.ClientID);
            }
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "VoicemailProperties";
            scriptDescriptor.AddComponentProperty("ClearSettingsWebServiceMethod", this.ClearSettingsWebServiceMethod.ClientID);
            scriptDescriptor.AddProperty("LCID", Util.GetLCID());
            return(scriptDescriptor);
        }
        public override IEnumerable <System.Web.UI.ScriptDescriptor> GetScriptDescriptors()
        {
            ScriptControlDescriptor descriptor = new ScriptControlDescriptor(this.GetType().FullName, this.ClientID);

            descriptor.AddProperty("_selectContentButton", this.SelectContentButton.ClientID);
            descriptor.AddElementProperty("selectedContentTitle", this.SelectedContentLabel.ClientID);
            descriptor.AddComponentProperty("contentSelector", this.ContentSelector.ClientID);
            descriptor.AddComponentProperty("filterSelector", this.FilterSelector.ClientID);
            if (this.NarrowSelectionButton != null)
            {
                descriptor.AddElementProperty("btnNarrowSelection", this.NarrowSelectionButton.ClientID);
            }
            if (this.NarrowSelectionContainer != null)
            {
                descriptor.AddElementProperty("narrowSelection", this.NarrowSelectionContainer.ClientID);
            }
            return(new ScriptControlDescriptor[] { descriptor });
        }
        IEnumerable <ScriptDescriptor> IScriptControl.GetScriptDescriptors()
        {
            ScriptControlDescriptor scriptControlDescriptor = new ScriptControlDescriptor("WaterMarkedTextArea", this.ClientID);

            scriptControlDescriptor.AddComponentProperty("WatermarkBehavior", this.WatermarkExtender.ClientID);
            return(new ScriptDescriptor[]
            {
                scriptControlDescriptor
            });
        }
Example #21
0
        public override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            List <ScriptDescriptor> scriptDescriptors = new List <ScriptDescriptor>();

            ScriptControlDescriptor scriptControlDescriptor = new ScriptControlDescriptor(GetType().FullName, ClientID);

            scriptControlDescriptor.AddComponentProperty("htmlEditor", this.HtmlEditor.ClientID);

            scriptDescriptors.Add(scriptControlDescriptor);
            return(scriptDescriptors);
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "CalendarAppearanceProperties";
            if (this.UpdateWebServiceMethod != null)
            {
                scriptDescriptor.AddComponentProperty("UpdateWebServiceMethod", this.UpdateWebServiceMethod.ClientID);
            }
            return(scriptDescriptor);
        }
Example #23
0
        public System.Collections.Generic.IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            ScriptControlDescriptor desc = new ScriptControlDescriptor("Zetbox.Client.ASPNET.ObjectListControl",
                                                                       ContainerControl.ClientID);

            desc.AddComponentProperty("List", LstItemsControl.ClientID);
            desc.AddElementProperty("Items", HdItemsControl.ClientID);
            desc.AddElementProperty("LnkAdd", LnkAddControl.ClientID);
            desc.AddElementProperty("LnkNew", LnkNewControl.ClientID);
            desc.AddProperty("Type", Model.ReferencedClass.GetDescribedInterfaceType().ToSerializableType());
            yield return(desc);
        }
Example #24
0
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "ShowResultWizardStep";
            Control control = this.NamingContainer.FindControl(this.WebServiceStepID);

            scriptDescriptor.AddComponentProperty("WebServiceStep", control.ClientID);
            scriptDescriptor.AddElementProperty("MessageDiv", this.messageDiv.ClientID);
            scriptDescriptor.AddProperty("SucceededText", this.SucceededText);
            return(scriptDescriptor);
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "SmsSlabProperties";
            if (this.DisableWebServiceMethod != null)
            {
                scriptDescriptor.AddComponentProperty("DisableWebServiceMethod", this.DisableWebServiceMethod.ClientID);
            }
            scriptDescriptor.AddProperty("EditSettingPage", this.editSettingPage);
            return(scriptDescriptor);
        }
Example #26
0
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "AddUMExtensionProperties";
            scriptDescriptor.AddElementProperty("Extension", base.ContentContainer.FindControl("txtExtension").ClientID);
            scriptDescriptor.AddElementProperty("PhoneContext", base.ContentContainer.FindControl("txtPhoneContext").ClientID);
            scriptDescriptor.AddElementProperty("DialPlanName", base.ContentContainer.FindControl("txtDialPlanName").ClientID);
            scriptDescriptor.AddElementProperty("ExtensionLabel", base.ContentContainer.FindControl("txtExtension_label").ClientID);
            scriptDescriptor.AddComponentProperty("DialPlanSelector", base.ContentContainer.FindControl("pickerUMDialPlan").ClientID);
            return(scriptDescriptor);
        }
        protected override ScriptControlDescriptor GetScriptDescriptor()
        {
            ScriptControlDescriptor scriptDescriptor = base.GetScriptDescriptor();

            scriptDescriptor.Type = "SmsWizardProperties";
            scriptDescriptor.AddProperty("ServiceProviders", SmsServiceProviders.Instance);
            if (this.IsNotificationWizard)
            {
                scriptDescriptor.AddProperty("IsNotificationWizard", true);
            }
            scriptDescriptor.AddComponentProperty("SendVerificationCodeWebServiceMethod", this.SendVerificationCodeWebServiceMethod.ClientID);
            return(scriptDescriptor);
        }
        public override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            var scriptDescriptors = new List <ScriptDescriptor>(base.GetScriptDescriptors());
            ScriptControlDescriptor descriptor = scriptDescriptors.Last() as ScriptControlDescriptor;

            if (this.TextBoxControl != null)
            {
                descriptor.AddElementProperty("textBoxElement", this.TextBoxControl.ClientID);
                descriptor.AddComponentProperty("textBoxElement", this.TextBoxControl.ClientID);
                descriptor.AddProperty("dataFieldName", this.MetaField.FieldName);
            }
            return(scriptDescriptors.ToArray());
        }
        IEnumerable <ScriptDescriptor> IScriptControl.GetScriptDescriptors()
        {
            ScriptControlDescriptor scriptDescriptor = this.GetScriptDescriptor();

            scriptDescriptor.Type = "CalendarDiagnosticLogProperties";
            if (this.SendLogWebServiceMethod != null)
            {
                scriptDescriptor.AddComponentProperty("SendLogWebServiceMethod", this.SendLogWebServiceMethod.ClientID);
            }
            return(new ScriptControlDescriptor[]
            {
                scriptDescriptor
            });
        }
Example #30
0
        public override IEnumerable <ScriptDescriptor> GetScriptDescriptors()
        {
            base.GetScriptDescriptors();
            //TODO: Additional scripts
            List <ScriptDescriptor> descriptors = new List <ScriptDescriptor>();
            ScriptControlDescriptor descriptor  = base.GetScriptDescriptors().Last() as ScriptControlDescriptor;

            if (this.DropDownControl != null)
            {
                descriptor.AddElementProperty("textBoxElement", this.DropDownControl.ClientID);
                descriptor.AddProperty("dataFieldName", this.MetaField.FieldName);
                descriptor.AddComponentProperty("textBoxElement", this.DropDownControl.ClientID);
            }
            descriptors.Add(descriptor);
            return(descriptors.ToArray());
        }