Merge branch 'master' of github.com:nodebb/NodeBB

v1.18.x
Julian Lam 10 years ago
commit 36cfbbbc58

@ -28,7 +28,7 @@ define('admin/manage/users', ['admin/modules/selectable'], function(selectable)
} }
function removeSelected() { function removeSelected() {
$('#users-container .users-box .selected').remove(); $('#users-container .users-box .selected').parents('.users-box').remove();
} }
function done(successMessage, className, flag) { function done(successMessage, className, flag) {

@ -64,7 +64,7 @@ module.exports = function(Plugins) {
if (err) { if (err) {
return callback(err); return callback(err);
} }
var type = installed ? 'uninstall' : 'install';
async.waterfall([ async.waterfall([
function(next) { function(next) {
Plugins.isActive(id, next); Plugins.isActive(id, next);
@ -82,10 +82,14 @@ module.exports = function(Plugins) {
npm.load({}, next); npm.load({}, next);
}, },
function(res, next) { function(res, next) {
npm.commands[installed ? 'uninstall' : 'install'](installed ? id : [id + '@' + (version || 'latest')], next); npm.commands[type](installed ? id : [id + '@' + (version || 'latest')], next);
} }
], function(err) { ], function(err) {
callback(err, {id: id, installed: !installed}); if (err) {
return callback(err);
}
plugins.fireHook('action:plugin.' + type, id);
callback(null, {id: id, installed: !installed});
}); });
}); });
} }

@ -3,29 +3,31 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Widget Areas</div> <div class="panel-heading">Widget Areas</div>
<div class="panel-body"> <div class="panel-body">
<div class="row">
<ul class="nav nav-pills">
<!-- BEGIN templates -->
<li class="<!-- IF @first -->active<!-- ENDIF @first -->"><a href="#" data-template="{templates.template}" data-toggle="pill">{templates.template}</a></li>
<!-- END templates -->
</ul>
<div class="tab-content col-xs-12"> <ul class="nav nav-pills">
<!-- BEGIN templates --> <!-- BEGIN templates -->
<div class="tab-pane <!-- IF @first -->active<!-- ENDIF @first -->" data-template="{templates.template}"> <li class="<!-- IF @first -->active<!-- ENDIF @first -->"><a href="#" data-template="{templates.template}" data-toggle="pill">{templates.template}</a></li>
<!-- BEGIN areas --> <!-- END templates -->
<div class="area" data-template="{templates.template}" data-location="{templates.areas.location}"> </ul>
<h4>{templates.areas.name} <small>{templates.template} / {templates.areas.location}</small></h4>
<div class="well widget-area"> <div class="row">
<div class="col-xs-12">
<div class="tab-content">
<!-- BEGIN templates -->
<div class="tab-pane <!-- IF @first -->active<!-- ENDIF @first -->" data-template="{templates.template}">
<!-- BEGIN areas -->
<div class="area" data-template="{templates.template}" data-location="{templates.areas.location}">
<h4>{templates.areas.name} <small>{templates.template} / {templates.areas.location}</small></h4>
<div class="well widget-area">
</div>
</div> </div>
<!-- END areas -->
</div> </div>
<!-- END areas --> <!-- END templates -->
</div> </div>
<!-- END templates --> <button class="btn btn-success save pull-right">Save</button>
</div> </div>
<button class="btn btn-success save pull-right">Save</button>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save