dynamic load on slider change + delay to settle

This commit is contained in:
friendica 2012-07-19 03:59:32 -07:00
parent 3b1c2ce001
commit 6402fa1170
5 changed files with 66 additions and 18 deletions

View File

@ -338,12 +338,6 @@ function network_content(&$a, $update = 0) {
set_pconfig( local_user(), 'network.view','tab.selected',array($all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active) );
}
$arr = array('tabs' => $tabs);
call_hooks('network_tabs', $arr);
$o .= replace_macros(get_markup_template('common_tabs.tpl'), array('$tabs'=> $arr['tabs']));
// --- end item filter tabs
@ -401,6 +395,14 @@ function network_content(&$a, $update = 0) {
'$world' => t('Everybody')
));
$arr = array('tabs' => $tabs);
call_hooks('network_tabs', $arr);
$o .= replace_macros(get_markup_template('common_tabs.tpl'), array('$tabs'=> $arr['tabs']));
// --- end item filter tabs
// search terms header
if($search)
$o .= '<h2>' . t('Search Results For:') . ' ' . htmlspecialchars($search) . '</h2>';

View File

@ -1,14 +1,20 @@
<div id="main-slider" class="slider" style="height: 32px; position: relative; left: 5%; width: 80%;"><input id="main-range" type="text" name="cminmax" value="$val" /></div>
<input id="slider-refresh" type="submit" name="submit" value="$refresh" onclick="networkRefresh();" /><div class="clear"></div>
<div id="main-slider" class="slider" ><input id="main-range" type="text" name="cminmax" value="$val" /></div>
<script>
$("#main-range").slider({ from: 0, to: 99, step: 1, scale: ['$me', '$intimate', '|', '$friends', '|', '$coworkers', '|', '$oldfriends', '|', '$acquaintances', '|', '$world' ], onstatechange: function(v) {
var carr = v.split(";");
network_cmin = carr[0];
network_cmax = carr[1];
networkRefresh();
} });
var slideTimer = null;
function networkRefresh() {
window.location.href = buildCmd();
if((document.readyState !== "complete") || (slideTimer !== null))
return;
slideTimer = setTimeout(networkTimerRefresh,5000);
}
function networkTimerRefresh() {
window.location.href = buildCmd();
}
</script>

View File

@ -44,7 +44,7 @@
{{ if $nav.notifications }}
<a id="nav-notifications-linkmenu" class="nav-commlink" onclick="notify_popup(); return false;" title="$nav.notifications.1">$nav.notifications.1</a>
<a id="nav-notifications-linkmenu" class="nav-commlink fakelink" onclick="notify_popup(); return false;" title="$nav.notifications.1">$nav.notifications.1</a>
<span id="notify-update" class="nav-ajax-left"></span>
<ul id="nav-notifications-menu" class="menu-popup">
<li id="nav-notifications-see-all"><a href="$nav.notifications.all.0">$nav.notifications.all.1</a></li>

View File

@ -319,9 +319,12 @@ div.wall-item-content-wrapper.shiny {
color: #3465a4;
text-decoration: none;
cursor: pointer;
}
.fakebutton {
margin-top: 15px;
margin-bottom: 15px;
}
.lockview {
cursor: pointer;
}
@ -2157,6 +2160,8 @@ aside input[type='text'] {
text-decoration: underline;
cursor: pointer;
}
#settings-default-perms-menu {
margin-top: 15px;
margin-bottom: 15px;
@ -3274,11 +3279,29 @@ ul.menu-popup {
margin-left: 25px;
}
.jslider .jslider-scale ins {
color: #333;
font-size: 12px;
width: 100px;
text-align: center;
}
.slider {
margin-top: 10px;
margin-bottom: 30px;
}
#main-slider {
float: left;
}
#slider-refresh {
float: right;
margin-right: 25px;
margin-top: 7px;
position: relative;
left: 5%;
width: 90%;
}
#contact-slider {
position: relative;
left: 5%;
width: 90%;
}

View File

@ -220,6 +220,8 @@ nav #site-location {
-o-transform: rotate(4deg);
}
/*
.jslider .jslider-scale ins {
color: #333;
font-size: 12px;
@ -227,7 +229,22 @@ nav #site-location {
text-align: center;
}
#slider {
.slider {
margin-top: 10px;
margin-bottom: 15px;
}
height: 32px;
}
#main-slider {
position: relative;
left: 10%;
width: 90%;
}
#contact-slider {
position: relative;
left: 10%;
width: 90%;
}
*/