Inheritance: HtmlTags.HtmlTag
示例#1
0
        public TestEditorTag(FixtureLibrary library)
            : base("div")
        {
            AddClass("main");
            Add("h2").AddClass(HtmlClasses.TEST_NAME);
            Id("testEditor");

            AddClass(HtmlClasses.TEST_EDITOR);

            _container = Add("div").AddClasses("container", HtmlClasses.SECTION, "test-editor");

            FixtureGraph fixture = library.BuildTopLevelGraph();

            HtmlTag holder = new HolderTag(fixture).AddClass("top-level-holder");
            holder.Children.Last().Render(false);

            Container
                .MetaData(GrammarConstants.LEAF_NAME, GrammarConstants.TEST)
                .MetaData(GrammarConstants.FIXTURE, GrammarConstants.TEST)
                .MetaData(GrammarConstants.SELECTION_MODE, SelectionMode.OneOrMore.ToString())
                .Append(holder)
                .Append(new HtmlTag("hr"));

            Container.ActionLink(fixture.Policies.AddGrammarText, GrammarConstants.ADD_SECTION_ACTIVATOR);
            Container.Append(new GrammarSelector(fixture).Build());
        }
示例#2
0
        public TestEditorTag(FixtureLibrary library) : base("div")
        {
            AddClass("main");
            Add("h2").AddClass(HtmlClasses.TEST_NAME);
            Id("testEditor");

            AddClass(HtmlClasses.TEST_EDITOR);

            _container = Add("div").AddClasses("container", HtmlClasses.SECTION, "test-editor");

            FixtureGraph fixture = library.BuildTopLevelGraph();

            HtmlTag holder = new HolderTag(fixture).AddClass("top-level-holder");

            holder.Children.Last().Render(false);

            Container
            .MetaData(GrammarConstants.LEAF_NAME, GrammarConstants.TEST)
            .MetaData(GrammarConstants.FIXTURE, GrammarConstants.TEST)
            .MetaData(GrammarConstants.SELECTION_MODE, SelectionMode.OneOrMore.ToString())
            .Append(holder)
            .Append(new HtmlTag("hr"));


            Container.ActionLink(fixture.Policies.AddGrammarText, GrammarConstants.ADD_SECTION_ACTIVATOR);
            Container.Append(new GrammarSelector(fixture).Build());
        }