diff --git a/app.js b/app.js index c2ff400d1..8f84a0218 100644 --- a/app.js +++ b/app.js @@ -352,10 +352,10 @@ app.post('/uploadimage', function (req, res) { app.get("/new", response.newNote); //get features app.get("/features", response.showFeatures); -//get share note -app.get("/s/:shortid", response.showShareNote); -//share note actions -app.get("/s/:shortid/:action", response.shareNoteActions); +//get publish note +app.get("/s/:shortid", response.showPublishNote); +//publish note actions +app.get("/s/:shortid/:action", response.publishNoteActions); //get note by id app.get("/:noteId", response.showNote); //note actions diff --git a/lib/response.js b/lib/response.js index d3b011bf2..b8cfab179 100644 --- a/lib/response.js +++ b/lib/response.js @@ -33,9 +33,9 @@ var response = { newNote: newNote, showFeatures: showFeatures, showNote: showNote, - showShareNote: showShareNote, + showPublishNote: showPublishNote, noteActions: noteActions, - shareNoteActions: shareNoteActions + publishNoteActions: publishNoteActions }; function responseError(res, code, detail, msg) { @@ -139,7 +139,7 @@ function showNote(req, res, next) { responseHackMD(res, noteId); } -function showShareNote(req, res, next) { +function showPublishNote(req, res, next) { var shortid = req.params.shortid; if (shortId.isValid(shortid)) { Note.findNote(shortid, function (err, note) { @@ -194,7 +194,7 @@ function showShareNote(req, res, next) { } } -function actionShare(req, res, noteId) { +function actionPublish(req, res, noteId) { db.readFromDB(noteId, function (err, data) { if (err) { responseError(res, "404", "Not Found", "oops."); @@ -307,9 +307,9 @@ function noteActions(req, res, next) { } var action = req.params.action; switch (action) { - case "share": + case "publish": case "pretty": //pretty deprecated - actionShare(req, res, noteId); + actionPublish(req, res, noteId); break; case "download": actionDownload(req, res, noteId); @@ -326,7 +326,7 @@ function noteActions(req, res, next) { } } -function shareNoteActions(req, res, next) { +function publishNoteActions(req, res, next) { var action = req.params.action; switch (action) { case "edit": diff --git a/public/js/index.js b/public/js/index.js index bf3a3ab2c..43b02ad54 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -234,7 +234,7 @@ var ui = { shortStatus: $(".ui-short-status"), status: $(".ui-status"), new: $(".ui-new"), - share: $(".ui-share"), + publish: $(".ui-publish"), download: { markdown: $(".ui-download-markdown") }, @@ -618,7 +618,7 @@ function changeMode(type) { //button actions var url = window.location.pathname; //share -ui.toolbar.share.attr("href", url + "/share"); +ui.toolbar.publish.attr("href", url + "/publish"); //download //markdown ui.toolbar.download.markdown.click(function () { diff --git a/public/views/header.ejs b/public/views/header.ejs index 7aee53511..d18729774 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -24,7 +24,7 @@