Version Description
- Responsive output.
- Gallery code renewal.
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Lightbox Gallery |
Version | 0.8 |
Comparing to | |
See all releases |
Code changes from version 0.7.4 to 0.8
- js/jquery.colorbox.js +1087 -888
- lightbox-gallery-ja.mo +0 -0
- lightbox-gallery-ja.po +55 -17
- lightbox-gallery.css +25 -35
- lightbox-gallery.php +24 -15
- readme.txt +14 -2
js/jquery.colorbox.js
CHANGED
@@ -1,888 +1,1087 @@
|
|
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 |
-
function
|
234 |
-
if (
|
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 |
-
var
|
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 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
settings.
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
Colorbox 1.5.14
|
3 |
+
license: MIT
|
4 |
+
http://www.jacklmoore.com/colorbox
|
5 |
+
*/
|
6 |
+
(function ($, document, window) {
|
7 |
+
var
|
8 |
+
// Default settings object.
|
9 |
+
// See http://jacklmoore.com/colorbox for details.
|
10 |
+
defaults = {
|
11 |
+
// data sources
|
12 |
+
html: false,
|
13 |
+
photo: false,
|
14 |
+
iframe: false,
|
15 |
+
inline: false,
|
16 |
+
|
17 |
+
// behavior and appearance
|
18 |
+
transition: "elastic",
|
19 |
+
speed: 300,
|
20 |
+
fadeOut: 300,
|
21 |
+
width: false,
|
22 |
+
initialWidth: "600",
|
23 |
+
innerWidth: false,
|
24 |
+
maxWidth: false,
|
25 |
+
height: false,
|
26 |
+
initialHeight: "450",
|
27 |
+
innerHeight: false,
|
28 |
+
maxHeight: false,
|
29 |
+
scalePhotos: true,
|
30 |
+
scrolling: true,
|
31 |
+
opacity: 0.9,
|
32 |
+
preloading: true,
|
33 |
+
className: false,
|
34 |
+
overlayClose: true,
|
35 |
+
escKey: true,
|
36 |
+
arrowKey: true,
|
37 |
+
top: false,
|
38 |
+
bottom: false,
|
39 |
+
left: false,
|
40 |
+
right: false,
|
41 |
+
fixed: false,
|
42 |
+
data: undefined,
|
43 |
+
closeButton: true,
|
44 |
+
fastIframe: true,
|
45 |
+
open: false,
|
46 |
+
reposition: true,
|
47 |
+
loop: true,
|
48 |
+
slideshow: false,
|
49 |
+
slideshowAuto: true,
|
50 |
+
slideshowSpeed: 2500,
|
51 |
+
slideshowStart: "start slideshow",
|
52 |
+
slideshowStop: "stop slideshow",
|
53 |
+
photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
|
54 |
+
|
55 |
+
// alternate image paths for high-res displays
|
56 |
+
retinaImage: false,
|
57 |
+
retinaUrl: false,
|
58 |
+
retinaSuffix: '@2x.$1',
|
59 |
+
|
60 |
+
// internationalization
|
61 |
+
current: "image {current} of {total}",
|
62 |
+
previous: "previous",
|
63 |
+
next: "next",
|
64 |
+
close: "close",
|
65 |
+
xhrError: "This content failed to load.",
|
66 |
+
imgError: "This image failed to load.",
|
67 |
+
|
68 |
+
// accessbility
|
69 |
+
returnFocus: true,
|
70 |
+
trapFocus: true,
|
71 |
+
|
72 |
+
// callbacks
|
73 |
+
onOpen: false,
|
74 |
+
onLoad: false,
|
75 |
+
onComplete: false,
|
76 |
+
onCleanup: false,
|
77 |
+
onClosed: false,
|
78 |
+
|
79 |
+
rel: function() {
|
80 |
+
return this.rel;
|
81 |
+
},
|
82 |
+
href: function() {
|
83 |
+
// using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container')
|
84 |
+
return $(this).attr('href');
|
85 |
+
},
|
86 |
+
title: function() {
|
87 |
+
return this.title;
|
88 |
+
}
|
89 |
+
},
|
90 |
+
|
91 |
+
// Abstracting the HTML and event identifiers for easy rebranding
|
92 |
+
colorbox = 'colorbox',
|
93 |
+
prefix = 'cbox',
|
94 |
+
boxElement = prefix + 'Element',
|
95 |
+
|
96 |
+
// Events
|
97 |
+
event_open = prefix + '_open',
|
98 |
+
event_load = prefix + '_load',
|
99 |
+
event_complete = prefix + '_complete',
|
100 |
+
event_cleanup = prefix + '_cleanup',
|
101 |
+
event_closed = prefix + '_closed',
|
102 |
+
event_purge = prefix + '_purge',
|
103 |
+
|
104 |
+
// Cached jQuery Object Variables
|
105 |
+
$overlay,
|
106 |
+
$box,
|
107 |
+
$wrap,
|
108 |
+
$content,
|
109 |
+
$topBorder,
|
110 |
+
$leftBorder,
|
111 |
+
$rightBorder,
|
112 |
+
$bottomBorder,
|
113 |
+
$related,
|
114 |
+
$window,
|
115 |
+
$loaded,
|
116 |
+
$loadingBay,
|
117 |
+
$loadingOverlay,
|
118 |
+
$title,
|
119 |
+
$current,
|
120 |
+
$slideshow,
|
121 |
+
$next,
|
122 |
+
$prev,
|
123 |
+
$close,
|
124 |
+
$groupControls,
|
125 |
+
$events = $('<a/>'), // $({}) would be prefered, but there is an issue with jQuery 1.4.2
|
126 |
+
|
127 |
+
// Variables for cached values or use across multiple functions
|
128 |
+
settings,
|
129 |
+
interfaceHeight,
|
130 |
+
interfaceWidth,
|
131 |
+
loadedHeight,
|
132 |
+
loadedWidth,
|
133 |
+
index,
|
134 |
+
photo,
|
135 |
+
open,
|
136 |
+
active,
|
137 |
+
closing,
|
138 |
+
loadingTimer,
|
139 |
+
publicMethod,
|
140 |
+
div = "div",
|
141 |
+
requests = 0,
|
142 |
+
previousCSS = {},
|
143 |
+
init;
|
144 |
+
|
145 |
+
// ****************
|
146 |
+
// HELPER FUNCTIONS
|
147 |
+
// ****************
|
148 |
+
|
149 |
+
// Convenience function for creating new jQuery objects
|
150 |
+
function $tag(tag, id, css) {
|
151 |
+
var element = document.createElement(tag);
|
152 |
+
|
153 |
+
if (id) {
|
154 |
+
element.id = prefix + id;
|
155 |
+
}
|
156 |
+
|
157 |
+
if (css) {
|
158 |
+
element.style.cssText = css;
|
159 |
+
}
|
160 |
+
|
161 |
+
return $(element);
|
162 |
+
}
|
163 |
+
|
164 |
+
// Get the window height using innerHeight when available to avoid an issue with iOS
|
165 |
+
// http://bugs.jquery.com/ticket/6724
|
166 |
+
function winheight() {
|
167 |
+
return window.innerHeight ? window.innerHeight : $(window).height();
|
168 |
+
}
|
169 |
+
|
170 |
+
function Settings(element, options) {
|
171 |
+
if (options !== Object(options)) {
|
172 |
+
options = {};
|
173 |
+
}
|
174 |
+
|
175 |
+
this.cache = {};
|
176 |
+
this.el = element;
|
177 |
+
|
178 |
+
this.value = function(key) {
|
179 |
+
var dataAttr;
|
180 |
+
|
181 |
+
if (this.cache[key] === undefined) {
|
182 |
+
dataAttr = $(this.el).attr('data-cbox-'+key);
|
183 |
+
|
184 |
+
if (dataAttr !== undefined) {
|
185 |
+
this.cache[key] = dataAttr;
|
186 |
+
} else if (options[key] !== undefined) {
|
187 |
+
this.cache[key] = options[key];
|
188 |
+
} else if (defaults[key] !== undefined) {
|
189 |
+
this.cache[key] = defaults[key];
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
return this.cache[key];
|
194 |
+
};
|
195 |
+
|
196 |
+
this.get = function(key) {
|
197 |
+
var value = this.value(key);
|
198 |
+
return $.isFunction(value) ? value.call(this.el, this) : value;
|
199 |
+
};
|
200 |
+
}
|
201 |
+
|
202 |
+
// Determine the next and previous members in a group.
|
203 |
+
function getIndex(increment) {
|
204 |
+
var
|
205 |
+
max = $related.length,
|
206 |
+
newIndex = (index + increment) % max;
|
207 |
+
|
208 |
+
return (newIndex < 0) ? max + newIndex : newIndex;
|
209 |
+
}
|
210 |
+
|
211 |
+
// Convert '%' and 'px' values to integers
|
212 |
+
function setSize(size, dimension) {
|
213 |
+
return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
|
214 |
+
}
|
215 |
+
|
216 |
+
// Checks an href to see if it is a photo.
|
217 |
+
// There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
|
218 |
+
function isImage(settings, url) {
|
219 |
+
return settings.get('photo') || settings.get('photoRegex').test(url);
|
220 |
+
}
|
221 |
+
|
222 |
+
function retinaUrl(settings, url) {
|
223 |
+
return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
|
224 |
+
}
|
225 |
+
|
226 |
+
function trapFocus(e) {
|
227 |
+
if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) {
|
228 |
+
e.stopPropagation();
|
229 |
+
$box.focus();
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
function setClass(str) {
|
234 |
+
if (setClass.str !== str) {
|
235 |
+
$box.add($overlay).removeClass(setClass.str).addClass(str);
|
236 |
+
setClass.str = str;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
function getRelated(rel) {
|
241 |
+
index = 0;
|
242 |
+
|
243 |
+
if (rel && rel !== false && rel !== 'nofollow') {
|
244 |
+
$related = $('.' + boxElement).filter(function () {
|
245 |
+
var options = $.data(this, colorbox);
|
246 |
+
var settings = new Settings(this, options);
|
247 |
+
return (settings.get('rel') === rel);
|
248 |
+
});
|
249 |
+
index = $related.index(settings.el);
|
250 |
+
|
251 |
+
// Check direct calls to Colorbox.
|
252 |
+
if (index === -1) {
|
253 |
+
$related = $related.add(settings.el);
|
254 |
+
index = $related.length - 1;
|
255 |
+
}
|
256 |
+
} else {
|
257 |
+
$related = $(settings.el);
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
function trigger(event) {
|
262 |
+
// for external use
|
263 |
+
$(document).trigger(event);
|
264 |
+
// for internal use
|
265 |
+
$events.triggerHandler(event);
|
266 |
+
}
|
267 |
+
|
268 |
+
var slideshow = (function(){
|
269 |
+
var active,
|
270 |
+
className = prefix + "Slideshow_",
|
271 |
+
click = "click." + prefix,
|
272 |
+
timeOut;
|
273 |
+
|
274 |
+
function clear () {
|
275 |
+
clearTimeout(timeOut);
|
276 |
+
}
|
277 |
+
|
278 |
+
function set() {
|
279 |
+
if (settings.get('loop') || $related[index + 1]) {
|
280 |
+
clear();
|
281 |
+
timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed'));
|
282 |
+
}
|
283 |
+
}
|
284 |
+
|
285 |
+
function start() {
|
286 |
+
$slideshow
|
287 |
+
.html(settings.get('slideshowStop'))
|
288 |
+
.unbind(click)
|
289 |
+
.one(click, stop);
|
290 |
+
|
291 |
+
$events
|
292 |
+
.bind(event_complete, set)
|
293 |
+
.bind(event_load, clear);
|
294 |
+
|
295 |
+
$box.removeClass(className + "off").addClass(className + "on");
|
296 |
+
}
|
297 |
+
|
298 |
+
function stop() {
|
299 |
+
clear();
|
300 |
+
|
301 |
+
$events
|
302 |
+
.unbind(event_complete, set)
|
303 |
+
.unbind(event_load, clear);
|
304 |
+
|
305 |
+
$slideshow
|
306 |
+
.html(settings.get('slideshowStart'))
|
307 |
+
.unbind(click)
|
308 |
+
.one(click, function () {
|
309 |
+
publicMethod.next();
|
310 |
+
start();
|
311 |
+
});
|
312 |
+
|
313 |
+
$box.removeClass(className + "on").addClass(className + "off");
|
314 |
+
}
|
315 |
+
|
316 |
+
function reset() {
|
317 |
+
active = false;
|
318 |
+
$slideshow.hide();
|
319 |
+
clear();
|
320 |
+
$events
|
321 |
+
.unbind(event_complete, set)
|
322 |
+
.unbind(event_load, clear);
|
323 |
+
$box.removeClass(className + "off " + className + "on");
|
324 |
+
}
|
325 |
+
|
326 |
+
return function(){
|
327 |
+
if (active) {
|
328 |
+
if (!settings.get('slideshow')) {
|
329 |
+
$events.unbind(event_cleanup, reset);
|
330 |
+
reset();
|
331 |
+
}
|
332 |
+
} else {
|
333 |
+
if (settings.get('slideshow') && $related[1]) {
|
334 |
+
active = true;
|
335 |
+
$events.one(event_cleanup, reset);
|
336 |
+
if (settings.get('slideshowAuto')) {
|
337 |
+
start();
|
338 |
+
} else {
|
339 |
+
stop();
|
340 |
+
}
|
341 |
+
$slideshow.show();
|
342 |
+
}
|
343 |
+
}
|
344 |
+
};
|
345 |
+
|
346 |
+
}());
|
347 |
+
|
348 |
+
|
349 |
+
function launch(element) {
|
350 |
+
var options;
|
351 |
+
|
352 |
+
if (!closing) {
|
353 |
+
|
354 |
+
options = $(element).data(colorbox);
|
355 |
+
|
356 |
+
settings = new Settings(element, options);
|
357 |
+
|
358 |
+
getRelated(settings.get('rel'));
|
359 |
+
|
360 |
+
if (!open) {
|
361 |
+
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
|
362 |
+
|
363 |
+
setClass(settings.get('className'));
|
364 |
+
|
365 |
+
// Show colorbox so the sizes can be calculated in older versions of jQuery
|
366 |
+
$box.css({visibility:'hidden', display:'block', opacity:''});
|
367 |
+
|
368 |
+
$loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden');
|
369 |
+
$content.css({width:'', height:''}).append($loaded);
|
370 |
+
|
371 |
+
// Cache values needed for size calculations
|
372 |
+
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
|
373 |
+
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
|
374 |
+
loadedHeight = $loaded.outerHeight(true);
|
375 |
+
loadedWidth = $loaded.outerWidth(true);
|
376 |
+
|
377 |
+
// Opens inital empty Colorbox prior to content being loaded.
|
378 |
+
var initialWidth = setSize(settings.get('initialWidth'), 'x');
|
379 |
+
var initialHeight = setSize(settings.get('initialHeight'), 'y');
|
380 |
+
var maxWidth = settings.get('maxWidth');
|
381 |
+
var maxHeight = settings.get('maxHeight');
|
382 |
+
|
383 |
+
settings.w = (maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth;
|
384 |
+
settings.h = (maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight;
|
385 |
+
|
386 |
+
$loaded.css({width:'', height:settings.h});
|
387 |
+
publicMethod.position();
|
388 |
+
|
389 |
+
trigger(event_open);
|
390 |
+
settings.get('onOpen');
|
391 |
+
|
392 |
+
$groupControls.add($title).hide();
|
393 |
+
|
394 |
+
$box.focus();
|
395 |
+
|
396 |
+
if (settings.get('trapFocus')) {
|
397 |
+
// Confine focus to the modal
|
398 |
+
// Uses event capturing that is not supported in IE8-
|
399 |
+
if (document.addEventListener) {
|
400 |
+
|
401 |
+
document.addEventListener('focus', trapFocus, true);
|
402 |
+
|
403 |
+
$events.one(event_closed, function () {
|
404 |
+
document.removeEventListener('focus', trapFocus, true);
|
405 |
+
});
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
// Return focus on closing
|
410 |
+
if (settings.get('returnFocus')) {
|
411 |
+
$events.one(event_closed, function () {
|
412 |
+
$(settings.el).focus();
|
413 |
+
});
|
414 |
+
}
|
415 |
+
}
|
416 |
+
|
417 |
+
var opacity = parseFloat(settings.get('opacity'));
|
418 |
+
$overlay.css({
|
419 |
+
opacity: opacity === opacity ? opacity : '',
|
420 |
+
cursor: settings.get('overlayClose') ? 'pointer' : '',
|
421 |
+
visibility: 'visible'
|
422 |
+
}).show();
|
423 |
+
|
424 |
+
if (settings.get('closeButton')) {
|
425 |
+
$close.html(settings.get('close')).appendTo($content);
|
426 |
+
} else {
|
427 |
+
$close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4
|
428 |
+
}
|
429 |
+
|
430 |
+
load();
|
431 |
+
}
|
432 |
+
}
|
433 |
+
|
434 |
+
// Colorbox's markup needs to be added to the DOM prior to being called
|
435 |
+
// so that the browser will go ahead and load the CSS background images.
|
436 |
+
function appendHTML() {
|
437 |
+
if (!$box) {
|
438 |
+
init = false;
|
439 |
+
$window = $(window);
|
440 |
+
$box = $tag(div).attr({
|
441 |
+
id: colorbox,
|
442 |
+
'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
|
443 |
+
role: 'dialog',
|
444 |
+
tabindex: '-1'
|
445 |
+
}).hide();
|
446 |
+
$overlay = $tag(div, "Overlay").hide();
|
447 |
+
$loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
|
448 |
+
$wrap = $tag(div, "Wrapper");
|
449 |
+
$content = $tag(div, "Content").append(
|
450 |
+
$title = $tag(div, "Title"),
|
451 |
+
$current = $tag(div, "Current"),
|
452 |
+
$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
|
453 |
+
$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
|
454 |
+
$slideshow = $tag('button', "Slideshow"),
|
455 |
+
$loadingOverlay
|
456 |
+
);
|
457 |
+
|
458 |
+
$close = $('<button type="button"/>').attr({id:prefix+'Close'});
|
459 |
+
|
460 |
+
$wrap.append( // The 3x3 Grid that makes up Colorbox
|
461 |
+
$tag(div).append(
|
462 |
+
$tag(div, "TopLeft"),
|
463 |
+
$topBorder = $tag(div, "TopCenter"),
|
464 |
+
$tag(div, "TopRight")
|
465 |
+
),
|
466 |
+
$tag(div, false, 'clear:left').append(
|
467 |
+
$leftBorder = $tag(div, "MiddleLeft"),
|
468 |
+
$content,
|
469 |
+
$rightBorder = $tag(div, "MiddleRight")
|
470 |
+
),
|
471 |
+
$tag(div, false, 'clear:left').append(
|
472 |
+
$tag(div, "BottomLeft"),
|
473 |
+
$bottomBorder = $tag(div, "BottomCenter"),
|
474 |
+
$tag(div, "BottomRight")
|
475 |
+
)
|
476 |
+
).find('div div').css({'float': 'left'});
|
477 |
+
|
478 |
+
$loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
|
479 |
+
|
480 |
+
$groupControls = $next.add($prev).add($current).add($slideshow);
|
481 |
+
}
|
482 |
+
if (document.body && !$box.parent().length) {
|
483 |
+
$(document.body).append($overlay, $box.append($wrap, $loadingBay));
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
// Add Colorbox's event bindings
|
488 |
+
function addBindings() {
|
489 |
+
function clickHandler(e) {
|
490 |
+
// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
|
491 |
+
// See: http://jacklmoore.com/notes/click-events/
|
492 |
+
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
|
493 |
+
e.preventDefault();
|
494 |
+
launch(this);
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
if ($box) {
|
499 |
+
if (!init) {
|
500 |
+
init = true;
|
501 |
+
|
502 |
+
// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
|
503 |
+
$next.click(function () {
|
504 |
+
publicMethod.next();
|
505 |
+
});
|
506 |
+
$prev.click(function () {
|
507 |
+
publicMethod.prev();
|
508 |
+
});
|
509 |
+
$close.click(function () {
|
510 |
+
publicMethod.close();
|
511 |
+
});
|
512 |
+
$overlay.click(function () {
|
513 |
+
if (settings.get('overlayClose')) {
|
514 |
+
publicMethod.close();
|
515 |
+
}
|
516 |
+
});
|
517 |
+
|
518 |
+
// Key Bindings
|
519 |
+
$(document).bind('keydown.' + prefix, function (e) {
|
520 |
+
var key = e.keyCode;
|
521 |
+
if (open && settings.get('escKey') && key === 27) {
|
522 |
+
e.preventDefault();
|
523 |
+
publicMethod.close();
|
524 |
+
}
|
525 |
+
if (open && settings.get('arrowKey') && $related[1] && !e.altKey) {
|
526 |
+
if (key === 37) {
|
527 |
+
e.preventDefault();
|
528 |
+
$prev.click();
|
529 |
+
} else if (key === 39) {
|
530 |
+
e.preventDefault();
|
531 |
+
$next.click();
|
532 |
+
}
|
533 |
+
}
|
534 |
+
});
|
535 |
+
|
536 |
+
if ($.isFunction($.fn.on)) {
|
537 |
+
// For jQuery 1.7+
|
538 |
+
$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
|
539 |
+
} else {
|
540 |
+
// For jQuery 1.3.x -> 1.6.x
|
541 |
+
// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
|
542 |
+
// This is not here for jQuery 1.9, it's here for legacy users.
|
543 |
+
$('.'+boxElement).live('click.'+prefix, clickHandler);
|
544 |
+
}
|
545 |
+
}
|
546 |
+
return true;
|
547 |
+
}
|
548 |
+
return false;
|
549 |
+
}
|
550 |
+
|
551 |
+
// Don't do anything if Colorbox already exists.
|
552 |
+
if ($[colorbox]) {
|
553 |
+
return;
|
554 |
+
}
|
555 |
+
|
556 |
+
// Append the HTML when the DOM loads
|
557 |
+
$(appendHTML);
|
558 |
+
|
559 |
+
|
560 |
+
// ****************
|
561 |
+
// PUBLIC FUNCTIONS
|
562 |
+
// Usage format: $.colorbox.close();
|
563 |
+
// Usage from within an iframe: parent.jQuery.colorbox.close();
|
564 |
+
// ****************
|
565 |
+
|
566 |
+
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
|
567 |
+
var settings;
|
568 |
+
var $obj = this;
|
569 |
+
|
570 |
+
options = options || {};
|
571 |
+
|
572 |
+
if ($.isFunction($obj)) { // assume a call to $.colorbox
|
573 |
+
$obj = $('<a/>');
|
574 |
+
options.open = true;
|
575 |
+
}
|
576 |
+
|
577 |
+
if (!$obj[0]) { // colorbox being applied to empty collection
|
578 |
+
return $obj;
|
579 |
+
}
|
580 |
+
|
581 |
+
appendHTML();
|
582 |
+
|
583 |
+
if (addBindings()) {
|
584 |
+
|
585 |
+
if (callback) {
|
586 |
+
options.onComplete = callback;
|
587 |
+
}
|
588 |
+
|
589 |
+
$obj.each(function () {
|
590 |
+
var old = $.data(this, colorbox) || {};
|
591 |
+
$.data(this, colorbox, $.extend(old, options));
|
592 |
+
}).addClass(boxElement);
|
593 |
+
|
594 |
+
settings = new Settings($obj[0], options);
|
595 |
+
|
596 |
+
if (settings.get('open')) {
|
597 |
+
launch($obj[0]);
|
598 |
+
}
|
599 |
+
}
|
600 |
+
|
601 |
+
return $obj;
|
602 |
+
};
|
603 |
+
|
604 |
+
publicMethod.position = function (speed, loadedCallback) {
|
605 |
+
var
|
606 |
+
css,
|
607 |
+
top = 0,
|
608 |
+
left = 0,
|
609 |
+
offset = $box.offset(),
|
610 |
+
scrollTop,
|
611 |
+
scrollLeft;
|
612 |
+
|
613 |
+
$window.unbind('resize.' + prefix);
|
614 |
+
|
615 |
+
// remove the modal so that it doesn't influence the document width/height
|
616 |
+
$box.css({top: -9e4, left: -9e4});
|
617 |
+
|
618 |
+
scrollTop = $window.scrollTop();
|
619 |
+
scrollLeft = $window.scrollLeft();
|
620 |
+
|
621 |
+
if (settings.get('fixed')) {
|
622 |
+
offset.top -= scrollTop;
|
623 |
+
offset.left -= scrollLeft;
|
624 |
+
$box.css({position: 'fixed'});
|
625 |
+
} else {
|
626 |
+
top = scrollTop;
|
627 |
+
left = scrollLeft;
|
628 |
+
$box.css({position: 'absolute'});
|
629 |
+
}
|
630 |
+
|
631 |
+
// keeps the top and left positions within the browser's viewport.
|
632 |
+
if (settings.get('right') !== false) {
|
633 |
+
left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0);
|
634 |
+
} else if (settings.get('left') !== false) {
|
635 |
+
left += setSize(settings.get('left'), 'x');
|
636 |
+
} else {
|
637 |
+
left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
|
638 |
+
}
|
639 |
+
|
640 |
+
if (settings.get('bottom') !== false) {
|
641 |
+
top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0);
|
642 |
+
} else if (settings.get('top') !== false) {
|
643 |
+
top += setSize(settings.get('top'), 'y');
|
644 |
+
} else {
|
645 |
+
top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
|
646 |
+
}
|
647 |
+
|
648 |
+
$box.css({top: offset.top, left: offset.left, visibility:'visible'});
|
649 |
+
|
650 |
+
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
|
651 |
+
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
|
652 |
+
// it can invoke an obscure IE bug when using iframes.
|
653 |
+
$wrap[0].style.width = $wrap[0].style.height = "9999px";
|
654 |
+
|
655 |
+
function modalDimensions() {
|
656 |
+
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
|
657 |
+
$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
|
658 |
+
}
|
659 |
+
|
660 |
+
css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
|
661 |
+
|
662 |
+
// setting the speed to 0 if the content hasn't changed size or position
|
663 |
+
if (speed) {
|
664 |
+
var tempSpeed = 0;
|
665 |
+
$.each(css, function(i){
|
666 |
+
if (css[i] !== previousCSS[i]) {
|
667 |
+
tempSpeed = speed;
|
668 |
+
return;
|
669 |
+
}
|
670 |
+
});
|
671 |
+
speed = tempSpeed;
|
672 |
+
}
|
673 |
+
|
674 |
+
previousCSS = css;
|
675 |
+
|
676 |
+
if (!speed) {
|
677 |
+
$box.css(css);
|
678 |
+
}
|
679 |
+
|
680 |
+
$box.dequeue().animate(css, {
|
681 |
+
duration: speed || 0,
|
682 |
+
complete: function () {
|
683 |
+
modalDimensions();
|
684 |
+
|
685 |
+
active = false;
|
686 |
+
|
687 |
+
// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
|
688 |
+
$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
|
689 |
+
$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
|
690 |
+
|
691 |
+
if (settings.get('reposition')) {
|
692 |
+
setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
|
693 |
+
$window.bind('resize.' + prefix, publicMethod.position);
|
694 |
+
}, 1);
|
695 |
+
}
|
696 |
+
|
697 |
+
if ($.isFunction(loadedCallback)) {
|
698 |
+
loadedCallback();
|
699 |
+
}
|
700 |
+
},
|
701 |
+
step: modalDimensions
|
702 |
+
});
|
703 |
+
};
|
704 |
+
|
705 |
+
publicMethod.resize = function (options) {
|
706 |
+
var scrolltop;
|
707 |
+
|
708 |
+
if (open) {
|
709 |
+
options = options || {};
|
710 |
+
|
711 |
+
if (options.width) {
|
712 |
+
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
|
713 |
+
}
|
714 |
+
|
715 |
+
if (options.innerWidth) {
|
716 |
+
settings.w = setSize(options.innerWidth, 'x');
|
717 |
+
}
|
718 |
+
|
719 |
+
$loaded.css({width: settings.w});
|
720 |
+
|
721 |
+
if (options.height) {
|
722 |
+
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
|
723 |
+
}
|
724 |
+
|
725 |
+
if (options.innerHeight) {
|
726 |
+
settings.h = setSize(options.innerHeight, 'y');
|
727 |
+
}
|
728 |
+
|
729 |
+
if (!options.innerHeight && !options.height) {
|
730 |
+
scrolltop = $loaded.scrollTop();
|
731 |
+
$loaded.css({height: "auto"});
|
732 |
+
settings.h = $loaded.height();
|
733 |
+
}
|
734 |
+
|
735 |
+
$loaded.css({height: settings.h});
|
736 |
+
|
737 |
+
if(scrolltop) {
|
738 |
+
$loaded.scrollTop(scrolltop);
|
739 |
+
}
|
740 |
+
|
741 |
+
publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed'));
|
742 |
+
}
|
743 |
+
};
|
744 |
+
|
745 |
+
publicMethod.prep = function (object) {
|
746 |
+
if (!open) {
|
747 |
+
return;
|
748 |
+
}
|
749 |
+
|
750 |
+
var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed');
|
751 |
+
|
752 |
+
$loaded.remove();
|
753 |
+
|
754 |
+
$loaded = $tag(div, 'LoadedContent').append(object);
|
755 |
+
|
756 |
+
function getWidth() {
|
757 |
+
settings.w = settings.w || $loaded.width();
|
758 |
+
settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
|
759 |
+
return settings.w;
|
760 |
+
}
|
761 |
+
function getHeight() {
|
762 |
+
settings.h = settings.h || $loaded.height();
|
763 |
+
settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
|
764 |
+
return settings.h;
|
765 |
+
}
|
766 |
+
|
767 |
+
$loaded.hide()
|
768 |
+
.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
|
769 |
+
.css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'})
|
770 |
+
.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
|
771 |
+
.prependTo($content);
|
772 |
+
|
773 |
+
$loadingBay.hide();
|
774 |
+
|
775 |
+
// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
|
776 |
+
|
777 |
+
$(photo).css({'float': 'none'});
|
778 |
+
|
779 |
+
setClass(settings.get('className'));
|
780 |
+
|
781 |
+
callback = function () {
|
782 |
+
var total = $related.length,
|
783 |
+
iframe,
|
784 |
+
complete;
|
785 |
+
|
786 |
+
if (!open) {
|
787 |
+
return;
|
788 |
+
}
|
789 |
+
|
790 |
+
function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2
|
791 |
+
if ($.support.opacity === false) {
|
792 |
+
$box[0].style.removeAttribute('filter');
|
793 |
+
}
|
794 |
+
}
|
795 |
+
|
796 |
+
complete = function () {
|
797 |
+
clearTimeout(loadingTimer);
|
798 |
+
$loadingOverlay.hide();
|
799 |
+
trigger(event_complete);
|
800 |
+
settings.get('onComplete');
|
801 |
+
};
|
802 |
+
|
803 |
+
|
804 |
+
$title.html(settings.get('title')).show();
|
805 |
+
$loaded.show();
|
806 |
+
|
807 |
+
if (total > 1) { // handle grouping
|
808 |
+
if (typeof settings.get('current') === "string") {
|
809 |
+
$current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show();
|
810 |
+
}
|
811 |
+
|
812 |
+
$next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next'));
|
813 |
+
$prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous'));
|
814 |
+
|
815 |
+
slideshow();
|
816 |
+
|
817 |
+
// Preloads images within a rel group
|
818 |
+
if (settings.get('preloading')) {
|
819 |
+
$.each([getIndex(-1), getIndex(1)], function(){
|
820 |
+
var img,
|
821 |
+
i = $related[this],
|
822 |
+
settings = new Settings(i, $.data(i, colorbox)),
|
823 |
+
src = settings.get('href');
|
824 |
+
|
825 |
+
if (src && isImage(settings, src)) {
|
826 |
+
src = retinaUrl(settings, src);
|
827 |
+
img = document.createElement('img');
|
828 |
+
img.src = src;
|
829 |
+
}
|
830 |
+
});
|
831 |
+
}
|
832 |
+
} else {
|
833 |
+
$groupControls.hide();
|
834 |
+
}
|
835 |
+
|
836 |
+
if (settings.get('iframe')) {
|
837 |
+
iframe = document.createElement('iframe');
|
838 |
+
|
839 |
+
if ('frameBorder' in iframe) {
|
840 |
+
iframe.frameBorder = 0;
|
841 |
+
}
|
842 |
+
|
843 |
+
if ('allowTransparency' in iframe) {
|
844 |
+
iframe.allowTransparency = "true";
|
845 |
+
}
|
846 |
+
|
847 |
+
if (!settings.get('scrolling')) {
|
848 |
+
iframe.scrolling = "no";
|
849 |
+
}
|
850 |
+
|
851 |
+
$(iframe)
|
852 |
+
.attr({
|
853 |
+
src: settings.get('href'),
|
854 |
+
name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
|
855 |
+
'class': prefix + 'Iframe',
|
856 |
+
allowFullScreen : true // allow HTML5 video to go fullscreen
|
857 |
+
})
|
858 |
+
.one('load', complete)
|
859 |
+
.appendTo($loaded);
|
860 |
+
|
861 |
+
$events.one(event_purge, function () {
|
862 |
+
iframe.src = "//about:blank";
|
863 |
+
});
|
864 |
+
|
865 |
+
if (settings.get('fastIframe')) {
|
866 |
+
$(iframe).trigger('load');
|
867 |
+
}
|
868 |
+
} else {
|
869 |
+
complete();
|
870 |
+
}
|
871 |
+
|
872 |
+
if (settings.get('transition') === 'fade') {
|
873 |
+
$box.fadeTo(speed, 1, removeFilter);
|
874 |
+
} else {
|
875 |
+
removeFilter();
|
876 |
+
}
|
877 |
+
};
|
878 |
+
|
879 |
+
if (settings.get('transition') === 'fade') {
|
880 |
+
$box.fadeTo(speed, 0, function () {
|
881 |
+
publicMethod.position(0, callback);
|
882 |
+
});
|
883 |
+
} else {
|
884 |
+
publicMethod.position(speed, callback);
|
885 |
+
}
|
886 |
+
};
|
887 |
+
|
888 |
+
function load () {
|
889 |
+
var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
|
890 |
+
|
891 |
+
active = true;
|
892 |
+
|
893 |
+
photo = false;
|
894 |
+
|
895 |
+
trigger(event_purge);
|
896 |
+
trigger(event_load);
|
897 |
+
settings.get('onLoad');
|
898 |
+
|
899 |
+
settings.h = settings.get('height') ?
|
900 |
+
setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight :
|
901 |
+
settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y');
|
902 |
+
|
903 |
+
settings.w = settings.get('width') ?
|
904 |
+
setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth :
|
905 |
+
settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x');
|
906 |
+
|
907 |
+
// Sets the minimum dimensions for use in image scaling
|
908 |
+
settings.mw = settings.w;
|
909 |
+
settings.mh = settings.h;
|
910 |
+
|
911 |
+
// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
|
912 |
+
// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
|
913 |
+
if (settings.get('maxWidth')) {
|
914 |
+
settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth;
|
915 |
+
settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
|
916 |
+
}
|
917 |
+
if (settings.get('maxHeight')) {
|
918 |
+
settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight;
|
919 |
+
settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
|
920 |
+
}
|
921 |
+
|
922 |
+
href = settings.get('href');
|
923 |
+
|
924 |
+
loadingTimer = setTimeout(function () {
|
925 |
+
$loadingOverlay.show();
|
926 |
+
}, 100);
|
927 |
+
|
928 |
+
if (settings.get('inline')) {
|
929 |
+
var $target = $(href);
|
930 |
+
// Inserts an empty placeholder where inline content is being pulled from.
|
931 |
+
// An event is bound to put inline content back when Colorbox closes or loads new content.
|
932 |
+
$inline = $('<div>').hide().insertBefore($target);
|
933 |
+
|
934 |
+
$events.one(event_purge, function () {
|
935 |
+
$inline.replaceWith($target);
|
936 |
+
});
|
937 |
+
|
938 |
+
prep($target);
|
939 |
+
} else if (settings.get('iframe')) {
|
940 |
+
// IFrame element won't be added to the DOM until it is ready to be displayed,
|
941 |
+
// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
|
942 |
+
prep(" ");
|
943 |
+
} else if (settings.get('html')) {
|
944 |
+
prep(settings.get('html'));
|
945 |
+
} else if (isImage(settings, href)) {
|
946 |
+
|
947 |
+
href = retinaUrl(settings, href);
|
948 |
+
|
949 |
+
photo = new Image();
|
950 |
+
|
951 |
+
$(photo)
|
952 |
+
.addClass(prefix + 'Photo')
|
953 |
+
.bind('error',function () {
|
954 |
+
prep($tag(div, 'Error').html(settings.get('imgError')));
|
955 |
+
})
|
956 |
+
.one('load', function () {
|
957 |
+
if (request !== requests) {
|
958 |
+
return;
|
959 |
+
}
|
960 |
+
|
961 |
+
// A small pause because some browsers will occassionaly report a
|
962 |
+
// img.width and img.height of zero immediately after the img.onload fires
|
963 |
+
setTimeout(function(){
|
964 |
+
var percent;
|
965 |
+
|
966 |
+
$.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
|
967 |
+
var attr = $(settings.el).attr(val) || $(settings.el).attr('data-'+val);
|
968 |
+
if (attr) {
|
969 |
+
photo.setAttribute(val, attr);
|
970 |
+
}
|
971 |
+
});
|
972 |
+
|
973 |
+
if (settings.get('retinaImage') && window.devicePixelRatio > 1) {
|
974 |
+
photo.height = photo.height / window.devicePixelRatio;
|
975 |
+
photo.width = photo.width / window.devicePixelRatio;
|
976 |
+
}
|
977 |
+
|
978 |
+
if (settings.get('scalePhotos')) {
|
979 |
+
setResize = function () {
|
980 |
+
photo.height -= photo.height * percent;
|
981 |
+
photo.width -= photo.width * percent;
|
982 |
+
};
|
983 |
+
if (settings.mw && photo.width > settings.mw) {
|
984 |
+
percent = (photo.width - settings.mw) / photo.width;
|
985 |
+
setResize();
|
986 |
+
}
|
987 |
+
if (settings.mh && photo.height > settings.mh) {
|
988 |
+
percent = (photo.height - settings.mh) / photo.height;
|
989 |
+
setResize();
|
990 |
+
}
|
991 |
+
}
|
992 |
+
|
993 |
+
if (settings.h) {
|
994 |
+
photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
|
995 |
+
}
|
996 |
+
|
997 |
+
if ($related[1] && (settings.get('loop') || $related[index + 1])) {
|
998 |
+
photo.style.cursor = 'pointer';
|
999 |
+
photo.onclick = function () {
|
1000 |
+
publicMethod.next();
|
1001 |
+
};
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
photo.style.width = photo.width + 'px';
|
1005 |
+
photo.style.height = photo.height + 'px';
|
1006 |
+
prep(photo);
|
1007 |
+
}, 1);
|
1008 |
+
});
|
1009 |
+
|
1010 |
+
photo.src = href;
|
1011 |
+
|
1012 |
+
} else if (href) {
|
1013 |
+
$loadingBay.load(href, settings.get('data'), function (data, status) {
|
1014 |
+
if (request === requests) {
|
1015 |
+
prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents());
|
1016 |
+
}
|
1017 |
+
});
|
1018 |
+
}
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
// Navigates to the next page/image in a set.
|
1022 |
+
publicMethod.next = function () {
|
1023 |
+
if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) {
|
1024 |
+
index = getIndex(1);
|
1025 |
+
launch($related[index]);
|
1026 |
+
}
|
1027 |
+
};
|
1028 |
+
|
1029 |
+
publicMethod.prev = function () {
|
1030 |
+
if (!active && $related[1] && (settings.get('loop') || index)) {
|
1031 |
+
index = getIndex(-1);
|
1032 |
+
launch($related[index]);
|
1033 |
+
}
|
1034 |
+
};
|
1035 |
+
|
1036 |
+
// Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
|
1037 |
+
publicMethod.close = function () {
|
1038 |
+
if (open && !closing) {
|
1039 |
+
|
1040 |
+
closing = true;
|
1041 |
+
open = false;
|
1042 |
+
trigger(event_cleanup);
|
1043 |
+
settings.get('onCleanup');
|
1044 |
+
$window.unbind('.' + prefix);
|
1045 |
+
$overlay.fadeTo(settings.get('fadeOut') || 0, 0);
|
1046 |
+
|
1047 |
+
$box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () {
|
1048 |
+
$box.hide();
|
1049 |
+
$overlay.hide();
|
1050 |
+
trigger(event_purge);
|
1051 |
+
$loaded.remove();
|
1052 |
+
|
1053 |
+
setTimeout(function () {
|
1054 |
+
closing = false;
|
1055 |
+
trigger(event_closed);
|
1056 |
+
settings.get('onClosed');
|
1057 |
+
}, 1);
|
1058 |
+
});
|
1059 |
+
}
|
1060 |
+
};
|
1061 |
+
|
1062 |
+
// Removes changes Colorbox made to the document, but does not remove the plugin.
|
1063 |
+
publicMethod.remove = function () {
|
1064 |
+
if (!$box) { return; }
|
1065 |
+
|
1066 |
+
$box.stop();
|
1067 |
+
$[colorbox].close();
|
1068 |
+
$box.stop(false, true).remove();
|
1069 |
+
$overlay.remove();
|
1070 |
+
closing = false;
|
1071 |
+
$box = null;
|
1072 |
+
$('.' + boxElement)
|
1073 |
+
.removeData(colorbox)
|
1074 |
+
.removeClass(boxElement);
|
1075 |
+
|
1076 |
+
$(document).unbind('click.'+prefix).unbind('keydown.'+prefix);
|
1077 |
+
};
|
1078 |
+
|
1079 |
+
// A method for fetching the current element Colorbox is referencing.
|
1080 |
+
// returns a jQuery object.
|
1081 |
+
publicMethod.element = function () {
|
1082 |
+
return $(settings.el);
|
1083 |
+
};
|
1084 |
+
|
1085 |
+
publicMethod.settings = defaults;
|
1086 |
+
|
1087 |
+
}(jQuery, document, window));
|
lightbox-gallery-ja.mo
CHANGED
Binary file
|
lightbox-gallery-ja.po
CHANGED
@@ -3,17 +3,17 @@ msgstr ""
|
|
3 |
"Project-Id-Version: Lightbox Gallery\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2012-04-28 02:04+0900\n"
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-Language: Japanese\n"
|
13 |
-
"X-Poedit-Country: JAPAN\n"
|
14 |
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_c\n"
|
16 |
"X-Poedit-Basepath: ../\n"
|
|
|
|
|
17 |
"X-Poedit-SearchPath-0: lightbox-gallery\n"
|
18 |
|
19 |
#: lightbox-gallery/lightbox-gallery.php:229
|
@@ -67,8 +67,16 @@ msgstr "Lightbox"
|
|
67 |
|
68 |
#: lightbox-gallery/lightbox-gallery.php:317
|
69 |
#, php-format
|
70 |
-
msgid "
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
#: lightbox-gallery/lightbox-gallery.php:323
|
74 |
msgid "Highslide JS"
|
@@ -76,20 +84,37 @@ msgstr "Highslide JS"
|
|
76 |
|
77 |
#: lightbox-gallery/lightbox-gallery.php:325
|
78 |
#, php-format
|
79 |
-
msgid "
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
#: lightbox-gallery/lightbox-gallery.php:331
|
83 |
#, php-format
|
84 |
-
msgid "
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
#: lightbox-gallery/lightbox-gallery.php:339
|
88 |
-
msgid "
|
|
|
|
|
89 |
msgstr "特定のカテゴリーでLightboxを使用したい場合(カンマ区切り)"
|
90 |
|
91 |
#: lightbox-gallery/lightbox-gallery.php:343
|
92 |
-
msgid "
|
|
|
|
|
93 |
msgstr "特定のページでLightboxを使用したい場合(カンマ区切り)"
|
94 |
|
95 |
#: lightbox-gallery/lightbox-gallery.php:347
|
@@ -169,8 +194,12 @@ msgid "Script Auto Download"
|
|
169 |
msgstr "スクリプト自動ダウンロード"
|
170 |
|
171 |
#: lightbox-gallery/lightbox-gallery.php:416
|
172 |
-
msgid "
|
173 |
-
|
|
|
|
|
|
|
|
|
174 |
|
175 |
#: lightbox-gallery/lightbox-gallery.php:418
|
176 |
msgid "Download Scripts »"
|
@@ -181,16 +210,25 @@ msgid "Donation"
|
|
181 |
msgstr "寄付"
|
182 |
|
183 |
#: lightbox-gallery/lightbox-gallery.php:429
|
184 |
-
msgid "
|
185 |
-
|
|
|
|
|
|
|
|
|
186 |
|
187 |
#: lightbox-gallery/lightbox-gallery.php:443
|
188 |
msgid "CMS x WP"
|
189 |
msgstr "CMS×WP"
|
190 |
|
191 |
#: lightbox-gallery/lightbox-gallery.php:445
|
192 |
-
msgid "
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
#: lightbox-gallery/lightbox-gallery.php:446
|
196 |
msgid "WordPress plugin sales site: CMS x WP"
|
3 |
"Project-Id-Version: Lightbox Gallery\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2012-04-28 02:04+0900\n"
|
6 |
+
"PO-Revision-Date: 2015-02-16 17:39+0900\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
12 |
"X-Poedit-SourceCharset: utf-8\n"
|
13 |
"X-Poedit-KeywordsList: __;_e;_c\n"
|
14 |
"X-Poedit-Basepath: ../\n"
|
15 |
+
"Language: ja_JP\n"
|
16 |
+
"X-Generator: Poedit 1.6.6\n"
|
17 |
"X-Poedit-SearchPath-0: lightbox-gallery\n"
|
18 |
|
19 |
#: lightbox-gallery/lightbox-gallery.php:229
|
67 |
|
68 |
#: lightbox-gallery/lightbox-gallery.php:317
|
69 |
#, php-format
|
70 |
+
msgid ""
|
71 |
+
"Due to the license regulation by the plugin directory, it is impossible to "
|
72 |
+
"include `jquery.lightbox.js`. Just <a href=\"%s\" target=\"_blank"
|
73 |
+
"\">download</a> the lightbox script and put `jquery.lightbox.js` into `/"
|
74 |
+
"lightbox-gallery/js/`."
|
75 |
+
msgstr ""
|
76 |
+
"プラグインディレクトリのライセンス規制のため、`jquery.lightbox.js` を含めるこ"
|
77 |
+
"とができなくなりました。lightbox のスクリプトを<a href=\"%s\" target=\"_blank"
|
78 |
+
"\">ダウンロード</a>し、`jquery.lightbox.js`を`/lightbox-gallery/js/`に設置し"
|
79 |
+
"てください。"
|
80 |
|
81 |
#: lightbox-gallery/lightbox-gallery.php:323
|
82 |
msgid "Highslide JS"
|
84 |
|
85 |
#: lightbox-gallery/lightbox-gallery.php:325
|
86 |
#, php-format
|
87 |
+
msgid ""
|
88 |
+
"Caution: Highslide JS is licensed under a Creative Commons Attribution-"
|
89 |
+
"NonCommercial 2.5 License. You need the author's permission to use Highslide "
|
90 |
+
"JS on commercial websites. <a href=\"%s\" target=\"_blank\">Please look at "
|
91 |
+
"the author's website.</a>"
|
92 |
+
msgstr ""
|
93 |
+
"注意: Highslide JSは、Creative Commons 表示-非営利 2.5 一般のライセンスで"
|
94 |
+
"す。Highslide JSを商用ウェブサイトで使用するには著作者の許可が必要です。<a "
|
95 |
+
"href=\"%s\" target=\"_blank\">著作者のウェブサイトをご覧ください。</a>"
|
96 |
|
97 |
#: lightbox-gallery/lightbox-gallery.php:331
|
98 |
#, php-format
|
99 |
+
msgid ""
|
100 |
+
"You can change the lightbox view to the highslide. Just <a href=\"%s\" "
|
101 |
+
"target=\"_blank\">download</a> the highslide script and put `highslide.js` "
|
102 |
+
"into `/lightbox-gallery/js/`."
|
103 |
+
msgstr ""
|
104 |
+
"Lightbox の表示を highslide に変更できます。highslide のスクリプトを<a href="
|
105 |
+
"\"%s\" target=\"_blank\">ダウンロード</a>し、`highslide.js`を`/lightbox-"
|
106 |
+
"gallery/js/`に設置してください。"
|
107 |
|
108 |
#: lightbox-gallery/lightbox-gallery.php:339
|
109 |
+
msgid ""
|
110 |
+
"In case that you would like to use the lightbox in certain categories (comma-"
|
111 |
+
"deliminated)"
|
112 |
msgstr "特定のカテゴリーでLightboxを使用したい場合(カンマ区切り)"
|
113 |
|
114 |
#: lightbox-gallery/lightbox-gallery.php:343
|
115 |
+
msgid ""
|
116 |
+
"In case that you would like to use the lightbox in certain pages (comma-"
|
117 |
+
"deliminated)"
|
118 |
msgstr "特定のページでLightboxを使用したい場合(カンマ区切り)"
|
119 |
|
120 |
#: lightbox-gallery/lightbox-gallery.php:347
|
194 |
msgstr "スクリプト自動ダウンロード"
|
195 |
|
196 |
#: lightbox-gallery/lightbox-gallery.php:416
|
197 |
+
msgid ""
|
198 |
+
"Just push the button and `jquery.lightbox.js` and `highslide.js` will be "
|
199 |
+
"downloaded automatically."
|
200 |
+
msgstr ""
|
201 |
+
"このボタンを押すだけで、`jquery.lightbox.js` と `highslide.js` を自動的にダウ"
|
202 |
+
"ンロードします。"
|
203 |
|
204 |
#: lightbox-gallery/lightbox-gallery.php:418
|
205 |
msgid "Download Scripts »"
|
210 |
msgstr "寄付"
|
211 |
|
212 |
#: lightbox-gallery/lightbox-gallery.php:429
|
213 |
+
msgid ""
|
214 |
+
"If you liked this plugin, please make a donation via paypal! Any amount is "
|
215 |
+
"welcome. Your support is much appreciated."
|
216 |
+
msgstr ""
|
217 |
+
"このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたしま"
|
218 |
+
"す。"
|
219 |
|
220 |
#: lightbox-gallery/lightbox-gallery.php:443
|
221 |
msgid "CMS x WP"
|
222 |
msgstr "CMS×WP"
|
223 |
|
224 |
#: lightbox-gallery/lightbox-gallery.php:445
|
225 |
+
msgid ""
|
226 |
+
"There are much more plugins which are useful for developing business "
|
227 |
+
"websites such as membership sites or ec sites. You could totally treat "
|
228 |
+
"WordPress as CMS by use of CMS x WP plugins."
|
229 |
+
msgstr ""
|
230 |
+
"会員制サイトやECサイトなどのビジネスサイト構築に役立つプラグインが盛りだくさ"
|
231 |
+
"ん。CMS×WPのプラグインで WordPress が CMS として大いに活躍します。"
|
232 |
|
233 |
#: lightbox-gallery/lightbox-gallery.php:446
|
234 |
msgid "WordPress plugin sales site: CMS x WP"
|
lightbox-gallery.css
CHANGED
@@ -41,8 +41,10 @@
|
|
41 |
position: relative;
|
42 |
background-color: #fff;
|
43 |
width: 250px;
|
44 |
-
height:
|
45 |
margin: 0 auto;
|
|
|
|
|
46 |
}
|
47 |
#lightbox-container-image { padding: 10px; }
|
48 |
#lightbox-loading {
|
@@ -61,6 +63,7 @@
|
|
61 |
height: 100%;
|
62 |
width: 100%;
|
63 |
z-index: 10;
|
|
|
64 |
}
|
65 |
#lightbox-container-image-box > #lightbox-nav { left: 0; }
|
66 |
#lightbox-nav a { outline: none;}
|
@@ -86,6 +89,8 @@
|
|
86 |
overflow: auto;
|
87 |
width: 100%;
|
88 |
padding: 0 10px 0;
|
|
|
|
|
89 |
}
|
90 |
#lightbox-container-image-data {
|
91 |
padding: 0 10px;
|
@@ -996,27 +1001,29 @@ html>/**/body .highslide-gallery ul img {
|
|
996 |
}
|
997 |
|
998 |
/*
|
999 |
-
|
1000 |
The following CSS is consistent between example themes and should not be altered.
|
1001 |
*/
|
1002 |
-
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;
|
|
|
1003 |
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
1004 |
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
1005 |
#cboxContent{position:relative;}
|
1006 |
-
#cboxLoadedContent{overflow:auto;}
|
1007 |
#cboxTitle{margin:0;}
|
1008 |
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
1009 |
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
1010 |
-
.cboxPhoto{float:left; margin:auto; border:0; display:block;}
|
1011 |
-
.cboxIframe{width:100%; height:100%; display:block; border:0;}
|
|
|
1012 |
|
1013 |
/*
|
1014 |
User Style:
|
1015 |
-
Change the following styles to modify the appearance of
|
1016 |
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
1017 |
*/
|
1018 |
-
#cboxOverlay{background:url(images/overlay.png) repeat 0 0;}
|
1019 |
-
#colorbox{}
|
1020 |
#cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;}
|
1021 |
#cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;}
|
1022 |
#cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;}
|
@@ -1031,13 +1038,20 @@ html>/**/body .highslide-gallery ul img {
|
|
1031 |
#cboxLoadedContent{margin-bottom:28px;}
|
1032 |
#cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
|
1033 |
#cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1034 |
#cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
|
1035 |
#cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
|
1036 |
#cboxPrevious:hover{background-position:-75px -25px;}
|
1037 |
#cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
|
1038 |
#cboxNext:hover{background-position:-50px -25px;}
|
1039 |
-
#cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
|
1040 |
-
#cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
|
1041 |
#cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
|
1042 |
#cboxClose:hover{background-position:-25px -25px;}
|
1043 |
|
@@ -1055,28 +1069,4 @@ html>/**/body .highslide-gallery ul img {
|
|
1055 |
.cboxIE #cboxMiddleLeft,
|
1056 |
.cboxIE #cboxMiddleRight {
|
1057 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
/*
|
1061 |
-
The following provides PNG transparency support for IE6
|
1062 |
-
Feel free to remove this and the /ie6/ directory if you have dropped IE6 support.
|
1063 |
-
*/
|
1064 |
-
.cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);}
|
1065 |
-
.cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);}
|
1066 |
-
.cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);}
|
1067 |
-
.cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);}
|
1068 |
-
.cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);}
|
1069 |
-
.cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);}
|
1070 |
-
.cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);}
|
1071 |
-
.cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);}
|
1072 |
-
|
1073 |
-
.cboxIE6 #cboxTopLeft,
|
1074 |
-
.cboxIE6 #cboxTopCenter,
|
1075 |
-
.cboxIE6 #cboxTopRight,
|
1076 |
-
.cboxIE6 #cboxBottomLeft,
|
1077 |
-
.cboxIE6 #cboxBottomCenter,
|
1078 |
-
.cboxIE6 #cboxBottomRight,
|
1079 |
-
.cboxIE6 #cboxMiddleLeft,
|
1080 |
-
.cboxIE6 #cboxMiddleRight {
|
1081 |
-
_behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
|
1082 |
}
|
41 |
position: relative;
|
42 |
background-color: #fff;
|
43 |
width: 250px;
|
44 |
+
height: auto;
|
45 |
margin: 0 auto;
|
46 |
+
max-width:100%;
|
47 |
+
min-height:250px;
|
48 |
}
|
49 |
#lightbox-container-image { padding: 10px; }
|
50 |
#lightbox-loading {
|
63 |
height: 100%;
|
64 |
width: 100%;
|
65 |
z-index: 10;
|
66 |
+
overflow: hidden;
|
67 |
}
|
68 |
#lightbox-container-image-box > #lightbox-nav { left: 0; }
|
69 |
#lightbox-nav a { outline: none;}
|
89 |
overflow: auto;
|
90 |
width: 100%;
|
91 |
padding: 0 10px 0;
|
92 |
+
max-width:100%;
|
93 |
+
height:auto;
|
94 |
}
|
95 |
#lightbox-container-image-data {
|
96 |
padding: 0 10px;
|
1001 |
}
|
1002 |
|
1003 |
/*
|
1004 |
+
Colorbox Core Style:
|
1005 |
The following CSS is consistent between example themes and should not be altered.
|
1006 |
*/
|
1007 |
+
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
|
1008 |
+
#cboxWrapper {max-width:none;}
|
1009 |
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
1010 |
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
1011 |
#cboxContent{position:relative;}
|
1012 |
+
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
|
1013 |
#cboxTitle{margin:0;}
|
1014 |
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
1015 |
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
1016 |
+
.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
|
1017 |
+
.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
|
1018 |
+
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
|
1019 |
|
1020 |
/*
|
1021 |
User Style:
|
1022 |
+
Change the following styles to modify the appearance of Colorbox. They are
|
1023 |
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
1024 |
*/
|
1025 |
+
#cboxOverlay{background:url(images/overlay.png) repeat 0 0; opacity: 0.9; filter: alpha(opacity = 90);}
|
1026 |
+
#colorbox{outline:0;}
|
1027 |
#cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;}
|
1028 |
#cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;}
|
1029 |
#cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;}
|
1038 |
#cboxLoadedContent{margin-bottom:28px;}
|
1039 |
#cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
|
1040 |
#cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
|
1041 |
+
#cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
|
1042 |
+
#cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
|
1043 |
+
|
1044 |
+
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
1045 |
+
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
1046 |
+
|
1047 |
+
/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
|
1048 |
+
#cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
|
1049 |
+
|
1050 |
#cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
|
1051 |
#cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
|
1052 |
#cboxPrevious:hover{background-position:-75px -25px;}
|
1053 |
#cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
|
1054 |
#cboxNext:hover{background-position:-50px -25px;}
|
|
|
|
|
1055 |
#cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
|
1056 |
#cboxClose:hover{background-position:-25px -25px;}
|
1057 |
|
1069 |
.cboxIE #cboxMiddleLeft,
|
1070 |
.cboxIE #cboxMiddleRight {
|
1071 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1072 |
}
|
lightbox-gallery.php
CHANGED
@@ -4,11 +4,11 @@ Plugin Name: Lightbox Gallery
|
|
4 |
Plugin URI: http://wpgogo.com/development/lightbox-gallery.html
|
5 |
Description: The Lightbox Gallery plugin changes the view of galleries to the lightbox.
|
6 |
Author: Hiroaki Miyashita
|
7 |
-
Version: 0.
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
11 |
-
/* Copyright 2009 -
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License as published by
|
@@ -310,11 +310,11 @@ function lightbox_gallery_admin() {
|
|
310 |
if ( !isset($options['global_settings']['lightbox_gallery_loading_type']) ) $options['global_settings']['lightbox_gallery_loading_type'] = 'lightbox';
|
311 |
?>
|
312 |
<p><label for="lightbox_gallery_loading_type"><?php _e('Choose the gallery loading type', 'lightbox-gallery'); ?></label>:<br />
|
313 |
-
<input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="colorbox"<?php checked('colorbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Colorbox', 'lightbox-gallery');
|
314 |
<?php
|
315 |
if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') || file_exists(TEMPLATEPATH.'/jquery.lightbox.js') ) :
|
316 |
?>
|
317 |
-
<input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="lightbox"<?php checked('lightbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Lightbox', 'lightbox-gallery');
|
318 |
<?php
|
319 |
else :
|
320 |
?>
|
@@ -325,7 +325,7 @@ function lightbox_gallery_admin() {
|
|
325 |
endif;
|
326 |
if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') || file_exists(TEMPLATEPATH.'/highslide.js') ) :
|
327 |
?>
|
328 |
-
<input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="highslide"<?php checked('highslide', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Highslide JS', 'lightbox-gallery');
|
329 |
<ul style="list-style-type:disc; padding-left:1.2em;">
|
330 |
<li><?php echo sprintf(__('Caution: Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. You need the author\'s permission to use Highslide JS on commercial websites. <a href="%s" target="_blank">Please look at the author\'s website.</a>', 'lightbox-gallery'), 'http://highslide.com/'); ?></li>
|
331 |
</ul>
|
@@ -514,13 +514,14 @@ function lightbox_gallery($attr) {
|
|
514 |
|
515 |
$page = isset($wp_query->query_vars['page']) ? $wp_query->query_vars['page'] : 1;
|
516 |
|
|
|
517 |
extract(shortcode_atts(array(
|
518 |
'order' => 'ASC',
|
519 |
'orderby' => 'menu_order ID',
|
520 |
'id' => $post->ID,
|
521 |
-
'itemtag' => 'dl',
|
522 |
-
'icontag' => 'dt',
|
523 |
-
'captiontag' => 'dd',
|
524 |
'columns' => $columns,
|
525 |
'size' => $size,
|
526 |
'include' => '',
|
@@ -590,8 +591,8 @@ function lightbox_gallery($attr) {
|
|
590 |
|
591 |
$gallery_style = $gallery_div = '';
|
592 |
if ( empty($options['global_settings']['lightbox_gallery_disable_column_css']) ) :
|
593 |
-
if ( apply_filters( 'use_default_gallery_style',
|
594 |
-
|
595 |
<style type='text/css'>
|
596 |
#{$selector} {
|
597 |
margin: auto;
|
@@ -630,7 +631,7 @@ function lightbox_gallery($attr) {
|
|
630 |
// <![CDATA[
|
631 |
jQuery(document).ready(function () {
|
632 |
jQuery(".'.$class.' a").attr("rel","'.$class.'");
|
633 |
-
jQuery(\'a[rel="'.$class.'"]\').colorbox({title: function(){ return jQuery(this).children().attr("alt"); }});
|
634 |
});
|
635 |
// ]]>
|
636 |
</script>'."\n";
|
@@ -673,7 +674,7 @@ function lightbox_gallery($attr) {
|
|
673 |
elseif ( $options['global_settings']['lightbox_gallery_loading_type'] == 'colorbox' ) :
|
674 |
$output .= ' rel="'.$class.'"';
|
675 |
endif;
|
676 |
-
$output .= '><img src="'.$thumbnail_link[0].'" width="'.$thumbnail_link[1].'" height="'.$thumbnail_link[2].'" alt="'.esc_attr($attachment->
|
677 |
</'.$icontag.'>';
|
678 |
if ( $captiontag && (trim($attachment->post_excerpt) || trim($attachment->post_content) || isset($metadata)) ) {
|
679 |
$output .= '<'.$captiontag.' class="gallery-caption" id="caption'.$attachment->ID.'">';
|
@@ -683,12 +684,20 @@ function lightbox_gallery($attr) {
|
|
683 |
$output .= '</'.$captiontag.'>';
|
684 |
}
|
685 |
$output .= '</'.$itemtag.'>';
|
686 |
-
if ( $columns > 0 && ++$i % $columns == 0 )
|
687 |
$output .= '<br style="clear: both" />';
|
|
|
688 |
}
|
689 |
}
|
690 |
-
|
691 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
692 |
$output .= wp_link_pages_for_lightbox_gallery(array('before' => $before, 'after' => $after, 'link_before' => $link_before, 'link_after' => $link_after, 'next_or_number' => $next_or_number, 'nextpagelink' => $nextpagelink, 'previouspagelink' => $previouspagelink, 'pagelink' => $pagelink, 'page' => $page, 'numpages' => $numpages, 'pagenavi' => $pagenavi));
|
693 |
|
694 |
return $output;
|
4 |
Plugin URI: http://wpgogo.com/development/lightbox-gallery.html
|
5 |
Description: The Lightbox Gallery plugin changes the view of galleries to the lightbox.
|
6 |
Author: Hiroaki Miyashita
|
7 |
+
Version: 0.8
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
11 |
+
/* Copyright 2009 -2015 Hiroaki Miyashita
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License as published by
|
310 |
if ( !isset($options['global_settings']['lightbox_gallery_loading_type']) ) $options['global_settings']['lightbox_gallery_loading_type'] = 'lightbox';
|
311 |
?>
|
312 |
<p><label for="lightbox_gallery_loading_type"><?php _e('Choose the gallery loading type', 'lightbox-gallery'); ?></label>:<br />
|
313 |
+
<label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="colorbox"<?php checked('colorbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Colorbox', 'lightbox-gallery'); ?></label><br />
|
314 |
<?php
|
315 |
if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') || file_exists(TEMPLATEPATH.'/jquery.lightbox.js') ) :
|
316 |
?>
|
317 |
+
<label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="lightbox"<?php checked('lightbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Lightbox', 'lightbox-gallery'); ?></label><br />
|
318 |
<?php
|
319 |
else :
|
320 |
?>
|
325 |
endif;
|
326 |
if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') || file_exists(TEMPLATEPATH.'/highslide.js') ) :
|
327 |
?>
|
328 |
+
<label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="highslide"<?php checked('highslide', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Highslide JS', 'lightbox-gallery'); ?></label><br />
|
329 |
<ul style="list-style-type:disc; padding-left:1.2em;">
|
330 |
<li><?php echo sprintf(__('Caution: Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. You need the author\'s permission to use Highslide JS on commercial websites. <a href="%s" target="_blank">Please look at the author\'s website.</a>', 'lightbox-gallery'), 'http://highslide.com/'); ?></li>
|
331 |
</ul>
|
514 |
|
515 |
$page = isset($wp_query->query_vars['page']) ? $wp_query->query_vars['page'] : 1;
|
516 |
|
517 |
+
$html5 = current_theme_supports( 'html5', 'gallery' );
|
518 |
extract(shortcode_atts(array(
|
519 |
'order' => 'ASC',
|
520 |
'orderby' => 'menu_order ID',
|
521 |
'id' => $post->ID,
|
522 |
+
'itemtag' => $html5 ? 'figure' : 'dl',
|
523 |
+
'icontag' => $html5 ? 'div' : 'dt',
|
524 |
+
'captiontag' => $html5 ? 'figcaption' : 'dd',
|
525 |
'columns' => $columns,
|
526 |
'size' => $size,
|
527 |
'include' => '',
|
591 |
|
592 |
$gallery_style = $gallery_div = '';
|
593 |
if ( empty($options['global_settings']['lightbox_gallery_disable_column_css']) ) :
|
594 |
+
if ( apply_filters( 'use_default_gallery_style', ! $html5 ) )
|
595 |
+
$gallery_style = "
|
596 |
<style type='text/css'>
|
597 |
#{$selector} {
|
598 |
margin: auto;
|
631 |
// <![CDATA[
|
632 |
jQuery(document).ready(function () {
|
633 |
jQuery(".'.$class.' a").attr("rel","'.$class.'");
|
634 |
+
jQuery(\'a[rel="'.$class.'"]\').colorbox({maxWidth:"95%", maxHeight:"95%",title: function(){ return jQuery(this).children().attr("alt"); }});
|
635 |
});
|
636 |
// ]]>
|
637 |
</script>'."\n";
|
674 |
elseif ( $options['global_settings']['lightbox_gallery_loading_type'] == 'colorbox' ) :
|
675 |
$output .= ' rel="'.$class.'"';
|
676 |
endif;
|
677 |
+
$output .= '><img src="'.$thumbnail_link[0].'" width="'.$thumbnail_link[1].'" height="'.$thumbnail_link[2].'" alt="'.esc_attr($attachment->_wp_attachment_image_alt).'" /></a>
|
678 |
</'.$icontag.'>';
|
679 |
if ( $captiontag && (trim($attachment->post_excerpt) || trim($attachment->post_content) || isset($metadata)) ) {
|
680 |
$output .= '<'.$captiontag.' class="gallery-caption" id="caption'.$attachment->ID.'">';
|
684 |
$output .= '</'.$captiontag.'>';
|
685 |
}
|
686 |
$output .= '</'.$itemtag.'>';
|
687 |
+
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
688 |
$output .= '<br style="clear: both" />';
|
689 |
+
}
|
690 |
}
|
691 |
}
|
692 |
+
|
693 |
+
if ( ! $html5 && $columns > 0 && $i % $columns !== 0 ) {
|
694 |
+
$output .= "
|
695 |
+
<br style='clear: both' />";
|
696 |
+
}
|
697 |
+
|
698 |
+
$output .= "
|
699 |
+
</div>\n";
|
700 |
+
|
701 |
$output .= wp_link_pages_for_lightbox_gallery(array('before' => $before, 'after' => $after, 'link_before' => $link_before, 'link_after' => $link_after, 'next_or_number' => $next_or_number, 'nextpagelink' => $nextpagelink, 'previouspagelink' => $previouspagelink, 'pagelink' => $pagelink, 'page' => $page, 'numpages' => $numpages, 'pagenavi' => $pagenavi));
|
702 |
|
703 |
return $output;
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Hiroaki Miyashita
|
|
3 |
Donate link: http://wpgogo.com/development/lightbox-gallery.html
|
4 |
Tags: lightbox, gallery, galleries, image, images, album, photo, photos, picture, pictures, jQuery, Highslide, Colorbox
|
5 |
Requires at least: 2.5
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
The Lightbox Gallery plugin changes the view of galleries to the lightbox.
|
@@ -34,6 +34,7 @@ Localization
|
|
34 |
* Spanish (es_ES) - [Daniel Tarrero](http://www.bluebrain.es/)
|
35 |
* Danish (da_DK) - [Jacob Voldby](http://www.clmedia.dk)
|
36 |
* German (de_DE) - Michael Wruck and Tacitus Media
|
|
|
37 |
* French (fr_FR) - [BenLeTibetain](http://www.benletibetain.net/)
|
38 |
* Hindi (hi_IN) - [Outshine Solutions](http://outshinesolutions.com/web-hosting/web-hosting-india.html)
|
39 |
* Croatian (hr) - [Tomislav Konestabo](http://aciddot.com/)
|
@@ -77,6 +78,10 @@ Just add rel="lightbox" into "a" tag. Here is a sample.
|
|
77 |
If you would like to handle galleries separately, add different class names
|
78 |
into [gallery]. ex) [gallery class="gallery2"]
|
79 |
|
|
|
|
|
|
|
|
|
80 |
== Screenshots ==
|
81 |
|
82 |
1. Lightbox Gallery
|
@@ -132,6 +137,13 @@ If you would like not to show the navigation, set `0`. The default is `1`.
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
= 0.7.4 =
|
136 |
* Bugfix: support for WordPress 3.5.
|
137 |
|
3 |
Donate link: http://wpgogo.com/development/lightbox-gallery.html
|
4 |
Tags: lightbox, gallery, galleries, image, images, album, photo, photos, picture, pictures, jQuery, Highslide, Colorbox
|
5 |
Requires at least: 2.5
|
6 |
+
Tested up to: 4.1
|
7 |
+
Stable tag: 0.8
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
The Lightbox Gallery plugin changes the view of galleries to the lightbox.
|
34 |
* Spanish (es_ES) - [Daniel Tarrero](http://www.bluebrain.es/)
|
35 |
* Danish (da_DK) - [Jacob Voldby](http://www.clmedia.dk)
|
36 |
* German (de_DE) - Michael Wruck and Tacitus Media
|
37 |
+
* Farsi (fa_IR) - [Ehsan Razavi](http://webdata.in/)
|
38 |
* French (fr_FR) - [BenLeTibetain](http://www.benletibetain.net/)
|
39 |
* Hindi (hi_IN) - [Outshine Solutions](http://outshinesolutions.com/web-hosting/web-hosting-india.html)
|
40 |
* Croatian (hr) - [Tomislav Konestabo](http://aciddot.com/)
|
78 |
If you would like to handle galleries separately, add different class names
|
79 |
into [gallery]. ex) [gallery class="gallery2"]
|
80 |
|
81 |
+
* Java Script does not seem to be loading?
|
82 |
+
|
83 |
+
Check out your theme has `wp_head()` in the header and `wp_footer()` in ther footer.
|
84 |
+
|
85 |
== Screenshots ==
|
86 |
|
87 |
1. Lightbox Gallery
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= 0.8 =
|
141 |
+
* Responsive output.
|
142 |
+
* Gallery code renewal.
|
143 |
+
|
144 |
+
= 0.7.5 =
|
145 |
+
* Farsi (fa_IR) - Ehsan Razavi
|
146 |
+
|
147 |
= 0.7.4 =
|
148 |
* Bugfix: support for WordPress 3.5.
|
149 |
|