Skip to content

Commit

Permalink
style/guide: add js to get rid of styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gelf committed Nov 6, 2015
1 parent a2667dd commit d7a9a55
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/doc/application/views/scripts/style/guide.phtml
Expand Up @@ -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>
Expand Down
29 changes: 29 additions & 0 deletions modules/doc/public/js/module.js
@@ -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));

0 comments on commit d7a9a55

Please sign in to comment.