Ejemplo n.º 1
0
        public void BeginModalSectionPanel(ModalSection section, TextWriter writer, string title = null)
        {
            switch (section)
            {
            case ModalSection.Header:
            {
                writer.Write(@"<div class=""modal-dialog""><div class=""modal-content"">");

                //var builder = new FluentTagBuilder("div", TagRenderMode.StartTag)
                //    .AddCssClass("modal-dialog")
                //    .StartTag("div", TagRenderMode.StartTag)
                //        .AddCssClass("modal-content")
                //    .EndTag();

                //writer.Write(builder.ToString());

                writer.Write(@"<div class=""modal-header"">");

                writer.Write(string.Format(
                                 @"<button type=""button"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">
    <span aria-hidden=""true"">&times;</span>
</button>
<h4 class=""modal-title"">{0}</h4>", title));
            }
            break;

            case ModalSection.Body: writer.Write(@"<div class=""modal-body"">"); break;

            case ModalSection.Footer: writer.Write(@"<div class=""modal-footer"">"); break;
            }
        }
Ejemplo n.º 2
0
 internal ModalSectionPanel(IKoreUIProvider provider, ModalSection section, TextWriter writer, string title = null)
 {
     this.provider   = provider;
     this.Section    = section;
     this.textWriter = writer;
     provider.ModalProvider.BeginModalSectionPanel(this.Section, this.textWriter, title);
 }
Ejemplo n.º 3
0
        internal ModalSectionPanel(ModalSection section, TextWriter writer, string title = null, bool hasCloseButton = true)
        {
            this.textWriter = writer;

            switch (section)
            {
            case ModalSection.Header:
                this.textWriter.Write(@"<div class=""modal-header"">");

                if (hasCloseButton)
                {
                    this.textWriter.Write(@"<button type=""button"" class=""close"" data-dismiss=""modal""><span aria-hidden=""true"">&times;</span><span class=""sr-only"">Close</span></button>");
                }

                if (!string.IsNullOrEmpty(title))
                {
                    this.textWriter.Write(string.Format(@"<h4 class=""modal-title"">{0}</h4>", title));
                }

                break;

            case ModalSection.Body:
                this.textWriter.Write(@"<div class=""modal-body"">");
                break;

            case ModalSection.Footer:
                this.textWriter.Write(@"<div class=""modal-footer"">");
                break;
            }
        }
Ejemplo n.º 4
0
 internal ModalSectionPanel(IExtensoUIProvider provider, ModalSection section, TextWriter writer, string title = null)
 {
     this.provider = provider;
     Section       = section;
     textWriter    = writer;
     provider.ModalProvider.BeginModalSectionPanel(Section, textWriter, title);
 }
        internal ModalSectionPanel(ModalSection section, TextWriter writer)
        {
            this.textWriter = writer;

            switch (section)
            {
                case ModalSection.Header: this.textWriter.Write(@"<div class=""modal-header"">"); break;
                case ModalSection.Body: this.textWriter.Write(@"<div class=""modal-body"">"); break;
                case ModalSection.Footer: this.textWriter.Write(@"<div class=""modal-footer"">"); break;
            }
        }
Ejemplo n.º 6
0
 public void EndModalSectionPanel(ModalSection section, TextWriter writer)
 {
     if (section == ModalSection.Footer)
     {
         writer.Write("</div></div></div>");
     }
     else
     {
         writer.Write("</div>");
     }
 }
 public void EndModalSectionPanel(ModalSection section, TextWriter writer)
 {
     //if (section == ModalSection.Footer)
     //{
     //    writer.Write("</div></div></div>");
     //}
     //else
     //{
     //    writer.Write("</div>");
     //}
     writer.Write("</div>");
 }
Ejemplo n.º 8
0
        internal ModalSectionPanel(ModalSection section, TextWriter writer)
        {
            this.textWriter = writer;

            switch (section)
            {
            case ModalSection.Header: this.textWriter.Write(@"<div class=""modal-header"">"); break;

            case ModalSection.Body: this.textWriter.Write(@"<div class=""modal-body"">"); break;

            case ModalSection.Footer: this.textWriter.Write(@"<div class=""modal-footer"">"); break;
            }
        }
        internal ModalSectionPanel(ModalSection section, TextWriter writer, bool isCloseable)
        {
            this.textWriter = writer;

            switch (section)
            {
                case ModalSection.Header:
                    this.textWriter.Write(@"<div class=""modal-header"">");
                    if (isCloseable) this.textWriter.Write(@"<button type=""button"" class=""close"" data-dismiss=""modal"" aria-hidden=""true"">&times;</button>");
                    break;
                case ModalSection.Body: this.textWriter.Write(@"<div class=""modal-body"">"); break;
                case ModalSection.Footer: this.textWriter.Write(@"<div class=""modal-footer"">"); break;
            }
        }
Ejemplo n.º 10
0
        public void BeginModalSectionPanel(ModalSection section, TextWriter writer, string title = null)
        {
            switch (section)
            {
            case ModalSection.Header:
            {
                this.title = title;
                writer.Write(@"<div class=""modal-header"">");
            }
            break;

            case ModalSection.Body: writer.Write(@"<div class=""modal-body"">"); break;

            case ModalSection.Footer: writer.Write(@"<div class=""modal-footer"">"); break;
            }
        }
Ejemplo n.º 11
0
        internal ModalSectionPanel(ModalSection section, TextWriter writer, bool isCloseable)
        {
            this.textWriter = writer;

            switch (section)
            {
            case ModalSection.Header:
                this.textWriter.Write(@"<div class=""modal-header"">");
                if (isCloseable)
                {
                    this.textWriter.Write(@"<button type=""button"" class=""close"" data-dismiss=""modal"" aria-hidden=""true"">&times;</button>");
                }
                break;

            case ModalSection.Body: this.textWriter.Write(@"<div class=""modal-body"">"); break;

            case ModalSection.Footer: this.textWriter.Write(@"<div class=""modal-footer"">"); break;
            }
        }
Ejemplo n.º 12
0
        public void BeginModalSectionPanel(ModalSection section, TextWriter writer, string title = null)
        {
            if (!string.IsNullOrEmpty(title))
            {
                uiProvider.Scripts.Add($"$('#{modalId}').attr('title', '{title}')");
            }

            switch (section)
            {
            case ModalSection.Header:
            {
                writer.Write(@"<div class=""modal-header"">");
            }
            break;

            case ModalSection.Body: writer.Write(@"<div class=""modal-body"">"); break;

            case ModalSection.Footer: writer.Write(@"<div class=""modal-footer"">"); break;
            }
        }
Ejemplo n.º 13
0
        public void BeginModalSectionPanel(ModalSection section, TextWriter writer, string title = null)
        {
            switch (section)
            {
            case ModalSection.Header:
            {
                writer.Write(@"<div class=""modal-header"">");

                writer.Write(
                    $@"<button type=""button"" class=""close-button"" data-close aria-label=""Close"">
    <span aria-hidden=""true"">&times;</span>
</button>
<h1 class=""modal-title"">{title}</h1>");
            }
            break;

            case ModalSection.Body: writer.Write(@"<div class=""modal-body"">"); break;

            case ModalSection.Footer: writer.Write(@"<div class=""modal-footer"">"); break;
            }
        }
Ejemplo n.º 14
0
 public void EndModalSectionPanel(ModalSection section, TextWriter writer)
 {
     writer.Write("</div>");
 }
Ejemplo n.º 15
0
 internal ModalSectionPanel(ModalSection section, TextWriter writer, string title = null)
 {
     this.Section    = section;
     this.textWriter = writer;
     KoreUISettings.Provider.ModalProvider.BeginModalSectionPanel(this.Section, this.textWriter, title);
 }