Ejemplo n.º 1
0
 // Events /////////////////////////////////////////////////////////////////
 protected override void OnInit(EventArgs e)
 {
     UITools.AddPickerCss();
     UITools.AddScript(UITools.ClientScriptConfigurations.SNPickerPath);
     UITools.AddScript(UITools.ClientScriptConfigurations.TinyMCEPath);
     base.OnInit(e);
     this.CssClass = "snpeRTE";
 }
Ejemplo n.º 2
0
        protected override void OnInit(EventArgs e)
        {
            UITools.AddPickerCss();
            UITools.AddScript(UITools.ClientScriptConfigurations.SNPickerPath);

            OpenPickerButton.ID       = String.Concat(ID, "ReferenceEditorButton");
            OpenPickerButton.Text     = "...";
            OpenPickerButton.CssClass = "pickerButton";
            base.OnInit(e);
        }
Ejemplo n.º 3
0
        // Events //////////////////////////////////////////////////////

        protected override void OnInit(EventArgs e)
        {
            UITools.AddPickerCss();

            UITools.AddScript(UITools.ClientScriptConfigurations.MSAjaxPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.jQueryPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.SNWebdavPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.SNPickerPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.SNWallPath);

            base.OnInit(e);
        }
Ejemplo n.º 4
0
        // Events //////////////////////////////////////////////////////

        protected override void OnInit(EventArgs e)
        {
            UITools.AddPickerCss();

            UITools.AddScript(UITools.ClientScriptConfigurations.MSAjaxPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.jQueryPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.SNWebdavPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.SNPickerPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.SNWallPath);
            UITools.AddScript(UITools.ClientScriptConfigurations.SNUploadPath);

            UITools.AddScript(ResourceScripter.GetResourceUrl("ActionMenu"));

            base.OnInit(e);
        }
Ejemplo n.º 5
0
        // ================================================================================================ Methods

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (this.ContextNode == null)
            {
                return;
            }

            if (ShowExecutionTime)
            {
                Timer.Start();
            }

            UITools.AddScript(UITools.ClientScriptConfigurations.SNWallPath);

            UITools.AddPickerCss();
            UITools.AddScript(UITools.ClientScriptConfigurations.SNPickerPath);

            // get items for content types drowpdown in dropbox
            var gc       = new GenericContent(this.ContextNode, "Folder");
            var newItems = GenericScenario.GetNewItemNodes(gc, ContentType.GetContentTypes());

            string jsonData;

            using (var s = new MemoryStream())
            {
                var workData = newItems.Select(n => new ContentTypeItem {
                    value = n.Name, label = n.DisplayName
                }).OrderBy(n => n.label);
                var serializer = new DataContractJsonSerializer(typeof(ContentTypeItem[]));
                serializer.WriteObject(s, workData.ToArray());
                s.Flush();
                s.Position = 0;
                using (var sr = new StreamReader(s))
                {
                    jsonData = sr.ReadToEnd();
                }
            }

            UITools.RegisterStartupScript("initdropboxautocomplete", string.Format("SN.Wall.initDropBox({0})", jsonData), this.Page);

            if (ShowExecutionTime)
            {
                Timer.Stop();
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Load"/> event.
        /// </summary>
        /// <param name="e">The <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnLoad(EventArgs e)
        {
            if (!IsVisible)
            {
                base.OnLoad(e);
                return;
            }

            UITools.AddStyleSheetToHeader(Page.Header, UITools.ClientScriptConfigurations.IconsCssPath);
            UITools.AddStyleSheetToHeader(Page.Header, UITools.ClientScriptConfigurations.jQueryCustomUICssPath);
            UITools.AddStyleSheetToHeader(Page.Header, UITools.ClientScriptConfigurations.SNWidgetsCss, 100);
            UITools.AddPickerCss();

            UITools.AddScript(UITools.ClientScriptConfigurations.SNPortalRemoteControlPath);

            base.OnLoad(e);

            InitializeControl();
        }
Ejemplo n.º 7
0
        protected override void OnInit(EventArgs e)
        {
            // add jquery as a dependency (culture-dependent files need this)
            UITools.AddScript(UITools.ClientScriptConfigurations.jQueryPath);

            // add culture-dependent language file
            UITools.AddScript("$skin/scripts/jquery/plugins/grid/i18n/grid.locale-" + System.Globalization.CultureInfo.CurrentUICulture.Parent.Name + ".js");

            // loading css
            UITools.AddPickerCss();

            // loading scripts
            UITools.AddScript(UITools.ClientScriptConfigurations.SNReferenceGridPath);

            base.OnInit(e);

            if (!IsTemplated)
            {
                // original flow
                Controls.Add(_inputTextBox);
                Controls.Add(_table);
                Controls.Add(_addButton);
                Controls.Add(_changeButton);
                Controls.Add(_clearButton);
            }

            if (string.IsNullOrEmpty(this.ActualAddButton.OnClientClick))
            {
                this.ActualAddButton.OnClientClick = GetAddButtonHandler();
            }

            // change button has the same handler as add button !
            if (string.IsNullOrEmpty(this.ActualChangeButton.OnClientClick))
            {
                this.ActualChangeButton.OnClientClick = GetAddButtonHandler();
            }

            if (string.IsNullOrEmpty(ActualClearButton.OnClientClick))
            {
                this.ActualClearButton.OnClientClick = GetClearButtonHandler();
            }
        }
Ejemplo n.º 8
0
        //====================================================================== Helper methods

        protected void BindEvents()
        {
            if (CopyToButton != null)
            {
                CopyToButton.Click  += CopyToButton_Click;
                CopyToButton.Visible = RequestIdList.Count > 0;
            }

            if (CopyCurrentButton != null)
            {
                CopyCurrentButton.Click  += CopyCurrentButton_Click;
                CopyCurrentButton.Visible = RequestIdList.Count == 0;
            }

            if (OpenPickerButton != null)
            {
                UITools.AddPickerCss();
                UITools.AddScript(UITools.ClientScriptConfigurations.SNPickerPath);
                OpenPickerButton.OnClientClick = GetOpenContentPicklerScript();
            }
        }
Ejemplo n.º 9
0
        protected override void OnInit(EventArgs e)
        {
            // loading css
            UITools.AddPickerCss();

            // loading scripts
            UITools.AddScript(UITools.ClientScriptConfigurations.SNReferenceGridPath);

            base.OnInit(e);

            if (!IsTemplated)
            {
                // original flow
                Controls.Add(_inputTextBox);
                Controls.Add(_table);
                Controls.Add(_addButton);
                Controls.Add(_changeButton);
                Controls.Add(_clearButton);
            }

            if (string.IsNullOrEmpty(this.ActualAddButton.OnClientClick))
            {
                this.ActualAddButton.OnClientClick = GetAddButtonHandler();
            }

            // change button has the same handler as add button !
            if (string.IsNullOrEmpty(this.ActualChangeButton.OnClientClick))
            {
                this.ActualChangeButton.OnClientClick = GetAddButtonHandler();
            }

            if (string.IsNullOrEmpty(ActualClearButton.OnClientClick))
            {
                this.ActualClearButton.OnClientClick = GetClearButtonHandler();
            }
        }