From 5f65795e79561f7b787767b7c184f66b65f74c5f Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Thu, 12 Jan 2017 19:04:17 +0800 Subject: [PATCH] Fix permission order and keep wording consistency --- lib/models/note.js | 2 +- public/js/index.js | 12 ++++++------ public/views/body.ejs | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/models/note.js b/lib/models/note.js index a6921267a..86112973b 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 7effcbd7f..1dfb02e12 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2291,17 +2291,17 @@ function updatePermission(newPermission) { label = ' Limited'; title = "Signed people can edit & guest can't view" break; - case "private": - label = ' Private'; - title = "Only owner can view & edit"; + case "locked": + label = ' Locked'; + title = "Only owner can edit"; break; case "protected": label = ' Protected'; title = "Only owner can edit & guest can't view"; break; - case "locked": - label = ' Locked'; - title = "Only owner can edit"; + case "private": + label = ' 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 86469ce94..f0444befa 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -17,10 +17,10 @@