private CatalogItemUrlBuilder BaseBookmarkSortUrl(bool isSort)
        {
            string reportUrl = m_report.GetReportUrl(addParams: false);
            CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(reportUrl);

            if (isSort)
            {
                string value = m_serverParams["Command"];
                m_serverParams["Command"] = "Sort";
                catalogItemUrlBuilder.AppendCatalogParameters(m_serverParams);
                m_serverParams["Command"] = value;
            }
            else
            {
                catalogItemUrlBuilder.AppendCatalogParameters(m_serverParams);
            }
            catalogItemUrlBuilder.AppendRenderingParameters(m_rawDeviceInfo);
            return(catalogItemUrlBuilder);
        }
Esempio n. 2
0
        public void AddParameters(NameValueCollection urlParameters, UrlParameterType parameterType)
        {
            switch (parameterType)
            {
            case UrlParameterType.RenderingParameter:
                m_catalogItemUrlBuilder.AppendRenderingParameters(urlParameters);
                break;

            case UrlParameterType.ReportParameter:
                m_catalogItemUrlBuilder.AppendReportParameters(urlParameters);
                break;

            case UrlParameterType.ServerParameter:
                m_catalogItemUrlBuilder.AppendCatalogParameters(urlParameters);
                break;
            }
        }
        protected internal override void RenderToggleImage(RPLTextBoxProps textBoxProps)
        {
            bool toggleState = textBoxProps.ToggleState;
            RPLTextBoxPropsDef rPLTextBoxPropsDef = (RPLTextBoxPropsDef)textBoxProps.Definition;

            if (!textBoxProps.IsToggleParent)
            {
                return;
            }
            WriteStream(HTMLElements.m_openA);
            WriteStream(HTMLElements.m_tabIndex);
            WriteStream(++m_tabIndexNum);
            WriteStream(HTMLElements.m_quote);
            if (m_deviceInfo.HasActionScript)
            {
                WriteStream(HTMLElements.m_openStyle);
                WriteStream(HTMLElements.m_cursorHand);
                WriteStream(HTMLElements.m_semiColon);
                WriteStream(HTMLElements.m_quote);
                RenderOnClickActionScript("Toggle", textBoxProps.UniqueName);
                WriteStream(HTMLElements.m_closeBracket);
            }
            else
            {
                string reportUrl = m_report.GetReportUrl(addParams: false);
                CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(reportUrl);
                catalogItemUrlBuilder.AppendRenderingParameters(m_rawDeviceInfo);
                if (m_allPages)
                {
                    catalogItemUrlBuilder.AppendRenderingParameter("Section", "0");
                }
                else
                {
                    catalogItemUrlBuilder.AppendRenderingParameter("Section", m_pageNum.ToString(CultureInfo.InvariantCulture));
                }
                if (m_deviceInfo.HtmlPrefixId != null && m_deviceInfo.HtmlPrefixId.Length > 0)
                {
                    catalogItemUrlBuilder.AppendRenderingParameter("PrefixId", m_deviceInfo.HtmlPrefixId);
                }
                m_serverParams["ShowHideToggle"] = textBoxProps.UniqueName;
                catalogItemUrlBuilder.AppendCatalogParameters(m_serverParams);
                WriteStream(HTMLElements.m_hrefString + HttpUtility.HtmlAttributeEncode(ReplaceRoot(new Uri(catalogItemUrlBuilder.ToString()).AbsoluteUri)) + HTMLElements.m_closeQuoteString);
            }
            WriteStream(HTMLElements.m_img);
            if (m_browserIE)
            {
                WriteStream(HTMLElements.m_imgOnError);
            }
            WriteStream(HTMLElements.m_zeroBorder);
            WriteStream(HTMLElements.m_src);
            RenderInternalImageSrc();
            if (toggleState)
            {
                WriteStream(m_report.GetImageName("ToggleMinus.gif"));
            }
            else
            {
                WriteStream(m_report.GetImageName("TogglePlus.gif"));
            }
            WriteStream(HTMLElements.m_quote);
            WriteStream(HTMLElements.m_alt);
            if (toggleState)
            {
                WriteStream(RenderRes.ToggleStateCollapse);
            }
            else
            {
                WriteStream(RenderRes.ToggleStateExpand);
            }
            WriteStream(HTMLElements.m_closeTag);
            WriteStream(HTMLElements.m_closeA);
            if (!string.IsNullOrEmpty(textBoxProps.Value) || (rPLTextBoxPropsDef != null && !string.IsNullOrEmpty(rPLTextBoxPropsDef.Value)))
            {
                WriteStream(HTMLElements.m_nbsp);
            }
        }