コード例 #1
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     try
     {
         if (Request["m"] != null)
         {
             isMandatory = Convert.ToBoolean(Request["m"]);
         }
         containerId = Convert.ToInt32(Request["d"]);
         culture     = QDEUtils.UpdateCultureCodeFromRequest();
         item        = QDEUtils.GetItemIdFromRequest();
         itemId      = item.Id;
         chunk       = ChunkWindow.GetChunk(itemId, containerId, culture.Code);
         container   = SessionState.QDEContainer;
         if (!Page.IsPostBack)
         {
             lbResult.Text = HyperCatalog.Business.Chunk.LastError;
             UpdateDataView();
         }
     }
     catch (Exception ex)
     {
         Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "close", "<script>alert('" + UITools.CleanJSString(ex.ToString()) + "');top.window.close();</script>");
     }
 }
コード例 #2
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                containerId = Convert.ToInt32(Request["d"]);
                if (Request["m"] != null)
                {
                    isMandatory = Convert.ToBoolean(Request["m"]);
                }
                culture           = QDEUtils.UpdateCultureCodeFromRequest();
                item              = QDEUtils.GetItemIdFromRequest();
                itemId            = item.Id;
                chunk             = ChunkWindow.GetChunk(itemId, containerId, culture.Code);
                container         = SessionState.QDEContainer;
                uwToolbar.Enabled = Request["ui"] != null;

                /*#ACQ10.0 Starts
                 * Commented to bring out ILB for all catalogue irespective of mandatory status
                 * if (!isMandatory || culture.Type == CultureType.Regionale)
                 * {
                 * UITools.HideToolBarButton(uwToolbar, "ilb");
                 * }
                 * #ACQ10.0 Ends
                 */
            }
            catch
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "close", "<script>alert('Chunk not found!');window.close()</script>");
            }

            //Modified this line for QCs# 839 and 1028
            ChunkButtonBar.Chunk = chunk;
            //Modified this line for QCs# 839 and 1028



            ChunkButtonBar.User      = SessionState.User;
            ChunkButtonBar.Item      = item;
            ChunkButtonBar.Container = container;
            ChunkButtonBar.Culture   = culture;
            if (!Page.IsPostBack)
            {
                //Added these lines for QCs# 839 and 1028
                ChunkComment1.Chunk  = chunk;
                ChunkModifier1.Chunk = chunk;
                //Added these lines for QCs# 839 and 1028


                lbResult.Text = string.Empty;
                UpdateDataView();
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                containerId = Convert.ToInt32(Request["d"]);
                cultureCode = QDEUtils.UpdateCultureCodeFromRequest().Code;
                itemId      = QDEUtils.GetQueryItemIdFromRequest();
                chunk       = ChunkWindow.GetChunk(itemId, containerId, cultureCode);

                if (!Page.IsPostBack)
                {
                    ShowHistory();
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "close", "<script>alert('Error: " + UITools.CleanJSString(ex.ToString()) + "'");
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                if (Request["m"] != null)
                {
                    isMandatory = Convert.ToBoolean(Request["m"]);
                }
                containerId       = Convert.ToInt32(Request["d"]);
                culture           = QDEUtils.UpdateCultureCodeFromRequest();
                item              = QDEUtils.GetItemIdFromRequest();
                itemId            = item.Id;
                chunk             = ChunkWindow.GetChunk(itemId, containerId, culture.Code);
                container         = SessionState.QDEContainer;
                uwToolbar.Enabled = Request["ui"] != null;

                /*
                 * #ACQ10.0 Starts
                 * Commented to bring out ILB for all catalogue irespective of mandatory status
                 * if (!isMandatory || culture.Type == CultureType.Regionale)
                 * {
                 * UITools.HideToolBarButton(uwToolbar, "ilb");
                 * uwToolbar.Visible = false;
                 * }
                 #ACQ10.0 Ends
                 */
                rdNo.Attributes.Add("onClick", "dc()");
                rdYes.Attributes.Add("onClick", "dc()");
            }
            catch
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "close", "<script>window.close()</script>");
            }
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "blanktext", "<script>ILBText = '" + HyperCatalog.Business.Chunk.BlankText + "';</script>");
            if (!Page.IsPostBack)
            {
                lbResult.Text = string.Empty;
                UpdateDataView();
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                containerId = Convert.ToInt32(Request["d"]);
                if (Request["m"] != null)
                {
                    isMandatory = Convert.ToBoolean(Request["m"]);
                }
                culture           = QDEUtils.UpdateCultureCodeFromRequest();
                item              = QDEUtils.GetItemIdFromRequest();
                itemId            = item.Id;
                chunk             = ChunkWindow.GetChunk(itemId, containerId, culture.Code);
                uwToolbar.Enabled = Request["ui"] != null;

                if (Request["ifid"] != null)
                {
                    ifContainer = InputFormContainer.GetByKey(Convert.ToInt32(Request["ifid"]));
                }

                /*#ACQ10.0 Starts --Commented
                 * Commented to bring out ILB for all catalogue irespective of mandatory status
                 * if (!isMandatory || culture.Type == CultureType.Regionale)
                 * {
                 * UITools.HideToolBarButton(uwToolbar, "ilb");
                 * }
                 */
                UITools.HideToolBarButton(uwToolbar, "ilb");
                //#ACQ10.0 Ends

                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "blanktext", "<script>ILBText = '" + HyperCatalog.Business.Chunk.BlankText + "';</script>");

                //Modified this line for QCs# 839 and 1028
                ChunkButtonBar.Chunk = chunk;
                //Modified this line for QCs# 839 and 1028

                ChunkButtonBar.Container = SessionState.QDEContainer;
                ChunkButtonBar.User      = SessionState.User;
                ChunkButtonBar.Culture   = culture;
                ChunkButtonBar.Item      = item;
                if (!Page.IsPostBack)
                {
                    //Added these lines for QCs# 839 and 1028
                    ChunkComment1.Chunk  = chunk;
                    ChunkModifier1.Chunk = chunk;
                    //Added these lines for QCs# 839 and 1028

                    lbResult.Text = string.Empty;
                    UpdateDataView();
                }
                else
                {
                    if (Request["__EVENTTARGET"] != null) // Check if user is trying to sort a group
                    {
                        if (Request["__EVENTTARGET"].ToString() == "rowup" || Request["__EVENTTARGET"].ToString() == "rowdown")
                        {
                            SortRow(Request["__EVENTTARGET"].ToString() == "rowup", Convert.ToInt32(Request["__EVENTARGUMENT"]));
                        }
                    }
                }
            }

            catch (Exception ex)
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "close", "<script>alert('" + UITools.CleanJSString(ex.ToString()) + "');top.window.close();</script>");
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                containerId = Convert.ToInt32(Request["d"]);
                if (Request["m"] != null)
                {
                    isMandatory = Convert.ToBoolean(Request["m"]);
                }
                culture           = QDEUtils.UpdateCultureCodeFromRequest();
                item              = QDEUtils.GetItemIdFromRequest();
                itemId            = item.Id;
                chunk             = ChunkWindow.GetChunk(itemId, containerId, culture.Code);
                container         = SessionState.QDEContainer;
                uwToolbar.Enabled = Request["ui"] != null;

                //code added on 17th November 2011 for Chunk Edit Validation for XSS Vulnerability Fix - start
                if (SessionState.CacheParams.Exists("XSS_RestrictedHTMLTags"))
                {
                    keyword = SessionState.CacheParams["XSS_RestrictedHTMLTags"].Value.ToString();
                }
                //code added on 17th November 2011 for Chunk Edit Validation for XSS Vulnerability Fix - end

                #region Spell Checker
                string masterLanguage = string.Empty;
                masterLanguage = HyperCatalog.Shared.SessionState.MasterCulture.LanguageCode;
                if (culture.LanguageCode != masterLanguage)
                {
                    UITools.HideToolBarSeparator(uwToolbar, "spellsep");
                    UITools.HideToolBarButton(uwToolbar, "spell");
                }
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "VarsForSpellChecker", "<script>var itemId=" + itemId.ToString() + ";var containerId=" + containerId + ";</script>");
                #endregion

                /*#ACQ10.0 Starts
                 * // Commented to bring out ILB for all catalogue irespective of mandatory status
                 * // Only allow ILB for mandatory chunks and only at sku level for push down
                 * if (!isMandatory  || culture.Type == CultureType.Regionale)
                 * {
                 *  UITools.HideToolBarSeparator(uwToolbar, "ilbSep");
                 *  UITools.HideToolBarButton(uwToolbar, "ilb");
                 * }
                 * #ACQ10.0 Ends
                 */
            }
            catch
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "close", "<script>alert('Chunk not found!');window.close()</script>");
            }

            ChunkComment1.Chunk      = ChunkModifier1.Chunk = ChunkButtonBar.Chunk = chunk;
            ChunkButtonBar.Container = container;
            ChunkButtonBar.User      = SessionState.User;
            ChunkButtonBar.Culture   = culture;
            ChunkButtonBar.Item      = item;
            if (!Page.IsPostBack)
            {
                lbResult.Text = string.Empty;
                WebSpellChecker1.WebSpellCheckerDialogPage += "?i=" + itemId.ToString() + "&c=" + containerId.ToString();
                UpdateDataView();
            }
            #region Spell Checker
            WebSpellChecker1.SpellOptions.AllowCaseInsensitiveSuggestions = true;
            WebSpellChecker1.SpellOptions.AllowMixedCase       = false;
            WebSpellChecker1.SpellOptions.AllowWordsWithDigits = true;
            WebSpellChecker1.SpellOptions.AllowXML             = true;
            WebSpellChecker1.SpellOptions.CheckHyphenatedText  = true;
            WebSpellChecker1.SpellOptions.IncludeUserDictionaryInSuggestions       = true;
            WebSpellChecker1.SpellOptions.PerformanceOptions.AllowCapitalizedWords = true;
            WebSpellChecker1.SpellOptions.PerformanceOptions.CheckCompoundWords    = false;
            WebSpellChecker1.SpellOptions.PerformanceOptions.ConsiderationRange    = -1;
            WebSpellChecker1.SpellOptions.PerformanceOptions.SplitWordThreshold    = 3;
            WebSpellChecker1.SpellOptions.PerformanceOptions.SuggestSplitWords     = true;
            WebSpellChecker1.SpellOptions.SeparateHyphenWords = false;
            #endregion
        }
コード例 #7
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                containerId = Convert.ToInt32(Request["d"]);
                if (Request["m"] != null)
                {
                    isMandatory = Convert.ToBoolean(Request["m"]);
                }
                culture = QDEUtils.UpdateCultureCodeFromRequest();
                item    = QDEUtils.GetItemIdFromRequest();
                // Fix for QC#7852 - Assigned the correct item Id to the itemID variable before retrieving the Chunk..
                itemId            = item.Id;
                chunk             = ChunkWindow.GetChunk(itemId, containerId, culture.Code);
                container         = SessionState.QDEContainer;
                uwToolbar.Enabled = Request["ui"] != null;
                System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("en-US");
                ci.DateTimeFormat.ShortDatePattern = SessionState.User.FormatDate;
                ci.DateTimeFormat.LongDatePattern  = SessionState.User.FormatDate;
                dateValue.CalendarLayout.Culture   = ci;
                System.Threading.Thread.CurrentThread.CurrentCulture = ci;
                //ACQ10.0 Starts
                //if (!isMandatory || culture.Type == CultureType.Regionale)
                //{
                //  UITools.HideToolBarButton(uwToolbar, "ilb");
                //}
                //ACQ10.0 Ends
            }
            catch
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "close", "<script>window.close()</script>");
            }
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "blanktext", "<script>ILBText = '" + HyperCatalog.Business.Chunk.BlankText + "';</script>");


            //Modified this line for QCs# 839 and 1028
            ChunkButtonBar.Chunk = chunk;
            //Modified this line for QCs# 839 and 1028


            ChunkButtonBar.Container = container;
            ChunkButtonBar.Item      = item;
            ChunkButtonBar.User      = SessionState.User;
            ChunkButtonBar.Culture   = culture;

            //#ACQ10.0 Starts
            if (chunk != null)
            {
                if (chunk.Text == HyperCatalog.Business.Chunk.BlankValue)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "VarBlankChunk", "<script>var isBlankChunk = true;</script>");
                    //dateValue.Enabled = false;
                    dateValue.Value = HyperCatalog.Business.Chunk.BlankText;
                }
            }
            //#ACQ10.0 Ends
            if (!Page.IsPostBack)
            {
                //Added these line for QCs# 839 and 1028
                ChunkComment1.Chunk  = chunk;
                ChunkModifier1.Chunk = chunk;
                //Added this line for QCs# 839 and 1028

                lbResult.Text = string.Empty;
                UpdateDataView();
            }
        }