forked from GNUsocial/gnu-social
Removed NoticeHover from JavaScript for speed gain. Using CSS instead
to handle the notice hover state. The difference is only seen in the conversation page.
This commit is contained in:
parent
befbfc9c73
commit
0e4d8c416d
11
js/util.js
11
js/util.js
@ -230,21 +230,10 @@ $(document).ready(function(){
|
|||||||
};
|
};
|
||||||
$("#form_notice").ajaxForm(PostNotice);
|
$("#form_notice").ajaxForm(PostNotice);
|
||||||
$("#form_notice").each(addAjaxHidden);
|
$("#form_notice").each(addAjaxHidden);
|
||||||
NoticeHover();
|
|
||||||
NoticeReply();
|
NoticeReply();
|
||||||
NoticeAttachments();
|
NoticeAttachments();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function NoticeHover() {
|
|
||||||
function mouseHandler(e) {
|
|
||||||
$(e.target).closest('li.hentry')[(e.type === 'mouseover') ? 'addClass' : 'removeClass']('hover');
|
|
||||||
};
|
|
||||||
$('#content .notices').mouseover(mouseHandler);
|
|
||||||
$('#content .notices').mouseout(mouseHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function NoticeReply() {
|
function NoticeReply() {
|
||||||
if ($('#notice_data-text').length > 0) {
|
if ($('#notice_data-text').length > 0) {
|
||||||
$('#content .notice').each(function() {
|
$('#content .notice').each(function() {
|
||||||
|
@ -226,13 +226,11 @@ background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-r
|
|||||||
}
|
}
|
||||||
|
|
||||||
.notices div.entry-content,
|
.notices div.entry-content,
|
||||||
.notices div.notice-options,
|
.notices div.notice-options {
|
||||||
.notices li.hover .notices div.entry-content,
|
|
||||||
.notices li.hover .notices div.notice-options {
|
|
||||||
opacity:0.4;
|
opacity:0.4;
|
||||||
}
|
}
|
||||||
.notices li.hover div.entry-content,
|
.notices li:hover div.entry-content,
|
||||||
.notices li.hover div.notice-options {
|
.notices li:hover div.notice-options {
|
||||||
opacity:1;
|
opacity:1;
|
||||||
}
|
}
|
||||||
div.entry-content {
|
div.entry-content {
|
||||||
@ -242,9 +240,12 @@ div.notice-options a,
|
|||||||
div.notice-options input {
|
div.notice-options input {
|
||||||
font-family:sans-serif;
|
font-family:sans-serif;
|
||||||
}
|
}
|
||||||
.notices li.hover {
|
.notices li:hover {
|
||||||
background-color:#FCFCFC;
|
background-color:#FCFCFC;
|
||||||
}
|
}
|
||||||
|
#conversation .notices li:hover {
|
||||||
|
background-color:transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.notices .notices {
|
.notices .notices {
|
||||||
background-color:rgba(200, 200, 200, 0.050);
|
background-color:rgba(200, 200, 200, 0.050);
|
||||||
|
@ -226,13 +226,11 @@ background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-r
|
|||||||
}
|
}
|
||||||
|
|
||||||
.notices div.entry-content,
|
.notices div.entry-content,
|
||||||
.notices div.notice-options,
|
.notices div.notice-options {
|
||||||
.notices li.hover .notices div.entry-content,
|
|
||||||
.notices li.hover .notices div.notice-options {
|
|
||||||
opacity:0.4;
|
opacity:0.4;
|
||||||
}
|
}
|
||||||
.notices li.hover div.entry-content,
|
.notices li:hover div.entry-content,
|
||||||
.notices li.hover div.notice-options {
|
.notices li:hover div.notice-options {
|
||||||
opacity:1;
|
opacity:1;
|
||||||
}
|
}
|
||||||
div.entry-content {
|
div.entry-content {
|
||||||
@ -242,9 +240,12 @@ div.notice-options a,
|
|||||||
div.notice-options input {
|
div.notice-options input {
|
||||||
font-family:sans-serif;
|
font-family:sans-serif;
|
||||||
}
|
}
|
||||||
.notices li.hover {
|
.notices li:hover {
|
||||||
background-color:#FCFCFC;
|
background-color:#FCFCFC;
|
||||||
}
|
}
|
||||||
|
#conversation .notices li:hover {
|
||||||
|
background-color:transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.notices .notices {
|
.notices .notices {
|
||||||
background-color:rgba(200, 200, 200, 0.050);
|
background-color:rgba(200, 200, 200, 0.050);
|
||||||
|
Loading…
Reference in New Issue
Block a user