added note linking to wiki page for authoring plugins... also showing something if no plugins are installed

v1.18.x
Julian Lam 12 years ago
parent 3578ce1925
commit 1bee527f41

@ -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);
});
}

Loading…
Cancel
Save