Exemplo n.º 1
0
        /// <summary>
        /// Peforms common script registraction
        /// </summary>
        private void RegisterCommonScripts()
        {
            if (Page.ClientScript.IsClientScriptBlockRegistered(_scriptIncludeBlock))
            {
                return;
            }

            Page.ClientScript.RegisterClientScriptResource(
                typeof(AbstractJsGrid), "Savchin.Web.UI.Resources.dhtmlXCommon.js");
            Page.ClientScript.RegisterClientScriptResource(
                typeof(AbstractJsGrid), "Savchin.Web.UI.Resources.dhtmlXGrid.js");
            Page.ClientScript.RegisterClientScriptResource(
                typeof(AbstractJsGrid), "Savchin.Web.UI.Resources.dhtmlXGrid_srnd.js");
            Page.ClientScript.RegisterClientScriptResource(
                typeof(AbstractJsGrid), "Savchin.Web.UI.Resources.dhtmlXGridCell.js");
            Page.ClientScript.RegisterClientScriptResource(
                typeof(AbstractJsGrid), "Savchin.Web.UI.Resources.dhtmlXGrid_drag.js");
            Page.ClientScript.RegisterClientScriptResource(
                typeof(AbstractJsGrid), "Savchin.Web.UI.Resources.dhtmlXGrid_start.js");

            Page.ClientScript.RegisterClientScriptBlock(typeof(AbstractJsGrid), _scriptIncludeBlock,
                                                        string.Empty);

            ControlHelper.AddCssInclude(Page, typeof(AbstractJsGrid), "Savchin.Web.UI.Resources.dhtmlXGrid.css");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Registers the J scripts.
        /// </summary>
        private void RegisterIncludes()
        {
            var page = ((PageEx)Page);

            ControlHelper.AddCssInclude(Page, GetType(), EmbeddedResources.CssWindow);

            //Note: Test include
            // page.PageIncludes.AddJavaScript(typeof(Window), "Window.js", AppSettings.JavaScriptsUrl + "Window.js");

            page.PageIncludes.AddJavaScript(typeof(Window), EmbeddedResources.JsWindow);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Registers the includes.
        /// </summary>
        private void RegisterIncludes()
        {
            //TEst
            //Page.ClientScript.RegisterClientScriptInclude(typeof(DashboardManager), "dashboardEngine.js", AppSettings.ApplicationJsPath + "dashboardEngine.js");
            //Page.ClientScript.RegisterClientScriptInclude(typeof(DashboardManager), "DashboardManagerWindow.js", AppSettings.ApplicationJsPath + "DashboardManagerWindow.js");


            Page.ClientScript.RegisterClientScriptResource(typeof(DashboardManager), EmbeddedResources.JsDashboardEngine);
            Page.ClientScript.RegisterClientScriptResource(typeof(DashboardManager), EmbeddedResources.JsDashboardManagerWindow);

            EmbeddedResources.RegisterAjax(Page);
            EmbeddedResources.RegisterJson(Page);

            ControlHelper.AddCssInclude(Page, typeof(DashboardManager), EmbeddedResources.CssDashboard);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.PreRender"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnPreRender(EventArgs e)
        {
            //TODO: clear when all layouts
            if (activeLayout != null)
            {
                activeLayout.Visible    = true;
                activeLayout.DateFormat = DateFormat;
            }

            base.OnPreRender(e);

            Page.ClientScript.RegisterStartupScript(typeof(CalendarControl), "Init", "var calendarPathToImages = '" + ImageUrl + "';", true);
            Page.ClientScript.RegisterClientScriptResource(typeof(CalendarControl), EmbeddedResources.JsCalendar);
            ControlHelper.AddCssInclude(Page, typeof(CalendarControl), EmbeddedResources.CssCalendar);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.PreRender"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (Skinny.Manager.IsCallBack || Visible == false || DesignMode)
            {
                return;
            }


            ControlHelper.AddCssInclude(Page, typeof(PropertyGridControl), EmbeddedResources.CssPropertyGrid);
            Page.ClientScript.RegisterClientScriptResource(GetType(), EmbeddedResources.JsPropertyGrid);



            if (!Page.ClientScript.IsClientScriptBlockRegistered(typeof(PropertyGridControl), "PropertyGrid_style" + ClientID))
            {
                Page.ClientScript.RegisterClientScriptBlock(typeof(PropertyGridControl), "PropertyGrid_style" + ClientID, GetCSS());
            }


            Page.ClientScript.RegisterStartupScript(typeof(PropertyGridControl), ClientID + "_init", GenereatInitScript(), true);
        }