From 7732f4af328c9af56ba8e2283fac08fc6c292714 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Tue, 7 Jan 2014 20:16:35 -0600 Subject: [PATCH] New user preference: open new tasks in edit mode --- dist/habitrpg-shared.js | 3 +++ script/index.coffee | 1 + 2 files changed, 4 insertions(+) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 54aaefb4b7..a6153ab708 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11595,6 +11595,9 @@ var process=require("__browserify_process");(function() { var task; task = api.taskDefaults(req.body); user["" + task.type + "s"].unshift(task); + if (user.preferences.newTaskEdit) { + task._editing = true; + } if (typeof cb === "function") { cb(null, task); } diff --git a/script/index.coffee b/script/index.coffee index 50a9f98b14..40d42094d7 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -497,6 +497,7 @@ api.wrap = (user, main=true) -> addTask: (req, cb) -> task = api.taskDefaults(req.body) user["#{task.type}s"].unshift(task) + if user.preferences.newTaskEdit then task._editing = true cb? null, task task