diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index 540bca332..0d3ebdb68 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -655,25 +655,14 @@ class Connedit extends \Zotlabs\Web\Controller { ]; $labels = [ - t('Me'), - t('Family'), - t('Friends'), - t('Acquaintances'), - t('All') + 0 => t('Me'), + 20 => t('Family'), + 40 => t('Friends'), + 60 => t('Peers'), + 80 => t('Connections'), + 99 => t('All') ]; call_hooks('affinity_labels',$labels); - $label_str = ''; - - if($labels) { - foreach($labels as $l) { - if($label_str) { - $label_str .= ", '|'"; - $label_str .= ", '" . $l . "'"; - } - else - $label_str .= "'" . $l . "'"; - } - } $slider_tpl = get_markup_template('contact_slider.tpl'); @@ -682,7 +671,7 @@ class Connedit extends \Zotlabs\Web\Controller { $slide = replace_macros($slider_tpl,array( '$min' => 1, '$val' => $slideval, - '$labels' => $label_str, + '$labels' => $labels, )); } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 8e5080445..2359652f3 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -111,6 +111,10 @@ h6, .h6 { font-family: sans-serif, arial, freesans; } +#contact-range { + width: 80%; +} + abbr { border-bottom: none; } diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index c1147defb..42239adc3 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -111,8 +111,21 @@
{{if $slide}}
{{$lbl_slider}}
- {{$slide}} - +
+ {{$slide}} +
+ + + + {{foreach $labels as $k => $v}} + + + {{$close}} +
+
+
{{/if}} {{if $multiprofs}} diff --git a/view/tpl/contact_slider.tpl b/view/tpl/contact_slider.tpl index 0848df673..d1fd87235 100755 --- a/view/tpl/contact_slider.tpl +++ b/view/tpl/contact_slider.tpl @@ -1,20 +1,12 @@ -
diff --git a/view/tpl/main_slider.tpl b/view/tpl/main_slider.tpl index 2318a7939..fd2a20d86 100755 --- a/view/tpl/main_slider.tpl +++ b/view/tpl/main_slider.tpl @@ -35,6 +35,12 @@ $(document).ready(function() { networkRefresh(); } + // "de-bounce" circuit + // when a change occurs, indicate "busy", but wait (2 seconds) + // before loading fresh content. This allows the slider value to + // change further during that time and avoids a network fetch for + // every individual integer value change. + function networkRefresh() { if(slideTimer !== null) return;