mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
added note linking to wiki page for authoring plugins... also showing something if no plugins are installed
This commit is contained in:
@@ -4,8 +4,10 @@ var nodebb_admin = nodebb_admin || {};
|
||||
var plugins = {
|
||||
init: function() {
|
||||
var pluginsList = $('.plugins'),
|
||||
numPlugins = pluginsList[0].querySelectorAll('li').length,
|
||||
pluginID, pluginTgl;
|
||||
|
||||
if (numPlugins > 0) {
|
||||
pluginsList.on('click', 'button[data-action="toggleActive"]', function() {
|
||||
pluginID = $(this).parents('li').attr('data-plugin-id');
|
||||
socket.emit('api:admin.plugins.toggle', pluginID);
|
||||
@@ -23,6 +25,9 @@ var nodebb_admin = nodebb_admin || {};
|
||||
timeout: 5000
|
||||
})
|
||||
});
|
||||
} else {
|
||||
pluginsList.append('<li><p><i>No plugins found.</i></p></li>');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -13,4 +13,13 @@
|
||||
<!-- END plugins -->
|
||||
</ul>
|
||||
|
||||
<div class="alert">
|
||||
<p>
|
||||
<strong>Interesed in writing plugins for NodeBB?</strong>
|
||||
</p>
|
||||
<p>
|
||||
Full documentation regarding plugin authoring can be found in the <a target="_blank" href="https://github.com/designcreateplay/NodeBB/wiki/Writing-Plugins-for-NodeBB">NodeBB Wiki</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="{relative_path}/src/forum/admin/plugins.js"></script>
|
||||
@@ -189,7 +189,6 @@ var fs = require('fs'),
|
||||
next();
|
||||
});
|
||||
}, function(err) {
|
||||
console.log(plugins);
|
||||
next(null, plugins);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user