diff options
author | friendica <info@friendica.com> | 2012-07-09 23:23:20 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-09 23:23:20 -0700 |
commit | 1215de575d9cda66b434f21dafdf44f986638b71 (patch) | |
tree | 6bc706e2b5575c537ba41c1c511c5ac21c169d70 /mod | |
parent | 5355193b6342910ec69ec172846027ac9353d2b3 (diff) | |
download | volse-hubzilla-1215de575d9cda66b434f21dafdf44f986638b71.tar.gz volse-hubzilla-1215de575d9cda66b434f21dafdf44f986638b71.tar.bz2 volse-hubzilla-1215de575d9cda66b434f21dafdf44f986638b71.zip |
slider
Diffstat (limited to 'mod')
-rw-r--r-- | mod/content.php | 14 | ||||
-rw-r--r-- | mod/network.php | 21 |
2 files changed, 34 insertions, 1 deletions
diff --git a/mod/content.php b/mod/content.php index 01856d88d..369f2fce2 100644 --- a/mod/content.php +++ b/mod/content.php @@ -278,7 +278,19 @@ function content_content(&$a, $update = 0) { $second = dba_timer(); - $items = conv_sort($items,$ordering); + $tag_finder = array(); + if(count($items)) + foreach($items as $item) + if(! in_array($item['item_id'],$tag_finder)) + $tag_finder[] = $item['item_id']; + $tag_finder_str = implode(', ', $tag_finder); + + $tags = q("select * from term where oid in ( %s ) and otype = %d", + dbesc($tag_finder_str), + intval(TERM_OBJ_POST) + ); + + $items = conv_sort($items,$tags,$ordering); } else { $items = array(); diff --git a/mod/network.php b/mod/network.php index 5ce7a9b57..a136e12d6 100644 --- a/mod/network.php +++ b/mod/network.php @@ -89,6 +89,27 @@ function network_init(&$a) { ); } + $a->page['content'] .= '<div id="slider-range" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"> +<div class="ui-slider-range ui-widget-header" style="margin-left: 30px; margin-right: 30px;"></div> +<a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 0%;"></a> +<a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 100%;"></a> +</div> + <script> + $(function() { + $( "#slider-range" ).slider({ + range: true, + min: 0, + max: 500, + values: [ 75, 300 ], + slide: function( event, ui ) { + $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] ); + } + }); + $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + + " - $" + $( "#slider-range" ).slider( "values", 1 ) ); + }); + </script> +'; // search terms header |