Ejemplo n.º 1
0
    protected void Util_SetLabels()
    {
        if (!Page.IsPostBack)
        {
            ltr_workflow.Text = GetMessage("lbl avail workflows");
        }

        SetTitleBarToMessage("lbl order workflow");

        workareamenu actionMenu = new workareamenu("action", this.GetMessage("lbl action"), AppPath + "images/UI/Icons/check.png");
        actionMenu.AddItem(AppPath + "images/ui/icons/save.png", this.GetMessage("btn save"), " document.forms[0].submit(); ");
        AddMenu(actionMenu);

        AddHelpButton("orderworkflow");
    }
Ejemplo n.º 2
0
 protected void Util_SetLabels()
 {
     this.ltr_id_lbl.Text = this.GetMessage("lbl order id");
     this.ltr_customer_lbl.Text = this.GetMessage("lbl customer");
     this.ltr_created_lbl.Text = this.GetMessage("generic datecreated");
     this.ltr_required_lbl.Text = this.GetMessage("lbl date required");
     this.ltr_completed_lbl.Text = this.GetMessage("lbl date completed");
     this.ltr_orderstatus_lbl.Text = this.GetMessage("lbl order status");
     this.ltr_ordertotal_lbl.Text = this.GetMessage("lbl order total");
     this.ltr_pipelinestage_lbl.Text = this.GetMessage("lbl order pipeline stage");
     switch (this.m_sPageAction)
     {
         case "vieworder":
             this.pnl_view.Visible = true;
             this.SetTitleBarToMessage("lbl view order");
             break;
         default: // "viewall"
             workareamenu newMenu = new workareamenu("file", this.GetMessage("lbl order reporting"), this.AppImgPath + "commerce/catalog_view.gif");
             newMenu.AddItem(this.AppImgPath + "/commerce/calendar_down.gif", this.GetMessage("lbl report most recent orders"), "window.location.href=\'reporting.aspx?action=mostrecent\';");
             newMenu.AddItem(this.AppImgPath + "/commerce/calendar.gif", this.GetMessage("lbl report date orders"), "window.location.href=\'reporting.aspx?action=bydates\';");
             newMenu.AddItem(this.AppImgPath + "/menu/users2.gif", this.GetMessage("lbl report customer orders"), "window.location.href=\'reporting.aspx?action=bycustomer\';");
             newMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/brick.png", this.GetMessage("lbl report product orders"), "window.location.href=\'reporting.aspx?action=byproduct\';");
             newMenu.AddItem(this.AppImgPath + "/menu/form_blue.gif", this.GetMessage("lbl report custom orders"), "window.location.href=\'reporting.aspx?action=custom\';");
             this.AddMenu(newMenu);
             this.SetTitleBarToMessage("lbl orders");
             break;
     }
     this.AddHelpButton("orders");
 }
Ejemplo n.º 3
0
        private void Util_SetLabels()
        {
            base.Version8TabsImplemented = true;
            //session expiration
            lbl_SessionExpiringLabel.Text = GetMessage("editor session expiring 10");
            lbl_ContinueEditingLabel.Text = GetMessage("continue editing");

            //set title
            lbl_GenericTitleLabel.Text = m_refMsg.GetMessage("generic title label");
            //set searchable
            chk_searchable.Text = m_refMsg.GetMessage("lbl searchable");

            //content tab
            liContent.Visible = true;
            divContent.Visible = true;
            litTabContentLabel.Text = base.m_refMsg.GetMessage("content text");

            //summary tab
            liSummary.Visible = true;
            divSummary.Visible = true;
            litTabSummaryLabel.Text = base.m_refMsg.GetMessage("summary text");

            //properties tab
            liProperties.Visible = true;
            divProperties.Visible = true;
            litTabPropertiesLabel.Text = base.m_refMsg.GetMessage("properties text");

            //comment tab - not implemented
            //liComment.Visible = True
            //divComment.Visible = True
            //litTabCommentLabel.Text = MyBase.m_refMsg.GetMessage("comment text")

            //pricing tab
            liPricing.Visible = true;
            divPricing.Visible = true;
            litTabPricingLabel.Text = base.m_refMsg.GetMessage("lbl pricing");

            //attributes tab
            if (prod_type_data.Attributes.Count > 0)
            {
                liAttributes.Visible = true;
                divAttributes.Visible = true;
                litTabAttributesLabel.Text = base.m_refMsg.GetMessage("lbl entry attrib tab");
            }

            //items tab
            liItems.Visible = true;
            divItems.Visible = true;
            litTabItemsLabel.Text = base.m_refMsg.GetMessage("lbl variants");

            //media tab
            liMedia.Visible = true;
            divMedia.Visible = true;
            litTabMediaLabel.Text = base.m_refMsg.GetMessage("lbl media");

            //metadata tab
            liMetadata.Visible = true;
            divMetadata.Visible = true;
            litTabMetadataLabel.Text = base.m_refMsg.GetMessage("metadata text");

            //schedule tab
            liSchedule.Visible = true;
            divSchedule.Visible = true;
            litTabScheduleLabel.Text = base.m_refMsg.GetMessage("schedule text");

            //category tab
            if (ShowTaxonomyTab)
            {
                liCategory.Visible = true;
                divCategories.Visible = true;
                litTabCateogoryLabel.Text = base.m_refMsg.GetMessage("lbl category");
            }

            //alias tab
            if ((_urlAliasSettingApi.IsManualAliasEnabled || _urlAliasSettingApi.IsAutoAliasEnabled) && m_refContentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.EditAlias))
            {
                liAlias.Visible = true;
                divAlias.Visible = true;
                litTabAliasLabel.Text = base.m_refMsg.GetMessage("lbl alias");
            }

            //templates tab - not implemented
            //If Not bSuppressTemplate Then
            //liTemplates.Visible = True
            //divTemplates.Visible = True
            //litTabTemplatesLabel.Text = MyBase.m_refMsg.GetMessage("template label")
            //End If

            this.MenuCheckVariable = "checkVariable";

            this.AddButton(m_refContentApi.AppPath + "images/UI/Icons/cancel.png", "#", this.GetMessage("generic undocheckout"), this.GetMessage("generic cancel"), "onclick=\"SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Cancel) + ");\"", StyleHelper.CancelButtonCssClass, true);

            switch (this.m_sEditAction)
            {
                case "update":
                    workareamenu actionMenu_1 = new workareamenu("action", this.GetMessage("lbl action"), m_refContentApi.AppPath + "images/UI/Icons/check.png"); // check2.gif
                    actionMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/save.png", this.GetMessage("btn save"), " SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Save) + "); ");
                    string aURL = entry_edit_data.Quicklink;
                    // determine if there is a querystring or not
                    if (aURL.IndexOf("?") > -1)
                    {
                        aURL += "&cmsMode=Preview";
                    }
                    else
                    {
                        aURL += "?cmsMode=Preview";
                    }
                    actionMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/preview.png", this.GetMessage("btn preview"), " PreviewContent(\'" + aURL + "\', " + Convert.ToInt32(EkEnumeration.AssetActionType.Save) + ", \'" + entry_edit_data.Title + "\'); return false; ");

                    actionMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/checkIn.png", this.GetMessage("dmsmenucheckin"), " SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Checkin) + "); ");
                    if (UserRights.CanPublish)
                    {
                        actionMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/contentPublish.png", this.GetMessage("generic publish"), " SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Submit) + "); ");
                    }
                    else
                    {
                        actionMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/contentPublish.png", this.GetMessage("btn submit"), " SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Submit) + "); ");
                    }
                    actionMenu_1.AddBreak();
                    actionMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/cancel.png", this.GetMessage("generic undocheckout"), "SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.UndoCheckout) + "); ");
                    this.AddMenu(actionMenu_1);

                    workareamenu miscMenu_1 = new workareamenu("misc", this.GetMessage("btn change"), this.AppImgPath + "menu/product.gif"); // check2.gif $ektron('" + uxDialog.Selector + "').dialog('open');
                    miscMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/comment.png", this.GetMessage("comment text"), (string)("$ektron(\'" + divComment.Selector + "\').dialog('open');"));
                    if (!bSuppressTemplate)
                    {
                        miscMenu_1.AddItem(m_refContentApi.AppPath + "Images/ui/icons/contentTemplate.png", this.GetMessage("template label"), (string)("$ektron(\'" + divTemplates.Selector + "\').dialog('open');"));
                    }
                    this.AddMenu(miscMenu_1);

                    this.SetTitleBarToMessage("lbl edit catalog entry");
                    this.AddHelpButton("editcatentry");
                    break;
                case "add":
                case "addlang":
                    workareamenu actionMenu = new workareamenu("action", this.GetMessage("lbl action"), m_refContentApi.AppPath + "images/UI/Icons/check.png"); // check2.gif
                    actionMenu.AddItem(m_refContentApi.AppPath + "Images/ui/icons/checkIn.png", this.GetMessage("dmsmenucheckin"), " SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Checkin) + "); ");
                    if (UserRights.CanPublish)
                    {
                        actionMenu.AddItem(m_refContentApi.AppPath + "Images/ui/icons/contentPublish.png", this.GetMessage("generic publish"), " SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Submit) + "); ");
                    }
                    else
                    {
                        actionMenu.AddItem(m_refContentApi.AppPath + "Images/ui/icons/contentPublish.png", this.GetMessage("btn submit"), " SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Submit) + "); ");
                    }
                    actionMenu.AddBreak();
                    actionMenu.AddItem(m_refContentApi.AppPath + "Images/ui/icons/cancel.png", this.GetMessage("generic undocheckout"), "SubmitForm(" + Convert.ToInt32(EkEnumeration.AssetActionType.Cancel) + "); ");
                    this.AddMenu(actionMenu);

                    workareamenu miscMenu = new workareamenu("misc", this.GetMessage("btn change"), m_refContentApi.AppImgPath + "menu/product.gif"); // check2.gif
                    miscMenu.AddItem(m_refContentApi.AppPath + "Images/ui/icons/comment.png", this.GetMessage("comment text"), (string)("$ektron(\'" + divComment.Selector + "\').dialog('open');"));
                    if (!bSuppressTemplate)
                    {
                        miscMenu.AddItem(m_refContentApi.AppPath + "Images/ui/icons/contentTemplate.png", this.GetMessage("template label"), (string)("$ektron(\'" + divTemplates.Selector + "\').dialog('open');"));
                    }
                    this.AddMenu(miscMenu);

                    this.SetTitleBarToMessage("lbl add catalog entry");
                    this.AddHelpButton("addcatentry");
                    break;
            }

            //Dim tc As New TableCell()
            //Dim tr As New TableRow()
            //tc.Controls.Add(New LiteralControl(Util_GetTitleField()))
            //tr.Controls.Add(tc)
            //Me.AddTableRow(tr)

            // labels
            ltr_sku.Text = GetMessage("lbl calatog entry sku");
            ltr_quantity.Text = GetMessage("lbl number of units");
            ltr_avail.Text = GetMessage("lbl archived");
            chk_avail.Attributes.Add("onclick", "ToggleAvail(this);");
            // ltr_markdel.Text = GetMessage("lbl deleted")
            ltr_buyable.Text = GetMessage("lbl buyable");
            ltr_taxclass.Text = GetMessage("lbl tax class");
            ltr_tangible.Text = GetMessage("lbl tangible");
            chk_tangible.Attributes.Add("onclick", "ToggleTangible(this);");
            ltr_height.Text = GetMessage("lbl height");
            ltr_width.Text = GetMessage("lbl width");
            ltr_length.Text = GetMessage("lbl length");
            // ltr_weightmeasure.Text = GetMessage("lbl weight measure")
            ltr_weight.Text = GetMessage("lbl weight");
            ltr_disableInv.Text = GetMessage("lbl disable inventory");
            ltr_instock.Text = GetMessage("lbl in stock");
            ltr_onorder.Text = GetMessage("lbl on order");
            ltr_reorder.Text = GetMessage("lbl reorder");
            // ltr_currency.Text = GetMessage("lbl currency")
            ltr_comment.Text = GetMessage("comment text");
            //ltr_tempsel.Text = GetMessage("lbl template selection")
            ltr_actionend.Text = GetMessage("end date action title");
            ltr_startdate.Text = GetMessage("generic go live");
            ltr_enddate.Text = GetMessage("generic end date");
            ltr_ship.Text = GetMessage("lbl dimensions");
            ltr_inv.Text = GetMessage("lbl inventory");
            chk_disableInv.Attributes.Add("onclick", "ToggleInventory(this);");

            string lblOk = GetMessage("lbl ok");
            cmdCommentOk.Text = " " + lblOk + " ";
            cmdCommentOk.ToolTip = lblOk;
            cmdCommentOk.Attributes.Add("onclick", "$ektron('#" + hdnComment.ClientID + "').val($ektron('#" + txt_comment.ClientID + "').val());$ektron('" + divComment.Selector + "').dialog('close'); ; return false;");
            cmdTemplateOk.Text = " " + lblOk + " ";
            cmdTemplateOk.ToolTip = lblOk;
            cmdTemplateOk.Attributes.Add("onclick", "$ektron('" + divTemplates.Selector + "').dialog('close'); ; return false;");

            ltr_holdmsg.Text = m_refMsg.GetMessage("one moment msg");
        }
Ejemplo n.º 4
0
 public void AddMenu(workareamenu waMenu)
 {
     aButtons.Add(waMenu.Render(this.m_checkVariable));
 }
Ejemplo n.º 5
0
    protected void Util_SetLabels()
    {
        switch (this.m_sPageAction)
        {
            case "displayhandoff":
                if (!(pseudoLocJob || transMemJob))
                {
                    workareamenu displayActionMenu = new workareamenu("action", this.GetMessage("lbl action"), this.AppImgPath + "../UI/Icons/check.png");
                    displayActionMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/cancel.png", "Close", "parent.CloseJobsModal();");
                    this.AddMenu(displayActionMenu);
                    SetTitleBarToString("Export status");
                }
                break;
            case "createhandoff":
                workareamenu createActionMenu = new workareamenu("action", this.GetMessage("lbl action"), this.AppImgPath + "../UI/Icons/check.png");
                if (invalidDependency)
                {
                    string overrideLink = string.Format("{0}?action=createhandoff&id={1}&test={2}&override=true"
                        , m_sPageName
                        , m_iID
                        , isTest);
                    createActionMenu.AddLinkItem(m_refContentApi.AppPath + "images/UI/Icons/translationExport.png", "Export", overrideLink);
                    createActionMenu.AddBreak();
                }
                createActionMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/cancel.png", "Close", "parent.CloseJobsModal();");
                this.AddMenu(createActionMenu);
                if (isTest)
                    SetTitleBarToString("Create test handoff");
                else
                    SetTitleBarToString("Create handoff");
                break;
            //default:
            //    workareamenu defaultActionMenu = new workareamenu("action", this.GetMessage("lbl action"), this.AppImgPath + "../UI/Icons/check.png");
            //    // defaultActionMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/save.png", this.GetMessage("btn save"), "document.forms[0].submit();");
            //    // defaultActionMenu.AddBreak();
            //    defaultActionMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/cancel.png", "Close", "parent.$ektron(\'.ektronExportHandoffModal\').modalHide();");
            //    this.AddMenu(defaultActionMenu);

            //    SetTitleBarToString("lbl reorder reorder shipping methods");
            //    AddHelpButton("ReorderShippingMethods");
            //    break;
        }
    }
Ejemplo n.º 6
0
    protected void Util_SetLabels()
    {
        ltr_customerorders_lbl.Text = GetMessage("lbl orders");
        ltr_customertotal_lbl.Text = GetMessage("lbl total order value");
        ltr_customeravg_lbl.Text = GetMessage("lbl avg order value");

        ltr_notes_lbl.Text = GetMessage("lbl ecomm order notes") + (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled ? ("<a href=\"#\" class=\"button buttonInline greenHover buttonEdit btnEdit\" onclick=\"if (allowOpen) { $ektron('" + uxNotesDialog.Selector + "').dialog('open');EktronUiDialogInit('notes'," + m_iID.ToString() + "); }\" title=\"" + GetMessage("btn edit") + "\" >" + GetMessage("btn edit") + "</a>") : "");

        ltr_created_lbl.Text = GetMessage("generic datecreated");
        ltr_authorized_lbl.Text = GetMessage("lbl date authorized");
        ltr_captured_lbl.Text = GetMessage("lbl date captured");
        ltr_settleddate_lbl.Text = GetMessage("lbl date settled");
        ltr_shipped_lbl.Text = GetMessage("lbl date shipped");
        ltr_shippingtotal_tax_lbl.Text = GetMessage("lbl ship tax");
        ltr_required_lbl.Text = GetMessage("lbl date required");
        ltr_completed_lbl.Text = GetMessage("lbl date completed");

        ltr_order_billing_lbl.Text = GetMessage("lbl billing") ;//+ (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled ? ("<a href=\"#\" class=\"button buttonInline greenHover buttonEdit btnEdit\" onclick=\"if (allowOpen) { ektb_show(\'" + GetMessage("lbl edit address") + "\', \'fulfillment.aspx?addressType=billing&action=editaddress&id=" + m_iID.ToString() + "&EkTB_iframe=true&width=500&height=350&scrolling=true&modal=true\', false); } \" title=\"" + GetMessage("btn edit") + "\" >" + GetMessage("btn edit") + "</a>") : "");
        ltr_order_shipping_lbl.Text = GetMessage("lbl shipping");// + (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled ? ("<a href=\"#\" class=\"button buttonInline greenHover buttonEdit btnEdit\" onclick=\"if (allowOpen) { ektb_show(\'" + GetMessage("lbl edit address") + "\', \'fulfillment.aspx?addressType=shipping&action=editaddress&id=" + m_iID.ToString() + "&EkTB_iframe=true&width=500&height=350&scrolling=true&modal=true\', false); } \" title=\"" + GetMessage("btn edit") + "\" >" + GetMessage("btn edit") + "</a>") : "");

        ltr_subtotal_lbl.Text = GetMessage("lbl subtotal");
        ltr_coupontotal_lbl.Text = GetMessage("lbl coupon total");
        ltr_taxtotal_lbl.Text = GetMessage("lbl wa tax");
        ltr_shippingtotal_lbl.Text = GetMessage("lbl shipping");
        ltr_ordertotal_lbl.Text = GetMessage("lbl order total");

        ltr_trackingnumber.Text = GetMessage("lbl tracking number");
        ltr_markasshipped.Text = GetMessage("lbl mark as shipped");
        hdn_errorMessage.Value = string.Format(GetMessage("js alert field cannot include"), "< >");
        hdn_errOrderNotesMessage.Value = string.Format(GetMessage("js alert field cannot include"), "< >");

        ltr_desc_lbl.Text = GetMessage("generic description");
        ltr_saleprice_lbl.Text = GetMessage("lbl sale price");
        ltr_qty_lbl.Text = GetMessage("lbl quantity");
        ltr_total_lbl.Text = GetMessage("lbl total");

        ltr_transactionId_lbl.Text = GetMessage("lbl transactionid");
        ltr_gateway_lbl.Text = GetMessage("lbl payment gateway");
        ltr_type_lbl.Text = GetMessage("generic type");
        ltr_last4_lbl.Text = GetMessage("lbl last 4 digits");
        ltr_amount_lbl.Text = GetMessage("lbl payment total");
        ltr_paymentdate_lbl.Text = GetMessage("lbl payment date");
        ltr_authorizeddate_lbl.Text = GetMessage("lbl date authorized");
        ltr_captureddate_lbl.Text = GetMessage("lbl date captured");

        ltr_holdmsg.Text = m_refMsg.GetMessage("one moment msg");

        ltr_showidsearch.Text = GetMessage("lbl reporting id orders");
        ltr_searchid.Text = GetMessage("lbl err order id invalid");

        this.ltr_address_id_lbl.Text = this.GetMessage("generic id");
        this.ltr_address_name.Text = this.GetMessage("lbl address name");
        this.ltr_address_company.Text = this.GetMessage("lbl address company");
        this.ltr_address_line1.Text = this.GetMessage("lbl address street");
        this.ltr_address_city_lbl.Text = this.GetMessage("lbl address city");
        this.ltr_address_region.Text = this.GetMessage("lbl address state province");
        this.ltr_address_postal.Text = this.GetMessage("lbl address postal");
        this.ltr_address_country.Text = this.GetMessage("lbl address country");
        this.ltr_address_phone.Text = this.GetMessage("lbl address phone");

        HttpBrowserCapabilities browser = Request.Browser;
        Ektron.Cms.Framework.Context.CmsContextService context = new Ektron.Cms.Framework.Context.CmsContextService();
        switch (this.m_sPageAction)
        {

            case "editnotes":

                pnl_viewall.Visible = false;
                pnl_trackingnumber.Visible = false;
                pnl_payment.Visible = false;
                pnl_notes.Visible = true;

                if (browser.Type.Contains("IE") && browser.MajorVersion >= 9)
                {
                    // work around to prevent errors in IE9 when it destroys native JS objects
                    // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx
                    uxEditNotesIframe.Attributes.Add("src", "about:blank");
                }
                else
                {
                    uxEditNotesIframe.Attributes.Add("src", context.SitePath + "fulfillment.aspx?action=editnotes&id=" + m_iID.ToString() + "&width=350&height=250&scrolling=true&modal=true");
                }
                //uxNotesDialog.Title = m_refMsg.GetMessage("lbl ecomm edit order notes");

                //AddBackButton("javascript:$ektron('" + uxNotesDialog.Selector + "').dialog('close');");
                workareamenu newMenu_1 = new workareamenu("file", GetMessage("lbl action"), m_refContentApi.AppPath + "images/UI/Icons/check.png");
                newMenu_1.AddItem(m_refContentApi.AppPath + "images/ui/icons/save.png", GetMessage("btn save"), "EditNotes();");
                AddMenu(newMenu_1);
                SetTitleBarToMessage("lbl ecomm edit order notes");
                break;

            case "vieworder":

                if (Request.QueryString["page"] == "workarea")
                {
                    // redirect to workarea when user clicks back button if we're in workarea
                    AddBackButton("javascript:top.switchDesktopTab()");
                }
                else
                {
                    AddBackButton("fulfillment.aspx");
                }

                if (bCommerceAdmin && (order != null))
                {

                    workareamenu newMenu = new workareamenu("file", GetMessage("lbl action"), m_refContentApi.AppPath + "images/UI/Icons/check.png");
                    IList<string> options = null;
                    try
                    {

                        if (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled && !(order.WorkflowId == Guid.Empty))
                        {
                            options = Ektron.Workflow.Runtime.WorkflowHandler.GetOrderEventQueue(order.WorkflowId);
                        }

                    }
                    catch (Exception ex)
                    {

                        if (order.WorkflowId != Guid.Empty && ex.Message.IndexOf(order.WorkflowId.ToString()) == -1)
                        {
                            throw (ex);
                        }

                    }

                    if (options != null)
                    {

                        int addedOptions = 0;

                        for (int i = 0; i <= (options.Count - 1); i++)
                        {

                            string EventImage = "arrow_right_green.gif";
                            string EventName = (string)(options[i].Replace("OnOrder", ""));
                            bool addThisItem = true;

                            switch (EventName.ToLower())
                            {

                                case "updated":

                                    EventName = GetMessage("lbl workflow updated");
                                    addThisItem = false;
                                    break;

                                case "processed":

                                    EventName = GetMessage("lbl workflow processed");
                                    addedOptions++;
                                    break;

                                case "shipped":

                                    EventName = GetMessage("lbl workflow shipped");
                                    EventImage = "commerce/bundle.gif";
                                    addThisItem = false;
                                    if (order.Status != EkEnumeration.OrderStatus.Fraud && order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Completed && Util_NeedsTrackingNumber())
                                    {
                                        newMenu.AddBreak();
                                        newMenu.AddItem(AppImgPath + "commerce/bundle.gif", GetMessage("lbl add tracking number"), "AddTrackingNumber();");
                                        addedOptions++;
                                    }
                                    else if (Util_CanEditTrackingNumber())
                                    {
                                        addThisItem = true;
                                        newMenu.AddBreak();
                                        newMenu.AddItem(AppImgPath + "commerce/bundle.gif", GetMessage("lbl edit tracking number"), "AddTrackingNumber();");
                                        addedOptions++;
                                    }
                                    break;

                                case "cancelled":

                                    EventName = GetMessage("lbl cancel order");
                                    EventImage = "commerce/cancel.gif";
                                    addThisItem = false;
                                    if (order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Fraud && order.Status != EkEnumeration.OrderStatus.Completed)
                                    {
                                        newMenu.AddBreak();
                                        newMenu.AddItem(AppImgPath + "commerce/cancel.gif", GetMessage("lbl cancel order"), "CancelOrder();");
                                        addedOptions++;
                                    }
                                    break;

                                case "fraud":

                                    EventName = GetMessage("lbl mark fraud");
                                    EventImage = "commerce/fraud.gif";
                                    addThisItem = false;
                                    if (order.Status != EkEnumeration.OrderStatus.Fraud && order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Completed)
                                    {
                                        newMenu.AddItem(AppImgPath + "commerce/fraud.gif", GetMessage("lbl mark fraud"), "MarkAsFraud();");
                                        addedOptions++;
                                    }
                                    break;

                                default:

                                    EventName = options[i];
                                    addedOptions++;
                                    break;

                            }

                            if (addThisItem)
                            {
                                newMenu.AddItem(AppImgPath + EventImage, EventName, "CallOrderEvent(\'" + options[i] + "\');");
                            }

                        }

                        if (addedOptions > 0)
                        {
                            newMenu.AddBreak();
                        }

                    }

                    if (IsCommerceAdmin)
                    {
                        newMenu.AddItem(AppImgPath + "adobe-pdf.gif", "Export As PDF", "window.open(\'" + m_refContentApi.AppPath + "commerce/export/order.aspx?id=" + m_iID.ToString() + "&type=pdf\', \'PDF\');");
                        newMenu.AddItem(AppImgPath + "ms-excel.gif", "Export As XLS", "window.open(\'" + m_refContentApi.AppPath + "commerce/export/order.aspx?id=" + m_iID.ToString() + "&type=xls\', \'XLS\');");
                        newMenu.AddItem(AppImgPath + "ms-notepad.gif", "Export As CSV", "window.open(\'" + m_refContentApi.AppPath + "commerce/export/order.aspx?id=" + m_iID.ToString() + "&type=csv\', \'CSV\');");
                        this.AddButtonwithMessages(AppImgPath + "../UI/Icons/delete.png", m_refContentApi.AppPath + "Commerce/fulfillment.aspx?action=delete&orderid=" + m_iID.ToString(), "generic delete title", "generic delete title", " onclick=\"return confirm(\'" + GetMessage("js: confirm delete order") + "\');\" ", StyleHelper.DeleteButtonCssClass, true);
                    }

                    this.AddMenu(newMenu);
                }

                if (order == null)
                {
                    this.pnl_view.Visible = false;
                }
                else
                {
                    this.pnl_view.Visible = true;
                }

                this.SetTitleBarToMessage("lbl view order");
                break;

            case "showpayment":

                pnl_viewall.Visible = false;
                pnl_trackingnumber.Visible = false;
                pnl_payment.Visible = true;
                tr_orderpart.Visible = false;

                if (browser.Type.Contains("IE") && browser.MajorVersion >= 9)
                {
                    // work around to prevent errors in IE9 when it destroys native JS objects
                    // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx
                    uxPaymentIframe.Attributes.Add("src", "about:blank");
                }
                else
                {
                    uxPaymentIframe.Attributes.Add("src", context.SitePath + "fulfillment.aspx?action=showpayment&orderid=" + m_iID.ToString() + "&width=500&height=300&scrolling=true&modal=true");
                }

                //AddBackButton("javascript:parent.ektb_remove();");

                workareamenu newMenu_2 = new workareamenu("file", GetMessage("lbl action"), AppImgPath + "check20.gif");

                if (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled && !Page.IsPostBack)
                {

                    if (order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Fraud)
                    {

                        if (payment.CapturedOn == DateTime.MinValue)
                        {
                            newMenu_2.AddItem(AppImgPath + "commerce/Submit.gif", GetMessage("lbl capture"), "CaptureOrder();");
                            if (payment.PaymentType.ToLower() == "ektron.cms.commerce.paypalpayment" || payment.PaymentType.ToLower() == "ektron.cms.commerce.checkpayment")
                            {
                                newMenu_2.AddItem(AppImgPath + "commerce/accept.gif", GetMessage("lbl capture and settle"), "CaptureOrderAndSettle();");
                            }
                        }

                        if (payment.CapturedOn != DateTime.MinValue && payment.CapturedOn != DateTime.MaxValue && (payment.SettledDate == DateTime.MinValue || payment.SettledDate == DateTime.MaxValue) && (payment.PaymentType.ToLower() == "ektron.cms.commerce.paypalpayment" || payment.PaymentType.ToLower() == "ektron.cms.commerce.checkpayment"))
                        {
                            newMenu_2.AddItem(AppImgPath + "commerce/accept.gif", GetMessage("lbl settle"), "SettlePayment();");

                        }

                    }

                }

                if (payment != null && payment.PaymentType.ToLower() == "ektron.cms.commerce.paypalpayment")
                {
                    newMenu_2.AddItem(AppImgPath + "commerce/paypal.gif", GetMessage("lbl check payment status"), "CheckPayPalStatus();");
                }

                this.AddMenu(newMenu_2);

                SetTitleBarToMessage("lbl view payment");
                break;

            case "trackingnumber":

                pnl_viewall.Visible = false;
                pnl_trackingnumber.Visible = true;
                tr_orderpart.Visible = false;
                AddBackButton("javascript:parent.ektb_remove();");
                AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "btn save", "btn save", " onclick=\"SubmitTrackingNumber(); return false;\" ", StyleHelper.SaveButtonCssClass, true);
                break;

            //case "editaddress":
            //    pnl_viewaddress.Visible = true;
            //    this.tr_address_id.Visible = this.m_iID > 0;
            //    AddBackButton("javascript:parent.ektb_remove();");
            //    this.AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "btn save", "btn save", " onclick=\"CheckAddress(); return false;\" ", StyleHelper.SaveButtonCssClass, true);
            //    this.SetTitleBarToString(this.GetMessage((string)(this.m_iID > 0 ? "lbl edit address" : "lbl add address")));
            //    break;

            default: // "viewall"

                workareamenu newMenu_3 = new workareamenu("file", GetMessage("lbl order reporting"), AppImgPath + "commerce/catalog_view.gif");
                newMenu_3.AddItem(AppImgPath + "commerce/calendar_down.gif", GetMessage("lbl report most recent orders"), "window.location.href = \'fulfillment.aspx?action=mostrecent\';");
                newMenu_3.AddItem(AppImgPath + "commerce/calendar.gif", GetMessage("lbl report date orders"), "ektb_show(\'" + GetMessage("lbl reporting by dates") +"\', \'bydates.aspx?EkTB_iframe=true&width=400&height=150&scrolling=true&modal=true\', false);");
                newMenu_3.AddItem(AppImgPath + "menu/users2.gif", GetMessage("lbl report customer orders"), "ektb_show(\'" + GetMessage("lbl reporting by customer") + "\', \'bycustomer.aspx?EkTB_iframe=true&width=500&height=150&scrolling=true&modal=true\', false);");
                newMenu_3.AddItem(m_refContentApi.AppPath + "images/ui/icons/brick.png", GetMessage("lbl report product orders"), "ektb_show(\'" + GetMessage("lbl reporting by product") + "\', \'byproduct.aspx?action=reporting&EkTB_iframe=true&width=500&height=150&scrolling=true&modal=true\', false);");
                newMenu_3.AddItem(AppImgPath + "commerce/Submit.gif", GetMessage("lbl report id orders"), "ShowOrderIdSearch();");
                //This option is being hidden for now (issue# 38244), and needs to be implemented in next release, which is 7.6.0 release/maintenance.
                //newMenu.AddItem(AppImgPath & "menu/form_blue.gif", GetMessage("lbl report custom orders"), "CustomReport();")
                this.AddMenu(newMenu_3);
                this.SetTitleBarToMessage("lbl orders");
                break;

        }

        this.AddHelpButton((string)("orders" + EkFunctions.UrlEncode(m_sPageAction)));
    }
Ejemplo n.º 7
0
    protected void Util_SetLabels()
    {
        switch (m_sPageAction)
        {
            case "crosssell":
                SetTitleBarToMessage("lbl cross sell rec");
                break;
            case "upsell":
                SetTitleBarToMessage("lbl up sell rec");
                break;
        }

        workareamenu actionMenu = new workareamenu("action", this.GetMessage("lbl action"), m_refContentApi.AppPath + "images/ui/icons/brick.png"); // check2.gif
        AddBackButton((string)("../../content.aspx?action=View&folder_id=" + m_iFolderId + "&id=" + m_iID + "&LangType=" + ContentLanguage + "&callerpage=content.aspx&origurl=action=%3dViewContentByCategory%26id%3d" + m_iFolderId));
        if (security_data.CanEdit)
        {
            actionMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/save.png", this.GetMessage("btn save"), "document.forms[0].submit();");
            actionMenu.AddBreak();
        }
        actionMenu.AddLinkItem(m_refContentApi.AppPath + "images/ui/icons/cancel.png", this.GetMessage("generic cancel"), (string)("../../content.aspx?action=View&folder_id=" + m_iFolderId + "&id=" + m_iID + "&LangType=" + ContentLanguage + "&callerpage=content.aspx&origurl=action=%3dViewContentByCategory%26id%3d" + m_iFolderId));
        this.AddMenu(actionMenu);
        AddHelpButton(EkFunctions.HtmlEncode(m_sPageAction));
    }
 private void ViewAllEmailFromToolBar()
 {
     SetTitleBarToMessage("alt view all email from addresses");
     workareamenu newMenu = new workareamenu("file", GetMessage("lbl new"), imagePath + "star.png");
     newMenu.AddItem(imagePath + "email.png", GetMessage("lbl email from"), "ektb_show(\'\',\'" + PAGE_NAME + "?action=Add&thickbox=true&EkTB_iframe=true&height=300&width=500&modal=true\', null);");
     AddMenu(newMenu);
     workareamenu actionMenu = new workareamenu("action", GetMessage("lbl action"), imagePath + "check.png");
     actionMenu.AddItem(imagePath + "delete.png", GetMessage("lbl del sel"), "ConfirmDelete();");
     AddMenu(actionMenu);
     AddHelpButton("ViewAllEmailFromAddresses");
 }
Ejemplo n.º 9
0
    protected void SetLabels()
    {
        this.ltr_address_name.Text = this.GetMessage("lbl address name");
        this.ltr_address_id.Text = this.GetMessage("generic id");
        this.ltr_address_line1.Text = this.GetMessage("lbl address line1");
        this.ltr_address_line2.Text = this.GetMessage("lbl address line2");
        this.ltr_address_city_lbl.Text = this.GetMessage("lbl address city");
        this.ltr_address_region.Text = this.GetMessage("lbl state province");
        this.ltr_address_postal.Text = this.GetMessage("lbl address postal");
        this.ltr_address_country.Text = this.GetMessage("lbl address country");
        this.ltr_default_warehouse.Text = this.GetMessage("lbl default warehouse");

        switch (base.m_sPageAction)
        {

            case "addedit":
                this.pnl_viewaddress.Visible = true;
                this.AddBackButton(this.m_sPageName + (this.m_iID > 0 ? ("?action=view&id=" + this.m_iID.ToString()) : ""));
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/save.png", m_sPageName + "?action=addedit&id=" + this.m_iID.ToString(), "lbl alt save warehouse", "btn save", " onclick=\" resetCPostback(); return SubmitForm(); \" ", StyleHelper.SaveButtonCssClass, true);
                if (this.m_iID > 0)
                {
                    this.SetTitleBarToMessage("lbl edit warehouse");
                    this.AddHelpButton("Editwarehouse");
                }
                else
                {
                    this.SetTitleBarToMessage("lbl add warehouse");
                    this.AddHelpButton("Addwarehouse");
                }
                break;

            case "view":
                this.pnl_viewall.Visible = false;
                this.pnl_viewaddress.Visible = true;
                this.AddBackButton(this.m_sPageName);
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/contentEdit.png", this.m_sPageName + "?action=addedit&id=" + this.m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                if (!m_bIsDefault)
                {

                    this.AddButtonwithMessages(this.AppImgPath + "icon_survey_enable.gif", this.m_sPageName + "?action=markdef&id=" + this.m_iID.ToString(), "lbl warehouse mark def", "lbl warehouse mark def", "", StyleHelper.EnableButtonCssClass);
                    this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/delete.png", this.m_sPageName + "?action=del&id=" + this.m_iID.ToString(), "alt del warehouse button text", "btn delete", " onclick=\" return CheckDelete();\" ", StyleHelper.DeleteButtonCssClass);

                }
                this.SetTitleBarToMessage("lbl view warehouse");
                this.AddHelpButton("Viewwarehouse");
                break;
            default: // "viewall"
                workareamenu newMenu = new workareamenu("file", this.GetMessage("lbl new"), this.AppImgPath + "../UI/Icons/star.png");
                newMenu.AddLinkItem(this.AppImgPath + "menu/card.gif", this.GetMessage("lbl warehouse"), this.m_sPageName + "?action=addedit");
                this.AddMenu(newMenu);
                workareamenu actionMenu = new workareamenu("action", this.GetMessage("lbl action"), this.AppImgPath + "../UI/Icons/check.png");
                actionMenu.AddItem(this.AppImgPath + "icon_survey_enable.gif", this.GetMessage("lbl warehouse mark def"), "CheckMarkAsDef();");
                this.AddMenu(actionMenu);

                this.SetTitleBarToMessage("lbl warehouses");
                this.AddHelpButton("warehouses");
                break;
        }

        SetJs();
    }
Ejemplo n.º 10
0
    protected void SetLabels()
    {
        this.ltr_package_name.Text = this.GetMessage("generic name");
        this.ltr_package_id.Text = this.GetMessage("generic id");
        this.ltr_package_length.Text = this.GetMessage("lbl length");
        this.ltr_package_width.Text = this.GetMessage("lbl width");
        this.ltr_package_height.Text = this.GetMessage("lbl height");
        this.ltr_package_weight.Text = this.GetMessage("lbl maxweight");

        switch (base.m_sPageAction)
        {

            case "addedit":
                this.pnl_viewaddress.Visible = true;
                this.AddBackButton(this.m_sPageName + (this.m_iID > 0 ? ("?action=view&id=" + this.m_iID.ToString()) : ""));
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/save.png", m_sPageName + "?action=addedit&id=" + this.m_iID.ToString(), "lbl alt save package", "btn save", " onclick=\" return SubmitForm(); \" ", StyleHelper.SaveButtonCssClass, true);
                if (this.m_iID > 0)
                {
                    this.SetTitleBarToMessage("lbl edit package");
                    this.AddHelpButton("EditPackages");
                }
                else
                {
                    this.SetTitleBarToMessage("lbl add package");
                    this.AddHelpButton("Addpackage");
                }
                break;

            case "view":
                this.pnl_viewall.Visible = false;
                this.pnl_viewaddress.Visible = true;
                this.AddBackButton(this.m_sPageName);
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/contentEdit.png", this.m_sPageName + "?action=addedit&id=" + this.m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/delete.png", this.m_sPageName + "?action=del&id=" + this.m_iID.ToString(), "alt del package button text", "btn delete", " onclick=\" return CheckDelete();\" ", StyleHelper.DeleteButtonCssClass);
                this.SetTitleBarToMessage("lbl view package");
                this.AddHelpButton("Viewpackage");
                break;

            default: // "viewall"
                workareamenu newMenu = new workareamenu("file", this.GetMessage("lbl new"), this.AppImgPath + "../UI/Icons/star.png");
                newMenu.AddLinkItem(this.AppImgPath + "menu/card.gif", this.GetMessage("lbl package"), this.m_sPageName + "?action=addedit");
                this.AddMenu(newMenu);

                this.SetTitleBarToMessage("lbl packages");
                this.AddHelpButton("packages");
                break;
        }
        SetJs();
    }
Ejemplo n.º 11
0
    protected void Util_SetLabels()
    {
        lbl_id.Text = GetMessage("generic id");
        lbl_used.Text = GetMessage("lbl coupon used");
        ltr_code.Text = GetMessage("lbl coupon code");
        ltr_desc.Text = GetMessage("lbl coupon desc");
        ltr_type.Text = GetMessage("lbl coupon type");
        ltr_oneper.Text = GetMessage("lbl coupon one per");
        ltr_active.Text = GetMessage("lbl coupon active");
        ltr_discountval.Text = GetMessage("lbl coupon discount");
        ltr_minamount.Text = GetMessage("lbl coupon min ammount");
        ltr_maxamount.Text = GetMessage("lbl coupon max ammount");
        ltr_expireafter.Text = GetMessage("lbl coupon expires after");
        ltr_startdate.Text = GetMessage("lbl coupon start date");
        ltr_enddate.Text = GetMessage("lbl coupon exp date");
        ltr_instructions.Text = GetMessage("lbl select entries for coupon");
        switch (m_sPageAction)
        {
            case "view":

                this.Tabs.On();
                this.Tabs.AddTabByMessage("properties text", "dvProp");
                Tabs.AddTabByMessage("generic type", "dvType");
                Tabs.AddTabByMessage("generic options", "dvOptions");
                this.Tabs.AddTabByMessage("lbl applies to", "dvApplies");
                SetTitleBarToMessage("lbl view coupon");
                workareamenu actionMenu_1 = new workareamenu("action", this.GetMessage("lbl action"), this.AppPath + "images/UI/Icons/check.png");
                actionMenu_1.AddLinkItem(this.AppImgPath + "edit.gif", this.GetMessage("generic edit title"), m_sPageName + "?id=" + m_iID.ToString() + "&action=addedit");
                actionMenu_1.AddBreak();
                if (IsActive)
                {
                    actionMenu_1.AddItem(this.AppImgPath + "commerce/coupon-inactive.gif", this.GetMessage("lbl coupon mark inactive"), "if(confirm(\'" + GetMessage("js confirm coupon mark inactive") + "\')) { window.location.href = \'" + m_sPageName + "?id=" + m_iID.ToString() + "&action=deactivate" + "\'; } ");
                }
                if (!IsUsed)
                {
                    actionMenu_1.AddItem(this.AppPath + "images/UI/Icons/delete.png", this.GetMessage("btn delete"), "if(confirm(\'" + GetMessage("js confirm coupon delete") + "\')) { window.location.href = \'" + m_sPageName + "?id=" + m_iID.ToString() + "&action=delete" + "\'; } ");
                }
                this.AddMenu(actionMenu_1);
                this.AddBackButton(this.m_sPageName);
                break;

            case "addedit":
                this.Tabs.On();
                if (m_iID == 0)
                {
                    Tabs.ViewAsWizard();
                    Tabs.AddTabByString("1", "dvProp");
                    Tabs.AddTabByString("2", "dvType");
                    Tabs.AddTabByString("3", "dvOptions");
                    Tabs.AddTabByString("4", "dvApplies");
                }
                else
                {
                    this.Tabs.AddTabByMessage("properties text", "dvProp");
                    Tabs.AddTabByMessage("generic type", "dvType");
                    Tabs.AddTabByMessage("generic options", "dvOptions");
                    this.Tabs.AddTabByMessage("lbl applies to", "dvApplies");
                }
                if (this.m_iID > 0)
                {
                    SetTitleBarToMessage("lbl edit coupon");
                }
                else
                {
                    SetTitleBarToMessage("lbl add coupon");
                }
                workareamenu actionMenu = new workareamenu("action", this.GetMessage("lbl action"), this.AppImgPath + "../UI/Icons/check.png");
                actionMenu.AddItem(AppPath + "images/ui/icons/save.png", this.GetMessage("btn save"), "SubmitForm(" + EkEnumeration.AssetActionType.Save + ");");
                actionMenu.AddBreak();
                actionMenu.AddLinkItem(AppPath + "images/ui/icons/cancel.png", this.GetMessage("generic cancel"), (string)(m_iID > 0 ? (m_sPageName + "?id=" + m_iID.ToString() + "&action=view") : m_sPageName));
                this.AddMenu(actionMenu);
                if (this.m_iID > 0)
                {
                    this.AddHelpButton("editcoupon");
                }
                else
                {
                    this.AddHelpButton("addcoupon");
                }
                break;
            default:
                SetTitleBarToMessage("lbl coupons");
                workareamenu newMenu = new workareamenu("file", this.GetMessage("lbl new"), AppPath + "images/UI/Icons/star.png");
                newMenu.AddLinkItem(this.AppImgPath + "commerce/coupon.gif", this.GetMessage("lbl coupon"), m_sPageName + "?action=addedit");
                this.AddMenu(newMenu);
                this.AddHelpButton("coupons");
                break;
        }
    }
Ejemplo n.º 12
0
    protected override void OnInit(EventArgs e)
    {
        long userId = _dataManager.RequestInformation.UserId;
        _siteCookieName = userId.ToString() + "_" + _SelectedSiteId;
        base.OnInit(e);
        this.SetTitleBarToMessage("sam segments");
        if (!string.IsNullOrEmpty(Request.QueryString["updatecookie"]))
        {
            _updateCookie = Convert.ToBoolean(Request.QueryString["updatecookie"]);
        }
        if (!string.IsNullOrEmpty(Request.QueryString["identity"]))
        {
            _identity = AntiXss.HtmlEncode(Request.QueryString["identity"]);
        }
        if (!string.IsNullOrEmpty(Request.QueryString["segmentIds"]))
        {
            _widgetSegmentIds = AntiXss.HtmlEncode(Request.QueryString["segmentIds"]);
        }
        if (!string.IsNullOrEmpty(Request.QueryString["provider"]))
        {
            _currentProvider = AntiXss.HtmlEncode(Request.QueryString["provider"]);
        }
        else
        {
            string providerCookieName = userId.ToString() + "_SiteAnalyticsSelectedProvider";
            HttpCookie selectedProviderCookie = Request.Cookies[providerCookieName];
            if (selectedProviderCookie != null && selectedProviderCookie.Value != "")
            {
                _currentProvider = selectedProviderCookie.Value;
            }
        }

        if (!string.IsNullOrEmpty(_currentProvider)
            && _dataManager.HasProvider(_currentProvider))
        {
                SegmentPersistenceId = _dataManager.GetSegmentFilterCookieName(_currentProvider);
        }

        _user = this.GetMessage("generic user");
        _visitor = this.GetMessage("lbl visitor");
        if (Page.IsPostBack)
        {
            List<string> selectedIds = new List<string>();
            foreach (string key in Request.Form.AllKeys)
            {
                if (key.IndexOf("chk_") == 0)
                {
                    string idPair = string.Empty;
                    string typeVal = key.Replace("chk_", "");
                    if (0 == typeVal.IndexOf("prop_"))
                    {
                        typeVal = Request.Form[key].ToString();
                        string[] objIds = Request.Form[typeVal].Split(',');
                        foreach (string id in objIds)
                        {
                            if (id.Length > 0)
                            {
                                idPair = id + "|" + typeVal.Substring(typeVal.LastIndexOf("_") + 1);
                                if (!selectedIds.Contains(idPair))
                                {
                                    selectedIds.Add(idPair);
                                }
                            }
                        }
                    }
                    else
                    {
                        idPair = typeVal + "|0";
                        if (!selectedIds.Contains(idPair))
                        {
                            selectedIds.Add(idPair);
                        }
                    }
                }
            }
            if (_updateCookie)
            {
                CookieSegments = selectedIds;
            }
            Page.ClientScript.RegisterStartupScript(this.GetType(), "UpdateSegments", "UpdateSegments('" + string.Join(",", selectedIds.ToArray()) + "', '" + _identity + "');", true);
        }
        else
        {
            try
            {
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/cancel.png", "#", "generic cancel", "generic cancel", " onclick=\"self.close();\" ", StyleHelper.CancelButtonCssClass, true);
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/save.png", "#", "btn save", "btn save", " onclick=\"forms[0].submit();return false;\" ", StyleHelper.SaveButtonCssClass, true);

                workareamenu actionMenu_1 = new workareamenu("action", this.GetMessage("lbl add custom segments"), this.AppImgPath + "../UI/Icons/add.png");
                // actionMenu_1.AddItem(m_refContentApi.AppPath + "images/ui/icons/user.png", this.GetMessage("lbl user id"), "AddCustomSegment(1, \"" + this.GetMessage("generic user") + "\");");
                // actionMenu_1.AddItem(m_refContentApi.AppPath + "images/ui/icons/users.png", this.GetMessage("lbl visitor id"), "AddCustomSegment(2, \"" + this.GetMessage("lbl visitor") + "\");");
                // this.AddMenu(actionMenu_1);

                if (_dataManager.IsAnalyticsViewer())
                {
                    HttpCookie selectedSiteCookie = Request.Cookies[_siteCookieName];
                    if (_updateCookie && selectedSiteCookie != null && selectedSiteCookie.Value != "")
                    {
                        try
                        {
                            BindItems(_dataManager.GetSegments(selectedSiteCookie.Value), CookieSegments);
                        }
                        catch
                        {
                            BindItems(_dataManager.GetSegments(_currentProvider), CookieSegments);
                        }
                    }
                    else if (false == _updateCookie)
                    {
                        List<string> segmentIds = new List<string>();
                        if (!string.IsNullOrEmpty(_widgetSegmentIds))
                        {
                            _widgetSegmentIds = _widgetSegmentIds.Replace("&#124;", "|");
                            segmentIds.AddRange(_widgetSegmentIds.Split(','));
                        }
                        BindItems(_dataManager.GetSegments(_currentProvider), segmentIds);
                    }
                    else
                    {
                        List<SegmentData> segments = new List<SegmentData>();
                        if (!string.IsNullOrEmpty(_currentProvider)
                            && _dataManager.HasProvider(_currentProvider))
                        {
                            segments = _dataManager.GetSegments(_currentProvider);
                        }
                        else
                            segments.Add(new SegmentData("0", GetMessage("lbl all visits"), SegmentType.Default));
                        BindItems(segments, CookieSegments);
                    }
                }
            }
            catch (Exception ex)
            {
                Utilities.ShowError(ex.Message);
            }
        }
        this.SelectStatement.Text = GetMessage("lbl select up to four segments");
        Page.Title = GetMessage("lbl provider segment filter");
    }
Ejemplo n.º 13
0
    protected void SetLabels()
    {
        this.litPaymentOptions.Text = GetMessage("lbl commerce payment options");
        this.litPaymentGatways.Text = GetMessage("lbl payment gateways");

        this.ltr_name.Text = this.GetMessage("lbl gateway name");
        this.ltr_id.Text = this.GetMessage("lbl gateway id");
        this.ltr_default.Text = this.GetMessage("lbl gateway default");
        this.ltr_uid.Text = this.GetMessage("lbl gateway userid");
        this.ltr_pwd.Text = this.GetMessage("lbl gateway password");
        this.ltr_showcustom.Text = "<a href=\"javascript: void(0);\" onclick=\"ToggleDiv(\'tbl_custom\');\">" + GetMessage("lbl gateway expand custom") + "</a>";
        this.ltr_spare1.Text = this.GetMessage("lbl gateway custom1");
        this.ltr_spare2.Text = this.GetMessage("lbl gateway custom2");
        switch (base.m_sPageAction)
        {
            case "view":

                this.pnl_view.Visible = true;
                this.pnl_viewall.Visible = false;
                this.AddBackButton(this.m_sPageName);
                this.AddButtonwithMessages(imageIconsPath + "contentEdit.png", this.m_sPageName + "?action=addedit&id=" + this.m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper. EditButtonCssClass, true);
                if (!m_bIsDefault)
                {
                    this.AddButtonwithMessages(this.AppImgPath + "icon_survey_enable.gif", this.m_sPageName + "?action=markdef&id=" + this.m_iID.ToString(), "lbl gateway mark def", "lbl gateway mark def", "", StyleHelper.EnableButtonCssClass);
                    this.AddButtonwithMessages(imageIconsPath + "delete.png", this.m_sPageName + "?action=del&id=" + this.m_iID.ToString(), "alt del gateway button text", "btn delete", " onclick=\"return CheckDelete();\" ", StyleHelper.DeleteButtonCssClass);
                }
                this.SetTitleBarToMessage("lbl view gateway");
                this.AddHelpButton("ViewPaymentGateway");
                break;

            case "addedit":

                this.pnl_view.Visible = true;
                this.pnl_viewall.Visible = false;
                if (this.m_iID > 0)
                {
                    this.AddBackButton(this.m_sPageName + "?action=view&id=" + m_iID.ToString());
                    this.AddButtonwithMessages(imageIconsPath + "save.png", "#", "lbl alt save gateway", "btn save", " onclick=\"SubmitForm(); return false;\" ", StyleHelper.SaveButtonCssClass, true);
                    this.SetTitleBarToMessage("lbl edit gateway");
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "protectpwd", "ProtectPassword();", true);
                    this.AddHelpButton("EditPaymentGateway");
                }
                else
                {
                    this.AddBackButton(this.m_sPageName);
                    this.AddButtonwithMessages(imageIconsPath + "save.png", "#", "lbl alt add gateway", "btn save", " onclick=\"SubmitForm(); return false;\" ", StyleHelper.SaveButtonCssClass, true);
                    this.SetTitleBarToMessage("lbl add gateway");
                    this.AddHelpButton("AddPaymentGateway");
                }
                break;

            case "editoptions":

                AddBackButton(this.m_sPageName);
                AddButtonwithMessages(imageIconsPath + "save.png", "#", "lbl alt save payment options", "btn save", " onclick=\"SubmitOptionsForm(); return false;\" ", StyleHelper.SaveButtonCssClass, true);
                SetTitleBarToMessage("lbl payment options edit");
                AddHelpButton("paymentgateway");
                break;

            default: // "viewall"

                workareamenu newMenu = new workareamenu("file", this.GetMessage("lbl new"), imageIconsPath + "star.png");
                newMenu.AddLinkItem(this.AppImgPath + "menu/card.gif", this.GetMessage("lbl payment gateway"), this.m_sPageName + "?action=addedit");
                this.AddMenu(newMenu);

                workareamenu actionMenu = new workareamenu("action", this.GetMessage("lbl action"), imageIconsPath + "check.png");
                actionMenu.AddItem(this.AppImgPath + "icon_survey_enable.gif", this.GetMessage("lbl gateway mark def"), "CheckMarkAsDef();");
                actionMenu.AddBreak();
                actionMenu.AddLinkItem(imageIconsPath + "contentEdit.png", this.GetMessage("lbl payment options edit"), this.m_sPageName + "?action=editoptions");
                this.AddMenu(actionMenu);

                this.SetTitleBarToMessage("lbl payment options");
                this.AddHelpButton("paymentgateway");
                break;

        }

        SetJs();
    }
Ejemplo n.º 14
0
    protected void Util_SetLabels()
    {
        switch (this.m_sPageAction)
        {
            case "addedit":
                AddBackButton(m_sPageName + (m_iID > 0 ? ("?action=view&id=" + this.m_iID.ToString()) : ""));
                this.AddButtonwithMessages(AppImgPath + "../UI/Icons/save.png", m_sPageName + "?action=addedit&id=" + m_iID.ToString(), "btn save", "btn save", " onclick=\" return SubmitForm();\" ", StyleHelper.SaveButtonCssClass, true);
                if (this.m_iID > 0)
                {
                    SetTitleBarToMessage("lbl edit region");
                    AddHelpButton("EditRegion");
                }
                else
                {
                    SetTitleBarToMessage("lbl add region");
                    AddHelpButton("AddRegion");
                }
                break;

            case "view":
                AddBackButton(m_sPageName);
                this.AddButtonwithMessages(AppImgPath + "../UI/Icons/contentEdit.png", m_sPageName + "?action=addedit&id=" + m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                if (m_refRegion.CanDelete(this.m_iID, out validateResult))
                {
                    this.AddButtonwithMessages(AppImgPath + "../UI/Icons/delete.png", m_sPageName + "?action=del&id=" + m_iID.ToString(), "generic delete title", "generic delete title", " onclick=\"return confirm(\'" + GetMessage("js confirm delete Region") + "\');\" ", StyleHelper.DeleteButtonCssClass);
                }
                SetTitleBarToMessage("lbl view region");
                AddHelpButton("ViewRegion");
                break;
            default:
                workareamenu newMenu = new workareamenu("file", GetMessage("lbl new"), AppImgPath + "../UI/Icons/star.png");
                newMenu.AddLinkItem(AppImgPath + "/menu/document.gif", GetMessage("lbl Region"), m_sPageName + "?action=addedit");
                this.AddMenu(newMenu);

                this.AddSearchBox(EkFunctions.HtmlEncode(searchCriteria), new ListItemCollection(), "searchRegion");
                SetTitleBarToMessage("lbl regions");
                AddHelpButton("region");
                break;
        }
        ltr_name.Text = GetMessage("generic name");
        ltr_id.Text = GetMessage("generic id");
        ltr_enabled.Text = GetMessage("enabled");
        ltr_code.Text = GetMessage("lbl code");
        ltr_country.Text = GetMessage("lbl address country");
        ltr_addanother.Text = GetMessage("lbl add another region");
    }
Ejemplo n.º 15
0
    protected void Util_SetLabels()
    {
        switch (m_sPageAction)
        {
            default:
                workareamenu actionMenu = new workareamenu("action", this.GetMessage("lbl action"), this.AppImgPath + "../UI/Icons/check.png");
                actionMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/save.png", this.GetMessage("btn save"), "document.forms[0].submit();");
                actionMenu.AddBreak();
                actionMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/back.png", this.GetMessage("generic cancel"), "window.location='../content.aspx?action=View&folder_id=" + folderId.ToString() + "&id=" + m_iID.ToString() + "';");
                this.AddMenu(actionMenu);

                SetTitleBarToString("Content fallback locales");
                AddHelpButton("ContentFallBackLocales");
                break;

        }

        lstLocales.Attributes.Add("style", "margin: 0pt; padding: 0pt; width: 100%;");
    }
Ejemplo n.º 16
0
    private void Util_SetLabels()
    {
        ltr_name.Text = GetMessage("generic name");
            ltr_numericisocode.Text = GetMessage("lbl numeric iso code");
            ltr_alphaisocode.Text = GetMessage("lbl alpha iso code");
            ltr_enabled.Text = GetMessage("enabled");
            ltr_exchangerate.Text = GetMessage("lbl exchange rate");

            lnk_gotopage.Text = "[" + GetMessage("lbl go to page") + "]";

            lnk_first.Text = "[" + GetMessage("lbl first page") + "]";
            lnk_previous.Text = "[" + GetMessage("lbl previous page") + "]";
            lnk_next.Text = "[" + GetMessage("lbl next page") + "]";
            lnk_last.Text = "[" + GetMessage("lbl last page") + "]";

            ltr_defaultcurrency.Text = m_refContentApi.RequestInformationRef.CommerceSettings.ISOCurrencySymbol;

            switch (m_sPageAction)
            {
                case "exchangerate":

                    tr_viewall.Visible = false;
                    tr_exchangerate.Visible = true;

                    SetTitleBarToMessage("lbl edit exchange rates");

                    AddButtonwithMessages(AppPath + "images/UI/Icons/back.png", System.Convert.ToString(PAGE_NAME + "?action=ViewAll"), "alt back button text", "btn back", " onclick=\"self.parent.ektb_remove();\" ", StyleHelper.BackButtonCssClass, true);
                    workareamenu actionMenu_1 = new workareamenu("action", GetMessage("lbl action"), AppPath + "images/UI/Icons/check.png");
                    actionMenu_1.AddItem(AppPath + "images/ui/icons/save.png", GetMessage("btn update"), "SubmitForm(true);");
                    AddMenu(actionMenu_1);

                    AddHelpButton("EditExchangeRates");
                    break;
                case "goto":
                    break;
                    // tr_goto.Visible = True
                case "add":
                    tr_addedit.Visible = true;

                    SetTitleBarToMessage("lbl add currency");
                    AddButtonwithMessages(AppPath + "images/UI/Icons/back.png", System.Convert.ToString(PAGE_NAME + "?action=viewall"), "alt back button text", "btn back", " onclick=\"self.parent.ektb_remove();\" ", StyleHelper.BackButtonCssClass, true);
                    AddButtonwithMessages(AppPath + "images/UI/Icons/save.png", "#", "lbl Add Email From Address", "btn save", "onclick=\"return SubmitForm( \'VerifyForm()\');\"", StyleHelper.SaveButtonCssClass, true);
                    AddHelpButton(m_sPageAction + "currency");
                    break;
                case "edit":
                    tr_addedit.Visible = true;

                    SetTitleBarToMessage("lbl edit currency");

                    AddButtonwithMessages(AppPath + "images/UI/Icons/back.png", "#", "alt back button text", "btn back", " onclick=\"javascript:self.parent.ektb_remove();\" ", StyleHelper.BackButtonCssClass, true);
                    AddButtonwithMessages(AppPath + "images/UI/Icons/save.png", "#", "lbl update email address", "btn update", "Onclick=\"javascript:return SubmitForm(\'VerifyForm()\');\"", StyleHelper.SaveButtonCssClass, true);
                    AddHelpButton(m_sPageAction + "currency");
                    break;
                default:
                    tr_viewall.Visible = true;

                    SetTitleBarToMessage("lbl currencies");

                    //Dim newMenu As New workareamenu("file", GetMessage("lbl new"), apppath & "images/UI/Icons/star.png")
                    //newMenu.AddItem(AppImgPath & "commerce/currency.gif", GetMessage("lbl currency"), "ektb_show('','" & PAGE_NAME & "?action=Add&thickbox=true&EkTB_iframe=true&height=300&width=500&modal=true', null);")
                    //AddMenu(newMenu)

                    workareamenu actionMenu = new workareamenu("action", GetMessage("lbl action"), AppPath + "images/UI/Icons/check.png");
                    actionMenu.AddItem(AppPath + "images/ui/icons/pencil.png", GetMessage("lbl edit exchange rates"), "ektb_show(\'\',\'" + PAGE_NAME + "?action=ExchangeRate&thickbox=true&EkTB_iframe=true&height=300&width=500&modal=true\', null);");
                    actionMenu.AddBreak();
                    actionMenu.AddItem(AppPath + "images/ui/icons/delete.png", GetMessage("lbl del sel"), "ConfirmDelete();");
                    AddMenu(actionMenu);
                    this.AddSearchBox(EkFunctions.HtmlEncode(searchCriteria), new ListItemCollection(), "searchCurrency");
                    AddHelpButton(m_sPageAction + "currency");
                    break;
            }
    }
Ejemplo n.º 17
0
    protected void Util_SetLabels()
    {
        switch (this.m_sPageAction)
        {
            case "addedit":
                AddBackButton(m_sPageName + (m_iID > 0 ? ("?action=view&id=" + this.m_iID.ToString()) : ""));
                this.AddButtonwithMessages(AppPath + "images/UI/Icons/save.png", m_sPageName + "?action=addedit&id=" + m_iID.ToString(), "btn save", "btn save", " onclick=\" return SubmitForm();\" ", StyleHelper.SaveButtonCssClass, true);
                if (this.m_iID > 0)
                {
                    SetTitleBarToMessage("lbl edit tax class");
                    AddHelpButton("Edittaxclass");
                }
                else
                {
                    SetTitleBarToMessage("lbl add tax class");
                    AddHelpButton("Addtaxclass");
                }
                break;
            case "view":
                AddBackButton(m_sPageName);
                this.AddButtonwithMessages(AppPath + "images/UI/Icons/contentEdit.png", m_sPageName + "?action=addedit&id=" + m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                if (!m_refTaxClass.IsUsed(m_iID) && m_iID != 5)
                {
                    this.AddButtonwithMessages(AppPath + "images/UI/Icons/delete.png", m_sPageName + "?action=del&id=" + m_iID.ToString(), "generic delete title", "generic delete title", " onclick=\"return confirm(\'" + GetMessage("js confirm delete tax class") + "\');\" ", StyleHelper.DeleteButtonCssClass);
                }
                SetTitleBarToMessage("lbl view tax class");
                AddHelpButton("Viewtaxclass");
                break;
            default:
                workareamenu newMenu = new workareamenu("file", GetMessage("lbl new"), AppPath + "images/UI/Icons/star.png");
                newMenu.AddLinkItem(AppImgPath + "/menu/document.gif", GetMessage("lbl tax class"), m_sPageName + "?action=addedit");
                this.AddMenu(newMenu);
                SetTitleBarToMessage("lbl tax classes");
                AddHelpButton("taxclass");
                break;
        }

        ltr_name.Text = GetMessage("generic name");
        ltr_id.Text = GetMessage("generic id");
    }
Ejemplo n.º 18
0
 /// <summary>
 /// Setting up the Labels in the Tool bar
 /// </summary>
 protected void SetLabels()
 {
     switch(this.m_sPageAction)
     {
         case"view":
             if (this.m_iID > 0)
             {
                 this.ltr_name_lbl.Text = this.GetMessage("event title");
                 this.ltr_reorderlevel_lbl.Text = this.GetMessage("lbl reorder");
                 this.ltr_unitsinorder_lbl.Text = this.GetMessage("lbl on order");
                 this.ltr_unitsinstock_lbl.Text = this.GetMessage("lbl in stock");
                 this.ltr_disabled_lbl.Text = this.GetMessage("lbl disable inventory");
                 AddBackButton("inventory.aspx");
                 AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/contentEdit.png", "inventory.aspx?action=updateedit&id=" + m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                 SetTitleBarToMessage("lbl view inventory");
             }
             break;
         case "updateedit":
             if (this.m_iID > 0)
             {
                 this.ltr_name_lbl.Text = this.GetMessage("event title");
                 this.ltr_reorderlevel_lbl.Text = this.GetMessage("lbl reorder");
                 this.ltr_unitsinorder_lbl.Text = this.GetMessage("lbl on order");
                 this.ltr_unitsinstock_lbl.Text = this.GetMessage("lbl in stock");
                 this.ltr_disabled_lbl.Text = this.GetMessage("lbl disable inventory");
                 if (Page.IsPostBack)
                 {
                     if (Request.Form[isCPostData.UniqueID] == "")
                     {
                         AddBackButton("inventory.aspx");
                         AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/contentEdit.png", "inventory.aspx?action=updateedit&id=" + m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                         SetTitleBarToMessage("lbl view inventory");
                     }
                 }
                 else
                 {
                     AddBackButton("inventory.aspx" + (m_iID > 0 ? ("?action=view&id=" + this.m_iID.ToString()) : ""));
                     AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "btn update", "btn update", " onclick=\"CheckInventory(); return false;\" ", StyleHelper.EditButtonCssClass, true);
                     SetTitleBarToMessage("lbl edit inventory");
                 }
             }
             break;
         default:
             workareamenu newMenu = new workareamenu("file", this.GetMessage("lbl order reporting"), this.AppImgPath + "commerce/catalog_view.gif");
             newMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/brick.png", this.GetMessage("lbl report product orders"), "window.location.href=\'inventory.aspx?action=byproduct\';");
             newMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/box.png", this.GetMessage("lbl report Kit"), "window.location.href=\'inventory.aspx?action=bykit\';");
             newMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/package.png", this.GetMessage("lbl report Bundle"), "window.location.href=\'inventory.aspx?action=bybundle\';");
             newMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/bricks.png", this.GetMessage("lbl report Complex Product"), "window.location.href=\'inventory.aspx?action=bycomplexproduct\';");
             newMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/bookGreen.png", this.GetMessage("lbl report Subscription Product"), "window.location.href=\'inventory.aspx?action=bysubscriptionproduct\';");
             newMenu.AddItem(m_refContentApi.AppPath + "images/ui/icons/brick.png", this.GetMessage("generic By All"), "window.location.href=\'inventory.aspx?action=byall\'");
             this.AddMenu(newMenu);
             this.SetTitleBarToMessage("lbl inventory");
             break;
     }
     this.AddHelpButton("inventory");
 }
Ejemplo n.º 19
0
    protected void Util_SetLabels()
    {
        switch (this.m_sPageAction)
        {
            case "addedit":
                AddBackButton(_PageName + (m_iID > 0 ? ("?action=view&id=" + this.m_iID.ToString() + "&postalid=" + txt_name.Text) : ""));
                this.AddButtonwithMessages(AppPath + "images/UI/Icons/save.png", _PageName + "?action=addedit&id=" + m_iID.ToString(), "btn save", "btn save", " onclick=\"TaxSubmitForm(); return SubmitForm();\" ", StyleHelper.SaveButtonCssClass, true);
                if (this.m_iID > 0)
                {
                    SetTitleBarToMessage("lbl edit postal tax rate");
                    AddHelpButton("EditPostalCodeTaxRate");
                }
                else
                {
                    SetTitleBarToMessage("lbl add postal tax rate");
                    AddHelpButton("AddPostalCodeTaxRate");
                }
                break;
            case "view":
                AddBackButton(_PageName);
                this.AddButtonwithMessages(AppPath + "images/UI/Icons/contentEdit.png", _PageName + "?action=addedit&id=" + m_iID.ToString() + "&postalid=" + txt_name.Text, "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                this.AddButtonwithMessages(AppPath + "images/UI/Icons/delete.png", _PageName + "?action=del&id=" + m_iID.ToString() + "&postalid=" + txt_name.Text, "generic delete title", "generic delete title", " onclick=\"return confirm(\'" + GetMessage("js confirm delete postal") + "\');\" ", StyleHelper.DeleteButtonCssClass);
                SetTitleBarToMessage("lbl view postal tax rate");
                AddHelpButton("ViewPostalCodeTaxRate");
                break;
            default:
                workareamenu newMenu = new workareamenu("file", GetMessage("lbl new"), AppPath + "images/UI/Icons/star.png");
                newMenu.AddLinkItem(AppImgPath + "menu/document.gif", GetMessage("lbl postal"), _PageName + "?action=addedit");
                this.AddMenu(newMenu);
                SetTitleBarToMessage("lbl postal tax table");
                AddHelpButton("PostalCodeTaxRate");
                break;
        }

        ltr_name.Text = GetMessage("lbl address postal");
        ltr_id.Text = GetMessage("generic id");
        ltr_region.Text = GetMessage("lbl address region");
        ltr_country.Text = GetMessage("lbl country");
    }
Ejemplo n.º 20
0
    protected void Util_SetLabels()
    {
        char[] endColon = new char[] {':'};

            litTitleLabel.Text = GetMessage("generic title") + ":";
            litIdLabel.Text = GetMessage("generic id").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            litDescriptionLabel.Text = GetMessage("generic description").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            litTypeLabel.Text = GetMessage("lbl product type class") + ":";
            litDisplayLabel.Text = GetMessage("display info label").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            litDisplayXsltPathMessage.Text = GetMessage("files prefixed with msg") + " " + m_refContentApi.XmlPath;
            ltr_deflabel.Text = GetMessage("default label").TrimEnd(endColon.ToString().ToCharArray());
            litXslt1Label.Text = GetMessage("xslt 1 label").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            litXslt2Label.Text = GetMessage("xslt 2 label").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            litXslt3Label.Text = GetMessage("xslt 3 label").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            litXsltDefaultLabel.Text = "XSLT 0:";
            ltr_def.Text = GetMessage("default label");
            ltr_attrtype.Text = GetMessage("type label");
            ltr_attrname.Text = GetMessage("generic name");
            ltr_name.Text = GetMessage("lbl name").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            ltr_width.Text = GetMessage("lbl width").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            ltr_height.Text = GetMessage("lbl height").TrimEnd(endColon.ToString().ToCharArray()) + ":";
            ltr_subprovider.Text = GetMessage("lbl commerce subscription provider");

            drp_attrtype.Items.Add(new ListItem(Util_AttrText(Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.ProductTypeAttributeDataType.String)), "text"));
            drp_attrtype.Items.Add(new ListItem(Util_AttrText(Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.ProductTypeAttributeDataType.Numeric)), "number"));
            drp_attrtype.Items.Add(new ListItem(Util_AttrText(Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.ProductTypeAttributeDataType.Boolean)), "boolean"));
            drp_attrtype.Attributes.Add("onchange", "ChangeOption(this);");
            if (_SelectedAttributeIndex > -1)
            {
                drp_attrtype.SelectedIndex = _SelectedAttributeIndex;
            }
            txt_xslt1.Attributes.Add("onkeyup", "MakeNoVerify(this);");
            txt_xslt1.Attributes.Add("onkeypress", "return CheckKeyValue(event,\'34\');");
            txt_xslt2.Attributes.Add("onkeyup", "MakeNoVerify(this);");
            txt_xslt2.Attributes.Add("onkeypress", "return CheckKeyValue(event,\'34\');");
            txt_xslt3.Attributes.Add("onkeyup", "MakeNoVerify(this);");
            txt_xslt3.Attributes.Add("onkeypress", "return CheckKeyValue(event,\'34\');");
            switch (this.m_sPageAction)
            {
                case "addthumbnail":
                    System.Text.StringBuilder result = new System.Text.StringBuilder();
                    this.SetTitleBarToMessage("lbl add thumbnail default");
                    ltr_addthumbnail.Text = GetMessage("lbl add thumbnail default");

                    result.Append("<table><tr>" + Environment.NewLine);
                    string buttonId = Guid.NewGuid().ToString();
                    result.Append("<td class=\"menuRootItem\" onclick=\"MenuUtil.use(event, \'action\', \'" + buttonId + "\');\" onmouseover=\"this.className=\'menuRootItemSelected\';MenuUtil.use(event, \'action\', \'" + buttonId + "\');\" onmouseout=\"this.className=\'menuRootItem\'\"><span id=\"" + buttonId + "\" class=\"action\">" + m_refMsg.GetMessage("lbl Action") + "</span></td>" + Environment.NewLine);
                    result.Append("</tr></table>" + Environment.NewLine);
                    result.Append("<script tyle=\"text/javascript\">" + Environment.NewLine);
                    result.Append("    var actionmenu = new Menu( \"action\" );" + Environment.NewLine);
                    result.Append("    actionmenu.addItem(\"&nbsp;<img height=\'16px\' width=\'16px\' src=\'" + m_refContentApi.AppPath + "images/UI/Icons/save.png" + " \' />&nbsp;&nbsp;" + m_refMsg.GetMessage("generic add title") + "\", function() { OnClick=validate();  } );" + Environment.NewLine);
                    result.Append("    actionmenu.addItem(\"&nbsp;<img height=\'16px\' width=\'16px\' src=\'" + m_refContentApi.AppPath + "images/UI/Icons/delete.png" + " \' />&nbsp;&nbsp;" + m_refMsg.GetMessage("generic cancel") + "\", function() { OnClick=Close();  } );" + Environment.NewLine);
                    result.Append("    MenuUtil.add( actionmenu );" + Environment.NewLine);
                    result.Append("</script>" + Environment.NewLine);
                    break;
                case "addattribute":
                    AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/back.png", "#", "alt back button text", "btn back", " onclick=\"self.parent.ektb_remove();\" ", StyleHelper.BackButtonCssClass, true);
                    AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "btn save", "btn save", "Onclick=\"SubmitAttrForm(); return false;\"", StyleHelper.SaveButtonCssClass, true);
                    AddHelpButton(m_sPageAction);
                    break;
                case "editattribute":
                    AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/back.png", "#", "alt back button text", "btn back", " onclick=\"self.parent.ektb_remove();\" ", StyleHelper.BackButtonCssClass, true);
                    AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "alt update product type", "btn update", "Onclick=\"SubmitAttrForm(); return false;\"", StyleHelper.SaveButtonCssClass, true);
                    AddHelpButton(m_sPageAction);
                    break;
                case "addproducttype":

                    SetTitleBarToMessage("btn add product type");

                    AddBackButton(_PageName);
                    AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "lbl Select to continue", "btn save", "Onclick=\"SubmitForm(); return false;\"", StyleHelper.SaveButtonCssClass, true);
                    AddHelpButton(m_sPageAction);
                    break;

                case "editproducttype":

                    SetTitleBarToMessage("lbl edit product type");

                    AddBackButton(_PageName + "?action=viewproducttype&id=" + m_iID.ToString());
                    AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "alt update product type", "btn update", "onclick=\"SubmitForm(); return false;\"", StyleHelper.SaveButtonCssClass, true);
                    AddHelpButton(m_sPageAction);
                    break;

                case "viewproducttype":

                    XmlConfigData product_type_data = null;
                    string pkDisplay = string.Empty;
                    string PackageXslt = string.Empty;

                    SetTitleBarToMessage("lbl view product type msg");

                    phTabDisplayInfo.Visible = true;

                    product_type_data = m_refContentApi.GetXmlConfiguration(m_iID);
                    if (product_type_data != null)
                    {
                        pkDisplay = product_type_data.PackageDisplayXslt;
                        PackageXslt = product_type_data.PackageXslt;
                    }
                    AddBackButton(_PageName);
                    AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/contentEdit.png", (string) ("producttypes.aspx" + "?action=editproducttype&id=" + m_iID), "alt edit button text (xml config)", "btn edit", "", StyleHelper.EditButtonCssClass, true);
                    if (! _IsUsed)
                    {
                        AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/delete.png", (string) ("producttypes.aspx" + "?action=deleteproducttype&id=" + m_iID), "generic delete title", "generic delete title", " onclick=\"return confirm(\'" + GetMessage("js confirm del product type") + "\');\" ", StyleHelper.DeleteButtonCssClass);
                    }

                    if (product_type_data != null)
                    {
                        if ((product_type_data.EditXslt.Length == 0) || pkDisplay.Length > 0)
                        {
                            AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/contentFormEdit.png", (string) ("../editdesign.aspx?action=EditPackage&type=product&id=" + m_iID), "alt Design mode Package", "btn data design", "", StyleHelper.EditContentFormButtonCssClass);
                        }
                    }

                    if (pkDisplay.Length > 0)
                    {
                        AddButtonwithMessages(m_refContentApi.AppPath + "Images/ui/icons/FileTypes/xsl.png", (string) ("../viewXslt.aspx?id=" + m_iID), "alt View the presentation Xslt", "btn view xslt", "", StyleHelper.ViewXslButtonCssClass);
                    }

                    AddHelpButton(m_sPageAction);
                    break;

                default:

                    SetTitleBarToMessage("lbl view product types");

                    workareamenu newMenu = new workareamenu("file", GetMessage("lbl new"), m_refContentApi.AppPath + "images/UI/Icons/star.png");
                    newMenu.AddLinkItem(AppImgPath + "commerce/producttype1.gif", GetMessage("lbl product type xml config"), _PageName + "?action=addproducttype");
                    AddMenu(newMenu);
                    AddHelpButton("viewproducttypes");

                    break;

            }
    }
Ejemplo n.º 21
0
    protected void Util_SetLabels()
    {
        ltr_name.Text = GetMessage("lbl cc type name");
        ltr_id.Text = GetMessage("lbl cc type id");
        ltr_accepted.Text = GetMessage("lbl cc type accepted");
        ltr_image.Text = GetMessage("lbl cc type image");
        ltr_regex.Text = GetMessage("lbl cc type regex");
        switch (base.m_sPageAction)
        {
            case "view":
                this.pnl_view.Visible = true;
                this.pnl_viewall.Visible = false;
                this.AddBackButton(this._PageName);
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/contentEdit.png", this._PageName + "?action=addedit&id=" + this.m_iID.ToString(), "generic edit title", "generic edit title", "", StyleHelper.EditButtonCssClass, true);
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/delete.png", this._PageName + "?action=del&id=" + this.m_iID.ToString(), "alt del cc type button text", "btn delete", " onclick=\"return CheckDelete();\" ", StyleHelper.DeleteButtonCssClass);
                this.SetTitleBarToMessage("lbl view cc type");
                this.AddHelpButton("ViewCreditCardType");
                break;
            case "addedit":
                // Me.ltr_cmd_img_prv.Text = "<img src=""" & AppImgPath & "btn_preview-nm.gif"" border=""0"" alt=""" & GetMessage("lbl cc type img review") & """ title=""" & GetMessage("lbl cc type img preview") & """ onclick="" PreviewImage(); return false;"" />"
                this.pnl_view.Visible = true;
                this.pnl_viewall.Visible = false;
                this.AddBackButton(this._PageName + (this.m_iID > 0 ? "?action=view&id=" + this.m_iID : ""));
                this.AddButtonwithMessages(this.AppImgPath + "../UI/Icons/save.png", "#", "lbl alt edit cc type", "btn save", " onclick=\"SubmitForm(); return false;\" ", StyleHelper.SaveButtonCssClass, true);
                this.SetTitleBarToString((string)(this.m_iID > 0 ? (this.GetMessage("lbl edit cc type")) : (this.GetMessage("lbl add cc type"))));
                this.AddHelpButton((string)(this.m_iID > 0 ? ("EditCreditCardType") : ("AddCreditCardType")));
                break;
            default: // "viewall"
                workareamenu newMenu = new workareamenu("file", this.GetMessage("lbl new"), this.AppImgPath + "../UI/Icons/star.png");
                newMenu.AddLinkItem(this.AppImgPath + "/menu/card.gif", this.GetMessage("lbl cc type"), this._PageName + "?action=addedit");
                this.AddMenu(newMenu);
                this.SetTitleBarToMessage("lbl cc types");
                this.AddHelpButton("cctype");
                break;
        }

        Util_SetJs();
    }