Example #1
0
        protected override IEnumerable <ScriptDescriptor> GetScriptDescriptors(Control targetControl)
        {
            ScriptControlDescriptor descriptor = new ScriptControlDescriptor("PainControls.TimePicker", targetControl.ClientID);

            if (ErrorPresentControlID != string.Empty)
            {
                descriptor.AddElementProperty("errorSpan", this.NamingContainer.FindControl(ErrorPresentControlID).ClientID);
            }


            descriptor.AddProperty("cssClass", CssClass);
            descriptor.AddProperty("timeType", TimeType);

            if (OnClientShowing != string.Empty)
            {
                descriptor.AddEvent("showing", OnClientShowing);
            }
            if (OnClientShown != string.Empty)
            {
                descriptor.AddEvent("shown", OnClientShown);
            }
            if (OnClientHiding != string.Empty)
            {
                descriptor.AddEvent("hiding", OnClientHiding);
            }
            if (OnClientHidden != string.Empty)
            {
                descriptor.AddEvent("hidden", OnClientHidden);
            }
            if (OnClientHourSelectionChanged != string.Empty)
            {
                descriptor.AddEvent("hourSelectionChanged", OnClientHourSelectionChanged);
            }
            if (OnClientMinuteSelectionChanged != string.Empty)
            {
                descriptor.AddEvent("minuteSelectionChanged", OnClientMinuteSelectionChanged);
            }

            yield return(descriptor);
        }
Example #2
0
        protected override IEnumerable <ScriptDescriptor> GetScriptDescriptors(Control targetControl)
        {
            ScriptControlDescriptor descriptor = new ScriptControlDescriptor("Ibn.DDLayoutExtender", targetControl.ClientID);

            descriptor.AddProperty("jsonItems", ((IbnControlPlaceManager)targetControl).JsonItems.Replace(" ", string.Empty));
            //descriptor.AddProperty("popupElementId", this.UpdateId);
            if (!String.IsNullOrEmpty(this.ContainerId))
            {
                descriptor.AddElementProperty("popupElement", this.ContainerId);
            }

            //descriptor.AddProperty("cancelId", this.CancelElementId);
            //descriptor.AddProperty("saveId", this.SaveElementId);
            //descriptor.AddProperty("saveCommand", this.SaveCommand);
            descriptor.AddProperty("deleteMsg", this.DeleteMessage);
            descriptor.AddProperty("propertyCommand", this.PropertyPageCommand);

            descriptor.AddProperty("addElementContainer", this.AddTemplateClientId);
            descriptor.AddProperty("wsPageUid", this.PageUid);
            descriptor.AddProperty("contextKey", UtilHelper.JsonSerialize(new LayoutContextKey(this.PageUid, this.IsAdmin)));

            return(new ScriptDescriptor[] { descriptor });
        }