diff --git a/mods/menu.hjson b/mods/menu.hjson index bb22f86c..4232c5f8 100644 --- a/mods/menu.hjson +++ b/mods/menu.hjson @@ -520,6 +520,13 @@ "value" : { "1" : 1 }, "action" : "@method:nextMessage" }, + { + value: { 1: 2 }, + action: @method:replyMessage + extraArgs: { + menu: messageAreaReplyPost + } + }, { "value" : { "1" : 3 }, "action" : "@menu:messageArea" @@ -553,6 +560,52 @@ } } }, + messageAreaReplyPost: { + module: msg_area_reply_fse + config: { + art: { + header: MSGEHDR + body: MSGBODY + quote: MSGQUOT + footerEditor: MSGEFTR + footerEditorMenu: MSGEMFT + // :TODO: help + } + editorMode: edit + editorType: area + } + form: { + 0: { + mci: { + // :TODO: use appropriate system properties for these lenghts + TL1: { + width: 27 + argName: from + } + ET2: { + width: 27 + argName: to + focus: true + } + ET3: { + width: 27 + argName: subject + maxLength: 72 + submit: true + } + TL4: { + // :TODO: this is for RE: line + width: 27 + textOverflow: ... + } + MA5: { + width: 27 + textOverflow: ... + } + } + } + } + } // :TODO: messageAreaSelect (change msg areas -> call @systemMethod -> fallback to menu "messageAreaNewPost" : { "status" : "Posting message", @@ -653,17 +706,13 @@ "action" : "@menu:messageArea" }, { - "value" : { "1" : 2 }, - "action" : "@method:fseSubmitProxy" + value: { 1: 2 }, + action: @method:editModeQuote }, { "value" : { "1" : 3 }, "action" : "@method:editModeMenuHelp" - }/*, - { - "value" : 1, - "action" : "@method:editModeEscPressed" - }*/ + } ] }, "actionKeys" : [ // :TODO: Need better name diff --git a/mods/msg_area_reply_fse.js b/mods/msg_area_reply_fse.js new file mode 100644 index 00000000..6bac09d1 --- /dev/null +++ b/mods/msg_area_reply_fse.js @@ -0,0 +1,25 @@ +/* jslint node: true */ +'use strict'; + +var FullScreenEditorModule = require('../core/fse.js').FullScreenEditorModule; +var Message = require('../core/message.js'); +var messageArea = require('../core/message_area.js'); +var user = require('../core/user.js'); + +var _ = require('lodash'); +var async = require('async'); +var assert = require('assert'); + +exports.getModule = AreaReplyFSEModule; + +exports.moduleInfo = { + name : 'Message Area Reply', + desc : 'Module for replying to an area message', + author : 'NuSkooler', +}; + +function AreaReplyFSEModule(options) { + FullScreenEditorModule.call(this, options); +} + +require('util').inherits(AreaReplyFSEModule, FullScreenEditorModule); diff --git a/mods/msg_area_view_fse.js b/mods/msg_area_view_fse.js index be9cf12b..37c65d94 100644 --- a/mods/msg_area_view_fse.js +++ b/mods/msg_area_view_fse.js @@ -63,6 +63,20 @@ function AreaViewFSEModule(options) { } }; + this.menuMethods.replyMessage = function(formData, extraArgs) { + if(_.isString(extraArgs.menu)) { + var modOpts = { + name : extraArgs.menu, + messageArea : self.messageAreaName, + replyToMessage : self.message, + }; + + self.client.gotoMenuModule(modOpts); + } else { + self.client.log(extraArgs, 'Missing extraArgs.menu'); + } + }; + this.loadMessageByUuid = function(uuid) { var msg = new Message(); msg.load( { uuid : uuid, user : self.client.user }, function loaded(err) { diff --git a/mods/themes/NU-MAYA/MSGQUOT.ANS b/mods/themes/NU-MAYA/MSGQUOT.ANS new file mode 100644 index 00000000..d5b028a1 Binary files /dev/null and b/mods/themes/NU-MAYA/MSGQUOT.ANS differ