summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2017-01-12 19:04:17 +0800
committerWu Cheng-Han2017-01-12 19:04:17 +0800
commit5f65795e79561f7b787767b7c184f66b65f74c5f (patch)
tree3698105ac23b29c222382d9b73f265f4367baa93
parent7e191acbde048b4ce274d1dbe49fb63a627a3def (diff)
Fix permission order and keep wording consistency
-rw-r--r--lib/models/note.js2
-rw-r--r--public/js/index.js12
-rw-r--r--public/views/body.ejs6
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/models/note.js b/lib/models/note.js
index a6921267..86112973 100644
--- a/lib/models/note.js
+++ b/lib/models/note.js
@@ -23,7 +23,7 @@ var logger = require("../logger.js");
var ot = require("../ot/index.js");
// permission types
-var permissionTypes = ["freely", "editable", "limited", "private", "protected", "locked"];
+var permissionTypes = ["freely", "editable", "limited", "locked", "protected", "private"];
module.exports = function (sequelize, DataTypes) {
var Note = sequelize.define("Note", {
diff --git a/public/js/index.js b/public/js/index.js
index 7effcbd7..1dfb02e1 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -2291,17 +2291,17 @@ function updatePermission(newPermission) {
label = '<i class="fa fa-id-card"></i> Limited';
title = "Signed people can edit & guest can't view"
break;
- case "private":
- label = '<i class="fa fa-hand-stop-o"></i> Private';
- title = "Only owner can view & edit";
+ case "locked":
+ label = '<i class="fa fa-lock"></i> Locked';
+ title = "Only owner can edit";
break;
case "protected":
label = '<i class="fa fa-umbrella"></i> Protected';
title = "Only owner can edit & guest can't view";
break;
- case "locked":
- label = '<i class="fa fa-lock"></i> Locked';
- title = "Only owner can edit";
+ case "private":
+ label = '<i class="fa fa-hand-stop-o"></i> Private';
+ title = "Only owner can view & edit";
break;
}
if (personalInfo.userid && owner && personalInfo.userid == owner) {
diff --git a/public/views/body.ejs b/public/views/body.ejs
index 86469ce9..f0444bef 100644
--- a/public/views/body.ejs
+++ b/public/views/body.ejs
@@ -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-limited"><a><i class="fa fa-id-card 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-umbrella fa-fw"></i> Protected - Only owner can edit</a></li>
+ <li class="ui-permission-limited"><a><i class="fa fa-id-card fa-fw"></i> Limited - Signed people can edit &amp; guest can't view</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-protected"><a><i class="fa fa-umbrella fa-fw"></i> Protected - Only owner can edit &amp; guest can't 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="divider"></li>
<li class="ui-delete-note"><a><i class="fa fa-trash-o fa-fw"></i> Delete this note</a></li>
</ul>