mirror of https://github.com/zulip/zulip.git
Get rid of selectors like span.foo
Just write .foo. We shouldn't have to care what type of tag it is. (imported from commit 86c4eeecbe4f5c9875002e3fd81757cd49050268)
This commit is contained in:
parent
00a91d8ff3
commit
67b337ce07
|
@ -65,7 +65,7 @@ var people_list = {{ people }};
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<div class="narrowbox row">
|
<div class="row" id="narrowbox">
|
||||||
<div class="input-prepend input-append pull-left">
|
<div class="input-prepend input-append pull-left">
|
||||||
<button id="show_all_messages" class="btn" disabled=disabled onclick="show_all_messages()"><i class="icon-remove"></i></button>
|
<button id="show_all_messages" class="btn" disabled=disabled onclick="show_all_messages()"><i class="icon-remove"></i></button>
|
||||||
<span class="add-on"><span id="currently_narrowed_to" class="badge"></span></span>
|
<span class="add-on"><span id="currently_narrowed_to" class="badge"></span></span>
|
||||||
|
|
|
@ -302,8 +302,8 @@ function process_goto_hotkey(code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 67: // 'c': narrow by recipient
|
case 67: // 'c': narrow by recipient
|
||||||
parent = get_zephyr(selected_zephyr_id);
|
parent = get_zephyr(selected_zephyr_id);
|
||||||
zephyr_class = parent.find("span.zephyr_class").text();
|
zephyr_class = parent.find(".zephyr_class").text();
|
||||||
zephyr_huddle = parent.find("span.zephyr_huddle_recipient").text();
|
zephyr_huddle = parent.find(".zephyr_huddle_recipient").text();
|
||||||
if (zephyr_class == '' && zephyr_huddle == '') {
|
if (zephyr_class == '' && zephyr_huddle == '') {
|
||||||
narrow_personals();
|
narrow_personals();
|
||||||
} else if (zephyr_class == '') {
|
} else if (zephyr_class == '') {
|
||||||
|
@ -411,16 +411,16 @@ function do_narrow(description, filter_function) {
|
||||||
scroll_to_selected();
|
scroll_to_selected();
|
||||||
|
|
||||||
$("#show_all_messages").removeAttr("disabled");
|
$("#show_all_messages").removeAttr("disabled");
|
||||||
$("div.narrowbox").show();
|
$("#narrowbox").show();
|
||||||
$("#currently_narrowed_to").html(description);
|
$("#currently_narrowed_to").html(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
function narrow_huddle() {
|
function narrow_huddle() {
|
||||||
var recipients = get_zephyr(selected_zephyr_id).find("span.zephyr_huddle_recipients_list").text();
|
var recipients = get_zephyr(selected_zephyr_id).find(".zephyr_huddle_recipients_list").text();
|
||||||
var message = "Group chats with " + recipients;
|
var message = "Group chats with " + recipients;
|
||||||
do_narrow(message, function (element) {
|
do_narrow(message, function (element) {
|
||||||
return (element.find("span.zephyr_huddle_recipient").length > 0 &&
|
return (element.find(".zephyr_huddle_recipient").length > 0 &&
|
||||||
element.find("span.zephyr_huddle_recipients_list").text() === recipients);
|
element.find(".zephyr_huddle_recipients_list").text() === recipients);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ function narrow_all_personals() {
|
||||||
// Narrow to all personals
|
// Narrow to all personals
|
||||||
var message = "All huddles with you";
|
var message = "All huddles with you";
|
||||||
do_narrow(message, function (element) {
|
do_narrow(message, function (element) {
|
||||||
return (element.find("span.zephyr_personal_recipient").length > 0);
|
return (element.find(".zephyr_personal_recipient").length > 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,8 +445,8 @@ function narrow_personals() {
|
||||||
var message = "Huddles with " + other_party;
|
var message = "Huddles with " + other_party;
|
||||||
do_narrow(message, function (element) {
|
do_narrow(message, function (element) {
|
||||||
var other_zephyr_obj = zephyr_dict[target_zephyr.attr('id')];
|
var other_zephyr_obj = zephyr_dict[target_zephyr.attr('id')];
|
||||||
var recipient = element.find("span.zephyr_personal_recipient");
|
var recipient = element.find(".zephyr_personal_recipient");
|
||||||
var sender = element.find("span.zephyr_sender");
|
var sender = element.find(".zephyr_sender");
|
||||||
|
|
||||||
return (recipient.length > 0) &&
|
return (recipient.length > 0) &&
|
||||||
(((other_zephyr_obj.display_recipient === zephyr_obj.display_recipient) && (other_zephyr_obj.sender === zephyr_obj.sender)) ||
|
(((other_zephyr_obj.display_recipient === zephyr_obj.display_recipient) && (other_zephyr_obj.sender === zephyr_obj.sender)) ||
|
||||||
|
@ -456,24 +456,24 @@ function narrow_personals() {
|
||||||
|
|
||||||
function narrow_class() {
|
function narrow_class() {
|
||||||
var parent = get_zephyr(selected_zephyr_id);
|
var parent = get_zephyr(selected_zephyr_id);
|
||||||
var zephyr_class = parent.find("span.zephyr_class").text();
|
var zephyr_class = parent.find(".zephyr_class").text();
|
||||||
var message = "<span class='zephyr_class'>" + zephyr_class + "</span>";
|
var message = "<span class='zephyr_class'>" + zephyr_class + "</span>";
|
||||||
do_narrow(message, function (element) {
|
do_narrow(message, function (element) {
|
||||||
return (element.find("span.zephyr_class").length > 0 &&
|
return (element.find(".zephyr_class").length > 0 &&
|
||||||
element.find("span.zephyr_class").text() === zephyr_class);
|
element.find(".zephyr_class").text() === zephyr_class);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function narrow_instance() {
|
function narrow_instance() {
|
||||||
var parent = get_zephyr(selected_zephyr_id);
|
var parent = get_zephyr(selected_zephyr_id);
|
||||||
var zephyr_class = parent.find("span.zephyr_class").text();
|
var zephyr_class = parent.find(".zephyr_class").text();
|
||||||
var zephyr_instance = parent.find("span.zephyr_instance").text();
|
var zephyr_instance = parent.find(".zephyr_instance").text();
|
||||||
var message = "<span class='zephyr_class'>" + zephyr_class
|
var message = "<span class='zephyr_class'>" + zephyr_class
|
||||||
+ "</span> | <span class='zephyr_instance'>" + zephyr_instance + "</span>";
|
+ "</span> | <span class='zephyr_instance'>" + zephyr_instance + "</span>";
|
||||||
do_narrow(message, function (element) {
|
do_narrow(message, function (element) {
|
||||||
return (element.find("span.zephyr_class").length > 0 &&
|
return (element.find(".zephyr_class").length > 0 &&
|
||||||
element.find("span.zephyr_class").text() === zephyr_class &&
|
element.find(".zephyr_class").text() === zephyr_class &&
|
||||||
element.find("span.zephyr_instance").text() === zephyr_instance);
|
element.find(".zephyr_instance").text() === zephyr_instance);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,7 +483,7 @@ function show_all_messages() {
|
||||||
|
|
||||||
scroll_to_selected();
|
scroll_to_selected();
|
||||||
|
|
||||||
$("div.narrowbox").hide();
|
$("#narrowbox").hide();
|
||||||
$("#show_all_messages").attr("disabled", "disabled");
|
$("#show_all_messages").attr("disabled", "disabled");
|
||||||
$("#currently_narrowed_to").html("");
|
$("#currently_narrowed_to").html("");
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,17 +9,17 @@ body {
|
||||||
padding: 9px 0;
|
padding: 9px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.my_fullname {
|
.my_fullname {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 150%;
|
font-size: 150%;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.my_email {
|
.my_email {
|
||||||
color: gray;
|
color: gray;
|
||||||
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.zephyr_well {
|
.zephyr_well {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ ul.nav-zephyr {
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.zephyr_list {
|
.zephyr_list {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
background-color: #EEE;
|
background-color: #EEE;
|
||||||
|
@ -40,7 +40,7 @@ div.zephyr_list {
|
||||||
width: 640px;
|
width: 640px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.zephyr_comp {
|
.zephyr_comp {
|
||||||
background-color: #EEE;
|
background-color: #EEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,21 +60,21 @@ td.zephyr_recipient {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.zephyr_class {
|
.zephyr_class {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 120%;
|
font-size: 120%;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.zephyr_instance {
|
.zephyr_instance {
|
||||||
font-size: 120%;
|
font-size: 120%;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.zephyr_sender_name {
|
.zephyr_sender_name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.zephyr_sender_email {
|
.zephyr_sender_email {
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
|
|
||||||
/* Use padding, not margin, so that there's a continuous
|
/* Use padding, not margin, so that there's a continuous
|
||||||
|
@ -85,16 +85,16 @@ span.zephyr_sender_email {
|
||||||
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.zephyr_sender_username {
|
.zephyr_sender_username {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.zephyr_label_clickable:hover {
|
.zephyr_label_clickable:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #08C;
|
color: #08C;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.zephyr_time {
|
.zephyr_time {
|
||||||
color: gray;
|
color: gray;
|
||||||
float: right;
|
float: right;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -129,17 +129,17 @@ img.profile_picture {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.alert {
|
.alert {
|
||||||
max-width: 20%;
|
max-width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.zephyr_compose {
|
.zephyr_compose {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
background: white;
|
background: white;
|
||||||
|
|
||||||
/* = div.zephyr_list width + padding-right */
|
/* = .zephyr_list width + padding-right */
|
||||||
width: 670px;
|
width: 670px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ div.zephyr_compose {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.classname {
|
.classname {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,11 +207,11 @@ input.send_zephyr {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.narrowbox {
|
#narrowbox {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
display: none;
|
display: none;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
/* div.zephyr_list width + padding *2 */
|
/* .zephyr_list width + padding *2 */
|
||||||
width: 664px;
|
width: 664px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: #EEE;
|
background-color: #EEE;
|
||||||
|
@ -219,7 +219,7 @@ div.narrowbox {
|
||||||
top: 0px;
|
top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#bottom_whitespace {
|
#bottom_whitespace {
|
||||||
display: block;
|
display: block;
|
||||||
height: 60%;
|
height: 60%;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue