Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if($use_pagination) { ?>
- if(!wpp_pagination_<?php echo $unique_hash; ?>) {
- jQuery("#wpp_shortcode_<?php echo $unique_hash; ?> .wpp_pagination_slider_wrapper").each(function() {
- var this_parent = this;
- /* Slider */
- jQuery('.wpp_pagination_slider', this).slider({
- value:1,
- min: 1,
- max: <?php echo $pages; ?>,
- step: 1,
- slide: function( event, ui ) {
- /* Update page counter - we do it here because we want it to be instant */
- jQuery("#wpp_shortcode_<?php echo $unique_hash; ?> .wpp_current_page_count").text(ui.value);
- jQuery("#wpp_shortcode_<?php echo $unique_hash; ?> .wpp_pagination_slider .slider_page_info .val").text(ui.value);
- },
- stop: function(event, ui) {
- wpp_query_<?php echo $unique_hash; ?> = changeAddressValue(ui.value, wpp_query_<?php echo $unique_hash; ?>);
- }
- });
- /* Fix slider width based on button width */
- var slider_width = (jQuery(this_parent).width() - jQuery(".wpp_pagination_back", this_parent).outerWidth() - jQuery(".wpp_pagination_forward", this_parent).outerWidth() - 30);
- jQuery(".wpp_pagination_slider", this_parent).css('width', slider_width);
- jQuery('.wpp_pagination_slider .ui-slider-handle', this).append('<div class="slider_page_info"><div class="val">1</div><div class="arrow"></div></div>');
- });
- wpp_pagination_<?php echo $unique_hash; ?> = true;
- }
- <?php } ?>
- });
- </script>
- <?php
- $js_result = ob_get_contents();
- ob_end_clean();
- ob_start(); ?>
- <div class="properties_pagination <?php echo $settings['class']; ?> wpp_slider_pagination" id="properties_pagination_<?php echo $unique_hash; ?>">
- <div class="wpp_pagination_slider_status">
- <?php
- if(function_exists('WPPFL_getNumberOfFavorites')) {
- $num_of_favorites = WPPFL_getNumberOfFavorites();
- } else{
- $num_of_favorites = 0;
- }
- $currentTemplate = "";
- if (isset($wpp_query['template'])) {
- $currentTemplate = $wpp_query['template'];
- }
- ?>
- <?php if ($currentTemplate==TEMPLATEPATH . "/list-my-property-content.php") { ?>
- <div class="wppcs-sub-menu">
- <?php global $post;
- $post_name = $post->post_name; ?>
- <?php $class='class="active"'; ?>
- <ul>
- <li <?php if($post_name == 'list-my-property') { echo $class; } ?>>
- <a href="<?php echo get_bloginfo('url'); ?>/list-my-property/">
- View Listed Properties
- </a>
- </li>
- <li <?php if($post_name == 'add-new-property') { echo $class; } ?>>
- <a href="<?php echo get_bloginfo('url'); ?>/list-my-property/add-new-property/">
- Add New Property
- </a>
- </li>
- </ul>
- </div>
- <?php } else { ?>
- <ul class="top_part">
- <li><a>Search results</a></li>
- <li class="favor"><a href="/favourite-properties">My Favourites(<span class="number_of_favorites"><?php echo $num_of_favorites; ?></span>)</a></li>
- </ul>
- <?php } ?>
- <div class="clear"></div>
- </div>
- <?php if($use_pagination) { ?>
- <div class="wpp_pagination_slider_wrapper">
- <div class="wpp_page_numbers_block">
- <span class="numbers-title">Pages</span>
- <?php
- if ($pages < 10) {
- for($i=1; $i<=$pages; $i++) {
- echo '<span class="page_numbers" data-value="'.$i.'">'.$i.'</span>';
- }
- } else {
- for($i=1; $i<=$pages; $i++) {
- if (($i < 4) || ($i>$pages-3)) {
- echo '<span class="page_numbers" data-value="'.$i.'">'.$i.'</span>';
- }
- if ($i==4) {
- echo '<span class="middle-pages"><span class="dotted-separator">...</span></span>';
- }
- }
- }?>
- </div>
- <div class="wpp_pagination_back wpp_pagination_button"><?php _e('Prev', 'wpp'); ?></div>
- <div class="wpp_pagination_forward wpp_pagination_button"><?php _e('Next', 'wpp'); ?></div>
- <div class="wpp_pagination_slider"></div>
- </div>
- <?php } ?>
- </div>
- <div class="ajax_loader"></div>
- <?php
- $html_result = ob_get_contents();
- ob_end_clean();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement