style/guide: add js to get rid of styles

This commit is contained in:
Thomas Gelf 2015-11-06 01:52:04 +01:00
parent a2667dd551
commit d7a9a55ad6
2 changed files with 30 additions and 1 deletions

View File

@ -2,7 +2,7 @@
<?= $this->tabs ?>
</div>
<div class="content">
<div class="content styleguide">
<h1>Header h1</h1>
<h2>Header h2</h2>
<h3>Header h3</h3>

View File

@ -0,0 +1,29 @@
(function(Icinga) {
var Doc = function(module) {
this.module = module;
this.initialize();
this.module.icinga.logger.debug('Doc module loaded');
};
Doc.prototype = {
initialize: function()
{
this.module.on('rendered', this.rendered);
this.module.icinga.logger.debug('Doc module initialized');
},
rendered: function(event) {
var $container = $(event.currentTarget);
if ($('> .content.styleguide', $container).length) {
$container.removeClass('module-doc');
}
}
};
Icinga.availableModules.doc = Doc;
}(Icinga));