searchwp
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
5 changed files
with
6 additions
and
35 deletions
| ... | @@ -99,14 +99,10 @@ global $wpdb; | ... | @@ -99,14 +99,10 @@ global $wpdb; |
| 99 | ) . '/images/pdf-2.svg" width="20px" style="margin-right:10px;" />'; | 99 | ) . '/images/pdf-2.svg" width="20px" style="margin-right:10px;" />'; |
| 100 | $url = wp_get_attachment_url($post->ID); | 100 | $url = wp_get_attachment_url($post->ID); |
| 101 | $data = 'hidemepdf' . $i . ''; | 101 | $data = 'hidemepdf' . $i . ''; |
| 102 | $class = 'pdfLink'; | 102 | $class = 'no_icon'; |
| 103 | $permalink = "#"; | 103 | $permalink = $url; |
| 104 | ?> | 104 | ?> |
| 105 | <div style="display:none" class="hidemepdf" id="hidemepdf<?php echo $i; ?>" class="hidemepdf"> | 105 | |
| 106 | <?php echo do_shortcode( | ||
| 107 | '[pdfjs-viewer url=' . $url . ' search=' . $_REQUEST['searchvar'] . ' viewer_width=800px viewer_height=700px fullscreen=true download=true print=true]' | ||
| 108 | ); ?> | ||
| 109 | </div> | ||
| 110 | 106 | ||
| 111 | <?php | 107 | <?php |
| 112 | $i++; | 108 | $i++; |
| ... | @@ -129,8 +125,7 @@ global $wpdb; | ... | @@ -129,8 +125,7 @@ global $wpdb; |
| 129 | ?> | 125 | ?> |
| 130 | <div class="post"> | 126 | <div class="post"> |
| 131 | <h3> | 127 | <h3> |
| 132 | <a href="<?php echo $permalink; ?>" class="<?php echo $class; ?>" | 128 | <a href="<?php echo $permalink; ?>" class="<?php echo $class; ?>" target="_blank"> |
| 133 | data="<?php echo $data; ?>" target="_blank"> | ||
| 134 | <?php | 129 | <?php |
| 135 | echo $icon; | 130 | echo $icon; |
| 136 | // highlight the title | 131 | // highlight the title |
| ... | @@ -209,36 +204,12 @@ global $wpdb; | ... | @@ -209,36 +204,12 @@ global $wpdb; |
| 209 | <script> | 204 | <script> |
| 210 | jQuery(document).ready( | 205 | jQuery(document).ready( |
| 211 | function ($) { | 206 | function ($) { |
| 212 | $(".pdfLink").colorbox( | ||
| 213 | { | ||
| 214 | className: 'noButton', top: 150, width: 800, html: function () { | ||
| 215 | var pdfloc = $(this).attr('data'); | ||
| 216 | var pdf = $('#' + pdfloc).html(); | ||
| 217 | return pdf; | ||
| 218 | } | ||
| 219 | } | ||
| 220 | ); | ||
| 221 | 207 | ||
| 222 | $(document).bind( | ||
| 223 | 'cbox_complete', function () { | ||
| 224 | 208 | ||
| 225 | if ($(window).width() < 799) { | ||
| 226 | document.getElementById("fullscreen").click(); | ||
| 227 | } | ||
| 228 | |||
| 229 | $('#colorbox,#cboxOverlay,#cboxWrapper').css('z-index', '99999999'); | ||
| 230 | } | ||
| 231 | ); | ||
| 232 | 209 | ||
| 233 | $("#findInput").val("<?php echo $_REQUEST['searchvar'];?>"); | 210 | $("#findInput").val("<?php echo $_REQUEST['searchvar'];?>"); |
| 234 | 211 | ||
| 235 | $('<a id="cboxCloseBox" style="float:right;right:0px;position:absolute;" href="javascript:void(0)">close</a>').appendTo("#cboxTopRight"); | ||
| 236 | 212 | ||
| 237 | $("#cboxCloseBox").click( | ||
| 238 | function () { | ||
| 239 | document.getElementById("cboxClose").click(); | ||
| 240 | } | ||
| 241 | ); | ||
| 242 | 213 | ||
| 243 | var smallMenu = jQuery('.col-sm-smallMenu'); | 214 | var smallMenu = jQuery('.col-sm-smallMenu'); |
| 244 | // Change zIndex when a user hovers the side menu | 215 | // Change zIndex when a user hovers the side menu | ... | ... |
| ... | @@ -76,7 +76,7 @@ function theme_broker_enqueue_scripts() | ... | @@ -76,7 +76,7 @@ function theme_broker_enqueue_scripts() |
| 76 | || get_post_type() == 'notifications' | 76 | || get_post_type() == 'notifications' |
| 77 | ) { | 77 | ) { |
| 78 | wp_enqueue_style('global', get_bloginfo('template_url') . '/styles/brokers/landing-page/broker_landing.css', [], "0.0.67"); | 78 | wp_enqueue_style('global', get_bloginfo('template_url') . '/styles/brokers/landing-page/broker_landing.css', [], "0.0.67"); |
| 79 | wp_enqueue_style('broker_new', get_bloginfo('template_url') . '/styles/broker_new.css', [], "0.0.71"); | 79 | wp_enqueue_style('broker_new', get_bloginfo('template_url') . '/styles/broker_new.css', [], "0.0.72"); |
| 80 | wp_enqueue_script('script', get_bloginfo('template_url') . '/scripts/script.js', [], "0.0.12", true); | 80 | wp_enqueue_script('script', get_bloginfo('template_url') . '/scripts/script.js', [], "0.0.12", true); |
| 81 | wp_enqueue_style('main', get_bloginfo('template_url') . '/styles/main.css', [], "0.0.830"); | 81 | wp_enqueue_style('main', get_bloginfo('template_url') . '/styles/main.css', [], "0.0.830"); |
| 82 | 82 | ... | ... |
| ... | @@ -1008,7 +1008,7 @@ a[href$=".doc"]:hover, a[href$=".pdf"]:hover { | ... | @@ -1008,7 +1008,7 @@ a[href$=".doc"]:hover, a[href$=".pdf"]:hover { |
| 1008 | 1008 | ||
| 1009 | a[href$=".doc"]:before, | 1009 | a[href$=".doc"]:before, |
| 1010 | a[href$=".docx"]:before, | 1010 | a[href$=".docx"]:before, |
| 1011 | a[href$=".pdf"]:before { | 1011 | a:not(.no_icon)[href$=".pdf"]:before { |
| 1012 | 1012 | ||
| 1013 | background-image: url(../images/pdf@3x.png) !important; | 1013 | background-image: url(../images/pdf@3x.png) !important; |
| 1014 | background-repeat: no-repeat; | 1014 | background-repeat: no-repeat; | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
-
Please register or sign in to post a comment