protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddScriptProperty("Items", this.BuildClientItems(from item in this.items select item.ToJavaScript())); descriptor.AddComponentProperty("OwnerControl", this.OwnerControlID, true); descriptor.AddProperty("CssForDropDownContextMenu", this.CssForDropDownContextMenu, true); descriptor.AddScriptProperty("AdditionalItems", this.BuildClientItems(from item in this.additionalItems select item.ToJavaScript())); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); OptionsHelpId optionsHelpId = base.UseSetObject ? OptionsHelpId.EditInboxRule : OptionsHelpId.NewInboxRule; descriptor.AddProperty("HrefForStopProcessingRules", HelpUtil.BuildEhcHref(optionsHelpId.ToString()), true); if (this.ruleObj != null) { descriptor.AddScriptProperty("MailMessageObject", this.ruleObj.ToJsonString(null)); } if (this.templatePhraseNames != null) { descriptor.AddScriptProperty("TemplatePhraseNames", this.templatePhraseNames.ToJsonString(null)); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddScriptProperty("NavTree", this.NavigationTree.ToJsonString(null)); descriptor.AddProperty("CloudServer", this.CloudServer, true); descriptor.AddProperty("ServerVersion", this.ServerVersion); if (this.HasHybridParameter) { descriptor.AddProperty("DisableHybridSyncCheck", this.DisableHybridSyncCheck); descriptor.AddProperty("HybridSyncTimeoutInSeconds", this.HybridSyncTimeoutInSeconds); } descriptor.AddProperty("CmdletLoggingEnabled", EacFlightUtility.GetSnapshotForCurrentUser().Eac.CmdletLogging.Enabled); descriptor.AddProperty("ShowPerfConsole", StringComparer.OrdinalIgnoreCase.Equals("true", WebConfigurationManager.AppSettings["ShowPerformanceConsole"]), true); descriptor.AddScriptProperty("RbacData", ClientRbac.GetRbacData().ToJsonString(null)); descriptor.AddProperty("CloseWindowOnLogout", this.CloseWindowOnLogout, true); descriptor.AddProperty("IsLegacyLogOff", this.IsLegacyLogOff, true); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); if (!string.IsNullOrEmpty(this.ConverterType)) { descriptor.AddScriptProperty("Converter", "new " + this.ConverterType + "()"); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); CmdExecuteInfo[] cmdletLogs = HttpContext.Current.GetCmdletLogs(); if (cmdletLogs != null) { descriptor.AddScriptProperty("Infos", cmdletLogs.ToJsonString(null)); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddProperty("GroupNameLocString", DistributionGroupNamingPolicy.GroupNameLocString); descriptor.AddProperty("PrefixLabel", this.PrefixLabel, true); descriptor.AddProperty("SuffixLabel", this.SuffixLabel, true); descriptor.AddProperty("MaxLength", 1024.ToString(), true); descriptor.AddElementProperty("ParametersPanel", this.ParametersPanel, this); if (!this.UseSetObject) { descriptor.AddProperty("UseSetObject", false); } EnumParameter enumParameter = (EnumParameter)this.SupportedPrefixes[0].Parameters[0]; Array.Sort <EnumValue>(enumParameter.Values, (EnumValue val1, EnumValue val2) => val1.DisplayText.CompareTo(val2.DisplayText)); descriptor.AddScriptProperty("AllPrefixes", this.SupportedPrefixes.ToJsonString(null)); descriptor.AddScriptProperty("AllSuffixes", this.SupportedSuffixes.ToJsonString(null)); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddElementProperty("DatePicker", this.DatePickerID); descriptor.AddElementProperty("DateComboBox", this.DateComboBoxID); descriptor.AddElementProperty("DateText", this.DateTextID); descriptor.AddElementProperty("Calendar", this.CalendarID); descriptor.AddElementProperty("TimePicker", this.TimePickerID); descriptor.AddProperty("HasTimePicker", this.HasTimePicker); descriptor.AddProperty("Today", this.Today); descriptor.AddProperty("WeekStartDay", this.WeekStartDay); descriptor.AddProperty("GeneralizedDateTimeFormat", this.GeneralizedDateTimeFormat); descriptor.AddProperty("WeekdayDateFormat", this.WeekdayDateFormat); descriptor.AddProperty("YearMonthFormat", this.YearMonthFormat); descriptor.AddScriptProperty("OneLetterDayNames", this.OneLetterDayNames.ToJsonString(null)); descriptor.AddScriptProperty("AbbreviatedDayNames", this.AbbreviatedDayNames.ToJsonString(null)); descriptor.AddScriptProperty("AbbreviatedMonthNames", this.AbbreviatedMonthNames.ToJsonString(null)); descriptor.AddScriptProperty("MonthNames", this.MonthNames.ToJsonString(null)); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddProperty("FormatBarID", this.formatBar.ClientID); descriptor.AddElementProperty("IFrameBody", this.iframeBody.ClientID); descriptor.AddElementProperty("ErrorBar", this.errorBar.ClientID); if (Util.IsIE()) { descriptor.AddElementProperty("EndDiv", this.ClientID + "_endDiv"); } descriptor.AddScriptProperty("ButtonsBIU", this.ButtonsBIU.ToJsonString(null)); descriptor.AddScriptProperty("ButtonTooltips", this.ButtonTooltips.ToJsonString(null)); descriptor.AddScriptProperty("CustomizeTooltips", this.CustomizeTooltips.ToJsonString(null)); descriptor.AddScriptProperty("NoneButtonString", this.NoneButtonString.ToJsonString(null)); descriptor.AddProperty("IsMessageFontEditor", this.IsMessageFontEditor); if (this.MaxLength > 0) { descriptor.AddProperty("MaxLength", this.MaxLength - RichTextEditor.ReservedSpace); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { this.DataBind(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (ValuePair valuePair in this.Values) { dictionary.Add(valuePair.Name, valuePair.Value); } descriptor.AddScriptProperty("Values", dictionary.ToJsonString(null)); descriptor.AddProperty("Name", this.Name); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); Identity dataContract = Identity.FromExecutingUserId(); Image image = (Image)this.Parent.FindControl(this.ImageElementId); descriptor.AddElementProperty("Image", image.ClientID); descriptor.AddComponentProperty("CancelWebServiceMethod", this.CancelWebServiceMethod.ClientID); descriptor.AddComponentProperty("SaveWebServiceMethod", this.SaveWebServiceMethod.ClientID); descriptor.AddComponentProperty("RemoveWebServiceMethod", this.RemoveWebServiceMethod.ClientID); descriptor.AddScriptProperty("ObjectIdentity", dataContract.ToJsonString(null)); descriptor.AddProperty("RemovingPreviewPhotoText", this.RemovingPreviewPhotoText); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddComponentProperty("ListView", this.ListViewID, this); descriptor.AddScriptProperty("BaseTypeMapping", new TypeMapping { BaseUrl = this.BaseUrl, InRole = new bool?(LoginUtil.CheckUrlAccess(this.BaseUrl)) }.ToJsonString(null)); if (this.TypeProperty != "Type") { descriptor.AddProperty("TypeProperty", this.TypeProperty); } if (!string.IsNullOrWhiteSpace(this.ArgumentProperty)) { descriptor.AddProperty("ArgumentProperty", this.ArgumentProperty); } descriptor.AddScriptProperty("TypeMappings", this.TypeMappings.ToJsonString(null)); if (this.SuppressFrameCache) { descriptor.AddProperty("SuppressFrameCache", true); } descriptor.AddElementProperty("ContentPanel", this.ContentPanelID, true); descriptor.AddElementProperty("LoadingDiv", this.LoadingDivID, true); descriptor.AddElementProperty("NoPermissionDiv", this.noPermissionDiv.ClientID, true); if (this.ShowPaddingPanels) { descriptor.AddProperty("ShowPaddingPanels", true); descriptor.AddElementProperty("TopEmptyPanel", this.TopEmptyPanelID, true); descriptor.AddElementProperty("MiddleEmptyPanel", this.MiddleEmptyPanelID, true); descriptor.AddElementProperty("BottomEmptyPanel", this.BottomEmptyPanelID, true); } descriptor.AddElementProperty("Frame", this.FrameID, true); descriptor.AddProperty("FrameTitle", this.FrameTitle, true); if (this.toolbar != null && this.ShowToolbar) { descriptor.AddComponentProperty("Toolbar", this.toolbar.ClientID); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddEvent("Invoking", this.OnClientInvoking, true); descriptor.AddEvent("Completed", this.OnClientCompleted, true); descriptor.AddEvent("Succeeded", this.OnClientSucceeded, true); descriptor.AddEvent("Failed", this.OnClientFailed, true); descriptor.AddProperty("ParameterNames", this.ParameterNames); descriptor.AddProperty("ServiceUrl", EcpUrl.ProcessUrl(this.ServiceUrl.ServiceUrl)); descriptor.AddProperty("MethodName", this.Method); descriptor.AddProperty("ExceptionHandlerIDs", this.ExceptionHandlersIDs); descriptor.AddScriptProperty("Parameters", this.Parameters.ToJavaScript(this)); descriptor.AddProperty("AlwaysInvokeSave", this.AlwaysInvokeSave); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddComponentProperty("ListView", this.ListViewID, this); descriptor.AddComponentProperty("DataSource", this.ListSourceID, this); if (!string.IsNullOrEmpty(this.ValidationExpression)) { descriptor.AddScriptProperty("ValidationExpression", "function($_) { return /" + this.ValidationExpression + "/.test($_) }"); descriptor.AddProperty("ValidationErrorMessage", this.ValidationErrorMessage); } if (this.DuplicateHandlingType != DuplicateHandlingType.AllowDuplicate) { descriptor.AddProperty("DuplicateHandlingType", this.DuplicateHandlingType); } if (this.ReadOnly) { descriptor.AddProperty("ReadOnly", true); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); if (this.UploadHandlerClass == UploadHandlers.None) { throw new ArgumentNullException("UploadHandlerClass", "UploadHandlerClass must be set."); } descriptor.AddProperty("UploadHandlerClass", this.UploadHandlerClass.ToString()); if (!this.Extensions.IsNullOrEmpty()) { descriptor.AddProperty("Extensions", this.Extensions); } if (!this.ParameterNames.IsNullOrEmpty()) { descriptor.AddProperty("ParameterNames", this.ParameterNames); } descriptor.AddElementProperty("Iframe", this.iframeElement.ClientID); descriptor.AddElementProperty("ErrorLbl", this.errorLabel.ClientID); foreach (Binding binding in this.Parameters) { this.Bindings.Bindings.Add(binding.Name, binding); } descriptor.AddScriptProperty("Parameters", this.Bindings.ToJavaScript(this)); }
protected virtual IEnumerable <ScriptDescriptor> GetScriptDescriptors() { var scd = new ScriptComponentDescriptor(GetType().FullName); scd.ID = ClientID; scd.AddProperty("_id", ClientID); scd.AddProperty("_hiddenFieldID", GetStateFieldId()); scd.AddProperty("_backgroundImage", Page.Server.HtmlEncode(Page.ClientScript.GetWebResourceUrl(GetType(), "Aurigma.GraphicsMill.AjaxControls.VectorObjects.Resources.Background.gif"))); if (string.IsNullOrEmpty(_loadingImageUrl)) { // Default image _loadingImageUrl = Page.ClientScript.GetWebResourceUrl(GetType(), "Aurigma.GraphicsMill.AjaxControls.VectorObjects.Resources.WaitClock.gif"); } scd.AddProperty("_loadingImageUrl", Page.Server.HtmlEncode(ResolveClientUrl(LoadingImageUrl))); scd.AddProperty("data", Data); scd.AddScriptProperty("_callback", "function(){" + Page.ClientScript.GetCallbackEventReference(this, "this._callbackArgs" , "Function.createDelegate(this, this._callbackSuccess)" , "this._callbackContext" , "Function.createDelegate(this, this._callbackError)", true) + "}"); scd.AddProperty("_handlerUrl", VirtualPathUtility.ToAbsolute(Configuration.Instance.HandlerUrl)); return(new ScriptDescriptor[] { scd }); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddProperty("Caption", this.Caption, true); descriptor.AddProperty("ActionLabel", this.ActionLabel, true); descriptor.AddProperty("ConditionLabel", this.ConditionLabel, true); descriptor.AddProperty("ExceptionLabel", this.ExceptionLabel, true); descriptor.AddProperty("AdvModeDialogMinHeight", this.AdvModeDialogMinSize.Height.ToString(), true); descriptor.AddProperty("AdvModeDialogMinWidth", this.AdvModeDialogMinSize.Width.ToString(), true); descriptor.AddProperty("RuleNameMaxLength", this.RuleService.RuleNameMaxLength.ToString(), true); descriptor.AddElementProperty("MoreOptionButton", this.MoreOptionLink, this); descriptor.AddElementProperty("StaticOptionsPanel", this.staticOptionsPanel.ClientID, this); descriptor.AddElementProperty("MoreOptionsPanel", this.evenMoreOptionsPanel.ClientID, this); descriptor.AddElementProperty("ParametersPanel", this.ParametersPanel, this); if (!this.UseSetObject) { descriptor.AddProperty("UseSetObject", false); } descriptor.AddProperty("SupportAdvancedMode", this.SupportAdvancedMode); descriptor.AddScriptProperty("NonWritablePhraseNames", this.NonWritablePhraseNameList.ToJsonString(null)); descriptor.AddScriptProperty("AllConditions", this.RuleService.SupportedConditions.ToJsonString(null)); descriptor.AddScriptProperty("AllActions", this.RuleService.SupportedActions.ToJsonString(null)); descriptor.AddScriptProperty("AllExceptions", this.RuleService.SupportedExceptions.ToJsonString(null)); if (this.defaultConditions != null) { descriptor.AddScriptProperty("DefaultConditions", this.defaultConditions.ToJsonString(null)); } if (this.defaultActions != null) { descriptor.AddScriptProperty("DefaultActions", this.defaultActions.ToJsonString(null)); } if (this.defaultValues.Count != 0) { descriptor.AddScriptProperty("DefaultValues", new JsonDictionary <string>(this.defaultValues).ToJsonString(null)); } descriptor.AddProperty("IsCopyMode", this.IsCopyMode); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); string text = RbacPrincipal.Current.TimeFormat; string[] array = text.Split(new char[] { '\'' }); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < array.Length; i += 2) { stringBuilder.Append(array[i]); } text = stringBuilder.ToString(); string text2 = "%h"; if (-1 != text.IndexOf("HH")) { text2 = "HH"; } else if (-1 != text.IndexOf("hh")) { text2 = "hh"; } else if (-1 != text.IndexOf("H")) { text2 = "%H"; } else if (-1 != text.IndexOf("h")) { text2 = "%h"; } bool flag = "HH" == text2 || "%H" == text2; string[] array2 = new string[24]; DateTime dateTime = new DateTime(2000, 1, 1, 0, 0, 0); CultureInfo currentCulture = CultureInfo.CurrentCulture; for (int j = 0; j < 24; j++) { array2[j] = HttpUtility.HtmlEncode(dateTime.ToString(text2, currentCulture)); dateTime = dateTime.AddHours(1.0); } string[] array3 = new string[4]; int k = 0; int num = 0; while (k < 4) { array3[k] = HttpUtility.HtmlEncode(num.ToString(currentCulture)); num += 15; k++; } int num2 = 97; string[] array4 = new string[num2]; dateTime = new DateTime(2000, 1, 1, 0, 0, 0); for (int l = 0; l < num2; l++) { array4[l] = HttpUtility.HtmlEncode(dateTime.ToString("t", currentCulture)); dateTime = dateTime.AddMinutes(15.0); } DateTimeFormatInfo dateTimeFormat = currentCulture.DateTimeFormat; int[] array5 = new int[7]; for (int m = 0; m < 7; m++) { array5[m] = (int)((m + dateTimeFormat.FirstDayOfWeek) % (DayOfWeek)7); } descriptor.AddElementProperty("RootContainer", this.rootContainer.ClientID); descriptor.AddScriptProperty("LegendForTrueValueText", this.LegendForTrueValue.ToJsonString(null)); descriptor.AddScriptProperty("LegendForFalseValueText", this.LegendForFalseValue.ToJsonString(null)); descriptor.AddScriptProperty("IsReadOnly", this.IsReadonly.ToJsonString(null)); descriptor.AddScriptProperty("Is24HourUserLocale", flag.ToJsonString(null)); descriptor.AddScriptProperty("DayMapping", array5.ToJsonString(null)); descriptor.AddScriptProperty("HourStrings", array2.ToJsonString(null)); descriptor.AddScriptProperty("PartHourStrings", array3.ToJsonString(null)); descriptor.AddScriptProperty("TimeSlotStrings", array4.ToJsonString(null)); descriptor.AddScriptProperty("DayStrings", currentCulture.DateTimeFormat.DayNames.ToJsonString(null)); descriptor.AddScriptProperty("ShortestDayStrings", currentCulture.DateTimeFormat.ShortestDayNames.ToJsonString(null)); if (!string.IsNullOrEmpty(this.EditCommandUrl)) { descriptor.AddElementProperty("EditButton", this.btnEditSchedule.ClientID); descriptor.AddUrlProperty("EditCommandUrl", this.EditCommandUrl, this); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddComponentProperty("DataSource", this.DataSourceID, this); descriptor.AddEvent("itemActivated", this.OnClientItemActivated, true); descriptor.AddEvent("itemUpdated", this.OnClientItemUpdated, true); descriptor.AddEvent("selectionChanged", this.OnClientSelectionChanged, true); descriptor.AddProperty("EmptyDataText", this.EmptyDataText); descriptor.AddProperty("CaptionText", this.CaptionText, true); if (this.ProgressDelay != 0) { descriptor.AddProperty("ProgressDelay", this.ProgressDelay); } if (this.Features != 0) { descriptor.AddProperty("Features", this.Features); } if (this.SortDirection != SortDirection.Ascending) { descriptor.AddProperty("SortDirection", this.SortDirection); } descriptor.AddProperty("SortProperty", this.SortProperty, true); if (this.IdentityProperty != "Identity") { descriptor.AddProperty("IdentityProperty", this.IdentityProperty); } if (this.PreLoad) { descriptor.AddProperty("PreLoadResultsString", this.preLoadResults.ToJsonString(null)); } if (this.NameProperty != "Name") { descriptor.AddProperty("NameProperty", this.NameProperty); } if (this.InlineEditMaxLength != 128) { descriptor.AddProperty("InlineEditMaxLength", this.InlineEditMaxLength); } if (this.SupportAsyncGetList) { descriptor.AddProperty("PageSize", ListView.pageSize, 500); } else { descriptor.AddProperty("PageSize", ListView.pageSizeWithNoPaging, 3000); } descriptor.AddProperty("PageSizes", ListView.pageSizes, true); StringBuilder stringBuilder = new StringBuilder("["); stringBuilder.Append(string.Join(",", from o in this.Columns select o.ToJavaScript())); stringBuilder.Append("]"); descriptor.AddScriptProperty("Columns", stringBuilder.ToString()); if (this.toolbarPanel != null && this.ShowToolBar) { descriptor.AddComponentProperty("ToolBar", this.toolbar.ClientID); } if (this.viewFilterDropDown != null) { descriptor.AddComponentProperty("ViewFilterDropDown", this.viewFilterDropDown.ClientID); } if (this.searchTextBox != null && this.ShowSearchBar) { descriptor.AddComponentProperty("SearchTextBox", this.searchTextBox.ClientID); } if (this.listViewInputPanel != null && this.IsEditable) { descriptor.AddComponentProperty("InputTextBox", this.listViewInputPanel.ClientID); } }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddScriptProperty("ServerListResult", this.serverListResult.ToJsonString(null)); descriptor.AddComponentProperty("VDirTypeDropDown", this.vDirDropDown.ClientID); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddScriptProperty("AllConditions", this.SupportedConditions.ToJsonString(null)); descriptor.AddProperty("HasDefaultItem", this.HasDefaultItem); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); PerfRecord.Current.EndRequest(); descriptor.AddScriptProperty("PerfRecord", PerfRecord.Current.ToString()); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddScriptProperty("EditorParameter", this.Parameter.ToJsonString(null)); }
public void AddScriptProperty(string name, string script) { _descriptor.AddScriptProperty(name, script); }