Adjust permission order to more clarly

This commit is contained in:
蒼時弦也 2017-01-10 14:13:30 +08:00
parent be7696170f
commit 7b02c48d93
3 changed files with 10 additions and 10 deletions

View File

@ -23,7 +23,7 @@ var logger = require("../logger.js");
var ot = require("../ot/index.js");
// permission types
var permissionTypes = ["freely", "editable", "locked", "private", "limited", "protected"];
var permissionTypes = ["freely", "editable", "limited", "private", "protected", "locked"];
module.exports = function (sequelize, DataTypes) {
var Note = sequelize.define("Note", {

View File

@ -2287,22 +2287,22 @@ function updatePermission(newPermission) {
label = '<i class="fa fa-shield"></i> Editable';
title = "Signed people can edit";
break;
case "locked":
label = '<i class="fa fa-lock"></i> Locked';
title = "Only owner can edit";
case "limited":
label = '<i class="fa fa-shield"></i> Limited';
title = "Signed people can view & edit"
break;
case "private":
label = '<i class="fa fa-hand-stop-o"></i> Private';
title = "Only owner can view & edit";
break;
case "limited":
label = '<i class="fa fa-hand-shield"></i> Limited';
title = "Signed people can view and edit"
break;
case "protected":
label = '<i class="fa fa-hand-stop-o"></i> Protected';
title = "Signed people can view";
break;
case "locked":
label = '<i class="fa fa-lock"></i> Locked';
title = "Only owner can edit";
break;
}
if (personalInfo.userid && owner && personalInfo.userid == owner) {
label += ' <i class="fa fa-caret-down"></i>';

View File

@ -17,10 +17,10 @@
<ul class="dropdown-menu" aria-labelledby="permissionLabel">
<li class="ui-permission-freely"<% if(!allowAnonymous) { %> style="display: none;"<% } %>><a><i class="fa fa-leaf fa-fw"></i> Freely - Anyone can edit</a></li>
<li class="ui-permission-editable"><a><i class="fa fa-shield fa-fw"></i> Editable - Signed people can edit</a></li>
<li class="ui-permission-locked"><a><i class="fa fa-lock fa-fw"></i> Locked - Only owner can edit</a></li>
<li class="ui-permission-private"><a><i class="fa fa-hand-stop-o fa-fw"></i> Private - Only owner can view &amp; edit</a></li>
<li class="ui-permission-limited"><a><i class="fa fa-shield fa-fw"></i> Limited - Signed people can edit &amp; view</a></li>
<li class="ui-permission-private"><a><i class="fa fa-hand-stop-o fa-fw"></i> Private - Only owner can view &amp; edit</a></li>
<li class="ui-permission-protected"><a><i class="fa fa-hand-stop-o fa-fw"></i> Protected - Only owner can edit</a></li>
<li class="ui-permission-locked"><a><i class="fa fa-lock fa-fw"></i> Locked - Only owner can edit</a></li>
<li class="divider"></li>
<li class="ui-delete-note"><a><i class="fa fa-trash-o fa-fw"></i> Delete this note</a></li>
</ul>