Version Description
- constructor method for WP_Widget is updated.
Download this release
Release Info
Developer | contact-banker |
Plugin | Contact Bank: WordPress Form Builder for Contact Forms |
Version | 2.0.228 |
Comparing to | |
See all releases |
Code changes from version 2.0.227 to 2.0.228
- assets/js/jquery.prettyPhoto.js +689 -909
- contact-bank.php +2 -2
- readme.txt +6 -3
assets/js/jquery.prettyPhoto.js
CHANGED
@@ -1,911 +1,691 @@
|
|
1 |
/* ------------------------------------------------------------------------
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
};
|
691 |
-
};
|
692 |
-
|
693 |
-
function _get_scroll(){
|
694 |
-
if (self.pageYOffset) {
|
695 |
-
return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};
|
696 |
-
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
697 |
-
return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};
|
698 |
-
} else if (document.body) {// all other Explorers
|
699 |
-
return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};
|
700 |
-
};
|
701 |
-
};
|
702 |
-
|
703 |
-
function _resize_overlay() {
|
704 |
-
windowHeight = $(window).height(), windowWidth = $(window).width();
|
705 |
-
|
706 |
-
if(typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth);
|
707 |
-
};
|
708 |
-
|
709 |
-
function _insert_gallery(){
|
710 |
-
if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image") {
|
711 |
-
itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
|
712 |
-
navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme
|
713 |
-
|
714 |
-
itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);
|
715 |
-
itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length;
|
716 |
-
totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1;
|
717 |
-
|
718 |
-
// Hide the nav in the case there's no need for links
|
719 |
-
if(totalPage == 0){
|
720 |
-
navWidth = 0; // No nav means no width!
|
721 |
-
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();
|
722 |
-
}else{
|
723 |
-
$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();
|
724 |
-
};
|
725 |
-
|
726 |
-
galleryWidth = itemsPerPage * itemWidth;
|
727 |
-
fullGalleryWidth = pp_images.length * itemWidth;
|
728 |
-
|
729 |
-
// Set the proper width to the gallery items
|
730 |
-
$pp_gallery
|
731 |
-
.css('margin-left',-((galleryWidth/2) + (navWidth/2)))
|
732 |
-
.find('div:first').width(galleryWidth+5)
|
733 |
-
.find('ul').width(fullGalleryWidth)
|
734 |
-
.find('li.selected').removeClass('selected');
|
735 |
-
|
736 |
-
goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage;
|
737 |
-
|
738 |
-
$.prettyPhoto.changeGalleryPage(goToPage);
|
739 |
-
|
740 |
-
$pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');
|
741 |
-
}else{
|
742 |
-
$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');
|
743 |
-
// $pp_gallery.hide();
|
744 |
-
}
|
745 |
-
}
|
746 |
-
|
747 |
-
function _build_overlay(caller){
|
748 |
-
// Inject Social Tool markup into General markup
|
749 |
-
if(settings.social_tools)
|
750 |
-
facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));
|
751 |
-
|
752 |
-
settings.markup = settings.markup.replace('{pp_social}','');
|
753 |
-
|
754 |
-
$('body').append(settings.markup); // Inject the markup
|
755 |
-
|
756 |
-
$pp_pic_holder = $('.pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors
|
757 |
-
|
758 |
-
// Inject the inline gallery!
|
759 |
-
if(isSet && settings.overlay_gallery) {
|
760 |
-
currentGalleryPage = 0;
|
761 |
-
toInject = "";
|
762 |
-
for (var i=0; i < pp_images.length; i++) {
|
763 |
-
if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){
|
764 |
-
classname = 'default';
|
765 |
-
img_src = '';
|
766 |
-
}else{
|
767 |
-
classname = '';
|
768 |
-
img_src = pp_images[i];
|
769 |
-
}
|
770 |
-
toInject += "<li class='"+classname+"'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>";
|
771 |
-
};
|
772 |
-
|
773 |
-
toInject = settings.gallery_markup.replace(/{gallery}/g,toInject);
|
774 |
-
|
775 |
-
$pp_pic_holder.find('#pp_full_res').after(toInject);
|
776 |
-
|
777 |
-
$pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors
|
778 |
-
|
779 |
-
$pp_gallery.find('.pp_arrow_next').click(function(){
|
780 |
-
$.prettyPhoto.changeGalleryPage('next');
|
781 |
-
$.prettyPhoto.stopSlideshow();
|
782 |
-
return false;
|
783 |
-
});
|
784 |
-
|
785 |
-
$pp_gallery.find('.pp_arrow_previous').click(function(){
|
786 |
-
$.prettyPhoto.changeGalleryPage('previous');
|
787 |
-
$.prettyPhoto.stopSlideshow();
|
788 |
-
return false;
|
789 |
-
});
|
790 |
-
|
791 |
-
$pp_pic_holder.find('.pp_content').hover(
|
792 |
-
function(){
|
793 |
-
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();
|
794 |
-
},
|
795 |
-
function(){
|
796 |
-
$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();
|
797 |
-
});
|
798 |
-
|
799 |
-
itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
|
800 |
-
$pp_gallery_li.each(function(i){
|
801 |
-
$(this)
|
802 |
-
.find('a')
|
803 |
-
.click(function(){
|
804 |
-
$.prettyPhoto.changePage(i);
|
805 |
-
$.prettyPhoto.stopSlideshow();
|
806 |
-
return false;
|
807 |
-
});
|
808 |
-
});
|
809 |
-
};
|
810 |
-
|
811 |
-
|
812 |
-
// Inject the play/pause if it's a slideshow
|
813 |
-
if(settings.slideshow){
|
814 |
-
$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
|
815 |
-
$pp_pic_holder.find('.pp_nav .pp_play').click(function(){
|
816 |
-
$.prettyPhoto.startSlideshow();
|
817 |
-
return false;
|
818 |
-
});
|
819 |
-
}
|
820 |
-
|
821 |
-
$pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme
|
822 |
-
|
823 |
-
$pp_overlay
|
824 |
-
.css({
|
825 |
-
'opacity':0,
|
826 |
-
'height':$(document).height(),
|
827 |
-
'width':$(window).width()
|
828 |
-
})
|
829 |
-
.bind('click',function(){
|
830 |
-
if(!settings.modal) $.prettyPhoto.close();
|
831 |
-
});
|
832 |
-
|
833 |
-
$('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; });
|
834 |
-
|
835 |
-
|
836 |
-
if(settings.allow_expand) {
|
837 |
-
$('a.pp_expand').bind('click',function(e){
|
838 |
-
// Expand the image
|
839 |
-
if($(this).hasClass('pp_expand')){
|
840 |
-
$(this).removeClass('pp_expand').addClass('pp_contract');
|
841 |
-
doresize = false;
|
842 |
-
}else{
|
843 |
-
$(this).removeClass('pp_contract').addClass('pp_expand');
|
844 |
-
doresize = true;
|
845 |
-
};
|
846 |
-
|
847 |
-
_hideContent(function(){ $.prettyPhoto.open(); });
|
848 |
-
|
849 |
-
return false;
|
850 |
-
});
|
851 |
-
}
|
852 |
-
|
853 |
-
$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){
|
854 |
-
$.prettyPhoto.changePage('previous');
|
855 |
-
$.prettyPhoto.stopSlideshow();
|
856 |
-
return false;
|
857 |
-
});
|
858 |
-
|
859 |
-
$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){
|
860 |
-
$.prettyPhoto.changePage('next');
|
861 |
-
$.prettyPhoto.stopSlideshow();
|
862 |
-
return false;
|
863 |
-
});
|
864 |
-
|
865 |
-
_center_overlay(); // Center it
|
866 |
-
};
|
867 |
-
|
868 |
-
if(!pp_alreadyInitialized && getHashtag()){
|
869 |
-
pp_alreadyInitialized = true;
|
870 |
-
|
871 |
-
// Grab the rel index to trigger the click on the correct element
|
872 |
-
hashIndex = getHashtag();
|
873 |
-
hashRel = hashIndex;
|
874 |
-
hashIndex = hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);
|
875 |
-
hashRel = hashRel.substring(0,hashRel.indexOf('/'));
|
876 |
-
|
877 |
-
// Little timeout to make sure all the prettyPhoto initialize scripts has been run.
|
878 |
-
// Useful in the event the page contain several init scripts.
|
879 |
-
setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50);
|
880 |
-
}
|
881 |
-
|
882 |
-
return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
|
883 |
-
};
|
884 |
-
|
885 |
-
function getHashtag(){
|
886 |
-
var url = location.href;
|
887 |
-
hashtag = (url.indexOf('#prettyPhoto') !== -1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)) : false;
|
888 |
-
if(hashtag){ hashtag = hashtag.replace(/<|>/g,''); }
|
889 |
-
return hashtag;
|
890 |
-
};
|
891 |
-
|
892 |
-
function setHashtag(){
|
893 |
-
if(typeof theRel == 'undefined') return; // theRel is set on normal calls, it's impossible to deeplink using the API
|
894 |
-
location.hash = theRel + '/'+rel_index+'/';
|
895 |
-
};
|
896 |
-
|
897 |
-
function clearHashtag(){
|
898 |
-
if ( location.href.indexOf('#prettyPhoto') !== -1 ) location.hash = "prettyPhoto";
|
899 |
-
}
|
900 |
-
|
901 |
-
function getParam(name,url){
|
902 |
-
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
|
903 |
-
var regexS = "[\\?&]"+name+"=([^&#]*)";
|
904 |
-
var regex = new RegExp( regexS );
|
905 |
-
var results = regex.exec( url );
|
906 |
-
return ( results == null ) ? "" : results[1];
|
907 |
-
}
|
908 |
-
|
909 |
})(jQuery);
|
910 |
-
|
911 |
-
var pp_alreadyInitialized = false; // Used for the deep linking to make sure not to call the same function several times.
|
1 |
/* ------------------------------------------------------------------------
|
2 |
+
prettyPhoto v3.1.5
|
3 |
+
© Copyright, Stephane Caron
|
4 |
+
http://www.no-margin-for-errors.com
|
5 |
+
|
6 |
+
|
7 |
+
============================= Released under =============================
|
8 |
+
|
9 |
+
GPLV2 license
|
10 |
+
http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
|
12 |
+
You are free to use prettyPhoto in commercial projects as long as the
|
13 |
+
copyright header is left intact.
|
14 |
+
|
15 |
+
============================ More information ============================
|
16 |
+
http://www.no-margin-for-errors.com/projects/prettyPhoto/
|
17 |
+
|
18 |
+
|
19 |
+
============================== Description ===============================
|
20 |
+
|
21 |
+
prettyPhoto is a jQuery based lightbox clone. Not only does it support images,
|
22 |
+
it also add support for videos, flash, YouTube, iFrame. It's a full blown
|
23 |
+
media modal box.
|
24 |
+
|
25 |
+
Please refer to http://www.no-margin-for-errors.com/projects/prettyPhoto/
|
26 |
+
for all the details on how to use.
|
27 |
+
------------------------------------------------------------------------- */
|
28 |
+
|
29 |
+
(function (e) {
|
30 |
+
function t() {
|
31 |
+
var e = location.href;
|
32 |
+
hashtag = e.indexOf("#prettyPhoto") !== -1 ? decodeURI(e.substring(e.indexOf("#prettyPhoto") + 1, e.length)) : false;
|
33 |
+
return hashtag
|
34 |
+
}
|
35 |
+
|
36 |
+
function n() {
|
37 |
+
if (typeof theRel == "undefined")
|
38 |
+
return;
|
39 |
+
location.hash = theRel + "/" + rel_index + "/"
|
40 |
+
}
|
41 |
+
|
42 |
+
function r() {
|
43 |
+
if (location.href.indexOf("#prettyPhoto") !== -1)
|
44 |
+
location.hash = "prettyPhoto"
|
45 |
+
}
|
46 |
+
|
47 |
+
function i(e, t) {
|
48 |
+
e = e.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
49 |
+
var n = "[\\?&]" + e + "=([^&#]*)";
|
50 |
+
var r = new RegExp(n);
|
51 |
+
var i = r.exec(t);
|
52 |
+
return i == null ? "" : i[1]
|
53 |
+
}
|
54 |
+
|
55 |
+
e.prettyPhoto = {
|
56 |
+
version: "3.1.5"
|
57 |
+
};
|
58 |
+
e.fn.prettyPhoto = function (s) {
|
59 |
+
function g() {
|
60 |
+
e(".pp_loaderIcon").hide();
|
61 |
+
projectedTop = scroll_pos["scrollTop"] + (d / 2 - a["containerHeight"] / 2);
|
62 |
+
if (projectedTop < 0)
|
63 |
+
projectedTop = 0;
|
64 |
+
$ppt.fadeTo(settings.animation_speed, 1);
|
65 |
+
$pp_pic_holder.find(".pp_content").animate({
|
66 |
+
height: a["contentHeight"],
|
67 |
+
width: a["contentWidth"]
|
68 |
+
}, settings.animation_speed);
|
69 |
+
$pp_pic_holder.animate({
|
70 |
+
top: projectedTop,
|
71 |
+
left: v / 2 - a["containerWidth"] / 2 < 0 ? 0 : v / 2 - a["containerWidth"] / 2,
|
72 |
+
width: a["containerWidth"]
|
73 |
+
}, settings.animation_speed, function () {
|
74 |
+
$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);
|
75 |
+
$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);
|
76 |
+
if (isSet && S(pp_images[set_position]) == "image") {
|
77 |
+
$pp_pic_holder.find(".pp_hoverContainer").show()
|
78 |
+
} else {
|
79 |
+
$pp_pic_holder.find(".pp_hoverContainer").hide()
|
80 |
+
}
|
81 |
+
if (settings.allow_expand) {
|
82 |
+
if (a["resized"]) {
|
83 |
+
e("a.pp_expand,a.pp_contract").show()
|
84 |
+
} else {
|
85 |
+
e("a.pp_expand").hide()
|
86 |
+
}
|
87 |
+
}
|
88 |
+
if (settings.autoplay_slideshow && !m && !f)
|
89 |
+
e.prettyPhoto.startSlideshow();
|
90 |
+
settings.changepicturecallback();
|
91 |
+
f = true
|
92 |
+
});
|
93 |
+
C();
|
94 |
+
s.ajaxcallback()
|
95 |
+
}
|
96 |
+
|
97 |
+
function y(t) {
|
98 |
+
$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", "hidden");
|
99 |
+
$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed, function () {
|
100 |
+
e(".pp_loaderIcon").show();
|
101 |
+
t()
|
102 |
+
})
|
103 |
+
}
|
104 |
+
|
105 |
+
function b(t) {
|
106 |
+
t > 1 ? e(".pp_nav").show() : e(".pp_nav").hide()
|
107 |
+
}
|
108 |
+
|
109 |
+
function w(e, t) {
|
110 |
+
resized = false;
|
111 |
+
E(e, t);
|
112 |
+
imageWidth = e, imageHeight = t;
|
113 |
+
if ((p > v || h > d) && doresize && settings.allow_resize && !u) {
|
114 |
+
resized = true, fitting = false;
|
115 |
+
while (!fitting) {
|
116 |
+
if (p > v) {
|
117 |
+
imageWidth = v - 200;
|
118 |
+
imageHeight = t / e * imageWidth
|
119 |
+
} else if (h > d) {
|
120 |
+
imageHeight = d - 200;
|
121 |
+
imageWidth = e / t * imageHeight
|
122 |
+
} else {
|
123 |
+
fitting = true
|
124 |
+
}
|
125 |
+
h = imageHeight, p = imageWidth
|
126 |
+
}
|
127 |
+
if (p > v || h > d) {
|
128 |
+
w(p, h)
|
129 |
+
}
|
130 |
+
E(imageWidth, imageHeight)
|
131 |
+
}
|
132 |
+
return {
|
133 |
+
width: Math.floor(imageWidth),
|
134 |
+
height: Math.floor(imageHeight),
|
135 |
+
containerHeight: Math.floor(h),
|
136 |
+
containerWidth: Math.floor(p) + settings.horizontal_padding * 2,
|
137 |
+
contentHeight: Math.floor(l),
|
138 |
+
contentWidth: Math.floor(c),
|
139 |
+
resized: resized
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
function E(t, n) {
|
144 |
+
t = parseFloat(t);
|
145 |
+
n = parseFloat(n);
|
146 |
+
$pp_details = $pp_pic_holder.find(".pp_details");
|
147 |
+
$pp_details.width(t);
|
148 |
+
detailsHeight = parseFloat($pp_details.css("marginTop")) + parseFloat($pp_details.css("marginBottom"));
|
149 |
+
$pp_details = $pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({
|
150 |
+
position: "absolute",
|
151 |
+
top: -1e4
|
152 |
+
});
|
153 |
+
detailsHeight += $pp_details.height();
|
154 |
+
detailsHeight = detailsHeight <= 34 ? 36 : detailsHeight;
|
155 |
+
$pp_details.remove();
|
156 |
+
$pp_title = $pp_pic_holder.find(".ppt");
|
157 |
+
$pp_title.width(t);
|
158 |
+
titleHeight = parseFloat($pp_title.css("marginTop")) + parseFloat($pp_title.css("marginBottom"));
|
159 |
+
$pp_title = $pp_title.clone().appendTo(e("body")).css({
|
160 |
+
position: "absolute",
|
161 |
+
top: -1e4
|
162 |
+
});
|
163 |
+
titleHeight += $pp_title.height();
|
164 |
+
$pp_title.remove();
|
165 |
+
l = n + detailsHeight;
|
166 |
+
c = t;
|
167 |
+
h = l + titleHeight + $pp_pic_holder.find(".pp_top").height() + $pp_pic_holder.find(".pp_bottom").height();
|
168 |
+
p = t
|
169 |
+
}
|
170 |
+
|
171 |
+
function S(e) {
|
172 |
+
if (e.match(/youtube\.com\/watch/i) || e.match(/youtu\.be/i)) {
|
173 |
+
return "youtube"
|
174 |
+
} else if (e.match(/vimeo\.com/i)) {
|
175 |
+
return "vimeo"
|
176 |
+
} else if (e.match(/\b.mov\b/i)) {
|
177 |
+
return "quicktime"
|
178 |
+
} else if (e.match(/\b.swf\b/i)) {
|
179 |
+
return "flash"
|
180 |
+
} else if (e.match(/\biframe=true\b/i)) {
|
181 |
+
return "iframe"
|
182 |
+
} else if (e.match(/\bajax=true\b/i)) {
|
183 |
+
return "ajax"
|
184 |
+
} else if (e.match(/\bcustom=true\b/i)) {
|
185 |
+
return "custom"
|
186 |
+
} else if (e.substr(0, 1) == "#") {
|
187 |
+
return "inline"
|
188 |
+
} else {
|
189 |
+
return "image"
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
function x() {
|
194 |
+
if (doresize && typeof $pp_pic_holder != "undefined") {
|
195 |
+
scroll_pos = T();
|
196 |
+
contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width();
|
197 |
+
projectedTop = d / 2 + scroll_pos["scrollTop"] - contentHeight / 2;
|
198 |
+
if (projectedTop < 0)
|
199 |
+
projectedTop = 0;
|
200 |
+
if (contentHeight > d)
|
201 |
+
return;
|
202 |
+
$pp_pic_holder.css({
|
203 |
+
top: projectedTop,
|
204 |
+
left: v / 2 + scroll_pos["scrollLeft"] - contentwidth / 2
|
205 |
+
})
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
function T() {
|
210 |
+
if (self.pageYOffset) {
|
211 |
+
return {
|
212 |
+
scrollTop: self.pageYOffset,
|
213 |
+
scrollLeft: self.pageXOffset
|
214 |
+
}
|
215 |
+
} else if (document.documentElement && document.documentElement.scrollTop) {
|
216 |
+
return {
|
217 |
+
scrollTop: document.documentElement.scrollTop,
|
218 |
+
scrollLeft: document.documentElement.scrollLeft
|
219 |
+
}
|
220 |
+
} else if (document.body) {
|
221 |
+
return {
|
222 |
+
scrollTop: document.body.scrollTop,
|
223 |
+
scrollLeft: document.body.scrollLeft
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
|
228 |
+
function N() {
|
229 |
+
d = e(window).height(), v = e(window).width();
|
230 |
+
if (typeof $pp_overlay != "undefined")
|
231 |
+
$pp_overlay.height(e(document).height()).width(v)
|
232 |
+
}
|
233 |
+
|
234 |
+
function C() {
|
235 |
+
if (isSet && settings.overlay_gallery && S(pp_images[set_position]) == "image") {
|
236 |
+
itemWidth = 52 + 5;
|
237 |
+
navWidth = settings.theme == "facebook" || settings.theme == "pp_default" ? 50 : 30;
|
238 |
+
itemsPerPage = Math.floor((a["containerWidth"] - 100 - navWidth) / itemWidth);
|
239 |
+
itemsPerPage = itemsPerPage < pp_images.length ? itemsPerPage : pp_images.length;
|
240 |
+
totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1;
|
241 |
+
if (totalPage == 0) {
|
242 |
+
navWidth = 0;
|
243 |
+
$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()
|
244 |
+
} else {
|
245 |
+
$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show()
|
246 |
+
}
|
247 |
+
galleryWidth = itemsPerPage * itemWidth;
|
248 |
+
fullGalleryWidth = pp_images.length * itemWidth;
|
249 |
+
$pp_gallery.css("margin-left", -(galleryWidth / 2 + navWidth / 2)).find("div:first").width(galleryWidth + 5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected");
|
250 |
+
goToPage = Math.floor(set_position / itemsPerPage) < totalPage ? Math.floor(set_position / itemsPerPage) : totalPage;
|
251 |
+
e.prettyPhoto.changeGalleryPage(goToPage);
|
252 |
+
$pp_gallery_li.filter(":eq(" + set_position + ")").addClass("selected")
|
253 |
+
} else {
|
254 |
+
$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
function k(t) {
|
259 |
+
if (settings.social_tools)
|
260 |
+
facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href));
|
261 |
+
settings.markup = settings.markup.replace("{pp_social}", "");
|
262 |
+
e("body").append(settings.markup);
|
263 |
+
$pp_pic_holder = e(".pp_pic_holder"), $ppt = e(".ppt"), $pp_overlay = e("div.pp_overlay");
|
264 |
+
if (isSet && settings.overlay_gallery) {
|
265 |
+
currentGalleryPage = 0;
|
266 |
+
toInject = "";
|
267 |
+
for (var n = 0; n < pp_images.length; n++) {
|
268 |
+
if (!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)) {
|
269 |
+
classname = "default";
|
270 |
+
img_src = ""
|
271 |
+
} else {
|
272 |
+
classname = "";
|
273 |
+
img_src = pp_images[n]
|
274 |
+
}
|
275 |
+
toInject += "<li class='" + classname + "'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>"
|
276 |
+
}
|
277 |
+
toInject = settings.gallery_markup.replace(/{gallery}/g, toInject);
|
278 |
+
$pp_pic_holder.find("#pp_full_res").after(toInject);
|
279 |
+
$pp_gallery = e(".pp_pic_holder .pp_gallery"), $pp_gallery_li = $pp_gallery.find("li");
|
280 |
+
$pp_gallery.find(".pp_arrow_next").click(function () {
|
281 |
+
e.prettyPhoto.changeGalleryPage("next");
|
282 |
+
e.prettyPhoto.stopSlideshow();
|
283 |
+
return false
|
284 |
+
});
|
285 |
+
$pp_gallery.find(".pp_arrow_previous").click(function () {
|
286 |
+
e.prettyPhoto.changeGalleryPage("previous");
|
287 |
+
e.prettyPhoto.stopSlideshow();
|
288 |
+
return false
|
289 |
+
});
|
290 |
+
$pp_pic_holder.find(".pp_content").hover(function () {
|
291 |
+
$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()
|
292 |
+
}, function () {
|
293 |
+
$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()
|
294 |
+
});
|
295 |
+
itemWidth = 52 + 5;
|
296 |
+
$pp_gallery_li.each(function (t) {
|
297 |
+
e(this).find("a").click(function () {
|
298 |
+
e.prettyPhoto.changePage(t);
|
299 |
+
e.prettyPhoto.stopSlideshow();
|
300 |
+
return false
|
301 |
+
})
|
302 |
+
})
|
303 |
+
}
|
304 |
+
if (settings.slideshow) {
|
305 |
+
$pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>');
|
306 |
+
$pp_pic_holder.find(".pp_nav .pp_play").click(function () {
|
307 |
+
e.prettyPhoto.startSlideshow();
|
308 |
+
return false
|
309 |
+
})
|
310 |
+
}
|
311 |
+
$pp_pic_holder.attr("class", "pp_pic_holder " + settings.theme);
|
312 |
+
$pp_overlay.css({
|
313 |
+
opacity: 0,
|
314 |
+
height: e(document).height(),
|
315 |
+
width: e(window).width()
|
316 |
+
}).bind("click", function () {
|
317 |
+
if (!settings.modal)
|
318 |
+
e.prettyPhoto.close()
|
319 |
+
});
|
320 |
+
e("a.pp_close").bind("click", function () {
|
321 |
+
e.prettyPhoto.close();
|
322 |
+
return false
|
323 |
+
});
|
324 |
+
if (settings.allow_expand) {
|
325 |
+
e("a.pp_expand").bind("click", function (t) {
|
326 |
+
if (e(this).hasClass("pp_expand")) {
|
327 |
+
e(this).removeClass("pp_expand").addClass("pp_contract");
|
328 |
+
doresize = false
|
329 |
+
} else {
|
330 |
+
e(this).removeClass("pp_contract").addClass("pp_expand");
|
331 |
+
doresize = true
|
332 |
+
}
|
333 |
+
y(function () {
|
334 |
+
e.prettyPhoto.open()
|
335 |
+
});
|
336 |
+
return false
|
337 |
+
})
|
338 |
+
}
|
339 |
+
$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click", function () {
|
340 |
+
e.prettyPhoto.changePage("previous");
|
341 |
+
e.prettyPhoto.stopSlideshow();
|
342 |
+
return false
|
343 |
+
});
|
344 |
+
$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click", function () {
|
345 |
+
e.prettyPhoto.changePage("next");
|
346 |
+
e.prettyPhoto.stopSlideshow();
|
347 |
+
return false
|
348 |
+
});
|
349 |
+
x()
|
350 |
+
}
|
351 |
+
|
352 |
+
s = jQuery.extend({
|
353 |
+
hook: "rel",
|
354 |
+
animation_speed: "fast",
|
355 |
+
ajaxcallback: function () {
|
356 |
+
},
|
357 |
+
slideshow: 5e3,
|
358 |
+
autoplay_slideshow: false,
|
359 |
+
opacity: .8,
|
360 |
+
show_title: true,
|
361 |
+
allow_resize: true,
|
362 |
+
allow_expand: false,
|
363 |
+
default_width: 500,
|
364 |
+
default_height: 344,
|
365 |
+
counter_separator_label: "/",
|
366 |
+
theme: "pp_default",
|
367 |
+
horizontal_padding: 20,
|
368 |
+
hideflash: false,
|
369 |
+
wmode: "opaque",
|
370 |
+
autoplay: true,
|
371 |
+
modal: false,
|
372 |
+
deeplinking: true,
|
373 |
+
overlay_gallery: false,
|
374 |
+
overlay_gallery_max: 30,
|
375 |
+
keyboard_shortcuts: true,
|
376 |
+
changepicturecallback: function () {
|
377 |
+
},
|
378 |
+
callback: function () {
|
379 |
+
},
|
380 |
+
ie6_fallback: true,
|
381 |
+
markup: '<div class="pp_pic_holder"> <div class="ppt"></div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <div class="pp_hoverContainer"> <div class="pp_description"></div> </div> <div id="pp_full_res"></div> <div class="pp_details"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next">Next</a> </div> <div class="pp_social">{pp_social}</div> <a class="pp_close" href="#">Close</a> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>',
|
382 |
+
gallery_markup: '<div class="pp_gallery"> </div>',
|
383 |
+
image_markup: '<img id="fullResImage" src="{path}" />',
|
384 |
+
flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
|
385 |
+
quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',
|
386 |
+
iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
|
387 |
+
inline_markup: '<div class="pp_inline">{content}</div>',
|
388 |
+
custom_markup: "",
|
389 |
+
social_tools: ''
|
390 |
+
//social_tools : '<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'
|
391 |
+
}, s);
|
392 |
+
var o = this, u = false, a, f, l, c, h, p, d = e(window).height(), v = e(window).width(), m;
|
393 |
+
doresize = true, scroll_pos = T();
|
394 |
+
e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto", function () {
|
395 |
+
x();
|
396 |
+
N()
|
397 |
+
});
|
398 |
+
if (s.keyboard_shortcuts) {
|
399 |
+
e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto", function (t) {
|
400 |
+
if (typeof $pp_pic_holder != "undefined") {
|
401 |
+
if ($pp_pic_holder.is(":visible")) {
|
402 |
+
switch (t.keyCode) {
|
403 |
+
case 37:
|
404 |
+
e.prettyPhoto.changePage("previous");
|
405 |
+
t.preventDefault();
|
406 |
+
break;
|
407 |
+
case 39:
|
408 |
+
e.prettyPhoto.changePage("next");
|
409 |
+
t.preventDefault();
|
410 |
+
break;
|
411 |
+
case 27:
|
412 |
+
if (!settings.modal)
|
413 |
+
e.prettyPhoto.close();
|
414 |
+
t.preventDefault();
|
415 |
+
break
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
})
|
420 |
+
}
|
421 |
+
e.prettyPhoto.initialize = function () {
|
422 |
+
settings = s;
|
423 |
+
if (settings.theme == "pp_default")
|
424 |
+
settings.horizontal_padding = 16;
|
425 |
+
theRel = e(this).attr(settings.hook);
|
426 |
+
galleryRegExp = /\[(?:.*)\]/;
|
427 |
+
isSet = galleryRegExp.exec(theRel) ? true : false;
|
428 |
+
pp_images = isSet ? jQuery.map(o, function (t, n) {
|
429 |
+
if (e(t).attr(settings.hook).indexOf(theRel) != -1)
|
430 |
+
return e(t).attr("href")
|
431 |
+
}) : e.makeArray(e(this).attr("href"));
|
432 |
+
pp_titles = isSet ? jQuery.map(o, function (t, n) {
|
433 |
+
if (e(t).attr(settings.hook).indexOf(theRel) != -1)
|
434 |
+
return e(t).find("img").attr("alt") ? e(t).find("img").attr("alt") : ""
|
435 |
+
}) : e.makeArray(e(this).find("img").attr("alt"));
|
436 |
+
pp_descriptions = isSet ? jQuery.map(o, function (t, n) {
|
437 |
+
if (e(t).attr(settings.hook).indexOf(theRel) != -1)
|
438 |
+
return e(t).attr("data-title") ? e(t).attr("data-title") : ""
|
439 |
+
}) : e.makeArray(e(this).attr("data-title"));
|
440 |
+
if (pp_images.length > settings.overlay_gallery_max)
|
441 |
+
settings.overlay_gallery = false;
|
442 |
+
set_position = jQuery.inArray(e(this).attr("href"), pp_images);
|
443 |
+
rel_index = isSet ? set_position : e("a[" + settings.hook + "^='" + theRel + "']").index(e(this));
|
444 |
+
k(this);
|
445 |
+
if (settings.allow_resize)
|
446 |
+
e(window).bind("scroll.prettyphoto", function () {
|
447 |
+
x()
|
448 |
+
});
|
449 |
+
e.prettyPhoto.open();
|
450 |
+
return false
|
451 |
+
};
|
452 |
+
e.prettyPhoto.open = function (t) {
|
453 |
+
if (typeof settings == "undefined") {
|
454 |
+
settings = s;
|
455 |
+
pp_images = e.makeArray(arguments[0]);
|
456 |
+
pp_titles = arguments[1] ? e.makeArray(arguments[1]) : e.makeArray("");
|
457 |
+
pp_descriptions = arguments[2] ? e.makeArray(arguments[2]) : e.makeArray("");
|
458 |
+
isSet = pp_images.length > 1 ? true : false;
|
459 |
+
set_position = arguments[3] ? arguments[3] : 0;
|
460 |
+
k(t.target)
|
461 |
+
}
|
462 |
+
if (settings.hideflash)
|
463 |
+
e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "hidden");
|
464 |
+
b(e(pp_images).size());
|
465 |
+
e(".pp_loaderIcon").show();
|
466 |
+
if (settings.deeplinking)
|
467 |
+
n();
|
468 |
+
if (settings.social_tools) {
|
469 |
+
facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href));
|
470 |
+
$pp_pic_holder.find(".pp_social").html(facebook_like_link)
|
471 |
+
}
|
472 |
+
if ($ppt.is(":hidden"))
|
473 |
+
$ppt.css("opacity", 0).show();
|
474 |
+
$pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity);
|
475 |
+
$pp_pic_holder.find(".currentTextHolder").text(set_position + 1 + settings.counter_separator_label + e(pp_images).size());
|
476 |
+
if (typeof pp_descriptions[set_position] != "undefined" && pp_descriptions[set_position] != "") {
|
477 |
+
$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))
|
478 |
+
} else {
|
479 |
+
$pp_pic_holder.find(".pp_description").hide()
|
480 |
+
}
|
481 |
+
movie_width = parseFloat(i("width", pp_images[set_position])) ? i("width", pp_images[set_position]) : settings.default_width.toString();
|
482 |
+
movie_height = parseFloat(i("height", pp_images[set_position])) ? i("height", pp_images[set_position]) : settings.default_height.toString();
|
483 |
+
u = false;
|
484 |
+
if (movie_height.indexOf("%") != -1) {
|
485 |
+
movie_height = parseFloat(e(window).height() * parseFloat(movie_height) / 100 - 150);
|
486 |
+
u = true
|
487 |
+
}
|
488 |
+
if (movie_width.indexOf("%") != -1) {
|
489 |
+
movie_width = parseFloat(e(window).width() * parseFloat(movie_width) / 100 - 150);
|
490 |
+
u = true
|
491 |
+
}
|
492 |
+
$pp_pic_holder.fadeIn(function () {
|
493 |
+
settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined" ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(" ");
|
494 |
+
imgPreloader = "";
|
495 |
+
skipInjection = false;
|
496 |
+
switch (S(pp_images[set_position])) {
|
497 |
+
case"image":
|
498 |
+
imgPreloader = new Image;
|
499 |
+
nextImage = new Image;
|
500 |
+
if (isSet && set_position < e(pp_images).size() - 1)
|
501 |
+
nextImage.src = pp_images[set_position + 1];
|
502 |
+
prevImage = new Image;
|
503 |
+
if (isSet && pp_images[set_position - 1])
|
504 |
+
prevImage.src = pp_images[set_position - 1];
|
505 |
+
$pp_pic_holder.find("#pp_full_res")[0].innerHTML = settings.image_markup.replace(/{path}/g, pp_images[set_position]);
|
506 |
+
imgPreloader.onload = function () {
|
507 |
+
a = w(imgPreloader.width, imgPreloader.height);
|
508 |
+
g()
|
509 |
+
};
|
510 |
+
imgPreloader.onerror = function () {
|
511 |
+
alert("Image cannot be loaded. Make sure the path is correct and image exist.");
|
512 |
+
e.prettyPhoto.close()
|
513 |
+
};
|
514 |
+
imgPreloader.src = pp_images[set_position];
|
515 |
+
break;
|
516 |
+
case"youtube":
|
517 |
+
a = w(movie_width, movie_height);
|
518 |
+
movie_id = i("v", pp_images[set_position]);
|
519 |
+
if (movie_id == "") {
|
520 |
+
movie_id = pp_images[set_position].split("youtu.be/");
|
521 |
+
movie_id = movie_id[1];
|
522 |
+
if (movie_id.indexOf("?") > 0)
|
523 |
+
movie_id = movie_id.substr(0, movie_id.indexOf("?"));
|
524 |
+
if (movie_id.indexOf("&") > 0)
|
525 |
+
movie_id = movie_id.substr(0, movie_id.indexOf("&"))
|
526 |
+
}
|
527 |
+
movie = "http://www.youtube.com/embed/" + movie_id;
|
528 |
+
i("rel", pp_images[set_position]) ? movie += "?rel=" + i("rel", pp_images[set_position]) : movie += "?rel=1";
|
529 |
+
if (settings.autoplay)
|
530 |
+
movie += "&autoplay=1";
|
531 |
+
toInject = settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie);
|
532 |
+
break;
|
533 |
+
case"vimeo":
|
534 |
+
a = w(movie_width, movie_height);
|
535 |
+
movie_id = pp_images[set_position];
|
536 |
+
var t = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;
|
537 |
+
var n = movie_id.match(t);
|
538 |
+
movie = "http://player.vimeo.com/video/" + n[3] + "?title=0&byline=0&portrait=0";
|
539 |
+
if (settings.autoplay)
|
540 |
+
movie += "&autoplay=1;";
|
541 |
+
vimeo_width = a["width"] + "/embed/?moog_width=" + a["width"];
|
542 |
+
toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, a["height"]).replace(/{path}/g, movie);
|
543 |
+
break;
|
544 |
+
case"quicktime":
|
545 |
+
a = w(movie_width, movie_height);
|
546 |
+
a["height"] += 15;
|
547 |
+
a["contentHeight"] += 15;
|
548 |
+
a["containerHeight"] += 15;
|
549 |
+
toInject = settings.quicktime_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay);
|
550 |
+
break;
|
551 |
+
case"flash":
|
552 |
+
a = w(movie_width, movie_height);
|
553 |
+
flash_vars = pp_images[set_position];
|
554 |
+
flash_vars = flash_vars.substring(pp_images[set_position].indexOf("flashvars") + 10, pp_images[set_position].length);
|
555 |
+
filename = pp_images[set_position];
|
556 |
+
filename = filename.substring(0, filename.indexOf("?"));
|
557 |
+
toInject = settings.flash_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + "?" + flash_vars);
|
558 |
+
break;
|
559 |
+
case"iframe":
|
560 |
+
a = w(movie_width, movie_height);
|
561 |
+
frame_url = pp_images[set_position];
|
562 |
+
frame_url = frame_url.substr(0, frame_url.indexOf("iframe") - 1);
|
563 |
+
toInject = settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{path}/g, frame_url);
|
564 |
+
break;
|
565 |
+
case"ajax":
|
566 |
+
doresize = false;
|
567 |
+
a = w(movie_width, movie_height);
|
568 |
+
doresize = true;
|
569 |
+
skipInjection = true;
|
570 |
+
e.get(pp_images[set_position], function (e) {
|
571 |
+
toInject = settings.inline_markup.replace(/{content}/g, e);
|
572 |
+
$pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject;
|
573 |
+
g()
|
574 |
+
});
|
575 |
+
break;
|
576 |
+
case"custom":
|
577 |
+
a = w(movie_width, movie_height);
|
578 |
+
toInject = settings.custom_markup;
|
579 |
+
break;
|
580 |
+
case"inline":
|
581 |
+
myClone = e(pp_images[set_position]).clone().append('<br clear="all" />').css({
|
582 |
+
width: settings.default_width
|
583 |
+
}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(e("body")).show();
|
584 |
+
doresize = false;
|
585 |
+
a = w(e(myClone).width(), e(myClone).height());
|
586 |
+
doresize = true;
|
587 |
+
e(myClone).remove();
|
588 |
+
toInject = settings.inline_markup.replace(/{content}/g, e(pp_images[set_position]).html());
|
589 |
+
break
|
590 |
+
}
|
591 |
+
if (!imgPreloader && !skipInjection) {
|
592 |
+
$pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject;
|
593 |
+
g()
|
594 |
+
}
|
595 |
+
});
|
596 |
+
return false
|
597 |
+
};
|
598 |
+
e.prettyPhoto.changePage = function (t) {
|
599 |
+
currentGalleryPage = 0;
|
600 |
+
if (t == "previous") {
|
601 |
+
set_position--;
|
602 |
+
if (set_position < 0)
|
603 |
+
set_position = e(pp_images).size() - 1
|
604 |
+
} else if (t == "next") {
|
605 |
+
set_position++;
|
606 |
+
if (set_position > e(pp_images).size() - 1)
|
607 |
+
set_position = 0
|
608 |
+
} else {
|
609 |
+
set_position = t
|
610 |
+
}
|
611 |
+
rel_index = set_position;
|
612 |
+
if (!doresize)
|
613 |
+
doresize = true;
|
614 |
+
if (settings.allow_expand) {
|
615 |
+
e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")
|
616 |
+
}
|
617 |
+
y(function () {
|
618 |
+
e.prettyPhoto.open()
|
619 |
+
})
|
620 |
+
};
|
621 |
+
e.prettyPhoto.changeGalleryPage = function (e) {
|
622 |
+
if (e == "next") {
|
623 |
+
currentGalleryPage++;
|
624 |
+
if (currentGalleryPage > totalPage)
|
625 |
+
currentGalleryPage = 0
|
626 |
+
} else if (e == "previous") {
|
627 |
+
currentGalleryPage--;
|
628 |
+
if (currentGalleryPage < 0)
|
629 |
+
currentGalleryPage = totalPage
|
630 |
+
} else {
|
631 |
+
currentGalleryPage = e
|
632 |
+
}
|
633 |
+
slide_speed = e == "next" || e == "previous" ? settings.animation_speed : 0;
|
634 |
+
slide_to = currentGalleryPage * itemsPerPage * itemWidth;
|
635 |
+
$pp_gallery.find("ul").animate({
|
636 |
+
left: -slide_to
|
637 |
+
}, slide_speed)
|
638 |
+
};
|
639 |
+
e.prettyPhoto.startSlideshow = function () {
|
640 |
+
if (typeof m == "undefined") {
|
641 |
+
$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function () {
|
642 |
+
e.prettyPhoto.stopSlideshow();
|
643 |
+
return false
|
644 |
+
});
|
645 |
+
m = setInterval(e.prettyPhoto.startSlideshow, settings.slideshow)
|
646 |
+
} else {
|
647 |
+
e.prettyPhoto.changePage("next")
|
648 |
+
}
|
649 |
+
};
|
650 |
+
e.prettyPhoto.stopSlideshow = function () {
|
651 |
+
$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function () {
|
652 |
+
e.prettyPhoto.startSlideshow();
|
653 |
+
return false
|
654 |
+
});
|
655 |
+
clearInterval(m);
|
656 |
+
m = undefined
|
657 |
+
};
|
658 |
+
e.prettyPhoto.close = function () {
|
659 |
+
if ($pp_overlay.is(":animated"))
|
660 |
+
return;
|
661 |
+
e.prettyPhoto.stopSlideshow();
|
662 |
+
$pp_pic_holder.stop().find("object,embed").css("visibility", "hidden");
|
663 |
+
e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed, function () {
|
664 |
+
e(this).remove()
|
665 |
+
});
|
666 |
+
$pp_overlay.fadeOut(settings.animation_speed, function () {
|
667 |
+
if (settings.hideflash)
|
668 |
+
e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "visible");
|
669 |
+
e(this).remove();
|
670 |
+
e(window).unbind("scroll.prettyphoto");
|
671 |
+
r();
|
672 |
+
settings.callback();
|
673 |
+
doresize = true;
|
674 |
+
f = false;
|
675 |
+
delete settings
|
676 |
+
})
|
677 |
+
};
|
678 |
+
if (!pp_alreadyInitialized && t()) {
|
679 |
+
pp_alreadyInitialized = true;
|
680 |
+
hashIndex = t();
|
681 |
+
hashRel = hashIndex;
|
682 |
+
hashIndex = hashIndex.substring(hashIndex.indexOf("/") + 1, hashIndex.length - 1);
|
683 |
+
hashRel = hashRel.substring(0, hashRel.indexOf("/"));
|
684 |
+
setTimeout(function () {
|
685 |
+
e("a[" + s.hook + "^='" + hashRel + "']:eq(" + hashIndex + ")").trigger("click")
|
686 |
+
}, 50)
|
687 |
+
}
|
688 |
+
return this.unbind("click.prettyphoto").bind("click.prettyphoto", e.prettyPhoto.initialize)
|
689 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
})(jQuery);
|
691 |
+
var pp_alreadyInitialized = false
|
|
contact-bank.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Bank Lite Edition
|
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It's Really That Easy.
|
6 |
Author: Tech Banker
|
7 |
-
Version: 2.0.
|
8 |
Author URI: http://tech-banker.com
|
9 |
License: GPLv3 or later
|
10 |
*/
|
@@ -1243,7 +1243,7 @@ class Contact_Bank_Widget extends WP_Widget
|
|
1243 |
function Contact_Bank_Widget()
|
1244 |
{
|
1245 |
$widget_ops = array("classname" => "Contact_Bank_Widget", "description" => "Uses Contact Form" );
|
1246 |
-
$this->
|
1247 |
}
|
1248 |
function form($instance)
|
1249 |
{
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It's Really That Easy.
|
6 |
Author: Tech Banker
|
7 |
+
Version: 2.0.228
|
8 |
Author URI: http://tech-banker.com
|
9 |
License: GPLv3 or later
|
10 |
*/
|
1243 |
function Contact_Bank_Widget()
|
1244 |
{
|
1245 |
$widget_ops = array("classname" => "Contact_Bank_Widget", "description" => "Uses Contact Form" );
|
1246 |
+
$this->__construct("Contact_Bank_Widget", "Contact Bank", $widget_ops);
|
1247 |
}
|
1248 |
function form($instance)
|
1249 |
{
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: contact-banker, Gallery-Bank
|
|
3 |
Tags: admin, advanced form, best contact form plugin, buddypress, category, contact, contact button, contact form, contact form builder, Contact Form Builder with recaptcha, contact form plugin, contact forms, contact forms plugin, contact manager, contact us, contact us form, contacts form plugin, custom form, feedback, feedback form, feedback forms, form, forms, forms plugin, post feedback, web form, web-page feedback, wordpress contact form
|
4 |
Requires at least: 3.
|
5 |
Tested up to: 4.3
|
6 |
-
Stable tag: 2.0.
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -549,6 +549,10 @@ In order to set Shortcode for a Form, you need to follow these steps :
|
|
549 |
|
550 |
== Changelog ==
|
551 |
|
|
|
|
|
|
|
|
|
552 |
= 2.0.227 =
|
553 |
|
554 |
* Compatibility with 4.3
|
@@ -1236,5 +1240,4 @@ In order to set Shortcode for a Form, you need to follow these steps :
|
|
1236 |
* Records of forms filled shown
|
1237 |
|
1238 |
= 1.0 =
|
1239 |
-
|
1240 |
-
ReleaseRelease
|
3 |
Tags: admin, advanced form, best contact form plugin, buddypress, category, contact, contact button, contact form, contact form builder, Contact Form Builder with recaptcha, contact form plugin, contact forms, contact forms plugin, contact manager, contact us, contact us form, contacts form plugin, custom form, feedback, feedback form, feedback forms, form, forms, forms plugin, post feedback, web form, web-page feedback, wordpress contact form
|
4 |
Requires at least: 3.
|
5 |
Tested up to: 4.3
|
6 |
+
Stable tag: 2.0.228
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
549 |
|
550 |
== Changelog ==
|
551 |
|
552 |
+
= 2.0.228 =
|
553 |
+
|
554 |
+
* constructor method for WP_Widget is updated.
|
555 |
+
|
556 |
= 2.0.227 =
|
557 |
|
558 |
* Compatibility with 4.3
|
1240 |
* Records of forms filled shown
|
1241 |
|
1242 |
= 1.0 =
|
1243 |
+
* Initial Release
|
|