├── .gitignore
└── widget
├── css
├── error_bg.png
├── error_sign.png
├── lightbox.css
├── lightbox.min.css
├── loader.gif
├── panorama.png
└── ui-lightness
│ ├── images
│ ├── ui-bg_diagonals-thick_18_b81900_40x40.png
│ ├── ui-bg_diagonals-thick_20_666666_40x40.png
│ ├── ui-bg_flat_10_000000_40x100.png
│ ├── ui-bg_glass_100_f6f6f6_1x400.png
│ ├── ui-bg_glass_100_fdf5ce_1x400.png
│ ├── ui-bg_glass_65_ffffff_1x400.png
│ ├── ui-bg_gloss-wave_35_f6a828_500x100.png
│ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png
│ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png
│ ├── ui-icons_222222_256x240.png
│ ├── ui-icons_228ef1_256x240.png
│ ├── ui-icons_ef8c08_256x240.png
│ ├── ui-icons_ffd27a_256x240.png
│ └── ui-icons_ffffff_256x240.png
│ └── jquery-ui-1.8.16.custom.css
└── lib
├── jquery-1.6.4.js
├── jquery-1.6.4.min.js
├── jquery.ui.core.js
├── jquery.ui.core.min.js
├── jquery.ui.rlightbox.js
├── jquery.ui.rlightbox.min.js
├── jquery.ui.widget.js
└── jquery.ui.widget.min.js
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | README
3 | rlightbox2.komodoproject
4 | tmp/
5 | tests/
6 | resource/
7 |
--------------------------------------------------------------------------------
/widget/css/error_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/error_bg.png
--------------------------------------------------------------------------------
/widget/css/error_sign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/error_sign.png
--------------------------------------------------------------------------------
/widget/css/lightbox.css:
--------------------------------------------------------------------------------
1 | #ui-lightbox, #ui-lightbox-panorama-icon, #ui-lightbox-content-container,
2 | #ui-lightbox-content, #ui-lightbox-content > *, #ui-lightbox-arrow,
3 | #ui-lightbox-arrow > span, #ui-lightbox-bottombar, #ui-lightbox-title-wrapper,
4 | #ui-lightbox-title, #ui-lightbox-bottombar-bottom, #ui-lightbox-button-prev,
5 | #ui-lightbox-button-prev > span, #ui-lightbox-counter, #ui-lightbox-button-next,
6 | #ui-lightbox-button-next > span, #ui-lightbox-button-close,
7 | #ui-lightbox-button-close > span, #ui-lightbox-map, #ui-lightbox-map-viewport,
8 | #ui-lightbox-overlay {
9 | margin: 0;
10 | padding: 0;
11 | }
12 |
13 | #ui-lightbox {
14 | font-size: 62.5%;
15 | padding: 5px;
16 | position: fixed;
17 | z-index: 9999;
18 | width: auto;
19 | height: auto;
20 | }
21 |
22 | #ui-lightbox-content-container {
23 | position: relative;
24 | }
25 |
26 | #ui-lightbox-content {
27 | border: 0;
28 | position: relative;
29 | width: 20px;
30 | height: 20px;
31 | }
32 |
33 | #ui-lightbox-content > * {
34 | display: block;
35 | position: absolute;
36 | z-index: 100;
37 | }
38 |
39 | #ui-lightbox-arrow {
40 | cursor: pointer;
41 | display: block;
42 | position: absolute;
43 | top: 50%;
44 | margin-top: -8px;
45 | z-index: 101;
46 | }
47 |
48 | .ui-lightbox-arrow-next {
49 | border-right: 0;
50 | right: 0;
51 | }
52 |
53 | .ui-lightbox-arrow-prev {
54 | border-left: 0;
55 | left: 0;
56 | }
57 |
58 | #ui-lightbox-panorama-icon {
59 | cursor: pointer;
60 | height: 32px;
61 | left: 20px;
62 | width: 32px;
63 | position: absolute;
64 | top: 20px;
65 | z-index: 110;
66 | }
67 |
68 | .ui-lightbox-panorama-icon-expand {
69 | background: url(panorama.png) top left no-repeat;
70 | }
71 |
72 | .ui-lightbox-panorama-icon-expand-hover {
73 | background: url(panorama.png) bottom left no-repeat;
74 | }
75 |
76 | .ui-lightbox-panorama-icon-shrink {
77 | background: url(panorama.png) top right no-repeat;
78 | }
79 |
80 | .ui-lightbox-panorama-icon-shrink-hover {
81 | background: url(panorama.png) bottom right no-repeat;
82 | }
83 |
84 | .ui-lightbox-loader {
85 | background: url(loader.gif) center center no-repeat;
86 | }
87 |
88 | #ui-lightbox-bottombar {
89 | margin-top: 5px;
90 | padding: 5px;
91 | height: 40px;
92 | position: relative;
93 | }
94 |
95 | #ui-lightbox-bottombar > p {
96 | margin-right: 20px;
97 | height: 20px;
98 | line-height: 20px;
99 | }
100 |
101 | #ui-lightbox-bottombar-bottom {
102 | text-align: left;
103 | }
104 |
105 | #ui-lightbox-title-wrapper {
106 | font-size: 14px;
107 | height: 20px;
108 | overflow: hidden;
109 | text-align: left;
110 | }
111 |
112 | #ui-lightbox-counter {
113 | font-size: 9px;
114 | line-height: 20px;
115 | vertical-align: middle;
116 | }
117 |
118 | #ui-lightbox-separator {
119 | line-height: 20px;
120 | padding: 0 2px;
121 | vertical-align: middle;
122 | }
123 |
124 | #ui-lightbox-button-prev, #ui-lightbox-button-next, #ui-lightbox-button-play {
125 | display: inline-block;
126 | line-height: 20px;
127 | vertical-align: middle;
128 | }
129 |
130 | #ui-lightbox-button-close {
131 | line-height: 20px;
132 | position: absolute;
133 | top: 17px;
134 | right: 5px;
135 | }
136 |
137 | .ui-lightbox-button {
138 | cursor: pointer;
139 | }
140 |
141 | .ui-lightbox-button.ui-state-highlight {
142 | border-style: none;
143 | background: none;
144 | }
145 |
146 | #ui-lightbox-map {
147 | background-color: black;
148 | border: 1px solid white;
149 | filter:Alpha(Opacity=20);
150 | height: 100px;
151 | opacity: .30;
152 | position: fixed;
153 | right: 20px;
154 | top: 20px;
155 | width: 150px;
156 | z-index: 10000;
157 | }
158 |
159 | #ui-lightbox-map-viewport {
160 | border: 1px solid white;
161 | left: -1px; /*prevent from overlapping the map border*/
162 | position: absolute;
163 | top: -1px; /*prevent from overlapping the map border*/
164 | }
165 |
166 | #ui-lightbox-overlay {
167 | border: 0;
168 | position: fixed;
169 | }
170 |
171 | #ui-lightbox-error {
172 | background: url(error_bg.png) repeat left top;
173 | }
174 |
175 | #ui-lightbox-error-message {
176 | color: #ffffff;
177 | font-size: 14px;
178 | line-height: 1.5;
179 | margin-bottom: 21px;
180 | padding-top: 274px;
181 | text-align: center;
182 | }
183 |
184 | #ui-lightbox-error-footer {
185 | text-align: center;
186 | }
187 |
188 | #ui-lightbox-error-footer > button {
189 | margin-right: 15px;
190 | }
191 |
192 | .ui-lightbox-error-icon-sign {
193 | background: url(error_sign.png) no-repeat center 226px;
194 | }
--------------------------------------------------------------------------------
/widget/css/lightbox.min.css:
--------------------------------------------------------------------------------
1 | #ui-lightbox,#ui-lightbox-panorama-icon,#ui-lightbox-content-container,#ui-lightbox-content,#ui-lightbox-content>*,#ui-lightbox-arrow,#ui-lightbox-arrow>span,#ui-lightbox-bottombar,#ui-lightbox-title-wrapper,#ui-lightbox-title,#ui-lightbox-bottombar-bottom,#ui-lightbox-button-prev,#ui-lightbox-button-prev>span,#ui-lightbox-counter,#ui-lightbox-button-next,#ui-lightbox-button-next>span,#ui-lightbox-button-close,#ui-lightbox-button-close>span,#ui-lightbox-map,#ui-lightbox-map-viewport,#ui-lightbox-overlay{margin:0;padding:0;}#ui-lightbox{font-size:62.5%;padding:5px;position:fixed;z-index:9999;width:auto;height:auto;}#ui-lightbox-content-container{position:relative;}#ui-lightbox-content{border:0;position:relative;width:20px;height:20px;}#ui-lightbox-content>*{display:block;position:absolute;z-index:100;}#ui-lightbox-arrow{cursor:pointer;display:block;position:absolute;top:50%;margin-top:-8px;z-index:101;}.ui-lightbox-arrow-next{border-right:0;right:0;}.ui-lightbox-arrow-prev{border-left:0;left:0;}#ui-lightbox-panorama-icon{cursor:pointer;height:32px;left:20px;width:32px;position:absolute;top:20px;z-index:110;}.ui-lightbox-panorama-icon-expand{background:url(panorama.png) top left no-repeat;}.ui-lightbox-panorama-icon-expand-hover{background:url(panorama.png) bottom left no-repeat;}.ui-lightbox-panorama-icon-shrink{background:url(panorama.png) top right no-repeat;}.ui-lightbox-panorama-icon-shrink-hover{background:url(panorama.png) bottom right no-repeat;}.ui-lightbox-loader{background:url(loader.gif) center center no-repeat;}#ui-lightbox-bottombar{margin-top:5px;padding:5px;height:40px;position:relative;}#ui-lightbox-bottombar>p{margin-right:20px;height:20px;line-height:20px;}#ui-lightbox-bottombar-bottom{text-align:left;}#ui-lightbox-title-wrapper{font-size:14px;height:20px;overflow:hidden;text-align:left;}#ui-lightbox-counter{font-size:9px;line-height:20px;vertical-align:middle;}#ui-lightbox-separator{line-height:20px;padding:0 2px;vertical-align:middle;}#ui-lightbox-button-prev,#ui-lightbox-button-next,#ui-lightbox-button-play{display:inline-block;line-height:20px;vertical-align:middle;}#ui-lightbox-button-close{line-height:20px;position:absolute;top:17px;right:5px;}.ui-lightbox-button{cursor:pointer;}.ui-lightbox-button.ui-state-highlight{border-style:none;background:none;}#ui-lightbox-map{background-color:black;border:1px solid white;filter:Alpha(Opacity=20);height:100px;opacity:.30;position:fixed;right:20px;top:20px;width:150px;z-index:10000;}#ui-lightbox-map-viewport{border:1px solid white;left:-1px;position:absolute;top:-1px;}#ui-lightbox-overlay{border:0;position:fixed;}#ui-lightbox-error{background:url(error_bg.png) repeat left top;}#ui-lightbox-error-message{color:#fff;font-size:14px;line-height:1.5;margin-bottom:21px;padding-top:274px;text-align:center;}#ui-lightbox-error-footer{text-align:center;}#ui-lightbox-error-footer>button{margin-right:15px;}.ui-lightbox-error-icon-sign{background:url(error_sign.png) no-repeat center 226px;}
--------------------------------------------------------------------------------
/widget/css/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/loader.gif
--------------------------------------------------------------------------------
/widget/css/panorama.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/panorama.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-icons_228ef1_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-icons_228ef1_256x240.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-icons_ef8c08_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-icons_ef8c08_256x240.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-icons_ffd27a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-icons_ffd27a_256x240.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ryrych/rlightbox2/5d7c95345b0d2ea5fe68a0e2bba4e5839f8b0b49/widget/css/ui-lightness/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/widget/css/ui-lightness/jquery-ui-1.8.16.custom.css:
--------------------------------------------------------------------------------
1 | /*
2 | * jQuery UI CSS Framework 1.8.16
3 | *
4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5 | * Dual licensed under the MIT or GPL Version 2 licenses.
6 | * http://jquery.org/license
7 | *
8 | * http://docs.jquery.com/UI/Theming/API
9 | */
10 |
11 | /* Layout helpers
12 | ----------------------------------*/
13 | .ui-helper-hidden { display: none; }
14 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17 | .ui-helper-clearfix { display: inline-block; }
18 | /* required comment for clearfix to work in Opera \*/
19 | * html .ui-helper-clearfix { height:1%; }
20 | .ui-helper-clearfix { display:block; }
21 | /* end clearfix */
22 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23 |
24 |
25 | /* Interaction Cues
26 | ----------------------------------*/
27 | .ui-state-disabled { cursor: default !important; }
28 |
29 |
30 | /* Icons
31 | ----------------------------------*/
32 |
33 | /* states and images */
34 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35 |
36 |
37 | /* Misc visuals
38 | ----------------------------------*/
39 |
40 | /* Overlays */
41 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42 |
43 |
44 | /*
45 | * jQuery UI CSS Framework 1.8.16
46 | *
47 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48 | * Dual licensed under the MIT or GPL Version 2 licenses.
49 | * http://jquery.org/license
50 | *
51 | * http://docs.jquery.com/UI/Theming/API
52 | *
53 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
54 | */
55 |
56 |
57 | /* Component containers
58 | ----------------------------------*/
59 | .ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
60 | .ui-widget .ui-widget { font-size: 1em; }
61 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
62 | .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
63 | .ui-widget-content a { color: #333333; }
64 | .ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
65 | .ui-widget-header a { color: #ffffff; }
66 |
67 | /* Interaction states
68 | ----------------------------------*/
69 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
70 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
71 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
72 | .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
73 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
74 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
75 | .ui-widget :active { outline: none; }
76 |
77 | /* Interaction Cues
78 | ----------------------------------*/
79 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
80 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
81 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
82 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
83 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
84 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
85 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
86 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
87 |
88 | /* Icons
89 | ----------------------------------*/
90 |
91 | /* states and images */
92 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
93 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
94 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
95 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
96 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
97 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
98 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
99 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
100 |
101 | /* positioning */
102 | .ui-icon-carat-1-n { background-position: 0 0; }
103 | .ui-icon-carat-1-ne { background-position: -16px 0; }
104 | .ui-icon-carat-1-e { background-position: -32px 0; }
105 | .ui-icon-carat-1-se { background-position: -48px 0; }
106 | .ui-icon-carat-1-s { background-position: -64px 0; }
107 | .ui-icon-carat-1-sw { background-position: -80px 0; }
108 | .ui-icon-carat-1-w { background-position: -96px 0; }
109 | .ui-icon-carat-1-nw { background-position: -112px 0; }
110 | .ui-icon-carat-2-n-s { background-position: -128px 0; }
111 | .ui-icon-carat-2-e-w { background-position: -144px 0; }
112 | .ui-icon-triangle-1-n { background-position: 0 -16px; }
113 | .ui-icon-triangle-1-ne { background-position: -16px -16px; }
114 | .ui-icon-triangle-1-e { background-position: -32px -16px; }
115 | .ui-icon-triangle-1-se { background-position: -48px -16px; }
116 | .ui-icon-triangle-1-s { background-position: -64px -16px; }
117 | .ui-icon-triangle-1-sw { background-position: -80px -16px; }
118 | .ui-icon-triangle-1-w { background-position: -96px -16px; }
119 | .ui-icon-triangle-1-nw { background-position: -112px -16px; }
120 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
121 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
122 | .ui-icon-arrow-1-n { background-position: 0 -32px; }
123 | .ui-icon-arrow-1-ne { background-position: -16px -32px; }
124 | .ui-icon-arrow-1-e { background-position: -32px -32px; }
125 | .ui-icon-arrow-1-se { background-position: -48px -32px; }
126 | .ui-icon-arrow-1-s { background-position: -64px -32px; }
127 | .ui-icon-arrow-1-sw { background-position: -80px -32px; }
128 | .ui-icon-arrow-1-w { background-position: -96px -32px; }
129 | .ui-icon-arrow-1-nw { background-position: -112px -32px; }
130 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
131 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
132 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
133 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
134 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
135 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
136 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
137 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
138 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
139 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
140 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
141 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
142 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
143 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
144 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
145 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
146 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
147 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
148 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
149 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
150 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
151 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
152 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
153 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
154 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
155 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
156 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
157 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
158 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
159 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
160 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
161 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
162 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
163 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
164 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
165 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
166 | .ui-icon-arrow-4 { background-position: 0 -80px; }
167 | .ui-icon-arrow-4-diag { background-position: -16px -80px; }
168 | .ui-icon-extlink { background-position: -32px -80px; }
169 | .ui-icon-newwin { background-position: -48px -80px; }
170 | .ui-icon-refresh { background-position: -64px -80px; }
171 | .ui-icon-shuffle { background-position: -80px -80px; }
172 | .ui-icon-transfer-e-w { background-position: -96px -80px; }
173 | .ui-icon-transferthick-e-w { background-position: -112px -80px; }
174 | .ui-icon-folder-collapsed { background-position: 0 -96px; }
175 | .ui-icon-folder-open { background-position: -16px -96px; }
176 | .ui-icon-document { background-position: -32px -96px; }
177 | .ui-icon-document-b { background-position: -48px -96px; }
178 | .ui-icon-note { background-position: -64px -96px; }
179 | .ui-icon-mail-closed { background-position: -80px -96px; }
180 | .ui-icon-mail-open { background-position: -96px -96px; }
181 | .ui-icon-suitcase { background-position: -112px -96px; }
182 | .ui-icon-comment { background-position: -128px -96px; }
183 | .ui-icon-person { background-position: -144px -96px; }
184 | .ui-icon-print { background-position: -160px -96px; }
185 | .ui-icon-trash { background-position: -176px -96px; }
186 | .ui-icon-locked { background-position: -192px -96px; }
187 | .ui-icon-unlocked { background-position: -208px -96px; }
188 | .ui-icon-bookmark { background-position: -224px -96px; }
189 | .ui-icon-tag { background-position: -240px -96px; }
190 | .ui-icon-home { background-position: 0 -112px; }
191 | .ui-icon-flag { background-position: -16px -112px; }
192 | .ui-icon-calendar { background-position: -32px -112px; }
193 | .ui-icon-cart { background-position: -48px -112px; }
194 | .ui-icon-pencil { background-position: -64px -112px; }
195 | .ui-icon-clock { background-position: -80px -112px; }
196 | .ui-icon-disk { background-position: -96px -112px; }
197 | .ui-icon-calculator { background-position: -112px -112px; }
198 | .ui-icon-zoomin { background-position: -128px -112px; }
199 | .ui-icon-zoomout { background-position: -144px -112px; }
200 | .ui-icon-search { background-position: -160px -112px; }
201 | .ui-icon-wrench { background-position: -176px -112px; }
202 | .ui-icon-gear { background-position: -192px -112px; }
203 | .ui-icon-heart { background-position: -208px -112px; }
204 | .ui-icon-star { background-position: -224px -112px; }
205 | .ui-icon-link { background-position: -240px -112px; }
206 | .ui-icon-cancel { background-position: 0 -128px; }
207 | .ui-icon-plus { background-position: -16px -128px; }
208 | .ui-icon-plusthick { background-position: -32px -128px; }
209 | .ui-icon-minus { background-position: -48px -128px; }
210 | .ui-icon-minusthick { background-position: -64px -128px; }
211 | .ui-icon-close { background-position: -80px -128px; }
212 | .ui-icon-closethick { background-position: -96px -128px; }
213 | .ui-icon-key { background-position: -112px -128px; }
214 | .ui-icon-lightbulb { background-position: -128px -128px; }
215 | .ui-icon-scissors { background-position: -144px -128px; }
216 | .ui-icon-clipboard { background-position: -160px -128px; }
217 | .ui-icon-copy { background-position: -176px -128px; }
218 | .ui-icon-contact { background-position: -192px -128px; }
219 | .ui-icon-image { background-position: -208px -128px; }
220 | .ui-icon-video { background-position: -224px -128px; }
221 | .ui-icon-script { background-position: -240px -128px; }
222 | .ui-icon-alert { background-position: 0 -144px; }
223 | .ui-icon-info { background-position: -16px -144px; }
224 | .ui-icon-notice { background-position: -32px -144px; }
225 | .ui-icon-help { background-position: -48px -144px; }
226 | .ui-icon-check { background-position: -64px -144px; }
227 | .ui-icon-bullet { background-position: -80px -144px; }
228 | .ui-icon-radio-off { background-position: -96px -144px; }
229 | .ui-icon-radio-on { background-position: -112px -144px; }
230 | .ui-icon-pin-w { background-position: -128px -144px; }
231 | .ui-icon-pin-s { background-position: -144px -144px; }
232 | .ui-icon-play { background-position: 0 -160px; }
233 | .ui-icon-pause { background-position: -16px -160px; }
234 | .ui-icon-seek-next { background-position: -32px -160px; }
235 | .ui-icon-seek-prev { background-position: -48px -160px; }
236 | .ui-icon-seek-end { background-position: -64px -160px; }
237 | .ui-icon-seek-start { background-position: -80px -160px; }
238 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
239 | .ui-icon-seek-first { background-position: -80px -160px; }
240 | .ui-icon-stop { background-position: -96px -160px; }
241 | .ui-icon-eject { background-position: -112px -160px; }
242 | .ui-icon-volume-off { background-position: -128px -160px; }
243 | .ui-icon-volume-on { background-position: -144px -160px; }
244 | .ui-icon-power { background-position: 0 -176px; }
245 | .ui-icon-signal-diag { background-position: -16px -176px; }
246 | .ui-icon-signal { background-position: -32px -176px; }
247 | .ui-icon-battery-0 { background-position: -48px -176px; }
248 | .ui-icon-battery-1 { background-position: -64px -176px; }
249 | .ui-icon-battery-2 { background-position: -80px -176px; }
250 | .ui-icon-battery-3 { background-position: -96px -176px; }
251 | .ui-icon-circle-plus { background-position: 0 -192px; }
252 | .ui-icon-circle-minus { background-position: -16px -192px; }
253 | .ui-icon-circle-close { background-position: -32px -192px; }
254 | .ui-icon-circle-triangle-e { background-position: -48px -192px; }
255 | .ui-icon-circle-triangle-s { background-position: -64px -192px; }
256 | .ui-icon-circle-triangle-w { background-position: -80px -192px; }
257 | .ui-icon-circle-triangle-n { background-position: -96px -192px; }
258 | .ui-icon-circle-arrow-e { background-position: -112px -192px; }
259 | .ui-icon-circle-arrow-s { background-position: -128px -192px; }
260 | .ui-icon-circle-arrow-w { background-position: -144px -192px; }
261 | .ui-icon-circle-arrow-n { background-position: -160px -192px; }
262 | .ui-icon-circle-zoomin { background-position: -176px -192px; }
263 | .ui-icon-circle-zoomout { background-position: -192px -192px; }
264 | .ui-icon-circle-check { background-position: -208px -192px; }
265 | .ui-icon-circlesmall-plus { background-position: 0 -208px; }
266 | .ui-icon-circlesmall-minus { background-position: -16px -208px; }
267 | .ui-icon-circlesmall-close { background-position: -32px -208px; }
268 | .ui-icon-squaresmall-plus { background-position: -48px -208px; }
269 | .ui-icon-squaresmall-minus { background-position: -64px -208px; }
270 | .ui-icon-squaresmall-close { background-position: -80px -208px; }
271 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
272 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
273 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
274 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
275 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
276 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
277 |
278 |
279 | /* Misc visuals
280 | ----------------------------------*/
281 |
282 | /* Corner radius */
283 | .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
284 | .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
285 | .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
286 | .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
287 |
288 | /* Overlays */
289 | .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
290 | .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
291 | * jQuery UI Resizable 1.8.16
292 | *
293 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
294 | * Dual licensed under the MIT or GPL Version 2 licenses.
295 | * http://jquery.org/license
296 | *
297 | * http://docs.jquery.com/UI/Resizable#theming
298 | */
299 | .ui-resizable { position: relative;}
300 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
301 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
302 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
303 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
304 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
305 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
306 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
307 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
308 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
309 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
310 | * jQuery UI Selectable 1.8.16
311 | *
312 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
313 | * Dual licensed under the MIT or GPL Version 2 licenses.
314 | * http://jquery.org/license
315 | *
316 | * http://docs.jquery.com/UI/Selectable#theming
317 | */
318 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
319 | /*
320 | * jQuery UI Accordion 1.8.16
321 | *
322 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
323 | * Dual licensed under the MIT or GPL Version 2 licenses.
324 | * http://jquery.org/license
325 | *
326 | * http://docs.jquery.com/UI/Accordion#theming
327 | */
328 | /* IE/Win - Fix animation bug - #4615 */
329 | .ui-accordion { width: 100%; }
330 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
331 | .ui-accordion .ui-accordion-li-fix { display: inline; }
332 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
333 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
334 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
335 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
336 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
337 | .ui-accordion .ui-accordion-content-active { display: block; }
338 | /*
339 | * jQuery UI Autocomplete 1.8.16
340 | *
341 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
342 | * Dual licensed under the MIT or GPL Version 2 licenses.
343 | * http://jquery.org/license
344 | *
345 | * http://docs.jquery.com/UI/Autocomplete#theming
346 | */
347 | .ui-autocomplete { position: absolute; cursor: default; }
348 |
349 | /* workarounds */
350 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
351 |
352 | /*
353 | * jQuery UI Menu 1.8.16
354 | *
355 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
356 | * Dual licensed under the MIT or GPL Version 2 licenses.
357 | * http://jquery.org/license
358 | *
359 | * http://docs.jquery.com/UI/Menu#theming
360 | */
361 | .ui-menu {
362 | list-style:none;
363 | padding: 2px;
364 | margin: 0;
365 | display:block;
366 | float: left;
367 | }
368 | .ui-menu .ui-menu {
369 | margin-top: -3px;
370 | }
371 | .ui-menu .ui-menu-item {
372 | margin:0;
373 | padding: 0;
374 | zoom: 1;
375 | float: left;
376 | clear: left;
377 | width: 100%;
378 | }
379 | .ui-menu .ui-menu-item a {
380 | text-decoration:none;
381 | display:block;
382 | padding:.2em .4em;
383 | line-height:1.5;
384 | zoom:1;
385 | }
386 | .ui-menu .ui-menu-item a.ui-state-hover,
387 | .ui-menu .ui-menu-item a.ui-state-active {
388 | font-weight: normal;
389 | margin: -1px;
390 | }
391 | /*
392 | * jQuery UI Button 1.8.16
393 | *
394 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
395 | * Dual licensed under the MIT or GPL Version 2 licenses.
396 | * http://jquery.org/license
397 | *
398 | * http://docs.jquery.com/UI/Button#theming
399 | */
400 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
401 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
402 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
403 | .ui-button-icons-only { width: 3.4em; }
404 | button.ui-button-icons-only { width: 3.7em; }
405 |
406 | /*button text element */
407 | .ui-button .ui-button-text { display: block; line-height: 1.4; }
408 | .ui-button-text-only .ui-button-text { padding: .4em 1em; }
409 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
410 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
411 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
412 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
413 | /* no icon support for input elements, provide padding by default */
414 | input.ui-button { padding: .4em 1em; }
415 |
416 | /*button icon element(s) */
417 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
418 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
419 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
420 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
421 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
422 |
423 | /*button sets*/
424 | .ui-buttonset { margin-right: 7px; }
425 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
426 |
427 | /* workarounds */
428 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
429 | /*
430 | * jQuery UI Dialog 1.8.16
431 | *
432 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
433 | * Dual licensed under the MIT or GPL Version 2 licenses.
434 | * http://jquery.org/license
435 | *
436 | * http://docs.jquery.com/UI/Dialog#theming
437 | */
438 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
439 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
440 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
441 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
442 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
443 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
444 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
445 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
446 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
447 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
448 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
449 | .ui-draggable .ui-dialog-titlebar { cursor: move; }
450 | /*
451 | * jQuery UI Slider 1.8.16
452 | *
453 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
454 | * Dual licensed under the MIT or GPL Version 2 licenses.
455 | * http://jquery.org/license
456 | *
457 | * http://docs.jquery.com/UI/Slider#theming
458 | */
459 | .ui-slider { position: relative; text-align: left; }
460 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
461 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
462 |
463 | .ui-slider-horizontal { height: .8em; }
464 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
465 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
466 | .ui-slider-horizontal .ui-slider-range-min { left: 0; }
467 | .ui-slider-horizontal .ui-slider-range-max { right: 0; }
468 |
469 | .ui-slider-vertical { width: .8em; height: 100px; }
470 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
471 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
472 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
473 | .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
474 | * jQuery UI Tabs 1.8.16
475 | *
476 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
477 | * Dual licensed under the MIT or GPL Version 2 licenses.
478 | * http://jquery.org/license
479 | *
480 | * http://docs.jquery.com/UI/Tabs#theming
481 | */
482 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
483 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
484 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
485 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
486 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
487 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
488 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
489 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
490 | .ui-tabs .ui-tabs-hide { display: none !important; }
491 | /*
492 | * jQuery UI Datepicker 1.8.16
493 | *
494 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
495 | * Dual licensed under the MIT or GPL Version 2 licenses.
496 | * http://jquery.org/license
497 | *
498 | * http://docs.jquery.com/UI/Datepicker#theming
499 | */
500 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
501 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
502 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
503 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
504 | .ui-datepicker .ui-datepicker-prev { left:2px; }
505 | .ui-datepicker .ui-datepicker-next { right:2px; }
506 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
507 | .ui-datepicker .ui-datepicker-next-hover { right:1px; }
508 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
509 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
510 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
511 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
512 | .ui-datepicker select.ui-datepicker-month,
513 | .ui-datepicker select.ui-datepicker-year { width: 49%;}
514 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
515 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
516 | .ui-datepicker td { border: 0; padding: 1px; }
517 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
518 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
519 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
520 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
521 |
522 | /* with multiple calendars */
523 | .ui-datepicker.ui-datepicker-multi { width:auto; }
524 | .ui-datepicker-multi .ui-datepicker-group { float:left; }
525 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
526 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
527 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
528 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
529 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
530 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
531 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
532 | .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
533 |
534 | /* RTL support */
535 | .ui-datepicker-rtl { direction: rtl; }
536 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
537 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
538 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
539 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
540 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
541 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
542 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
543 | .ui-datepicker-rtl .ui-datepicker-group { float:right; }
544 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
545 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
546 |
547 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
548 | .ui-datepicker-cover {
549 | display: none; /*sorry for IE5*/
550 | display/**/: block; /*sorry for IE5*/
551 | position: absolute; /*must have*/
552 | z-index: -1; /*must have*/
553 | filter: mask(); /*must have*/
554 | top: -4px; /*must have*/
555 | left: -4px; /*must have*/
556 | width: 200px; /*must have*/
557 | height: 200px; /*must have*/
558 | }/*
559 | * jQuery UI Progressbar 1.8.16
560 | *
561 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
562 | * Dual licensed under the MIT or GPL Version 2 licenses.
563 | * http://jquery.org/license
564 | *
565 | * http://docs.jquery.com/UI/Progressbar#theming
566 | */
567 | .ui-progressbar { height:2em; text-align: left; }
568 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
--------------------------------------------------------------------------------
/widget/lib/jquery.ui.core.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI 1.8.16
3 | *
4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5 | * Dual licensed under the MIT or GPL Version 2 licenses.
6 | * http://jquery.org/license
7 | *
8 | * http://docs.jquery.com/UI
9 | */
10 | (function( $, undefined ) {
11 |
12 | // prevent duplicate loading
13 | // this is only a problem because we proxy existing functions
14 | // and we don't want to double proxy them
15 | $.ui = $.ui || {};
16 | if ( $.ui.version ) {
17 | return;
18 | }
19 |
20 | $.extend( $.ui, {
21 | version: "1.8.16",
22 |
23 | keyCode: {
24 | ALT: 18,
25 | BACKSPACE: 8,
26 | CAPS_LOCK: 20,
27 | COMMA: 188,
28 | COMMAND: 91,
29 | COMMAND_LEFT: 91, // COMMAND
30 | COMMAND_RIGHT: 93,
31 | CONTROL: 17,
32 | DELETE: 46,
33 | DOWN: 40,
34 | END: 35,
35 | ENTER: 13,
36 | ESCAPE: 27,
37 | HOME: 36,
38 | INSERT: 45,
39 | LEFT: 37,
40 | MENU: 93, // COMMAND_RIGHT
41 | NUMPAD_ADD: 107,
42 | NUMPAD_DECIMAL: 110,
43 | NUMPAD_DIVIDE: 111,
44 | NUMPAD_ENTER: 108,
45 | NUMPAD_MULTIPLY: 106,
46 | NUMPAD_SUBTRACT: 109,
47 | PAGE_DOWN: 34,
48 | PAGE_UP: 33,
49 | PERIOD: 190,
50 | RIGHT: 39,
51 | SHIFT: 16,
52 | SPACE: 32,
53 | TAB: 9,
54 | UP: 38,
55 | WINDOWS: 91 // COMMAND
56 | }
57 | });
58 |
59 | // plugins
60 | $.fn.extend({
61 | propAttr: $.fn.prop || $.fn.attr,
62 |
63 | _focus: $.fn.focus,
64 | focus: function( delay, fn ) {
65 | return typeof delay === "number" ?
66 | this.each(function() {
67 | var elem = this;
68 | setTimeout(function() {
69 | $( elem ).focus();
70 | if ( fn ) {
71 | fn.call( elem );
72 | }
73 | }, delay );
74 | }) :
75 | this._focus.apply( this, arguments );
76 | },
77 |
78 | scrollParent: function() {
79 | var scrollParent;
80 | if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
81 | scrollParent = this.parents().filter(function() {
82 | return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
83 | }).eq(0);
84 | } else {
85 | scrollParent = this.parents().filter(function() {
86 | return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
87 | }).eq(0);
88 | }
89 |
90 | return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
91 | },
92 |
93 | zIndex: function( zIndex ) {
94 | if ( zIndex !== undefined ) {
95 | return this.css( "zIndex", zIndex );
96 | }
97 |
98 | if ( this.length ) {
99 | var elem = $( this[ 0 ] ), position, value;
100 | while ( elem.length && elem[ 0 ] !== document ) {
101 | // Ignore z-index if position is set to a value where z-index is ignored by the browser
102 | // This makes behavior of this function consistent across browsers
103 | // WebKit always returns auto if the element is positioned
104 | position = elem.css( "position" );
105 | if ( position === "absolute" || position === "relative" || position === "fixed" ) {
106 | // IE returns 0 when zIndex is not specified
107 | // other browsers return a string
108 | // we ignore the case of nested elements with an explicit value of 0
109 | //
110 | value = parseInt( elem.css( "zIndex" ), 10 );
111 | if ( !isNaN( value ) && value !== 0 ) {
112 | return value;
113 | }
114 | }
115 | elem = elem.parent();
116 | }
117 | }
118 |
119 | return 0;
120 | },
121 |
122 | disableSelection: function() {
123 | return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
124 | ".ui-disableSelection", function( event ) {
125 | event.preventDefault();
126 | });
127 | },
128 |
129 | enableSelection: function() {
130 | return this.unbind( ".ui-disableSelection" );
131 | }
132 | });
133 |
134 | $.each( [ "Width", "Height" ], function( i, name ) {
135 | var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
136 | type = name.toLowerCase(),
137 | orig = {
138 | innerWidth: $.fn.innerWidth,
139 | innerHeight: $.fn.innerHeight,
140 | outerWidth: $.fn.outerWidth,
141 | outerHeight: $.fn.outerHeight
142 | };
143 |
144 | function reduce( elem, size, border, margin ) {
145 | $.each( side, function() {
146 | size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
147 | if ( border ) {
148 | size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
149 | }
150 | if ( margin ) {
151 | size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
152 | }
153 | });
154 | return size;
155 | }
156 |
157 | $.fn[ "inner" + name ] = function( size ) {
158 | if ( size === undefined ) {
159 | return orig[ "inner" + name ].call( this );
160 | }
161 |
162 | return this.each(function() {
163 | $( this ).css( type, reduce( this, size ) + "px" );
164 | });
165 | };
166 |
167 | $.fn[ "outer" + name] = function( size, margin ) {
168 | if ( typeof size !== "number" ) {
169 | return orig[ "outer" + name ].call( this, size );
170 | }
171 |
172 | return this.each(function() {
173 | $( this).css( type, reduce( this, size, true, margin ) + "px" );
174 | });
175 | };
176 | });
177 |
178 | // selectors
179 | function focusable( element, isTabIndexNotNaN ) {
180 | var nodeName = element.nodeName.toLowerCase();
181 | if ( "area" === nodeName ) {
182 | var map = element.parentNode,
183 | mapName = map.name,
184 | img;
185 | if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
186 | return false;
187 | }
188 | img = $( "img[usemap=#" + mapName + "]" )[0];
189 | return !!img && visible( img );
190 | }
191 | return ( /input|select|textarea|button|object/.test( nodeName )
192 | ? !element.disabled
193 | : "a" == nodeName
194 | ? element.href || isTabIndexNotNaN
195 | : isTabIndexNotNaN)
196 | // the element and all of its ancestors must be visible
197 | && visible( element );
198 | }
199 |
200 | function visible( element ) {
201 | return !$( element ).parents().andSelf().filter(function() {
202 | return $.curCSS( this, "visibility" ) === "hidden" ||
203 | $.expr.filters.hidden( this );
204 | }).length;
205 | }
206 |
207 | $.extend( $.expr[ ":" ], {
208 | data: function( elem, i, match ) {
209 | return !!$.data( elem, match[ 3 ] );
210 | },
211 |
212 | focusable: function( element ) {
213 | return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
214 | },
215 |
216 | tabbable: function( element ) {
217 | var tabIndex = $.attr( element, "tabindex" ),
218 | isTabIndexNaN = isNaN( tabIndex );
219 | return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
220 | }
221 | });
222 |
223 | // support
224 | $(function() {
225 | var body = document.body,
226 | div = body.appendChild( div = document.createElement( "div" ) );
227 |
228 | $.extend( div.style, {
229 | minHeight: "100px",
230 | height: "auto",
231 | padding: 0,
232 | borderWidth: 0
233 | });
234 |
235 | $.support.minHeight = div.offsetHeight === 100;
236 | $.support.selectstart = "onselectstart" in div;
237 |
238 | // set display to none to avoid a layout bug in IE
239 | // http://dev.jquery.com/ticket/4014
240 | body.removeChild( div ).style.display = "none";
241 | });
242 |
243 |
244 |
245 |
246 |
247 | // deprecated
248 | $.extend( $.ui, {
249 | // $.ui.plugin is deprecated. Use the proxy pattern instead.
250 | plugin: {
251 | add: function( module, option, set ) {
252 | var proto = $.ui[ module ].prototype;
253 | for ( var i in set ) {
254 | proto.plugins[ i ] = proto.plugins[ i ] || [];
255 | proto.plugins[ i ].push( [ option, set[ i ] ] );
256 | }
257 | },
258 | call: function( instance, name, args ) {
259 | var set = instance.plugins[ name ];
260 | if ( !set || !instance.element[ 0 ].parentNode ) {
261 | return;
262 | }
263 |
264 | for ( var i = 0; i < set.length; i++ ) {
265 | if ( instance.options[ set[ i ][ 0 ] ] ) {
266 | set[ i ][ 1 ].apply( instance.element, args );
267 | }
268 | }
269 | }
270 | },
271 |
272 | // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
273 | contains: function( a, b ) {
274 | return document.compareDocumentPosition ?
275 | a.compareDocumentPosition( b ) & 16 :
276 | a !== b && a.contains( b );
277 | },
278 |
279 | // only used by resizable
280 | hasScroll: function( el, a ) {
281 |
282 | //If overflow is hidden, the element might have extra content, but the user wants to hide it
283 | if ( $( el ).css( "overflow" ) === "hidden") {
284 | return false;
285 | }
286 |
287 | var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
288 | has = false;
289 |
290 | if ( el[ scroll ] > 0 ) {
291 | return true;
292 | }
293 |
294 | // TODO: determine which cases actually cause this to happen
295 | // if the element doesn't have the scroll set, see if it's possible to
296 | // set the scroll
297 | el[ scroll ] = 1;
298 | has = ( el[ scroll ] > 0 );
299 | el[ scroll ] = 0;
300 | return has;
301 | },
302 |
303 | // these are odd functions, fix the API or move into individual plugins
304 | isOverAxis: function( x, reference, size ) {
305 | //Determines when x coordinate is over "b" element axis
306 | return ( x > reference ) && ( x < ( reference + size ) );
307 | },
308 | isOver: function( y, x, top, left, height, width ) {
309 | //Determines when x, y coordinates is over "b" element
310 | return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
311 | }
312 | });
313 |
314 | })( jQuery );
315 |
--------------------------------------------------------------------------------
/widget/lib/jquery.ui.core.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI 1.8.16
3 | *
4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5 | * Dual licensed under the MIT or GPL Version 2 licenses.
6 | * http://jquery.org/license
7 | *
8 | * http://docs.jquery.com/UI
9 | */
10 | (function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16",
11 | keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=
12 | this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
13 | "overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":
14 | "mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,
15 | outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,
16 | "tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&
17 | a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a _minimalLightboxWidth && width + _lightboxPadding <= _windowWidth ) {
367 | _statusWidth = 1;
368 | } else {
369 | _statusWidth = 2;
370 | }
371 |
372 | if ( height <= _minimalLightboxHeight ) {
373 | _statusHeight = -1;
374 | } else if ( height > _minimalLightboxHeight && _windowHeight >= height + _lightboxPadding + _headerHeight ) {
375 | _statusHeight = 1;
376 | } else {
377 | _statusHeight = 2;
378 | }
379 |
380 | return {
381 | statusWidth: _statusWidth,
382 | statusHeight: _statusHeight
383 | };
384 | },
385 |
386 | getLightbox: function() {
387 | var data = this.data,
388 | $lb = this.$lightbox,
389 | self = this;
390 |
391 | // do it only once!
392 | if ( !$lb.root ) {
393 |
394 | // create the DOM structure of the lightbox
395 | this.createStructure();
396 |
397 | // remember references to lightbox structure
398 | this.setReferences();
399 |
400 | // close the lightbox upon clicking on the close button and the overlay
401 | $lb.close.add( $lb.overlay ).click( $.proxy(this.closeLightbox, this) );
402 |
403 | // goes to the next element when button is clicked
404 | $lb.next.click( $.proxy(this.next, this) );
405 |
406 | // and goes to the prev element when prev button is clicked
407 | $lb.prev.click( $.proxy(this.prev, this) );
408 |
409 | // highlight buttons when mouse hovers over them
410 | $lb.next
411 | .add( $lb.prev )
412 | .add( $lb.next )
413 | //.add( $lb.play )
414 | .add( $lb.close )
415 | .hover(
416 | function() {
417 | if ( $(this).is(":not(.ui-state-disabled)") ) {
418 | self.setButtonState( "highlight", $(this) );
419 | }
420 | },
421 | function() {
422 | if ( $(this).is(":not(.ui-state-disabled)") ) {
423 | self.setButtonState( "default", $(this) );
424 | }
425 | }
426 | );
427 |
428 | // add handlers to the content container
429 | $lb.contentContainer
430 | .mousemove( $.proxy(this.showArrow, this) )
431 | .mousemove( $.proxy(this.checkSide, this) )
432 | .mousemove( $.proxy(this.setCursor, this) )
433 | .click(
434 | function() {
435 | if ( data.side === "left" ) {
436 | self.prev.apply( self );
437 | } else if ( data.side === "right" ) {
438 | self.next.apply( self );
439 | }
440 | }
441 | )
442 | .mousedown( $.proxy(this.panoramaStart, this) )
443 | .mouseup( $.proxy(this.panoramaStop, this ) )
444 | .mouseleave(
445 | function() {
446 | self.hideArrow.apply( self );
447 | data.side = "";
448 | }
449 | );
450 |
451 | // zoom in or zoom out an image
452 | $lb.panoramaIcon
453 | .click( $.proxy(this.panoramaToggle, this) )
454 | .hover( $.proxy(this.panoramaHighlight, this) );
455 |
456 | // resize lightbox when window size changes
457 | $( window ).bind( "resize.rlightbox", $.proxy(this.liveResize, this) );
458 |
459 | // keyboard navigation
460 | $( document ).keyup( $.proxy(this.handleKeyboard, this) );
461 | }
462 | },
463 |
464 | getOptimalSize: function( size, number ) {
465 |
466 | // returns size not smaller than the minimal size and not bigger than
467 | // the window size
468 |
469 | var data = this.data,
470 | _minimalLightboxSize = data.minimalLightboxSize,
471 | _minimalLightboxWidth = _minimalLightboxSize.width,
472 | _minimalLightboxHeight = _minimalLightboxSize.height,
473 | _screenSize = this.getAvailableScreenSize(),
474 | _screenWidth = _screenSize.width,
475 | _screenHeight = _screenSize.height;
476 |
477 | if ( size === "width" ) {
478 | if ( number < _minimalLightboxWidth ) {
479 | return _minimalLightboxWidth;
480 | } else if ( number > _screenWidth ) {
481 | return _screenWidth;
482 | } else {
483 | return number;
484 | }
485 | } else if ( size === "height" ) {
486 | if ( number < _minimalLightboxHeight ) {
487 | return _minimalLightboxHeight;
488 | } else if ( number > _screenHeight ) {
489 | return _screenHeight;
490 | } else {
491 | return number;
492 | }
493 | }
494 | },
495 |
496 | getParam: function( param, url ) {
497 |
498 | // with param ‘with’ and url ‘foo.flv?width=100" it returns ‘100’
499 | var _result,
500 | _regExpString = "[\\?&]" + param + "=(\\w+)",
501 | _regExp = new RegExp( _regExpString );
502 |
503 | _result = _regExp.exec( url );
504 |
505 | if ( _result !== null ) {
506 | return _result[1];
507 | } else {
508 | return null;
509 | }
510 | },
511 |
512 | getSetName: function( thisElement ) {
513 |
514 | // if an anchor has class of e.g. ‘lb_gallery’ _getSetName() returns ‘gallery’ string as a set
515 | // otherwise it returns "single" - single content is placed under "single" set
516 | var _classNames = $( thisElement.element ).attr( "class" ),
517 | _classPrefix = thisElement.options.setPrefix + "_",
518 | _classPattern = new RegExp( _classPrefix + "([\\w-_]+)" ),
519 | _name = _classPattern.exec( _classNames );
520 |
521 | return _name ? _name[1] : "single";
522 | },
523 |
524 | checkSide: function( event ) {
525 | var data = this.data,
526 | $lb = this.$lightbox,
527 | $container = $lb.contentContainer,
528 | _pos = event.pageX - $container.offset().left,
529 | _center = Math.round( $container.width() / 2 ),
530 | _currentElementNumber = data.currentElementNumber,
531 | _totalElementsNumber = data.totalElementsNumber;
532 |
533 | if ( _pos <= _center ) {
534 | data.side = "left";
535 | } else if ( _pos > _center ) {
536 | data.side = "right";
537 | }
538 |
539 | // for Panorama to work in IE7 & IE8
540 | event.preventDefault();
541 | },
542 |
543 | getSizes: function() {
544 | var _statuses, _statusWidth, _statusHeight, _imageTargetWidth, _imageTargetHeight, _lightboxTargetWidth, _lightboxTargetHeight,
545 | _heightRatio, _widthRatio,
546 | $lb = this.$lightbox,
547 | data = this.data,
548 | self = this,
549 | _currentElement = data.currentSetElement,
550 | _windowWidth = this.getWindowSize( "width" ),
551 | _windowHeight = this.getWindowSize( "height" ),
552 | _minimalLightboxWidth = data.minimalLightboxSize.width,
553 | _minimalLightboxHeight = data.minimalLightboxSize.height,
554 | _imageWidth = _currentElement.width,
555 | _imageHeight = _currentElement.height,
556 | _lightboxPadding = data.lightboxPadding,
557 | _headerHeight = data.headerHeight;
558 |
559 | function _calculateSizes( w, h ) {
560 | _statuses = self.getImageStatus( w, h );
561 | _statusWidth = _statuses.statusWidth;
562 | _statusHeight = _statuses.statusHeight;
563 |
564 | // if image fits the window
565 | if ( ((_statusWidth === 1 || _statusWidth === -1) && _statusHeight !== 2) && ((_statusHeight === 1 || _statusHeight === -1) && _statusWidth !== 2) ) {
566 | if ( _statusWidth === 1 ) {
567 | _lightboxTargetWidth = w;
568 | } else if ( _statusWidth === -1 ) {
569 | _lightboxTargetWidth = _minimalLightboxWidth;
570 | }
571 | _imageTargetWidth = w;
572 |
573 | if ( _statusHeight === 1 ) {
574 | _lightboxTargetHeight = h;
575 | } else if ( _statusHeight === -1 ) {
576 | _lightboxTargetHeight = _minimalLightboxHeight;
577 | }
578 | _imageTargetHeight = h;
579 | } else if ( _statusWidth === 2 || _statusHeight === 2 ) {
580 |
581 | // height is larger than window, width fits the window
582 | if ( _statusWidth === 1 || _statusWidth === -1 ) {
583 | _lightboxTargetHeight = _windowHeight - _headerHeight - _lightboxPadding;
584 | _imageTargetHeight = _lightboxTargetHeight;
585 | _heightRatio = _lightboxTargetHeight / h;
586 |
587 | if (_statusWidth === -1) {
588 | _lightboxTargetWidth = _minimalLightboxWidth;
589 | _imageTargetWidth = Math.ceil( w * _heightRatio );
590 | } else {
591 | _lightboxTargetWidth = Math.ceil( w * _heightRatio ) - _lightboxPadding;
592 | _imageTargetWidth = _lightboxTargetWidth;
593 |
594 | if ( _imageTargetWidth <= _minimalLightboxWidth ) {
595 | _calculateSizes( _imageTargetWidth, _imageTargetHeight );
596 | }
597 | }
598 | } else if ( _statusHeight === 1 || _statusHeight === -1 ) {
599 |
600 | // width is larger than window, height fit the window
601 | _lightboxTargetWidth = _windowWidth - _lightboxPadding;
602 | _imageTargetWidth = _lightboxTargetWidth;
603 | _widthRatio = _lightboxTargetWidth / w;
604 |
605 | if ( _statusHeight === -1 ) {
606 | _lightboxTargetHeight = _minimalLightboxHeight;
607 | _imageTargetHeight = Math.ceil( h * _widthRatio );
608 | } else {
609 | _lightboxTargetHeight = Math.ceil( h * _widthRatio ) - _headerHeight - _lightboxPadding;
610 | _imageTargetHeight = _lightboxTargetHeight;
611 |
612 | if ( _imageTargetHeight <= _minimalLightboxHeight ) {
613 | _calculateSizes( _imageTargetWidth, _imageTargetHeight );
614 | }
615 | }
616 | } else {
617 |
618 | // both width and height are larger than window
619 | if ( w > h ) {
620 | _lightboxTargetWidth = _windowWidth - _lightboxPadding;
621 | _imageTargetWidth = _lightboxTargetWidth;
622 | _widthRatio = _lightboxTargetWidth / w;
623 | _lightboxTargetHeight = Math.ceil( h * _widthRatio ) - _lightboxPadding - _headerHeight;
624 | _imageTargetHeight = _lightboxTargetHeight;
625 |
626 | // if after scaling an image is smaller or bigger
627 | if ( _imageTargetHeight <= _minimalLightboxHeight || _lightboxTargetHeight + _lightboxPadding + _headerHeight > _windowHeight ) {
628 | _calculateSizes( _imageTargetWidth, _imageTargetHeight );
629 | }
630 | } else {
631 | _lightboxTargetHeight = _windowHeight - _headerHeight - _lightboxPadding;
632 | _imageTargetHeight = _lightboxTargetHeight;
633 | _heightRatio = _lightboxTargetHeight / h;
634 | _lightboxTargetWidth = Math.ceil( w * _heightRatio ) - _lightboxPadding;
635 | _imageTargetWidth = _lightboxTargetWidth;
636 |
637 | if ( _imageTargetWidth <= _minimalLightboxWidth || _lightboxTargetWidth > _windowWidth ) {
638 | _calculateSizes( _imageTargetWidth, _imageTargetHeight );
639 | }
640 | }
641 | }
642 | }
643 | }
644 | _calculateSizes( _imageWidth, _imageHeight );
645 |
646 | return {
647 | imageTargetWidth: _imageTargetWidth,
648 | imageTargetHeight: _imageTargetHeight,
649 | lightboxTargetWidth: _lightboxTargetWidth,
650 | lightboxTargetHeight: _lightboxTargetHeight,
651 | statusWidth: _statusWidth,
652 | statusHeight: _statusHeight
653 | };
654 | },
655 |
656 | getWindowSize: function( size ) {
657 | var data = this.data,
658 | _windowWidth = $( window ).width(),
659 | _windowHeight = $( window ).height(),
660 | _minimalLightboxSize = data.minimalLightboxSize,
661 | _lightboxPadding = data.lightboxPadding,
662 | _headerHeight = data.headerHeight,
663 | _minimalLightboxWidth = _minimalLightboxSize.width + _lightboxPadding,
664 | _minimalLightboxHeight = _minimalLightboxSize.height + _lightboxPadding + _headerHeight;
665 |
666 | if ( size === "width" ) {
667 | if ( _windowWidth < _minimalLightboxWidth ) {
668 | return _minimalLightboxWidth;
669 | } else {
670 | return _windowWidth;
671 | }
672 | } else {
673 | if ( _windowHeight < _minimalLightboxHeight ) {
674 | return _minimalLightboxHeight;
675 | } else {
676 | return _windowHeight;
677 | }
678 | }
679 | },
680 |
681 | handleKeyboard: function( event ) {
682 | var data = this.data,
683 | _currentElement = data.currentSetElement,
684 | _options = _currentElement.self.options,
685 | _keys = _options.keys,
686 | _key = event.which;
687 |
688 | if ( data.ready === false ) {
689 | return;
690 | }
691 |
692 | // handle pressing keys
693 | if ( _key === _keys.next[0] || _key === _keys.next[1] ) {
694 |
695 | // next keys: [N] & [→]
696 | // load next content if possible
697 | this.next();
698 | } else if ( _key === _keys.previous[0] || _key === _keys.previous[1] ) {
699 |
700 | // prev keys: [P] & [←]
701 | // load previous content if possible
702 | this.prev();
703 | } else if ( _key === _keys.close[0] || _key === _keys.close[1] ) {
704 |
705 | // close keys: [C] & [ESC]
706 | this.closeLightbox();
707 | } else if ( (_key === _keys.panorama[0] || _key === _keys.panorama[1]) && _currentElement.type === "image" ) {
708 |
709 | // panorama keys: [Z]
710 | this.panoramaToggle( event );
711 | }
712 | },
713 |
714 | hideArrow: function() {
715 | var $lb = this.$lightbox,
716 | $arrow = $lb.arrow;
717 |
718 | $arrow.hide();
719 | },
720 |
721 | liveResize: function() {
722 | var data = this.data,
723 | self = this,
724 | $lb = this.$lightbox,
725 | _elementType = data.currentSetElement.type;
726 |
727 | // resizes an image when size of the browser window resizes and when Panorama is turned off
728 | if ( data.ready && data.panoramaOn === false && _elementType === "image" ) {
729 | this.queueResizeLightbox();
730 | this.updateTitleWidth();
731 | this.queueCenterContent();
732 | this.panoramaCheckAvailability();
733 | } else if ( data.ready && data.panoramaOn && _elementType === "image" ) {
734 |
735 | // otherwise keep the lightbox centered especially when window is bigger than the lightbox
736 | this.queueCenterLightbox();
737 | this.panoramaShrink();
738 | this.panoramaCheckAvailability();
739 | } else if ( data.ready && _elementType !== "image" ) {
740 | this.queueCenterLightbox();
741 | }
742 | },
743 |
744 | loadContentFlash: function( url ) {
745 | var _width, _height, $contentWrapper,
746 | data = this.data,
747 | $lb = this.$lightbox,
748 | self = this,
749 | $content = $lb.content,
750 | _dfd = $.Deferred(),
751 | _structure = data.htmlFlash,
752 | _currentElement = data.currentSetElement,
753 | _options = _currentElement.self.options;
754 |
755 | // show the spinner
756 | $content.addClass( "ui-lightbox-loader" );
757 |
758 | function _load() {
759 |
760 | // get width and height from parameters: &with & &height
761 | // if any exist; ‘inline’ width and height overwrite that of options
762 | _width = self.getParam( "width", url );
763 | _height = self.getParam( "height", url );
764 |
765 | // if &width and &height are invalid, use a default one
766 | if ( _width === null || isNaN(_width) ) {
767 | _width = _options.videoWidth;
768 | }
769 |
770 | if ( _height === null || isNaN(_height) ) {
771 | _height = _options.videoHeight;
772 | }
773 |
774 | _currentElement.width = _width;
775 | _currentElement.height = _height;
776 |
777 | // use real data
778 | _structure = self.replaceHtmlPatterns(_structure,
779 | {
780 | width: _width,
781 | height: _height,
782 | url: url
783 | }
784 | );
785 |
786 | // we have to add ‘width’ and ‘height’ to the $contentWrapper
787 | // explicitly since browsers can’t inherit them
788 | $contentWrapper = $( "" );
789 | $contentWrapper.css(
790 | {
791 | display: "none",
792 | width: _width,
793 | height: _height
794 | }
795 | );
796 |
797 | // add structure
798 | $content
799 | .removeClass( "ui-lightbox-loader" )
800 | .empty()
801 | .append( _structure )
802 | .children()
803 | .wrap( $contentWrapper );
804 |
805 | _dfd.resolve();
806 | }
807 |
808 | // delay ‘_load’ because we have to return promise
809 | setTimeout( _load, 1000 );
810 |
811 | return _dfd.promise();
812 | },
813 |
814 | loadContentImage: function( url ) {
815 | var $lb = this.$lightbox,
816 | data = this.data,
817 | self = this,
818 | _currentElement = data.currentSetElement,
819 | _dfd = $.Deferred(),
820 | $newImage = $( "
" );
821 |
822 | // show spinner
823 | $lb.content.addClass( "ui-lightbox-loader" );
824 |
825 | $newImage
826 | .attr( "src", url )
827 | .bind("load",
828 | function() {
829 | $( this ).unbind( "load" );
830 |
831 | // keep original size of an image – needed when resizing
832 | _currentElement.width = this.width;
833 | _currentElement.height = this.height;
834 |
835 | // add the loaded image and hide it
836 | $lb.content
837 | .removeClass( "ui-lightbox-loader" )
838 | .empty()
839 | .append( this )
840 | .children()
841 | .hide();
842 |
843 | // continue the animation queue
844 | _dfd.resolve();
845 | }
846 | )
847 | .error(
848 | function() {
849 | $lb.content.removeClass( "ui-lightbox-loader" );
850 | self.showErrorMessage();
851 |
852 | // continue the animation queue
853 | _dfd.resolve();
854 | }
855 | )
856 | .each(
857 | function() {
858 | // the code comes from https://github.com/desandro/imagesloaded
859 | // cached images don't fire load sometimes, so we reset src.
860 | if ( this.complete || this.complete === undefined ){
861 | var src = this.src;
862 | // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
863 | // data uri bypasses webkit log warning (thx doug jones)
864 | this.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
865 | this.src = src;
866 | }
867 | }
868 | );
869 |
870 | return _dfd.promise();
871 | },
872 |
873 | loadContentVimeo: function( url ) {
874 | var _width, _height,
875 | data = this.data,
876 | $lb = this.$lightbox,
877 | self = this,
878 | _dfd = $.Deferred(),
879 | _apiEnd = data.providers.vimeo,
880 | _currentElement = data.currentSetElement,
881 | _options = _currentElement.self.options,
882 | _minimalLightboxSize = data.minimalLightboxSize;
883 |
884 | // show loader
885 | $lb.content.addClass( "ui-lightbox-loader" );
886 |
887 | $.ajax(
888 | {
889 | url: _apiEnd,
890 | data: {
891 | url: url,
892 | maxwidth: _options.videoWidth,
893 | maxheight: _options.videoHeight
894 | },
895 | dataType: "jsonp",
896 | timeout: 5000
897 | }
898 | )
899 | .success(
900 | function( data ) {
901 |
902 | // add embedded code
903 | $lb.content
904 | .removeClass( "ui-lightbox-loader" )
905 | .empty()
906 | .append( data.html )
907 | .children()
908 | .wrap( "" )
909 | .end()
910 | .find( "div:first" )
911 | .width( data.width )
912 | .height( data.height );
913 |
914 | // remember video title
915 | if ( _options.overwriteTitle === false ) {
916 | _currentElement.title = data.title;
917 | }
918 |
919 | // and returned width and height
920 | _currentElement.width = data.width;
921 | _currentElement.height = data.height;
922 |
923 | // continue the animation queue
924 | _dfd.resolve();
925 | }
926 | )
927 | .error(function() {
928 | $lb.content.removeClass( "ui-lightbox-loader" );
929 | self.showErrorMessage();
930 |
931 | // continue the animation queue
932 | _dfd.resolve();
933 | });
934 |
935 | return _dfd.promise();
936 | },
937 |
938 | loadContentYoutube: function( url ) {
939 | var $contentWrapper,
940 | data = this.data,
941 | $lb = this.$lightbox,
942 | $content = $lb.content,
943 | self = this,
944 | _dfd = $.Deferred(),
945 | _apiEnd = data.providers.youtube,
946 | _currentElement = data.currentSetElement,
947 | _options = _currentElement.self.options,
948 | _minimalLightboxSize = data.minimalLightboxSize,
949 | _width = _options.videoWidth,
950 | _height = _options.videoHeight,
951 | _structure = data.htmlYoutube;
952 |
953 | function _showError() {
954 | $lb.content.removeClass( "ui-lightbox-loader" );
955 | self.showErrorMessage();
956 |
957 | // continue the animation queue
958 | _dfd.resolve();
959 | }
960 |
961 | // show loader
962 | $lb.content.addClass( "ui-lightbox-loader" );
963 | $.ajax(
964 | {
965 | url: _apiEnd + _currentElement.id + "?callback=?",
966 | data: {
967 | v: 2,
968 | alt: "jsonc",
969 | prettyprint: true
970 | },
971 | dataType: "jsonp",
972 | timeout: 5000
973 | }
974 | )
975 | .success(
976 | function( json ) {
977 | // if response is successful but there is an error
978 | if ( json.error ) {
979 | _showError();
980 | return;
981 | }
982 |
983 | // use real data
984 | _structure = self.replaceHtmlPatterns(_structure,
985 | {
986 | width: _width,
987 | height: _height,
988 | url: _currentElement.id
989 | }
990 | );
991 |
992 | // we have to add ‘width’ and ‘height’ to the $contentWrapper
993 | // explicitly since browsers can’t inherit them
994 | $contentWrapper = $( "" );
995 | $contentWrapper.css(
996 | {
997 | display: "none",
998 | width: _width,
999 | height: _height
1000 | }
1001 | );
1002 |
1003 | // add structure
1004 | $content
1005 | .removeClass( "ui-lightbox-loader" )
1006 | .empty()
1007 | .append( _structure )
1008 | .children()
1009 | .wrap( $contentWrapper );
1010 |
1011 | // remember video title
1012 | if ( _options.overwriteTitle === false ) {
1013 | _currentElement.title = json.data.title;
1014 | }
1015 |
1016 | // and returned width and height
1017 | _currentElement.width = _width;
1018 | _currentElement.height = _height;
1019 |
1020 | _dfd.resolve();
1021 | }
1022 | )
1023 | .error(function() {
1024 | _showError();
1025 | });
1026 |
1027 | return _dfd.promise();
1028 | },
1029 |
1030 | navigationGoToElement: function( number ) {
1031 |
1032 | // goes to a custom element
1033 | var data = this.data,
1034 | sets = this.sets,
1035 | $lb = this.$lightbox,
1036 | _currentSet = data.currentSet;
1037 |
1038 | // which element go to
1039 | data.currentElementNumber = number;
1040 | data.currentSetElement = sets[_currentSet][number - 1];
1041 |
1042 | // reload animation queue and trigger it
1043 | this.setNextQueue();
1044 | $lb.queueContainer.next.dequeue( "lightboxNext" );
1045 | },
1046 |
1047 | next: function() {
1048 | var data = this.data,
1049 | sets = this.sets,
1050 | $lb = this.$lightbox,
1051 | _isReady = data.ready,
1052 | _isPanoramaOn = data.panoramaOn,
1053 | _set = data.currentSet,
1054 | _currentElementNumber = data.currentElementNumber,
1055 | _totalElementsNumber = data.totalElementsNumber,
1056 | _options = data.currentSetElement.self.options,
1057 | _isLoop = _options.loop,
1058 | _play = true;
1059 |
1060 | if ( _isReady && _set !== "single" && _isPanoramaOn === false ) {
1061 | if ( _currentElementNumber + 1 <= _totalElementsNumber ) {
1062 | data.currentElementNumber = _currentElementNumber = _currentElementNumber + 1;
1063 | } else if ( _currentElementNumber + 1 > _totalElementsNumber && _isLoop ) {
1064 | data.currentElementNumber = _currentElementNumber = 1;
1065 | } else {
1066 | // to prevent form loading last element again when loop is disabled
1067 | _play = false;
1068 | }
1069 |
1070 | if ( _play) {
1071 | data.currentSetElement = sets[_set][_currentElementNumber - 1];
1072 |
1073 | // next element - trigger the queue ‘next’ - first update it
1074 | this.setNextQueue();
1075 | $lb.queueContainer.next.dequeue( "lightboxNext" );
1076 | }
1077 | }
1078 | },
1079 |
1080 | open: function( thisElement ) {
1081 | var data = this.data,
1082 | sets = this.sets,
1083 | $lb = this.$lightbox,
1084 | _jqElement = thisElement.element,//TODO
1085 | _currentSet = this.getSetName( thisElement ),
1086 | _currentUrl = $( _jqElement ).attr( "href" );
1087 |
1088 | // remember which set content belongs to
1089 | data.currentSet = _currentSet;
1090 |
1091 | // determine and remember how many elements belong to a set
1092 | // determine the current (and clicked) element in a set
1093 | data.totalElementsNumber = sets[_currentSet].length;
1094 | data.currentElementNumber = this.getCurrentElementNumber( _jqElement );
1095 |
1096 | // keep a reference to a current element in a set (consisting of a url, type…)
1097 | data.currentSetElement = sets[_currentSet][data.currentElementNumber - 1];
1098 |
1099 | // set animation queues
1100 | this.setOpenQueue();
1101 | this.setNextQueue();
1102 |
1103 | // to fade or not to fade…
1104 | this.checkButtonsState();
1105 |
1106 | // start opening the lighbox
1107 | $lb.queueContainer.open.dequeue( "lightboxOpen" );
1108 | },
1109 |
1110 | panoramaCenterContent: function() {
1111 | var _left, _top,
1112 | data = this.data,
1113 | $lb = this.$lightbox,
1114 | _currentElement = data.currentSetElement,
1115 | _screenSize = this.getAvailableScreenSize(),
1116 | _screenWidth = _screenSize.width,
1117 | _screenHeight = _screenSize.height,
1118 | _imageWidth = _currentElement.width,
1119 | _imageHeight = _currentElement.height,
1120 | $content = $lb.content,
1121 | $img = $content.find( "img" );
1122 |
1123 | // if width of an image was bigger than the available screen space and if we divided the both size by two
1124 | // the left position of the image would be placed outside the content container; e.g. having
1125 | // the screen size of 1200px wide and an image of 2000px wide, the left css property would
1126 | // have value of -200px and thus the 200px would not be visible
1127 | if ( _screenWidth < _imageWidth ) {
1128 | _left = 0;
1129 | } else {
1130 | _left = $content.width() / 2 - $img.width() / 2;
1131 | }
1132 |
1133 | if ( _screenHeight < _imageHeight ) {
1134 | _top = 0;
1135 | } else {
1136 | _top = $content.height() / 2 - $img.height() / 2;
1137 | }
1138 |
1139 | $img.css({
1140 | top: _top,
1141 | left: _left
1142 | });
1143 | },
1144 |
1145 | panoramaCheckAvailability: function() {
1146 |
1147 | // checks if we can turn on Panorama mode™ ;)
1148 | // having loaded an image we save its original size
1149 | // if the orignal image size is larger than window size we have to
1150 | // scale down the image so it ends up with smaller image size;
1151 | // Panorama™ is enabled only when the image can’t be displayed in its
1152 | // orignal size.
1153 | var data = this.data,
1154 | _currentElement = data.currentSetElement,
1155 | _originalImageWidth = _currentElement.width,
1156 | _originalImageHeight = _currentElement.height,
1157 | _currentImageWidth = _currentElement.currentWidth,
1158 | _currentImageHeight = _currentElement.currentHeight;
1159 |
1160 | if ( _currentImageWidth < _originalImageWidth || _currentImageHeight < _originalImageHeight ) {
1161 | this.panoramaShowIcon( "expand" );
1162 |
1163 | // cuz we don’t want to check it twice in panoramaToggle()
1164 | data.enablePanorama = true;
1165 | } else {
1166 | data.enablePanorama = false;
1167 | this.panoramaHideIcon();
1168 | }
1169 | },
1170 |
1171 | panoramaExpand: function( event ) {
1172 |
1173 | // _panoramaExpand does the main goal of the Panorama™: it displays the natural image size
1174 | var data = this.data,
1175 | $lb = this.$lightbox,
1176 | _currentElement = data.currentSetElement,
1177 | _options = _currentElement.self.options;
1178 |
1179 | // let know that we can scroll now
1180 | data.panoramaOn = true;
1181 |
1182 | // show the zoom out icon; we add hover state because when we click
1183 | // the icon we lose focus and state end up with normal state
1184 | // not when key is pressed
1185 | if ( event.type === "click" ) {
1186 | this.panoramaShowIcon( "shrink", "-hover" );
1187 | } else {
1188 | this.panoramaShowIcon( "shrink" );
1189 | }
1190 |
1191 | // fixes issue with Panorama in Firefox 3.0, 3.5, 3.6
1192 | $lb.content.css( "overflow", "hidden" );
1193 |
1194 | // give the natural size to the image
1195 | $lb.content
1196 | .find( "img" )
1197 | .width( _currentElement.width )
1198 | .height( _currentElement.height );
1199 |
1200 | // enlarge lightbox’s content to fit the screen best
1201 | this.panoramaSetContentSize();
1202 |
1203 | // center the content and the whole lightbox
1204 | this.panoramaCenterContent();
1205 | this.queueCenterLightbox();
1206 |
1207 | // update header width
1208 | this.updateTitleWidth();
1209 |
1210 | // show the map
1211 | if ( _options.showMap ) {
1212 | this.panoramaShowMap();
1213 | }
1214 |
1215 | // hide arrow cue
1216 | this.hideArrow();
1217 |
1218 | // reset cursor when there is no movement; for example
1219 | // cursor was ‘pointer’, [Z] buttons was pressed (‘default’ cursor)
1220 | // [Z] was pressed again → cursor is still ‘pointer’
1221 | this.setCursor();
1222 | },
1223 |
1224 | panoramaHideIcon: function() {
1225 | var data = this.data,
1226 | $lb = this.$lightbox;
1227 |
1228 | $lb.panoramaIcon
1229 | .hide()
1230 | .removeClass( "ui-lightbox-panorama-icon-expand ui-lightbox-panorama-icon-shrink" );
1231 | data.panoramaOn = false;
1232 | },
1233 |
1234 | panoramaHideMap: function() {
1235 | var $lb = this.$lightbox;
1236 |
1237 | // hide the map
1238 | $lb.map.hide();
1239 |
1240 | // reset position of the viewport
1241 | // -1 prevents from overlapping the map border
1242 | $lb.viewport.css({
1243 | left: -1,
1244 | top: -1
1245 | });
1246 | },
1247 |
1248 | panoramaHighlight: function() {
1249 | var _suffixPosition,
1250 | $lb = this.$lightbox,
1251 | _suffix = "-hover";
1252 |
1253 | $lb.panoramaIcon.attr("class",
1254 | function(index, oldValue) {
1255 | _suffixPosition = oldValue.indexOf( _suffix );
1256 | if ( _suffixPosition !== -1 ) {
1257 | return oldValue.slice( 0, _suffixPosition );
1258 | } else {
1259 | return oldValue + _suffix;
1260 | }
1261 | });
1262 | },
1263 |
1264 | panoramaSetContentSize: function() {
1265 | var _contentWidth, _contentHeight,
1266 | data = this.data,
1267 | $lb = this.$lightbox,
1268 | _currentElement = data.currentSetElement,
1269 | _minLightboxSize = data.minimalLightboxSize,
1270 | _minLightboxWidth = _minLightboxSize.width,
1271 | _minLightboxHeight = _minLightboxSize.height,
1272 | _screenSize = this.getAvailableScreenSize(),
1273 | _screenWidth = _screenSize.width,
1274 | _screenHeight = _screenSize.height,
1275 | _imageWidth = _currentElement.width,
1276 | _imageHeight = _currentElement.height;
1277 |
1278 | // show the most part of an image
1279 | // e.g. suppose that we have an image of 3600px × 500px size and the available space in the browser
1280 | // is 1268px × 806px taking into account default Firefox toolbars, scrollbars, etc.
1281 | // Opening such an image results in displaing it (after resizing) of 1268px × 176px (the ratio must have been kept).
1282 | // Now we would like to switch to the Panorama mode™. ;) The goal of panorama is to show the original size of the image
1283 | // (that is 3600px × 500px in this example). But we just cannot display such big size in the smaller screen size.
1284 | // We are confined to our example screen size (1268 × 806). The point is to display as much as possible.
1285 | // Our width is bigger than those of the screen (1268) so we can only use the latter → if an image size is bigger than the screen size
1286 | // limit it to the size of the screen. As for the height, before applying the panorama it was of 176px. But we have more space available on the screen (806px).
1287 | // So instead of displaying 176px of height we can display the natural size of the image height — 500px.
1288 | // But for example if the height was of 150px we cannot use this size because the minmal lightbox size is 300px. Use 300px size then.
1289 | // It is how the magic goes! :D
1290 | if ( _imageWidth > _screenWidth ) {
1291 | _contentWidth = _screenWidth;
1292 | } else if ( _imageWidth <= _minLightboxWidth ) {
1293 | _contentWidth = _minLightboxWidth;
1294 | } else {
1295 | _contentWidth = _imageWidth;
1296 | }
1297 |
1298 | if ( _imageHeight > _screenHeight ) {
1299 | _contentHeight = _screenHeight;
1300 | } else if ( _imageHeight <= _minLightboxHeight ) {
1301 | _contentHeight = _minLightboxHeight;
1302 | } else {
1303 | _contentHeight = _imageHeight;
1304 | }
1305 |
1306 | $lb.content
1307 | .width( _contentWidth )
1308 | .height( _contentHeight );
1309 | },
1310 |
1311 | panoramaShowIcon: function( icon, state ) {
1312 | var $lb = this.$lightbox,
1313 | _state = state || "",
1314 | _newClass = "ui-lightbox-panorama-icon-" + icon + _state;
1315 |
1316 | $lb.panoramaIcon
1317 | .show()
1318 | .removeClass()
1319 | .addClass( _newClass );
1320 | },
1321 |
1322 | panoramaShowMap: function() {
1323 | var _mapViewportWidth, _mapViewportHeight, _mapViewportWidthRatio, _mapViewportHeightRatio,
1324 | _contentViewportWidth, _contentViewportHeight,
1325 | data = this.data,
1326 | _minimalLightboxSize = data.minimalLightboxSize,
1327 | $lb = this.$lightbox,
1328 | $content = $lb.content,
1329 | $image = $content.find( "img" ),
1330 | _imageWidth = $image.width(),
1331 | _imageHeight = $image.height(),
1332 | _currentElement = data.currentSetElement,
1333 | _mapSize = data.mapSize;
1334 |
1335 | // show the map and give the viewport relevant size
1336 | // give the viewport relevant size
1337 | _mapViewportWidthRatio = _mapSize.width / _currentElement.width;
1338 | _mapViewportHeightRatio = _mapSize.height / _currentElement.height;
1339 |
1340 | // content doesn't cover whole container
1341 | if ( _imageWidth < _minimalLightboxSize.width ) {
1342 | _contentViewportWidth = _imageWidth;
1343 | } else {
1344 | _contentViewportWidth = $content.width();
1345 | }
1346 |
1347 | if ( _imageHeight < _minimalLightboxSize.height ) {
1348 | _contentViewportHeight = _imageHeight;
1349 | } else {
1350 | _contentViewportHeight = $content.height();
1351 | }
1352 |
1353 | _mapViewportWidth = Math.ceil( _contentViewportWidth * _mapViewportWidthRatio );
1354 | _mapViewportHeight = Math.ceil( _contentViewportHeight * _mapViewportHeightRatio );
1355 |
1356 | $lb.viewport
1357 | .width( _mapViewportWidth )
1358 | .height( _mapViewportHeight );
1359 |
1360 | // show the map
1361 | $lb.map.show();
1362 |
1363 | // used when you scroll the content
1364 | data.viewportRatio = {
1365 | width: _mapViewportWidthRatio,
1366 | height: _mapViewportHeightRatio
1367 | };
1368 |
1369 | },
1370 |
1371 | panoramaShrink: function( event ) {
1372 | var data = this.data,
1373 | $lb = this.$lightbox;
1374 |
1375 | // _panoramaShrink retores the previous size of an image
1376 | data.panoramaOn = false;
1377 |
1378 | // show the zoom out icon; we add hover state because when we click
1379 | // the icon we lose focus and state end up with normal state
1380 | // not when key is pressed
1381 | if ( event && event.type === "click" ) {
1382 | this.panoramaShowIcon( "expand", "-hover" );
1383 | } else {
1384 | this.panoramaShowIcon( "expand" );
1385 | }
1386 |
1387 | // resize an image to its previous size and center it
1388 | this.queueResizeLightbox();
1389 | this.queueCenterContent();
1390 |
1391 | // fixes issue with Panorama in Firefox 3.0, 3.5, 3.6
1392 | $lb.content.css( "overflow", "visible" );
1393 |
1394 | // update header width
1395 | this.updateTitleWidth();
1396 |
1397 | // hide the map
1398 | this.panoramaHideMap();
1399 |
1400 | // reset cursor when there is no movement; for example
1401 | // cursor was ‘pointer’, [Z] buttons was pressed (‘default’ cursor)
1402 | // [Z] was pressed again → cursor is still ‘pointer’
1403 | this.setCursor();
1404 | },
1405 |
1406 | panoramaStart: function( event ) {
1407 | var data = this.data,
1408 | $lb = this.$lightbox;
1409 |
1410 | // remember starting point to calculate distance in _panoramaStop()
1411 | data.panoramaPosition =
1412 | {
1413 | xStart: event.pageX,
1414 | yStart: event.pageY
1415 | };
1416 |
1417 | event.preventDefault();
1418 | },
1419 |
1420 | panoramaStop: function( event ) {
1421 |
1422 | // calculate the distance between the starting point from _panoramaStart and this one
1423 | // we use the oposite vector (-1) because dragging the mouse left we move right
1424 | var data = this.data,
1425 | $lb = this.$lightbox,
1426 | _distX = ( event.pageX - data.panoramaPosition.xStart ) * -1,
1427 | _distY = ( event.pageY - data.panoramaPosition.yStart ) * -1,
1428 | $content = $lb.content,
1429 | _viewportRatio = data.viewportRatio;
1430 |
1431 | // if we are in the panorama mode (the panorama icon was clicked)
1432 | if ( data.panoramaOn ) {
1433 | $content
1434 | .scrollLeft( $content.scrollLeft() + _distX )
1435 | .scrollTop( $content.scrollTop() + _distY );
1436 |
1437 | // show the relevant part of the map
1438 | // subtrack 1 so that the viewport doesn’t overlap the map border
1439 | $lb.viewport.css({
1440 | left: $content.scrollLeft() * _viewportRatio.width - 1,
1441 | top: $content.scrollTop() * _viewportRatio.height - 1
1442 | });
1443 | }
1444 |
1445 | event.stopPropagation();
1446 | },
1447 |
1448 | panoramaToggle: function( event ) {
1449 |
1450 | // switches between _panoramaExpand and _panoramaShrink
1451 | // we couldn’t use .toggle( expand, shrink ) on panorama icon because when lb is closed after panorama was turned on (we were in the panorama mode)
1452 | // and open again and next image once again can be zoomed we need to make sure that
1453 | // expand is the first action – using jQuery .toggle() ‘expand’ would be the fist action again (because of its internal queue)
1454 | var data = this.data,
1455 | _panoramaOn = data.panoramaOn,
1456 | _isPanoramaEnabled = data.enablePanorama;
1457 |
1458 | if ( _isPanoramaEnabled && _panoramaOn === false ) {
1459 | this.panoramaExpand( event );
1460 | } else if ( _isPanoramaEnabled && _panoramaOn ) {
1461 | this.panoramaShrink( event );
1462 | }
1463 | },
1464 |
1465 | prev: function() {
1466 | var data = this.data,
1467 | sets = this.sets,
1468 | $lb = this.$lightbox,
1469 | _isReady = data.ready,
1470 | _isPanoramaOn = data.panoramaOn,
1471 | _set = data.currentSet,
1472 | _currentElementNumber = data.currentElementNumber,
1473 | _totalElementsNumber = data.totalElementsNumber,
1474 | _options = data.currentSetElement.self.options,
1475 | _isLoop = _options.loop,
1476 | _play = true;
1477 |
1478 | if ( _isReady && _set !== "single" && _isPanoramaOn === false ) {
1479 | if ( _currentElementNumber - 1 >= 1 ) {
1480 | data.currentElementNumber = _currentElementNumber = _currentElementNumber - 1;
1481 | } else if ( _currentElementNumber - 1 < 1 && _isLoop ) {
1482 | data.currentElementNumber = _currentElementNumber = _totalElementsNumber;
1483 | } else {
1484 | // to prevent from loading first element again when loop is disabled
1485 | _play = false;
1486 | }
1487 |
1488 | if ( _play ) {
1489 | data.currentSetElement = sets[_set][_currentElementNumber - 1];
1490 |
1491 | // next element - trigger the queue ‘next’ - first update it
1492 | this.setNextQueue();
1493 | $lb.queueContainer.next.dequeue( "lightboxNext" );
1494 | }
1495 | }
1496 | },
1497 |
1498 | removeSetElement: function( number ) {
1499 | // when there is an error while loading content, in the error screen
1500 | // there is a possibility to reject content that might have a wrong
1501 | // url; _removeSetElement removes rejects such content in order to
1502 | // the error message not appear again;
1503 | // the method prevents rlightbox from being acted upon such content
1504 | var data = this.data,
1505 | sets = this.sets,
1506 | _currentSet = data.currentSet,
1507 | _total = data.totalElementsNumber;
1508 |
1509 | // remove given element from a set
1510 | sets[_currentSet].splice( number - 1, 1 );
1511 |
1512 | // if there is only one element left, close the lightbox, otherwise load next element
1513 | if( _total === 1 || _currentSet === "single" ) {
1514 | this.closeLightbox();
1515 |
1516 | // remove the instance from encapsulated DOM element (jquery one)
1517 | this.destroy();
1518 | } else {
1519 | this.destroy();
1520 |
1521 | // update total element numbers
1522 | data.totalElementsNumber = sets[_currentSet].length;
1523 |
1524 | // go to a new element
1525 | if ( number === _total ) {
1526 | this.navigationGoToElement( number - 1 );
1527 | } else {
1528 | this.navigationGoToElement( number );
1529 | }
1530 | }
1531 | },
1532 |
1533 | replaceHtmlPatterns: function( htmlString, patterns ) {
1534 |
1535 | // replaces patterns like {width} used in html e.g in data.htmlFlash
1536 | // with real data given in patterns object
1537 | $.each(patterns, function(key, value) {
1538 | var _regExp = new RegExp( "{" + key + "}", "g" );
1539 | htmlString = htmlString.replace( _regExp, value );
1540 | });
1541 |
1542 | return htmlString;
1543 | },
1544 |
1545 | setButtonState: function( state, jqElement ) {
1546 | var $lb = this.$lightbox,
1547 | jqElem = jqElement || $lb.controlButtons;
1548 |
1549 | switch ( state ) {
1550 | case "default":
1551 | jqElem.removeClass( "ui-state-highlight ui-state-disabled" );
1552 | break;
1553 |
1554 | case "highlight":
1555 | jqElem.addClass( "ui-state-highlight" );
1556 | break;
1557 |
1558 | case "disabled":
1559 | jqElem.addClass( "ui-state-disabled" );
1560 | break;
1561 | }
1562 | },
1563 |
1564 | setCursor: function( event ) {
1565 | var data = this.data,
1566 | $lb = this.$lightbox,
1567 | $contentContainer = $lb.contentContainer,
1568 | _currentSet = data.currentSet,
1569 | _currentSetElement = data.currentSetElement,
1570 | _setElementType = data.currentSetElement.type,
1571 | _totalElements = data.totalElementsNumber,
1572 | _currentElement = data.currentElementNumber,
1573 | _side = data.side,
1574 | _panoramaEnabled = data.panoramaOn,
1575 | _isError = data.showErrorMessage,
1576 | _options = _currentSetElement.self.options,
1577 | _isLoop = _options.loop;
1578 |
1579 | if ( data.ready ) {
1580 | if ( (_currentSet === "single" || _totalElements === 1 || _currentElement === 1 && _side === "left" || _currentElement === _totalElements && _side === "right") && _panoramaEnabled === false && (_setElementType === "image" || (_setElementType !== "image" && _isError)) ) {
1581 |
1582 | // single element or single element in a named set or first element in a set or last element in a set
1583 | // WHEN panorama is DISABLED, and when element type is ‘image’ or the Error Screen is shown
1584 | // and when loop is DISABLED
1585 | if ( _isLoop === false ) {
1586 | $contentContainer.css( "cursor", "default" );
1587 | } else {
1588 |
1589 | // otherwise show ‘pointer’ in cases mentioned above
1590 | $contentContainer.css( "cursor", "pointer" );
1591 | }
1592 |
1593 | } else if ( _panoramaEnabled ) {
1594 |
1595 | // panorama is enabled
1596 | $contentContainer.css( "cursor", "move" );
1597 | } else if ( _setElementType === "image" || (_setElementType !== "image" && _isError) ) {
1598 |
1599 | // between first and last element in an image set or when the Error Screen is shown
1600 | $contentContainer.css( "cursor", "pointer" );
1601 | } else {
1602 |
1603 | // for flash videos
1604 | $contentContainer.css( "cursor", "auto" );
1605 | }
1606 | } else {
1607 | $contentContainer.css( "cursor", "default" );
1608 | }
1609 |
1610 | // for Panorama to work in IE7 & IE8
1611 | if ( event ) {
1612 | event.preventDefault();
1613 | }
1614 | },
1615 |
1616 | setNextQueue: function() {
1617 |
1618 | // for description take a look at _setOpenQueue method
1619 | var $lb = this.$lightbox,
1620 | queueList = [
1621 | $.proxy( this.queueSlideUpHeader, this ),
1622 | $.proxy( this.queueHideContent, this ),
1623 | $.proxy( this.queueLoadContent, this ),
1624 | $.proxy( this.queueResizeLightbox, this ),
1625 | $.proxy( this.queueCenterContent, this ),
1626 | $.proxy( this.queueShowContent, this ),
1627 | $.proxy( this.queueSlideDownHeader, this )
1628 | ];
1629 |
1630 | // place start animation queue in the queue container
1631 | $lb.queueContainer.next.queue( "lightboxNext", queueList );
1632 | },
1633 |
1634 | setOpenQueue: function() {
1635 | // we have two animated queues: one to open the lightbox and the second to perform next/previous operation
1636 | // half of the operations are the same - they ovelap, and the rest such as ‘show the overlay’, ‘center lightbox’,
1637 | // ‘slide up the header’ and ‘hide content’ are run only in one queue not in both
1638 | // thus to not repeat oneself we keep in the queue lists only references to these methods
1639 | // each one of these methods (that begin with _queue…) are passed ‘next’ parameter that is a reference to another
1640 | // method in the queue.
1641 | // $proxy is needed to have an access to a ‘global’ scope of the plugin – every method that is called in the queue
1642 | // is run in its internal scope - we need to have an access to such method as _getSizes, _open, etc - one the same level.
1643 |
1644 | var $lb = this.$lightbox,
1645 | queueList = [
1646 | $.proxy( this.queueShowOverlay, this ),
1647 | $.proxy( this.queueCenterLightbox, this ),
1648 | $.proxy( this.queueLoadContent, this ),
1649 | $.proxy( this.queueResizeLightbox, this ),
1650 | $.proxy( this.queueCenterContent, this ),
1651 | $.proxy( this.queueShowContent, this ),
1652 | $.proxy( this.queueSlideDownHeader, this )
1653 | ];
1654 |
1655 | // place start animation queue in the queue container
1656 | $lb.queueContainer.open.queue( "lightboxOpen", queueList );
1657 | },
1658 |
1659 | setReferences: function() {
1660 | var $lb = this.$lightbox;
1661 |
1662 | // save references to wrapped set for later use
1663 | $lb.root = $( "#ui-lightbox" );
1664 | $lb.panoramaIcon = $lb.root.find( "#ui-lightbox-panorama-icon" );
1665 | $lb.contentContainer = $lb.root.find( "#ui-lightbox-content-container" );
1666 | $lb.content = $lb.contentContainer.find( "#ui-lightbox-content" );
1667 | $lb.arrow = $lb.contentContainer.find( "#ui-lightbox-arrow" );
1668 | $lb.header = $lb.root.find( "#ui-lightbox-bottombar" );
1669 | $lb.headerWrapper = $lb.header.find( "#ui-lightbox-title-wrapper" );
1670 | $lb.overlay = $( "#ui-lightbox-overlay" );
1671 | $lb.next = $lb.root.find( "#ui-lightbox-button-next" );
1672 | $lb.prev = $lb.root.find( "#ui-lightbox-button-prev" );
1673 | //$lb.play = $lb.root.find( "#ui-lightbox-button-play" );
1674 | $lb.controlButtons = $lb.next.add( $lb.prev );//.add( $lb.play );
1675 | $lb.close = $lb.root.find( "#ui-lightbox-button-close" );
1676 | $lb.counter = $lb.root.find( "#ui-lightbox-counter" );
1677 | $lb.title = $lb.root.find( "#ui-lightbox-title" );
1678 | $lb.map = $( "#ui-lightbox-map" );
1679 | $lb.viewport = $lb.map.children().eq( 0 );
1680 | $lb.queueContainer = {
1681 | open: $({}),
1682 | next: $({})
1683 | };
1684 | },
1685 |
1686 | showArrow: function( event ) {
1687 | var data = this.data,
1688 | $lb = this.$lightbox,
1689 | $arrow = $lb.arrow,
1690 | _isError = data.showErrorMessage,
1691 | _side = data.side,
1692 | _currentElement = data.currentElementNumber,
1693 | _totalElements = data.totalElementsNumber,
1694 | _isLoop = data.currentSetElement.self.options.loop;
1695 |
1696 | // show arrow cues only in image set or in The Error Screen when it is part of a set
1697 | if ( data.ready && data.currentSet !== "single" && (data.currentSetElement.type === "image" || _isError) && data.panoramaOn === false ) {
1698 |
1699 | if ( _side === "left" && (_currentElement > 1 || _isLoop) ) {
1700 | $arrow
1701 | .show()
1702 | .removeClass("ui-lightbox-arrow-next ui-corner-left")
1703 | .addClass("ui-lightbox-arrow-prev ui-corner-right")
1704 | .find("span")
1705 | .removeClass("ui-icon-carat-1-e")
1706 | .addClass("ui-icon-carat-1-w");
1707 | } else if ( _side === "right" && (_currentElement < _totalElements || _isLoop) ) {
1708 | $arrow
1709 | .show()
1710 | .removeClass("ui-lightbox-arrow-prev ui-corner-right")
1711 | .addClass("ui-lightbox-arrow-next ui-corner-left")
1712 | .find("span")
1713 | .removeClass("ui-icon-carat-1-w")
1714 | .addClass("ui-icon-carat-1-e");
1715 | } else {
1716 | this.hideArrow();
1717 | }
1718 | }
1719 |
1720 | // for Panorama to work in IE7 & IE8
1721 | if ( event ) {
1722 | event.preventDefault();
1723 | }
1724 | },
1725 |
1726 | showErrorMessage: function() {
1727 |
1728 | // shows a screen with a message that content could not be loaded
1729 | // and two buttons: one to try to load content again and one to
1730 | // reject the content; in order to keep the dependencie to minimum
1731 | // buttons are not jQuery UI widgets but use their CSS classes
1732 | var $again, $reject, $structure,
1733 | data = this.data,
1734 | $lb = this.$lightbox,
1735 | self = this,
1736 | _currentElement = data.currentSetElement,
1737 | _options = _currentElement.self.options,
1738 | _currentElementNumber = data.currentElementNumber,
1739 | _errorMessage = _options.errorMessage,
1740 | _againLabel = _options.againButtonLabel,
1741 | _rejectLabel = _options.rejectButtonLabel,
1742 | _structure = data.htmlErrorScreen,
1743 | _errorScreenSize = data.errorScreenSize,
1744 | _errorScreenWidth = _errorScreenSize.width,
1745 | _errorScreenHeight = _errorScreenSize.height;
1746 |
1747 | // use real data
1748 | _structure = self.replaceHtmlPatterns(_structure,
1749 | {
1750 | message: _errorMessage,
1751 | labelAgain: _againLabel,
1752 | labelReject: _rejectLabel
1753 | }
1754 | );
1755 |
1756 | $structure = $( _structure );
1757 |
1758 | $again = $structure.find( "#ui-lightbox-error-footer-again" );
1759 | $reject = $structure.find( "#ui-lightbox-error-footer-reject" );
1760 | // ‘again’ button give a user a chance to try loading content again
1761 | $again
1762 | .click(function() {
1763 | self.navigationGoToElement( _currentElementNumber );
1764 | })
1765 | .hover(
1766 | function() {
1767 | $( this ).toggleClass( "ui-state-hover" );
1768 | }
1769 | );
1770 |
1771 | // removes the broken content from list of known contents
1772 | $reject
1773 | .click(function() {
1774 | self.removeSetElement( _currentElementNumber );
1775 | })
1776 | .hover(
1777 | function() {
1778 | $( this ).toggleClass( "ui-state-hover" );
1779 | }
1780 | );
1781 |
1782 | // treat the message as a normal content
1783 | $lb.content
1784 | .empty()
1785 | .append( $structure )
1786 | .find( "#ui-lightbox-error" )
1787 | .width( _errorScreenWidth )
1788 | .height( _errorScreenHeight )
1789 | .end()
1790 | .children()
1791 | .hide();
1792 |
1793 | // because we don’t want to break the animation queue we need to tell
1794 | // subsequent functions in the queue that an error occured
1795 | data.showErrorMessage = true;
1796 | },
1797 |
1798 | updateCounter: function() {
1799 | var _current, _total, _newCounter,
1800 | data = this.data,
1801 | $lb = this.$lightbox,
1802 | _currentElement = data.currentSetElement,
1803 | _options = _currentElement.self.options,
1804 | _currentSet = data.currentSet;
1805 |
1806 | if ( _currentSet !== "single" ) {
1807 | _current = data.currentElementNumber;
1808 | _total = data.totalElementsNumber;
1809 | } else {
1810 | _current = 1;
1811 | _total = 1;
1812 | }
1813 |
1814 | _newCounter = _current + _options.counterDelimiter + _total;
1815 |
1816 | $lb.counter.text( _newCounter );
1817 | },
1818 |
1819 | updateTitle: function() {
1820 | var data = this.data,
1821 | $lb = this.$lightbox,
1822 | _currentElement = data.currentSetElement;
1823 |
1824 | // set new label for the title and trim it if it is too long - no scrolling at the moment
1825 | // 20px is a safety distance between text and the close button
1826 | if ( _currentElement.title !== "" ) {
1827 | $lb.title
1828 | .empty()
1829 | .append( _currentElement.title );
1830 | } else {
1831 |
1832 | // keep the line height – prevent counter from popping up in the title line
1833 | $lb.title.append( " " );
1834 | }
1835 | },
1836 |
1837 | updateTitleWidth: function() {
1838 | var $lb = this.$lightbox;
1839 |
1840 | // 12px – 2 × border + 2 × padding
1841 | $lb.header.width( $lb.content.width() - 12 );
1842 | },
1843 |
1844 | queueHideContent: function( next ) {
1845 | var data = this.data,
1846 | $lb = this.$lightbox,
1847 | _currentElement = data.currentSetElement,
1848 | _options = _currentElement.self.options;
1849 |
1850 | $lb.content.children()
1851 | .fadeOut( _options.animationSpeed, function() {
1852 | $( this ).remove();
1853 | next();
1854 | });
1855 |
1856 | // disable panorama
1857 | $lb.panoramaIcon
1858 | .hide()
1859 | .removeClass( "ui-lightbox-panorama-icon-expand ui-lightbox-panorama-icon-shrink" );
1860 |
1861 | data.panoramaOn = false;
1862 |
1863 | // hide the map
1864 | this.panoramaHideMap();
1865 | },
1866 |
1867 | queueShowOverlay: function( next ) {
1868 | var data = this.data,
1869 | $lb = this.$lightbox,
1870 | _currentElement = data.currentSetElement.self;
1871 |
1872 | // let know that lightbox is not ready now
1873 | data.ready = false;
1874 |
1875 | // change cursor to default
1876 | this.setCursor();
1877 |
1878 | // show overlay
1879 | $lb.overlay.fadeIn( _currentElement.options.animationSpeed, next );
1880 | },
1881 |
1882 | queueCenterLightbox: function( next ) {
1883 | var $lb = this.$lightbox,
1884 | $root = $lb.root,
1885 | _screenWidth = this.getWindowSize( "width" ),
1886 | _screenHeight = this.getWindowSize( "height" ),
1887 | _lbWidth = $root.outerWidth(),
1888 | _lbHeight = $root.outerHeight();
1889 |
1890 | $root
1891 | .css({
1892 | left: Math.round( (_screenWidth - _lbWidth) / 2 ) + "px",
1893 | top: Math.round( (_screenHeight - _lbHeight) / 2 ) + "px"
1894 | })
1895 | .show( 0, next );
1896 | },
1897 |
1898 | queueLoadContent: function( next ) {
1899 |
1900 | // loads appropriate content using right method
1901 | var _loadContentMethod,
1902 | data = this.data,
1903 | _currentSetElement = data.currentSetElement;
1904 |
1905 | // assume that there will be no error
1906 | data.showErrorMessage = false;
1907 |
1908 | switch ( _currentSetElement.type ) {
1909 | case "image":
1910 | _loadContentMethod = "loadContentImage";
1911 | break;
1912 |
1913 | case "youtube":
1914 | _loadContentMethod = "loadContentYoutube";
1915 | break;
1916 |
1917 | case "vimeo":
1918 | _loadContentMethod = "loadContentVimeo";
1919 | break;
1920 |
1921 | case "flash":
1922 | _loadContentMethod = "loadContentFlash";
1923 | }
1924 |
1925 | $.when( this[_loadContentMethod](_currentSetElement.url) ).then(function() {
1926 | next();
1927 | });
1928 | },
1929 |
1930 | queueResizeLightbox: function( next ) {
1931 |
1932 | // resizes the lightbox to to house content and centers it on the screen
1933 | var _speed, _animate, _sizes, _imageTargetWidth, _imageTargetHeight,
1934 | _lightboxTargetWidth, _lightboxTargetHeight, _img,
1935 | data = this.data,
1936 | $lb = this.$lightbox,
1937 | _padding = data.lightboxPadding,
1938 | _headerHeight = data.headerHeight,
1939 | _currentElement = data.currentSetElement,
1940 | _options = _currentElement.self.options,
1941 | _isError = data.showErrorMessage,
1942 | _errorScreenSize = data.errorScreenSize,
1943 | _errorScreenWidth = _errorScreenSize.width,
1944 | _errorScreenHeight = _errorScreenSize.height,
1945 | _minimalLightboxSize = data.minimalLightboxSize,
1946 | _minimalLightboxWidth = _minimalLightboxSize.width,
1947 | _minimalLightboxHeight = _minimalLightboxSize.height;
1948 |
1949 | // when it is used in context of a queue
1950 | _speed = _options.animationSpeed;
1951 |
1952 | // if content is type of image, resize it to fit the screen
1953 | if ( _currentElement.type === "image" && _isError === false ) {
1954 | _sizes = this.getSizes();
1955 | _imageTargetWidth = _sizes.imageTargetWidth;
1956 | _imageTargetHeight = _sizes.imageTargetHeight;
1957 | _lightboxTargetWidth = _sizes.lightboxTargetWidth;
1958 | _lightboxTargetHeight = _sizes.lightboxTargetHeight;
1959 | _img = $lb.content.find( "img" );
1960 |
1961 | // if scaled size is smaller than the original, show Panorama
1962 | _currentElement.currentWidth = _imageTargetWidth;
1963 | _currentElement.currentHeight = _imageTargetHeight;
1964 |
1965 | // scale the image
1966 | _img
1967 | .width( _imageTargetWidth )
1968 | .height( _imageTargetHeight );
1969 |
1970 | // if you use this method in the context of a queue then use animation; otherwise when used in live resize, don’t animate it
1971 | if ( $.isFunction(next) ) {
1972 | _speed = _options.animationSpeed;
1973 | } else {
1974 | _speed = 0;
1975 | }
1976 |
1977 | } else if ( (_currentElement.type === "youtube" || _currentElement.type === "vimeo") && _isError === false ){
1978 |
1979 | // do not let lightbox size be smaller than the minimal one
1980 | _lightboxTargetWidth = this.checkMinimalSize( "width", _currentElement.width );
1981 | _lightboxTargetHeight = this.checkMinimalSize( "height", _currentElement.height );
1982 | } else if ( _currentElement.type === "flash" && _isError === false ) {
1983 |
1984 | // do not let lightbox size be smaller than the minimal one or larger than the window
1985 | _lightboxTargetWidth = this.getOptimalSize( "width", _currentElement.width );
1986 | _lightboxTargetHeight = this.getOptimalSize( "height", _currentElement.height );
1987 | } else if ( _isError ) {
1988 | _speed = 0;
1989 | _lightboxTargetWidth = _errorScreenWidth;
1990 | _lightboxTargetHeight = _errorScreenHeight;
1991 | }
1992 |
1993 |
1994 | // scale and resize the lightbox
1995 | $lb.root
1996 | .find( "#ui-lightbox-content" )
1997 | .animate( {width: _lightboxTargetWidth}, _speed )
1998 | .animate( {height: _lightboxTargetHeight}, _speed )
1999 | .end()
2000 | .animate( {left: (this.getWindowSize("width") - _lightboxTargetWidth - _padding) / 2}, _speed )
2001 | .animate( {top: (this.getWindowSize("height") - _lightboxTargetHeight - _padding - _headerHeight) / 2}, _speed, next);
2002 | },
2003 |
2004 | queueCenterContent: function( next ) {
2005 | var _content,
2006 | $lb = this.$lightbox,
2007 | $contentContainer = $lb.content,
2008 | $content = $contentContainer.children();
2009 |
2010 | $contentContainer
2011 | .children()
2012 | .css({
2013 | top: $contentContainer.height() / 2 - $content.outerHeight() / 2,
2014 | left: $contentContainer.width() / 2 - $content.outerWidth() / 2
2015 | });
2016 |
2017 | // if we don’t run it in the live resize but in the queue
2018 | if ( next ) {
2019 | next();
2020 | }
2021 | },
2022 |
2023 | queueShowContent: function( next ) {
2024 | var data = this.data,
2025 | $lb = this.$lightbox,
2026 | self = this,
2027 | _currentElement = data.currentSetElement,
2028 | _options = _currentElement.self.options,
2029 | _isError = data.showErrorMessage;
2030 |
2031 | // show content
2032 | $lb.content.children()
2033 | .fadeIn( _options.animationSpeed, function() {
2034 |
2035 | // if one of the image sides is bigger than the screen, show panorama icon
2036 | if ( _currentElement.type === "image" && _isError === false ) {
2037 | self.panoramaCheckAvailability();
2038 | }
2039 |
2040 | next();
2041 | });
2042 | },
2043 |
2044 | queueSlideDownHeader: function( next ) {
2045 | var data = this.data,
2046 | $lb = this.$lightbox,
2047 | _options = data.currentSetElement.self.options;
2048 |
2049 | // show header
2050 | $lb.header.slideDown( _options.animationSpeed, next );
2051 |
2052 | // show and update counter
2053 | this.updateCounter();
2054 |
2055 | // update title
2056 | this.updateTitleWidth();
2057 | this.updateTitle();
2058 |
2059 | // update buttons states
2060 | this.checkButtonsState();
2061 |
2062 | // indicate that animation queue is finshed
2063 | data.ready = true;
2064 |
2065 | // if you go from penulimate/second element to the last/first element change cursor to ‘default’
2066 | // must be after ‘data.ready = true’!!!
2067 | this.setCursor();
2068 |
2069 | // show arrow cue whenever possible when there is no mouse mouvement
2070 | this.showArrow();
2071 | },
2072 |
2073 | queueSlideUpHeader: function( next ) {
2074 | var data = this.data,
2075 | $lb = this.$lightbox,
2076 | _currentElement = data.currentSetElement,
2077 | _options = _currentElement.self.options;
2078 |
2079 | // structure is not ready - start an animation
2080 | data.ready = false;
2081 |
2082 | // hide arrow cue
2083 | this.hideArrow();
2084 |
2085 | // change cursor to default
2086 | this.setCursor();
2087 |
2088 | $lb.header.slideUp ( _options.animationSpeed, next );
2089 | },
2090 |
2091 | $lightbox: {},
2092 | sets: {},
2093 | data: {
2094 | minimalLightboxSize: {
2095 | width: 300,
2096 | height: 300
2097 | },
2098 | lightboxPadding: 12,
2099 | headerHeight: 57,
2100 | ready: false,
2101 | panoramaOn: false,
2102 | mapSize: {
2103 | width: 150,
2104 | height: 100
2105 | },
2106 | providers: {
2107 | vimeo: "http://www.vimeo.com/api/oembed.json?callback=?",
2108 | youtube: "http://gdata.youtube.com/feeds/api/videos/"
2109 | },
2110 | showErrorMessage: false,
2111 | currentSetElement: {},
2112 | enablePanorama: false,
2113 | errorScreenSize: {
2114 | width: 500,
2115 | height: 500
2116 | },
2117 | htmlFlash: "" +
2118 | "",
2127 | htmlErrorScreen: "" +
2128 | "" +
2129 | "
{message}
" +
2130 | "" +
2140 | "
",
2141 | htmlYoutube: "",
2142 | htmlLightbox: "" +
2143 | "" +
2144 | "
" +
2145 | "
" +
2146 | "
" +
2147 | "" +
2150 | "
" +
2151 | "" +
2172 | "
",
2173 | htmlMap: "" +
2174 | "",
2177 | htmlOverlay: ""
2178 | }
2179 | }
2180 | });
2181 | })( jQuery );
2182 |
--------------------------------------------------------------------------------
/widget/lib/jquery.ui.rlightbox.min.js:
--------------------------------------------------------------------------------
1 | (function(a,b){a.widget("ui.rlightbox",{options:{animationSpeed:"fast",setPrefix:"lb",showMap:true,counterDelimiter:" / ",videoWidth:640,videoHeight:385,errorMessage:"Oh dear! Something went wrong! If the problem still appears let the page’s admin know. Would you like to try again or reject the content?",againButtonLabel:"Try again",rejectButtonLabel:"Reject this content",overwriteTitle:false,keys:{next:[78,39],previous:[80,37],close:[67,27],panorama:[90,null]},loop:false},_create:function(){var d,e=a.ui.rlightbox.global,c=this;e.getLightbox();d=e.extractAnchor(this);if(d.type!==b){e.addToSet(d);this.element.click(function(f){e.open(c);f.preventDefault()})}},_setOption:function(c,d){}});a.extend(a.ui.rlightbox,{global:{addToSet:function(f){var g=this.getSetName(f.self),e=a.ui.rlightbox.global.sets,c=f.self.options,h=c.setPrefix,d="."+h+"_"+g,i=a(d).index(f.element);if(!e[g]){e[g]=[];e[g].push(f)}else{e[g].splice(i,0,f)}},checkButtonsState:function(){var g=this.data,f=this.$lightbox,c=g.currentSet,h=g.totalElementsNumber,d=g.currentElementNumber,e=g.currentSetElement.self.options.loop;if(c==="single"||h===1){this.setButtonState("disabled")}else{if(d===1&&e===false){this.setButtonState("disabled",f.prev);this.setButtonState("default",f.next)}else{if(d===h&&e===false){this.setButtonState("disabled",f.next);this.setButtonState("default",f.prev)}else{this.setButtonState("default")}}}},checkMinimalSize:function(c,f){var g=this.data,e=g.minimalLightboxSize,h=e.width,d=e.height;if(c==="width"){if(fn&&d+f<=e){j=1}else{j=2}}if(p<=i){o=-1}else{if(p>i&&c>=p+f+h){o=1}else{o=2}}return{statusWidth:j,statusHeight:o}},getLightbox:function(){var e=this.data,d=this.$lightbox,c=this;if(!d.root){this.createStructure();this.setReferences();d.close.add(d.overlay).click(a.proxy(this.closeLightbox,this));d.next.click(a.proxy(this.next,this));d.prev.click(a.proxy(this.prev,this));d.next.add(d.prev).add(d.next).add(d.close).hover(function(){if(a(this).is(":not(.ui-state-disabled)")){c.setButtonState("highlight",a(this))}},function(){if(a(this).is(":not(.ui-state-disabled)")){c.setButtonState("default",a(this))}});d.contentContainer.mousemove(a.proxy(this.showArrow,this)).mousemove(a.proxy(this.checkSide,this)).mousemove(a.proxy(this.setCursor,this)).click(function(){if(e.side==="left"){c.prev.apply(c)}else{if(e.side==="right"){c.next.apply(c)}}}).mousedown(a.proxy(this.panoramaStart,this)).mouseup(a.proxy(this.panoramaStop,this)).mouseleave(function(){c.hideArrow.apply(c);e.side=""});d.panoramaIcon.click(a.proxy(this.panoramaToggle,this)).hover(a.proxy(this.panoramaHighlight,this));a(window).bind("resize.rlightbox",a.proxy(this.liveResize,this));a(document).keyup(a.proxy(this.handleKeyboard,this))}},getOptimalSize:function(k,e){var h=this.data,f=h.minimalLightboxSize,j=f.width,i=f.height,g=this.getAvailableScreenSize(),d=g.width,c=g.height;if(k==="width"){if(ed){return d}else{return e}}}else{if(k==="height"){if(ec){return c}else{return e}}}}},getParam:function(g,c){var d,e="[\\?&]"+g+"=(\\w+)",f=new RegExp(e);d=f.exec(c);if(d!==null){return d[1]}else{return null}},getSetName:function(e){var g=a(e.element).attr("class"),f=e.options.setPrefix+"_",d=new RegExp(f+"([\\w-_]+)"),c=d.exec(g);return c?c[1]:"single"},checkSide:function(h){var i=this.data,g=this.$lightbox,j=g.contentContainer,c=h.pageX-j.offset().left,f=Math.round(j.width()/2),e=i.currentElementNumber,d=i.totalElementsNumber;if(c<=f){i.side="left"}else{if(c>f){i.side="right"}}h.preventDefault()},getSizes:function(){var k,j,r,p,c,h,e,f,i,l=this.$lightbox,x=this.data,m=this,o=x.currentSetElement,s=this.getWindowSize("width"),t=this.getWindowSize("height"),n=x.minimalLightboxSize.width,v=x.minimalLightboxSize.height,g=o.width,q=o.height,u=x.lightboxPadding,d=x.headerHeight;function w(y,z){k=m.getImageStatus(y,z);j=k.statusWidth;r=k.statusHeight;if(((j===1||j===-1)&&r!==2)&&((r===1||r===-1)&&j!==2)){if(j===1){h=y}else{if(j===-1){h=n}}p=y;if(r===1){e=z}else{if(r===-1){e=v}}c=z}else{if(j===2||r===2){if(j===1||j===-1){e=t-d-u;c=e;f=e/z;if(j===-1){h=n;p=Math.ceil(y*f)}else{h=Math.ceil(y*f)-u;p=h;if(p<=n){w(p,c)}}}else{if(r===1||r===-1){h=s-u;p=h;i=h/y;if(r===-1){e=v;c=Math.ceil(z*i)}else{e=Math.ceil(z*i)-d-u;c=e;if(c<=v){w(p,c)}}}else{if(y>z){h=s-u;p=h;i=h/y;e=Math.ceil(z*i)-u-d;c=e;if(c<=v||e+u+d>t){w(p,c)}}else{e=t-d-u;c=e;f=e/z;h=Math.ceil(y*f)-u;p=h;if(p<=n||h>s){w(p,c)}}}}}}}w(g,q);return{imageTargetWidth:p,imageTargetHeight:c,lightboxTargetWidth:h,lightboxTargetHeight:e,statusWidth:j,statusHeight:r}},getWindowSize:function(k){var g=this.data,e=a(window).width(),c=a(window).height(),d=g.minimalLightboxSize,f=g.lightboxPadding,i=g.headerHeight,j=d.width+f,h=d.height+f+i;if(k==="width"){if(e");k.css({display:"none",width:g,height:h});d.removeClass("ui-lightbox-loader").empty().append(f).children().wrap(k);e.resolve()}setTimeout(l,1000);return e.promise()},loadContentImage:function(f){var g=this.$lightbox,i=this.data,d=this,e=i.currentSetElement,c=a.Deferred(),h=a("
");g.content.addClass("ui-lightbox-loader");h.attr("src",f).bind("load",function(){a(this).unbind("load");e.width=this.width;e.height=this.height;g.content.removeClass("ui-lightbox-loader").empty().append(this).children().hide();c.resolve()}).error(function(){g.content.removeClass("ui-lightbox-loader");d.showErrorMessage();c.resolve()}).each(function(){if(this.complete||this.complete===b){var j=this.src;this.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";this.src=j}});return c.promise()},loadContentVimeo:function(c){var e,g,h=this.data,m=this.$lightbox,l=this,d=a.Deferred(),j=h.providers.vimeo,i=h.currentSetElement,k=i.self.options,f=h.minimalLightboxSize;m.content.addClass("ui-lightbox-loader");a.ajax({url:j,data:{url:c,maxwidth:k.videoWidth,maxheight:k.videoHeight},dataType:"jsonp",timeout:5000}).success(function(n){m.content.removeClass("ui-lightbox-loader").empty().append(n.html).children().wrap("").end().find("div:first").width(n.width).height(n.height);if(k.overwriteTitle===false){i.title=n.title}i.width=n.width;i.height=n.height;d.resolve()}).error(function(){m.content.removeClass("ui-lightbox-loader");l.showErrorMessage();d.resolve()});return d.promise()},loadContentYoutube:function(c){var n,k=this.data,q=this.$lightbox,d=q.content,p=this,e=a.Deferred(),m=k.providers.youtube,l=k.currentSetElement,o=l.self.options,i=k.minimalLightboxSize,g=o.videoWidth,j=o.videoHeight,f=k.htmlYoutube;function h(){q.content.removeClass("ui-lightbox-loader");p.showErrorMessage();e.resolve()}q.content.addClass("ui-lightbox-loader");a.ajax({url:m+l.id+"?callback=?",data:{v:2,alt:"jsonc",prettyprint:true},dataType:"jsonp",timeout:5000}).success(function(r){if(r.error){h();return}f=p.replaceHtmlPatterns(f,{width:g,height:j,url:l.id});n=a("");n.css({display:"none",width:g,height:j});d.removeClass("ui-lightbox-loader").empty().append(f).children().wrap(n);if(o.overwriteTitle===false){l.title=r.data.title}l.width=g;l.height=j;e.resolve()}).error(function(){h()});return e.promise()},navigationGoToElement:function(f){var g=this.data,d=this.sets,e=this.$lightbox,c=g.currentSet;g.currentElementNumber=f;g.currentSetElement=d[c][f-1];this.setNextQueue();e.queueContainer.next.dequeue("lightboxNext")},next:function(){var e=this.data,h=this.sets,m=this.$lightbox,j=e.ready,c=e.panoramaOn,d=e.currentSet,i=e.currentElementNumber,g=e.totalElementsNumber,k=e.currentSetElement.self.options,f=k.loop,l=true;if(j&&d!=="single"&&c===false){if(i+1<=g){e.currentElementNumber=i=i+1}else{if(i+1>g&&f){e.currentElementNumber=i=1}else{l=false}}if(l){e.currentSetElement=h[d][i-1];this.setNextQueue();m.queueContainer.next.dequeue("lightboxNext")}}},open:function(f){var i=this.data,e=this.sets,g=this.$lightbox,h=f.element,c=this.getSetName(f),d=a(h).attr("href");i.currentSet=c;i.totalElementsNumber=e[c].length;i.currentElementNumber=this.getCurrentElementNumber(h);i.currentSetElement=e[c][i.currentElementNumber-1];this.setOpenQueue();this.setNextQueue();this.checkButtonsState();g.queueContainer.open.dequeue("lightboxOpen")},panoramaCenterContent:function(){var m,l,h=this.data,n=this.$lightbox,i=h.currentSetElement,g=this.getAvailableScreenSize(),f=g.width,e=g.height,k=i.width,j=i.height,d=n.content,c=d.find("img");if(fe){c=e}else{if(m<=n){c=n}else{c=m}}if(l>d){j=d}else{if(l<=f){j=f}else{j=l}}o.content.width(c).height(j)},panoramaShowIcon:function(d,f){var e=this.$lightbox,c=f||"",g="ui-lightbox-panorama-icon-"+d+c;e.panoramaIcon.show().removeClass().addClass(g)},panoramaShowMap:function(){var o,d,p,m,e,n,i=this.data,g=i.minimalLightboxSize,q=this.$lightbox,c=q.content,f=c.find("img"),l=f.width(),k=f.height(),j=i.currentSetElement,h=i.mapSize;p=h.width/j.width;m=h.height/j.height;if(l=1){e.currentElementNumber=i=i-1}else{if(i-1<1&&f){e.currentElementNumber=i=g}else{l=false}}if(l){e.currentSetElement=h[d][i-1];this.setNextQueue();m.queueContainer.next.dequeue("lightboxNext")}}},removeSetElement:function(f){var g=this.data,e=this.sets,c=g.currentSet,d=g.totalElementsNumber;e[c].splice(f-1,1);if(d===1||c==="single"){this.closeLightbox();this.destroy()}else{this.destroy();g.totalElementsNumber=e[c].length;if(f===d){this.navigationGoToElement(f-1)}else{this.navigationGoToElement(f)}}},replaceHtmlPatterns:function(d,c){a.each(c,function(e,g){var f=new RegExp("{"+e+"}","g");d=d.replace(f,g)});return d},setButtonState:function(f,e){var d=this.$lightbox,c=e||d.controlButtons;switch(f){case"default":c.removeClass("ui-state-highlight ui-state-disabled");break;case"highlight":c.addClass("ui-state-highlight");break;case"disabled":c.addClass("ui-state-disabled");break}},setCursor:function(e){var i=this.data,p=this.$lightbox,c=p.contentContainer,m=i.currentSet,l=i.currentSetElement,d=i.currentSetElement.type,f=i.totalElementsNumber,k=i.currentElementNumber,h=i.side,g=i.panoramaOn,n=i.showErrorMessage,o=l.self.options,j=o.loop;if(i.ready){if((m==="single"||f===1||k===1&&h==="left"||k===f&&h==="right")&&g===false&&(d==="image"||(d!=="image"&&n))){if(j===false){c.css("cursor","default")}else{c.css("cursor","pointer")}}else{if(g){c.css("cursor","move")}else{if(d==="image"||(d!=="image"&&n)){c.css("cursor","pointer")}else{c.css("cursor","auto")}}}}else{c.css("cursor","default")}if(e){e.preventDefault()}},setNextQueue:function(){var d=this.$lightbox,c=[a.proxy(this.queueSlideUpHeader,this),a.proxy(this.queueHideContent,this),a.proxy(this.queueLoadContent,this),a.proxy(this.queueResizeLightbox,this),a.proxy(this.queueCenterContent,this),a.proxy(this.queueShowContent,this),a.proxy(this.queueSlideDownHeader,this)];d.queueContainer.next.queue("lightboxNext",c)},setOpenQueue:function(){var d=this.$lightbox,c=[a.proxy(this.queueShowOverlay,this),a.proxy(this.queueCenterLightbox,this),a.proxy(this.queueLoadContent,this),a.proxy(this.queueResizeLightbox,this),a.proxy(this.queueCenterContent,this),a.proxy(this.queueShowContent,this),a.proxy(this.queueSlideDownHeader,this)];d.queueContainer.open.queue("lightboxOpen",c)},setReferences:function(){var c=this.$lightbox;c.root=a("#ui-lightbox");c.panoramaIcon=c.root.find("#ui-lightbox-panorama-icon");c.contentContainer=c.root.find("#ui-lightbox-content-container");c.content=c.contentContainer.find("#ui-lightbox-content");c.arrow=c.contentContainer.find("#ui-lightbox-arrow");c.header=c.root.find("#ui-lightbox-bottombar");c.headerWrapper=c.header.find("#ui-lightbox-title-wrapper");c.overlay=a("#ui-lightbox-overlay");c.next=c.root.find("#ui-lightbox-button-next");c.prev=c.root.find("#ui-lightbox-button-prev");c.controlButtons=c.next.add(c.prev);c.close=c.root.find("#ui-lightbox-button-close");c.counter=c.root.find("#ui-lightbox-counter");c.title=c.root.find("#ui-lightbox-title");c.map=a("#ui-lightbox-map");c.viewport=c.map.children().eq(0);c.queueContainer={open:a({}),next:a({})}},showArrow:function(c){var f=this.data,k=this.$lightbox,i=k.arrow,j=f.showErrorMessage,e=f.side,h=f.currentElementNumber,d=f.totalElementsNumber,g=f.currentSetElement.self.options.loop;if(f.ready&&f.currentSet!=="single"&&(f.currentSetElement.type==="image"||j)&&f.panoramaOn===false){if(e==="left"&&(h>1||g)){i.show().removeClass("ui-lightbox-arrow-next ui-corner-left").addClass("ui-lightbox-arrow-prev ui-corner-right").find("span").removeClass("ui-icon-carat-1-e").addClass("ui-icon-carat-1-w")}else{if(e==="right"&&(h",htmlErrorScreen:"",htmlYoutube:"",htmlLightbox:"",htmlMap:"",htmlOverlay:""}}})})(jQuery);
--------------------------------------------------------------------------------
/widget/lib/jquery.ui.widget.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Widget 1.8.16
3 | *
4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5 | * Dual licensed under the MIT or GPL Version 2 licenses.
6 | * http://jquery.org/license
7 | *
8 | * http://docs.jquery.com/UI/Widget
9 | */
10 | (function( $, undefined ) {
11 |
12 | // jQuery 1.4+
13 | if ( $.cleanData ) {
14 | var _cleanData = $.cleanData;
15 | $.cleanData = function( elems ) {
16 | for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
17 | try {
18 | $( elem ).triggerHandler( "remove" );
19 | // http://bugs.jquery.com/ticket/8235
20 | } catch( e ) {}
21 | }
22 | _cleanData( elems );
23 | };
24 | } else {
25 | var _remove = $.fn.remove;
26 | $.fn.remove = function( selector, keepData ) {
27 | return this.each(function() {
28 | if ( !keepData ) {
29 | if ( !selector || $.filter( selector, [ this ] ).length ) {
30 | $( "*", this ).add( [ this ] ).each(function() {
31 | try {
32 | $( this ).triggerHandler( "remove" );
33 | // http://bugs.jquery.com/ticket/8235
34 | } catch( e ) {}
35 | });
36 | }
37 | }
38 | return _remove.call( $(this), selector, keepData );
39 | });
40 | };
41 | }
42 |
43 | $.widget = function( name, base, prototype ) {
44 | var namespace = name.split( "." )[ 0 ],
45 | fullName;
46 | name = name.split( "." )[ 1 ];
47 | fullName = namespace + "-" + name;
48 |
49 | if ( !prototype ) {
50 | prototype = base;
51 | base = $.Widget;
52 | }
53 |
54 | // create selector for plugin
55 | $.expr[ ":" ][ fullName ] = function( elem ) {
56 | return !!$.data( elem, name );
57 | };
58 |
59 | $[ namespace ] = $[ namespace ] || {};
60 | $[ namespace ][ name ] = function( options, element ) {
61 | // allow instantiation without initializing for simple inheritance
62 | if ( arguments.length ) {
63 | this._createWidget( options, element );
64 | }
65 | };
66 |
67 | var basePrototype = new base();
68 | // we need to make the options hash a property directly on the new instance
69 | // otherwise we'll modify the options hash on the prototype that we're
70 | // inheriting from
71 | // $.each( basePrototype, function( key, val ) {
72 | // if ( $.isPlainObject(val) ) {
73 | // basePrototype[ key ] = $.extend( {}, val );
74 | // }
75 | // });
76 | basePrototype.options = $.extend( true, {}, basePrototype.options );
77 | $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
78 | namespace: namespace,
79 | widgetName: name,
80 | widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
81 | widgetBaseClass: fullName
82 | }, prototype );
83 |
84 | $.widget.bridge( name, $[ namespace ][ name ] );
85 | };
86 |
87 | $.widget.bridge = function( name, object ) {
88 | $.fn[ name ] = function( options ) {
89 | var isMethodCall = typeof options === "string",
90 | args = Array.prototype.slice.call( arguments, 1 ),
91 | returnValue = this;
92 |
93 | // allow multiple hashes to be passed on init
94 | options = !isMethodCall && args.length ?
95 | $.extend.apply( null, [ true, options ].concat(args) ) :
96 | options;
97 |
98 | // prevent calls to internal methods
99 | if ( isMethodCall && options.charAt( 0 ) === "_" ) {
100 | return returnValue;
101 | }
102 |
103 | if ( isMethodCall ) {
104 | this.each(function() {
105 | var instance = $.data( this, name ),
106 | methodValue = instance && $.isFunction( instance[options] ) ?
107 | instance[ options ].apply( instance, args ) :
108 | instance;
109 | // TODO: add this back in 1.9 and use $.error() (see #5972)
110 | // if ( !instance ) {
111 | // throw "cannot call methods on " + name + " prior to initialization; " +
112 | // "attempted to call method '" + options + "'";
113 | // }
114 | // if ( !$.isFunction( instance[options] ) ) {
115 | // throw "no such method '" + options + "' for " + name + " widget instance";
116 | // }
117 | // var methodValue = instance[ options ].apply( instance, args );
118 | if ( methodValue !== instance && methodValue !== undefined ) {
119 | returnValue = methodValue;
120 | return false;
121 | }
122 | });
123 | } else {
124 | this.each(function() {
125 | var instance = $.data( this, name );
126 | if ( instance ) {
127 | instance.option( options || {} )._init();
128 | } else {
129 | $.data( this, name, new object( options, this ) );
130 | }
131 | });
132 | }
133 |
134 | return returnValue;
135 | };
136 | };
137 |
138 | $.Widget = function( options, element ) {
139 | // allow instantiation without initializing for simple inheritance
140 | if ( arguments.length ) {
141 | this._createWidget( options, element );
142 | }
143 | };
144 |
145 | $.Widget.prototype = {
146 | widgetName: "widget",
147 | widgetEventPrefix: "",
148 | options: {
149 | disabled: false
150 | },
151 | _createWidget: function( options, element ) {
152 | // $.widget.bridge stores the plugin instance, but we do it anyway
153 | // so that it's stored even before the _create function runs
154 | $.data( element, this.widgetName, this );
155 | this.element = $( element );
156 | this.options = $.extend( true, {},
157 | this.options,
158 | this._getCreateOptions(),
159 | options );
160 |
161 | var self = this;
162 | this.element.bind( "remove." + this.widgetName, function() {
163 | self.destroy();
164 | });
165 |
166 | this._create();
167 | this._trigger( "create" );
168 | this._init();
169 | },
170 | _getCreateOptions: function() {
171 | return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
172 | },
173 | _create: function() {},
174 | _init: function() {},
175 |
176 | destroy: function() {
177 | this.element
178 | .unbind( "." + this.widgetName )
179 | .removeData( this.widgetName );
180 | this.widget()
181 | .unbind( "." + this.widgetName )
182 | .removeAttr( "aria-disabled" )
183 | .removeClass(
184 | this.widgetBaseClass + "-disabled " +
185 | "ui-state-disabled" );
186 | },
187 |
188 | widget: function() {
189 | return this.element;
190 | },
191 |
192 | option: function( key, value ) {
193 | var options = key;
194 |
195 | if ( arguments.length === 0 ) {
196 | // don't return a reference to the internal hash
197 | return $.extend( {}, this.options );
198 | }
199 |
200 | if (typeof key === "string" ) {
201 | if ( value === undefined ) {
202 | return this.options[ key ];
203 | }
204 | options = {};
205 | options[ key ] = value;
206 | }
207 |
208 | this._setOptions( options );
209 |
210 | return this;
211 | },
212 | _setOptions: function( options ) {
213 | var self = this;
214 | $.each( options, function( key, value ) {
215 | self._setOption( key, value );
216 | });
217 |
218 | return this;
219 | },
220 | _setOption: function( key, value ) {
221 | this.options[ key ] = value;
222 |
223 | if ( key === "disabled" ) {
224 | this.widget()
225 | [ value ? "addClass" : "removeClass"](
226 | this.widgetBaseClass + "-disabled" + " " +
227 | "ui-state-disabled" )
228 | .attr( "aria-disabled", value );
229 | }
230 |
231 | return this;
232 | },
233 |
234 | enable: function() {
235 | return this._setOption( "disabled", false );
236 | },
237 | disable: function() {
238 | return this._setOption( "disabled", true );
239 | },
240 |
241 | _trigger: function( type, event, data ) {
242 | var callback = this.options[ type ];
243 |
244 | event = $.Event( event );
245 | event.type = ( type === this.widgetEventPrefix ?
246 | type :
247 | this.widgetEventPrefix + type ).toLowerCase();
248 | data = data || {};
249 |
250 | // copy original event properties over to the new event
251 | // this would happen if we could call $.event.fix instead of $.Event
252 | // but we don't have a way to force an event to be fixed multiple times
253 | if ( event.originalEvent ) {
254 | for ( var i = $.event.props.length, prop; i; ) {
255 | prop = $.event.props[ --i ];
256 | event[ prop ] = event.originalEvent[ prop ];
257 | }
258 | }
259 |
260 | this.element.trigger( event, data );
261 |
262 | return !( $.isFunction(callback) &&
263 | callback.call( this.element[0], event, data ) === false ||
264 | event.isDefaultPrevented() );
265 | }
266 | };
267 |
268 | })( jQuery );
269 |
--------------------------------------------------------------------------------
/widget/lib/jquery.ui.widget.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Widget 1.8.16
3 | *
4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5 | * Dual licensed under the MIT or GPL Version 2 licenses.
6 | * http://jquery.org/license
7 | *
8 | * http://docs.jquery.com/UI/Widget
9 | */
10 | (function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)try{b(d).triggerHandler("remove")}catch(e){}k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(d){}});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=
11 | function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):
12 | d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=
13 | b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
14 | "-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
15 | c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
16 |
--------------------------------------------------------------------------------