mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-14 17:07:53 +00:00
Merge branch 'slr-issp-switch-postboard'
This commit is contained in:
commit
324ec920a0
@ -1271,7 +1271,9 @@ function changeStyle() {
|
|||||||
{
|
{
|
||||||
style = 'css/style.css';
|
style = 'css/style.css';
|
||||||
profile = 'css/profile.css';
|
profile = 'css/profile.css';
|
||||||
|
$.getScript('theme_original/js/theme_option.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#stylecss').attr('href', style);
|
$('#stylecss').attr('href', style);
|
||||||
$('#profilecss').attr('href', profile);
|
$('#profilecss').attr('href', profile);
|
||||||
$("<style type='text/css'> .selectable_theme:not(.theme_" + theme + ")" +
|
$("<style type='text/css'> .selectable_theme:not(.theme_" + theme + ")" +
|
||||||
|
@ -16,31 +16,12 @@ var InterfaceFunctions = function()
|
|||||||
$( ".wrapper .postboard-news").click(function() {
|
$( ".wrapper .postboard-news").click(function() {
|
||||||
requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly);});
|
requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly);});
|
||||||
|
|
||||||
|
|
||||||
/*$( ".promoted-posts-only").click(function() {
|
|
||||||
promotedPostsOnly = !promotedPostsOnly;
|
|
||||||
$(this).text( promotedPostsOnly ? "Switch to Normal posts" : "Switch to Promoted posts" );
|
|
||||||
timelineChangedUser();
|
|
||||||
$.MAL.getStreamPostsParent().empty();
|
|
||||||
requestTimelineUpdate("latestFirstTime",postsPerRefresh,followingUsers,promotedPostsOnly);
|
|
||||||
});*/
|
|
||||||
|
|
||||||
|
|
||||||
// Add refresh posts for home link in menu
|
// Add refresh posts for home link in menu
|
||||||
$( ".userMenu-home.current a").click(function() {
|
$( ".userMenu-home.current a").click(function() {
|
||||||
requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly);});
|
requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly);});
|
||||||
|
|
||||||
// modified the way promoted posts are shown
|
|
||||||
$( ".promoted-posts-only").click(function() {
|
$( ".promoted-posts-only").click(function() {
|
||||||
promotedPostsOnly = !promotedPostsOnly;
|
promotedPostsOnly = !promotedPostsOnly;
|
||||||
//active promoted posts tab
|
|
||||||
$(this).children('.promoted-posts').addClass(promotedPostsOnly ? "active" : "disabled");
|
|
||||||
$(this).children('.normal-posts').addClass(promotedPostsOnly ? "disabled" : "active");
|
|
||||||
$('#postboard-top').removeClass(promotedPostsOnly ? "show" : "hide");
|
|
||||||
//active normal posts
|
|
||||||
$(this).children('.promoted-posts').removeClass(promotedPostsOnly ? "disabled" : "active");
|
|
||||||
$(this).children('.normal-posts').removeClass(promotedPostsOnly ? "active" : "disabled");
|
|
||||||
$('#postboard-top').addClass(promotedPostsOnly ? "hide" : "show");
|
|
||||||
|
|
||||||
timelineChangedUser();
|
timelineChangedUser();
|
||||||
$.MAL.getStreamPostsParent().empty();
|
$.MAL.getStreamPostsParent().empty();
|
||||||
|
@ -16,6 +16,18 @@ $(function(){
|
|||||||
return false
|
return false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$( ".promoted-posts-only").click(function() {
|
||||||
|
// modify the way promoted posts are shown
|
||||||
|
//active promoted posts tab
|
||||||
|
$(this).children('.promoted-posts').addClass(promotedPostsOnly ? "active" : "disabled");
|
||||||
|
$(this).children('.normal-posts').addClass(promotedPostsOnly ? "disabled" : "active");
|
||||||
|
$('#postboard-top').removeClass(promotedPostsOnly ? "show" : "hide");
|
||||||
|
//active normal posts
|
||||||
|
$(this).children('.promoted-posts').removeClass(promotedPostsOnly ? "disabled" : "active");
|
||||||
|
$(this).children('.normal-posts').removeClass(promotedPostsOnly ? "active" : "disabled");
|
||||||
|
$('#postboard-top').addClass(promotedPostsOnly ? "hide" : "show");
|
||||||
|
});
|
||||||
|
|
||||||
$(window).scroll(function(){
|
$(window).scroll(function(){
|
||||||
posScroll = $(document).scrollTop();
|
posScroll = $(document).scrollTop();
|
||||||
if(posScroll >= 250)
|
if(posScroll >= 250)
|
||||||
|
8
theme_original/js/theme_option.js
Executable file
8
theme_original/js/theme_option.js
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
$(function(){
|
||||||
|
|
||||||
|
$( ".promoted-posts-only").click(function() {
|
||||||
|
$(this).text( promotedPostsOnly ? polyglot.t('Switch to Normal posts') : polyglot.t('Switch to Promoted posts') );
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user