More skeleton

This commit is contained in:
Ian Gulliver
2017-06-12 20:23:51 +00:00
parent c55664813f
commit c9a6ec4d39
2 changed files with 50 additions and 9 deletions

View File

@@ -6,16 +6,37 @@ class TagSlice {
this.loadJson_();
}
createElement_(container, tagName, text) {
let elem = document.createElement(tagName);
container.appendChild(elem);
if (text) {
elem.innerText = text;
}
return elem;
}
buildDom_(container) {
let outer = document.createElement('outer');
container.appendChild(outer);
let outer = this.createElement_(container, 'outer');
this.buildTagList_(outer);
this.buildObjectList_(outer);
}
let taglist = document.createElement('taglist');
outer.appendChild(taglist);
taglist.innerText = 'tag!';
buildTagList_(container) {
let taglist = this.createElement_(container, 'taglist');
this.tagInclude_ = this.buildTagSection_(taglist, 'Include');
this.tagExclude_ = this.buildTagSection_(taglist, 'Exclude');
this.tagSortAsc_ = this.buildTagSection_(taglist, 'Sort (ascending)')
this.tagSortDesc_ = this.buildTagSection_(taglist, 'Sort (descending)')
}
buildTagSection_(container, title) {
let tagsection = this.createElement_(container, 'tagsection');
let tagsectiontitle = this.createElement_(tagsection, 'tagsectiontitle', title);
}
buildObjectList_(container) {
let objectlist = document.createElement('objectlist');
outer.appendChild(objectlist);
container.appendChild(objectlist);
}
loadJson_() {