tweaks to make the ACP work better on tablets, some work on hidden groups

v1.18.x
Julian Lam 11 years ago
parent 670986f7ef
commit 69427fa10e

@ -24,7 +24,7 @@
<div class="col-sm-10"> <div class="col-sm-10">
<form class="form"> <form class="form">
<div class="row"> <div class="row">
<div class="col-sm-4 hidden-xs"> <div class="col-sm-4 col-xs-12">
<div class="form-group"> <div class="form-group">
<label for="cid-{categories.cid}-name">Category Name</label> <label for="cid-{categories.cid}-name">Category Name</label>
<input id="cid-{categories.cid}-name" type="text" class="form-control" placeholder="Category Name" data-name="name" value="{categories.name}" /> <input id="cid-{categories.cid}-name" type="text" class="form-control" placeholder="Category Name" data-name="name" value="{categories.name}" />
@ -38,7 +38,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-4 col-xs-12"> <div class="col-sm-4 hidden-xs">
<div class="form-group"> <div class="form-group">
<div class="form-group"> <div class="form-group">
<label for="cid-{categories.cid}-color">Text Colour</label> <label for="cid-{categories.cid}-color">Text Colour</label>
@ -48,7 +48,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-8"> <div class="col-md-8 col-sm-6">
<div class="form-group"> <div class="form-group">
<div class="form-group"> <div class="form-group">
<label for="cid-{categories.cid}-description">Description</label> <label for="cid-{categories.cid}-description">Description</label>
@ -56,7 +56,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-4"> <div class="col-md-4 col-sm-6">
<div class="form-group"> <div class="form-group">
<div class="form-group"> <div class="form-group">
<label>&nbsp;</label> <label>&nbsp;</label>

@ -91,7 +91,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-sm-3">
<div class="well sidebar-nav"> <div class="well sidebar-nav">
<ul class="nav nav-list"> <ul class="nav nav-list">
<li class="nav-header">NodeBB</li> <li class="nav-header">NodeBB</li>
@ -146,4 +146,4 @@
</div><!--/.well --> </div><!--/.well -->
</div><!--/span--> </div><!--/span-->
<div class="col-md-9" id="content"> <div class="col-sm-9" id="content">

@ -150,7 +150,8 @@
gid: gid, gid: gid,
name: name, name: name,
description: description, description: description,
deleted: '0' deleted: '0',
hidden: '0'
}) })
.exec(function (err) { .exec(function (err) {
Groups.get(gid, {}, callback); Groups.get(gid, {}, callback);
@ -162,6 +163,16 @@
}); });
}; };
Groups.hide = function(gid) {
Groups.exists(gid, function(err, exists) {
if (exists) {
Groups.update(gid, {
hidden: '1'
});
}
});
};
Groups.update = function(gid, values, callback) { Groups.update = function(gid, values, callback) {
RDB.exists('gid:' + gid, function (err, exists) { RDB.exists('gid:' + gid, function (err, exists) {
if (!err && exists) { if (!err && exists) {
@ -186,6 +197,7 @@
Groups.getGidFromName(groupName, function(err, gid) { Groups.getGidFromName(groupName, function(err, gid) {
if (err || !gid) { if (err || !gid) {
Groups.create(groupName, '', function(err, groupObj) { Groups.create(groupName, '', function(err, groupObj) {
Groups.hide(groupObj.gid);
Groups.join(groupObj.gid, uid, callback); Groups.join(groupObj.gid, uid, callback);
}); });
} else { } else {

Loading…
Cancel
Save