Loading lib/jsduck/renderer.rb +2 −2 Original line number Diff line number Diff line Loading @@ -136,9 +136,9 @@ module JsDuck statics = @cls[:statics][sec[:type]] if members.length > 0 || statics.length > 0 [ "<div id='m-#{sec[:type]}'>", "<div class='members-section'>", statics.length == 0 ? "<div class='definedBy'>Defined By</div>" : "", "<h3 class='members-title'>#{sec[:title]}</h3>", "<h3 class='members-title icon-#{sec[:type]}'>#{sec[:title]}</h3>", render_subsection(members, statics.length > 0 ? "Instance #{sec[:title]}" : nil), render_subsection(statics, "Static #{sec[:title]}"), "</div>", Loading template/app/view/Comments.js +4 −4 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ Ext.define('Docs.view.Comments', { ); this.classCommentsTpl = Ext.create('Ext.XTemplate', '<div id="m-comment">', '<h3 class="members-title">Comments</h3>', '<div class="comments-section">', '<h3 class="members-title icon-comment">Comments</h3>', commentsMeta.join(''), '</div>' ); Loading Loading @@ -307,7 +307,7 @@ Ext.define('Docs.view.Comments', { Ext.getCmp('classCommentToolbarBtn').update(clsMeta['']); // Update class level comments meta this.numCommentsTpl.overwrite(Ext.get(Ext.query('#m-comment a.name')[0]), { this.numCommentsTpl.overwrite(Ext.get(Ext.query('.comments-section a.name')[0]), { num: clsMeta[''] }); } else { Loading @@ -315,7 +315,7 @@ Ext.define('Docs.view.Comments', { Ext.getCmp('classCommentToolbarBtn').update('0'); // Update class level comments meta this.numCommentsTpl.overwrite(Ext.get(Ext.query('#m-comment a.name')[0]), { this.numCommentsTpl.overwrite(Ext.get(Ext.query('.comments-section a.name')[0]), { num: 0 }); } Loading template/app/view/cls/Overview.js +4 −7 Original line number Diff line number Diff line Loading @@ -126,16 +126,13 @@ Ext.define('Docs.view.cls.Overview', { Ext.get(m).removeCls('first-child'); }); Ext.Array.forEach(['cfg', 'property', 'method', 'event', 'css_var', 'css_mixin'], function(type) { var sectionId = '#m-' + type; Ext.Array.forEach(Ext.query('.members-section'), function(section) { // Hide the section completely if all items in it are hidden var visibleEls = this.getVisibleElements(sectionId + " .member"); var section = Ext.query(sectionId)[0]; section && Ext.get(section).setStyle({display: visibleEls.length > 0 ? 'block' : 'none'}); var visibleEls = this.getVisibleElements(".member", section); Ext.get(section).setStyle({display: visibleEls.length > 0 ? 'block' : 'none'}); // Hide subsections completely if all items in them are hidden Ext.Array.forEach(Ext.query(sectionId+" .subsection"), function(subsection) { Ext.Array.forEach(Ext.query(".subsection", section), function(subsection) { var visibleEls = this.getVisibleElements(".member", subsection); if (visibleEls.length > 0) { // add first-child class to first member in subsection Loading template/resources/sass/_class_overview.scss +10 −21 Original line number Diff line number Diff line Loading @@ -83,29 +83,18 @@ padding-top: 0; } h3.pa { padding: 10px 0 5px 0; } .members-section, .comments-section { margin-bottom: 40px; } h3.members-title { margin: 20px 0 5px 0; padding: 0 0 0 30px; padding: 0 0 0 25px; font-size: 1.3em; font-weight: bold; } #m-cfg, #m-property, #m-method, #m-event, #m-comment { margin-bottom: 40px; } #m-cfg .members-title { background: url(../images/configs.png) no-repeat 0 -1px; } #m-property .members-title { background: url(../images/properties.png) no-repeat 0 4px; } #m-method .members-title { background: url(../images/methods.png) no-repeat 0 2px; } #m-event .members-title { background: url(../images/events.png) no-repeat 0 -2px; } #m-comment .members-title { @include icons; .icon-comment { background: url(../images/icons.png) no-repeat 1px -490px; } h4.members-subtitle { padding-left: 30px; padding-left: 25px; margin: 10px 0 7px 0; } ul ul { list-style: circle; Loading template/resources/sass/_comments.scss +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ font-weight: bold; cursor: pointer; } #m-comment { .comments-section { .comments { @include member-expander; } } #commentindex { Loading Loading
lib/jsduck/renderer.rb +2 −2 Original line number Diff line number Diff line Loading @@ -136,9 +136,9 @@ module JsDuck statics = @cls[:statics][sec[:type]] if members.length > 0 || statics.length > 0 [ "<div id='m-#{sec[:type]}'>", "<div class='members-section'>", statics.length == 0 ? "<div class='definedBy'>Defined By</div>" : "", "<h3 class='members-title'>#{sec[:title]}</h3>", "<h3 class='members-title icon-#{sec[:type]}'>#{sec[:title]}</h3>", render_subsection(members, statics.length > 0 ? "Instance #{sec[:title]}" : nil), render_subsection(statics, "Static #{sec[:title]}"), "</div>", Loading
template/app/view/Comments.js +4 −4 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ Ext.define('Docs.view.Comments', { ); this.classCommentsTpl = Ext.create('Ext.XTemplate', '<div id="m-comment">', '<h3 class="members-title">Comments</h3>', '<div class="comments-section">', '<h3 class="members-title icon-comment">Comments</h3>', commentsMeta.join(''), '</div>' ); Loading Loading @@ -307,7 +307,7 @@ Ext.define('Docs.view.Comments', { Ext.getCmp('classCommentToolbarBtn').update(clsMeta['']); // Update class level comments meta this.numCommentsTpl.overwrite(Ext.get(Ext.query('#m-comment a.name')[0]), { this.numCommentsTpl.overwrite(Ext.get(Ext.query('.comments-section a.name')[0]), { num: clsMeta[''] }); } else { Loading @@ -315,7 +315,7 @@ Ext.define('Docs.view.Comments', { Ext.getCmp('classCommentToolbarBtn').update('0'); // Update class level comments meta this.numCommentsTpl.overwrite(Ext.get(Ext.query('#m-comment a.name')[0]), { this.numCommentsTpl.overwrite(Ext.get(Ext.query('.comments-section a.name')[0]), { num: 0 }); } Loading
template/app/view/cls/Overview.js +4 −7 Original line number Diff line number Diff line Loading @@ -126,16 +126,13 @@ Ext.define('Docs.view.cls.Overview', { Ext.get(m).removeCls('first-child'); }); Ext.Array.forEach(['cfg', 'property', 'method', 'event', 'css_var', 'css_mixin'], function(type) { var sectionId = '#m-' + type; Ext.Array.forEach(Ext.query('.members-section'), function(section) { // Hide the section completely if all items in it are hidden var visibleEls = this.getVisibleElements(sectionId + " .member"); var section = Ext.query(sectionId)[0]; section && Ext.get(section).setStyle({display: visibleEls.length > 0 ? 'block' : 'none'}); var visibleEls = this.getVisibleElements(".member", section); Ext.get(section).setStyle({display: visibleEls.length > 0 ? 'block' : 'none'}); // Hide subsections completely if all items in them are hidden Ext.Array.forEach(Ext.query(sectionId+" .subsection"), function(subsection) { Ext.Array.forEach(Ext.query(".subsection", section), function(subsection) { var visibleEls = this.getVisibleElements(".member", subsection); if (visibleEls.length > 0) { // add first-child class to first member in subsection Loading
template/resources/sass/_class_overview.scss +10 −21 Original line number Diff line number Diff line Loading @@ -83,29 +83,18 @@ padding-top: 0; } h3.pa { padding: 10px 0 5px 0; } .members-section, .comments-section { margin-bottom: 40px; } h3.members-title { margin: 20px 0 5px 0; padding: 0 0 0 30px; padding: 0 0 0 25px; font-size: 1.3em; font-weight: bold; } #m-cfg, #m-property, #m-method, #m-event, #m-comment { margin-bottom: 40px; } #m-cfg .members-title { background: url(../images/configs.png) no-repeat 0 -1px; } #m-property .members-title { background: url(../images/properties.png) no-repeat 0 4px; } #m-method .members-title { background: url(../images/methods.png) no-repeat 0 2px; } #m-event .members-title { background: url(../images/events.png) no-repeat 0 -2px; } #m-comment .members-title { @include icons; .icon-comment { background: url(../images/icons.png) no-repeat 1px -490px; } h4.members-subtitle { padding-left: 30px; padding-left: 25px; margin: 10px 0 7px 0; } ul ul { list-style: circle; Loading
template/resources/sass/_comments.scss +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ font-weight: bold; cursor: pointer; } #m-comment { .comments-section { .comments { @include member-expander; } } #commentindex { Loading