Restrict lurk mode compose box stream to the lurk stream

(imported from commit f187f619fc77645a294ab4cb90baf802f55d3326)
This commit is contained in:
Reid Barton 2013-01-15 19:39:50 -05:00
parent 3297bd06ae
commit 64ebbc6c73
2 changed files with 6 additions and 3 deletions

View File

@ -75,7 +75,7 @@
</td>
<td class="message_header message_header_stream right_part">
<input type="text" class="recipient_box" name="stream" id="stream"
maxlength="30"
maxlength="30" {% if lurk_stream %}readonly{% endif %}
value="" placeholder="Stream" autocomplete="off" tabindex="120"/>
| <input type="text" class="recipient_box" name="subject" id="subject"
maxlength="60"

View File

@ -67,8 +67,11 @@ exports.start = function (msg_type, opts) {
compose.clear();
var default_stream = '';
if (msg_type === 'stream' && lurk_stream !== undefined)
default_stream = lurk_stream;
opts = $.extend({ message_type: msg_type,
stream: '',
stream: default_stream,
subject: '',
private_message_recipient: ''
}, opts);
@ -204,7 +207,7 @@ exports.set_mode = function (mode) {
show('private', $("#private_message_recipient"));
is_composing_message = "private";
} else {
show('stream', $("#stream"));
show('stream', $(lurk_stream !== undefined ? "#stream" : "#subject"));
is_composing_message = "stream";
}
};