mirror of https://github.com/zulip/zulip.git
Rename #class* to #stream*.
(imported from commit a8f15f636f3801ba1152f1020e885240984d070e)
This commit is contained in:
parent
98ba39700c
commit
5509419084
|
@ -39,7 +39,7 @@
|
|||
</tr>
|
||||
<tr id="stream-message">
|
||||
<td colspan="2" class="message_newstyle_class">
|
||||
<input type="text" class="recipient_box" name="stream" id="class" onchange="focus_on('instance')" value="" placeholder="Stream" autocomplete="off"/>
|
||||
<input type="text" class="recipient_box" name="stream" id="stream" onchange="focus_on('instance')" value="" placeholder="Stream" autocomplete="off"/>
|
||||
</td>
|
||||
<td class="message_newstyle_instance">
|
||||
<input type="text" class="recipient_box" name="instance" id="instance" onchange="focus_on('new_message_content')" value="" placeholder="Subject" autocomplete="off"/>
|
||||
|
|
|
@ -78,15 +78,15 @@ var have_initial_messages = {{ have_initial_messages }};
|
|||
<strong>Can't receive messages</strong> — try reloading the page.
|
||||
</div>
|
||||
<div class="alert alert_sidebar" id="home-error"></div>
|
||||
<div class="alert alert_sidebar" id="class-dne">
|
||||
<p>The class <span class="classname" id="class-dne-name"></span> does not exist.</p>
|
||||
<div class="alert alert_sidebar" id="stream-dne">
|
||||
<p>The class <span class="classname" id="stream-dne-name"></span> does not exist.</p>
|
||||
<button type="button" id="create-it" class="btn btn-primary">Create and send</button>
|
||||
<button type="button" class="btn" onClick="$('#class-dne').stop(true).fadeOut(500);">Cancel message</button>
|
||||
<button type="button" class="btn" onClick="$('#stream-dne').stop(true).fadeOut(500);">Cancel message</button>
|
||||
</div>
|
||||
<div class="alert alert_sidebar" id="class-nosub">
|
||||
<p>You're not subscribed to the class <span class="classname" id="class-nosub-name"></span>.</p>
|
||||
<div class="alert alert_sidebar" id="stream-nosub">
|
||||
<p>You're not subscribed to the class <span class="classname" id="stream-nosub-name"></span>.</p>
|
||||
<button type="button" id="sub-it" class="btn btn-primary">Subscribe and send</button>
|
||||
<button type="button" class="btn" onClick="$('#class-nosub').stop(true).fadeOut(500);">Cancel message</button>
|
||||
<button type="button" class="btn" onClick="$('#stream-nosub').stop(true).fadeOut(500);">Cancel message</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@ function clear_compose_box() {
|
|||
function compose_button() {
|
||||
clear_compose_box();
|
||||
$('#sidebar a[href="#home"]').tab('show');
|
||||
show_compose('stream', $("#class"));
|
||||
show_compose('stream', $("#stream"));
|
||||
}
|
||||
|
||||
function toggle_compose() {
|
||||
|
@ -30,7 +30,7 @@ function toggle_compose() {
|
|||
// In class tab, switch to personals.
|
||||
show_compose('personal', $("#huddle_recipient"));
|
||||
} else {
|
||||
show_compose('stream', $("#class"));
|
||||
show_compose('stream', $("#stream"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ function composing_huddle_message() {
|
|||
}
|
||||
|
||||
function compose_stream_name() {
|
||||
return $.trim($("#class").val());
|
||||
return $.trim($("#stream").val());
|
||||
}
|
||||
|
||||
function compose_instance() {
|
||||
|
@ -87,8 +87,8 @@ function check_class_for_send(stream_name) {
|
|||
// The class doesn't exist
|
||||
okay = false;
|
||||
$('#send-status').removeClass(status_classes).show();
|
||||
$('#class-dne-name').text(stream_name);
|
||||
$('#class-dne').show();
|
||||
$('#stream-dne-name').text(stream_name);
|
||||
$('#stream-dne').show();
|
||||
submit_buttons().removeAttr('disabled');
|
||||
hide_compose();
|
||||
$('#create-it').focus();
|
||||
|
@ -98,7 +98,7 @@ function check_class_for_send(stream_name) {
|
|||
error: function (xhr) {
|
||||
okay = false;
|
||||
report_error("Error checking subscription", xhr, $("#home-error"));
|
||||
$("#class").focus();
|
||||
$("#stream").focus();
|
||||
submit_buttons().removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
|
@ -108,7 +108,7 @@ function check_class_for_send(stream_name) {
|
|||
function validate_class_message() {
|
||||
var stream_name = compose_stream_name();
|
||||
if (stream_name === "") {
|
||||
compose_error("Please specify a class", $("#class"));
|
||||
compose_error("Please specify a class", $("#stream"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -128,8 +128,8 @@ function validate_class_message() {
|
|||
if (!subscribed_to(stream_name)) {
|
||||
// You're not subbed to the class
|
||||
$('#send-status').removeClass(status_classes).show();
|
||||
$('#class-nosub-name').text(stream_name);
|
||||
$('#class-nosub').show();
|
||||
$('#stream-nosub-name').text(stream_name);
|
||||
$('#stream-nosub').show();
|
||||
submit_buttons().removeAttr('disabled');
|
||||
hide_compose();
|
||||
$('#sub-it').focus();
|
||||
|
|
|
@ -79,7 +79,7 @@ function update_autocomplete() {
|
|||
people_list.sort();
|
||||
|
||||
// limit number of items so the list doesn't fall off the screen
|
||||
$( "#class" ).typeahead({
|
||||
$( "#stream" ).typeahead({
|
||||
source: stream_list,
|
||||
items: 3
|
||||
});
|
||||
|
@ -134,12 +134,12 @@ $(function () {
|
|||
// Prepare the click handler for subbing to a new class to which
|
||||
// you have composed a message.
|
||||
$('#create-it').click(function () {
|
||||
sub_from_home(compose_stream_name(), $('#class-dne'));
|
||||
sub_from_home(compose_stream_name(), $('#stream-dne'));
|
||||
});
|
||||
|
||||
// Prepare the click handler for subbing to an existing class.
|
||||
$('#sub-it').click(function () {
|
||||
sub_from_home(compose_stream_name(), $('#class-nosub'));
|
||||
sub_from_home(compose_stream_name(), $('#stream-nosub'));
|
||||
});
|
||||
|
||||
var throttled_scrollhandler = $.throttle(50, function(e) {
|
||||
|
@ -187,7 +187,7 @@ $(function () {
|
|||
});
|
||||
|
||||
$('.button-slide').click(function () {
|
||||
show_compose('stream', $("#class"));
|
||||
show_compose('stream', $("#stream"));
|
||||
});
|
||||
|
||||
$('#sidebar a[href="#subscriptions"]').click(fetch_subs);
|
||||
|
|
|
@ -117,10 +117,10 @@ function respond_to_message(reply_type) {
|
|||
var message, tabname;
|
||||
message = message_dict[selected_message_id];
|
||||
if (message.type === "stream") {
|
||||
$("#class").val(message.display_recipient);
|
||||
$("#stream").val(message.display_recipient);
|
||||
$("#instance").val(message.instance);
|
||||
} else {
|
||||
$("#class").val("");
|
||||
$("#stream").val("");
|
||||
$("#instance").val("");
|
||||
}
|
||||
$("#huddle_recipient").val(message.reply_to);
|
||||
|
|
|
@ -245,11 +245,11 @@ img.profile_picture {
|
|||
display: none;
|
||||
}
|
||||
|
||||
#class-dne {
|
||||
#stream-dne {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#class-nosub {
|
||||
#stream-nosub {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue