Version Description
- Improved: DB queries on opening lightbox.
- Improved: Updated external js libraries.
- Improved: Escaped all data printed in gallery views.
- Fixed: Disable "Add selected images to gallery" button after adding images.
- Fixed: Missing "Back" button in Gallery groups with disabled dynamic URLs for galleries and gallery groups.
- Fixed: Masonry distance issue with video items.
- Fixed: Restrict Gallery download from URL.
- Fixed: Bulk actions after search by alt/desc.
Download this release
Release Info
Developer | 10web |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.5.81 |
Comparing to | |
See all releases |
Code changes from version 1.5.80 to 1.5.81
- admin/controllers/Options.php +1 -0
- admin/models/Galleries.php +60 -20
- admin/views/Options.php +2 -2
- admin/views/Shortcode.php +1 -1
- admin/views/Themes.php +140 -136
- admin/views/WidgetTags.php +3 -3
- css/bwg_frontend.css +7 -0
- css/bwg_tables.css +4 -1
- css/jquery.mCustomScrollbar.css +1265 -462
- css/jquery.mCustomScrollbar.min.css +1 -1
- css/styles.min.css +1 -1
- css/sumoselect.css +337 -84
- css/sumoselect.min.css +1 -1
- filemanager/UploadHandler.php +11 -16
- filemanager/js/default.js +3 -0
- filemanager/js/jq_uploader/jquery.fileupload.js +156 -161
- filemanager/js/jq_uploader/jquery.iframe-transport.js +36 -30
- filemanager/model.php +96 -79
- filemanager/view.php +3 -3
- framework/WDWLibrary.php +30 -30
- frontend/controllers/BWGControllerDownload_gallery.php +6 -0
- frontend/controllers/BWGControllerGalleryBox.php +18 -13
- frontend/models/BWGModelGalleryBox.php +8 -5
- frontend/models/model.php +9 -0
- frontend/views/BWGViewAlbum_compact_preview.php +22 -22
- frontend/views/BWGViewAlbum_extended_preview.php +37 -37
- frontend/views/BWGViewGalleryBox.php +88 -86
- frontend/views/BWGViewImage_browser.php +31 -31
- frontend/views/BWGViewSlideshow.php +66 -65
- frontend/views/BWGViewThumbnails.php +21 -20
- frontend/views/view.php +68 -66
- js/bwg.js +26 -3
- js/bwg_frontend.js +4 -4
- js/bwg_gallery_box.js +260 -252
- js/fontselect/fonts/Action Man.woff +0 -0
- js/fontselect/fonts/Bauer.woff +0 -0
- js/fontselect/fonts/Bubble.woff +0 -0
- js/fontselect/fontselect.css +89 -0
- js/fontselect/fontselect.js +1314 -0
- js/fontselect/fontselect.min.css +1 -0
- js/fontselect/fontselect.min.js +13 -0
- js/jquery.fullscreen.js +296 -0
- js/jquery.fullscreen.min.js +28 -0
- js/jquery.jscolor.js +3524 -0
- js/jquery.mCustomScrollbar.concat.min.js +5 -4
- js/jquery.mCustomScrollbar.js +2454 -0
- js/jquery.mobile.min.js +1 -1
- js/jquery.sumoselect.js +913 -0
- js/jquery.sumoselect.min.js +79 -759
admin/controllers/Options.php
CHANGED
@@ -245,6 +245,7 @@ class OptionsController_bwg {
|
|
245 |
}
|
246 |
|
247 |
$error = false;
|
|
|
248 |
if ( ini_get('allow_url_fopen') == 0 ) {
|
249 |
$error = true;
|
250 |
$message = WDWLibrary::message_id(0, __('http:// wrapper is disabled in the server configuration by allow_url_fopen=0.', $this->prefix), 'error');
|
245 |
}
|
246 |
|
247 |
$error = false;
|
248 |
+
|
249 |
if ( ini_get('allow_url_fopen') == 0 ) {
|
250 |
$error = true;
|
251 |
$message = WDWLibrary::message_id(0, __('http:// wrapper is disabled in the server configuration by allow_url_fopen=0.', $this->prefix), 'error');
|
admin/models/Galleries.php
CHANGED
@@ -903,8 +903,12 @@ class GalleriesModel_bwg {
|
|
903 |
}
|
904 |
$search = WDWLibrary::get('s');
|
905 |
if ( $search ) {
|
906 |
-
$where .= ' AND `
|
907 |
-
$
|
|
|
|
|
|
|
|
|
908 |
}
|
909 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET published=1' . $where, $prepareArgs));
|
910 |
$message = 2;
|
@@ -938,8 +942,12 @@ class GalleriesModel_bwg {
|
|
938 |
}
|
939 |
$search = WDWLibrary::get('s');
|
940 |
if ( $search ) {
|
941 |
-
$where .= ' AND `
|
942 |
-
$
|
|
|
|
|
|
|
|
|
943 |
}
|
944 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET published=0' . $where, $prepareArgs));
|
945 |
$message = 2;
|
@@ -1068,8 +1076,12 @@ class GalleriesModel_bwg {
|
|
1068 |
//$where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ($image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
|
1069 |
$search = WDWLibrary::get('s');
|
1070 |
if ( $search ) {
|
1071 |
-
$where .= ' AND `
|
1072 |
-
$
|
|
|
|
|
|
|
|
|
1073 |
}
|
1074 |
if ( !empty($prepareArgs) ) {
|
1075 |
$images_data = $wpdb->get_results($wpdb->prepare('SELECT id, image_url, thumb_url, resolution_thumb FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where, $prepareArgs));
|
@@ -1182,8 +1194,12 @@ class GalleriesModel_bwg {
|
|
1182 |
}
|
1183 |
$search = WDWLibrary::get('s');
|
1184 |
if ( $search ) {
|
1185 |
-
$where .= ' AND `
|
1186 |
-
$
|
|
|
|
|
|
|
|
|
1187 |
}
|
1188 |
foreach ( $img_ids as $img_id ) {
|
1189 |
$file_path = str_replace("thumb", ".original", htmlspecialchars_decode(BWG()->upload_dir . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
|
@@ -1226,8 +1242,12 @@ class GalleriesModel_bwg {
|
|
1226 |
}
|
1227 |
$search = WDWLibrary::get('s');
|
1228 |
if ( $search ) {
|
1229 |
-
$where .= ' AND `
|
1230 |
-
$
|
|
|
|
|
|
|
|
|
1231 |
}
|
1232 |
$images = $wpdb->get_results($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where, $prepareArgs));
|
1233 |
if ( !empty($images) ) {
|
@@ -1271,8 +1291,12 @@ class GalleriesModel_bwg {
|
|
1271 |
}
|
1272 |
$search = WDWLibrary::get('s');
|
1273 |
if ( $search ) {
|
1274 |
-
$where .= ' AND `
|
1275 |
-
$
|
|
|
|
|
|
|
|
|
1276 |
}
|
1277 |
global $wpdb;
|
1278 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `alt`="%s", `description`="%s", `redirect_url`="%s"' . $where, $prepareArgs));
|
@@ -1306,8 +1330,12 @@ class GalleriesModel_bwg {
|
|
1306 |
}
|
1307 |
$search = WDWLibrary::get('s');
|
1308 |
if ( $search ) {
|
1309 |
-
$where .= ' AND `
|
1310 |
-
$
|
|
|
|
|
|
|
|
|
1311 |
}
|
1312 |
global $wpdb;
|
1313 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `alt`="%s"' . $where, $prepareArgs));
|
@@ -1341,8 +1369,12 @@ class GalleriesModel_bwg {
|
|
1341 |
}
|
1342 |
$search = WDWLibrary::get('s');
|
1343 |
if ( $search ) {
|
1344 |
-
$where .= ' AND `
|
1345 |
-
$
|
|
|
|
|
|
|
|
|
1346 |
}
|
1347 |
global $wpdb;
|
1348 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `description`="%s"' . $where, $prepareArgs));
|
@@ -1376,8 +1408,12 @@ class GalleriesModel_bwg {
|
|
1376 |
}
|
1377 |
$search = WDWLibrary::get('s');
|
1378 |
if ( $search ) {
|
1379 |
-
$where .= ' AND `
|
1380 |
-
$
|
|
|
|
|
|
|
|
|
1381 |
}
|
1382 |
global $wpdb;
|
1383 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `redirect_url`="%s"' . $where, $prepareArgs));
|
@@ -1505,8 +1541,12 @@ class GalleriesModel_bwg {
|
|
1505 |
}
|
1506 |
$search = WDWLibrary::get('s');
|
1507 |
if ( $search ) {
|
1508 |
-
$where .= ' AND `
|
1509 |
-
$
|
|
|
|
|
|
|
|
|
1510 |
}
|
1511 |
$wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET pricelist_id=0' . $where, $prepareArgs));
|
1512 |
}
|
903 |
}
|
904 |
$search = WDWLibrary::get('s');
|
905 |
if ( $search ) {
|
906 |
+
$where .= ' AND (`alt` LIKE %s';
|
907 |
+
$where .= ' OR `filename` LIKE %s';
|
908 |
+
$where .= ' OR `description` LIKE %s)';
|
909 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
910 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
911 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
912 |
}
|
913 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET published=1' . $where, $prepareArgs));
|
914 |
$message = 2;
|
942 |
}
|
943 |
$search = WDWLibrary::get('s');
|
944 |
if ( $search ) {
|
945 |
+
$where .= ' AND (`alt` LIKE %s';
|
946 |
+
$where .= ' OR `filename` LIKE %s';
|
947 |
+
$where .= ' OR `description` LIKE %s)';
|
948 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
949 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
950 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
951 |
}
|
952 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET published=0' . $where, $prepareArgs));
|
953 |
$message = 2;
|
1076 |
//$where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ($image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
|
1077 |
$search = WDWLibrary::get('s');
|
1078 |
if ( $search ) {
|
1079 |
+
$where .= ' AND (`alt` LIKE %s';
|
1080 |
+
$where .= ' OR `filename` LIKE %s';
|
1081 |
+
$where .= ' OR `description` LIKE %s)';
|
1082 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1083 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1084 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1085 |
}
|
1086 |
if ( !empty($prepareArgs) ) {
|
1087 |
$images_data = $wpdb->get_results($wpdb->prepare('SELECT id, image_url, thumb_url, resolution_thumb FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where, $prepareArgs));
|
1194 |
}
|
1195 |
$search = WDWLibrary::get('s');
|
1196 |
if ( $search ) {
|
1197 |
+
$where .= ' AND (`alt` LIKE %s';
|
1198 |
+
$where .= ' OR `filename` LIKE %s';
|
1199 |
+
$where .= ' OR `description` LIKE %s)';
|
1200 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1201 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1202 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1203 |
}
|
1204 |
foreach ( $img_ids as $img_id ) {
|
1205 |
$file_path = str_replace("thumb", ".original", htmlspecialchars_decode(BWG()->upload_dir . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
|
1242 |
}
|
1243 |
$search = WDWLibrary::get('s');
|
1244 |
if ( $search ) {
|
1245 |
+
$where .= ' AND (`alt` LIKE %s';
|
1246 |
+
$where .= ' OR `filename` LIKE %s';
|
1247 |
+
$where .= ' OR `description` LIKE %s)';
|
1248 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1249 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1250 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1251 |
}
|
1252 |
$images = $wpdb->get_results($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where, $prepareArgs));
|
1253 |
if ( !empty($images) ) {
|
1291 |
}
|
1292 |
$search = WDWLibrary::get('s');
|
1293 |
if ( $search ) {
|
1294 |
+
$where .= ' AND (`alt` LIKE %s';
|
1295 |
+
$where .= ' OR `filename` LIKE %s';
|
1296 |
+
$where .= ' OR `description` LIKE %s)';
|
1297 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1298 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1299 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1300 |
}
|
1301 |
global $wpdb;
|
1302 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `alt`="%s", `description`="%s", `redirect_url`="%s"' . $where, $prepareArgs));
|
1330 |
}
|
1331 |
$search = WDWLibrary::get('s');
|
1332 |
if ( $search ) {
|
1333 |
+
$where .= ' AND (`alt` LIKE %s';
|
1334 |
+
$where .= ' OR `filename` LIKE %s';
|
1335 |
+
$where .= ' OR `description` LIKE %s)';
|
1336 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1337 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1338 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1339 |
}
|
1340 |
global $wpdb;
|
1341 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `alt`="%s"' . $where, $prepareArgs));
|
1369 |
}
|
1370 |
$search = WDWLibrary::get('s');
|
1371 |
if ( $search ) {
|
1372 |
+
$where .= ' AND (`alt` LIKE %s';
|
1373 |
+
$where .= ' OR `filename` LIKE %s';
|
1374 |
+
$where .= ' OR `description` LIKE %s)';
|
1375 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1376 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1377 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1378 |
}
|
1379 |
global $wpdb;
|
1380 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `description`="%s"' . $where, $prepareArgs));
|
1408 |
}
|
1409 |
$search = WDWLibrary::get('s');
|
1410 |
if ( $search ) {
|
1411 |
+
$where .= ' AND (`alt` LIKE %s';
|
1412 |
+
$where .= ' OR `filename` LIKE %s';
|
1413 |
+
$where .= ' OR `description` LIKE %s)';
|
1414 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1415 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1416 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1417 |
}
|
1418 |
global $wpdb;
|
1419 |
$updated = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `redirect_url`="%s"' . $where, $prepareArgs));
|
1541 |
}
|
1542 |
$search = WDWLibrary::get('s');
|
1543 |
if ( $search ) {
|
1544 |
+
$where .= ' AND (`alt` LIKE %s';
|
1545 |
+
$where .= ' OR `filename` LIKE %s';
|
1546 |
+
$where .= ' OR `description` LIKE %s)';
|
1547 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1548 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1549 |
+
$prepareArgs[] = "%" . trim($search) . "%";
|
1550 |
}
|
1551 |
$wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET pricelist_id=0' . $where, $prepareArgs));
|
1552 |
}
|
admin/views/Options.php
CHANGED
@@ -954,7 +954,7 @@ class OptionsView_bwg extends AdminView_bwg {
|
|
954 |
<div class="wd-group">
|
955 |
<label class="wd-label" for="watermark_color"><?php _e('Advertisement color', BWG()->prefix); ?></label>
|
956 |
<div class="bwg-flex">
|
957 |
-
<input type="text" name="watermark_color" id="watermark_color" value="<?php echo $row->watermark_color; ?>" class="
|
958 |
</div>
|
959 |
<p class="description"><?php _e('Choose the color for the advertisement text on images.', BWG()->prefix) ?></p>
|
960 |
</div>
|
@@ -1102,7 +1102,7 @@ class OptionsView_bwg extends AdminView_bwg {
|
|
1102 |
<div class="wd-group">
|
1103 |
<label class="wd-label" for="built_in_watermark_color"><?php _e('Watermark color', BWG()->prefix); ?></label>
|
1104 |
<div class="bwg-flex">
|
1105 |
-
<input type="text" name="built_in_watermark_color" id="built_in_watermark_color" value="<?php echo $row->built_in_watermark_color; ?>" class="
|
1106 |
</div>
|
1107 |
<p class="description"><?php _e('Choose the color for the watermark text on images.', BWG()->prefix) ?></p>
|
1108 |
</div>
|
954 |
<div class="wd-group">
|
955 |
<label class="wd-label" for="watermark_color"><?php _e('Advertisement color', BWG()->prefix); ?></label>
|
956 |
<div class="bwg-flex">
|
957 |
+
<input type="text" name="watermark_color" id="watermark_color" value="<?php echo $row->watermark_color; ?>" class="jscolor" onchange="preview_watermark()" />
|
958 |
</div>
|
959 |
<p class="description"><?php _e('Choose the color for the advertisement text on images.', BWG()->prefix) ?></p>
|
960 |
</div>
|
1102 |
<div class="wd-group">
|
1103 |
<label class="wd-label" for="built_in_watermark_color"><?php _e('Watermark color', BWG()->prefix); ?></label>
|
1104 |
<div class="bwg-flex">
|
1105 |
+
<input type="text" name="built_in_watermark_color" id="built_in_watermark_color" value="<?php echo $row->built_in_watermark_color; ?>" class="jscolor" onchange="preview_built_in_watermark()" />
|
1106 |
</div>
|
1107 |
<p class="description"><?php _e('Choose the color for the watermark text on images.', BWG()->prefix) ?></p>
|
1108 |
</div>
|
admin/views/Shortcode.php
CHANGED
@@ -456,7 +456,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
456 |
<div class="wd-box-content wd-width-100" id="tr_watermark_color">
|
457 |
<div class="wd-group">
|
458 |
<label class="wd-label" for="watermark_color"><?php _e('Advertisement color', BWG()->prefix); ?></label>
|
459 |
-
<input type="text" name="watermark_color" id="watermark_color" value="<?php echo BWG()->options->watermark_color; ?>" class="
|
460 |
<p class="description"><?php _e("Choose the color for the advertisement text on images.", BWG()->prefix); ?></p>
|
461 |
</div>
|
462 |
</div>
|
456 |
<div class="wd-box-content wd-width-100" id="tr_watermark_color">
|
457 |
<div class="wd-group">
|
458 |
<label class="wd-label" for="watermark_color"><?php _e('Advertisement color', BWG()->prefix); ?></label>
|
459 |
+
<input type="text" name="watermark_color" id="watermark_color" value="<?php echo BWG()->options->watermark_color; ?>" class="jscolor" />
|
460 |
<p class="description"><?php _e("Choose the color for the advertisement text on images.", BWG()->prefix); ?></p>
|
461 |
</div>
|
462 |
</div>
|
admin/views/Themes.php
CHANGED
@@ -260,8 +260,12 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
260 |
}
|
261 |
|
262 |
/**
|
263 |
-
*
|
264 |
* Generate row for font styles google fonts
|
|
|
|
|
|
|
|
|
|
|
265 |
*/
|
266 |
public function font_style_row( $saved_style, $font_style, $label_text, $radio_name) {
|
267 |
$google_fonts = WDWLibrary::get_google_fonts();
|
@@ -414,7 +418,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
414 |
<tr>
|
415 |
<td class="spider_label"><label for="thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?></label></td>
|
416 |
<td>
|
417 |
-
<input type="text" name="thumb_border_color" id="thumb_border_color" value="<?php echo $row->thumb_border_color; ?>" class="
|
418 |
</td>
|
419 |
</tr>
|
420 |
<tr>
|
@@ -473,10 +477,10 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
473 |
<tbody>
|
474 |
<tr>
|
475 |
<td class="spider_label">
|
476 |
-
|
477 |
</td>
|
478 |
<td>
|
479 |
-
|
480 |
</td>
|
481 |
</tr>
|
482 |
<tr>
|
@@ -496,7 +500,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
496 |
<tr>
|
497 |
<td class="spider_label"><label for="thumbs_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
498 |
<td>
|
499 |
-
<input type="text" name="thumbs_bg_color" id="thumbs_bg_color" value="<?php echo $row->thumbs_bg_color; ?>" class="
|
500 |
</td>
|
501 |
</tr>
|
502 |
<tr>
|
@@ -548,13 +552,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
548 |
<tr>
|
549 |
<td class="spider_label"><label for="thumb_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
550 |
<td>
|
551 |
-
<input type="text" name="thumb_title_font_color" id="thumb_title_font_color" value="<?php echo $row->thumb_title_font_color; ?>" class="
|
552 |
</td>
|
553 |
</tr>
|
554 |
<tr>
|
555 |
<td class="spider_label"><label for="thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
556 |
<td>
|
557 |
-
<input type="text" name="thumb_title_font_color_hover" id="thumb_title_font_color_hover" value="<?php echo $row->thumb_title_font_color_hover; ?>" class="
|
558 |
</td>
|
559 |
</tr>
|
560 |
<tr>
|
@@ -599,7 +603,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
599 |
<tr>
|
600 |
<td class="spider_label"><label for="thumb_description_font_color"><?php echo __('Thumb description font color:', BWG()->prefix); ?> </label></td>
|
601 |
<td>
|
602 |
-
<input type="text" name="thumb_description_font_color" id="thumb_description_font_color" value="<?php echo $row->thumb_description_font_color; ?>" class="
|
603 |
</td>
|
604 |
</tr>
|
605 |
<tr>
|
@@ -616,7 +620,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
616 |
<tr>
|
617 |
<td class="spider_label"><label for="thumb_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
618 |
<td>
|
619 |
-
<input type="text" name="thumb_gal_title_font_color" id="thumb_gal_title_font_color" value="<?php echo $row->thumb_gal_title_font_color; ?>" class="
|
620 |
</td>
|
621 |
</tr>
|
622 |
<tr>
|
@@ -718,7 +722,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
718 |
<tr>
|
719 |
<td class="spider_label"><label for="masonry_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
720 |
<td>
|
721 |
-
<input type="text" name="masonry_thumb_border_color" id="masonry_thumb_border_color" value="<?php echo $row->masonry_thumb_border_color; ?>" class="
|
722 |
</td>
|
723 |
</tr>
|
724 |
<tr>
|
@@ -773,7 +777,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
773 |
<label for="masonry_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label>
|
774 |
</td>
|
775 |
<td>
|
776 |
-
<input type="text" name="masonry_thumb_bg_color" id="masonry_thumb_bg_color" value="<?php echo $row->masonry_thumb_bg_color; ?>" class="
|
777 |
</td>
|
778 |
</tr>
|
779 |
<tr>
|
@@ -793,7 +797,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
793 |
<tr>
|
794 |
<td class="spider_label"><label for="masonry_thumbs_bg_color"><?php echo __('Full Background color:', BWG()->prefix); ?> </label></td>
|
795 |
<td>
|
796 |
-
<input type="text" name="masonry_thumbs_bg_color" id="masonry_thumbs_bg_color" value="<?php echo $row->masonry_thumbs_bg_color; ?>" class="
|
797 |
</td>
|
798 |
</tr>
|
799 |
<tr>
|
@@ -832,13 +836,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
832 |
<tr>
|
833 |
<td class="spider_label"><label for="masonry_thumb_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
834 |
<td>
|
835 |
-
<input type="text" name="masonry_thumb_title_font_color" id="masonry_thumb_title_font_color" value="<?php echo $row->masonry_thumb_title_font_color; ?>" class="
|
836 |
</td>
|
837 |
</tr>
|
838 |
<tr>
|
839 |
<td class="spider_label"><label for="masonry_thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
840 |
<td>
|
841 |
-
<input type="text" name="masonry_thumb_title_font_color_hover" id="masonry_thumb_title_font_color_hover" value="<?php echo $row->masonry_thumb_title_font_color_hover; ?>" class="
|
842 |
</td>
|
843 |
</tr>
|
844 |
<tr>
|
@@ -875,7 +879,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
875 |
<tr>
|
876 |
<td class="spider_label"><label for="masonry_description_color"><?php echo __('Description font color:', BWG()->prefix); ?> </label></td>
|
877 |
<td>
|
878 |
-
<input type="text" name="masonry_description_color" id="masonry_description_color" value="<?php echo $row->masonry_description_color; ?>" class="
|
879 |
</td>
|
880 |
</tr>
|
881 |
<tr>
|
@@ -891,7 +895,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
891 |
<tr>
|
892 |
<td class="spider_label"><label for="masonry_thumb_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
893 |
<td>
|
894 |
-
<input type="text" name="masonry_thumb_gal_title_font_color" id="masonry_thumb_gal_title_font_color" value="<?php echo $row->masonry_thumb_gal_title_font_color; ?>" class="
|
895 |
</td>
|
896 |
</tr>
|
897 |
<tr>
|
@@ -993,7 +997,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
993 |
<tr>
|
994 |
<td class="spider_label"><label for="mosaic_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
995 |
<td>
|
996 |
-
<input type="text" name="mosaic_thumb_border_color" id="mosaic_thumb_border_color" value="<?php echo $row->mosaic_thumb_border_color; ?>" class="
|
997 |
</td>
|
998 |
</tr>
|
999 |
<tr>
|
@@ -1046,7 +1050,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1046 |
<tr>
|
1047 |
<td class="spider_label"><label for="mosaic_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label></td>
|
1048 |
<td>
|
1049 |
-
<input type="text" name="mosaic_thumb_bg_color" id="mosaic_thumb_bg_color" value="<?php echo $row->mosaic_thumb_bg_color; ?>" class="
|
1050 |
</td>
|
1051 |
</tr>
|
1052 |
<tr>
|
@@ -1066,7 +1070,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1066 |
<tr>
|
1067 |
<td class="spider_label"><label for="mosaic_thumbs_bg_color"><?php echo __('Full Background color:', BWG()->prefix); ?> </label></td>
|
1068 |
<td>
|
1069 |
-
<input type="text" name="mosaic_thumbs_bg_color" id="mosaic_thumbs_bg_color" value="<?php echo $row->mosaic_thumbs_bg_color; ?>" class="
|
1070 |
</td>
|
1071 |
</tr>
|
1072 |
<tr>
|
@@ -1109,13 +1113,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1109 |
<tr>
|
1110 |
<td class="spider_label"><label for="mosaic_thumb_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
1111 |
<td>
|
1112 |
-
<input type="text" name="mosaic_thumb_title_font_color" id="mosaic_thumb_title_font_color" value="<?php echo $row->mosaic_thumb_title_font_color; ?>" class="
|
1113 |
</td>
|
1114 |
</tr>
|
1115 |
<tr>
|
1116 |
<td class="spider_label"><label for="mosaic_thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
1117 |
<td>
|
1118 |
-
<input type="text" name="mosaic_thumb_title_font_color_hover" id="mosaic_thumb_title_font_color_hover" value="<?php echo $row->mosaic_thumb_title_font_color_hover; ?>" class="
|
1119 |
</td>
|
1120 |
</tr>
|
1121 |
<tr>
|
@@ -1159,7 +1163,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1159 |
<tr>
|
1160 |
<td class="spider_label"><label for="mosaic_thumb_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
1161 |
<td>
|
1162 |
-
<input type="text" name="mosaic_thumb_gal_title_font_color" id="mosaic_thumb_gal_title_font_color" value="<?php echo $row->mosaic_thumb_gal_title_font_color; ?>" class="
|
1163 |
</td>
|
1164 |
</tr>
|
1165 |
<tr>
|
@@ -1225,7 +1229,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1225 |
<tr>
|
1226 |
<td class="spider_label"><label for="slideshow_cont_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
1227 |
<td>
|
1228 |
-
<input type="text" name="slideshow_cont_bg_color" id="slideshow_cont_bg_color" value="<?php echo $row->slideshow_cont_bg_color; ?>" class="
|
1229 |
</td>
|
1230 |
</tr>
|
1231 |
<tr>
|
@@ -1243,7 +1247,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1243 |
<tr>
|
1244 |
<td class="spider_label"><label for="slideshow_rl_btn_color"><?php echo __('Buttons color:', BWG()->prefix); ?> </label></td>
|
1245 |
<td>
|
1246 |
-
<input type="text" name="slideshow_rl_btn_color" id="slideshow_rl_btn_color" value="<?php echo $row->slideshow_rl_btn_color; ?>" class="
|
1247 |
</td>
|
1248 |
</tr>
|
1249 |
<tr>
|
@@ -1256,7 +1260,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1256 |
<tr>
|
1257 |
<td class="spider_label"><label for="slideshow_close_rl_btn_hover_color"><?php echo __('Buttons hover color:', BWG()->prefix); ?> </label></td>
|
1258 |
<td>
|
1259 |
-
<input type="text" name="slideshow_close_rl_btn_hover_color" id="slideshow_close_rl_btn_hover_color" value="<?php echo $row->slideshow_close_rl_btn_hover_color; ?>" class="
|
1260 |
</td>
|
1261 |
</tr>
|
1262 |
<tr>
|
@@ -1274,7 +1278,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1274 |
<tr>
|
1275 |
<td class="spider_label"><label for="slideshow_rl_btn_bg_color"><?php echo __('Right, left buttons background color:', BWG()->prefix); ?> </label></td>
|
1276 |
<td>
|
1277 |
-
<input type="text" name="slideshow_rl_btn_bg_color" id="slideshow_rl_btn_bg_color" value="<?php echo $row->slideshow_rl_btn_bg_color; ?>" class="
|
1278 |
</td>
|
1279 |
</tr>
|
1280 |
<tr>
|
@@ -1300,7 +1304,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1300 |
<tr>
|
1301 |
<td class="spider_label"><label for="slideshow_rl_btn_border_color"><?php echo __('Right, left buttons border color:', BWG()->prefix); ?> </label></td>
|
1302 |
<td>
|
1303 |
-
<input type="text" name="slideshow_rl_btn_border_color" id="slideshow_rl_btn_border_color" value="<?php echo $row->slideshow_rl_btn_border_color; ?>" class="
|
1304 |
</td>
|
1305 |
</tr>
|
1306 |
<tr>
|
@@ -1383,7 +1387,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1383 |
<tr>
|
1384 |
<td class="spider_label"><label for="slideshow_filmstrip_thumb_border_color"><?php echo __('Filmstrip border color:', BWG()->prefix); ?> </label></td>
|
1385 |
<td>
|
1386 |
-
<input type="text" name="slideshow_filmstrip_thumb_border_color" id="slideshow_filmstrip_thumb_border_color" value="<?php echo $row->slideshow_filmstrip_thumb_border_color; ?>" class="
|
1387 |
</td>
|
1388 |
</tr>
|
1389 |
<tr>
|
@@ -1402,7 +1406,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1402 |
<tr>
|
1403 |
<td class="spider_label"><label for="slideshow_filmstrip_thumb_active_border_color"><?php echo __('Filmstrip active border color:', BWG()->prefix); ?> </label></td>
|
1404 |
<td>
|
1405 |
-
<input type="text" name="slideshow_filmstrip_thumb_active_border_color" id="slideshow_filmstrip_thumb_active_border_color" value="<?php echo $row->slideshow_filmstrip_thumb_active_border_color; ?>" class="
|
1406 |
</td>
|
1407 |
</tr>
|
1408 |
<tr id="tr_appWidth">
|
@@ -1415,13 +1419,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1415 |
<tr>
|
1416 |
<td class="spider_label"><label for="slideshow_filmstrip_rl_bg_color"><?php echo __('Filmstrip right, left buttons background color: ', BWG()->prefix); ?></label></td>
|
1417 |
<td>
|
1418 |
-
<input type="text" name="slideshow_filmstrip_rl_bg_color" id="slideshow_filmstrip_rl_bg_color" value="<?php echo $row->slideshow_filmstrip_rl_bg_color; ?>" class="
|
1419 |
</td>
|
1420 |
</tr>
|
1421 |
<tr>
|
1422 |
<td class="spider_label"><label for="slideshow_filmstrip_rl_btn_color"><?php echo __('Filmstrip right, left buttons color:', BWG()->prefix); ?> </label></td>
|
1423 |
<td>
|
1424 |
-
<input type="text" name="slideshow_filmstrip_rl_btn_color" id="slideshow_filmstrip_rl_btn_color" value="<?php echo $row->slideshow_filmstrip_rl_btn_color; ?>" class="
|
1425 |
</td>
|
1426 |
</tr>
|
1427 |
<tr>
|
@@ -1452,7 +1456,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1452 |
<tr>
|
1453 |
<td class="spider_label"><label for="slideshow_dots_background_color"><?php echo __('Slider bullet background color:', BWG()->prefix); ?> </label></td>
|
1454 |
<td>
|
1455 |
-
<input type="text" name="slideshow_dots_background_color" id="slideshow_dots_background_color" value="<?php echo $row->slideshow_dots_background_color; ?>" class="
|
1456 |
</td>
|
1457 |
</tr>
|
1458 |
<tr>
|
@@ -1464,7 +1468,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1464 |
<tr>
|
1465 |
<td class="spider_label"><label for="slideshow_dots_active_background_color"><?php echo __('Slider bullet active background color: ', BWG()->prefix); ?></label></td>
|
1466 |
<td>
|
1467 |
-
<input type="text" name="slideshow_dots_active_background_color" id="slideshow_dots_active_background_color" value="<?php echo $row->slideshow_dots_active_background_color; ?>" class="
|
1468 |
</td>
|
1469 |
</tr>
|
1470 |
<tr>
|
@@ -1476,7 +1480,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1476 |
<tr>
|
1477 |
<td class="spider_label"><label for="slideshow_dots_active_border_color"><?php echo __('Slider bullet active border color: ', BWG()->prefix); ?></label></td>
|
1478 |
<td>
|
1479 |
-
<input type="text" name="slideshow_dots_active_border_color" id="slideshow_dots_active_border_color" value="<?php echo $row->slideshow_dots_active_border_color; ?>" class="
|
1480 |
</td>
|
1481 |
</tr>
|
1482 |
</tbody>
|
@@ -1492,7 +1496,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1492 |
<tr>
|
1493 |
<td class="spider_label"><label for="slideshow_title_background_color"><?php echo __('Title background color: ', BWG()->prefix); ?></label></td>
|
1494 |
<td>
|
1495 |
-
<input type="text" name="slideshow_title_background_color" id="slideshow_title_background_color" value="<?php echo $row->slideshow_title_background_color; ?>" class="
|
1496 |
</td>
|
1497 |
</tr>
|
1498 |
<tr>
|
@@ -1525,7 +1529,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1525 |
<tr>
|
1526 |
<td class="spider_label"><label for="slideshow_title_color"><?php echo __('Title color: ', BWG()->prefix); ?></label></td>
|
1527 |
<td>
|
1528 |
-
<input type="text" name="slideshow_title_color" id="slideshow_title_color" value="<?php echo $row->slideshow_title_color; ?>" class="
|
1529 |
</td>
|
1530 |
</tr>
|
1531 |
<tr>
|
@@ -1535,7 +1539,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1535 |
<tr>
|
1536 |
<td class="spider_label"><label for="slideshow_description_background_color"><?php echo __('Description background color:', BWG()->prefix); ?> </label></td>
|
1537 |
<td>
|
1538 |
-
<input type="text" name="slideshow_description_background_color" id="slideshow_description_background_color" value="<?php echo $row->slideshow_description_background_color; ?>" class="
|
1539 |
</td>
|
1540 |
</tr>
|
1541 |
<tr>
|
@@ -1568,7 +1572,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1568 |
<tr>
|
1569 |
<td class="spider_label"><label for="slideshow_description_color"><?php echo __('Description color:', BWG()->prefix); ?> </label></td>
|
1570 |
<td>
|
1571 |
-
<input type="text" name="slideshow_description_color" id="slideshow_description_color" value="<?php echo $row->slideshow_description_color; ?>" class="
|
1572 |
</td>
|
1573 |
</tr>
|
1574 |
<tr>
|
@@ -1599,7 +1603,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1599 |
<tr>
|
1600 |
<td class="spider_label"><label for="image_browser_full_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
1601 |
<td>
|
1602 |
-
<input type="text" name="image_browser_full_bg_color" id="image_browser_full_bg_color" value="<?php echo $row->image_browser_full_bg_color; ?>" class="
|
1603 |
</td>
|
1604 |
</tr>
|
1605 |
<tr>
|
@@ -1639,7 +1643,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1639 |
<tr>
|
1640 |
<td class="spider_label"><label for="image_browser_full_border_color"><?php echo __('Full border color:', BWG()->prefix); ?> </label></td>
|
1641 |
<td>
|
1642 |
-
<input type="text" name="image_browser_full_border_color" id="image_browser_full_border_color" value="<?php echo $row->image_browser_full_border_color; ?>" class="
|
1643 |
</td>
|
1644 |
</tr>
|
1645 |
</tbody>
|
@@ -1703,7 +1707,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1703 |
<tr>
|
1704 |
<td class="spider_label"><label for="image_browser_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
1705 |
<td>
|
1706 |
-
<input type="text" name="image_browser_border_color" id="image_browser_border_color" value="<?php echo $row->image_browser_border_color; ?>" class="
|
1707 |
</td>
|
1708 |
</tr>
|
1709 |
<tr>
|
@@ -1716,7 +1720,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1716 |
<tr>
|
1717 |
<td class="spider_label"><label for="image_browser_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
1718 |
<td>
|
1719 |
-
<input type="text" name="image_browser_bg_color" id="image_browser_bg_color" value="<?php echo $row->image_browser_bg_color; ?>" class="
|
1720 |
</td>
|
1721 |
</tr>
|
1722 |
<tr>
|
@@ -1775,7 +1779,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1775 |
<tr>
|
1776 |
<td class="spider_label"><label for="image_browser_img_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
1777 |
<td>
|
1778 |
-
<input type="text" name="image_browser_img_font_color" id="image_browser_img_font_color" value="<?php echo $row->image_browser_img_font_color; ?>" class="
|
1779 |
</td>
|
1780 |
</tr>
|
1781 |
<tr>
|
@@ -1819,7 +1823,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1819 |
<tr>
|
1820 |
<td class="spider_label"><label for="image_browser_image_description_border_color"><?php echo __('Description border color:', BWG()->prefix); ?> </label></td>
|
1821 |
<td>
|
1822 |
-
<input type="text" name="image_browser_image_description_border_color" id="image_browser_image_description_border_color" value="<?php echo $row->image_browser_image_description_border_color; ?>" class="
|
1823 |
</td>
|
1824 |
</tr>
|
1825 |
<tr>
|
@@ -1832,7 +1836,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1832 |
<tr>
|
1833 |
<td class="spider_label"><label for="image_browser_image_description_bg_color"><?php echo __('Description background color:', BWG()->prefix); ?> </label></td>
|
1834 |
<td>
|
1835 |
-
<input type="text" name="image_browser_image_description_bg_color" id="image_browser_image_description_bg_color" value="<?php echo $row->image_browser_image_description_bg_color; ?>" class="
|
1836 |
</td>
|
1837 |
</tr>
|
1838 |
<tr>
|
@@ -1845,7 +1849,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1845 |
<tr>
|
1846 |
<td class="spider_label"><label for="image_browser_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
1847 |
<td>
|
1848 |
-
<input type="text" name="image_browser_gal_title_font_color" id="image_browser_gal_title_font_color" value="<?php echo $row->image_browser_gal_title_font_color; ?>" class="
|
1849 |
</td>
|
1850 |
</tr>
|
1851 |
<tr>
|
@@ -1954,7 +1958,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
1954 |
<tr>
|
1955 |
<td class="spider_label"><label for="album_compact_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
1956 |
<td>
|
1957 |
-
<input type="text" name="album_compact_thumb_border_color" id="album_compact_thumb_border_color" value="<?php echo $row->album_compact_thumb_border_color; ?>" class="
|
1958 |
</td>
|
1959 |
</tr>
|
1960 |
<tr>
|
@@ -2014,7 +2018,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2014 |
<tr>
|
2015 |
<td class="spider_label"><label for="album_compact_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label></td>
|
2016 |
<td>
|
2017 |
-
<input type="text" name="album_compact_thumb_bg_color" id="album_compact_thumb_bg_color" value="<?php echo $row->album_compact_thumb_bg_color; ?>" class="
|
2018 |
</td>
|
2019 |
</tr>
|
2020 |
<tr>
|
@@ -2034,7 +2038,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2034 |
<tr>
|
2035 |
<td class="spider_label"><label for="album_compact_thumbs_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
2036 |
<td>
|
2037 |
-
<input type="text" name="album_compact_thumbs_bg_color" id="album_compact_thumbs_bg_color" value="<?php echo $row->album_compact_thumbs_bg_color; ?>" class="
|
2038 |
</td>
|
2039 |
</tr>
|
2040 |
<tr>
|
@@ -2086,13 +2090,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2086 |
<tr>
|
2087 |
<td class="spider_label"><label for="album_compact_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
2088 |
<td>
|
2089 |
-
<input type="text" name="album_compact_title_font_color" id="album_compact_title_font_color" value="<?php echo $row->album_compact_title_font_color; ?>" class="
|
2090 |
</td>
|
2091 |
</tr>
|
2092 |
<tr>
|
2093 |
<td class="spider_label"><label for="album_compact_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
2094 |
<td>
|
2095 |
-
<input type="text" name="album_compact_title_font_color_hover" id="album_compact_title_font_color_hover" value="<?php echo $row->album_compact_title_font_color_hover; ?>" class="
|
2096 |
</td>
|
2097 |
</tr>
|
2098 |
<tr>
|
@@ -2136,7 +2140,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2136 |
<tr>
|
2137 |
<td class="spider_label"><label for="album_compact_back_font_color"><?php echo __('Back Font color:', BWG()->prefix); ?> </label></td>
|
2138 |
<td>
|
2139 |
-
<input type="text" name="album_compact_back_font_color" id="album_compact_back_font_color" value="<?php echo $row->album_compact_back_font_color; ?>" class="
|
2140 |
</td>
|
2141 |
</tr>
|
2142 |
<tr>
|
@@ -2173,7 +2177,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2173 |
<tr>
|
2174 |
<td class="spider_label"><label for="album_compact_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
2175 |
<td>
|
2176 |
-
<input type="text" name="album_compact_gal_title_font_color" id="album_compact_gal_title_font_color" value="<?php echo $row->album_compact_gal_title_font_color; ?>" class="
|
2177 |
</td>
|
2178 |
</tr>
|
2179 |
<tr>
|
@@ -2271,7 +2275,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2271 |
<tr>
|
2272 |
<td class="spider_label"><label for="album_extended_thumb_border_color"><?php echo __('Thumbnail border color:', BWG()->prefix); ?> </label></td>
|
2273 |
<td>
|
2274 |
-
<input type="text" name="album_extended_thumb_border_color" id="album_extended_thumb_border_color" value="<?php echo $row->album_extended_thumb_border_color; ?>" class="
|
2275 |
</td>
|
2276 |
</tr>
|
2277 |
<tr>
|
@@ -2342,13 +2346,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2342 |
<tr>
|
2343 |
<td class="spider_label"><label for="album_extended_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label></td>
|
2344 |
<td>
|
2345 |
-
<input type="text" name="album_extended_thumb_bg_color" id="album_extended_thumb_bg_color" value="<?php echo $row->album_extended_thumb_bg_color; ?>" class="
|
2346 |
</td>
|
2347 |
</tr>
|
2348 |
<tr>
|
2349 |
<td class="spider_label"><label for="album_extended_thumbs_bg_color"><?php echo __('Thumbnails background color:', BWG()->prefix); ?> </label></td>
|
2350 |
<td>
|
2351 |
-
<input type="text" name="album_extended_thumbs_bg_color" id="album_extended_thumbs_bg_color" value="<?php echo $row->album_extended_thumbs_bg_color; ?>" class="
|
2352 |
</td>
|
2353 |
</tr>
|
2354 |
<tr>
|
@@ -2379,7 +2383,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2379 |
<tr>
|
2380 |
<td class="spider_label"><label for="album_extended_thumb_div_bg_color"><?php echo __('Thumbnail div background color:', BWG()->prefix); ?> </label></td>
|
2381 |
<td>
|
2382 |
-
<input type="text" name="album_extended_thumb_div_bg_color" id="album_extended_thumb_div_bg_color" value="<?php echo $row->album_extended_thumb_div_bg_color; ?>" class="
|
2383 |
</td>
|
2384 |
</tr>
|
2385 |
<tr>
|
@@ -2406,7 +2410,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2406 |
<tr>
|
2407 |
<td class="spider_label"><label for="album_extended_thumb_div_border_color"><?php echo __('Thumbnail div border color:', BWG()->prefix); ?> </label></td>
|
2408 |
<td>
|
2409 |
-
<input type="text" name="album_extended_thumb_div_border_color" id="album_extended_thumb_div_border_color" value="<?php echo $row->album_extended_thumb_div_border_color; ?>" class="
|
2410 |
</td>
|
2411 |
</tr>
|
2412 |
<tr>
|
@@ -2432,7 +2436,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2432 |
<tr>
|
2433 |
<td class="spider_label"><label for="album_extended_div_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
2434 |
<td>
|
2435 |
-
<input type="text" name="album_extended_div_bg_color" id="album_extended_div_bg_color" value="<?php echo $row->album_extended_div_bg_color; ?>" class="
|
2436 |
</td>
|
2437 |
</tr>
|
2438 |
<tr>
|
@@ -2472,7 +2476,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2472 |
<tr>
|
2473 |
<td class="spider_label"><label for="album_extended_div_separator_color"><?php echo __('Separator color:', BWG()->prefix); ?> </label></td>
|
2474 |
<td>
|
2475 |
-
<input type="text" name="album_extended_div_separator_color" id="album_extended_div_separator_color" value="<?php echo $row->album_extended_div_separator_color; ?>" class="
|
2476 |
</td>
|
2477 |
</tr>
|
2478 |
<tr>
|
@@ -2491,7 +2495,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2491 |
<tr>
|
2492 |
<td class="spider_label"><label for="album_extended_back_font_color"><?php echo __('Back font color:', BWG()->prefix); ?> </label></td>
|
2493 |
<td>
|
2494 |
-
<input type="text" name="album_extended_back_font_color" id="album_extended_back_font_color" value="<?php echo $row->album_extended_back_font_color; ?>" class="
|
2495 |
</td>
|
2496 |
</tr>
|
2497 |
<tr>
|
@@ -2566,7 +2570,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2566 |
<tr>
|
2567 |
<td class="spider_label"><label for="album_extended_text_div_border_color"><?php echo __('Text border color:', BWG()->prefix); ?> </label></td>
|
2568 |
<td>
|
2569 |
-
<input type="text" name="album_extended_text_div_border_color" id="album_extended_text_div_border_color" value="<?php echo $row->album_extended_text_div_border_color; ?>" class="
|
2570 |
</td>
|
2571 |
</tr>
|
2572 |
<tr>
|
@@ -2579,7 +2583,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2579 |
<tr>
|
2580 |
<td class="spider_label"><label for="album_extended_text_div_bg_color"><?php echo __('Text background color:', BWG()->prefix); ?> </label></td>
|
2581 |
<td>
|
2582 |
-
<input type="text" name="album_extended_text_div_bg_color" id="album_extended_text_div_bg_color" value="<?php echo $row->album_extended_text_div_bg_color; ?>" class="
|
2583 |
</td>
|
2584 |
</tr>
|
2585 |
<tr>
|
@@ -2618,7 +2622,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2618 |
<tr>
|
2619 |
<td class="spider_label"><label for="album_extended_title_span_border_color"><?php echo __('Title border color:', BWG()->prefix); ?> </label></td>
|
2620 |
<td>
|
2621 |
-
<input type="text" name="album_extended_title_span_border_color" id="album_extended_title_span_border_color" value="<?php echo $row->album_extended_title_span_border_color; ?>" class="
|
2622 |
</td>
|
2623 |
</tr>
|
2624 |
<tr>
|
@@ -2630,7 +2634,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2630 |
<tr>
|
2631 |
<td class="spider_label"><label for="album_extended_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
2632 |
<td>
|
2633 |
-
<input type="text" name="album_extended_title_font_color" id="album_extended_title_font_color" value="<?php echo $row->album_extended_title_font_color; ?>" class="
|
2634 |
</td>
|
2635 |
</tr>
|
2636 |
<tr>
|
@@ -2681,7 +2685,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2681 |
<tr>
|
2682 |
<td class="spider_label"><label for="album_extended_desc_span_border_color"><?php echo __('Description border color:', BWG()->prefix); ?> </label></td>
|
2683 |
<td>
|
2684 |
-
<input type="text" name="album_extended_desc_span_border_color" id="album_extended_desc_span_border_color" value="<?php echo $row->album_extended_desc_span_border_color; ?>" class="
|
2685 |
</td>
|
2686 |
</tr>
|
2687 |
<tr>
|
@@ -2693,7 +2697,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2693 |
<tr>
|
2694 |
<td class="spider_label"><label for="album_extended_desc_font_color"><?php echo __('Description font color:', BWG()->prefix); ?> </label></td>
|
2695 |
<td>
|
2696 |
-
<input type="text" name="album_extended_desc_font_color" id="album_extended_desc_font_color" value="<?php echo $row->album_extended_desc_font_color; ?>" class="
|
2697 |
</td>
|
2698 |
</tr>
|
2699 |
<tr>
|
@@ -2723,7 +2727,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2723 |
<tr>
|
2724 |
<td class="spider_label"><label for="album_extended_desc_more_color"><?php echo __('Description more color:', BWG()->prefix); ?> </label></td>
|
2725 |
<td>
|
2726 |
-
<input type="text" name="album_extended_desc_more_color" id="album_extended_desc_more_color" value="<?php echo $row->album_extended_desc_more_color; ?>" class="
|
2727 |
</td>
|
2728 |
</tr>
|
2729 |
<tr>
|
@@ -2735,7 +2739,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2735 |
<tr>
|
2736 |
<td class="spider_label"><label for="album_extended_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
2737 |
<td>
|
2738 |
-
<input type="text" name="album_extended_gal_title_font_color" id="album_extended_gal_title_font_color" value="<?php echo $row->album_extended_gal_title_font_color; ?>" class="
|
2739 |
</td>
|
2740 |
</tr>
|
2741 |
<tr>
|
@@ -2838,7 +2842,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2838 |
<tr>
|
2839 |
<td class="spider_label"><label for="album_masonry_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
2840 |
<td>
|
2841 |
-
<input type="text" name="album_masonry_thumb_border_color" id="album_masonry_thumb_border_color" value="<?php echo $row->album_masonry_thumb_border_color; ?>" class="
|
2842 |
</td>
|
2843 |
</tr>
|
2844 |
<tr>
|
@@ -2893,7 +2897,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2893 |
<label for="album_masonry_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label>
|
2894 |
</td>
|
2895 |
<td>
|
2896 |
-
<input type="text" name="album_masonry_thumb_bg_color" id="album_masonry_thumb_bg_color" value="<?php echo $row->album_masonry_thumb_bg_color; ?>" class="
|
2897 |
</td>
|
2898 |
</tr>
|
2899 |
<tr>
|
@@ -2906,7 +2910,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2906 |
<tr>
|
2907 |
<td class="spider_label"><label for="album_masonry_thumbs_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
2908 |
<td>
|
2909 |
-
<input type="text" name="album_masonry_thumbs_bg_color" id="album_masonry_thumbs_bg_color" value="<?php echo $row->album_masonry_thumbs_bg_color; ?>" class="
|
2910 |
</td>
|
2911 |
</tr>
|
2912 |
<tr>
|
@@ -2949,13 +2953,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2949 |
<tr>
|
2950 |
<td class="spider_label"><label for="album_masonry_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
2951 |
<td>
|
2952 |
-
<input type="text" name="album_masonry_title_font_color" id="album_masonry_title_font_color" value="<?php echo $row->album_masonry_title_font_color; ?>" class="
|
2953 |
</td>
|
2954 |
</tr>
|
2955 |
<tr>
|
2956 |
<td class="spider_label"><label for="album_masonry_thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
2957 |
<td>
|
2958 |
-
<input type="text" name="album_masonry_thumb_title_font_color_hover" id="album_masonry_thumb_title_font_color_hover" value="<?php echo $row->album_masonry_thumb_title_font_color_hover; ?>" class="
|
2959 |
</td>
|
2960 |
</tr>
|
2961 |
<tr>
|
@@ -2992,7 +2996,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
2992 |
<tr>
|
2993 |
<td class="spider_label"><label for="album_masonry_back_font_color"><?php echo __('Back Font color:', BWG()->prefix); ?> </label></td>
|
2994 |
<td>
|
2995 |
-
<input type="text" name="album_masonry_back_font_color" id="album_masonry_back_font_color" value="<?php echo $row->album_masonry_back_font_color; ?>" class="
|
2996 |
</td>
|
2997 |
</tr>
|
2998 |
<tr>
|
@@ -3029,7 +3033,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3029 |
<tr>
|
3030 |
<td class="spider_label"><label for="album_masonry_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
3031 |
<td>
|
3032 |
-
<input type="text" name="album_masonry_gal_title_font_color" id="album_masonry_gal_title_font_color" value="<?php echo $row->album_masonry_gal_title_font_color; ?>" class="
|
3033 |
</td>
|
3034 |
</tr>
|
3035 |
<tr>
|
@@ -3095,7 +3099,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3095 |
<tr>
|
3096 |
<td class="spider_label"><label for="blog_style_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
3097 |
<td>
|
3098 |
-
<input type="text" name="blog_style_bg_color" id="blog_style_bg_color" value="<?php echo $row->blog_style_bg_color; ?>" class="
|
3099 |
</td>
|
3100 |
</tr>
|
3101 |
<tr>
|
@@ -3163,7 +3167,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3163 |
<tr>
|
3164 |
<td class="spider_label"><label for="blog_style_img_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
3165 |
<td>
|
3166 |
-
<input type="text" name="blog_style_img_font_color" id="blog_style_img_font_color" value="<?php echo $row->blog_style_img_font_color; ?>" class="
|
3167 |
</td>
|
3168 |
</tr>
|
3169 |
<tr>
|
@@ -3189,7 +3193,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3189 |
<tr>
|
3190 |
<td class="spider_label"><label for="blog_style_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
3191 |
<td>
|
3192 |
-
<input type="text" name="blog_style_border_color" id="blog_style_border_color" value="<?php echo $row->blog_style_border_color; ?>" class="
|
3193 |
</td>
|
3194 |
</tr>
|
3195 |
<tr>
|
@@ -3225,7 +3229,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3225 |
<tr>
|
3226 |
<td class="spider_label"><label for="blog_style_share_buttons_color"><?php echo __('Buttons color:', BWG()->prefix); ?> </label></td>
|
3227 |
<td>
|
3228 |
-
<input type="text" name="blog_style_share_buttons_color" id="blog_style_share_buttons_color" value="<?php echo $row->blog_style_share_buttons_color; ?>" class="
|
3229 |
</td>
|
3230 |
</tr>
|
3231 |
<tr>
|
@@ -3251,7 +3255,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3251 |
<tr>
|
3252 |
<td class="spider_label"><label for="blog_style_share_buttons_border_color"><?php echo __('Buttons and title border color:', BWG()->prefix); ?> </label></td>
|
3253 |
<td>
|
3254 |
-
<input type="text" name="blog_style_share_buttons_border_color" id="blog_style_share_buttons_border_color" value="<?php echo $row->blog_style_share_buttons_border_color; ?>" class="
|
3255 |
</td>
|
3256 |
</tr>
|
3257 |
<tr>
|
@@ -3264,7 +3268,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3264 |
<tr>
|
3265 |
<td class="spider_label"><label for="blog_style_share_buttons_bg_color"><?php echo __('Buttons and title background color:', BWG()->prefix); ?> </label></td>
|
3266 |
<td>
|
3267 |
-
<input type="text" name="blog_style_share_buttons_bg_color" id="blog_style_share_buttons_bg_color" value="<?php echo $row->blog_style_share_buttons_bg_color; ?>" class="
|
3268 |
</td>
|
3269 |
</tr>
|
3270 |
<tr>
|
@@ -3298,7 +3302,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3298 |
<tr>
|
3299 |
<td class="spider_label"><label for="blog_style_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
3300 |
<td>
|
3301 |
-
<input type="text" name="blog_style_gal_title_font_color" id="blog_style_gal_title_font_color" value="<?php echo $row->blog_style_gal_title_font_color; ?>" class="
|
3302 |
</td>
|
3303 |
</tr>
|
3304 |
<tr>
|
@@ -3364,7 +3368,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3364 |
<tr id="lightbox_overlay_bg">
|
3365 |
<td class="spider_label"><label for="lightbox_overlay_bg_color"><?php echo __('Overlay background color:', BWG()->prefix); ?> </label></td>
|
3366 |
<td>
|
3367 |
-
<input type="text" name="lightbox_overlay_bg_color" id="lightbox_overlay_bg_color" value="<?php echo $row->lightbox_overlay_bg_color; ?>" class="
|
3368 |
</td>
|
3369 |
</tr>
|
3370 |
<tr id="lightbox_overlay">
|
@@ -3377,7 +3381,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3377 |
<tr id="lightbox_bg">
|
3378 |
<td class="spider_label"><label for="lightbox_bg_color"><?php echo __('Lightbox background color:', BWG()->prefix); ?> </label></td>
|
3379 |
<td>
|
3380 |
-
<input type="text" name="lightbox_bg_color" id="lightbox_bg_color" value="<?php echo $row->lightbox_bg_color; ?>" class="
|
3381 |
</td>
|
3382 |
</tr>
|
3383 |
<tr id="lightbox_transparency">
|
@@ -3417,7 +3421,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3417 |
<tr id="lightbox_cntrl8">
|
3418 |
<td class="spider_label"><label for="lightbox_ctrl_cont_bg_color"><?php echo __('Control buttons background color:', BWG()->prefix); ?> </label></td>
|
3419 |
<td>
|
3420 |
-
<input type="text" name="lightbox_ctrl_cont_bg_color" id="lightbox_ctrl_cont_bg_color" value="<?php echo $row->lightbox_ctrl_cont_bg_color; ?>" class="
|
3421 |
</td>
|
3422 |
</tr>
|
3423 |
<tr id="lightbox_cntrl5">
|
@@ -3451,7 +3455,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3451 |
<tr id="lightbox_cntrl7">
|
3452 |
<td class="spider_label"><label for="lightbox_ctrl_btn_color"><?php echo __('Control buttons color:', BWG()->prefix); ?> </label></td>
|
3453 |
<td>
|
3454 |
-
<input type="text" name="lightbox_ctrl_btn_color" id="lightbox_ctrl_btn_color" value="<?php echo $row->lightbox_ctrl_btn_color; ?>" class="
|
3455 |
</td>
|
3456 |
</tr>
|
3457 |
<tr id="lightbox_cntrl4">
|
@@ -3504,7 +3508,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3504 |
<tr id="lightbox_close13">
|
3505 |
<td class="spider_label"><label for="lightbox_close_btn_border_color"><?php echo __('Close button border color:', BWG()->prefix); ?> </label></td>
|
3506 |
<td>
|
3507 |
-
<input type="text" name="lightbox_close_btn_border_color" id="lightbox_close_btn_border_color" value="<?php echo $row->lightbox_close_btn_border_color; ?>" class="
|
3508 |
</td>
|
3509 |
</tr>
|
3510 |
<tr id="lightbox_close3">
|
@@ -3517,7 +3521,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3517 |
<tr id="lightbox_close11">
|
3518 |
<td class="spider_label"><label for="lightbox_close_btn_bg_color"><?php echo __('Close button background color:', BWG()->prefix); ?> </label></td>
|
3519 |
<td>
|
3520 |
-
<input type="text" name="lightbox_close_btn_bg_color" id="lightbox_close_btn_bg_color" value="<?php echo $row->lightbox_close_btn_bg_color; ?>" class="
|
3521 |
<div class="spider_description"><?php echo __('The option does not apply to Full-width lightbox.', BWG()->prefix); ?></div>
|
3522 |
</td>
|
3523 |
</tr>
|
@@ -3564,19 +3568,19 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3564 |
<tr id="lightbox_close14">
|
3565 |
<td class="spider_label"><label for="lightbox_close_btn_color"><?php echo __('Close button color:', BWG()->prefix); ?> </label></td>
|
3566 |
<td>
|
3567 |
-
<input type="text" name="lightbox_close_btn_color" id="lightbox_close_btn_color" value="<?php echo $row->lightbox_close_btn_color; ?>" class="
|
3568 |
</td>
|
3569 |
</tr>
|
3570 |
<tr id="lightbox_close10">
|
3571 |
<td class="spider_label"><label for="lightbox_close_btn_full_color"><?php echo __('Fullscreen close button color:', BWG()->prefix); ?> </label></td>
|
3572 |
<td>
|
3573 |
-
<input type="text" name="lightbox_close_btn_full_color" id="lightbox_close_btn_full_color" value="<?php echo $row->lightbox_close_btn_full_color; ?>" class="
|
3574 |
</td>
|
3575 |
</tr>
|
3576 |
<tr id="lightbox_comment24">
|
3577 |
<td class="spider_label"><label for="lightbox_comment_share_button_color"><?php echo __('Share buttons color:', BWG()->prefix); ?> </label></td>
|
3578 |
<td>
|
3579 |
-
<input type="text" name="lightbox_comment_share_button_color" id="lightbox_comment_share_button_color" value="<?php echo $row->lightbox_comment_share_button_color; ?>" class="
|
3580 |
</td>
|
3581 |
</tr>
|
3582 |
</tbody>
|
@@ -3606,7 +3610,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3606 |
<tr id="lightbox_right_left7">
|
3607 |
<td class="spider_label"><label for="lightbox_rl_btn_bg_color"><?php echo __('Right, left buttons background color:', BWG()->prefix); ?> </label></td>
|
3608 |
<td>
|
3609 |
-
<input type="text" name="lightbox_rl_btn_bg_color" id="lightbox_rl_btn_bg_color" value="<?php echo $row->lightbox_rl_btn_bg_color; ?>" class="
|
3610 |
</td>
|
3611 |
</tr>
|
3612 |
<tr>
|
@@ -3643,13 +3647,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3643 |
<tr id="lightbox_close15">
|
3644 |
<td class="spider_label"><label for="lightbox_close_rl_btn_hover_color"><?php echo __('Right, left, close buttons hover color:', BWG()->prefix); ?> </label></td>
|
3645 |
<td>
|
3646 |
-
<input type="text" name="lightbox_close_rl_btn_hover_color" id="lightbox_close_rl_btn_hover_color" value="<?php echo $row->lightbox_close_rl_btn_hover_color; ?>" class="
|
3647 |
</td>
|
3648 |
</tr>
|
3649 |
<tr id="lightbox_right_left10">
|
3650 |
<td class="spider_label"><label for="lightbox_rl_btn_color"><?php echo __('Right, left buttons color:', BWG()->prefix); ?> </label></td>
|
3651 |
<td>
|
3652 |
-
<input type="text" name="lightbox_rl_btn_color" id="lightbox_rl_btn_color" value="<?php echo $row->lightbox_rl_btn_color; ?>" class="
|
3653 |
</td>
|
3654 |
</tr>
|
3655 |
<tr id="lightbox_right_left1">
|
@@ -3682,7 +3686,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3682 |
<tr id="lightbox_right_left9">
|
3683 |
<td class="spider_label"><label for="lightbox_rl_btn_border_color"><?php echo __('Right, left buttons border color:', BWG()->prefix); ?> </label></td>
|
3684 |
<td>
|
3685 |
-
<input type="text" name="lightbox_rl_btn_border_color" id="lightbox_rl_btn_border_color" value="<?php echo $row->lightbox_rl_btn_border_color; ?>" class="
|
3686 |
</td>
|
3687 |
</tr>
|
3688 |
<tr id="lightbox_filmstrip12">
|
@@ -3726,7 +3730,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3726 |
<tr id="lightbox_filmstrip10">
|
3727 |
<td class="spider_label"><label for="lightbox_filmstrip_thumb_border_color"><?php echo __('Filmstrip thumbnail border color:', BWG()->prefix); ?> </label></td>
|
3728 |
<td>
|
3729 |
-
<input type="text" name="lightbox_filmstrip_thumb_border_color" id="lightbox_filmstrip_thumb_border_color" value="<?php echo $row->lightbox_filmstrip_thumb_border_color; ?>" class="
|
3730 |
</td>
|
3731 |
</tr>
|
3732 |
<tr id="lightbox_filmstrip4">
|
@@ -3745,7 +3749,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3745 |
<tr id="lightbox_filmstrip11">
|
3746 |
<td class="spider_label"> <label for="lightbox_filmstrip_thumb_active_border_color"><?php echo __('Filmstrip thumbnail active border color:', BWG()->prefix); ?></label></td>
|
3747 |
<td>
|
3748 |
-
<input type="text" name="lightbox_filmstrip_thumb_active_border_color" id="lightbox_filmstrip_thumb_active_border_color" value="<?php echo $row->lightbox_filmstrip_thumb_active_border_color; ?>" class="
|
3749 |
</td>
|
3750 |
</tr>
|
3751 |
<tr id="lightbox_filmstrip5">
|
@@ -3764,13 +3768,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3764 |
<tr id="lightbox_filmstrip7">
|
3765 |
<td class="spider_label"><label for="lightbox_filmstrip_rl_btn_color"><?php echo __('Filmstrip right, left buttons color:', BWG()->prefix); ?> </label></td>
|
3766 |
<td>
|
3767 |
-
<input type="text" name="lightbox_filmstrip_rl_btn_color" id="lightbox_filmstrip_rl_btn_color" value="<?php echo $row->lightbox_filmstrip_rl_btn_color; ?>" class="
|
3768 |
</td>
|
3769 |
</tr>
|
3770 |
<tr id="lightbox_filmstrip8">
|
3771 |
<td class="spider_label"><label for="lightbox_filmstrip_rl_bg_color"><?php echo __('Filmstrip right, left button background color:', BWG()->prefix); ?></label></td>
|
3772 |
<td>
|
3773 |
-
<input type="text" name="lightbox_filmstrip_rl_bg_color" id="lightbox_filmstrip_rl_bg_color" value="<?php echo $row->lightbox_filmstrip_rl_bg_color; ?>" class="
|
3774 |
</td>
|
3775 |
</tr>
|
3776 |
<tr>
|
@@ -3813,13 +3817,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3813 |
<tr>
|
3814 |
<td class="spider_label"><label for="lightbox_rate_color"><?php echo __('Rating color:', BWG()->prefix); ?> </label></td>
|
3815 |
<td>
|
3816 |
-
<input type="text" name="lightbox_rate_color" id="lightbox_rate_color" value="<?php echo $row->lightbox_rate_color; ?>" class="
|
3817 |
</td>
|
3818 |
</tr>
|
3819 |
<tr>
|
3820 |
<td class="spider_label"><label for="lightbox_rate_hover_color"><?php echo __('Rating hover color:', BWG()->prefix); ?> </label></td>
|
3821 |
<td>
|
3822 |
-
<input type="text" name="lightbox_rate_hover_color" id="lightbox_rate_hover_color" value="<?php echo $row->lightbox_rate_hover_color; ?>" class="
|
3823 |
</td>
|
3824 |
</tr>
|
3825 |
<tr>
|
@@ -3867,7 +3871,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3867 |
<tr>
|
3868 |
<td class="spider_label"><label for="lightbox_hit_bg_color"><?php echo __('Hit counter background color:', BWG()->prefix); ?> </label></td>
|
3869 |
<td>
|
3870 |
-
<input type="text" name="lightbox_hit_bg_color" id="lightbox_hit_bg_color" value="<?php echo $row->lightbox_hit_bg_color; ?>" class="
|
3871 |
</td>
|
3872 |
</tr>
|
3873 |
<tr>
|
@@ -3900,7 +3904,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3900 |
<tr>
|
3901 |
<td class="spider_label"><label for="lightbox_hit_border_color"><?php echo __('Hit counter border color:', BWG()->prefix); ?> </label></td>
|
3902 |
<td>
|
3903 |
-
<input type="text" name="lightbox_hit_border_color" id="lightbox_hit_border_color" value="<?php echo $row->lightbox_hit_border_color; ?>" class="
|
3904 |
</td>
|
3905 |
</tr>
|
3906 |
<tr>
|
@@ -3927,7 +3931,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3927 |
<tr>
|
3928 |
<td class="spider_label"><label for="lightbox_hit_color"><?php echo __('Hit counter font color:', BWG()->prefix); ?> </label></td>
|
3929 |
<td>
|
3930 |
-
<input type="text" name="lightbox_hit_color" id="lightbox_hit_color" value="<?php echo $row->lightbox_hit_color; ?>" class="
|
3931 |
</td>
|
3932 |
</tr>
|
3933 |
<tr>
|
@@ -3991,7 +3995,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
3991 |
<tr>
|
3992 |
<td class="spider_label"><label for="lightbox_info_bg_color"><?php echo __('Info background color:', BWG()->prefix); ?> </label></td>
|
3993 |
<td>
|
3994 |
-
<input type="text" name="lightbox_info_bg_color" id="lightbox_info_bg_color" value="<?php echo $row->lightbox_info_bg_color; ?>" class="
|
3995 |
</td>
|
3996 |
</tr>
|
3997 |
<tr>
|
@@ -4024,7 +4028,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4024 |
<tr>
|
4025 |
<td class="spider_label"><label for="lightbox_info_border_color"><?php echo __('Info border color:', BWG()->prefix); ?> </label></td>
|
4026 |
<td>
|
4027 |
-
<input type="text" name="lightbox_info_border_color" id="lightbox_info_border_color" value="<?php echo $row->lightbox_info_border_color; ?>" class="
|
4028 |
</td>
|
4029 |
</tr>
|
4030 |
<tr>
|
@@ -4051,7 +4055,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4051 |
<tr>
|
4052 |
<td class="spider_label"><label for="lightbox_title_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
4053 |
<td>
|
4054 |
-
<input type="text" name="lightbox_title_color" id="lightbox_title_color" value="<?php echo $row->lightbox_title_color; ?>" class="
|
4055 |
</td>
|
4056 |
</tr>
|
4057 |
<tr>
|
@@ -4082,7 +4086,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4082 |
<tr>
|
4083 |
<td class="spider_label"><label for="lightbox_description_color"><?php echo __('Description font color:', BWG()->prefix); ?> </label></td>
|
4084 |
<td>
|
4085 |
-
<input type="text" name="lightbox_description_color" id="lightbox_description_color" value="<?php echo $row->lightbox_description_color; ?>" class="
|
4086 |
</td>
|
4087 |
</tr>
|
4088 |
<tr>
|
@@ -4128,7 +4132,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4128 |
<tr id="lightbox_comment13">
|
4129 |
<td class="spider_label"><label for="lightbox_comment_bg_color"><?php echo __('Comments background color:', BWG()->prefix); ?> </label></td>
|
4130 |
<td>
|
4131 |
-
<input type="text" name="lightbox_comment_bg_color" id="lightbox_comment_bg_color" value="<?php echo $row->lightbox_comment_bg_color; ?>" class="
|
4132 |
</td>
|
4133 |
</tr>
|
4134 |
<tr id="lightbox_comment2">
|
@@ -4140,7 +4144,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4140 |
<tr id="lightbox_comment14">
|
4141 |
<td class="spider_label"><label for="lightbox_comment_font_color"><?php echo __('Comments font color:', BWG()->prefix); ?></label></td>
|
4142 |
<td>
|
4143 |
-
<input type="text" name="lightbox_comment_font_color" id="lightbox_comment_font_color" value="<?php echo $row->lightbox_comment_font_color; ?>" class="
|
4144 |
</td>
|
4145 |
</tr>
|
4146 |
<tr id="lightbox_comment15">
|
@@ -4189,7 +4193,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4189 |
<tr id="lightbox_comment20">
|
4190 |
<td class="spider_label"><label for="lightbox_comment_input_border_color"><?php echo __('Comment input border color:', BWG()->prefix); ?> </label></td>
|
4191 |
<td>
|
4192 |
-
<input type="text" name="lightbox_comment_input_border_color" id="lightbox_comment_input_border_color" value="<?php echo $row->lightbox_comment_input_border_color; ?>" class="
|
4193 |
</td>
|
4194 |
</tr>
|
4195 |
<tr id="lightbox_comment7">
|
@@ -4208,13 +4212,13 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4208 |
<tr id="lightbox_comment19">
|
4209 |
<td class="spider_label"><label for="lightbox_comment_input_bg_color"><?php echo __('Comment input background color:', BWG()->prefix); ?> </label></td>
|
4210 |
<td>
|
4211 |
-
<input type="text" name="lightbox_comment_input_bg_color" id="lightbox_comment_input_bg_color" value="<?php echo $row->lightbox_comment_input_bg_color; ?>" class="
|
4212 |
</td>
|
4213 |
</tr>
|
4214 |
<tr id="lightbox_comment16">
|
4215 |
<td class="spider_label"><label for="lightbox_comment_button_bg_color"><?php echo __('Comment button background color:', BWG()->prefix); ?> </label></td>
|
4216 |
<td>
|
4217 |
-
<input type="text" name="lightbox_comment_button_bg_color" id="lightbox_comment_button_bg_color" value="<?php echo $row->lightbox_comment_button_bg_color; ?>" class="
|
4218 |
</td>
|
4219 |
</tr>
|
4220 |
<tr id="lightbox_comment5">
|
@@ -4247,7 +4251,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4247 |
<tr id="lightbox_comment17">
|
4248 |
<td class="spider_label"><label for="lightbox_comment_button_border_color"><?php echo __('Comment button border color:', BWG()->prefix); ?> </label></td>
|
4249 |
<td>
|
4250 |
-
<input type="text" name="lightbox_comment_button_border_color" id="lightbox_comment_button_border_color" value="<?php echo $row->lightbox_comment_button_border_color; ?>" class="
|
4251 |
</td>
|
4252 |
</tr>
|
4253 |
<tr id="lightbox_comment4">
|
@@ -4280,7 +4284,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4280 |
<tr id="lightbox_comment23">
|
4281 |
<td class="spider_label"><label for="lightbox_comment_separator_color"><?php echo __('Comment separator color:', BWG()->prefix); ?> </label></td>
|
4282 |
<td>
|
4283 |
-
<input type="text" name="lightbox_comment_separator_color" id="lightbox_comment_separator_color" value="<?php echo $row->lightbox_comment_separator_color; ?>" class="
|
4284 |
</td>
|
4285 |
</tr>
|
4286 |
</tbody>
|
@@ -4306,7 +4310,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4306 |
<tr>
|
4307 |
<td class="spider_label"><label for="page_nav_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
4308 |
<td>
|
4309 |
-
<input type="text" name="page_nav_font_color" id="page_nav_font_color" value="<?php echo $row->page_nav_font_color; ?>" class="
|
4310 |
</td>
|
4311 |
</tr>
|
4312 |
<tr>
|
@@ -4350,7 +4354,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4350 |
<tr>
|
4351 |
<td class="spider_label"><label for="page_nav_border_color"><?php echo __('Border color:', BWG()->prefix); ?></label></td>
|
4352 |
<td>
|
4353 |
-
<input type="text" name="page_nav_border_color" id="page_nav_border_color" value="<?php echo $row->page_nav_border_color; ?>" class="
|
4354 |
</td>
|
4355 |
</tr>
|
4356 |
<tr>
|
@@ -4387,7 +4391,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4387 |
<tr>
|
4388 |
<td class="spider_label"><label for="page_nav_button_bg_color"><?php echo __('Button background color:', BWG()->prefix); ?> </label></td>
|
4389 |
<td>
|
4390 |
-
<input type="text" name="page_nav_button_bg_color" id="page_nav_button_bg_color" value="<?php echo $row->page_nav_button_bg_color; ?>" class="
|
4391 |
</td>
|
4392 |
</tr>
|
4393 |
<tr>
|
@@ -4482,7 +4486,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4482 |
<tr>
|
4483 |
<td class="spider_label"><label for="carousel_cont_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
4484 |
<td>
|
4485 |
-
<input type="text" name="carousel_cont_bg_color" id="carousel_cont_bg_color" value="<?php echo $row->carousel_cont_bg_color; ?>" class="
|
4486 |
</td>
|
4487 |
</tr>
|
4488 |
<tr>
|
@@ -4507,7 +4511,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4507 |
<tr>
|
4508 |
<td class="spider_label"><label for="carousel_rl_btn_color"><?php echo __('Buttons color:', BWG()->prefix); ?> </label></td>
|
4509 |
<td>
|
4510 |
-
<input type="text" name="carousel_rl_btn_color" id="carousel_rl_btn_color" value="<?php echo $row->carousel_rl_btn_color; ?>" class="
|
4511 |
</td>
|
4512 |
</tr>
|
4513 |
<tr>
|
@@ -4520,7 +4524,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4520 |
<tr>
|
4521 |
<td class="spider_label"><label for="carousel_close_rl_btn_hover_color"><?php echo __('Buttons hover color:', BWG()->prefix); ?> </label></td>
|
4522 |
<td>
|
4523 |
-
<input type="text" name="carousel_close_rl_btn_hover_color" id="carousel_close_rl_btn_hover_color" value="<?php echo $row->carousel_close_rl_btn_hover_color; ?>" class="
|
4524 |
</td>
|
4525 |
</tr>
|
4526 |
<tr>
|
@@ -4538,7 +4542,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4538 |
<tr>
|
4539 |
<td class="spider_label"><label for="carousel_rl_btn_bg_color"><?php echo __('Right, left buttons background color:', BWG()->prefix); ?> </label></td>
|
4540 |
<td>
|
4541 |
-
<input type="text" name="carousel_rl_btn_bg_color" id="carousel_rl_btn_bg_color" value="<?php echo $row->carousel_rl_btn_bg_color; ?>" class="
|
4542 |
</td>
|
4543 |
</tr>
|
4544 |
<tr>
|
@@ -4564,7 +4568,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4564 |
<tr>
|
4565 |
<td class="spider_label"><label for="carousel_rl_btn_border_color"><?php echo __('Right, left buttons border color:', BWG()->prefix); ?> </label></td>
|
4566 |
<td>
|
4567 |
-
<input type="text" name="carousel_rl_btn_border_color" id="slideshow_rl_btn_border_color" value="<?php echo $row->carousel_rl_btn_border_color; ?>" class="
|
4568 |
</td>
|
4569 |
</tr>
|
4570 |
<tr>
|
@@ -4629,7 +4633,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4629 |
<tr>
|
4630 |
<td class="spider_label"><label for="carousel_feature_border_color"><?php echo __('Image border color:', BWG()->prefix); ?> </label></td>
|
4631 |
<td>
|
4632 |
-
<input type="text" name="carousel_feature_border_color" id="carousel_feature_border_color" value="<?php echo $row->carousel_feature_border_color; ?>" class="
|
4633 |
</td>
|
4634 |
</tr>
|
4635 |
</tbody>
|
@@ -4645,7 +4649,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4645 |
<tr>
|
4646 |
<td class="spider_label"><label for="carousel_caption_background_color"><?php echo __('Title background color:', BWG()->prefix); ?> </label></td>
|
4647 |
<td>
|
4648 |
-
<input type="text" name="carousel_caption_background_color" id="carousel_caption_background_color" value="<?php echo $row->carousel_caption_background_color; ?>" class="
|
4649 |
</td>
|
4650 |
</tr>
|
4651 |
|
@@ -4688,7 +4692,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4688 |
<tr>
|
4689 |
<td class="spider_label"><label for="carousel_caption_p_color"><?php echo __('Title color:', BWG()->prefix); ?> </label></td>
|
4690 |
<td>
|
4691 |
-
<input type="text" name="carousel_caption_p_color" id="carousel_caption_p_color" value="<?php echo $row->carousel_caption_p_color; ?>" class="
|
4692 |
</td>
|
4693 |
</tr>
|
4694 |
<tr>
|
@@ -4715,7 +4719,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4715 |
<tr>
|
4716 |
<td class="spider_label"><label for="carousel_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
4717 |
<td>
|
4718 |
-
<input type="text" name="carousel_gal_title_font_color" id="carousel_gal_title_font_color" value="<?php echo $row->carousel_gal_title_font_color; ?>" class="
|
4719 |
</td>
|
4720 |
</tr>
|
4721 |
<tr>
|
@@ -4805,7 +4809,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4805 |
</tr>
|
4806 |
<tr>
|
4807 |
<td class="spider_label"><label for="tags_but_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
4808 |
-
<td><input type="text" name="tags_but_font_color" id="tags_but_font_color" value="<?php echo $row->tags_but_font_color; ?>" class="
|
4809 |
</tr>
|
4810 |
<tr>
|
4811 |
<!--generate font style with google fonts -->
|
@@ -4853,7 +4857,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4853 |
</tr>
|
4854 |
<tr>
|
4855 |
<td class="spider_label"><label for="tags_but_border_color"><?php echo __('Border color:', BWG()->prefix); ?></label></td>
|
4856 |
-
<td><input type="text" name="tags_but_border_color" id="tags_but_border_color" value="<?php echo $row->tags_but_border_color; ?>" class="
|
4857 |
</tr>
|
4858 |
<tr>
|
4859 |
<td class="spider_label"><label for="tags_but_border_radius"><?php echo __('Border radius:', BWG()->prefix); ?> </label></td>
|
@@ -4864,15 +4868,15 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4864 |
</tr>
|
4865 |
<tr>
|
4866 |
<td class="spider_label"><label for="tags_but_bg_color"><?php echo __('Button background color:', BWG()->prefix); ?> </label></td>
|
4867 |
-
<td><input type="text" name="tags_but_bg_color" id="tags_but_bg_color" value="<?php echo $row->tags_but_bg_color; ?>" class="
|
4868 |
</tr>
|
4869 |
<tr>
|
4870 |
<td class="spider_label"><label for="tags_but_active_bg_color"><?php echo __('Active Button background color:', BWG()->prefix); ?> </label></td>
|
4871 |
-
<td><input type="text" name="tags_but_active_bg_color" id="tags_but_active_bg_color" value="<?php echo $row->tags_but_active_bg_color; ?>" class="
|
4872 |
</tr>
|
4873 |
<tr>
|
4874 |
<td class="spider_label"><label for="tags_but_active_color"><?php echo __('Active Button font color:', BWG()->prefix); ?> </label></td>
|
4875 |
-
<td><input type="text" name="tags_but_active_color" id="tags_but_active_color" value="<?php echo $row->tags_but_active_color; ?>" class="
|
4876 |
</tr>
|
4877 |
<tr>
|
4878 |
<td class="spider_label"><label for="tags_but_see_all_size"><?php echo __('See All Button Font size:', BWG()->prefix); ?> </label></td>
|
@@ -4882,11 +4886,11 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4882 |
</tr>
|
4883 |
<tr>
|
4884 |
<td class="spider_label"><label for="tags_but_see_all_color"><?php echo __('See All Button Font color:', BWG()->prefix); ?> </label></td>
|
4885 |
-
<td><input type="text" name="tags_but_see_all_color" id="tags_but_see_all_color" value="<?php echo $row->tags_but_see_all_color; ?>" class="
|
4886 |
</tr>
|
4887 |
<tr>
|
4888 |
<td class="spider_label"><label for="tags_but_see_all_back_color"><?php echo __('See All Button background color:', BWG()->prefix); ?> </label></td>
|
4889 |
-
<td><input type="text" name="tags_but_see_all_back_color" id="tags_but_see_all_back_color" value="<?php echo $row->tags_but_see_all_back_color; ?>" class="
|
4890 |
</tr>
|
4891 |
<tr>
|
4892 |
<td class="spider_label"><label for="tags_but_see_all_border_w"><?php echo __('See All Button Border width:', BWG()->prefix); ?> </label></td>
|
@@ -4906,7 +4910,7 @@ class ThemesView_bwg extends AdminView_bwg {
|
|
4906 |
</tr>
|
4907 |
<tr>
|
4908 |
<td class="spider_label"><label for="tags_but_see_all_border_c"><?php echo __('See All Button Border color:', BWG()->prefix); ?></label></td>
|
4909 |
-
<td><input type="text" name="tags_but_see_all_border_c" id="tags_but_see_all_border_c" value="<?php echo $row->tags_but_see_all_border_c; ?>" class="
|
4910 |
</tr>
|
4911 |
<tr>
|
4912 |
<td class="spider_label"><label for="tags_but_see_all_border_r"><?php echo __('See All Button Border radius:', BWG()->prefix); ?> </label></td>
|
260 |
}
|
261 |
|
262 |
/**
|
|
|
263 |
* Generate row for font styles google fonts
|
264 |
+
*
|
265 |
+
* @param $saved_style
|
266 |
+
* @param $font_style
|
267 |
+
* @param $label_text
|
268 |
+
* @param $radio_name
|
269 |
*/
|
270 |
public function font_style_row( $saved_style, $font_style, $label_text, $radio_name) {
|
271 |
$google_fonts = WDWLibrary::get_google_fonts();
|
418 |
<tr>
|
419 |
<td class="spider_label"><label for="thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?></label></td>
|
420 |
<td>
|
421 |
+
<input type="text" name="thumb_border_color" id="thumb_border_color" value="<?php echo $row->thumb_border_color; ?>" class="jscolor"/>
|
422 |
</td>
|
423 |
</tr>
|
424 |
<tr>
|
477 |
<tbody>
|
478 |
<tr>
|
479 |
<td class="spider_label">
|
480 |
+
<label for="thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label>
|
481 |
</td>
|
482 |
<td>
|
483 |
+
<input type="text" name="thumb_bg_color" id="thumb_bg_color" value="<?php echo $row->thumb_bg_color; ?>" class="jscolor" />
|
484 |
</td>
|
485 |
</tr>
|
486 |
<tr>
|
500 |
<tr>
|
501 |
<td class="spider_label"><label for="thumbs_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
502 |
<td>
|
503 |
+
<input type="text" name="thumbs_bg_color" id="thumbs_bg_color" value="<?php echo $row->thumbs_bg_color; ?>" class="jscolor"/>
|
504 |
</td>
|
505 |
</tr>
|
506 |
<tr>
|
552 |
<tr>
|
553 |
<td class="spider_label"><label for="thumb_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
554 |
<td>
|
555 |
+
<input type="text" name="thumb_title_font_color" id="thumb_title_font_color" value="<?php echo $row->thumb_title_font_color; ?>" class="jscolor" />
|
556 |
</td>
|
557 |
</tr>
|
558 |
<tr>
|
559 |
<td class="spider_label"><label for="thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
560 |
<td>
|
561 |
+
<input type="text" name="thumb_title_font_color_hover" id="thumb_title_font_color_hover" value="<?php echo $row->thumb_title_font_color_hover; ?>" class="jscolor" />
|
562 |
</td>
|
563 |
</tr>
|
564 |
<tr>
|
603 |
<tr>
|
604 |
<td class="spider_label"><label for="thumb_description_font_color"><?php echo __('Thumb description font color:', BWG()->prefix); ?> </label></td>
|
605 |
<td>
|
606 |
+
<input type="text" name="thumb_description_font_color" id="thumb_description_font_color" value="<?php echo $row->thumb_description_font_color; ?>" class="jscolor" />
|
607 |
</td>
|
608 |
</tr>
|
609 |
<tr>
|
620 |
<tr>
|
621 |
<td class="spider_label"><label for="thumb_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
622 |
<td>
|
623 |
+
<input type="text" name="thumb_gal_title_font_color" id="thumb_gal_title_font_color" value="<?php echo $row->thumb_gal_title_font_color; ?>" class="jscolor" />
|
624 |
</td>
|
625 |
</tr>
|
626 |
<tr>
|
722 |
<tr>
|
723 |
<td class="spider_label"><label for="masonry_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
724 |
<td>
|
725 |
+
<input type="text" name="masonry_thumb_border_color" id="masonry_thumb_border_color" value="<?php echo $row->masonry_thumb_border_color; ?>" class="jscolor" />
|
726 |
</td>
|
727 |
</tr>
|
728 |
<tr>
|
777 |
<label for="masonry_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label>
|
778 |
</td>
|
779 |
<td>
|
780 |
+
<input type="text" name="masonry_thumb_bg_color" id="masonry_thumb_bg_color" value="<?php echo $row->masonry_thumb_bg_color; ?>" class="jscolor" />
|
781 |
</td>
|
782 |
</tr>
|
783 |
<tr>
|
797 |
<tr>
|
798 |
<td class="spider_label"><label for="masonry_thumbs_bg_color"><?php echo __('Full Background color:', BWG()->prefix); ?> </label></td>
|
799 |
<td>
|
800 |
+
<input type="text" name="masonry_thumbs_bg_color" id="masonry_thumbs_bg_color" value="<?php echo $row->masonry_thumbs_bg_color; ?>" class="jscolor" />
|
801 |
</td>
|
802 |
</tr>
|
803 |
<tr>
|
836 |
<tr>
|
837 |
<td class="spider_label"><label for="masonry_thumb_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
838 |
<td>
|
839 |
+
<input type="text" name="masonry_thumb_title_font_color" id="masonry_thumb_title_font_color" value="<?php echo $row->masonry_thumb_title_font_color; ?>" class="jscolor" />
|
840 |
</td>
|
841 |
</tr>
|
842 |
<tr>
|
843 |
<td class="spider_label"><label for="masonry_thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
844 |
<td>
|
845 |
+
<input type="text" name="masonry_thumb_title_font_color_hover" id="masonry_thumb_title_font_color_hover" value="<?php echo $row->masonry_thumb_title_font_color_hover; ?>" class="jscolor" />
|
846 |
</td>
|
847 |
</tr>
|
848 |
<tr>
|
879 |
<tr>
|
880 |
<td class="spider_label"><label for="masonry_description_color"><?php echo __('Description font color:', BWG()->prefix); ?> </label></td>
|
881 |
<td>
|
882 |
+
<input type="text" name="masonry_description_color" id="masonry_description_color" value="<?php echo $row->masonry_description_color; ?>" class="jscolor" />
|
883 |
</td>
|
884 |
</tr>
|
885 |
<tr>
|
895 |
<tr>
|
896 |
<td class="spider_label"><label for="masonry_thumb_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
897 |
<td>
|
898 |
+
<input type="text" name="masonry_thumb_gal_title_font_color" id="masonry_thumb_gal_title_font_color" value="<?php echo $row->masonry_thumb_gal_title_font_color; ?>" class="jscolor" />
|
899 |
</td>
|
900 |
</tr>
|
901 |
<tr>
|
997 |
<tr>
|
998 |
<td class="spider_label"><label for="mosaic_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
999 |
<td>
|
1000 |
+
<input type="text" name="mosaic_thumb_border_color" id="mosaic_thumb_border_color" value="<?php echo $row->mosaic_thumb_border_color; ?>" class="jscolor" />
|
1001 |
</td>
|
1002 |
</tr>
|
1003 |
<tr>
|
1050 |
<tr>
|
1051 |
<td class="spider_label"><label for="mosaic_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label></td>
|
1052 |
<td>
|
1053 |
+
<input type="text" name="mosaic_thumb_bg_color" id="mosaic_thumb_bg_color" value="<?php echo $row->mosaic_thumb_bg_color; ?>" class="jscolor" />
|
1054 |
</td>
|
1055 |
</tr>
|
1056 |
<tr>
|
1070 |
<tr>
|
1071 |
<td class="spider_label"><label for="mosaic_thumbs_bg_color"><?php echo __('Full Background color:', BWG()->prefix); ?> </label></td>
|
1072 |
<td>
|
1073 |
+
<input type="text" name="mosaic_thumbs_bg_color" id="mosaic_thumbs_bg_color" value="<?php echo $row->mosaic_thumbs_bg_color; ?>" class="jscolor" />
|
1074 |
</td>
|
1075 |
</tr>
|
1076 |
<tr>
|
1113 |
<tr>
|
1114 |
<td class="spider_label"><label for="mosaic_thumb_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
1115 |
<td>
|
1116 |
+
<input type="text" name="mosaic_thumb_title_font_color" id="mosaic_thumb_title_font_color" value="<?php echo $row->mosaic_thumb_title_font_color; ?>" class="jscolor" />
|
1117 |
</td>
|
1118 |
</tr>
|
1119 |
<tr>
|
1120 |
<td class="spider_label"><label for="mosaic_thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
1121 |
<td>
|
1122 |
+
<input type="text" name="mosaic_thumb_title_font_color_hover" id="mosaic_thumb_title_font_color_hover" value="<?php echo $row->mosaic_thumb_title_font_color_hover; ?>" class="jscolor" />
|
1123 |
</td>
|
1124 |
</tr>
|
1125 |
<tr>
|
1163 |
<tr>
|
1164 |
<td class="spider_label"><label for="mosaic_thumb_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
1165 |
<td>
|
1166 |
+
<input type="text" name="mosaic_thumb_gal_title_font_color" id="mosaic_thumb_gal_title_font_color" value="<?php echo $row->mosaic_thumb_gal_title_font_color; ?>" class="jscolor" />
|
1167 |
</td>
|
1168 |
</tr>
|
1169 |
<tr>
|
1229 |
<tr>
|
1230 |
<td class="spider_label"><label for="slideshow_cont_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
1231 |
<td>
|
1232 |
+
<input type="text" name="slideshow_cont_bg_color" id="slideshow_cont_bg_color" value="<?php echo $row->slideshow_cont_bg_color; ?>" class="jscolor"/>
|
1233 |
</td>
|
1234 |
</tr>
|
1235 |
<tr>
|
1247 |
<tr>
|
1248 |
<td class="spider_label"><label for="slideshow_rl_btn_color"><?php echo __('Buttons color:', BWG()->prefix); ?> </label></td>
|
1249 |
<td>
|
1250 |
+
<input type="text" name="slideshow_rl_btn_color" id="slideshow_rl_btn_color" value="<?php echo $row->slideshow_rl_btn_color; ?>" class="jscolor"/>
|
1251 |
</td>
|
1252 |
</tr>
|
1253 |
<tr>
|
1260 |
<tr>
|
1261 |
<td class="spider_label"><label for="slideshow_close_rl_btn_hover_color"><?php echo __('Buttons hover color:', BWG()->prefix); ?> </label></td>
|
1262 |
<td>
|
1263 |
+
<input type="text" name="slideshow_close_rl_btn_hover_color" id="slideshow_close_rl_btn_hover_color" value="<?php echo $row->slideshow_close_rl_btn_hover_color; ?>" class="jscolor"/>
|
1264 |
</td>
|
1265 |
</tr>
|
1266 |
<tr>
|
1278 |
<tr>
|
1279 |
<td class="spider_label"><label for="slideshow_rl_btn_bg_color"><?php echo __('Right, left buttons background color:', BWG()->prefix); ?> </label></td>
|
1280 |
<td>
|
1281 |
+
<input type="text" name="slideshow_rl_btn_bg_color" id="slideshow_rl_btn_bg_color" value="<?php echo $row->slideshow_rl_btn_bg_color; ?>" class="jscolor"/>
|
1282 |
</td>
|
1283 |
</tr>
|
1284 |
<tr>
|
1304 |
<tr>
|
1305 |
<td class="spider_label"><label for="slideshow_rl_btn_border_color"><?php echo __('Right, left buttons border color:', BWG()->prefix); ?> </label></td>
|
1306 |
<td>
|
1307 |
+
<input type="text" name="slideshow_rl_btn_border_color" id="slideshow_rl_btn_border_color" value="<?php echo $row->slideshow_rl_btn_border_color; ?>" class="jscolor"/>
|
1308 |
</td>
|
1309 |
</tr>
|
1310 |
<tr>
|
1387 |
<tr>
|
1388 |
<td class="spider_label"><label for="slideshow_filmstrip_thumb_border_color"><?php echo __('Filmstrip border color:', BWG()->prefix); ?> </label></td>
|
1389 |
<td>
|
1390 |
+
<input type="text" name="slideshow_filmstrip_thumb_border_color" id="slideshow_filmstrip_thumb_border_color" value="<?php echo $row->slideshow_filmstrip_thumb_border_color; ?>" class="jscolor"/>
|
1391 |
</td>
|
1392 |
</tr>
|
1393 |
<tr>
|
1406 |
<tr>
|
1407 |
<td class="spider_label"><label for="slideshow_filmstrip_thumb_active_border_color"><?php echo __('Filmstrip active border color:', BWG()->prefix); ?> </label></td>
|
1408 |
<td>
|
1409 |
+
<input type="text" name="slideshow_filmstrip_thumb_active_border_color" id="slideshow_filmstrip_thumb_active_border_color" value="<?php echo $row->slideshow_filmstrip_thumb_active_border_color; ?>" class="jscolor"/>
|
1410 |
</td>
|
1411 |
</tr>
|
1412 |
<tr id="tr_appWidth">
|
1419 |
<tr>
|
1420 |
<td class="spider_label"><label for="slideshow_filmstrip_rl_bg_color"><?php echo __('Filmstrip right, left buttons background color: ', BWG()->prefix); ?></label></td>
|
1421 |
<td>
|
1422 |
+
<input type="text" name="slideshow_filmstrip_rl_bg_color" id="slideshow_filmstrip_rl_bg_color" value="<?php echo $row->slideshow_filmstrip_rl_bg_color; ?>" class="jscolor"/>
|
1423 |
</td>
|
1424 |
</tr>
|
1425 |
<tr>
|
1426 |
<td class="spider_label"><label for="slideshow_filmstrip_rl_btn_color"><?php echo __('Filmstrip right, left buttons color:', BWG()->prefix); ?> </label></td>
|
1427 |
<td>
|
1428 |
+
<input type="text" name="slideshow_filmstrip_rl_btn_color" id="slideshow_filmstrip_rl_btn_color" value="<?php echo $row->slideshow_filmstrip_rl_btn_color; ?>" class="jscolor"/>
|
1429 |
</td>
|
1430 |
</tr>
|
1431 |
<tr>
|
1456 |
<tr>
|
1457 |
<td class="spider_label"><label for="slideshow_dots_background_color"><?php echo __('Slider bullet background color:', BWG()->prefix); ?> </label></td>
|
1458 |
<td>
|
1459 |
+
<input type="text" name="slideshow_dots_background_color" id="slideshow_dots_background_color" value="<?php echo $row->slideshow_dots_background_color; ?>" class="jscolor"/>
|
1460 |
</td>
|
1461 |
</tr>
|
1462 |
<tr>
|
1468 |
<tr>
|
1469 |
<td class="spider_label"><label for="slideshow_dots_active_background_color"><?php echo __('Slider bullet active background color: ', BWG()->prefix); ?></label></td>
|
1470 |
<td>
|
1471 |
+
<input type="text" name="slideshow_dots_active_background_color" id="slideshow_dots_active_background_color" value="<?php echo $row->slideshow_dots_active_background_color; ?>" class="jscolor"/>
|
1472 |
</td>
|
1473 |
</tr>
|
1474 |
<tr>
|
1480 |
<tr>
|
1481 |
<td class="spider_label"><label for="slideshow_dots_active_border_color"><?php echo __('Slider bullet active border color: ', BWG()->prefix); ?></label></td>
|
1482 |
<td>
|
1483 |
+
<input type="text" name="slideshow_dots_active_border_color" id="slideshow_dots_active_border_color" value="<?php echo $row->slideshow_dots_active_border_color; ?>" class="jscolor"/>
|
1484 |
</td>
|
1485 |
</tr>
|
1486 |
</tbody>
|
1496 |
<tr>
|
1497 |
<td class="spider_label"><label for="slideshow_title_background_color"><?php echo __('Title background color: ', BWG()->prefix); ?></label></td>
|
1498 |
<td>
|
1499 |
+
<input type="text" name="slideshow_title_background_color" id="slideshow_title_background_color" value="<?php echo $row->slideshow_title_background_color; ?>" class="jscolor"/>
|
1500 |
</td>
|
1501 |
</tr>
|
1502 |
<tr>
|
1529 |
<tr>
|
1530 |
<td class="spider_label"><label for="slideshow_title_color"><?php echo __('Title color: ', BWG()->prefix); ?></label></td>
|
1531 |
<td>
|
1532 |
+
<input type="text" name="slideshow_title_color" id="slideshow_title_color" value="<?php echo $row->slideshow_title_color; ?>" class="jscolor"/>
|
1533 |
</td>
|
1534 |
</tr>
|
1535 |
<tr>
|
1539 |
<tr>
|
1540 |
<td class="spider_label"><label for="slideshow_description_background_color"><?php echo __('Description background color:', BWG()->prefix); ?> </label></td>
|
1541 |
<td>
|
1542 |
+
<input type="text" name="slideshow_description_background_color" id="slideshow_description_background_color" value="<?php echo $row->slideshow_description_background_color; ?>" class="jscolor"/>
|
1543 |
</td>
|
1544 |
</tr>
|
1545 |
<tr>
|
1572 |
<tr>
|
1573 |
<td class="spider_label"><label for="slideshow_description_color"><?php echo __('Description color:', BWG()->prefix); ?> </label></td>
|
1574 |
<td>
|
1575 |
+
<input type="text" name="slideshow_description_color" id="slideshow_description_color" value="<?php echo $row->slideshow_description_color; ?>" class="jscolor"/>
|
1576 |
</td>
|
1577 |
</tr>
|
1578 |
<tr>
|
1603 |
<tr>
|
1604 |
<td class="spider_label"><label for="image_browser_full_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
1605 |
<td>
|
1606 |
+
<input type="text" name="image_browser_full_bg_color" id="image_browser_full_bg_color" value="<?php echo $row->image_browser_full_bg_color; ?>" class="jscolor" />
|
1607 |
</td>
|
1608 |
</tr>
|
1609 |
<tr>
|
1643 |
<tr>
|
1644 |
<td class="spider_label"><label for="image_browser_full_border_color"><?php echo __('Full border color:', BWG()->prefix); ?> </label></td>
|
1645 |
<td>
|
1646 |
+
<input type="text" name="image_browser_full_border_color" id="image_browser_full_border_color" value="<?php echo $row->image_browser_full_border_color; ?>" class="jscolor" />
|
1647 |
</td>
|
1648 |
</tr>
|
1649 |
</tbody>
|
1707 |
<tr>
|
1708 |
<td class="spider_label"><label for="image_browser_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
1709 |
<td>
|
1710 |
+
<input type="text" name="image_browser_border_color" id="image_browser_border_color" value="<?php echo $row->image_browser_border_color; ?>" class="jscolor" />
|
1711 |
</td>
|
1712 |
</tr>
|
1713 |
<tr>
|
1720 |
<tr>
|
1721 |
<td class="spider_label"><label for="image_browser_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
1722 |
<td>
|
1723 |
+
<input type="text" name="image_browser_bg_color" id="image_browser_bg_color" value="<?php echo $row->image_browser_bg_color; ?>" class="jscolor" />
|
1724 |
</td>
|
1725 |
</tr>
|
1726 |
<tr>
|
1779 |
<tr>
|
1780 |
<td class="spider_label"><label for="image_browser_img_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
1781 |
<td>
|
1782 |
+
<input type="text" name="image_browser_img_font_color" id="image_browser_img_font_color" value="<?php echo $row->image_browser_img_font_color; ?>" class="jscolor" />
|
1783 |
</td>
|
1784 |
</tr>
|
1785 |
<tr>
|
1823 |
<tr>
|
1824 |
<td class="spider_label"><label for="image_browser_image_description_border_color"><?php echo __('Description border color:', BWG()->prefix); ?> </label></td>
|
1825 |
<td>
|
1826 |
+
<input type="text" name="image_browser_image_description_border_color" id="image_browser_image_description_border_color" value="<?php echo $row->image_browser_image_description_border_color; ?>" class="jscolor" />
|
1827 |
</td>
|
1828 |
</tr>
|
1829 |
<tr>
|
1836 |
<tr>
|
1837 |
<td class="spider_label"><label for="image_browser_image_description_bg_color"><?php echo __('Description background color:', BWG()->prefix); ?> </label></td>
|
1838 |
<td>
|
1839 |
+
<input type="text" name="image_browser_image_description_bg_color" id="image_browser_image_description_bg_color" value="<?php echo $row->image_browser_image_description_bg_color; ?>" class="jscolor" />
|
1840 |
</td>
|
1841 |
</tr>
|
1842 |
<tr>
|
1849 |
<tr>
|
1850 |
<td class="spider_label"><label for="image_browser_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
1851 |
<td>
|
1852 |
+
<input type="text" name="image_browser_gal_title_font_color" id="image_browser_gal_title_font_color" value="<?php echo $row->image_browser_gal_title_font_color; ?>" class="jscolor" />
|
1853 |
</td>
|
1854 |
</tr>
|
1855 |
<tr>
|
1958 |
<tr>
|
1959 |
<td class="spider_label"><label for="album_compact_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
1960 |
<td>
|
1961 |
+
<input type="text" name="album_compact_thumb_border_color" id="album_compact_thumb_border_color" value="<?php echo $row->album_compact_thumb_border_color; ?>" class="jscolor" />
|
1962 |
</td>
|
1963 |
</tr>
|
1964 |
<tr>
|
2018 |
<tr>
|
2019 |
<td class="spider_label"><label for="album_compact_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label></td>
|
2020 |
<td>
|
2021 |
+
<input type="text" name="album_compact_thumb_bg_color" id="album_compact_thumb_bg_color" value="<?php echo $row->album_compact_thumb_bg_color; ?>" class="jscolor" />
|
2022 |
</td>
|
2023 |
</tr>
|
2024 |
<tr>
|
2038 |
<tr>
|
2039 |
<td class="spider_label"><label for="album_compact_thumbs_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
2040 |
<td>
|
2041 |
+
<input type="text" name="album_compact_thumbs_bg_color" id="album_compact_thumbs_bg_color" value="<?php echo $row->album_compact_thumbs_bg_color; ?>" class="jscolor" />
|
2042 |
</td>
|
2043 |
</tr>
|
2044 |
<tr>
|
2090 |
<tr>
|
2091 |
<td class="spider_label"><label for="album_compact_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
2092 |
<td>
|
2093 |
+
<input type="text" name="album_compact_title_font_color" id="album_compact_title_font_color" value="<?php echo $row->album_compact_title_font_color; ?>" class="jscolor" />
|
2094 |
</td>
|
2095 |
</tr>
|
2096 |
<tr>
|
2097 |
<td class="spider_label"><label for="album_compact_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
2098 |
<td>
|
2099 |
+
<input type="text" name="album_compact_title_font_color_hover" id="album_compact_title_font_color_hover" value="<?php echo $row->album_compact_title_font_color_hover; ?>" class="jscolor" />
|
2100 |
</td>
|
2101 |
</tr>
|
2102 |
<tr>
|
2140 |
<tr>
|
2141 |
<td class="spider_label"><label for="album_compact_back_font_color"><?php echo __('Back Font color:', BWG()->prefix); ?> </label></td>
|
2142 |
<td>
|
2143 |
+
<input type="text" name="album_compact_back_font_color" id="album_compact_back_font_color" value="<?php echo $row->album_compact_back_font_color; ?>" class="jscolor" />
|
2144 |
</td>
|
2145 |
</tr>
|
2146 |
<tr>
|
2177 |
<tr>
|
2178 |
<td class="spider_label"><label for="album_compact_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
2179 |
<td>
|
2180 |
+
<input type="text" name="album_compact_gal_title_font_color" id="album_compact_gal_title_font_color" value="<?php echo $row->album_compact_gal_title_font_color; ?>" class="jscolor" />
|
2181 |
</td>
|
2182 |
</tr>
|
2183 |
<tr>
|
2275 |
<tr>
|
2276 |
<td class="spider_label"><label for="album_extended_thumb_border_color"><?php echo __('Thumbnail border color:', BWG()->prefix); ?> </label></td>
|
2277 |
<td>
|
2278 |
+
<input type="text" name="album_extended_thumb_border_color" id="album_extended_thumb_border_color" value="<?php echo $row->album_extended_thumb_border_color; ?>" class="jscolor"/>
|
2279 |
</td>
|
2280 |
</tr>
|
2281 |
<tr>
|
2346 |
<tr>
|
2347 |
<td class="spider_label"><label for="album_extended_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label></td>
|
2348 |
<td>
|
2349 |
+
<input type="text" name="album_extended_thumb_bg_color" id="album_extended_thumb_bg_color" value="<?php echo $row->album_extended_thumb_bg_color; ?>" class="jscolor"/>
|
2350 |
</td>
|
2351 |
</tr>
|
2352 |
<tr>
|
2353 |
<td class="spider_label"><label for="album_extended_thumbs_bg_color"><?php echo __('Thumbnails background color:', BWG()->prefix); ?> </label></td>
|
2354 |
<td>
|
2355 |
+
<input type="text" name="album_extended_thumbs_bg_color" id="album_extended_thumbs_bg_color" value="<?php echo $row->album_extended_thumbs_bg_color; ?>" class="jscolor"/>
|
2356 |
</td>
|
2357 |
</tr>
|
2358 |
<tr>
|
2383 |
<tr>
|
2384 |
<td class="spider_label"><label for="album_extended_thumb_div_bg_color"><?php echo __('Thumbnail div background color:', BWG()->prefix); ?> </label></td>
|
2385 |
<td>
|
2386 |
+
<input type="text" name="album_extended_thumb_div_bg_color" id="album_extended_thumb_div_bg_color" value="<?php echo $row->album_extended_thumb_div_bg_color; ?>" class="jscolor"/>
|
2387 |
</td>
|
2388 |
</tr>
|
2389 |
<tr>
|
2410 |
<tr>
|
2411 |
<td class="spider_label"><label for="album_extended_thumb_div_border_color"><?php echo __('Thumbnail div border color:', BWG()->prefix); ?> </label></td>
|
2412 |
<td>
|
2413 |
+
<input type="text" name="album_extended_thumb_div_border_color" id="album_extended_thumb_div_border_color" value="<?php echo $row->album_extended_thumb_div_border_color; ?>" class="jscolor"/>
|
2414 |
</td>
|
2415 |
</tr>
|
2416 |
<tr>
|
2436 |
<tr>
|
2437 |
<td class="spider_label"><label for="album_extended_div_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
2438 |
<td>
|
2439 |
+
<input type="text" name="album_extended_div_bg_color" id="album_extended_div_bg_color" value="<?php echo $row->album_extended_div_bg_color; ?>" class="jscolor"/>
|
2440 |
</td>
|
2441 |
</tr>
|
2442 |
<tr>
|
2476 |
<tr>
|
2477 |
<td class="spider_label"><label for="album_extended_div_separator_color"><?php echo __('Separator color:', BWG()->prefix); ?> </label></td>
|
2478 |
<td>
|
2479 |
+
<input type="text" name="album_extended_div_separator_color" id="album_extended_div_separator_color" value="<?php echo $row->album_extended_div_separator_color; ?>" class="jscolor"/>
|
2480 |
</td>
|
2481 |
</tr>
|
2482 |
<tr>
|
2495 |
<tr>
|
2496 |
<td class="spider_label"><label for="album_extended_back_font_color"><?php echo __('Back font color:', BWG()->prefix); ?> </label></td>
|
2497 |
<td>
|
2498 |
+
<input type="text" name="album_extended_back_font_color" id="album_extended_back_font_color" value="<?php echo $row->album_extended_back_font_color; ?>" class="jscolor"/>
|
2499 |
</td>
|
2500 |
</tr>
|
2501 |
<tr>
|
2570 |
<tr>
|
2571 |
<td class="spider_label"><label for="album_extended_text_div_border_color"><?php echo __('Text border color:', BWG()->prefix); ?> </label></td>
|
2572 |
<td>
|
2573 |
+
<input type="text" name="album_extended_text_div_border_color" id="album_extended_text_div_border_color" value="<?php echo $row->album_extended_text_div_border_color; ?>" class="jscolor"/>
|
2574 |
</td>
|
2575 |
</tr>
|
2576 |
<tr>
|
2583 |
<tr>
|
2584 |
<td class="spider_label"><label for="album_extended_text_div_bg_color"><?php echo __('Text background color:', BWG()->prefix); ?> </label></td>
|
2585 |
<td>
|
2586 |
+
<input type="text" name="album_extended_text_div_bg_color" id="album_extended_text_div_bg_color" value="<?php echo $row->album_extended_text_div_bg_color; ?>" class="jscolor"/>
|
2587 |
</td>
|
2588 |
</tr>
|
2589 |
<tr>
|
2622 |
<tr>
|
2623 |
<td class="spider_label"><label for="album_extended_title_span_border_color"><?php echo __('Title border color:', BWG()->prefix); ?> </label></td>
|
2624 |
<td>
|
2625 |
+
<input type="text" name="album_extended_title_span_border_color" id="album_extended_title_span_border_color" value="<?php echo $row->album_extended_title_span_border_color; ?>" class="jscolor"/>
|
2626 |
</td>
|
2627 |
</tr>
|
2628 |
<tr>
|
2634 |
<tr>
|
2635 |
<td class="spider_label"><label for="album_extended_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
2636 |
<td>
|
2637 |
+
<input type="text" name="album_extended_title_font_color" id="album_extended_title_font_color" value="<?php echo $row->album_extended_title_font_color; ?>" class="jscolor"/>
|
2638 |
</td>
|
2639 |
</tr>
|
2640 |
<tr>
|
2685 |
<tr>
|
2686 |
<td class="spider_label"><label for="album_extended_desc_span_border_color"><?php echo __('Description border color:', BWG()->prefix); ?> </label></td>
|
2687 |
<td>
|
2688 |
+
<input type="text" name="album_extended_desc_span_border_color" id="album_extended_desc_span_border_color" value="<?php echo $row->album_extended_desc_span_border_color; ?>" class="jscolor"/>
|
2689 |
</td>
|
2690 |
</tr>
|
2691 |
<tr>
|
2697 |
<tr>
|
2698 |
<td class="spider_label"><label for="album_extended_desc_font_color"><?php echo __('Description font color:', BWG()->prefix); ?> </label></td>
|
2699 |
<td>
|
2700 |
+
<input type="text" name="album_extended_desc_font_color" id="album_extended_desc_font_color" value="<?php echo $row->album_extended_desc_font_color; ?>" class="jscolor"/>
|
2701 |
</td>
|
2702 |
</tr>
|
2703 |
<tr>
|
2727 |
<tr>
|
2728 |
<td class="spider_label"><label for="album_extended_desc_more_color"><?php echo __('Description more color:', BWG()->prefix); ?> </label></td>
|
2729 |
<td>
|
2730 |
+
<input type="text" name="album_extended_desc_more_color" id="album_extended_desc_more_color" value="<?php echo $row->album_extended_desc_more_color; ?>" class="jscolor"/>
|
2731 |
</td>
|
2732 |
</tr>
|
2733 |
<tr>
|
2739 |
<tr>
|
2740 |
<td class="spider_label"><label for="album_extended_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
2741 |
<td>
|
2742 |
+
<input type="text" name="album_extended_gal_title_font_color" id="album_extended_gal_title_font_color" value="<?php echo $row->album_extended_gal_title_font_color; ?>" class="jscolor" />
|
2743 |
</td>
|
2744 |
</tr>
|
2745 |
<tr>
|
2842 |
<tr>
|
2843 |
<td class="spider_label"><label for="album_masonry_thumb_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
2844 |
<td>
|
2845 |
+
<input type="text" name="album_masonry_thumb_border_color" id="album_masonry_thumb_border_color" value="<?php echo $row->album_masonry_thumb_border_color; ?>" class="jscolor" />
|
2846 |
</td>
|
2847 |
</tr>
|
2848 |
<tr>
|
2897 |
<label for="album_masonry_thumb_bg_color"><?php echo __('Thumbnail background color:', BWG()->prefix); ?> </label>
|
2898 |
</td>
|
2899 |
<td>
|
2900 |
+
<input type="text" name="album_masonry_thumb_bg_color" id="album_masonry_thumb_bg_color" value="<?php echo $row->album_masonry_thumb_bg_color; ?>" class="jscolor" />
|
2901 |
</td>
|
2902 |
</tr>
|
2903 |
<tr>
|
2910 |
<tr>
|
2911 |
<td class="spider_label"><label for="album_masonry_thumbs_bg_color"><?php echo __('Full background color:', BWG()->prefix); ?> </label></td>
|
2912 |
<td>
|
2913 |
+
<input type="text" name="album_masonry_thumbs_bg_color" id="album_masonry_thumbs_bg_color" value="<?php echo $row->album_masonry_thumbs_bg_color; ?>" class="jscolor" />
|
2914 |
</td>
|
2915 |
</tr>
|
2916 |
<tr>
|
2953 |
<tr>
|
2954 |
<td class="spider_label"><label for="album_masonry_title_font_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
2955 |
<td>
|
2956 |
+
<input type="text" name="album_masonry_title_font_color" id="album_masonry_title_font_color" value="<?php echo $row->album_masonry_title_font_color; ?>" class="jscolor" />
|
2957 |
</td>
|
2958 |
</tr>
|
2959 |
<tr>
|
2960 |
<td class="spider_label"><label for="album_masonry_thumb_title_font_color_hover"><?php echo __('Title font color (Show on hover):', BWG()->prefix); ?> </label></td>
|
2961 |
<td>
|
2962 |
+
<input type="text" name="album_masonry_thumb_title_font_color_hover" id="album_masonry_thumb_title_font_color_hover" value="<?php echo $row->album_masonry_thumb_title_font_color_hover; ?>" class="jscolor" />
|
2963 |
</td>
|
2964 |
</tr>
|
2965 |
<tr>
|
2996 |
<tr>
|
2997 |
<td class="spider_label"><label for="album_masonry_back_font_color"><?php echo __('Back Font color:', BWG()->prefix); ?> </label></td>
|
2998 |
<td>
|
2999 |
+
<input type="text" name="album_masonry_back_font_color" id="album_masonry_back_font_color" value="<?php echo $row->album_masonry_back_font_color; ?>" class="jscolor" />
|
3000 |
</td>
|
3001 |
</tr>
|
3002 |
<tr>
|
3033 |
<tr>
|
3034 |
<td class="spider_label"><label for="album_masonry_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
3035 |
<td>
|
3036 |
+
<input type="text" name="album_masonry_gal_title_font_color" id="album_masonry_gal_title_font_color" value="<?php echo $row->album_masonry_gal_title_font_color; ?>" class="jscolor" />
|
3037 |
</td>
|
3038 |
</tr>
|
3039 |
<tr>
|
3099 |
<tr>
|
3100 |
<td class="spider_label"><label for="blog_style_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
3101 |
<td>
|
3102 |
+
<input type="text" name="blog_style_bg_color" id="blog_style_bg_color" value="<?php echo $row->blog_style_bg_color; ?>" class="jscolor"/>
|
3103 |
</td>
|
3104 |
</tr>
|
3105 |
<tr>
|
3167 |
<tr>
|
3168 |
<td class="spider_label"><label for="blog_style_img_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
3169 |
<td>
|
3170 |
+
<input type="text" name="blog_style_img_font_color" id="blog_style_img_font_color" value="<?php echo $row->blog_style_img_font_color; ?>" class="jscolor"/>
|
3171 |
</td>
|
3172 |
</tr>
|
3173 |
<tr>
|
3193 |
<tr>
|
3194 |
<td class="spider_label"><label for="blog_style_border_color"><?php echo __('Border color:', BWG()->prefix); ?> </label></td>
|
3195 |
<td>
|
3196 |
+
<input type="text" name="blog_style_border_color" id="blog_style_border_color" value="<?php echo $row->blog_style_border_color; ?>" class="jscolor" />
|
3197 |
</td>
|
3198 |
</tr>
|
3199 |
<tr>
|
3229 |
<tr>
|
3230 |
<td class="spider_label"><label for="blog_style_share_buttons_color"><?php echo __('Buttons color:', BWG()->prefix); ?> </label></td>
|
3231 |
<td>
|
3232 |
+
<input type="text" name="blog_style_share_buttons_color" id="blog_style_share_buttons_color" value="<?php echo $row->blog_style_share_buttons_color; ?>" class="jscolor"/>
|
3233 |
</td>
|
3234 |
</tr>
|
3235 |
<tr>
|
3255 |
<tr>
|
3256 |
<td class="spider_label"><label for="blog_style_share_buttons_border_color"><?php echo __('Buttons and title border color:', BWG()->prefix); ?> </label></td>
|
3257 |
<td>
|
3258 |
+
<input type="text" name="blog_style_share_buttons_border_color" id="blog_style_share_buttons_border_color" value="<?php echo $row->blog_style_share_buttons_border_color; ?>" class="jscolor"/>
|
3259 |
</td>
|
3260 |
</tr>
|
3261 |
<tr>
|
3268 |
<tr>
|
3269 |
<td class="spider_label"><label for="blog_style_share_buttons_bg_color"><?php echo __('Buttons and title background color:', BWG()->prefix); ?> </label></td>
|
3270 |
<td>
|
3271 |
+
<input type="text" name="blog_style_share_buttons_bg_color" id="blog_style_share_buttons_bg_color" value="<?php echo $row->blog_style_share_buttons_bg_color; ?>" class="jscolor"/>
|
3272 |
</td>
|
3273 |
</tr>
|
3274 |
<tr>
|
3302 |
<tr>
|
3303 |
<td class="spider_label"><label for="blog_style_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
3304 |
<td>
|
3305 |
+
<input type="text" name="blog_style_gal_title_font_color" id="blog_style_gal_title_font_color" value="<?php echo $row->blog_style_gal_title_font_color; ?>" class="jscolor" />
|
3306 |
</td>
|
3307 |
</tr>
|
3308 |
<tr>
|
3368 |
<tr id="lightbox_overlay_bg">
|
3369 |
<td class="spider_label"><label for="lightbox_overlay_bg_color"><?php echo __('Overlay background color:', BWG()->prefix); ?> </label></td>
|
3370 |
<td>
|
3371 |
+
<input type="text" name="lightbox_overlay_bg_color" id="lightbox_overlay_bg_color" value="<?php echo $row->lightbox_overlay_bg_color; ?>" class="jscolor"/>
|
3372 |
</td>
|
3373 |
</tr>
|
3374 |
<tr id="lightbox_overlay">
|
3381 |
<tr id="lightbox_bg">
|
3382 |
<td class="spider_label"><label for="lightbox_bg_color"><?php echo __('Lightbox background color:', BWG()->prefix); ?> </label></td>
|
3383 |
<td>
|
3384 |
+
<input type="text" name="lightbox_bg_color" id="lightbox_bg_color" value="<?php echo $row->lightbox_bg_color; ?>" class="jscolor"/>
|
3385 |
</td>
|
3386 |
</tr>
|
3387 |
<tr id="lightbox_transparency">
|
3421 |
<tr id="lightbox_cntrl8">
|
3422 |
<td class="spider_label"><label for="lightbox_ctrl_cont_bg_color"><?php echo __('Control buttons background color:', BWG()->prefix); ?> </label></td>
|
3423 |
<td>
|
3424 |
+
<input type="text" name="lightbox_ctrl_cont_bg_color" id="lightbox_ctrl_cont_bg_color" value="<?php echo $row->lightbox_ctrl_cont_bg_color; ?>" class="jscolor"/>
|
3425 |
</td>
|
3426 |
</tr>
|
3427 |
<tr id="lightbox_cntrl5">
|
3455 |
<tr id="lightbox_cntrl7">
|
3456 |
<td class="spider_label"><label for="lightbox_ctrl_btn_color"><?php echo __('Control buttons color:', BWG()->prefix); ?> </label></td>
|
3457 |
<td>
|
3458 |
+
<input type="text" name="lightbox_ctrl_btn_color" id="lightbox_ctrl_btn_color" value="<?php echo $row->lightbox_ctrl_btn_color; ?>" class="jscolor"/>
|
3459 |
</td>
|
3460 |
</tr>
|
3461 |
<tr id="lightbox_cntrl4">
|
3508 |
<tr id="lightbox_close13">
|
3509 |
<td class="spider_label"><label for="lightbox_close_btn_border_color"><?php echo __('Close button border color:', BWG()->prefix); ?> </label></td>
|
3510 |
<td>
|
3511 |
+
<input type="text" name="lightbox_close_btn_border_color" id="lightbox_close_btn_border_color" value="<?php echo $row->lightbox_close_btn_border_color; ?>" class="jscolor"/>
|
3512 |
</td>
|
3513 |
</tr>
|
3514 |
<tr id="lightbox_close3">
|
3521 |
<tr id="lightbox_close11">
|
3522 |
<td class="spider_label"><label for="lightbox_close_btn_bg_color"><?php echo __('Close button background color:', BWG()->prefix); ?> </label></td>
|
3523 |
<td>
|
3524 |
+
<input type="text" name="lightbox_close_btn_bg_color" id="lightbox_close_btn_bg_color" value="<?php echo $row->lightbox_close_btn_bg_color; ?>" class="jscolor"/>
|
3525 |
<div class="spider_description"><?php echo __('The option does not apply to Full-width lightbox.', BWG()->prefix); ?></div>
|
3526 |
</td>
|
3527 |
</tr>
|
3568 |
<tr id="lightbox_close14">
|
3569 |
<td class="spider_label"><label for="lightbox_close_btn_color"><?php echo __('Close button color:', BWG()->prefix); ?> </label></td>
|
3570 |
<td>
|
3571 |
+
<input type="text" name="lightbox_close_btn_color" id="lightbox_close_btn_color" value="<?php echo $row->lightbox_close_btn_color; ?>" class="jscolor"/>
|
3572 |
</td>
|
3573 |
</tr>
|
3574 |
<tr id="lightbox_close10">
|
3575 |
<td class="spider_label"><label for="lightbox_close_btn_full_color"><?php echo __('Fullscreen close button color:', BWG()->prefix); ?> </label></td>
|
3576 |
<td>
|
3577 |
+
<input type="text" name="lightbox_close_btn_full_color" id="lightbox_close_btn_full_color" value="<?php echo $row->lightbox_close_btn_full_color; ?>" class="jscolor"/>
|
3578 |
</td>
|
3579 |
</tr>
|
3580 |
<tr id="lightbox_comment24">
|
3581 |
<td class="spider_label"><label for="lightbox_comment_share_button_color"><?php echo __('Share buttons color:', BWG()->prefix); ?> </label></td>
|
3582 |
<td>
|
3583 |
+
<input type="text" name="lightbox_comment_share_button_color" id="lightbox_comment_share_button_color" value="<?php echo $row->lightbox_comment_share_button_color; ?>" class="jscolor" />
|
3584 |
</td>
|
3585 |
</tr>
|
3586 |
</tbody>
|
3610 |
<tr id="lightbox_right_left7">
|
3611 |
<td class="spider_label"><label for="lightbox_rl_btn_bg_color"><?php echo __('Right, left buttons background color:', BWG()->prefix); ?> </label></td>
|
3612 |
<td>
|
3613 |
+
<input type="text" name="lightbox_rl_btn_bg_color" id="lightbox_rl_btn_bg_color" value="<?php echo $row->lightbox_rl_btn_bg_color; ?>" class="jscolor"/>
|
3614 |
</td>
|
3615 |
</tr>
|
3616 |
<tr>
|
3647 |
<tr id="lightbox_close15">
|
3648 |
<td class="spider_label"><label for="lightbox_close_rl_btn_hover_color"><?php echo __('Right, left, close buttons hover color:', BWG()->prefix); ?> </label></td>
|
3649 |
<td>
|
3650 |
+
<input type="text" name="lightbox_close_rl_btn_hover_color" id="lightbox_close_rl_btn_hover_color" value="<?php echo $row->lightbox_close_rl_btn_hover_color; ?>" class="jscolor" />
|
3651 |
</td>
|
3652 |
</tr>
|
3653 |
<tr id="lightbox_right_left10">
|
3654 |
<td class="spider_label"><label for="lightbox_rl_btn_color"><?php echo __('Right, left buttons color:', BWG()->prefix); ?> </label></td>
|
3655 |
<td>
|
3656 |
+
<input type="text" name="lightbox_rl_btn_color" id="lightbox_rl_btn_color" value="<?php echo $row->lightbox_rl_btn_color; ?>" class="jscolor"/>
|
3657 |
</td>
|
3658 |
</tr>
|
3659 |
<tr id="lightbox_right_left1">
|
3686 |
<tr id="lightbox_right_left9">
|
3687 |
<td class="spider_label"><label for="lightbox_rl_btn_border_color"><?php echo __('Right, left buttons border color:', BWG()->prefix); ?> </label></td>
|
3688 |
<td>
|
3689 |
+
<input type="text" name="lightbox_rl_btn_border_color" id="lightbox_rl_btn_border_color" value="<?php echo $row->lightbox_rl_btn_border_color; ?>" class="jscolor"/>
|
3690 |
</td>
|
3691 |
</tr>
|
3692 |
<tr id="lightbox_filmstrip12">
|
3730 |
<tr id="lightbox_filmstrip10">
|
3731 |
<td class="spider_label"><label for="lightbox_filmstrip_thumb_border_color"><?php echo __('Filmstrip thumbnail border color:', BWG()->prefix); ?> </label></td>
|
3732 |
<td>
|
3733 |
+
<input type="text" name="lightbox_filmstrip_thumb_border_color" id="lightbox_filmstrip_thumb_border_color" value="<?php echo $row->lightbox_filmstrip_thumb_border_color; ?>" class="jscolor" />
|
3734 |
</td>
|
3735 |
</tr>
|
3736 |
<tr id="lightbox_filmstrip4">
|
3749 |
<tr id="lightbox_filmstrip11">
|
3750 |
<td class="spider_label"> <label for="lightbox_filmstrip_thumb_active_border_color"><?php echo __('Filmstrip thumbnail active border color:', BWG()->prefix); ?></label></td>
|
3751 |
<td>
|
3752 |
+
<input type="text" name="lightbox_filmstrip_thumb_active_border_color" id="lightbox_filmstrip_thumb_active_border_color" value="<?php echo $row->lightbox_filmstrip_thumb_active_border_color; ?>" class="jscolor"/>
|
3753 |
</td>
|
3754 |
</tr>
|
3755 |
<tr id="lightbox_filmstrip5">
|
3768 |
<tr id="lightbox_filmstrip7">
|
3769 |
<td class="spider_label"><label for="lightbox_filmstrip_rl_btn_color"><?php echo __('Filmstrip right, left buttons color:', BWG()->prefix); ?> </label></td>
|
3770 |
<td>
|
3771 |
+
<input type="text" name="lightbox_filmstrip_rl_btn_color" id="lightbox_filmstrip_rl_btn_color" value="<?php echo $row->lightbox_filmstrip_rl_btn_color; ?>" class="jscolor"/>
|
3772 |
</td>
|
3773 |
</tr>
|
3774 |
<tr id="lightbox_filmstrip8">
|
3775 |
<td class="spider_label"><label for="lightbox_filmstrip_rl_bg_color"><?php echo __('Filmstrip right, left button background color:', BWG()->prefix); ?></label></td>
|
3776 |
<td>
|
3777 |
+
<input type="text" name="lightbox_filmstrip_rl_bg_color" id="lightbox_filmstrip_rl_bg_color" value="<?php echo $row->lightbox_filmstrip_rl_bg_color; ?>" class="jscolor"/>
|
3778 |
</td>
|
3779 |
</tr>
|
3780 |
<tr>
|
3817 |
<tr>
|
3818 |
<td class="spider_label"><label for="lightbox_rate_color"><?php echo __('Rating color:', BWG()->prefix); ?> </label></td>
|
3819 |
<td>
|
3820 |
+
<input type="text" name="lightbox_rate_color" id="lightbox_rate_color" value="<?php echo $row->lightbox_rate_color; ?>" class="jscolor"/>
|
3821 |
</td>
|
3822 |
</tr>
|
3823 |
<tr>
|
3824 |
<td class="spider_label"><label for="lightbox_rate_hover_color"><?php echo __('Rating hover color:', BWG()->prefix); ?> </label></td>
|
3825 |
<td>
|
3826 |
+
<input type="text" name="lightbox_rate_hover_color" id="lightbox_rate_hover_color" value="<?php echo $row->lightbox_rate_hover_color; ?>" class="jscolor"/>
|
3827 |
</td>
|
3828 |
</tr>
|
3829 |
<tr>
|
3871 |
<tr>
|
3872 |
<td class="spider_label"><label for="lightbox_hit_bg_color"><?php echo __('Hit counter background color:', BWG()->prefix); ?> </label></td>
|
3873 |
<td>
|
3874 |
+
<input type="text" name="lightbox_hit_bg_color" id="lightbox_hit_bg_color" value="<?php echo $row->lightbox_hit_bg_color; ?>" class="jscolor"/>
|
3875 |
</td>
|
3876 |
</tr>
|
3877 |
<tr>
|
3904 |
<tr>
|
3905 |
<td class="spider_label"><label for="lightbox_hit_border_color"><?php echo __('Hit counter border color:', BWG()->prefix); ?> </label></td>
|
3906 |
<td>
|
3907 |
+
<input type="text" name="lightbox_hit_border_color" id="lightbox_hit_border_color" value="<?php echo $row->lightbox_hit_border_color; ?>" class="jscolor"/>
|
3908 |
</td>
|
3909 |
</tr>
|
3910 |
<tr>
|
3931 |
<tr>
|
3932 |
<td class="spider_label"><label for="lightbox_hit_color"><?php echo __('Hit counter font color:', BWG()->prefix); ?> </label></td>
|
3933 |
<td>
|
3934 |
+
<input type="text" name="lightbox_hit_color" id="lightbox_hit_color" value="<?php echo $row->lightbox_hit_color; ?>" class="jscolor"/>
|
3935 |
</td>
|
3936 |
</tr>
|
3937 |
<tr>
|
3995 |
<tr>
|
3996 |
<td class="spider_label"><label for="lightbox_info_bg_color"><?php echo __('Info background color:', BWG()->prefix); ?> </label></td>
|
3997 |
<td>
|
3998 |
+
<input type="text" name="lightbox_info_bg_color" id="lightbox_info_bg_color" value="<?php echo $row->lightbox_info_bg_color; ?>" class="jscolor"/>
|
3999 |
</td>
|
4000 |
</tr>
|
4001 |
<tr>
|
4028 |
<tr>
|
4029 |
<td class="spider_label"><label for="lightbox_info_border_color"><?php echo __('Info border color:', BWG()->prefix); ?> </label></td>
|
4030 |
<td>
|
4031 |
+
<input type="text" name="lightbox_info_border_color" id="lightbox_info_border_color" value="<?php echo $row->lightbox_info_border_color; ?>" class="jscolor"/>
|
4032 |
</td>
|
4033 |
</tr>
|
4034 |
<tr>
|
4055 |
<tr>
|
4056 |
<td class="spider_label"><label for="lightbox_title_color"><?php echo __('Title font color:', BWG()->prefix); ?> </label></td>
|
4057 |
<td>
|
4058 |
+
<input type="text" name="lightbox_title_color" id="lightbox_title_color" value="<?php echo $row->lightbox_title_color; ?>" class="jscolor"/>
|
4059 |
</td>
|
4060 |
</tr>
|
4061 |
<tr>
|
4086 |
<tr>
|
4087 |
<td class="spider_label"><label for="lightbox_description_color"><?php echo __('Description font color:', BWG()->prefix); ?> </label></td>
|
4088 |
<td>
|
4089 |
+
<input type="text" name="lightbox_description_color" id="lightbox_description_color" value="<?php echo $row->lightbox_description_color; ?>" class="jscolor"/>
|
4090 |
</td>
|
4091 |
</tr>
|
4092 |
<tr>
|
4132 |
<tr id="lightbox_comment13">
|
4133 |
<td class="spider_label"><label for="lightbox_comment_bg_color"><?php echo __('Comments background color:', BWG()->prefix); ?> </label></td>
|
4134 |
<td>
|
4135 |
+
<input type="text" name="lightbox_comment_bg_color" id="lightbox_comment_bg_color" value="<?php echo $row->lightbox_comment_bg_color; ?>" class="jscolor"/>
|
4136 |
</td>
|
4137 |
</tr>
|
4138 |
<tr id="lightbox_comment2">
|
4144 |
<tr id="lightbox_comment14">
|
4145 |
<td class="spider_label"><label for="lightbox_comment_font_color"><?php echo __('Comments font color:', BWG()->prefix); ?></label></td>
|
4146 |
<td>
|
4147 |
+
<input type="text" name="lightbox_comment_font_color" id="lightbox_comment_font_color" value="<?php echo $row->lightbox_comment_font_color; ?>" class="jscolor"/>
|
4148 |
</td>
|
4149 |
</tr>
|
4150 |
<tr id="lightbox_comment15">
|
4193 |
<tr id="lightbox_comment20">
|
4194 |
<td class="spider_label"><label for="lightbox_comment_input_border_color"><?php echo __('Comment input border color:', BWG()->prefix); ?> </label></td>
|
4195 |
<td>
|
4196 |
+
<input type="text" name="lightbox_comment_input_border_color" id="lightbox_comment_input_border_color" value="<?php echo $row->lightbox_comment_input_border_color; ?>" class="jscolor"/>
|
4197 |
</td>
|
4198 |
</tr>
|
4199 |
<tr id="lightbox_comment7">
|
4212 |
<tr id="lightbox_comment19">
|
4213 |
<td class="spider_label"><label for="lightbox_comment_input_bg_color"><?php echo __('Comment input background color:', BWG()->prefix); ?> </label></td>
|
4214 |
<td>
|
4215 |
+
<input type="text" name="lightbox_comment_input_bg_color" id="lightbox_comment_input_bg_color" value="<?php echo $row->lightbox_comment_input_bg_color; ?>" class="jscolor"/>
|
4216 |
</td>
|
4217 |
</tr>
|
4218 |
<tr id="lightbox_comment16">
|
4219 |
<td class="spider_label"><label for="lightbox_comment_button_bg_color"><?php echo __('Comment button background color:', BWG()->prefix); ?> </label></td>
|
4220 |
<td>
|
4221 |
+
<input type="text" name="lightbox_comment_button_bg_color" id="lightbox_comment_button_bg_color" value="<?php echo $row->lightbox_comment_button_bg_color; ?>" class="jscolor"/>
|
4222 |
</td>
|
4223 |
</tr>
|
4224 |
<tr id="lightbox_comment5">
|
4251 |
<tr id="lightbox_comment17">
|
4252 |
<td class="spider_label"><label for="lightbox_comment_button_border_color"><?php echo __('Comment button border color:', BWG()->prefix); ?> </label></td>
|
4253 |
<td>
|
4254 |
+
<input type="text" name="lightbox_comment_button_border_color" id="lightbox_comment_button_border_color" value="<?php echo $row->lightbox_comment_button_border_color; ?>" class="jscolor"/>
|
4255 |
</td>
|
4256 |
</tr>
|
4257 |
<tr id="lightbox_comment4">
|
4284 |
<tr id="lightbox_comment23">
|
4285 |
<td class="spider_label"><label for="lightbox_comment_separator_color"><?php echo __('Comment separator color:', BWG()->prefix); ?> </label></td>
|
4286 |
<td>
|
4287 |
+
<input type="text" name="lightbox_comment_separator_color" id="lightbox_comment_separator_color" value="<?php echo $row->lightbox_comment_separator_color; ?>" class="jscolor"/>
|
4288 |
</td>
|
4289 |
</tr>
|
4290 |
</tbody>
|
4310 |
<tr>
|
4311 |
<td class="spider_label"><label for="page_nav_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
4312 |
<td>
|
4313 |
+
<input type="text" name="page_nav_font_color" id="page_nav_font_color" value="<?php echo $row->page_nav_font_color; ?>" class="jscolor"/>
|
4314 |
</td>
|
4315 |
</tr>
|
4316 |
<tr>
|
4354 |
<tr>
|
4355 |
<td class="spider_label"><label for="page_nav_border_color"><?php echo __('Border color:', BWG()->prefix); ?></label></td>
|
4356 |
<td>
|
4357 |
+
<input type="text" name="page_nav_border_color" id="page_nav_border_color" value="<?php echo $row->page_nav_border_color; ?>" class="jscolor"/>
|
4358 |
</td>
|
4359 |
</tr>
|
4360 |
<tr>
|
4391 |
<tr>
|
4392 |
<td class="spider_label"><label for="page_nav_button_bg_color"><?php echo __('Button background color:', BWG()->prefix); ?> </label></td>
|
4393 |
<td>
|
4394 |
+
<input type="text" name="page_nav_button_bg_color" id="page_nav_button_bg_color" value="<?php echo $row->page_nav_button_bg_color; ?>" class="jscolor" />
|
4395 |
</td>
|
4396 |
</tr>
|
4397 |
<tr>
|
4486 |
<tr>
|
4487 |
<td class="spider_label"><label for="carousel_cont_bg_color"><?php echo __('Background color:', BWG()->prefix); ?> </label></td>
|
4488 |
<td>
|
4489 |
+
<input type="text" name="carousel_cont_bg_color" id="carousel_cont_bg_color" value="<?php echo $row->carousel_cont_bg_color; ?>" class="jscolor"/>
|
4490 |
</td>
|
4491 |
</tr>
|
4492 |
<tr>
|
4511 |
<tr>
|
4512 |
<td class="spider_label"><label for="carousel_rl_btn_color"><?php echo __('Buttons color:', BWG()->prefix); ?> </label></td>
|
4513 |
<td>
|
4514 |
+
<input type="text" name="carousel_rl_btn_color" id="carousel_rl_btn_color" value="<?php echo $row->carousel_rl_btn_color; ?>" class="jscolor"/>
|
4515 |
</td>
|
4516 |
</tr>
|
4517 |
<tr>
|
4524 |
<tr>
|
4525 |
<td class="spider_label"><label for="carousel_close_rl_btn_hover_color"><?php echo __('Buttons hover color:', BWG()->prefix); ?> </label></td>
|
4526 |
<td>
|
4527 |
+
<input type="text" name="carousel_close_rl_btn_hover_color" id="carousel_close_rl_btn_hover_color" value="<?php echo $row->carousel_close_rl_btn_hover_color; ?>" class="jscolor"/>
|
4528 |
</td>
|
4529 |
</tr>
|
4530 |
<tr>
|
4542 |
<tr>
|
4543 |
<td class="spider_label"><label for="carousel_rl_btn_bg_color"><?php echo __('Right, left buttons background color:', BWG()->prefix); ?> </label></td>
|
4544 |
<td>
|
4545 |
+
<input type="text" name="carousel_rl_btn_bg_color" id="carousel_rl_btn_bg_color" value="<?php echo $row->carousel_rl_btn_bg_color; ?>" class="jscolor"/>
|
4546 |
</td>
|
4547 |
</tr>
|
4548 |
<tr>
|
4568 |
<tr>
|
4569 |
<td class="spider_label"><label for="carousel_rl_btn_border_color"><?php echo __('Right, left buttons border color:', BWG()->prefix); ?> </label></td>
|
4570 |
<td>
|
4571 |
+
<input type="text" name="carousel_rl_btn_border_color" id="slideshow_rl_btn_border_color" value="<?php echo $row->carousel_rl_btn_border_color; ?>" class="jscolor"/>
|
4572 |
</td>
|
4573 |
</tr>
|
4574 |
<tr>
|
4633 |
<tr>
|
4634 |
<td class="spider_label"><label for="carousel_feature_border_color"><?php echo __('Image border color:', BWG()->prefix); ?> </label></td>
|
4635 |
<td>
|
4636 |
+
<input type="text" name="carousel_feature_border_color" id="carousel_feature_border_color" value="<?php echo $row->carousel_feature_border_color; ?>" class="jscolor"/>
|
4637 |
</td>
|
4638 |
</tr>
|
4639 |
</tbody>
|
4649 |
<tr>
|
4650 |
<td class="spider_label"><label for="carousel_caption_background_color"><?php echo __('Title background color:', BWG()->prefix); ?> </label></td>
|
4651 |
<td>
|
4652 |
+
<input type="text" name="carousel_caption_background_color" id="carousel_caption_background_color" value="<?php echo $row->carousel_caption_background_color; ?>" class="jscolor"/>
|
4653 |
</td>
|
4654 |
</tr>
|
4655 |
|
4692 |
<tr>
|
4693 |
<td class="spider_label"><label for="carousel_caption_p_color"><?php echo __('Title color:', BWG()->prefix); ?> </label></td>
|
4694 |
<td>
|
4695 |
+
<input type="text" name="carousel_caption_p_color" id="carousel_caption_p_color" value="<?php echo $row->carousel_caption_p_color; ?>" class="jscolor"/>
|
4696 |
</td>
|
4697 |
</tr>
|
4698 |
<tr>
|
4719 |
<tr>
|
4720 |
<td class="spider_label"><label for="carousel_gal_title_font_color"><?php echo __('Gallery title/description font color:', BWG()->prefix); ?> </label></td>
|
4721 |
<td>
|
4722 |
+
<input type="text" name="carousel_gal_title_font_color" id="carousel_gal_title_font_color" value="<?php echo $row->carousel_gal_title_font_color; ?>" class="jscolor" />
|
4723 |
</td>
|
4724 |
</tr>
|
4725 |
<tr>
|
4809 |
</tr>
|
4810 |
<tr>
|
4811 |
<td class="spider_label"><label for="tags_but_font_color"><?php echo __('Font color:', BWG()->prefix); ?> </label></td>
|
4812 |
+
<td><input type="text" name="tags_but_font_color" id="tags_but_font_color" value="<?php echo $row->tags_but_font_color; ?>" class="jscolor"/></td>
|
4813 |
</tr>
|
4814 |
<tr>
|
4815 |
<!--generate font style with google fonts -->
|
4857 |
</tr>
|
4858 |
<tr>
|
4859 |
<td class="spider_label"><label for="tags_but_border_color"><?php echo __('Border color:', BWG()->prefix); ?></label></td>
|
4860 |
+
<td><input type="text" name="tags_but_border_color" id="tags_but_border_color" value="<?php echo $row->tags_but_border_color; ?>" class="jscolor"/></td>
|
4861 |
</tr>
|
4862 |
<tr>
|
4863 |
<td class="spider_label"><label for="tags_but_border_radius"><?php echo __('Border radius:', BWG()->prefix); ?> </label></td>
|
4868 |
</tr>
|
4869 |
<tr>
|
4870 |
<td class="spider_label"><label for="tags_but_bg_color"><?php echo __('Button background color:', BWG()->prefix); ?> </label></td>
|
4871 |
+
<td><input type="text" name="tags_but_bg_color" id="tags_but_bg_color" value="<?php echo $row->tags_but_bg_color; ?>" class="jscolor" /></td>
|
4872 |
</tr>
|
4873 |
<tr>
|
4874 |
<td class="spider_label"><label for="tags_but_active_bg_color"><?php echo __('Active Button background color:', BWG()->prefix); ?> </label></td>
|
4875 |
+
<td><input type="text" name="tags_but_active_bg_color" id="tags_but_active_bg_color" value="<?php echo $row->tags_but_active_bg_color; ?>" class="jscolor" /></td>
|
4876 |
</tr>
|
4877 |
<tr>
|
4878 |
<td class="spider_label"><label for="tags_but_active_color"><?php echo __('Active Button font color:', BWG()->prefix); ?> </label></td>
|
4879 |
+
<td><input type="text" name="tags_but_active_color" id="tags_but_active_color" value="<?php echo $row->tags_but_active_color; ?>" class="jscolor" /></td>
|
4880 |
</tr>
|
4881 |
<tr>
|
4882 |
<td class="spider_label"><label for="tags_but_see_all_size"><?php echo __('See All Button Font size:', BWG()->prefix); ?> </label></td>
|
4886 |
</tr>
|
4887 |
<tr>
|
4888 |
<td class="spider_label"><label for="tags_but_see_all_color"><?php echo __('See All Button Font color:', BWG()->prefix); ?> </label></td>
|
4889 |
+
<td><input type="text" name="tags_but_see_all_color" id="tags_but_see_all_color" value="<?php echo $row->tags_but_see_all_color; ?>" class="jscolor"/></td>
|
4890 |
</tr>
|
4891 |
<tr>
|
4892 |
<td class="spider_label"><label for="tags_but_see_all_back_color"><?php echo __('See All Button background color:', BWG()->prefix); ?> </label></td>
|
4893 |
+
<td><input type="text" name="tags_but_see_all_back_color" id="tags_but_see_all_back_color" value="<?php echo $row->tags_but_see_all_back_color; ?>" class="jscolor" /></td>
|
4894 |
</tr>
|
4895 |
<tr>
|
4896 |
<td class="spider_label"><label for="tags_but_see_all_border_w"><?php echo __('See All Button Border width:', BWG()->prefix); ?> </label></td>
|
4910 |
</tr>
|
4911 |
<tr>
|
4912 |
<td class="spider_label"><label for="tags_but_see_all_border_c"><?php echo __('See All Button Border color:', BWG()->prefix); ?></label></td>
|
4913 |
+
<td><input type="text" name="tags_but_see_all_border_c" id="tags_but_see_all_border_c" value="<?php echo $row->tags_but_see_all_border_c; ?>" class="jscolor"/></td>
|
4914 |
</tr>
|
4915 |
<tr>
|
4916 |
<td class="spider_label"><label for="tags_but_see_all_border_r"><?php echo __('See All Button Border radius:', BWG()->prefix); ?> </label></td>
|
admin/views/WidgetTags.php
CHANGED
@@ -56,7 +56,7 @@ class WidgetTagsView_bwg {
|
|
56 |
* @param $instance
|
57 |
*/
|
58 |
function form($params, $instance) {
|
59 |
-
wp_register_script(BWG()->prefix . '_jscolor', BWG()->plugin_url . '/js/jscolor
|
60 |
wp_enqueue_script(BWG()->prefix . '_jscolor');
|
61 |
extract($params);
|
62 |
$defaults = array(
|
@@ -114,11 +114,11 @@ class WidgetTagsView_bwg {
|
|
114 |
</p>
|
115 |
<p id="p_bg_color" style="display:<?php echo (!$instance['background_transparent']) ? "" : "none" ?>;">
|
116 |
<label for="<?php echo $id_background_color; ?>"><?php _e('Background Color:', BWG()->prefix); ?></label><br>
|
117 |
-
<input class="
|
118 |
</p>
|
119 |
<p>
|
120 |
<label for="<?php echo $id_text_color; ?>"><?php _e('Text Color:', BWG()->prefix); ?></label><br>
|
121 |
-
<input class="
|
122 |
</p>
|
123 |
<p>
|
124 |
<label for="<?php echo $id_theme_id; ?>"><?php _e('Themes:', BWG()->prefix); ?></label><br>
|
56 |
* @param $instance
|
57 |
*/
|
58 |
function form($params, $instance) {
|
59 |
+
wp_register_script(BWG()->prefix . '_jscolor', BWG()->plugin_url . '/js/jquery.jscolor.js', array('jquery'), '2.4.5');
|
60 |
wp_enqueue_script(BWG()->prefix . '_jscolor');
|
61 |
extract($params);
|
62 |
$defaults = array(
|
114 |
</p>
|
115 |
<p id="p_bg_color" style="display:<?php echo (!$instance['background_transparent']) ? "" : "none" ?>;">
|
116 |
<label for="<?php echo $id_background_color; ?>"><?php _e('Background Color:', BWG()->prefix); ?></label><br>
|
117 |
+
<input class="jscolor" style="width:25%;" id="<?php echo $id_background_color; ?>" name="<?php echo $name_background_color; ?>'" type="text" value="<?php echo $instance['background_color']; ?>"/>
|
118 |
</p>
|
119 |
<p>
|
120 |
<label for="<?php echo $id_text_color; ?>"><?php _e('Text Color:', BWG()->prefix); ?></label><br>
|
121 |
+
<input class="jscolor" style="width:25%;" id="<?php echo $id_text_color; ?>" name="<?php echo $name_text_color; ?>'" type="text" value="<?php echo $instance['text_color']; ?>"/>
|
122 |
</p>
|
123 |
<p>
|
124 |
<label for="<?php echo $id_theme_id; ?>"><?php _e('Themes:', BWG()->prefix); ?></label><br>
|
css/bwg_frontend.css
CHANGED
@@ -312,6 +312,13 @@ div[id^="bwg_container"] div[id^="bwg_container"] .bwg_img_clear {
|
|
312 |
.bwg_image_rate {
|
313 |
z-index: 999 !important;
|
314 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
|
316 |
@media screen and (max-width: 465px) {
|
317 |
|
312 |
.bwg_image_rate {
|
313 |
z-index: 999 !important;
|
314 |
}
|
315 |
+
.bwg_image_rate_disabled {
|
316 |
+
display: none;
|
317 |
+
position: absolute;
|
318 |
+
width: 100%;
|
319 |
+
height: 40px;
|
320 |
+
top: 0px;
|
321 |
+
}
|
322 |
|
323 |
@media screen and (max-width: 465px) {
|
324 |
|
css/bwg_tables.css
CHANGED
@@ -1866,7 +1866,10 @@ li.tabs {
|
|
1866 |
#bwg_themes .wd-box-content select {
|
1867 |
max-width: 90%;
|
1868 |
}
|
1869 |
-
|
|
|
|
|
|
|
1870 |
.bwg-section.bwg-no-top-border {
|
1871 |
border-top: none;
|
1872 |
}
|
1866 |
#bwg_themes .wd-box-content select {
|
1867 |
max-width: 90%;
|
1868 |
}
|
1869 |
+
#bwg_themes .font-select {
|
1870 |
+
max-width: 85%;
|
1871 |
+
width: 100%;
|
1872 |
+
}
|
1873 |
.bwg-section.bwg-no-top-border {
|
1874 |
border-top: none;
|
1875 |
}
|
css/jquery.mCustomScrollbar.css
CHANGED
@@ -1,464 +1,1267 @@
|
|
1 |
-
/*
|
2 |
-
|
3 |
-
.
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
.
|
12 |
-
.
|
13 |
-
|
14 |
-
|
15 |
-
.
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
.
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
.
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
}
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
.
|
78 |
-
.
|
79 |
-
|
80 |
-
|
81 |
-
}
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
.
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
}
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
.
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
}
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
}
|
151 |
-
|
152 |
-
.
|
153 |
-
|
154 |
-
}
|
155 |
-
|
156 |
-
.mCSB_scrollTools
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
*/
|
167 |
-
|
168 |
-
.mCSB_scrollTools .
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
/*
|
183 |
-
|
|
|
|
|
184 |
*/
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
.mCSB_scrollTools .
|
189 |
-
|
190 |
-
|
191 |
-
}
|
192 |
-
|
193 |
-
.
|
194 |
-
.
|
195 |
-
.
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
.
|
206 |
-
|
207 |
-
|
208 |
-
}
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
}
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
.
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
}
|
228 |
-
|
229 |
-
.
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
}
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
}
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
.
|
266 |
-
|
267 |
-
|
268 |
-
.
|
269 |
-
|
270 |
-
|
271 |
-
.
|
272 |
-
|
273 |
-
}
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
background:rgba(0,0,0,0.
|
279 |
-
|
280 |
-
-
|
281 |
-
|
282 |
-
}
|
283 |
-
|
284 |
-
|
285 |
-
background
|
286 |
-
|
287 |
-
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
.mCS-dark
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
.mCS-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
.mCS-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
}
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
.mCS-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
background:rgba(255,255,255,0.
|
325 |
-
|
326 |
-
-
|
327 |
-
|
328 |
-
|
329 |
-
.mCS-light-
|
330 |
-
|
331 |
-
background
|
332 |
-
|
333 |
-
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
.mCS-
|
351 |
-
|
352 |
-
|
353 |
-
}
|
354 |
-
|
355 |
-
background-position
|
356 |
-
|
357 |
-
.mCS-
|
358 |
-
|
359 |
-
}
|
360 |
-
|
361 |
-
background-position
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
.mCS-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
}
|
396 |
-
|
397 |
-
.mCS-
|
398 |
-
|
399 |
-
|
400 |
-
.mCS-
|
401 |
-
|
402 |
-
}
|
403 |
-
|
404 |
-
background-position
|
405 |
-
|
406 |
-
.mCS-
|
407 |
-
|
408 |
-
}
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
.mCS-
|
414 |
-
|
415 |
-
|
416 |
-
}
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
.mCS-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
background
|
431 |
-
|
432 |
-
}
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
}
|
446 |
-
|
447 |
-
|
448 |
-
}
|
449 |
-
|
450 |
-
.mCS-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
}
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
background-
|
461 |
-
|
462 |
-
.mCS-dark-thin
|
463 |
-
|
464 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
== malihu jquery custom scrollbar plugin ==
|
3 |
+
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
|
4 |
+
*/
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
/*
|
9 |
+
CONTENTS:
|
10 |
+
1. BASIC STYLE - Plugin's basic/essential CSS properties (normally, should not be edited).
|
11 |
+
2. VERTICAL SCROLLBAR - Positioning and dimensions of vertical scrollbar.
|
12 |
+
3. HORIZONTAL SCROLLBAR - Positioning and dimensions of horizontal scrollbar.
|
13 |
+
4. VERTICAL AND HORIZONTAL SCROLLBARS - Positioning and dimensions of 2-axis scrollbars.
|
14 |
+
5. TRANSITIONS - CSS3 transitions for hover events, auto-expanded and auto-hidden scrollbars.
|
15 |
+
6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS
|
16 |
+
6.1 THEMES - Scrollbar colors, opacity, dimensions, backgrounds etc. via ready-to-use themes.
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
/*
|
22 |
+
------------------------------------------------------------------------------------------------------------------------
|
23 |
+
1. BASIC STYLE
|
24 |
+
------------------------------------------------------------------------------------------------------------------------
|
25 |
+
*/
|
26 |
+
|
27 |
+
.mCustomScrollbar{ -ms-touch-action: pinch-zoom; touch-action: pinch-zoom; /* direct pointer events to js */ }
|
28 |
+
.mCustomScrollbar.mCS_no_scrollbar, .mCustomScrollbar.mCS_touch_action{ -ms-touch-action: auto; touch-action: auto; }
|
29 |
+
|
30 |
+
.mCustomScrollBox{ /* contains plugin's markup */
|
31 |
+
position: relative;
|
32 |
+
overflow: hidden;
|
33 |
+
height: 100%;
|
34 |
+
max-width: 100%;
|
35 |
+
outline: none;
|
36 |
+
direction: ltr;
|
37 |
+
}
|
38 |
+
|
39 |
+
.mCSB_container{ /* contains the original content */
|
40 |
+
overflow: hidden;
|
41 |
+
width: auto;
|
42 |
+
height: auto;
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
/*
|
48 |
+
------------------------------------------------------------------------------------------------------------------------
|
49 |
+
2. VERTICAL SCROLLBAR
|
50 |
+
y-axis
|
51 |
+
------------------------------------------------------------------------------------------------------------------------
|
52 |
+
*/
|
53 |
+
|
54 |
+
.mCSB_inside > .mCSB_container{ margin-right: 30px; }
|
55 |
+
|
56 |
+
.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */
|
57 |
+
|
58 |
+
.mCS-dir-rtl > .mCSB_inside > .mCSB_container{ /* RTL direction/left-side scrollbar */
|
59 |
+
margin-right: 0;
|
60 |
+
margin-left: 30px;
|
61 |
+
}
|
62 |
+
|
63 |
+
.mCS-dir-rtl > .mCSB_inside > .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-left: 0; } /* RTL direction/left-side scrollbar */
|
64 |
+
|
65 |
+
.mCSB_scrollTools{ /* contains scrollbar markup (draggable element, dragger rail, buttons etc.) */
|
66 |
+
position: absolute;
|
67 |
+
width: 16px;
|
68 |
+
height: auto;
|
69 |
+
left: auto;
|
70 |
+
top: 0;
|
71 |
+
right: 0;
|
72 |
+
bottom: 0;
|
73 |
+
}
|
74 |
+
|
75 |
+
.mCSB_outside + .mCSB_scrollTools{ right: -26px; } /* scrollbar position: outside */
|
76 |
+
|
77 |
+
.mCS-dir-rtl > .mCSB_inside > .mCSB_scrollTools,
|
78 |
+
.mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ /* RTL direction/left-side scrollbar */
|
79 |
+
right: auto;
|
80 |
+
left: 0;
|
81 |
+
}
|
82 |
+
|
83 |
+
.mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ left: -26px; } /* RTL direction/left-side scrollbar (scrollbar position: outside) */
|
84 |
+
|
85 |
+
.mCSB_scrollTools .mCSB_draggerContainer{ /* contains the draggable element and dragger rail markup */
|
86 |
+
position: absolute;
|
87 |
+
top: 0;
|
88 |
+
left: 0;
|
89 |
+
bottom: 0;
|
90 |
+
right: 0;
|
91 |
+
height: auto;
|
92 |
+
}
|
93 |
+
|
94 |
+
.mCSB_scrollTools a + .mCSB_draggerContainer{ margin: 20px 0; }
|
95 |
+
|
96 |
+
.mCSB_scrollTools .mCSB_draggerRail{
|
97 |
+
width: 2px;
|
98 |
+
height: 100%;
|
99 |
+
margin: 0 auto;
|
100 |
+
-webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
|
101 |
+
}
|
102 |
+
|
103 |
+
.mCSB_scrollTools .mCSB_dragger{ /* the draggable element */
|
104 |
+
cursor: pointer;
|
105 |
+
width: 100%;
|
106 |
+
height: 30px; /* minimum dragger height */
|
107 |
+
z-index: 1;
|
108 |
+
}
|
109 |
+
|
110 |
+
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ /* the dragger element */
|
111 |
+
position: relative;
|
112 |
+
width: 4px;
|
113 |
+
height: 100%;
|
114 |
+
margin: 0 auto;
|
115 |
+
-webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
|
116 |
+
text-align: center;
|
117 |
+
}
|
118 |
+
|
119 |
+
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
120 |
+
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ width: 12px; /* auto-expanded scrollbar */ }
|
121 |
+
|
122 |
+
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
123 |
+
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 8px; /* auto-expanded scrollbar */ }
|
124 |
+
|
125 |
+
.mCSB_scrollTools .mCSB_buttonUp,
|
126 |
+
.mCSB_scrollTools .mCSB_buttonDown{
|
127 |
+
display: block;
|
128 |
+
position: absolute;
|
129 |
+
height: 20px;
|
130 |
+
width: 100%;
|
131 |
+
overflow: hidden;
|
132 |
+
margin: 0 auto;
|
133 |
+
cursor: pointer;
|
134 |
+
}
|
135 |
+
|
136 |
+
.mCSB_scrollTools .mCSB_buttonDown{ bottom: 0; }
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
/*
|
141 |
+
------------------------------------------------------------------------------------------------------------------------
|
142 |
+
3. HORIZONTAL SCROLLBAR
|
143 |
+
x-axis
|
144 |
+
------------------------------------------------------------------------------------------------------------------------
|
145 |
+
*/
|
146 |
+
|
147 |
+
.mCSB_horizontal.mCSB_inside > .mCSB_container{
|
148 |
+
margin-right: 0;
|
149 |
+
margin-bottom: 30px;
|
150 |
+
}
|
151 |
+
|
152 |
+
.mCSB_horizontal.mCSB_outside > .mCSB_container{ min-height: 100%; }
|
153 |
+
|
154 |
+
.mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } /* non-visible scrollbar */
|
155 |
+
|
156 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal{
|
157 |
+
width: auto;
|
158 |
+
height: 16px;
|
159 |
+
top: auto;
|
160 |
+
right: 0;
|
161 |
+
bottom: 0;
|
162 |
+
left: 0;
|
163 |
+
}
|
164 |
+
|
165 |
+
.mCustomScrollBox + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
166 |
+
.mCustomScrollBox + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ bottom: -26px; } /* scrollbar position: outside */
|
167 |
+
|
168 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal a + .mCSB_draggerContainer{ margin: 0 20px; }
|
169 |
+
|
170 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
171 |
+
width: 100%;
|
172 |
+
height: 2px;
|
173 |
+
margin: 7px 0;
|
174 |
+
}
|
175 |
+
|
176 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{
|
177 |
+
width: 30px; /* minimum dragger width */
|
178 |
+
height: 100%;
|
179 |
+
left: 0;
|
180 |
+
}
|
181 |
+
|
182 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
183 |
+
width: 100%;
|
184 |
+
height: 4px;
|
185 |
+
margin: 6px auto;
|
186 |
+
}
|
187 |
+
|
188 |
+
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
189 |
+
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
|
190 |
+
height: 12px; /* auto-expanded scrollbar */
|
191 |
+
margin: 2px auto;
|
192 |
+
}
|
193 |
+
|
194 |
+
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
195 |
+
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
196 |
+
height: 8px; /* auto-expanded scrollbar */
|
197 |
+
margin: 4px 0;
|
198 |
+
}
|
199 |
+
|
200 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,
|
201 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{
|
202 |
+
display: block;
|
203 |
+
position: absolute;
|
204 |
+
width: 20px;
|
205 |
+
height: 100%;
|
206 |
+
overflow: hidden;
|
207 |
+
margin: 0 auto;
|
208 |
+
cursor: pointer;
|
209 |
+
}
|
210 |
+
|
211 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{ left: 0; }
|
212 |
+
|
213 |
+
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ right: 0; }
|
214 |
+
|
215 |
+
|
216 |
+
|
217 |
+
/*
|
218 |
+
------------------------------------------------------------------------------------------------------------------------
|
219 |
+
4. VERTICAL AND HORIZONTAL SCROLLBARS
|
220 |
+
yx-axis
|
221 |
+
------------------------------------------------------------------------------------------------------------------------
|
222 |
+
*/
|
223 |
+
|
224 |
+
.mCSB_container_wrapper{
|
225 |
+
position: absolute;
|
226 |
+
height: auto;
|
227 |
+
width: auto;
|
228 |
+
overflow: hidden;
|
229 |
+
top: 0;
|
230 |
+
left: 0;
|
231 |
+
right: 0;
|
232 |
+
bottom: 0;
|
233 |
+
margin-right: 30px;
|
234 |
+
margin-bottom: 30px;
|
235 |
+
}
|
236 |
+
|
237 |
+
.mCSB_container_wrapper > .mCSB_container{
|
238 |
+
padding-right: 30px;
|
239 |
+
padding-bottom: 30px;
|
240 |
+
-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
|
241 |
+
}
|
242 |
+
|
243 |
+
.mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 20px; }
|
244 |
+
|
245 |
+
.mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 20px; }
|
246 |
+
|
247 |
+
/* non-visible horizontal scrollbar */
|
248 |
+
.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden + .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 0; }
|
249 |
+
|
250 |
+
/* non-visible vertical scrollbar/RTL direction/left-side scrollbar */
|
251 |
+
.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
252 |
+
.mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 0; }
|
253 |
+
|
254 |
+
/* RTL direction/left-side scrollbar */
|
255 |
+
.mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 20px; }
|
256 |
+
|
257 |
+
/* non-visible scrollbar/RTL direction/left-side scrollbar */
|
258 |
+
.mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 0; }
|
259 |
+
|
260 |
+
.mCS-dir-rtl > .mCSB_inside > .mCSB_container_wrapper{ /* RTL direction/left-side scrollbar */
|
261 |
+
margin-right: 0;
|
262 |
+
margin-left: 30px;
|
263 |
+
}
|
264 |
+
|
265 |
+
.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden > .mCSB_container{ padding-right: 0; }
|
266 |
+
|
267 |
+
.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden > .mCSB_container{ padding-bottom: 0; }
|
268 |
+
|
269 |
+
.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{
|
270 |
+
margin-right: 0; /* non-visible scrollbar */
|
271 |
+
margin-left: 0;
|
272 |
+
}
|
273 |
+
|
274 |
+
/* non-visible horizontal scrollbar */
|
275 |
+
.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; }
|
276 |
+
|
277 |
+
|
278 |
+
|
279 |
+
/*
|
280 |
+
------------------------------------------------------------------------------------------------------------------------
|
281 |
+
5. TRANSITIONS
|
282 |
+
------------------------------------------------------------------------------------------------------------------------
|
283 |
+
*/
|
284 |
+
|
285 |
+
.mCSB_scrollTools,
|
286 |
+
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
287 |
+
.mCSB_scrollTools .mCSB_buttonUp,
|
288 |
+
.mCSB_scrollTools .mCSB_buttonDown,
|
289 |
+
.mCSB_scrollTools .mCSB_buttonLeft,
|
290 |
+
.mCSB_scrollTools .mCSB_buttonRight{
|
291 |
+
-webkit-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
292 |
+
-moz-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
293 |
+
-o-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
294 |
+
transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
295 |
+
}
|
296 |
+
|
297 |
+
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, /* auto-expanded scrollbar */
|
298 |
+
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,
|
299 |
+
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,
|
300 |
+
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{
|
301 |
+
-webkit-transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
302 |
+
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
303 |
+
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
304 |
+
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
305 |
+
-moz-transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
306 |
+
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
307 |
+
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
308 |
+
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
309 |
+
-o-transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
310 |
+
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
311 |
+
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
312 |
+
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
313 |
+
transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
314 |
+
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
315 |
+
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
316 |
+
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
317 |
+
}
|
318 |
+
|
319 |
+
|
320 |
+
|
321 |
+
/*
|
322 |
+
------------------------------------------------------------------------------------------------------------------------
|
323 |
+
6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS
|
324 |
+
------------------------------------------------------------------------------------------------------------------------
|
325 |
+
*/
|
326 |
+
|
327 |
/*
|
328 |
+
----------------------------------------
|
329 |
+
6.1 THEMES
|
330 |
+
----------------------------------------
|
331 |
*/
|
332 |
+
|
333 |
+
/* default theme ("light") */
|
334 |
+
|
335 |
+
.mCSB_scrollTools{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
|
336 |
+
|
337 |
+
.mCS-autoHide > .mCustomScrollBox > .mCSB_scrollTools,
|
338 |
+
.mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 0; filter: "alpha(opacity=0)"; -ms-filter: "alpha(opacity=0)"; }
|
339 |
+
|
340 |
+
.mCustomScrollbar > .mCustomScrollBox > .mCSB_scrollTools.mCSB_scrollTools_onDrag,
|
341 |
+
.mCustomScrollbar > .mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag,
|
342 |
+
.mCustomScrollBox:hover > .mCSB_scrollTools,
|
343 |
+
.mCustomScrollBox:hover ~ .mCSB_scrollTools,
|
344 |
+
.mCS-autoHide:hover > .mCustomScrollBox > .mCSB_scrollTools,
|
345 |
+
.mCS-autoHide:hover > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 1; filter: "alpha(opacity=100)"; -ms-filter: "alpha(opacity=100)"; }
|
346 |
+
|
347 |
+
.mCSB_scrollTools .mCSB_draggerRail{
|
348 |
+
background-color: #000; background-color: rgba(0,0,0,0.4);
|
349 |
+
filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
|
350 |
+
}
|
351 |
+
|
352 |
+
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
353 |
+
background-color: #fff; background-color: rgba(255,255,255,0.75);
|
354 |
+
filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)";
|
355 |
+
}
|
356 |
+
|
357 |
+
.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
|
358 |
+
background-color: #fff; background-color: rgba(255,255,255,0.85);
|
359 |
+
filter: "alpha(opacity=85)"; -ms-filter: "alpha(opacity=85)";
|
360 |
+
}
|
361 |
+
.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
362 |
+
.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
363 |
+
background-color: #fff; background-color: rgba(255,255,255,0.9);
|
364 |
+
filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)";
|
365 |
+
}
|
366 |
+
|
367 |
+
.mCSB_scrollTools .mCSB_buttonUp,
|
368 |
+
.mCSB_scrollTools .mCSB_buttonDown,
|
369 |
+
.mCSB_scrollTools .mCSB_buttonLeft,
|
370 |
+
.mCSB_scrollTools .mCSB_buttonRight{
|
371 |
+
background-image: url(mCSB_buttons.png); /* css sprites */
|
372 |
+
background-repeat: no-repeat;
|
373 |
+
opacity: 0.4; filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
|
374 |
+
}
|
375 |
+
|
376 |
+
.mCSB_scrollTools .mCSB_buttonUp{
|
377 |
+
background-position: 0 0;
|
378 |
+
/*
|
379 |
+
sprites locations
|
380 |
+
light: 0 0, -16px 0, -32px 0, -48px 0, 0 -72px, -16px -72px, -32px -72px
|
381 |
+
dark: -80px 0, -96px 0, -112px 0, -128px 0, -80px -72px, -96px -72px, -112px -72px
|
382 |
+
*/
|
383 |
+
}
|
384 |
+
|
385 |
+
.mCSB_scrollTools .mCSB_buttonDown{
|
386 |
+
background-position: 0 -20px;
|
387 |
+
/*
|
388 |
+
sprites locations
|
389 |
+
light: 0 -20px, -16px -20px, -32px -20px, -48px -20px, 0 -92px, -16px -92px, -32px -92px
|
390 |
+
dark: -80px -20px, -96px -20px, -112px -20px, -128px -20px, -80px -92px, -96px -92px, -112 -92px
|
391 |
+
*/
|
392 |
+
}
|
393 |
+
|
394 |
+
.mCSB_scrollTools .mCSB_buttonLeft{
|
395 |
+
background-position: 0 -40px;
|
396 |
+
/*
|
397 |
+
sprites locations
|
398 |
+
light: 0 -40px, -20px -40px, -40px -40px, -60px -40px, 0 -112px, -20px -112px, -40px -112px
|
399 |
+
dark: -80px -40px, -100px -40px, -120px -40px, -140px -40px, -80px -112px, -100px -112px, -120px -112px
|
400 |
+
*/
|
401 |
+
}
|
402 |
+
|
403 |
+
.mCSB_scrollTools .mCSB_buttonRight{
|
404 |
+
background-position: 0 -56px;
|
405 |
+
/*
|
406 |
+
sprites locations
|
407 |
+
light: 0 -56px, -20px -56px, -40px -56px, -60px -56px, 0 -128px, -20px -128px, -40px -128px
|
408 |
+
dark: -80px -56px, -100px -56px, -120px -56px, -140px -56px, -80px -128px, -100px -128px, -120px -128px
|
409 |
+
*/
|
410 |
+
}
|
411 |
+
|
412 |
+
.mCSB_scrollTools .mCSB_buttonUp:hover,
|
413 |
+
.mCSB_scrollTools .mCSB_buttonDown:hover,
|
414 |
+
.mCSB_scrollTools .mCSB_buttonLeft:hover,
|
415 |
+
.mCSB_scrollTools .mCSB_buttonRight:hover{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
|
416 |
+
|
417 |
+
.mCSB_scrollTools .mCSB_buttonUp:active,
|
418 |
+
.mCSB_scrollTools .mCSB_buttonDown:active,
|
419 |
+
.mCSB_scrollTools .mCSB_buttonLeft:active,
|
420 |
+
.mCSB_scrollTools .mCSB_buttonRight:active{ opacity: 0.9; filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; }
|
421 |
+
|
422 |
+
|
423 |
+
/* theme: "dark" */
|
424 |
+
|
425 |
+
.mCS-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
|
426 |
+
|
427 |
+
.mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
428 |
+
|
429 |
+
.mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.85); }
|
430 |
+
|
431 |
+
.mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
432 |
+
.mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.9); }
|
433 |
+
|
434 |
+
.mCS-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
|
435 |
+
|
436 |
+
.mCS-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
|
437 |
+
|
438 |
+
.mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
|
439 |
+
|
440 |
+
.mCS-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
|
441 |
+
|
442 |
+
/* ---------------------------------------- */
|
443 |
+
|
444 |
+
|
445 |
+
|
446 |
+
/* theme: "light-2", "dark-2" */
|
447 |
+
|
448 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_draggerRail,
|
449 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
|
450 |
+
width: 4px;
|
451 |
+
background-color: #fff; background-color: rgba(255,255,255,0.1);
|
452 |
+
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
453 |
+
}
|
454 |
+
|
455 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
456 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
457 |
+
width: 4px;
|
458 |
+
background-color: #fff; background-color: rgba(255,255,255,0.75);
|
459 |
+
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
460 |
+
}
|
461 |
+
|
462 |
+
.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
463 |
+
.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
464 |
+
.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
465 |
+
.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
466 |
+
width: 100%;
|
467 |
+
height: 4px;
|
468 |
+
margin: 6px auto;
|
469 |
+
}
|
470 |
+
|
471 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
|
472 |
+
|
473 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
474 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
|
475 |
+
|
476 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px 0; }
|
477 |
+
|
478 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -20px; }
|
479 |
+
|
480 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -40px; }
|
481 |
+
|
482 |
+
.mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -56px; }
|
483 |
+
|
484 |
+
|
485 |
+
/* theme: "dark-2" */
|
486 |
+
|
487 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
|
488 |
+
background-color: #000; background-color: rgba(0,0,0,0.1);
|
489 |
+
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
490 |
+
}
|
491 |
+
|
492 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
493 |
+
background-color: #000; background-color: rgba(0,0,0,0.75);
|
494 |
+
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
495 |
+
}
|
496 |
+
|
497 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
498 |
+
|
499 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
500 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
501 |
+
|
502 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px 0; }
|
503 |
+
|
504 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -20px; }
|
505 |
+
|
506 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -40px; }
|
507 |
+
|
508 |
+
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -56px; }
|
509 |
+
|
510 |
+
/* ---------------------------------------- */
|
511 |
+
|
512 |
+
|
513 |
+
|
514 |
+
/* theme: "light-thick", "dark-thick" */
|
515 |
+
|
516 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail,
|
517 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
|
518 |
+
width: 4px;
|
519 |
+
background-color: #fff; background-color: rgba(255,255,255,0.1);
|
520 |
+
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
521 |
+
}
|
522 |
+
|
523 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
524 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
525 |
+
width: 6px;
|
526 |
+
background-color: #fff; background-color: rgba(255,255,255,0.75);
|
527 |
+
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
528 |
+
}
|
529 |
+
|
530 |
+
.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
531 |
+
.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
532 |
+
width: 100%;
|
533 |
+
height: 4px;
|
534 |
+
margin: 6px 0;
|
535 |
+
}
|
536 |
+
|
537 |
+
.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
538 |
+
.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
539 |
+
width: 100%;
|
540 |
+
height: 6px;
|
541 |
+
margin: 5px auto;
|
542 |
+
}
|
543 |
+
|
544 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
|
545 |
+
|
546 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
547 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
|
548 |
+
|
549 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px 0; }
|
550 |
+
|
551 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -20px; }
|
552 |
+
|
553 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -40px; }
|
554 |
+
|
555 |
+
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -56px; }
|
556 |
+
|
557 |
+
|
558 |
+
/* theme: "dark-thick" */
|
559 |
+
|
560 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
|
561 |
+
background-color: #000; background-color: rgba(0,0,0,0.1);
|
562 |
+
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
563 |
+
}
|
564 |
+
|
565 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
566 |
+
background-color: #000; background-color: rgba(0,0,0,0.75);
|
567 |
+
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
568 |
+
}
|
569 |
+
|
570 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
571 |
+
|
572 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
573 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
574 |
+
|
575 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px 0; }
|
576 |
+
|
577 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -20px; }
|
578 |
+
|
579 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -40px; }
|
580 |
+
|
581 |
+
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -56px; }
|
582 |
+
|
583 |
+
/* ---------------------------------------- */
|
584 |
+
|
585 |
+
|
586 |
+
|
587 |
+
/* theme: "light-thin", "dark-thin" */
|
588 |
+
|
589 |
+
.mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.1); }
|
590 |
+
|
591 |
+
.mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
592 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 2px; }
|
593 |
+
|
594 |
+
.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
595 |
+
.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{ width: 100%; }
|
596 |
+
|
597 |
+
.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
598 |
+
.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
599 |
+
width: 100%;
|
600 |
+
height: 2px;
|
601 |
+
margin: 7px auto;
|
602 |
+
}
|
603 |
+
|
604 |
+
|
605 |
+
/* theme "dark-thin" */
|
606 |
+
|
607 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
|
608 |
+
|
609 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
610 |
+
|
611 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
612 |
+
|
613 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
614 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
615 |
+
|
616 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
|
617 |
+
|
618 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
|
619 |
+
|
620 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
|
621 |
+
|
622 |
+
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
|
623 |
+
|
624 |
+
/* ---------------------------------------- */
|
625 |
+
|
626 |
+
|
627 |
+
|
628 |
+
/* theme "rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark" */
|
629 |
+
|
630 |
+
.mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.15); }
|
631 |
+
|
632 |
+
.mCS-rounded.mCSB_scrollTools .mCSB_dragger,
|
633 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,
|
634 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,
|
635 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{ height: 14px; }
|
636 |
+
|
637 |
+
.mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
638 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
639 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
640 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
641 |
+
width: 14px;
|
642 |
+
margin: 0 1px;
|
643 |
+
}
|
644 |
+
|
645 |
+
.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger,
|
646 |
+
.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,
|
647 |
+
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,
|
648 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 14px; }
|
649 |
+
|
650 |
+
.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
651 |
+
.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
652 |
+
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
653 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
654 |
+
height: 14px;
|
655 |
+
margin: 1px 0;
|
656 |
+
}
|
657 |
+
|
658 |
+
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
659 |
+
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
|
660 |
+
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
661 |
+
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
|
662 |
+
width: 16px; /* auto-expanded scrollbar */
|
663 |
+
height: 16px;
|
664 |
+
margin: -1px 0;
|
665 |
+
}
|
666 |
+
|
667 |
+
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
668 |
+
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
669 |
+
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
670 |
+
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 4px; /* auto-expanded scrollbar */ }
|
671 |
+
|
672 |
+
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
673 |
+
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
|
674 |
+
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
675 |
+
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
|
676 |
+
height: 16px; /* auto-expanded scrollbar */
|
677 |
+
width: 16px;
|
678 |
+
margin: 0 -1px;
|
679 |
+
}
|
680 |
+
|
681 |
+
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
682 |
+
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
683 |
+
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
684 |
+
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
685 |
+
height: 4px; /* auto-expanded scrollbar */
|
686 |
+
margin: 6px 0;
|
687 |
+
}
|
688 |
+
|
689 |
+
.mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{ background-position: 0 -72px; }
|
690 |
+
|
691 |
+
.mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{ background-position: 0 -92px; }
|
692 |
+
|
693 |
+
.mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{ background-position: 0 -112px; }
|
694 |
+
|
695 |
+
.mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{ background-position: 0 -128px; }
|
696 |
+
|
697 |
+
|
698 |
+
/* theme "rounded-dark", "rounded-dots-dark" */
|
699 |
+
|
700 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
701 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
702 |
+
|
703 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
|
704 |
+
|
705 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
706 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
707 |
+
|
708 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
709 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
710 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
711 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
712 |
+
|
713 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px -72px; }
|
714 |
+
|
715 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -92px; }
|
716 |
+
|
717 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -112px; }
|
718 |
+
|
719 |
+
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -128px; }
|
720 |
+
|
721 |
+
|
722 |
+
/* theme "rounded-dots", "rounded-dots-dark" */
|
723 |
+
|
724 |
+
.mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail,
|
725 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{ width: 4px; }
|
726 |
+
|
727 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
|
728 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,
|
729 |
+
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
730 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
731 |
+
background-color: transparent;
|
732 |
+
background-position: center;
|
733 |
+
}
|
734 |
+
|
735 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
|
736 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
|
737 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==");
|
738 |
+
background-repeat: repeat-y;
|
739 |
+
opacity: 0.3;
|
740 |
+
filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
|
741 |
+
}
|
742 |
+
|
743 |
+
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
744 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
745 |
+
height: 4px;
|
746 |
+
margin: 6px 0;
|
747 |
+
background-repeat: repeat-x;
|
748 |
+
}
|
749 |
+
|
750 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px -72px; }
|
751 |
+
|
752 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -92px; }
|
753 |
+
|
754 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -112px; }
|
755 |
+
|
756 |
+
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -128px; }
|
757 |
+
|
758 |
+
|
759 |
+
/* theme "rounded-dots-dark" */
|
760 |
+
|
761 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
|
762 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=");
|
763 |
+
}
|
764 |
+
|
765 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px -72px; }
|
766 |
+
|
767 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -92px; }
|
768 |
+
|
769 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -112px; }
|
770 |
+
|
771 |
+
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -128px; }
|
772 |
+
|
773 |
+
/* ---------------------------------------- */
|
774 |
+
|
775 |
+
|
776 |
+
|
777 |
+
/* theme "3d", "3d-dark", "3d-thick", "3d-thick-dark" */
|
778 |
+
|
779 |
+
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
780 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
781 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
782 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
783 |
+
background-repeat: repeat-y;
|
784 |
+
background-image: -moz-linear-gradient(left, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
|
785 |
+
background-image: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
|
786 |
+
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
787 |
+
background-image: -o-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
788 |
+
background-image: -ms-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
789 |
+
background-image: linear-gradient(to right, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
790 |
+
}
|
791 |
+
|
792 |
+
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
793 |
+
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
794 |
+
.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
795 |
+
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
796 |
+
background-repeat: repeat-x;
|
797 |
+
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
|
798 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
|
799 |
+
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
800 |
+
background-image: -o-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
801 |
+
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
802 |
+
background-image: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
803 |
+
}
|
804 |
+
|
805 |
+
|
806 |
+
/* theme "3d", "3d-dark" */
|
807 |
+
|
808 |
+
.mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger,
|
809 |
+
.mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 70px; }
|
810 |
+
|
811 |
+
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger,
|
812 |
+
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 70px; }
|
813 |
+
|
814 |
+
.mCS-3d.mCSB_scrollTools,
|
815 |
+
.mCS-3d-dark.mCSB_scrollTools{
|
816 |
+
opacity: 1;
|
817 |
+
filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
|
818 |
+
}
|
819 |
+
|
820 |
+
.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
|
821 |
+
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
822 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,
|
823 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; }
|
824 |
+
|
825 |
+
.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
|
826 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
|
827 |
+
width: 8px;
|
828 |
+
background-color: #000; background-color: rgba(0,0,0,0.2);
|
829 |
+
box-shadow: inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.2);
|
830 |
+
}
|
831 |
+
|
832 |
+
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
833 |
+
.mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
834 |
+
.mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
835 |
+
.mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
836 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
837 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
838 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
839 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
|
840 |
+
|
841 |
+
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
842 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 8px; }
|
843 |
+
|
844 |
+
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
845 |
+
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
846 |
+
width: 100%;
|
847 |
+
height: 8px;
|
848 |
+
margin: 4px 0;
|
849 |
+
box-shadow: inset 0 1px 1px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(255,255,255,0.2);
|
850 |
+
}
|
851 |
+
|
852 |
+
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
853 |
+
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
854 |
+
width: 100%;
|
855 |
+
height: 8px;
|
856 |
+
margin: 4px auto;
|
857 |
+
}
|
858 |
+
|
859 |
+
.mCS-3d.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
860 |
+
|
861 |
+
.mCS-3d.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
862 |
+
|
863 |
+
.mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
864 |
+
|
865 |
+
.mCS-3d.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
866 |
+
|
867 |
+
|
868 |
+
/* theme "3d-dark" */
|
869 |
+
|
870 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
|
871 |
+
background-color: #000; background-color: rgba(0,0,0,0.1);
|
872 |
+
box-shadow: inset 1px 0 1px rgba(0,0,0,0.1);
|
873 |
+
}
|
874 |
+
|
875 |
+
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); }
|
876 |
+
|
877 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
878 |
+
|
879 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
880 |
+
|
881 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
882 |
+
|
883 |
+
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
884 |
+
|
885 |
+
/* ---------------------------------------- */
|
886 |
+
|
887 |
+
|
888 |
+
|
889 |
+
/* theme: "3d-thick", "3d-thick-dark" */
|
890 |
+
|
891 |
+
.mCS-3d-thick.mCSB_scrollTools,
|
892 |
+
.mCS-3d-thick-dark.mCSB_scrollTools{
|
893 |
+
opacity: 1;
|
894 |
+
filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
|
895 |
+
}
|
896 |
+
|
897 |
+
.mCS-3d-thick.mCSB_scrollTools,
|
898 |
+
.mCS-3d-thick-dark.mCSB_scrollTools,
|
899 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer,
|
900 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; }
|
901 |
+
|
902 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
903 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }
|
904 |
+
|
905 |
+
.mCSB_inside + .mCS-3d-thick.mCSB_scrollTools_vertical,
|
906 |
+
.mCSB_inside + .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ right: 1px; }
|
907 |
+
|
908 |
+
.mCS-3d-thick.mCSB_scrollTools_vertical,
|
909 |
+
.mCS-3d-thick-dark.mCSB_scrollTools_vertical{ box-shadow: inset 1px 0 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); }
|
910 |
+
|
911 |
+
.mCS-3d-thick.mCSB_scrollTools_horizontal,
|
912 |
+
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{
|
913 |
+
bottom: 1px;
|
914 |
+
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5);
|
915 |
+
}
|
916 |
+
|
917 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
918 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
919 |
+
box-shadow: inset 1px 0 0 rgba(255,255,255,0.4);
|
920 |
+
width: 12px;
|
921 |
+
margin: 2px;
|
922 |
+
position: absolute;
|
923 |
+
height: auto;
|
924 |
+
top: 0;
|
925 |
+
bottom: 0;
|
926 |
+
left: 0;
|
927 |
+
right: 0;
|
928 |
+
}
|
929 |
+
|
930 |
+
.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
931 |
+
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
|
932 |
+
|
933 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
934 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
935 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
936 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
|
937 |
+
|
938 |
+
.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
939 |
+
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
940 |
+
height: 12px;
|
941 |
+
width: auto;
|
942 |
+
}
|
943 |
+
|
944 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{
|
945 |
+
background-color: #000; background-color: rgba(0,0,0,0.05);
|
946 |
+
box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
|
947 |
+
}
|
948 |
+
|
949 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
|
950 |
+
|
951 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
952 |
+
|
953 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
954 |
+
|
955 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
956 |
+
|
957 |
+
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
958 |
+
|
959 |
+
|
960 |
+
/* theme: "3d-thick-dark" */
|
961 |
+
|
962 |
+
.mCS-3d-thick-dark.mCSB_scrollTools{ box-shadow: inset 0 0 14px rgba(0,0,0,0.2); }
|
963 |
+
|
964 |
+
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.2); }
|
965 |
+
|
966 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 1px 0 0 rgba(255,255,255,0.4), inset -1px 0 0 rgba(0,0,0,0.2); }
|
967 |
+
|
968 |
+
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.2); }
|
969 |
+
|
970 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
971 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
972 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
973 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #777; }
|
974 |
+
|
975 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{
|
976 |
+
background-color: #fff; background-color: rgba(0,0,0,0.05);
|
977 |
+
box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
|
978 |
+
}
|
979 |
+
|
980 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
|
981 |
+
|
982 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
983 |
+
|
984 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
985 |
+
|
986 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
987 |
+
|
988 |
+
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
989 |
+
|
990 |
+
/* ---------------------------------------- */
|
991 |
+
|
992 |
+
|
993 |
+
|
994 |
+
/* theme: "minimal", "minimal-dark" */
|
995 |
+
|
996 |
+
.mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
|
997 |
+
.mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
|
998 |
+
right: 0;
|
999 |
+
margin: 12px 0;
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
.mCustomScrollBox.mCS-minimal + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
1003 |
+
.mCustomScrollBox.mCS-minimal + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
1004 |
+
.mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
1005 |
+
.mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{
|
1006 |
+
bottom: 0;
|
1007 |
+
margin: 0 12px;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
/* RTL direction/left-side scrollbar */
|
1011 |
+
.mCS-dir-rtl > .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
|
1012 |
+
.mCS-dir-rtl > .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
|
1013 |
+
left: 0;
|
1014 |
+
right: auto;
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
.mCS-minimal.mCSB_scrollTools .mCSB_draggerRail,
|
1018 |
+
.mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
|
1019 |
+
|
1020 |
+
.mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger,
|
1021 |
+
.mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 50px; }
|
1022 |
+
|
1023 |
+
.mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger,
|
1024 |
+
.mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 50px; }
|
1025 |
+
|
1026 |
+
.mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
1027 |
+
background-color: #fff; background-color: rgba(255,255,255,0.2);
|
1028 |
+
filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
.mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1032 |
+
.mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
1033 |
+
background-color: #fff; background-color: rgba(255,255,255,0.5);
|
1034 |
+
filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
|
1038 |
+
/* theme: "minimal-dark" */
|
1039 |
+
|
1040 |
+
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
1041 |
+
background-color: #000; background-color: rgba(0,0,0,0.2);
|
1042 |
+
filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1046 |
+
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
1047 |
+
background-color: #000; background-color: rgba(0,0,0,0.5);
|
1048 |
+
filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
/* ---------------------------------------- */
|
1052 |
+
|
1053 |
+
|
1054 |
+
|
1055 |
+
/* theme "light-3", "dark-3" */
|
1056 |
+
|
1057 |
+
.mCS-light-3.mCSB_scrollTools .mCSB_draggerRail,
|
1058 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{
|
1059 |
+
width: 6px;
|
1060 |
+
background-color: #000; background-color: rgba(0,0,0,0.2);
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
.mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1064 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 6px; }
|
1065 |
+
|
1066 |
+
.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1067 |
+
.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1068 |
+
.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1069 |
+
.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
1070 |
+
width: 100%;
|
1071 |
+
height: 6px;
|
1072 |
+
margin: 5px 0;
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1076 |
+
.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
1077 |
+
.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1078 |
+
.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
1079 |
+
width: 12px;
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1083 |
+
.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
1084 |
+
.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1085 |
+
.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
1086 |
+
height: 12px;
|
1087 |
+
margin: 2px 0;
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
.mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
1091 |
+
|
1092 |
+
.mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
1093 |
+
|
1094 |
+
.mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
1095 |
+
|
1096 |
+
.mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
1097 |
+
|
1098 |
+
|
1099 |
+
/* theme "dark-3" */
|
1100 |
+
|
1101 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
1102 |
+
|
1103 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
1104 |
+
|
1105 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1106 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
1107 |
+
|
1108 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
|
1109 |
+
|
1110 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
1111 |
+
|
1112 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
1113 |
+
|
1114 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
1115 |
+
|
1116 |
+
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
1117 |
+
|
1118 |
+
/* ---------------------------------------- */
|
1119 |
+
|
1120 |
+
|
1121 |
+
|
1122 |
+
/* theme "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark" */
|
1123 |
+
|
1124 |
+
.mCS-inset.mCSB_scrollTools .mCSB_draggerRail,
|
1125 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1126 |
+
.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
|
1127 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1128 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,
|
1129 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{
|
1130 |
+
width: 12px;
|
1131 |
+
background-color: #000; background-color: rgba(0,0,0,0.2);
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
.mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1135 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1136 |
+
.mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1137 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1138 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1139 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
1140 |
+
width: 6px;
|
1141 |
+
margin: 3px 5px;
|
1142 |
+
position: absolute;
|
1143 |
+
height: auto;
|
1144 |
+
top: 0;
|
1145 |
+
bottom: 0;
|
1146 |
+
left: 0;
|
1147 |
+
right: 0;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
.mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1151 |
+
.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1152 |
+
.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1153 |
+
.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1154 |
+
.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1155 |
+
.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
1156 |
+
height: 6px;
|
1157 |
+
margin: 5px 3px;
|
1158 |
+
position: absolute;
|
1159 |
+
width: auto;
|
1160 |
+
top: 0;
|
1161 |
+
bottom: 0;
|
1162 |
+
left: 0;
|
1163 |
+
right: 0;
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
.mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1167 |
+
.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1168 |
+
.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1169 |
+
.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1170 |
+
.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1171 |
+
.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
1172 |
+
width: 100%;
|
1173 |
+
height: 12px;
|
1174 |
+
margin: 2px 0;
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
.mCS-inset.mCSB_scrollTools .mCSB_buttonUp,
|
1178 |
+
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp,
|
1179 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
1180 |
+
|
1181 |
+
.mCS-inset.mCSB_scrollTools .mCSB_buttonDown,
|
1182 |
+
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown,
|
1183 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
1184 |
+
|
1185 |
+
.mCS-inset.mCSB_scrollTools .mCSB_buttonLeft,
|
1186 |
+
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft,
|
1187 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
1188 |
+
|
1189 |
+
.mCS-inset.mCSB_scrollTools .mCSB_buttonRight,
|
1190 |
+
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight,
|
1191 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
1192 |
+
|
1193 |
+
|
1194 |
+
/* theme "inset-dark", "inset-2-dark", "inset-3-dark" */
|
1195 |
+
|
1196 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1197 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1198 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
1199 |
+
|
1200 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
1201 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
1202 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
1203 |
+
|
1204 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1205 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
1206 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1207 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
1208 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1209 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
1210 |
+
|
1211 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1212 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1213 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
|
1214 |
+
|
1215 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp,
|
1216 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp,
|
1217 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
1218 |
+
|
1219 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown,
|
1220 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown,
|
1221 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
1222 |
+
|
1223 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft,
|
1224 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft,
|
1225 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
1226 |
+
|
1227 |
+
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight,
|
1228 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight,
|
1229 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
1230 |
+
|
1231 |
+
|
1232 |
+
/* theme "inset-2", "inset-2-dark" */
|
1233 |
+
|
1234 |
+
.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
|
1235 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{
|
1236 |
+
background-color: transparent;
|
1237 |
+
border-width: 1px;
|
1238 |
+
border-style: solid;
|
1239 |
+
border-color: #fff;
|
1240 |
+
border-color: rgba(255,255,255,0.2);
|
1241 |
+
-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ border-color: #000; border-color: rgba(0,0,0,0.2); }
|
1245 |
+
|
1246 |
+
|
1247 |
+
/* theme "inset-3", "inset-3-dark" */
|
1248 |
+
|
1249 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.6); }
|
1250 |
+
|
1251 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.6); }
|
1252 |
+
|
1253 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
1254 |
+
|
1255 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
1256 |
+
|
1257 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1258 |
+
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
1259 |
+
|
1260 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.75); }
|
1261 |
+
|
1262 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
|
1263 |
+
|
1264 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1265 |
+
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
|
1266 |
+
|
1267 |
+
/* ---------------------------------------- */
|
css/jquery.mCustomScrollbar.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mCSB_container{width:auto;margin-right:15px;overflow:hidden}.mCSB_container.mCS_no_scrollbar{margin-right:0}.mCS_destroyed>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar,.mCS_disabled>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar{margin-right:15px}.mCustomScrollBox>.mCSB_scrollTools{width:16px;height:100%;top:0;right:0;opacity:.75}.mCSB_scrollTools .mCSB_draggerContainer{position:absolute;top:0;left:0;bottom:0;right:0;height:auto}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:20px 0}.mCSB_scrollTools .mCSB_draggerRail{width:2px;height:100%;margin:0 auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_scrollTools .mCSB_dragger{cursor:pointer;width:100%;height:30px}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;height:100%;margin:0 auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;text-align:center}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonUp{display:block;position:relative;height:20px;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools .mCSB_buttonDown{top:100%;margin-top:-40px}.mCSB_horizontal>.mCSB_container{height:auto;margin-right:0;margin-bottom:30px;overflow:hidden}.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{margin-bottom:0}.mCS_destroyed>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar,.mCS_disabled>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{margin-right:0;margin-bottom:30px}.mCSB_horizontal.mCustomScrollBox>.mCSB_scrollTools{width:100%;height:16px;top:auto;right:auto;bottom:0;left:0;overflow:hidden}.mCSB_horizontal>.mCSB_scrollTools a+.mCSB_draggerContainer{margin:0 20px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:2px;margin:7px 0;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger{width:30px;height:100%}.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px}.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{display:block;position:relative;width:20px;height:100%;overflow:hidden;margin:0 auto;cursor:pointer;float:left}.mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{margin-left:-40px;float:right}.mCustomScrollBox{-ms-touch-action:none}.mCustomScrollBox:hover>.mCSB_scrollTools{opacity:1;}.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,.4);}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background:#fff;background:rgba(255,255,255,.75);}.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,.85);}.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(255,255,255,.9);}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight,.mCSB_scrollTools .mCSB_buttonUp{background-repeat:no-repeat;opacity:.4;}.mCSB_scrollTools .mCSB_buttonUp{background-position:0 0}.mCSB_scrollTools .mCSB_buttonDown{background-position:0 -20px}.mCSB_scrollTools .mCSB_buttonLeft{background-position:0 -40px}.mCSB_scrollTools .mCSB_buttonRight{background-position:0 -56px}.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover,.mCSB_scrollTools .mCSB_buttonUp:hover{opacity:.75;}.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active,.mCSB_scrollTools .mCSB_buttonUp:active{opacity:.9;}.mCS-dark>.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,.15)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background:#000;background:rgba(0,0,0,.75)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark>.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark>.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark>.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}.mCS-light-2>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#fff;background:rgba(255,255,255,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background:#fff;background:rgba(255,255,255,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,.85)}.mCS-light-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(255,255,255,.9)}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px 0}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -20px}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -40px}.mCS-light-2>.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -56px}.mCS-dark-2>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#000;background:rgba(0,0,0,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background:#000;background:rgba(0,0,0,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px 0}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -20px}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -40px}.mCS-dark-2>.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -56px}.mCS-light-thick>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#fff;background:rgba(255,255,255,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background:#fff;background:rgba(255,255,255,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(255,255,255,.85)}.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(255,255,255,.9)}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonUp{background-position:-16px 0}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonDown{background-position:-16px -20px}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-20px -40px}.mCS-light-thick>.mCSB_scrollTools .mCSB_buttonRight{background-position:-20px -56px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_draggerRail{width:4px;background:#000;background:rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background:#000;background:rgba(0,0,0,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonUp{background-position:-96px 0}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonDown{background-position:-96px -20px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-100px -40px}.mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonRight{background-position:-100px -56px}.mCS-light-thin>.mCSB_scrollTools .mCSB_draggerRail{background:#fff;background:rgba(255,255,255,.1)}.mCS-light-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px}.mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%}.mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin>.mCSB_scrollTools .mCSB_draggerRail{background:#000;background:rgba(0,0,0,.15)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px;background:#000;background:rgba(0,0,0,.75)}.mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{width:100%}.mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background:rgba(0,0,0,.85)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background:rgba(0,0,0,.9)}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}
|
1 |
+
.mCustomScrollbar{-ms-touch-action:pinch-zoom;touch-action:pinch-zoom}.mCustomScrollbar.mCS_no_scrollbar,.mCustomScrollbar.mCS_touch_action{-ms-touch-action:auto;touch-action:auto}.mCustomScrollBox{position:relative;overflow:hidden;height:100%;max-width:100%;outline:0;direction:ltr}.mCSB_container{overflow:hidden;width:auto;height:auto}.mCSB_inside>.mCSB_container{margin-right:30px}.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container{margin-right:0;margin-left:30px}.mCS-dir-rtl>.mCSB_inside>.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-left:0}.mCSB_scrollTools{position:absolute;width:16px;height:auto;left:auto;top:0;right:0;bottom:0;opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_outside+.mCSB_scrollTools{right:-26px}.mCS-dir-rtl>.mCSB_inside>.mCSB_scrollTools,.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{right:auto;left:0}.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{left:-26px}.mCSB_scrollTools .mCSB_draggerContainer{position:absolute;top:0;left:0;bottom:0;right:0;height:auto}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:20px 0}.mCSB_scrollTools .mCSB_draggerRail{width:2px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCSB_scrollTools .mCSB_dragger{cursor:pointer;width:100%;height:30px;z-index:1}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{position:relative;width:4px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;text-align:center}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:12px}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:8px}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonUp{display:block;position:absolute;height:20px;width:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools .mCSB_buttonDown{bottom:0}.mCSB_horizontal.mCSB_inside>.mCSB_container{margin-right:0;margin-bottom:30px}.mCSB_horizontal.mCSB_outside>.mCSB_container{min-height:100%}.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal{width:auto;height:16px;top:auto;right:0;bottom:0;left:0}.mCustomScrollBox+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:-26px}.mCSB_scrollTools.mCSB_scrollTools_horizontal a+.mCSB_draggerContainer{margin:0 20px}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:2px;margin:7px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{width:30px;height:100%;left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:12px;margin:2px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:8px;margin:4px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{display:block;position:absolute;width:20px;height:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{right:0}.mCSB_container_wrapper{position:absolute;height:auto;width:auto;overflow:hidden;top:0;left:0;right:0;bottom:0;margin-right:30px;margin-bottom:30px}.mCSB_container_wrapper>.mCSB_container{padding-right:30px;padding-bottom:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:20px}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:20px}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden+.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:0}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools~.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:0}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal{left:20px}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools~.mCSB_scrollTools.mCSB_scrollTools_horizontal{left:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container_wrapper{margin-right:0;margin-left:30px}.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden>.mCSB_container{padding-right:0}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden>.mCSB_container{padding-bottom:0}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0;margin-left:0}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight,.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;transition:opacity .2s ease-in-out,background-color .2s ease-in-out}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar{-webkit-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out}.mCS-autoHide>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide>.mCustomScrollBox~.mCSB_scrollTools{opacity:0;filter:"alpha(opacity=0)";-ms-filter:"alpha(opacity=0)"}.mCS-autoHide:hover>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide:hover>.mCustomScrollBox~.mCSB_scrollTools,.mCustomScrollBox:hover>.mCSB_scrollTools,.mCustomScrollBox:hover~.mCSB_scrollTools,.mCustomScrollbar>.mCustomScrollBox>.mCSB_scrollTools.mCSB_scrollTools_onDrag,.mCustomScrollbar>.mCustomScrollBox~.mCSB_scrollTools.mCSB_scrollTools_onDrag{opacity:1;filter:"alpha(opacity=100)";-ms-filter:"alpha(opacity=100)"}.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.4);filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.75);filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85);filter:"alpha(opacity=85)";-ms-filter:"alpha(opacity=85)"}.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9);filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight,.mCSB_scrollTools .mCSB_buttonUp{background-image:url(mCSB_buttons.png);background-repeat:no-repeat;opacity:.4;filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_buttonUp{background-position:0 0}.mCSB_scrollTools .mCSB_buttonDown{background-position:0 -20px}.mCSB_scrollTools .mCSB_buttonLeft{background-position:0 -40px}.mCSB_scrollTools .mCSB_buttonRight{background-position:0 -56px}.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover,.mCSB_scrollTools .mCSB_buttonUp:hover{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active,.mCSB_scrollTools .mCSB_buttonUp:active{opacity:.9;filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCS-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.15)}.mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:rgba(0,0,0,.85)}.mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:rgba(0,0,0,.9)}.mCS-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-light-2.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:4px;margin:6px auto}.mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85)}.mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9)}.mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px 0}.mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -20px}.mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -40px}.mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -56px}.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px 0}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -20px}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -40px}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -56px}.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail,.mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85)}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9)}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{background-position:-16px 0}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{background-position:-16px -20px}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{background-position:-20px -40px}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{background-position:-20px -56px}.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{background-position:-96px 0}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{background-position:-96px -20px}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{background-position:-100px -40px}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{background-position:-100px -56px}.mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,.1)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px}.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%}.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.15)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}.mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,.15)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,.mCS-rounded.mCSB_scrollTools .mCSB_dragger{height:14px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:14px;margin:0 1px}.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger{width:14px}.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:14px;margin:1px 0}.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:16px;height:16px;margin:-1px 0}.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:4px}.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:16px;width:16px;margin:0 -1px}.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:4px;margin:6px 0}.mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{background-position:0 -72px}.mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{background-position:0 -92px}.mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{background-position:0 -112px}.mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{background-position:0 -128px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.15)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px -72px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -92px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -112px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -128px}.mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail{width:4px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail{background-color:transparent;background-position:center}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==);background-repeat:repeat-y;opacity:.3;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail{height:4px;margin:6px 0;background-repeat:repeat-x}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{background-position:-16px -72px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{background-position:-16px -92px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{background-position:-20px -112px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{background-position:-20px -128px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=)}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-96px -72px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-96px -92px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-100px -112px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-100px -128px}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-y;background-image:-moz-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to right,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-x;background-image:-moz-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(255,255,255,.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to bottom,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger{height:70px}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger{width:70px}.mCS-3d-dark.mCSB_scrollTools,.mCS-3d.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{width:8px;background-color:#000;background-color:rgba(0,0,0,.2);box-shadow:inset 1px 0 1px rgba(0,0,0,.5),inset -1px 0 1px rgba(255,255,255,.2)}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#555}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:8px}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:8px;margin:4px 0;box-shadow:inset 0 1px 1px rgba(0,0,0,.5),inset 0 -1px 1px rgba(255,255,255,.2)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:8px;margin:4px auto}.mCS-3d.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px -72px}.mCS-3d.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-3d.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1);box-shadow:inset 1px 0 1px rgba(0,0,0,.1)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{box-shadow:inset 0 1px 1px rgba(0,0,0,.1)}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCS-3d-thick-dark.mCSB_scrollTools,.mCS-3d-thick.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d-thick-dark.mCSB_scrollTools,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer,.mCS-3d-thick.mCSB_scrollTools,.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mCSB_inside+.mCS-3d-thick-dark.mCSB_scrollTools_vertical,.mCSB_inside+.mCS-3d-thick.mCSB_scrollTools_vertical{right:1px}.mCS-3d-thick-dark.mCSB_scrollTools_vertical,.mCS-3d-thick.mCSB_scrollTools_vertical{box-shadow:inset 1px 0 1px rgba(0,0,0,.1),inset 0 0 14px rgba(0,0,0,.5)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal,.mCS-3d-thick.mCSB_scrollTools_horizontal{bottom:1px;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),inset 0 0 14px rgba(0,0,0,.5)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;box-shadow:inset 1px 0 0 rgba(255,255,255,.4);width:12px;margin:2px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,.4);height:12px;width:auto}.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#555}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{background-color:#000;background-color:rgba(0,0,0,.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,.1)}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px -72px}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-3d-thick-dark.mCSB_scrollTools{box-shadow:inset 0 0 14px rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{box-shadow:inset 0 1px 1px rgba(0,0,0,.1),inset 0 0 14px rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 1px 0 0 rgba(255,255,255,.4),inset -1px 0 0 rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 -1px 0 rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#777}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{background-color:#fff;background-color:rgba(0,0,0,.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,.1)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-minimal.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical,.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical{right:0;margin:12px 0}.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:0;margin:0 12px}.mCS-dir-rtl>.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical,.mCS-dir-rtl>.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical{left:0;right:auto}.mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger{height:50px}.mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger{width:50px}.mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools .mCSB_draggerRail{width:6px;background-color:#000;background-color:rgba(0,0,0,.2)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px}.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:6px;margin:5px 0}.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:12px}.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:12px;margin:2px 0}.mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px -72px}.mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1)}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset.mCSB_scrollTools .mCSB_draggerRail{width:12px;background-color:#000;background-color:rgba(0,0,0,.2)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;margin:3px 5px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:6px;margin:5px 3px;position:absolute;width:auto;top:0;bottom:0;left:0;right:0}.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:12px;margin:2px 0}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px -72px}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent;border-width:1px;border-style:solid;border-color:#fff;border-color:rgba(255,255,255,.2);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{border-color:#000;border-color:rgba(0,0,0,.2)}.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,.6)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.6)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.75)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9)}
|
css/styles.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.bwg_image_wrap figure{margin:0;padding:0}figure.zoom{background-position:50% 50%;background-size:200%;position:relative;width:auto;overflow:hidden;cursor:zoom-in}figure.zoom img:hover{opacity:0}figure.zoom img{transition:opacity .5s;display:block}div[id^=bwg_container] p{padding:0!important;margin:0!important}div[id^=bwg_container] img{box-shadow:none!important}div[id^=bwg_container] *{margin:0}div[id^=bwg_container] .SumoSelect.open>.CaptionCont,div[id^=bwg_container] .SumoSelect:focus>.CaptionCont,div[id^=bwg_container] .SumoSelect:hover>.CaptionCont,div[id^=bwg_container] .SumoSelect>.CaptionCont{border:none;box-shadow:none}#bwg_tag_wrap{background-color:#fff;width:100%;font-family:inherit;margin:0 -5px 20px 0;z-index:200;position:relative}.bwg_search_loupe_container,.bwg_search_reset_container{font-size:18px;color:#ccc;cursor:pointer;position:relative}#bwg_tag_container p{text-align:center}#bwg_tag_container{border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;width:256px;float:right}#spider_popup_wrap a{border:none;box-shadow:none}div[id^=bwg_container].bwg_container .bwg-a{border:none;box-shadow:none!important;outline:0;font-size:0;line-height:normal;cursor:pointer;text-decoration:none}div[id^=bwg_container].bwg_container .bwg-masonry-thumb-description,div[id^=bwg_container].bwg_container .bwg-thumb-description{cursor:auto}div[id^=bwg_container] div[id^=bwg_container] .bwg_img_clear{max-height:none!important;max-width:none!important;padding:0!important}.tag_cloud_link{font-size:inherit!important}@media print{#spider_popup_left,#spider_popup_right,.bwg_image_info,[class^=bwg_slideshow_title_text_],[id^=bwg_slideshow_play_pause_],[id^=spider_slideshow_left_],[id^=spider_slideshow_right_]{background:0 0}}.bwg_spider_popup_loading,.footer-list-block .bwp_gallery .bwg_spider_popup_loading,.footer-list-block .bwp_gallery_tags .bwg_spider_popup_loading{background-image:url(../images/ajax_loader.png);background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:30px 30px;border:none!important;display:none;height:30px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:30px;z-index:10102}.bwg_filmstrip_thumbnail_img{max-width:none!important}.dashicons-arrow-down-alt2:before{content:"\f347";height:100%;display:inline-block}.footer-list-block .bwp_gallery .spider_popup_overlay,.footer-list-block .bwp_gallery_tags .spider_popup_overlay,.spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.bwp_gallery_tags div[id^=bwg_container] li{border:none}.spider_popup_close,.spider_popup_close_fullscreen{-moz-box-sizing:content-box!important;box-sizing:content-box!important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}.spider_popup_close_fullscreen{margin:10px 7px;right:7px}#spider_popup_left{left:0}#spider_popup_right{right:0}#spider_popup_left:hover,#spider_popup_right:hover{visibility:visible}#spider_popup_left:hover span{left:20px}#spider_popup_right:hover span{left:auto;right:20px}#spider_popup_left,#spider_popup_right{background:transparent url(../images/blank.gif) repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#bwg_image_container #spider_popup_left,#bwg_image_container #spider_popup_right{width:25%}#spider_popup_left-ico,#spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.bwg_captcha_refresh{background-image:url(../images/captcha_refresh.png);background-position:center center;background-repeat:no-repeat;background-size:100% 100%;border-width:0;cursor:pointer;display:inline-block;height:20px;width:20px;margin:0;padding:0;vertical-align:middle}.bwg_captcha_input{vertical-align:middle;width:75px!important}.bwg_captcha_img{cursor:pointer;margin:0 5px 0 5px;vertical-align:middle}.bwg_comment_error{color:red;display:block}.bwg_comment_waiting_message{display:none}.bwg_image_hit_container1,.bwg_image_info_container1,.bwg_image_rate_container1{height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_rate_container1{display:none}.bwg_image_hit_container2,.bwg_image_info_container2,.bwg_image_rate_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_hit_spun,.bwg_image_info_spun,.bwg_image_rate_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.bwg_image_hit,.bwg_image_info,.bwg_image_rate{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.bwg_image_rate{z-index:999!important}@media screen and (max-width:465px){.bwg_ctrl_btn_container{height:auto!important}}.bwg_search_container_1{display:inline-block;width:100%;text-align:right;margin:0 5px 20px 0;background-color:rgba(0,0,0,0)}.bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;box-shadow:0 0 3px 1px #ccc;background-color:#fff;border:1px solid #ccc;max-width:100%}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;margin-right:45px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_loupe_container{display:inline-block;margin-right:1px;vertical-align:middle;float:right}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_reset_container{margin-right:5px;vertical-align:middle;float:right}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_reset,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{display:block;font-size:10px;color:#323a45;cursor:pointer;line-height:inherit!important}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{font-size:12px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{color:#070707;outline:0;border:none;box-shadow:none;background:0 0;padding:3px 5px;font-family:inherit;width:100%}.bwg_order_cont .SumoSelect{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;padding:0 10px}.SumoSelect>.optWrapper>.options li.opt{border:none;text-align:left}.bwg_order_cont .SumoSelect .CaptionCont{text-align:left}.bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%;margin:0 5px 20px 0}#bwg_tag_container .SumoSelect,.bwg_order_cont .SumoSelect{display:inline-table}#bwg_tag_container .SumoSelect ul.options,.bwg_order_cont .SumoSelect ul.options{margin:0;padding:0!important}#bwg_tag_container .SumoSelect li,.bwg_order_cont .SumoSelect li{list-style:none}#bwg_tag_container .SumoSelect.open .search-txt{padding:0 8px;height:100%}#bwg_tag_container .SumoSelect>.optWrapper>.options li label{margin:0}.bwg_order_label{border:none;box-shadow:none;color:#bbb;font-family:inherit;font-weight:700;outline:0}.bwg_order{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;text-align:left}.wd_error{color:#ccc;font-size:initial}div[id^=bwg_container] .bwg_download_gallery{text-align:right;margin-top:10px}div[id^=bwg_container] .bwg_download_gallery a{color:#4a4a4a;font-size:25px;text-decoration:none}div[id^=bwg_container] .bwg_download_gallery a:hover{color:#7d7d7d}div[id^=bwg_container] .bwg-border-box *{-moz-box-sizing:border-box;box-sizing:border-box}.bwg-flex{display:flex}.bwg-width-100{width:100%;max-width:100%}.bwg-flex-column{flex-direction:column}.bwg-flex-row{flex-direction:row;flex-wrap:wrap}.bwg-container{font-size:0;width:100%;max-width:100%;display:flex;flex-direction:row;flex-wrap:wrap}.bwg-item{display:flex;flex-direction:column;cursor:pointer}.bwg-item0{overflow:hidden;z-index:100}.bwg-item0:hover{background:0 0!important;backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;opacity:1;z-index:102;position:relative}.bwg-item1{overflow:hidden;width:100%;position:relative}.bwg-item2{top:0;left:0;bottom:0;right:0;width:100%;height:100%}.bwg-item2{position:absolute}.bwg-ecommerce1,.bwg-title1{opacity:1;text-align:center;width:100%}.bwg-ecommerce1{text-align:right}.bwg-title2{width:100%;word-wrap:break-word}.bwg-item0:hover .bwg-ecommerce1,.bwg-item0:hover .bwg-title1{left:0!important;opacity:1!important}.bwg-play-icon1{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center}.bwg_loading_div_1{position:absolute;width:100%;height:100%;z-index:115;text-align:center;vertical-align:middle;top:0}.bwg_load_more_ajax_loading{width:100%;z-index:115;text-align:center;vertical-align:middle;position:relative;height:30px}.bwg_loading_div_2{display:table;vertical-align:middle;width:100%;height:100%;background-color:#fff;opacity:.95}.bwg_loading_div_3{display:table-cell;text-align:center;position:relative;vertical-align:middle}.bwg_spider_ajax_loading{border:none!important;display:inline-block;text-align:center;position:relative;vertical-align:middle;background-image:url(../images/ajax_loader.png);float:none;width:30px;height:30px;background-size:30px 30px}.bwg-hidden{visibility:hidden}.bwg_container{position:relative;margin:20px auto}.bwg_inst_play_btn_cont,.bwg_inst_play_btn_cont .bwg_inst_play{display:block}.hidden{display:none}.bwg-loading{width:100%;height:100%;opacity:.95;position:absolute;background-image:url(../images/ajax_loader.png);background-position:center;background-repeat:no-repeat;background-size:50px;z-index:100100;top:0;left:0}#bwg_download{display:inline-block}#bwg_download.hidden{display:none}.bwg_thumbnail.bwg_container .search_line.bwg_tag_select_view{min-height:50px;-webkit-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);-moz-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);box-shadow:0 5px 7px -5px rgba(0,0,0,.16);margin-bottom:10px;display:inline-block;width:100%}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:left;display:table-cell;text-align:left;vertical-align:middle}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap #bwg_tag_container,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select{border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .search_tags_container{width:25%;min-width:120px;max-width:180px;margin-right:20px;border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px;float:left;height:30px;padding:0;cursor:pointer;background:#fff}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select,.bwg_thumbnail.bwg_container .search_line .placeholder,.bwg_thumbnail.bwg_container .search_line .search-txt,.bwg_thumbnail.bwg_container .search_line .select-all,.bwg_thumbnail.bwg_container .search_line.SumoSelect .opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-weight:400;font-family:Ubuntu;margin:0;border:none}.bwg_thumbnail.bwg_container .search_line .select-all label{margin-bottom:0;line-height:13px}.bwg_thumbnail.bwg_container .search_line .SumoSelect ul.options:not(:empty){padding:15px 0 0 10px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect{padding:0 10px;width:initial;height:inherit;cursor:pointer;display:block;border:none;box-shadow:none;border-radius:0;max-width:100%;background-color:transparent;line-height:inherit;vertical-align:bottom}.bwg_thumbnail.bwg_container .search_line .bwg_search_input_container{height:30px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100%);margin:0;overflow:hidden}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{height:30px;padding:0 10px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100% - 64px);display:inline-table}.bwg_thumbnail.bwg_container .search_line .CaptionCont span{display:block!important;vertical-align:middle;color:#323a45!important;font-size:12px;text-transform:uppercase;font-family:Ubuntu;cursor:pointer;line-height:29px;max-width:calc(100% - 20px)}.bwg_thumbnail .search_tags{cursor:pointer}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all>span,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt span{margin-left:-35px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt{padding-left:25px}.bwg_thumbnail .bwg_search_input::-webkit-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input::-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu;line-height:30px}.bwg_thumbnail .bwg_search_input:-ms-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input:-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .search-txt::-webkit-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title{width:calc(100% - 20px);height:29px;text-align:center;display:inline-block;background:#fff;position:absolute;top:.5px;left:10px;white-space:nowrap;border-radius:15px;color:#4e4e4e;text-transform:uppercase;overflow:hidden}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title span{line-height:28px}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container{line-height:29px;display:inline-block;top:0;margin-right:10px;vertical-align:middle;float:none;padding-top:0;font-size:12px;font-family:Ubuntug}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container1{margin-left:0;float:left;top:0;line-height:30px;width:auto;height:30px;margin-left:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_reset_container{right:0;top:0;line-height:30px;width:11px;height:30px;margin-right:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:right;width:30%;min-width:120px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1 .bwg_search_container_2{width:100%!important;float:right}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all{padding:0 0 3px 35px!important;height:13px;line-height:13px;margin-bottom:15px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt{margin-bottom:15px;padding:0;list-style:none;color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnCancel,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnOk{font-family:Ubuntu;font-size:12px;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p:hover{background:0 0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;font-weight:400;margin-bottom:0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont{height:inherit;border:transparent;background:inherit;width:100%;cursor:pointer;max-height:calc(100% - 2px)}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label{margin:0;line-height:100%;cursor:pointer;width:20px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i{line-height:100%;height:100%}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.closed:before,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.opened:before{color:#323a45;font-size:10px;line-height:30px}.bwg_thumbnail.bwg_container .search_line .bwg_reset{position:absolute}.bwg_thumbnail.bwg_container .search_line .no-match{font-family:Ubuntu;font-size:12px;color:#323a45;padding:5px 25px!important;text-align:center}.bwg_thumbnail.bwg_container .search_line .search-txt{border:transparent;background:0 0;padding:4px 0!important;height:100%}.bwg_thumbnail.bwg_container .search_line .search-txt:focus{box-shadow:none}.bwg_thumbnail.bwg_container .search_line .bwg_order.SumoUnder{display:none}.bwg_slideshow_image_container{position:absolute}.bwg_slideshow_image_container>div>div{display:table;margin:0 auto}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_] img[id^=bwg_slideshow_image_]{display:inline-block}.bwg_thumbnail #bwg_tag_container p{text-align:left}.bwg_thumbnail .bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;background-color:#fff;max-width:100%;box-shadow:none;border:.5px solid rgba(0,0,0,.15);border-radius:15px}.bwg_thumbnail .bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;text-align:center}.bwg_thumbnail .SumoSelect>.optWrapper>.options li.opt:hover{background-color:transparent}.bwg-zoom-effect .bwg-zoom-effect-overlay{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;opacity:0;-webkit-transition:all .45s ease-in-out;transition:all .45s ease-in-out}.bwg-zoom-effect-overlay{display:flex;align-items:center;justify-content:center}.bwg-zoom-effect:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@media (min-width:480px){.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.bwg_thumbnails_masonry .bwg-masonry-thumbnails{overflow:hidden}.bwg_thumbnails_masonry .bwg-masonry-thumbnails .bwg-item{box-sizing:border-box}.bwg-masonry-horizontal{flex-direction:row}.bwg-masonry-horizontal-parent{overflow-x:scroll;overflow-y:hidden}.bwg-masonry-horizontal-container{width:fit-content}.bwg-item.bwg-empty-item{border:0!important;padding:0!important}.bwg-background{background-color:rgba(0,0,0,0);position:relative;width:100%}.bwg-background .wd_error{color:#323a45;font-weight:700}div[id^=bwg_container] .bwg-carousel{margin:0 auto}.bwg_carousel_preload{background-image:url(../images/ajax_loader.png);background-size:50px!important;background-repeat:no-repeat;background-color:#fff;background-position:center}.bwg_container.bwg_carousel *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_]{position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_image_container_]{display:inline-block;position:absolute;text-align:center;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_] div{display:table;margin:0 auto}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_image_]{padding:0!important;display:inline-block;float:none!important;margin:4px!important;position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_],.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_]:hover{text-decoration:none;margin:4px;display:block;position:relative;z-index:17}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel-cont-child{max-width:100%;position:relative;overflow:hidden;height:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel-image{border:0;position:absolute;display:block;max-width:none;padding:0!important;margin:0!important;float:none!important;vertical-align:middle;height:100%;width:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel{position:relative;max-width:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature]{position:absolute;display:block;overflow:hidden;cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature] [class^=bwg_carousel-caption] [class^=bwg_carousel_title_text_]{text-decoration:none;position:absolute;z-index:15;display:inline-block;width:75%;top:0;text-align:center;word-wrap:break-word;word-break:break-word}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{bottom:38%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:0%;z-index:13;visibility:visible}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{right:0;left:auto;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left]{left:20px;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_video_hide]{width:100%;height:100%;position:absolute;z-index:22}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_] span,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:inline-table;line-height:0;margin-top:-15px;position:absolute;top:55%}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_]:hover,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]:hover{cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]{bottom:0;cursor:pointer;display:flex;justify-content:center;align-items:center;outline:medium none;position:absolute;height:inherit;width:30%;left:35%;z-index:13}.bwg_container.bwg_carousel .bwg_carousel_play_pause:hover .bwg_carousel_play_pause-ico{display:inline-block!important}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]:hover span{position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_] span{display:flex;justify-content:center;align-items:center}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico{display:none!important;cursor:pointer;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico:hover{display:inline-block;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_]{padding:0!important;float:none!important;width:100%;height:100%;vertical-align:middle;position:relative;display:table;background-color:#000;text-align:center}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_video_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;position:relative;display:table-cell;background-color:#000;text-align:center}.bwg_thumbnail.bwg_container{padding:0 1px}.bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive{display:inline-block}body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_order_cont,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_search_container_1,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .search_tags_container{width:100%;margin:0 0 10px 0;text-align:center;max-width:100%}.search_line .SumoSelect>.optWrapper.multiple.isFloating{padding-bottom:26px}.bwg_container.bwg_blog_style .fluid-width-video-wrapper,.bwg_container.bwg_carousel .fluid-width-video-wrapper,.bwg_container.bwg_image_browser .fluid-width-video-wrapper{width:100%;position:unset!important;padding:0!important}.bwg_inst_play_btn_cont{width:100%;height:100%;position:absolute;z-index:1;cursor:pointer;top:0}.bwg_inst_play{position:absolute;width:50px;height:50px;background-position:center center;background-repeat:no-repeat;background-size:cover;transition:background-image .2s ease-out;-ms-transition:background-image .2s ease-out;-moz-transition:background-image .2s ease-out;-webkit-transition:background-image .2s ease-out;top:0;left:0;right:0;bottom:0;margin:auto}.bwg_inst_play:hover{background-position:center center;background-repeat:no-repeat;background-size:cover}.spider_popup_wrap *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.spider_popup_wrap{display:inline-block;left:50%;outline:medium none;position:fixed;text-align:center;top:50%;z-index:100000}.bwg_popup_image{width:auto;vertical-align:middle;display:inline-block}.bwg_slider img{display:inline-block}.bwg_popup_embed{width:100%;height:100%;vertical-align:middle;text-align:center;display:table}.bwg_btn_container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.bwg_toggle_btn{margin:0;padding:0}.bwg_ctrl_btn_container{position:absolute;width:100%;z-index:10150}.bwg_btn_container.bwg_no_ctrl_btn .bwg_ctrl_btn_container{background:0 0}.bwg_toggle_container{cursor:pointer;left:50%;line-height:0;position:absolute;text-align:center;z-index:10150}#spider_popup_left-ico span,#spider_popup_right-ico span,.spider_popup_close span{display:table-cell;text-align:center;vertical-align:middle}.bwg_image_wrap{height:inherit;display:table;position:absolute;text-align:center;width:inherit}.bwg_image_wrap *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_comment_wrap,.bwg_ecommerce_wrap{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.bwg_comment_container,.bwg_ecommerce_container{-moz-box-sizing:border-box;height:100%;overflow:hidden;position:absolute;top:0;z-index:10103}#bwg_ecommerce{padding:10px}.bwg_ecommerce_body{background:0 0!important;border:none!important}.pge_tabs{list-style-type:none;margin:0;padding:0;background:0 0!important}.pge_tabs li a,.pge_tabs li a:hover,.pge_tabs li.pge_active a{text-decoration:none;display:block;width:100%;outline:0!important;padding:8px 5px!important;font-weight:700;font-size:13px}.pge_add_to_cart a{padding:5px 10px;text-decoration:none!important;display:block}.pge_add_to_cart{margin:5px 0 15px}.pge_add_to_cart_title{font-size:17px;padding:5px}.pge_add_to_cart div:first-child{float:left}.pge_add_to_cart div:last-child{float:right;margin-top:4px}.pge_add_to_cart:after,.pge_tabs:after{clear:both;content:"";display:table}#downloads table tr td,#downloads table tr th{padding:6px 10px!important;text-transform:none!important}.bwg_comments input[type=submit],.bwg_ecommerce_panel input[type=button]{cursor:pointer;font-size:15px;width:100%;margin-bottom:5px}.bwg_comments,.bwg_ecommerce_panel{bottom:0;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;z-index:10101}.bwg_comments{height:100%}.bwg_comment_body_p,.bwg_comments p{margin:5px!important;text-align:left;word-wrap:break-word;word-break:break-all}.bwg_ecommerce_panel p{padding:5px!important;text-align:left;word-wrap:break-word;word-break:break-all;margin:0!important}.bwg_comments .bwg-submit-disabled{opacity:.5}.bwg_comments textarea{height:120px;resize:vertical}.bwg_comment_delete_btn{color:#7a7a7a;cursor:pointer;float:right;font-size:14px;margin:2px}.bwg_comments_close,.bwg_ecommerce_close{cursor:pointer;line-height:0;position:relative;font-size:13px;margin:5px;z-index:10150}.bwg_ecommerce_panel a:hover{text-decoration:underline}.bwg_comment_textarea::-webkit-scrollbar{width:4px}.bwg_comment_textarea::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_comment_textarea::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}.bwg_ctrl_btn_container a,.bwg_ctrl_btn_container a:hover{text-decoration:none}.bwg_facebook:hover{color:#3b5998}.bwg_twitter:hover{color:#4099fb}.bwg_pinterest:hover{color:#cb2027}.bwg_tumblr:hover{color:#2f5070}.bwg_image_container{display:table;position:absolute;text-align:center;vertical-align:middle;width:100%}.bwg_filmstrip_container{position:absolute;z-index:10150}.bwg_filmstrip{overflow:hidden;position:absolute;z-index:10106}.bwg_filmstrip_thumbnails{margin:0 auto;overflow:hidden;position:relative}.bwg_filmstrip_thumbnail{position:relative;background:0 0;float:left;cursor:pointer;overflow:hidden}.bwg_filmstrip_thumbnail .bwg_filmstrip_thumbnail_img_wrap{overflow:hidden}.bwg_thumb_active{opacity:1}.bwg_filmstrip_thumbnail_img{display:block;opacity:1}.bwg_filmstrip_left{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_filmstrip_right{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_none_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bwg_watermark_container{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_watermark_container>div{display:table;margin:0 auto}.bwg_watermark_spun{display:table-cell;overflow:hidden;position:relative}.bwg_watermark_image{margin:4px;position:relative;z-index:10141}.bwg_watermark_text,.bwg_watermark_text:hover{text-decoration:none;margin:4px;position:relative;z-index:10141}.bwg_slide_container{display:table-cell;position:absolute;vertical-align:middle;width:100%;height:100%}.bwg_slide_bg{margin:0 auto;width:inherit;height:inherit}.bwg_slider{height:inherit;width:inherit}.bwg_popup_image_spun{height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;width:inherit;z-index:2}.bwg_popup_image_second_spun{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}.bwg_grid{display:none;height:100%;overflow:hidden;position:absolute;width:100%}.bwg_gridlet{opacity:1;position:absolute}.bwg_image_info::-webkit-scrollbar{width:4px}.bwg_image_info::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_image_info::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}#bwg_rate_form .bwg_hint{margin:0 5px;display:none}.bwg_star{display:inline-block;width:unset!important}.bwg_image_count_container{left:0;line-height:1;position:absolute;vertical-align:middle}#bwg_comment_form label{display:block;font-weight:700;margin-top:17px;text-transform:uppercase}#bwg_comment_form .bwg-privacy-policy-box label{text-transform:unset;word-break:break-word}.bwg_popup_image_spun .bwg_popup_image_spun1{width:inherit;height:inherit}.bwg_popup_image_spun1 .bwg_popup_image_spun2{vertical-align:middle;text-align:center;height:100%}#embed_conteiner{table-layout:fixed;height:100%}#opacity_div{background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#loading_div{text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}#ecommerce_ajax_loading{position:absolute}#ecommerce_opacity_div{display:none;background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#ecommerce_loading_div{display:none;text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg_ecommerce_panel.bwg_popup_sidebar_panel.bwg_popup_sidebar{text-align:left}#ajax_loading{position:absolute}@media (max-width:480px){.bwg_image_count_container{display:none}.bwg_image_title,.bwg_image_title *{font-size:12px}.bwg_image_description,.bwg_image_description *{font-size:10px}}@media (pointer:none),(pointer:coarse){#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-masonry-thumbnails .bwg-title1,#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-standard-thumbnails .bwg-title1,.bwg-mosaic-thumbnails{opacity:1!important}.bwg-zoom-effect .bwg-zoom-effect-overlay,.bwg-zoom-effect-overlay>span{opacity:1!important;background-color:unset!important}}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_] *{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_]{border-collapse:collapse;display:table;position:relative;text-align:center;margin:auto}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_image_]{display:inline-block;padding:0!important;margin:0!important;float:none!important;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_embed_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;display:inline-block;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_]{position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause{bottom:0;cursor:pointer;display:table;height:inherit;outline:medium none;position:absolute;width:30%;left:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span[id^=bwg_slideshow_play_pause-ico_]{display:inline-block!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span{position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]{display:none!important;cursor:pointer;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]:hover{display:inline-block;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]{left:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{right:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover span{left:auto!important;right:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover span{left:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_] span,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_],div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]:hover{cursor:pointer}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_container_]{display:table;position:absolute;text-align:center;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_container_]{position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] .bwg_slideshow_filmstrip{overflow:hidden;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnails_]{margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnail_]{position:relative;background:0 0;cursor:pointer;float:left;overflow:hidden}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_thumb_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_filmstrip_thumbnail_img_]{display:block;opacity:1;padding:0!important}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_left_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_right_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_none_selectable_]{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_title_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_description_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_image_]{padding:0!important;float:none!important;margin:4px!important;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_]:hover{text-decoration:none;margin:4px;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_title_text_]{text-decoration:none;position:relative;z-index:11;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_description_text_]{text-decoration:none;position:relative;z-index:15;margin:5px;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_]{display:table-cell;margin:0 auto;position:absolute;vertical-align:middle;width:100%;height:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_bg_]{margin:0 auto;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slider_]{height:inherit;width:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun_]{width:inherit;height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;z-index:2}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_second_spun_]{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_grid_]{display:none;height:100%;overflow:hidden;position:absolute;width:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_gridlet_]{opacity:1;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_]{display:inline-block;position:relative;cursor:pointer;overflow:hidden;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_container_]{display:block;overflow:hidden;position:absolute;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_thumbnails_]{left:0;font-size:0;margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun1_]{display:table;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun2_]{display:table-cell;vertical-align:middle;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_mosaic_play_icon_spun_]{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center;left:0}.lazy_loader{background-image:url(../images/ajax_loader.png);background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg-container-temp0{visibility:hidden!important;position:absolute!important}.bwg_image_browser .pagination-links{display:flex;padding:0}.bwg_image_browser .pagination-links_col1{flex-grow:3;text-align:left}.bwg_image_browser .pagination-links_col2{flex-grow:4;text-align:center}.bwg_image_browser .pagination-links_col3{flex-grow:3;text-align:right}.bwg_current_page[type=number]{width:35px;display:inline-block;-moz-appearance:textfield;line-height:normal!important}.bwg_current_page::-webkit-inner-spin-button,.bwg_current_page::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bwg_container .bwg_tag_button_view_container{display:flex;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-bottom:45px;position:relative;padding-top:3px;flex-wrap:wrap;overflow:hidden;clear:both}.bwg_container .bwg_tag_button_view_container button{cursor:pointer}.bwg_container .bwg_tag_button_view_container button.active{cursor:default}.bwg_container .bwg_tag_button_view_container .verLine{min-height:26px;margin:0 15px}.bwg_container .bwg_tag_button_see_all{margin-bottom:70px;position:relative;display:none}.bwg_container .bwg_tag_button_see_all .see_all_tags{text-transform:uppercase;position:absolute;padding:10px 25px;font-weight:600;cursor:pointer;left:47%;top:-23px}.bwg_container .bwg_tag_button_see_all .see_all_tags span{display:inline-block;line-height:normal;text-align:center;border-radius:50%;margin-right:10px;font-weight:500;color:#fff;height:18px;width:18px}.bwg_addThis{position:absolute;left:10px;top:10px;z-index:9999}
|
1 |
+
.bwg_image_wrap figure{margin:0;padding:0}figure.zoom{background-position:50% 50%;background-size:200%;position:relative;width:auto;overflow:hidden;cursor:zoom-in}figure.zoom img:hover{opacity:0}figure.zoom img{transition:opacity .5s;display:block}div[id^=bwg_container] p{padding:0!important;margin:0!important}div[id^=bwg_container] img{box-shadow:none!important}div[id^=bwg_container] *{margin:0}div[id^=bwg_container] .SumoSelect.open>.CaptionCont,div[id^=bwg_container] .SumoSelect:focus>.CaptionCont,div[id^=bwg_container] .SumoSelect:hover>.CaptionCont,div[id^=bwg_container] .SumoSelect>.CaptionCont{border:none;box-shadow:none}#bwg_tag_wrap{background-color:#fff;width:100%;font-family:inherit;margin:0 -5px 20px 0;z-index:200;position:relative}.bwg_search_loupe_container,.bwg_search_reset_container{font-size:18px;color:#ccc;cursor:pointer;position:relative}#bwg_tag_container p{text-align:center}#bwg_tag_container{border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;width:256px;float:right}#spider_popup_wrap a{border:none;box-shadow:none}div[id^=bwg_container].bwg_container .bwg-a{border:none;box-shadow:none!important;outline:0;font-size:0;line-height:normal;cursor:pointer;text-decoration:none}div[id^=bwg_container].bwg_container .bwg-masonry-thumb-description,div[id^=bwg_container].bwg_container .bwg-thumb-description{cursor:auto}div[id^=bwg_container] div[id^=bwg_container] .bwg_img_clear{max-height:none!important;max-width:none!important;padding:0!important}.tag_cloud_link{font-size:inherit!important}@media print{#spider_popup_left,#spider_popup_right,.bwg_image_info,[class^=bwg_slideshow_title_text_],[id^=bwg_slideshow_play_pause_],[id^=spider_slideshow_left_],[id^=spider_slideshow_right_]{background:0 0}}.bwg_spider_popup_loading,.footer-list-block .bwp_gallery .bwg_spider_popup_loading,.footer-list-block .bwp_gallery_tags .bwg_spider_popup_loading{background-image:url(../images/ajax_loader.png);background-color:rgba(0,0,0,0);background-repeat:no-repeat;background-position:0 0;background-size:30px 30px;border:none!important;display:none;height:30px;left:50%;margin-left:-20px;margin-top:-20px;overflow:hidden;position:fixed;top:50%;width:30px;z-index:10102}.bwg_filmstrip_thumbnail_img{max-width:none!important}.dashicons-arrow-down-alt2:before{content:"\f347";height:100%;display:inline-block}.footer-list-block .bwp_gallery .spider_popup_overlay,.footer-list-block .bwp_gallery_tags .spider_popup_overlay,.spider_popup_overlay{cursor:pointer;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10100}.bwp_gallery_tags div[id^=bwg_container] li{border:none}.spider_popup_close,.spider_popup_close_fullscreen{-moz-box-sizing:content-box!important;box-sizing:content-box!important;cursor:pointer;display:table;line-height:0;position:absolute;z-index:11100}.spider_popup_close_fullscreen{margin:10px 7px;right:7px}#spider_popup_left{left:0}#spider_popup_right{right:0}#spider_popup_left:hover,#spider_popup_right:hover{visibility:visible}#spider_popup_left:hover span{left:20px}#spider_popup_right:hover span{left:auto;right:20px}#spider_popup_left,#spider_popup_right{background:transparent url(../images/blank.gif) repeat scroll 0 0;bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:10130}#bwg_image_container #spider_popup_left,#bwg_image_container #spider_popup_right{width:25%}#spider_popup_left-ico,#spider_popup_right-ico{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%;z-index:10135}.bwg_captcha_refresh{background-image:url(../images/captcha_refresh.png);background-position:center center;background-repeat:no-repeat;background-size:100% 100%;border-width:0;cursor:pointer;display:inline-block;height:20px;width:20px;margin:0;padding:0;vertical-align:middle}.bwg_captcha_input{vertical-align:middle;width:75px!important}.bwg_captcha_img{cursor:pointer;margin:0 5px 0 5px;vertical-align:middle}.bwg_comment_error{color:red;display:block}.bwg_comment_waiting_message{display:none}.bwg_image_hit_container1,.bwg_image_info_container1,.bwg_image_rate_container1{height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_rate_container1{display:none}.bwg_image_hit_container2,.bwg_image_info_container2,.bwg_image_rate_container2{display:table;height:100%;margin:0 auto;position:absolute;width:100%}.bwg_image_hit_spun,.bwg_image_info_spun,.bwg_image_rate_spun{display:table-cell;height:100%;left:0;top:0;width:100%;overflow:hidden;position:relative}.bwg_image_hit,.bwg_image_info,.bwg_image_rate{display:inline-block;position:relative;text-decoration:none;word-wrap:break-word;z-index:11}.bwg_image_rate{z-index:999!important}.bwg_image_rate_disabled{display:none;position:absolute;width:100%;height:40px;top:0}@media screen and (max-width:465px){.bwg_ctrl_btn_container{height:auto!important}}.bwg_search_container_1{display:inline-block;width:100%;text-align:right;margin:0 5px 20px 0;background-color:rgba(0,0,0,0)}.bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;box-shadow:0 0 3px 1px #ccc;background-color:#fff;border:1px solid #ccc;max-width:100%}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;margin-right:45px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_loupe_container{display:inline-block;margin-right:1px;vertical-align:middle;float:right}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_reset_container{margin-right:5px;vertical-align:middle;float:right}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_reset,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{display:block;font-size:10px;color:#323a45;cursor:pointer;line-height:inherit!important}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search{font-size:12px}div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{color:#070707;outline:0;border:none;box-shadow:none;background:0 0;padding:3px 5px;font-family:inherit;width:100%}.bwg_order_cont .SumoSelect{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;padding:0 10px}.SumoSelect>.optWrapper>.options li.opt{border:none;text-align:left}.bwg_order_cont .SumoSelect .CaptionCont{text-align:left}.bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%;margin:0 5px 20px 0}#bwg_tag_container .SumoSelect,.bwg_order_cont .SumoSelect{display:inline-table}#bwg_tag_container .SumoSelect ul.options,.bwg_order_cont .SumoSelect ul.options{margin:0;padding:0!important}#bwg_tag_container .SumoSelect li,.bwg_order_cont .SumoSelect li{list-style:none}#bwg_tag_container .SumoSelect.open .search-txt{padding:0 8px;height:100%}#bwg_tag_container .SumoSelect>.optWrapper>.options li label{margin:0}.bwg_order_label{border:none;box-shadow:none;color:#bbb;font-family:inherit;font-weight:700;outline:0}.bwg_order{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 3px 1px #ccc;border-radius:4px;height:initial;max-width:100%;text-align:left}.wd_error{color:#ccc;font-size:initial}div[id^=bwg_container] .bwg_download_gallery{text-align:right;margin-top:10px}div[id^=bwg_container] .bwg_download_gallery a{color:#4a4a4a;font-size:25px;text-decoration:none}div[id^=bwg_container] .bwg_download_gallery a:hover{color:#7d7d7d}div[id^=bwg_container] .bwg-border-box *{-moz-box-sizing:border-box;box-sizing:border-box}.bwg-flex{display:flex}.bwg-width-100{width:100%;max-width:100%}.bwg-flex-column{flex-direction:column}.bwg-flex-row{flex-direction:row;flex-wrap:wrap}.bwg-container{font-size:0;width:100%;max-width:100%;display:flex;flex-direction:row;flex-wrap:wrap}.bwg-item{display:flex;flex-direction:column;cursor:pointer}.bwg-item0{overflow:hidden;z-index:100}.bwg-item0:hover{background:0 0!important;backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;opacity:1;z-index:102;position:relative}.bwg-item1{overflow:hidden;width:100%;position:relative}.bwg-item2{top:0;left:0;bottom:0;right:0;width:100%;height:100%}.bwg-item2{position:absolute}.bwg-ecommerce1,.bwg-title1{opacity:1;text-align:center;width:100%}.bwg-ecommerce1{text-align:right}.bwg-title2{width:100%;word-wrap:break-word}.bwg-item0:hover .bwg-ecommerce1,.bwg-item0:hover .bwg-title1{left:0!important;opacity:1!important}.bwg-play-icon1{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center}.bwg_loading_div_1{position:absolute;width:100%;height:100%;z-index:115;text-align:center;vertical-align:middle;top:0}.bwg_load_more_ajax_loading{width:100%;z-index:115;text-align:center;vertical-align:middle;position:relative;height:30px}.bwg_loading_div_2{display:table;vertical-align:middle;width:100%;height:100%;background-color:#fff;opacity:.95}.bwg_loading_div_3{display:table-cell;text-align:center;position:relative;vertical-align:middle}.bwg_spider_ajax_loading{border:none!important;display:inline-block;text-align:center;position:relative;vertical-align:middle;background-image:url(../images/ajax_loader.png);float:none;width:30px;height:30px;background-size:30px 30px}.bwg-hidden{visibility:hidden}.bwg_container{position:relative;margin:20px auto}.bwg_inst_play_btn_cont,.bwg_inst_play_btn_cont .bwg_inst_play{display:block}.hidden{display:none}.bwg-loading{width:100%;height:100%;opacity:.95;position:absolute;background-image:url(../images/ajax_loader.png);background-position:center;background-repeat:no-repeat;background-size:50px;z-index:100100;top:0;left:0}#bwg_download{display:inline-block}#bwg_download.hidden{display:none}.bwg_thumbnail.bwg_container .search_line.bwg_tag_select_view{min-height:50px;-webkit-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);-moz-box-shadow:0 5px 7px -5px rgba(0,0,0,.16);box-shadow:0 5px 7px -5px rgba(0,0,0,.16);margin-bottom:10px;display:inline-block;width:100%}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:left;display:table-cell;text-align:left;vertical-align:middle}.bwg_thumbnail.bwg_container .search_line #bwg_tag_wrap #bwg_tag_container,.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select{border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont,.bwg_thumbnail.bwg_container .search_line .search_tags_container{width:25%;min-width:120px;max-width:180px;margin-right:20px;border:.5px solid rgba(0,0,0,.15);box-shadow:none;border-radius:15px;float:left;height:30px;padding:0;cursor:pointer;background:#fff}.bwg_thumbnail.bwg_container .search_line .bwg_order_cont select,.bwg_thumbnail.bwg_container .search_line .placeholder,.bwg_thumbnail.bwg_container .search_line .search-txt,.bwg_thumbnail.bwg_container .search_line .select-all,.bwg_thumbnail.bwg_container .search_line.SumoSelect .opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-weight:400;font-family:Ubuntu;margin:0;border:none}.bwg_thumbnail.bwg_container .search_line .select-all label{margin-bottom:0;line-height:13px}.bwg_thumbnail.bwg_container .search_line .SumoSelect ul.options:not(:empty){padding:15px 0 0 10px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect{padding:0 10px;width:initial;height:inherit;cursor:pointer;display:block;border:none;box-shadow:none;border-radius:0;max-width:100%;background-color:transparent;line-height:inherit;vertical-align:bottom}.bwg_thumbnail.bwg_container .search_line .bwg_search_input_container{height:30px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100%);margin:0;overflow:hidden}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input,.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input:focus{height:30px;padding:0 10px;text-align:center;font-size:12px;font-family:Ubuntu;border-radius:15px;text-align:left;width:calc(100% - 64px);display:inline-table}.bwg_thumbnail.bwg_container .search_line .CaptionCont span{display:block!important;vertical-align:middle;color:#323a45!important;font-size:12px;text-transform:uppercase;font-family:Ubuntu;cursor:pointer;line-height:29px;max-width:calc(100% - 20px)}.bwg_thumbnail .search_tags{cursor:pointer}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all>span,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt span{margin-left:-35px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.options li.opt{padding-left:25px}.bwg_thumbnail .bwg_search_input::-webkit-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input::-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu;line-height:30px}.bwg_thumbnail .bwg_search_input:-ms-input-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .bwg_search_input:-moz-placeholder{color:#ccc;font-size:12px;text-transform:uppercase;text-align:left;font-family:Ubuntu}.bwg_thumbnail .search-txt::-webkit-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px!important}.bwg_thumbnail .search-txt::-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-ms-input-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .search-txt:-moz-placeholder{text-align:left;color:#323a45;opacity:.5;font-size:12px}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title{width:calc(100% - 20px);height:29px;text-align:center;display:inline-block;background:#fff;position:absolute;top:.5px;left:10px;white-space:nowrap;border-radius:15px;color:#4e4e4e;text-transform:uppercase;overflow:hidden}.bwg_thumbnail .bwg_search_input_container .search_placeholder_title span{line-height:28px}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container{line-height:29px;display:inline-block;top:0;margin-right:10px;vertical-align:middle;float:none;padding-top:0;font-size:12px;font-family:Ubuntug}.bwg_thumbnail.bwg_container .search_line .bwg_search_loupe_container1{margin-left:0;float:left;top:0;line-height:30px;width:auto;height:30px;margin-left:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_reset_container{right:0;top:0;line-height:30px;width:11px;height:30px;margin-right:10px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1{float:right;width:30%;min-width:120px}.bwg_thumbnail.bwg_container .search_line .bwg_search_container_1 .bwg_search_container_2{width:100%!important;float:right}.bwg_thumbnail.bwg_container .search_line .SumoSelect .select-all{padding:0 0 3px 35px!important;height:13px;line-height:13px;margin-bottom:15px!important}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt{margin-bottom:15px;padding:0;list-style:none;color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnCancel,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p.btnOk{font-family:Ubuntu;font-size:12px;line-height:12px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper.multiple>.MultiControls>p:hover{background:0 0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.optWrapper>.options li.opt label{color:#323a45;font-size:12px;text-transform:uppercase;font-family:Ubuntu;font-weight:400;margin-bottom:0}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont{height:inherit;border:transparent;background:inherit;width:100%;cursor:pointer;max-height:calc(100% - 2px)}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label{margin:0;line-height:100%;cursor:pointer;width:20px}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i{line-height:100%;height:100%}.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.closed:before,.bwg_thumbnail.bwg_container .search_line .SumoSelect>.CaptionCont>label>i.opened:before{color:#323a45;font-size:10px;line-height:30px}.bwg_thumbnail.bwg_container .search_line .bwg_reset{position:absolute}.bwg_thumbnail.bwg_container .search_line .no-match{font-family:Ubuntu;font-size:12px;color:#323a45;padding:5px 25px!important;text-align:center}.bwg_thumbnail.bwg_container .search_line .search-txt{border:transparent;background:0 0;padding:4px 0!important;height:100%}.bwg_thumbnail.bwg_container .search_line .search-txt:focus{box-shadow:none}.bwg_thumbnail.bwg_container .search_line .bwg_order.SumoUnder{display:none}.bwg_slideshow_image_container{position:absolute}.bwg_slideshow_image_container>div>div{display:table;margin:0 auto}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_] img[id^=bwg_slideshow_image_]{display:inline-block}.bwg_thumbnail #bwg_tag_container p{text-align:left}.bwg_thumbnail .bwg_search_container_2{display:inline-block;position:relative;border-radius:4px;background-color:#fff;max-width:100%;box-shadow:none;border:.5px solid rgba(0,0,0,.15);border-radius:15px}.bwg_thumbnail .bwg_order_cont{background-color:rgba(0,0,0,0);display:block;text-align:right;width:100%}.bwg_thumbnail div[id^=bwg_search_container_1_] div[id^=bwg_search_container_2_] .bwg_search_input_container{display:block;text-align:center}.bwg_thumbnail .SumoSelect>.optWrapper>.options li.opt:hover{background-color:transparent}.bwg-zoom-effect .bwg-zoom-effect-overlay{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;opacity:0;-webkit-transition:all .45s ease-in-out;transition:all .45s ease-in-out}.bwg-zoom-effect-overlay{display:flex;align-items:center;justify-content:center}.bwg-zoom-effect:hover .bwg-zoom-effect-overlay{opacity:1}.bwg-zoom-effect .bwg-title1{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}@media (min-width:480px){.bwg-zoom-effect img{-webkit-transition:all .3s;transition:all .3s}}.bwg_container div[id^=bwg_container2_] img{height:initial}.bwg-masonry-vertical{flex-direction:column}.bwg_thumbnails_masonry .bwg-masonry-thumbnails{overflow:hidden}.bwg_thumbnails_masonry .bwg-masonry-thumbnails .bwg-item{box-sizing:border-box}.bwg-masonry-horizontal{flex-direction:row}.bwg-masonry-horizontal-parent{overflow-x:scroll;overflow-y:hidden}.bwg-masonry-horizontal-container{width:fit-content}.bwg-item.bwg-empty-item{border:0!important;padding:0!important}.bwg-background{background-color:rgba(0,0,0,0);position:relative;width:100%}.bwg-background .wd_error{color:#323a45;font-weight:700}div[id^=bwg_container] .bwg-carousel{margin:0 auto}.bwg_carousel_preload{background-image:url(../images/ajax_loader.png);background-size:50px!important;background-repeat:no-repeat;background-color:#fff;background-position:center}.bwg_container.bwg_carousel *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_]{position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_image_container_]{display:inline-block;position:absolute;text-align:center;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_container_] div{display:table;margin:0 auto}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_image_]{padding:0!important;display:inline-block;float:none!important;margin:4px!important;position:relative;z-index:15}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_],.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_watermark_text_]:hover{text-decoration:none;margin:4px;display:block;position:relative;z-index:17}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel-cont-child{max-width:100%;position:relative;overflow:hidden;height:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel-image{border:0;position:absolute;display:block;max-width:none;padding:0!important;margin:0!important;float:none!important;vertical-align:middle;height:100%;width:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;vertical-align:middle}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg-carousel{position:relative;max-width:100%;width:100%}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature]{position:absolute;display:block;overflow:hidden;cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel-feature] [class^=bwg_carousel-caption] [class^=bwg_carousel_title_text_]{text-decoration:none;position:absolute;z-index:15;display:inline-block;width:75%;top:0;text-align:center;word-wrap:break-word;word-break:break-word}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{bottom:38%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:0%;z-index:13;visibility:visible}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-right]{right:0;left:auto;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel-left]{left:20px;z-index:999}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_video_hide]{width:100%;height:100%;position:absolute;z-index:22}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_] span,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_],.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:inline-table;line-height:0;margin-top:-15px;position:absolute;top:55%}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_left-ico_]:hover,.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=spider_carousel_right-ico_]:hover{cursor:pointer}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]{bottom:0;cursor:pointer;display:flex;justify-content:center;align-items:center;outline:medium none;position:absolute;height:inherit;width:30%;left:35%;z-index:13}.bwg_container.bwg_carousel .bwg_carousel_play_pause:hover .bwg_carousel_play_pause-ico{display:inline-block!important}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_]:hover span{position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [id^=bwg_carousel_play_pause_] span{display:flex;justify-content:center;align-items:center}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico{display:none!important;cursor:pointer;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] .bwg_carousel_play_pause-ico:hover{display:inline-block;position:relative;z-index:13}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_]{padding:0!important;float:none!important;width:100%;height:100%;vertical-align:middle;position:relative;display:table;background-color:#000;text-align:center}.bwg_container.bwg_carousel [id^=bwg_container2_] [class^=bwg_carousel_embed_video_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;position:relative;display:table-cell;background-color:#000;text-align:center}.bwg_thumbnail.bwg_container{padding:0 1px}.bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive{display:inline-block}body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_order_cont,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .bwg_search_container_1,body .bwg_thumbnail.bwg_container .search_line.bwg-search-line-responsive .search_tags_container{width:100%;margin:0 0 10px 0;text-align:center;max-width:100%}.search_line .SumoSelect>.optWrapper.multiple.isFloating{padding-bottom:26px}.bwg_container.bwg_blog_style .fluid-width-video-wrapper,.bwg_container.bwg_carousel .fluid-width-video-wrapper,.bwg_container.bwg_image_browser .fluid-width-video-wrapper{width:100%;position:unset!important;padding:0!important}.bwg_inst_play_btn_cont{width:100%;height:100%;position:absolute;z-index:1;cursor:pointer;top:0}.bwg_inst_play{position:absolute;width:50px;height:50px;background-position:center center;background-repeat:no-repeat;background-size:cover;transition:background-image .2s ease-out;-ms-transition:background-image .2s ease-out;-moz-transition:background-image .2s ease-out;-webkit-transition:background-image .2s ease-out;top:0;left:0;right:0;bottom:0;margin:auto}.bwg_inst_play:hover{background-position:center center;background-repeat:no-repeat;background-size:cover}.spider_popup_wrap *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.spider_popup_wrap{display:inline-block;left:50%;outline:medium none;position:fixed;text-align:center;top:50%;z-index:100000}.bwg_popup_image{width:auto;vertical-align:middle;display:inline-block}.bwg_slider img{display:inline-block}.bwg_popup_embed{width:100%;height:100%;vertical-align:middle;text-align:center;display:table}.bwg_btn_container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.bwg_toggle_btn{margin:0;padding:0}.bwg_ctrl_btn_container{position:absolute;width:100%;z-index:10150}.bwg_btn_container.bwg_no_ctrl_btn .bwg_ctrl_btn_container{background:0 0}.bwg_toggle_container{cursor:pointer;left:50%;line-height:0;position:absolute;text-align:center;z-index:10150}#spider_popup_left-ico span,#spider_popup_right-ico span,.spider_popup_close span{display:table-cell;text-align:center;vertical-align:middle}.bwg_image_wrap{height:inherit;display:table;position:absolute;text-align:center;width:inherit}.bwg_image_wrap *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.bwg_comment_wrap,.bwg_ecommerce_wrap{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.bwg_comment_container,.bwg_ecommerce_container{-moz-box-sizing:border-box;height:100%;overflow:hidden;position:absolute;top:0;z-index:10103}#bwg_ecommerce{padding:10px}.bwg_ecommerce_body{background:0 0!important;border:none!important}.pge_tabs{list-style-type:none;margin:0;padding:0;background:0 0!important}.pge_tabs li a,.pge_tabs li a:hover,.pge_tabs li.pge_active a{text-decoration:none;display:block;width:100%;outline:0!important;padding:8px 5px!important;font-weight:700;font-size:13px}.pge_add_to_cart a{padding:5px 10px;text-decoration:none!important;display:block}.pge_add_to_cart{margin:5px 0 15px}.pge_add_to_cart_title{font-size:17px;padding:5px}.pge_add_to_cart div:first-child{float:left}.pge_add_to_cart div:last-child{float:right;margin-top:4px}.pge_add_to_cart:after,.pge_tabs:after{clear:both;content:"";display:table}#downloads table tr td,#downloads table tr th{padding:6px 10px!important;text-transform:none!important}.bwg_comments input[type=submit],.bwg_ecommerce_panel input[type=button]{cursor:pointer;font-size:15px;width:100%;margin-bottom:5px}.bwg_comments,.bwg_ecommerce_panel{bottom:0;height:100%;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:0;width:100%;z-index:10101}.bwg_comments{height:100%}.bwg_comment_body_p,.bwg_comments p{margin:5px!important;text-align:left;word-wrap:break-word;word-break:break-all}.bwg_ecommerce_panel p{padding:5px!important;text-align:left;word-wrap:break-word;word-break:break-all;margin:0!important}.bwg_comments .bwg-submit-disabled{opacity:.5}.bwg_comments textarea{height:120px;resize:vertical}.bwg_comment_delete_btn{color:#7a7a7a;cursor:pointer;float:right;font-size:14px;margin:2px}.bwg_comments_close,.bwg_ecommerce_close{cursor:pointer;line-height:0;position:relative;font-size:13px;margin:5px;z-index:10150}.bwg_ecommerce_panel a:hover{text-decoration:underline}.bwg_comment_textarea::-webkit-scrollbar{width:4px}.bwg_comment_textarea::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_comment_textarea::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}.bwg_ctrl_btn_container a,.bwg_ctrl_btn_container a:hover{text-decoration:none}.bwg_facebook:hover{color:#3b5998}.bwg_twitter:hover{color:#4099fb}.bwg_pinterest:hover{color:#cb2027}.bwg_tumblr:hover{color:#2f5070}.bwg_image_container{display:table;position:absolute;text-align:center;vertical-align:middle;width:100%}.bwg_filmstrip_container{position:absolute;z-index:10150}.bwg_filmstrip{overflow:hidden;position:absolute;z-index:10106}.bwg_filmstrip_thumbnails{margin:0 auto;overflow:hidden;position:relative}.bwg_filmstrip_thumbnail{position:relative;background:0 0;float:left;cursor:pointer;overflow:hidden}.bwg_filmstrip_thumbnail .bwg_filmstrip_thumbnail_img_wrap{overflow:hidden}.bwg_thumb_active{opacity:1}.bwg_filmstrip_thumbnail_img{display:block;opacity:1}.bwg_filmstrip_left{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_filmstrip_right{cursor:pointer;vertical-align:middle;z-index:10106;line-height:0}.bwg_none_selectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bwg_watermark_container{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}.bwg_watermark_container>div{display:table;margin:0 auto}.bwg_watermark_spun{display:table-cell;overflow:hidden;position:relative}.bwg_watermark_image{margin:4px;position:relative;z-index:10141}.bwg_watermark_text,.bwg_watermark_text:hover{text-decoration:none;margin:4px;position:relative;z-index:10141}.bwg_slide_container{display:table-cell;position:absolute;vertical-align:middle;width:100%;height:100%}.bwg_slide_bg{margin:0 auto;width:inherit;height:inherit}.bwg_slider{height:inherit;width:inherit}.bwg_popup_image_spun{height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;width:inherit;z-index:2}.bwg_popup_image_second_spun{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}.bwg_grid{display:none;height:100%;overflow:hidden;position:absolute;width:100%}.bwg_gridlet{opacity:1;position:absolute}.bwg_image_info::-webkit-scrollbar{width:4px}.bwg_image_info::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.55);border-radius:2px}.bwg_image_info::-webkit-scrollbar-thumb:hover{background-color:#d9d9d9}#bwg_rate_form .bwg_hint{margin:0 5px;display:none}.bwg_star{display:inline-block;width:unset!important}.bwg_image_count_container{left:0;line-height:1;position:absolute;vertical-align:middle}#bwg_comment_form label{display:block;font-weight:700;margin-top:17px;text-transform:uppercase}#bwg_comment_form .bwg-privacy-policy-box label{text-transform:unset;word-break:break-word}.bwg_popup_image_spun .bwg_popup_image_spun1{width:inherit;height:inherit}.bwg_popup_image_spun1 .bwg_popup_image_spun2{vertical-align:middle;text-align:center;height:100%}#embed_conteiner{table-layout:fixed;height:100%}#opacity_div{background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#loading_div{text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}#ecommerce_ajax_loading{position:absolute}#ecommerce_opacity_div{display:none;background-color:rgba(255,255,255,.2);position:absolute;z-index:10150}#ecommerce_loading_div{display:none;text-align:center;position:relative;vertical-align:middle;z-index:10170;float:none;width:30px;height:30px;background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg_ecommerce_panel.bwg_popup_sidebar_panel.bwg_popup_sidebar{text-align:left}#ajax_loading{position:absolute}@media (max-width:480px){.bwg_image_count_container{display:none}.bwg_image_title,.bwg_image_title *{font-size:12px}.bwg_image_description,.bwg_image_description *{font-size:10px}}@media (pointer:none),(pointer:coarse){#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-masonry-thumbnails .bwg-title1,#bwg_container1_0 #bwg_container2_0 .bwg-container-0.bwg-standard-thumbnails .bwg-title1,.bwg-mosaic-thumbnails{opacity:1!important}.bwg-zoom-effect .bwg-zoom-effect-overlay,.bwg-zoom-effect-overlay>span{opacity:1!important;background-color:unset!important}}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_] *{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_wrap_]{border-collapse:collapse;display:table;position:relative;text-align:center;margin:auto}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_image_]{display:inline-block;padding:0!important;margin:0!important;float:none!important;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_embed_]{padding:0!important;margin:0!important;float:none!important;vertical-align:middle;display:inline-block;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_]{position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause{bottom:0;cursor:pointer;display:table;height:inherit;outline:medium none;position:absolute;width:30%;left:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span[id^=bwg_slideshow_play_pause-ico_]{display:inline-block!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause:hover span{position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span.bwg_slideshow_play_pause span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]{display:none!important;cursor:pointer;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=bwg_slideshow_play_pause-ico_]:hover{display:inline-block;position:relative;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{bottom:35%;cursor:pointer;display:inline;height:30%;outline:medium none;position:absolute;width:35%;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]{left:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]{right:0}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover{visibility:visible}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_right_]:hover span{left:auto!important;right:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] a[id^=spider_slideshow_left_]:hover span{left:20px!important}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_] span,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_] span{display:table-cell;text-align:center;vertical-align:middle;z-index:13}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_],div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]{z-index:13;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;display:table;line-height:0;margin-top:-15px;position:absolute;top:50%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_left-ico_]:hover,div[id^=bwg_container1_] div[id^=bwg_container2_] span[id^=spider_slideshow_right-ico_]:hover{cursor:pointer}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_image_container_]{display:table;position:absolute;text-align:center;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_container_]{position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] .bwg_slideshow_filmstrip{overflow:hidden;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnails_]{margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_thumbnail_]{position:relative;background:0 0;cursor:pointer;float:left;overflow:hidden}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_thumb_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_filmstrip_thumbnail_img_]{display:block;opacity:1;padding:0!important}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_left_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_filmstrip_right_]{cursor:pointer;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_none_selectable_]{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_watermark_container_]{display:table-cell;margin:0 auto;position:relative;vertical-align:middle}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_watermark_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_title_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_description_spun_]{display:table-cell;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] img[class^=bwg_slideshow_watermark_image_]{padding:0!important;float:none!important;margin:4px!important;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_],div[id^=bwg_container1_] div[id^=bwg_container2_] a[class^=bwg_slideshow_watermark_text_]:hover{text-decoration:none;margin:4px;position:relative;z-index:15}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_title_text_]{text-decoration:none;position:relative;z-index:11;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_description_text_]{text-decoration:none;position:relative;z-index:15;margin:5px;display:inline-block;word-wrap:break-word;word-break:break-word}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_container_]{display:table-cell;margin:0 auto;position:absolute;vertical-align:middle;width:100%;height:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slide_bg_]{margin:0 auto;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slider_]{height:inherit;width:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun_]{width:inherit;height:inherit;display:table-cell;opacity:1;position:absolute;vertical-align:middle;z-index:2}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_second_spun_]{width:inherit;height:inherit;display:table-cell;opacity:0;position:absolute;vertical-align:middle;z-index:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_grid_]{display:none;height:100%;overflow:hidden;position:absolute;width:100%}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_gridlet_]{opacity:1;position:absolute}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_]{display:inline-block;position:relative;cursor:pointer;overflow:hidden;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_container_]{display:block;overflow:hidden;position:absolute;z-index:17}div[id^=bwg_container1_] div[id^=bwg_container2_] div[class^=bwg_slideshow_dots_thumbnails_]{left:0;font-size:0;margin:0 auto;overflow:hidden;position:relative}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_dots_active_]{opacity:1}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun1_]{display:table;width:inherit;height:inherit}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_slideshow_image_spun2_]{display:table-cell;vertical-align:middle;text-align:center}div[id^=bwg_container1_] div[id^=bwg_container2_] span[class^=bwg_mosaic_play_icon_spun_]{display:flex;height:100%;opacity:1;position:absolute;top:0;width:100%;z-index:100;justify-content:center;align-content:center;flex-direction:column;text-align:center;left:0}.lazy_loader{background-image:url(../images/ajax_loader.png);background-size:30px 30px;background-repeat:no-repeat;background-position:50% 50%}.bwg-container-temp0{visibility:hidden!important;position:absolute!important}.bwg_image_browser .pagination-links{display:flex;padding:0}.bwg_image_browser .pagination-links_col1{flex-grow:3;text-align:left}.bwg_image_browser .pagination-links_col2{flex-grow:4;text-align:center}.bwg_image_browser .pagination-links_col3{flex-grow:3;text-align:right}.bwg_current_page[type=number]{width:35px;display:inline-block;-moz-appearance:textfield;line-height:normal!important}.bwg_current_page::-webkit-inner-spin-button,.bwg_current_page::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bwg_container .bwg_tag_button_view_container{display:flex;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-bottom:45px;position:relative;padding-top:3px;flex-wrap:wrap;overflow:hidden;clear:both}.bwg_container .bwg_tag_button_view_container button{cursor:pointer}.bwg_container .bwg_tag_button_view_container button.active{cursor:default}.bwg_container .bwg_tag_button_view_container .verLine{min-height:26px;margin:0 15px}.bwg_container .bwg_tag_button_see_all{margin-bottom:70px;position:relative;display:none}.bwg_container .bwg_tag_button_see_all .see_all_tags{text-transform:uppercase;position:absolute;padding:10px 25px;font-weight:600;cursor:pointer;left:47%;top:-23px}.bwg_container .bwg_tag_button_see_all .see_all_tags span{display:inline-block;line-height:normal;text-align:center;border-radius:50%;margin-right:10px;font-weight:500;color:#fff;height:18px;width:18px}.bwg_addThis{position:absolute;left:10px;top:10px;z-index:9999}
|
css/sumoselect.css
CHANGED
@@ -1,51 +1,126 @@
|
|
1 |
-
.SumoSelect p {
|
2 |
-
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
.SelectBox {
|
|
|
|
|
5 |
|
6 |
-
.sumoStopScroll{
|
|
|
|
|
7 |
|
8 |
/* Filtering style */
|
9 |
-
.SumoSelect .hidden {
|
10 |
-
|
11 |
-
|
12 |
-
.SumoSelect
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
/*this is applied on that hidden select. DO NOT USE display:none; or visiblity:hidden; and Do not override any of these properties. */
|
16 |
-
.
|
17 |
-
.
|
18 |
-
display: inline-block;
|
19 |
position: absolute;
|
20 |
top: 0;
|
21 |
left: 0;
|
22 |
right: 0;
|
23 |
height: 100%;
|
24 |
-
width:
|
25 |
border: none;
|
26 |
-webkit-box-sizing: border-box;
|
27 |
-moz-box-sizing: border-box;
|
28 |
box-sizing: border-box;
|
|
|
|
|
29 |
-moz-opacity: 0;
|
30 |
-khtml-opacity: 0;
|
31 |
opacity: 0;
|
32 |
}
|
33 |
-
.SelectClass{
|
|
|
|
|
34 |
|
35 |
-
.SumoSelect > .optWrapper > .options
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
.SumoSelect {
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
/*placeholder style*/
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
background-position: center center;
|
50 |
width: 16px;
|
51 |
height: 16px;
|
@@ -59,86 +134,264 @@
|
|
59 |
background-repeat: no-repeat;
|
60 |
opacity: 0.8;
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
/*Set the height of pop up here (only for desktop mode)*/
|
74 |
max-height: 250px;
|
75 |
-
/*height*/
|
76 |
-
|
77 |
-
.SumoSelect > .optWrapper > .options
|
78 |
-
|
79 |
-
|
80 |
-
.SumoSelect > .optWrapper > .options
|
81 |
-
|
82 |
-
|
83 |
-
.
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
.SumoSelect > .optWrapper > .options li
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
/*Floating styles*/
|
92 |
-
.SumoSelect > .optWrapper.isFloating {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
/*disabled state*/
|
95 |
-
.SumoSelect > .optWrapper > .options li.opt.disabled {
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
/*styling for multiple select*/
|
100 |
-
.SumoSelect > .optWrapper.multiple > .options li.opt {
|
|
|
|
|
|
|
101 |
.SumoSelect > .optWrapper.multiple > .options li.opt span,
|
102 |
-
.SumoSelect .select-all > span{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
.SumoSelect > .optWrapper.multiple > .options li.opt span i,
|
104 |
-
.SumoSelect .select-all > span i{
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
-
.SumoSelect > .optWrapper.multiple.okCancelInMulti > .MultiControls {
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
-
.SumoSelect > .optWrapper.multiple > .MultiControls > p {
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
/*styling for select on popup mode*/
|
116 |
-
.
|
117 |
-
|
|
|
118 |
|
119 |
/*styling for only multiple select on popup mode*/
|
120 |
-
.SumoSelect > .optWrapper.multiple.isFloating > .options li.opt {
|
121 |
-
|
|
|
|
|
|
|
|
|
122 |
|
123 |
.SumoSelect > .optWrapper.multiple > .options li.opt.selected span i,
|
124 |
.SumoSelect .select-all.selected > span i,
|
125 |
-
.SumoSelect .select-all.partial > span i{
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
background-image:url(
|
130 |
background-repeat: no-repeat;
|
131 |
-
background-position: center center;
|
|
|
132 |
/*disabled state*/
|
133 |
-
.SumoSelect.disabled {
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
/**Select all button**/
|
137 |
-
.SumoSelect .select-all{
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
/*styling for optgroups*/
|
143 |
-
.SumoSelect > .optWrapper > .options li.optGroup {
|
144 |
-
|
|
|
|
1 |
+
.SumoSelect p {
|
2 |
+
margin: 0;
|
3 |
+
}
|
4 |
+
.SumoSelect {
|
5 |
+
width: 200px;
|
6 |
+
}
|
7 |
|
8 |
+
.SelectBox {
|
9 |
+
padding: 5px 8px;
|
10 |
+
}
|
11 |
|
12 |
+
.sumoStopScroll {
|
13 |
+
overflow: hidden;
|
14 |
+
}
|
15 |
|
16 |
/* Filtering style */
|
17 |
+
.SumoSelect .hidden {
|
18 |
+
display: none;
|
19 |
+
}
|
20 |
+
.SumoSelect .search-txt {
|
21 |
+
display: none;
|
22 |
+
outline: none;
|
23 |
+
}
|
24 |
+
.SumoSelect .no-match {
|
25 |
+
display: none;
|
26 |
+
padding: 6px;
|
27 |
+
}
|
28 |
+
.SumoSelect.open .search-txt {
|
29 |
+
display: inline-block;
|
30 |
+
position: absolute;
|
31 |
+
top: 0;
|
32 |
+
left: 0;
|
33 |
+
width: 100%;
|
34 |
+
margin: 0;
|
35 |
+
padding: 5px 8px;
|
36 |
+
border: none;
|
37 |
+
-webkit-box-sizing: border-box;
|
38 |
+
-moz-box-sizing: border-box;
|
39 |
+
box-sizing: border-box;
|
40 |
+
border-radius: 5px;
|
41 |
+
}
|
42 |
+
.SumoSelect.open > .search > span,
|
43 |
+
.SumoSelect.open > .search > label {
|
44 |
+
visibility: hidden;
|
45 |
+
}
|
46 |
|
47 |
/*this is applied on that hidden select. DO NOT USE display:none; or visiblity:hidden; and Do not override any of these properties. */
|
48 |
+
.SelectClass,
|
49 |
+
.SumoUnder {
|
|
|
50 |
position: absolute;
|
51 |
top: 0;
|
52 |
left: 0;
|
53 |
right: 0;
|
54 |
height: 100%;
|
55 |
+
width: 100%;
|
56 |
border: none;
|
57 |
-webkit-box-sizing: border-box;
|
58 |
-moz-box-sizing: border-box;
|
59 |
box-sizing: border-box;
|
60 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
61 |
+
filter: alpha(opacity=0);
|
62 |
-moz-opacity: 0;
|
63 |
-khtml-opacity: 0;
|
64 |
opacity: 0;
|
65 |
}
|
66 |
+
.SelectClass {
|
67 |
+
z-index: 1;
|
68 |
+
}
|
69 |
|
70 |
+
.SumoSelect > .optWrapper > .options li.opt label,
|
71 |
+
.SumoSelect > .CaptionCont,
|
72 |
+
.SumoSelect .select-all > label {
|
73 |
+
user-select: none;
|
74 |
+
-o-user-select: none;
|
75 |
+
-moz-user-select: none;
|
76 |
+
-khtml-user-select: none;
|
77 |
+
-webkit-user-select: none;
|
78 |
+
}
|
79 |
|
80 |
+
.SumoSelect {
|
81 |
+
display: inline-block;
|
82 |
+
position: relative;
|
83 |
+
outline: none;
|
84 |
+
}
|
85 |
+
.SumoSelect:focus > .CaptionCont,
|
86 |
+
.SumoSelect:hover > .CaptionCont,
|
87 |
+
.SumoSelect.open > .CaptionCont {
|
88 |
+
box-shadow: 0 0 2px #7799d0;
|
89 |
+
border-color: #7799d0;
|
90 |
+
}
|
91 |
+
.SumoSelect > .CaptionCont {
|
92 |
+
position: relative;
|
93 |
+
border: 1px solid #a4a4a4;
|
94 |
+
min-height: 14px;
|
95 |
+
background-color: #fff;
|
96 |
+
border-radius: 2px;
|
97 |
+
margin: 0;
|
98 |
+
}
|
99 |
+
.SumoSelect > .CaptionCont > span {
|
100 |
+
display: block;
|
101 |
+
padding-right: 30px;
|
102 |
+
text-overflow: ellipsis;
|
103 |
+
white-space: nowrap;
|
104 |
+
overflow: hidden;
|
105 |
+
cursor: default;
|
106 |
+
}
|
107 |
/*placeholder style*/
|
108 |
+
/* this part affects our style
|
109 |
+
.SumoSelect > .CaptionCont > span.placeholder {
|
110 |
+
color: #ccc;
|
111 |
+
font-style: italic;
|
112 |
+
}
|
113 |
+
*/
|
114 |
+
.SumoSelect > .CaptionCont > label {
|
115 |
+
position: absolute;
|
116 |
+
top: 0;
|
117 |
+
right: 0;
|
118 |
+
bottom: 0;
|
119 |
+
width: 30px;
|
120 |
+
}
|
121 |
+
/* this part affects our style
|
122 |
+
.SumoSelect > .CaptionCont > label > i {
|
123 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wMdBhAJ/fwnjwAAAGFJREFUKM9jYBh+gBFKuzEwMKQwMDB8xaOWlYGB4T4DA0MrsuapDAwM//HgNwwMDDbYTJuGQ8MHBgYGJ1xOYGNgYJiBpuEpAwODHSF/siDZ+ISBgcGClEDqZ2Bg8B6CkQsAPRga0cpRtDEAAAAASUVORK5CYII=");
|
124 |
background-position: center center;
|
125 |
width: 16px;
|
126 |
height: 16px;
|
134 |
background-repeat: no-repeat;
|
135 |
opacity: 0.8;
|
136 |
}
|
137 |
+
*/
|
138 |
+
.SumoSelect > .optWrapper {
|
139 |
+
display: none;
|
140 |
+
z-index: 1000;
|
141 |
+
top: 30px;
|
142 |
+
width: 100%;
|
143 |
+
position: absolute;
|
144 |
+
left: 0;
|
145 |
+
-webkit-box-sizing: border-box;
|
146 |
+
-moz-box-sizing: border-box;
|
147 |
+
box-sizing: border-box;
|
148 |
+
background: #fff;
|
149 |
+
border: 1px solid #ddd;
|
150 |
+
box-shadow: 2px 3px 3px rgba(0, 0, 0, 0.11);
|
151 |
+
border-radius: 3px;
|
152 |
+
overflow: hidden;
|
153 |
+
}
|
154 |
+
.SumoSelect.open > .optWrapper {
|
155 |
+
top: 35px;
|
156 |
+
display: block;
|
157 |
+
}
|
158 |
+
.SumoSelect.open > .optWrapper.up {
|
159 |
+
top: auto;
|
160 |
+
bottom: 100%;
|
161 |
+
margin-bottom: 5px;
|
162 |
+
}
|
163 |
|
164 |
+
.SumoSelect > .optWrapper ul {
|
165 |
+
list-style: none;
|
166 |
+
display: block;
|
167 |
+
padding: 0;
|
168 |
+
margin: 0;
|
169 |
+
overflow: auto;
|
170 |
+
}
|
171 |
+
.SumoSelect > .optWrapper > .options {
|
172 |
+
border-radius: 2px;
|
173 |
+
position: relative;
|
174 |
/*Set the height of pop up here (only for desktop mode)*/
|
175 |
max-height: 250px;
|
176 |
+
/*height*/
|
177 |
+
}
|
178 |
+
.SumoSelect > .optWrapper.okCancelInMulti > .options {
|
179 |
+
border-radius: 2px 2px 0 0;
|
180 |
+
}
|
181 |
+
.SumoSelect > .optWrapper.selall > .options {
|
182 |
+
border-radius: 0 0 2px 2px;
|
183 |
+
}
|
184 |
+
.SumoSelect > .optWrapper.selall.okCancelInMulti > .options {
|
185 |
+
border-radius: 0;
|
186 |
+
}
|
187 |
+
.SumoSelect > .optWrapper > .options li.group.disabled > label {
|
188 |
+
opacity: 0.5;
|
189 |
+
}
|
190 |
+
.SumoSelect > .optWrapper > .options li ul li.opt {
|
191 |
+
padding-left: 22px;
|
192 |
+
}
|
193 |
+
.SumoSelect > .optWrapper.multiple > .options li ul li.opt {
|
194 |
+
padding-left: 50px;
|
195 |
+
}
|
196 |
+
.SumoSelect > .optWrapper.isFloating > .options {
|
197 |
+
max-height: 100%;
|
198 |
+
box-shadow: 0 0 100px #595959;
|
199 |
+
}
|
200 |
+
.SumoSelect > .optWrapper > .options li.opt {
|
201 |
+
padding: 6px 6px;
|
202 |
+
position: relative;
|
203 |
+
border-bottom: 1px solid #f5f5f5;
|
204 |
+
}
|
205 |
+
.SumoSelect > .optWrapper > .options > li.opt:first-child {
|
206 |
+
border-radius: 2px 2px 0 0;
|
207 |
+
}
|
208 |
+
.SumoSelect > .optWrapper.selall > .options > li.opt:first-child {
|
209 |
+
border-radius: 0;
|
210 |
+
}
|
211 |
+
.SumoSelect > .optWrapper > .options > li.opt:last-child {
|
212 |
+
border-radius: 0 0 2px 2px;
|
213 |
+
border-bottom: none;
|
214 |
+
}
|
215 |
+
.SumoSelect > .optWrapper.okCancelInMulti > .options > li.opt:last-child {
|
216 |
+
border-radius: 0;
|
217 |
+
}
|
218 |
+
.SumoSelect > .optWrapper > .options li.opt:hover {
|
219 |
+
background-color: #e4e4e4;
|
220 |
+
}
|
221 |
+
.SumoSelect > .optWrapper > .options li.opt.sel,
|
222 |
+
.SumoSelect .select-all.sel {
|
223 |
+
background-color: #a1c0e4;
|
224 |
+
}
|
225 |
+
|
226 |
+
.SumoSelect > .optWrapper > .options li label {
|
227 |
+
text-overflow: ellipsis;
|
228 |
+
white-space: nowrap;
|
229 |
+
overflow: hidden;
|
230 |
+
display: block;
|
231 |
+
cursor: pointer;
|
232 |
+
}
|
233 |
+
.SumoSelect > .optWrapper > .options li span {
|
234 |
+
display: none;
|
235 |
+
}
|
236 |
+
.SumoSelect > .optWrapper > .options li.group > label {
|
237 |
+
cursor: default;
|
238 |
+
padding: 8px 6px;
|
239 |
+
font-weight: bold;
|
240 |
+
}
|
241 |
|
242 |
/*Floating styles*/
|
243 |
+
.SumoSelect > .optWrapper.isFloating {
|
244 |
+
position: fixed;
|
245 |
+
top: 0;
|
246 |
+
left: 0;
|
247 |
+
right: 0;
|
248 |
+
width: 90%;
|
249 |
+
bottom: 0;
|
250 |
+
margin: auto;
|
251 |
+
max-height: 90%;
|
252 |
+
}
|
253 |
|
254 |
/*disabled state*/
|
255 |
+
.SumoSelect > .optWrapper > .options li.opt.disabled {
|
256 |
+
background-color: inherit;
|
257 |
+
pointer-events: none;
|
258 |
+
}
|
259 |
+
.SumoSelect > .optWrapper > .options li.opt.disabled * {
|
260 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* IE 5-7 */
|
261 |
+
filter: alpha(opacity=50); /* Netscape */
|
262 |
+
-moz-opacity: 0.5; /* Safari 1.x */
|
263 |
+
-khtml-opacity: 0.5; /* Good browsers */
|
264 |
+
opacity: 0.5;
|
265 |
+
}
|
266 |
|
267 |
/*styling for multiple select*/
|
268 |
+
.SumoSelect > .optWrapper.multiple > .options li.opt {
|
269 |
+
padding-left: 35px;
|
270 |
+
cursor: pointer;
|
271 |
+
}
|
272 |
.SumoSelect > .optWrapper.multiple > .options li.opt span,
|
273 |
+
.SumoSelect .select-all > span {
|
274 |
+
position: absolute;
|
275 |
+
display: block;
|
276 |
+
width: 30px;
|
277 |
+
top: 0;
|
278 |
+
bottom: 0;
|
279 |
+
margin-left: -35px;
|
280 |
+
}
|
281 |
.SumoSelect > .optWrapper.multiple > .options li.opt span i,
|
282 |
+
.SumoSelect .select-all > span i {
|
283 |
+
position: absolute;
|
284 |
+
margin: auto;
|
285 |
+
left: 0;
|
286 |
+
right: 0;
|
287 |
+
top: 0;
|
288 |
+
bottom: 0;
|
289 |
+
width: 14px;
|
290 |
+
height: 14px;
|
291 |
+
border: 1px solid #aeaeae;
|
292 |
+
border-radius: 2px;
|
293 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
|
294 |
+
background-color: #fff;
|
295 |
+
}
|
296 |
+
.SumoSelect > .optWrapper > .MultiControls {
|
297 |
+
display: none;
|
298 |
+
border-top: 1px solid #ddd;
|
299 |
+
background-color: #fff;
|
300 |
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.13);
|
301 |
+
border-radius: 0 0 3px 3px;
|
302 |
+
}
|
303 |
+
.SumoSelect > .optWrapper.multiple.isFloating > .MultiControls {
|
304 |
+
display: block;
|
305 |
+
margin-top: 5px;
|
306 |
+
position: absolute;
|
307 |
+
bottom: 0;
|
308 |
+
width: 100%;
|
309 |
+
}
|
310 |
|
311 |
+
.SumoSelect > .optWrapper.multiple.okCancelInMulti > .MultiControls {
|
312 |
+
display: block;
|
313 |
+
}
|
314 |
+
.SumoSelect > .optWrapper.multiple.okCancelInMulti > .MultiControls > p {
|
315 |
+
padding: 6px;
|
316 |
+
}
|
317 |
+
.SumoSelect > .optWrapper.multiple.okCancelInMulti > .MultiControls > p:focus {
|
318 |
+
box-shadow: 0 0 2px #a1c0e4;
|
319 |
+
border-color: #a1c0e4;
|
320 |
+
outline: none;
|
321 |
+
background-color: #a1c0e4;
|
322 |
+
}
|
323 |
|
324 |
+
.SumoSelect > .optWrapper.multiple > .MultiControls > p {
|
325 |
+
display: inline-block;
|
326 |
+
cursor: pointer;
|
327 |
+
padding: 12px;
|
328 |
+
width: 50%;
|
329 |
+
box-sizing: border-box;
|
330 |
+
text-align: center;
|
331 |
+
}
|
332 |
+
.SumoSelect > .optWrapper.multiple > .MultiControls > p:hover {
|
333 |
+
background-color: #f1f1f1;
|
334 |
+
}
|
335 |
+
.SumoSelect > .optWrapper.multiple > .MultiControls > p.btnOk {
|
336 |
+
border-right: 1px solid #dbdbdb;
|
337 |
+
border-radius: 0 0 0 3px;
|
338 |
+
}
|
339 |
+
.SumoSelect > .optWrapper.multiple > .MultiControls > p.btnCancel {
|
340 |
+
border-radius: 0 0 3px 0;
|
341 |
+
}
|
342 |
/*styling for select on popup mode*/
|
343 |
+
.SumoSelect > .optWrapper.isFloating > .options li.opt {
|
344 |
+
padding: 12px 6px;
|
345 |
+
}
|
346 |
|
347 |
/*styling for only multiple select on popup mode*/
|
348 |
+
.SumoSelect > .optWrapper.multiple.isFloating > .options li.opt {
|
349 |
+
padding-left: 35px;
|
350 |
+
}
|
351 |
+
.SumoSelect > .optWrapper.multiple.isFloating {
|
352 |
+
padding-bottom: 43px;
|
353 |
+
}
|
354 |
|
355 |
.SumoSelect > .optWrapper.multiple > .options li.opt.selected span i,
|
356 |
.SumoSelect .select-all.selected > span i,
|
357 |
+
.SumoSelect .select-all.partial > span i {
|
358 |
+
background-color: rgb(17, 169, 17);
|
359 |
+
box-shadow: none;
|
360 |
+
border-color: transparent;
|
361 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAACzSURBVChTY/wPBAwkACYS1IKVEqWhfflFBsvczWANjISc1L/mEkP5wjsMv3/+ZVhTZcDAANKAC/StvvSf1WctGIPYYMNBhEXOpv9tyy6g6OtbfRFJ8UW4HMOa/bf+M7iugpoCkcClGCQH9kP/mstAd95mYGdlYvAyEmDYdu4Dw8/f/xg641UZCkN0UQMSZhfMVKnozSi2ofsPxdMgTQx2y8BOwgUwQunYpSf4Ag7iB1JiGwAouCBFqHEGogAAAABJRU5ErkJggg==");
|
362 |
background-repeat: no-repeat;
|
363 |
+
background-position: center center;
|
364 |
+
}
|
365 |
/*disabled state*/
|
366 |
+
.SumoSelect.disabled {
|
367 |
+
opacity: 0.7;
|
368 |
+
cursor: not-allowed;
|
369 |
+
}
|
370 |
+
.SumoSelect.disabled > .CaptionCont {
|
371 |
+
border-color: #ccc;
|
372 |
+
box-shadow: none;
|
373 |
+
}
|
374 |
|
375 |
/**Select all button**/
|
376 |
+
.SumoSelect .select-all {
|
377 |
+
border-radius: 3px 3px 0 0;
|
378 |
+
position: relative;
|
379 |
+
border-bottom: 1px solid #ddd;
|
380 |
+
background-color: #fff;
|
381 |
+
padding: 8px 0 3px 35px;
|
382 |
+
height: 20px;
|
383 |
+
cursor: pointer;
|
384 |
+
}
|
385 |
+
.SumoSelect .select-all > label,
|
386 |
+
.SumoSelect .select-all > span i {
|
387 |
+
cursor: pointer;
|
388 |
+
}
|
389 |
+
.SumoSelect .select-all.partial > span i {
|
390 |
+
background-color: #ccc;
|
391 |
+
}
|
392 |
|
393 |
/*styling for optgroups*/
|
394 |
+
.SumoSelect > .optWrapper > .options li.optGroup {
|
395 |
+
padding-left: 5px;
|
396 |
+
text-decoration: underline;
|
397 |
+
}
|
css/sumoselect.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.SumoSelect p{margin:0}.SumoSelect{width:200px}.SelectBox{padding:5px 8px}.sumoStopScroll{overflow:hidden}.SumoSelect .hidden{display:none}.SumoSelect .search-txt{display:none;outline:0}.SumoSelect .no-match{display:none;padding:6px}.SumoSelect.open .search-txt{display:inline-block;position:absolute;top:0;left:0;width:100%;margin:0;padding:
|
1 |
+
.SumoSelect p{margin:0}.SumoSelect{width:200px}.SelectBox{padding:5px 8px}.sumoStopScroll{overflow:hidden}.SumoSelect .hidden{display:none}.SumoSelect .search-txt{display:none;outline:0}.SumoSelect .no-match{display:none;padding:6px}.SumoSelect.open .search-txt{display:inline-block;position:absolute;top:0;left:0;width:100%;margin:0;padding:5px 8px;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-radius:5px}.SumoSelect.open>.search>label,.SumoSelect.open>.search>span{visibility:hidden}.SelectClass,.SumoUnder{position:absolute;top:0;left:0;right:0;height:100%;width:100%;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-moz-opacity:0;-khtml-opacity:0;opacity:0}.SelectClass{z-index:1}.SumoSelect .select-all>label,.SumoSelect>.CaptionCont,.SumoSelect>.optWrapper>.options li.opt label{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none}.SumoSelect{display:inline-block;position:relative;outline:0}.SumoSelect.open>.CaptionCont,.SumoSelect:focus>.CaptionCont,.SumoSelect:hover>.CaptionCont{box-shadow:0 0 2px #7799d0;border-color:#7799d0}.SumoSelect>.CaptionCont{position:relative;border:1px solid #a4a4a4;min-height:14px;background-color:#fff;border-radius:2px;margin:0}.SumoSelect>.CaptionCont>span{display:block;padding-right:30px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;cursor:default}.SumoSelect>.CaptionCont>label{position:absolute;top:0;right:0;bottom:0;width:30px}.SumoSelect>.optWrapper{display:none;z-index:1000;top:30px;width:100%;position:absolute;left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;border:1px solid #ddd;box-shadow:2px 3px 3px rgba(0,0,0,.11);border-radius:3px;overflow:hidden}.SumoSelect.open>.optWrapper{top:35px;display:block}.SumoSelect.open>.optWrapper.up{top:auto;bottom:100%;margin-bottom:5px}.SumoSelect>.optWrapper ul{list-style:none;display:block;padding:0;margin:0;overflow:auto}.SumoSelect>.optWrapper>.options{border-radius:2px;position:relative;max-height:250px}.SumoSelect>.optWrapper.okCancelInMulti>.options{border-radius:2px 2px 0 0}.SumoSelect>.optWrapper.selall>.options{border-radius:0 0 2px 2px}.SumoSelect>.optWrapper.selall.okCancelInMulti>.options{border-radius:0}.SumoSelect>.optWrapper>.options li.group.disabled>label{opacity:.5}.SumoSelect>.optWrapper>.options li ul li.opt{padding-left:22px}.SumoSelect>.optWrapper.multiple>.options li ul li.opt{padding-left:50px}.SumoSelect>.optWrapper.isFloating>.options{max-height:100%;box-shadow:0 0 100px #595959}.SumoSelect>.optWrapper>.options li.opt{padding:6px 6px;position:relative;border-bottom:1px solid #f5f5f5}.SumoSelect>.optWrapper>.options>li.opt:first-child{border-radius:2px 2px 0 0}.SumoSelect>.optWrapper.selall>.options>li.opt:first-child{border-radius:0}.SumoSelect>.optWrapper>.options>li.opt:last-child{border-radius:0 0 2px 2px;border-bottom:none}.SumoSelect>.optWrapper.okCancelInMulti>.options>li.opt:last-child{border-radius:0}.SumoSelect>.optWrapper>.options li.opt:hover{background-color:#e4e4e4}.SumoSelect .select-all.sel,.SumoSelect>.optWrapper>.options li.opt.sel{background-color:#a1c0e4}.SumoSelect>.optWrapper>.options li label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;cursor:pointer}.SumoSelect>.optWrapper>.options li span{display:none}.SumoSelect>.optWrapper>.options li.group>label{cursor:default;padding:8px 6px;font-weight:700}.SumoSelect>.optWrapper.isFloating{position:fixed;top:0;left:0;right:0;width:90%;bottom:0;margin:auto;max-height:90%}.SumoSelect>.optWrapper>.options li.opt.disabled{background-color:inherit;pointer-events:none}.SumoSelect>.optWrapper>.options li.opt.disabled *{-moz-opacity:0.5;-khtml-opacity:0.5;opacity:.5}.SumoSelect>.optWrapper.multiple>.options li.opt{padding-left:35px;cursor:pointer}.SumoSelect .select-all>span,.SumoSelect>.optWrapper.multiple>.options li.opt span{position:absolute;display:block;width:30px;top:0;bottom:0;margin-left:-35px}.SumoSelect .select-all>span i,.SumoSelect>.optWrapper.multiple>.options li.opt span i{position:absolute;margin:auto;left:0;right:0;top:0;bottom:0;width:14px;height:14px;border:1px solid #aeaeae;border-radius:2px;box-shadow:inset 0 1px 3px rgba(0,0,0,.15);background-color:#fff}.SumoSelect>.optWrapper>.MultiControls{display:none;border-top:1px solid #ddd;background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.13);border-radius:0 0 3px 3px}.SumoSelect>.optWrapper.multiple.isFloating>.MultiControls{display:block;margin-top:5px;position:absolute;bottom:0;width:100%}.SumoSelect>.optWrapper.multiple.okCancelInMulti>.MultiControls{display:block}.SumoSelect>.optWrapper.multiple.okCancelInMulti>.MultiControls>p{padding:6px}.SumoSelect>.optWrapper.multiple.okCancelInMulti>.MultiControls>p:focus{box-shadow:0 0 2px #a1c0e4;border-color:#a1c0e4;outline:0;background-color:#a1c0e4}.SumoSelect>.optWrapper.multiple>.MultiControls>p{display:inline-block;cursor:pointer;padding:12px;width:50%;box-sizing:border-box;text-align:center}.SumoSelect>.optWrapper.multiple>.MultiControls>p:hover{background-color:#f1f1f1}.SumoSelect>.optWrapper.multiple>.MultiControls>p.btnOk{border-right:1px solid #dbdbdb;border-radius:0 0 0 3px}.SumoSelect>.optWrapper.multiple>.MultiControls>p.btnCancel{border-radius:0 0 3px 0}.SumoSelect>.optWrapper.isFloating>.options li.opt{padding:12px 6px}.SumoSelect>.optWrapper.multiple.isFloating>.options li.opt{padding-left:35px}.SumoSelect>.optWrapper.multiple.isFloating{padding-bottom:43px}.SumoSelect .select-all.partial>span i,.SumoSelect .select-all.selected>span i,.SumoSelect>.optWrapper.multiple>.options li.opt.selected span i{background-color:#11a911;box-shadow:none;border-color:transparent;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAACzSURBVChTY/wPBAwkACYS1IKVEqWhfflFBsvczWANjISc1L/mEkP5wjsMv3/+ZVhTZcDAANKAC/StvvSf1WctGIPYYMNBhEXOpv9tyy6g6OtbfRFJ8UW4HMOa/bf+M7iugpoCkcClGCQH9kP/mstAd95mYGdlYvAyEmDYdu4Dw8/f/xg641UZCkN0UQMSZhfMVKnozSi2ofsPxdMgTQx2y8BOwgUwQunYpSf4Ag7iB1JiGwAouCBFqHEGogAAAABJRU5ErkJggg==');background-repeat:no-repeat;background-position:center center}.SumoSelect.disabled{opacity:.7;cursor:not-allowed}.SumoSelect.disabled>.CaptionCont{border-color:#ccc;box-shadow:none}.SumoSelect .select-all{border-radius:3px 3px 0 0;position:relative;border-bottom:1px solid #ddd;background-color:#fff;padding:8px 0 3px 35px;height:20px;cursor:pointer}.SumoSelect .select-all>label,.SumoSelect .select-all>span i{cursor:pointer}.SumoSelect .select-all.partial>span i{background-color:#ccc}.SumoSelect>.optWrapper>.options li.optGroup{padding-left:5px;text-decoration:underline}
|
filemanager/UploadHandler.php
CHANGED
@@ -540,7 +540,7 @@ class bwg_UploadHandler {
|
|
540 |
// ini_set('allow_url_fopen',1);
|
541 |
$image_info = @getimagesize(htmlspecialchars_decode($file->url, ENT_COMPAT | ENT_QUOTES));
|
542 |
if ( $file->type == 'svg' ) {
|
543 |
-
$size =
|
544 |
if ( !empty($size) ) {
|
545 |
$file->resolution = $size['width'] . " x " . $size['height'] . " px ";
|
546 |
}
|
@@ -720,7 +720,7 @@ class bwg_UploadHandler {
|
|
720 |
$image_info = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
|
721 |
|
722 |
if ( $type == 'svg' ) {
|
723 |
-
$size =
|
724 |
if( !empty($size) ) {
|
725 |
$file->resolution = $size['width'] . " x " . $size['height'] . " px ";
|
726 |
$file->resolution_thumb = $size['width'] . "x" . $size['height'];
|
@@ -816,19 +816,6 @@ class bwg_UploadHandler {
|
|
816 |
return $file;
|
817 |
}
|
818 |
|
819 |
-
public function get_svg_size( $image ) {
|
820 |
-
|
821 |
-
$xml = simplexml_load_file($image);
|
822 |
-
$attr = $xml->attributes();
|
823 |
-
|
824 |
-
$size = array(
|
825 |
-
'width' => json_decode($attr->width),
|
826 |
-
'height'=> json_decode($attr->height),
|
827 |
-
);
|
828 |
-
|
829 |
-
return $size;
|
830 |
-
}
|
831 |
-
|
832 |
protected function readfile( $file_path ) {
|
833 |
return readfile($file_path);
|
834 |
}
|
@@ -1126,7 +1113,7 @@ class bwg_UploadHandler {
|
|
1126 |
$data['author'] = get_current_user_id();
|
1127 |
|
1128 |
if ( $data['type'] == 'svg') {
|
1129 |
-
$size =
|
1130 |
if( !empty($size['width']) && !empty($size['height']) ) {
|
1131 |
$data['resolution'] = $size['width'] . " x " . $size['height'] . " px ";
|
1132 |
$data['resolution_thumb'] = $size['width'] . "x" . $size['height'];
|
@@ -1134,6 +1121,14 @@ class bwg_UploadHandler {
|
|
1134 |
$data['resolution'] = WDWLibrary::get('upload_img_width') . " x " . WDWLibrary::get('upload_img_height') . " px ";
|
1135 |
$data['resolution_thumb'] = WDWLibrary::get('upload_thumb_width') . "x" . WDWLibrary::get('upload_thumb_height');
|
1136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1137 |
} else {
|
1138 |
$data['resolution'] = isset($info->resolution) ? $info->resolution : '';
|
1139 |
$resolution_thumb = WDWLibrary::get_thumb_size("/" . $data['thumb']);
|
540 |
// ini_set('allow_url_fopen',1);
|
541 |
$image_info = @getimagesize(htmlspecialchars_decode($file->url, ENT_COMPAT | ENT_QUOTES));
|
542 |
if ( $file->type == 'svg' ) {
|
543 |
+
$size = WDWLibrary::get_svg_size($file->url);
|
544 |
if ( !empty($size) ) {
|
545 |
$file->resolution = $size['width'] . " x " . $size['height'] . " px ";
|
546 |
}
|
720 |
$image_info = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
|
721 |
|
722 |
if ( $type == 'svg' ) {
|
723 |
+
$size = WDWLibrary::get_svg_size($file->dir.$file->name);
|
724 |
if( !empty($size) ) {
|
725 |
$file->resolution = $size['width'] . " x " . $size['height'] . " px ";
|
726 |
$file->resolution_thumb = $size['width'] . "x" . $size['height'];
|
816 |
return $file;
|
817 |
}
|
818 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
819 |
protected function readfile( $file_path ) {
|
820 |
return readfile($file_path);
|
821 |
}
|
1113 |
$data['author'] = get_current_user_id();
|
1114 |
|
1115 |
if ( $data['type'] == 'svg') {
|
1116 |
+
$size = WDWLibrary::get_svg_size($info->dir.$data['name']);
|
1117 |
if( !empty($size['width']) && !empty($size['height']) ) {
|
1118 |
$data['resolution'] = $size['width'] . " x " . $size['height'] . " px ";
|
1119 |
$data['resolution_thumb'] = $size['width'] . "x" . $size['height'];
|
1121 |
$data['resolution'] = WDWLibrary::get('upload_img_width') . " x " . WDWLibrary::get('upload_img_height') . " px ";
|
1122 |
$data['resolution_thumb'] = WDWLibrary::get('upload_thumb_width') . "x" . WDWLibrary::get('upload_thumb_height');
|
1123 |
}
|
1124 |
+
$data['credit'] = '';
|
1125 |
+
$data['aperture'] = '';
|
1126 |
+
$data['camera'] = '';
|
1127 |
+
$data['caption'] = '';
|
1128 |
+
$data['iso'] = '';
|
1129 |
+
$data['orientation'] = '';
|
1130 |
+
$data['copyright'] = '';
|
1131 |
+
$data['tags'] = '';
|
1132 |
} else {
|
1133 |
$data['resolution'] = isset($info->resolution) ? $info->resolution : '';
|
1134 |
$resolution_thumb = WDWLibrary::get_thumb_size("/" . $data['thumb']);
|
filemanager/js/default.js
CHANGED
@@ -556,6 +556,9 @@ function onFileDrop(event, obj) {
|
|
556 |
}
|
557 |
|
558 |
function onBtnOpenClick(event, obj) {
|
|
|
|
|
|
|
559 |
if (jQuery('.explorer_item[name="' + filesSelected[0] + '"]').attr("isDir") == true) {
|
560 |
filesSelected.length = 1;
|
561 |
submit("", null, null, null, dir + DS + filesSelected[0], null, null, null, null, null, null);
|
556 |
}
|
557 |
|
558 |
function onBtnOpenClick(event, obj) {
|
559 |
+
jQuery('#add_selectid_img').css('pointer-events', 'none');
|
560 |
+
jQuery('#cancel_add_img').css('pointer-events', 'none');
|
561 |
+
jQuery('#select_all_images').css('pointer-events', 'none');
|
562 |
if (jQuery('.explorer_item[name="' + filesSelected[0] + '"]').attr("isDir") == true) {
|
563 |
filesSelected.length = 1;
|
564 |
submit("", null, null, null, dir + DS + filesSelected[0], null, null, null, null, null, null);
|
filemanager/js/jq_uploader/jquery.fileupload.js
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
/* global define, require */
|
13 |
/* eslint-disable new-cap */
|
14 |
|
15 |
-
(function(factory) {
|
16 |
'use strict';
|
17 |
if (typeof define === 'function' && define.amd) {
|
18 |
// Register as an anonymous AMD module:
|
@@ -24,7 +24,7 @@
|
|
24 |
// Browser globals:
|
25 |
factory(window.jQuery);
|
26 |
}
|
27 |
-
})(function($) {
|
28 |
'use strict';
|
29 |
|
30 |
// Detect file input support, based on
|
@@ -64,7 +64,7 @@
|
|
64 |
*/
|
65 |
function getDragHandler(type) {
|
66 |
var isDragOver = type === 'dragover';
|
67 |
-
return function(e) {
|
68 |
e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
|
69 |
var dataTransfer = e.dataTransfer;
|
70 |
if (
|
@@ -185,11 +185,11 @@
|
|
185 |
|
186 |
// Translation function, gets the message key to be translated
|
187 |
// and an object with context specific data as arguments:
|
188 |
-
i18n: function(message, context) {
|
189 |
// eslint-disable-next-line no-param-reassign
|
190 |
message = this.messages[message] || message.toString();
|
191 |
if (context) {
|
192 |
-
$.each(context, function(key, value) {
|
193 |
// eslint-disable-next-line no-param-reassign
|
194 |
message = message.replace('{' + key + '}', value);
|
195 |
});
|
@@ -202,7 +202,7 @@
|
|
202 |
// value properties, a function returning such an array, a FormData
|
203 |
// object (for XHR file uploads), or a simple object.
|
204 |
// The form of the first fileInput is given as parameter to the function:
|
205 |
-
formData: function(form) {
|
206 |
return form.serializeArray();
|
207 |
},
|
208 |
|
@@ -217,12 +217,12 @@
|
|
217 |
// and allows you to override plugin options as well as define ajax settings.
|
218 |
//
|
219 |
// Listeners for this callback can also be bound the following way:
|
220 |
-
// .
|
221 |
//
|
222 |
// data.submit() returns a Promise object and allows to attach additional
|
223 |
// handlers using jQuery's Deferred callbacks:
|
224 |
// data.submit().done(func).fail(func).always(func);
|
225 |
-
add: function(e, data) {
|
226 |
if (e.isDefaultPrevented()) {
|
227 |
return false;
|
228 |
}
|
@@ -231,7 +231,7 @@
|
|
231 |
(data.autoUpload !== false &&
|
232 |
$(this).fileupload('option', 'autoUpload'))
|
233 |
) {
|
234 |
-
data.process().done(function() {
|
235 |
data.submit();
|
236 |
});
|
237 |
}
|
@@ -240,58 +240,58 @@
|
|
240 |
// Other callbacks:
|
241 |
|
242 |
// Callback for the submit event of each file upload:
|
243 |
-
// submit: function (e, data) {}, // .
|
244 |
|
245 |
// Callback for the start of each file upload request:
|
246 |
-
// send: function (e, data) {}, // .
|
247 |
|
248 |
// Callback for successful uploads:
|
249 |
-
// done: function (e, data) {}, // .
|
250 |
|
251 |
// Callback for failed (abort or error) uploads:
|
252 |
-
// fail: function (e, data) {}, // .
|
253 |
|
254 |
// Callback for completed (success, abort or error) requests:
|
255 |
-
// always: function (e, data) {}, // .
|
256 |
|
257 |
// Callback for upload progress events:
|
258 |
-
// progress: function (e, data) {}, // .
|
259 |
|
260 |
// Callback for global upload progress events:
|
261 |
-
// progressall: function (e, data) {}, // .
|
262 |
|
263 |
// Callback for uploads start, equivalent to the global ajaxStart event:
|
264 |
-
// start: function (e) {}, // .
|
265 |
|
266 |
// Callback for uploads stop, equivalent to the global ajaxStop event:
|
267 |
-
// stop: function (e) {}, // .
|
268 |
|
269 |
// Callback for change events of the fileInput(s):
|
270 |
-
// change: function (e, data) {}, // .
|
271 |
|
272 |
// Callback for paste events to the pasteZone(s):
|
273 |
-
// paste: function (e, data) {}, // .
|
274 |
|
275 |
// Callback for drop events of the dropZone(s):
|
276 |
-
// drop: function (e, data) {}, // .
|
277 |
|
278 |
// Callback for dragover events of the dropZone(s):
|
279 |
-
// dragover: function (e) {}, // .
|
280 |
|
281 |
// Callback before the start of each chunk upload request (before form data initialization):
|
282 |
-
// chunkbeforesend: function (e, data) {}, // .
|
283 |
|
284 |
// Callback for the start of each chunk upload request:
|
285 |
-
// chunksend: function (e, data) {}, // .
|
286 |
|
287 |
// Callback for successful chunk uploads:
|
288 |
-
// chunkdone: function (e, data) {}, // .
|
289 |
|
290 |
// Callback for failed (abort or error) chunk uploads:
|
291 |
-
// chunkfail: function (e, data) {}, // .
|
292 |
|
293 |
// Callback for completed (success, abort or error) chunk upload requests:
|
294 |
-
// chunkalways: function (e, data) {}, // .
|
295 |
|
296 |
// The plugin options are used as settings object for the ajax calls.
|
297 |
// The following are jQuery ajax settings required for the file uploads:
|
@@ -301,6 +301,16 @@
|
|
301 |
timeout: 0
|
302 |
},
|
303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
// A list of options that require reinitializing event listeners and/or
|
305 |
// special initialization code:
|
306 |
_specialOptions: [
|
@@ -313,16 +323,16 @@
|
|
313 |
|
314 |
_blobSlice:
|
315 |
$.support.blobSlice &&
|
316 |
-
function() {
|
317 |
var slice = this.slice || this.webkitSlice || this.mozSlice;
|
318 |
return slice.apply(this, arguments);
|
319 |
},
|
320 |
|
321 |
-
_BitrateTimer: function() {
|
322 |
this.timestamp = Date.now ? Date.now() : new Date().getTime();
|
323 |
this.loaded = 0;
|
324 |
this.bitrate = 0;
|
325 |
-
this.getBitrate = function(now, loaded, interval) {
|
326 |
var timeDiff = now - this.timestamp;
|
327 |
if (!this.bitrate || !interval || timeDiff > interval) {
|
328 |
this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
|
@@ -333,7 +343,7 @@
|
|
333 |
};
|
334 |
},
|
335 |
|
336 |
-
_isXHRUpload: function(options) {
|
337 |
return (
|
338 |
!options.forceIframeTransport &&
|
339 |
((!options.multipart && $.support.xhrFileUpload) ||
|
@@ -341,7 +351,7 @@
|
|
341 |
);
|
342 |
},
|
343 |
|
344 |
-
_getFormData: function(options) {
|
345 |
var formData;
|
346 |
if ($.type(options.formData) === 'function') {
|
347 |
return options.formData(options.form);
|
@@ -351,7 +361,7 @@
|
|
351 |
}
|
352 |
if ($.type(options.formData) === 'object') {
|
353 |
formData = [];
|
354 |
-
$.each(options.formData, function(name, value) {
|
355 |
formData.push({ name: name, value: value });
|
356 |
});
|
357 |
return formData;
|
@@ -359,15 +369,15 @@
|
|
359 |
return [];
|
360 |
},
|
361 |
|
362 |
-
_getTotal: function(files) {
|
363 |
var total = 0;
|
364 |
-
$.each(files, function(index, file) {
|
365 |
total += file.size || 1;
|
366 |
});
|
367 |
return total;
|
368 |
},
|
369 |
|
370 |
-
_initProgressObject: function(obj) {
|
371 |
var progress = {
|
372 |
loaded: 0,
|
373 |
total: 0,
|
@@ -380,7 +390,7 @@
|
|
380 |
}
|
381 |
},
|
382 |
|
383 |
-
_initResponseObject: function(obj) {
|
384 |
var prop;
|
385 |
if (obj._response) {
|
386 |
for (prop in obj._response) {
|
@@ -393,7 +403,7 @@
|
|
393 |
}
|
394 |
},
|
395 |
|
396 |
-
_onProgress: function(e, data) {
|
397 |
if (e.lengthComputable) {
|
398 |
var now = Date.now ? Date.now() : new Date().getTime(),
|
399 |
loaded;
|
@@ -442,13 +452,13 @@
|
|
442 |
}
|
443 |
},
|
444 |
|
445 |
-
_initProgressListener: function(options) {
|
446 |
var that = this,
|
447 |
xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
|
448 |
// Accesss to the native XHR object is required to add event listeners
|
449 |
// for the upload progress event:
|
450 |
if (xhr.upload) {
|
451 |
-
$(xhr.upload).
|
452 |
var oe = e.originalEvent;
|
453 |
// Make sure the progress event properties get copied over:
|
454 |
e.lengthComputable = oe.lengthComputable;
|
@@ -456,30 +466,30 @@
|
|
456 |
e.total = oe.total;
|
457 |
that._onProgress(e, options);
|
458 |
});
|
459 |
-
options.xhr = function() {
|
460 |
return xhr;
|
461 |
};
|
462 |
}
|
463 |
},
|
464 |
|
465 |
-
_deinitProgressListener: function(options) {
|
466 |
var xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
|
467 |
if (xhr.upload) {
|
468 |
-
$(xhr.upload).
|
469 |
}
|
470 |
},
|
471 |
|
472 |
-
_isInstanceOf: function(type, obj) {
|
473 |
// Cross-frame instanceof check
|
474 |
return Object.prototype.toString.call(obj) === '[object ' + type + ']';
|
475 |
},
|
476 |
|
477 |
-
_getUniqueFilename: function(name, map) {
|
478 |
// eslint-disable-next-line no-param-reassign
|
479 |
name = String(name);
|
480 |
if (map[name]) {
|
481 |
// eslint-disable-next-line no-param-reassign
|
482 |
-
name = name.replace(/(?: \(([\d]+)\))?(\.[^.]+)?$/, function(
|
483 |
_,
|
484 |
p1,
|
485 |
p2
|
@@ -494,7 +504,7 @@
|
|
494 |
return name;
|
495 |
},
|
496 |
|
497 |
-
_initXHRData: function(options) {
|
498 |
var that = this,
|
499 |
formData,
|
500 |
file = options.files[0],
|
@@ -530,7 +540,7 @@
|
|
530 |
value: options.blob
|
531 |
});
|
532 |
} else {
|
533 |
-
$.each(options.files, function(index, file) {
|
534 |
formData.push({
|
535 |
name:
|
536 |
($.type(options.paramName) === 'array' &&
|
@@ -545,7 +555,7 @@
|
|
545 |
formData = options.formData;
|
546 |
} else {
|
547 |
formData = new FormData();
|
548 |
-
$.each(this._getFormData(options), function(index, field) {
|
549 |
formData.append(field.name, field.value);
|
550 |
});
|
551 |
}
|
@@ -556,7 +566,7 @@
|
|
556 |
file.uploadName || file.name
|
557 |
);
|
558 |
} else {
|
559 |
-
$.each(options.files, function(index, file) {
|
560 |
// This check allows the tests to run with
|
561 |
// dummy objects:
|
562 |
if (
|
@@ -587,10 +597,8 @@
|
|
587 |
options.blob = null;
|
588 |
},
|
589 |
|
590 |
-
_initIframeSettings: function(options) {
|
591 |
-
var targetHost = $('<a></a>')
|
592 |
-
.prop('href', options.url)
|
593 |
-
.prop('host');
|
594 |
// Setting the dataType to iframe enables the iframe transport:
|
595 |
options.dataType = 'iframe ' + (options.dataType || '');
|
596 |
// The iframe transport accepts a serialized array as form data:
|
@@ -604,7 +612,7 @@
|
|
604 |
}
|
605 |
},
|
606 |
|
607 |
-
_initDataSettings: function(options) {
|
608 |
if (this._isXHRUpload(options)) {
|
609 |
if (!this._chunkedUpload(options, true)) {
|
610 |
if (!options.data) {
|
@@ -622,12 +630,12 @@
|
|
622 |
}
|
623 |
},
|
624 |
|
625 |
-
_getParamName: function(options) {
|
626 |
var fileInput = $(options.fileInput),
|
627 |
paramName = options.paramName;
|
628 |
if (!paramName) {
|
629 |
paramName = [];
|
630 |
-
fileInput.each(function() {
|
631 |
var input = $(this),
|
632 |
name = input.prop('name') || 'files[]',
|
633 |
i = (input.prop('files') || [1]).length;
|
@@ -645,7 +653,7 @@
|
|
645 |
return paramName;
|
646 |
},
|
647 |
|
648 |
-
_initFormSettings: function(options) {
|
649 |
// Retrieve missing options from the input field and the
|
650 |
// associated form, if available:
|
651 |
if (!options.form || !options.form.length) {
|
@@ -679,7 +687,7 @@
|
|
679 |
}
|
680 |
},
|
681 |
|
682 |
-
_getAJAXSettings: function(data) {
|
683 |
var options = $.extend({}, this.options, data);
|
684 |
this._initFormSettings(options);
|
685 |
this._initDataSettings(options);
|
@@ -688,7 +696,7 @@
|
|
688 |
|
689 |
// jQuery 1.6 doesn't provide .state(),
|
690 |
// while jQuery 1.8+ removed .isRejected() and .isResolved():
|
691 |
-
_getDeferredState: function(deferred) {
|
692 |
if (deferred.state) {
|
693 |
return deferred.state();
|
694 |
}
|
@@ -703,7 +711,7 @@
|
|
703 |
|
704 |
// Maps jqXHR callbacks to the equivalent
|
705 |
// methods of the given Promise object:
|
706 |
-
_enhancePromise: function(promise) {
|
707 |
promise.success = promise.done;
|
708 |
promise.error = promise.fail;
|
709 |
promise.complete = promise.always;
|
@@ -712,7 +720,7 @@
|
|
712 |
|
713 |
// Creates and returns a Promise object enhanced with
|
714 |
// the jqXHR methods abort, success, error and complete:
|
715 |
-
_getXHRPromise: function(resolveOrReject, context, args) {
|
716 |
var dfd = $.Deferred(),
|
717 |
promise = dfd.promise();
|
718 |
// eslint-disable-next-line no-param-reassign
|
@@ -727,31 +735,26 @@
|
|
727 |
},
|
728 |
|
729 |
// Adds convenience methods to the data callback argument:
|
730 |
-
_addConvenienceMethods: function(e, data) {
|
731 |
var that = this,
|
732 |
-
getPromise = function(args) {
|
733 |
-
return $.Deferred()
|
734 |
-
.resolveWith(that, args)
|
735 |
-
.promise();
|
736 |
};
|
737 |
-
data.process = function(resolveFunc, rejectFunc) {
|
738 |
if (resolveFunc || rejectFunc) {
|
739 |
-
data._processQueue = this._processQueue = (
|
740 |
-
|
741 |
-
|
742 |
-
.then(function() {
|
743 |
if (data.errorThrown) {
|
744 |
-
return $.Deferred()
|
745 |
-
.rejectWith(that, [data])
|
746 |
-
.promise();
|
747 |
}
|
748 |
return getPromise(arguments);
|
749 |
})
|
750 |
-
.
|
751 |
}
|
752 |
return this._processQueue || getPromise([this]);
|
753 |
};
|
754 |
-
data.submit = function() {
|
755 |
if (this.state() !== 'pending') {
|
756 |
data.jqXHR = this.jqXHR =
|
757 |
that._trigger(
|
@@ -762,7 +765,7 @@
|
|
762 |
}
|
763 |
return this.jqXHR || that._getXHRPromise();
|
764 |
};
|
765 |
-
data.abort = function() {
|
766 |
if (this.jqXHR) {
|
767 |
return this.jqXHR.abort();
|
768 |
}
|
@@ -770,7 +773,7 @@
|
|
770 |
that._trigger('fail', null, this);
|
771 |
return that._getXHRPromise(false);
|
772 |
};
|
773 |
-
data.state = function() {
|
774 |
if (this.jqXHR) {
|
775 |
return that._getDeferredState(this.jqXHR);
|
776 |
}
|
@@ -778,24 +781,24 @@
|
|
778 |
return that._getDeferredState(this._processQueue);
|
779 |
}
|
780 |
};
|
781 |
-
data.processing = function() {
|
782 |
return (
|
783 |
!this.jqXHR &&
|
784 |
this._processQueue &&
|
785 |
that._getDeferredState(this._processQueue) === 'pending'
|
786 |
);
|
787 |
};
|
788 |
-
data.progress = function() {
|
789 |
return this._progress;
|
790 |
};
|
791 |
-
data.response = function() {
|
792 |
return this._response;
|
793 |
};
|
794 |
},
|
795 |
|
796 |
// Parses the Range header from the server response
|
797 |
// and returns the uploaded bytes:
|
798 |
-
_getUploadedBytes: function(jqXHR) {
|
799 |
var range = jqXHR.getResponseHeader('Range'),
|
800 |
parts = range && range.split('-'),
|
801 |
upperBytesPos = parts && parts.length > 1 && parseInt(parts[1], 10);
|
@@ -807,7 +810,7 @@
|
|
807 |
// If the second parameter is true, only tests if the file
|
808 |
// should be uploaded in chunks, but does not invoke any
|
809 |
// upload requests:
|
810 |
-
_chunkedUpload: function(options, testOnly) {
|
811 |
options.uploadedBytes = options.uploadedBytes || 0;
|
812 |
var that = this,
|
813 |
file = options.files[0],
|
@@ -841,7 +844,7 @@
|
|
841 |
]);
|
842 |
}
|
843 |
// The chunk upload method:
|
844 |
-
upload = function() {
|
845 |
// Clone the options object for each chunk upload:
|
846 |
var o = $.extend({}, options),
|
847 |
currentLoaded = o._progress.loaded;
|
@@ -867,7 +870,7 @@
|
|
867 |
(that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
|
868 |
that._getXHRPromise(false, o.context)
|
869 |
)
|
870 |
-
.done(function(result, textStatus, jqXHR) {
|
871 |
ub = that._getUploadedBytes(jqXHR) || ub + o.chunkSize;
|
872 |
// Create a progress event if no final progress event
|
873 |
// with loaded equaling total has been triggered
|
@@ -896,7 +899,7 @@
|
|
896 |
dfd.resolveWith(o.context, [result, textStatus, jqXHR]);
|
897 |
}
|
898 |
})
|
899 |
-
.fail(function(jqXHR, textStatus, errorThrown) {
|
900 |
o.jqXHR = jqXHR;
|
901 |
o.textStatus = textStatus;
|
902 |
o.errorThrown = errorThrown;
|
@@ -904,19 +907,19 @@
|
|
904 |
that._trigger('chunkalways', null, o);
|
905 |
dfd.rejectWith(o.context, [jqXHR, textStatus, errorThrown]);
|
906 |
})
|
907 |
-
.always(function() {
|
908 |
that._deinitProgressListener(o);
|
909 |
});
|
910 |
};
|
911 |
this._enhancePromise(promise);
|
912 |
-
promise.abort = function() {
|
913 |
return jqXHR.abort();
|
914 |
};
|
915 |
upload();
|
916 |
return promise;
|
917 |
},
|
918 |
|
919 |
-
_beforeSend: function(e, data) {
|
920 |
if (this._active === 0) {
|
921 |
// the start callback is triggered when an upload starts
|
922 |
// and no other uploads are currently running,
|
@@ -942,7 +945,7 @@
|
|
942 |
this._progress.total += data.total;
|
943 |
},
|
944 |
|
945 |
-
_onDone: function(result, textStatus, jqXHR, options) {
|
946 |
var total = options._progress.total,
|
947 |
response = options._response;
|
948 |
if (options._progress.loaded < total) {
|
@@ -963,7 +966,7 @@
|
|
963 |
this._trigger('done', null, options);
|
964 |
},
|
965 |
|
966 |
-
_onFail: function(jqXHR, textStatus, errorThrown, options) {
|
967 |
var response = options._response;
|
968 |
if (options.recalculateProgress) {
|
969 |
// Remove the failed (error or abort) file upload from
|
@@ -977,13 +980,13 @@
|
|
977 |
this._trigger('fail', null, options);
|
978 |
},
|
979 |
|
980 |
-
_onAlways: function(jqXHRorResult, textStatus, jqXHRorError, options) {
|
981 |
// jqXHRorResult, textStatus and jqXHRorError are added to the
|
982 |
// options object via done and fail callbacks
|
983 |
this._trigger('always', null, options);
|
984 |
},
|
985 |
|
986 |
-
_onSend: function(e, data) {
|
987 |
if (!data.submit) {
|
988 |
this._addConvenienceMethods(e, data);
|
989 |
}
|
@@ -993,7 +996,7 @@
|
|
993 |
slot,
|
994 |
pipe,
|
995 |
options = that._getAJAXSettings(data),
|
996 |
-
send = function() {
|
997 |
that._sending += 1;
|
998 |
// Set timer for bitrate progress calculation:
|
999 |
options._bitrateTimer = new that._BitrateTimer();
|
@@ -1010,13 +1013,13 @@
|
|
1010 |
that._chunkedUpload(options) ||
|
1011 |
$.ajax(options)
|
1012 |
)
|
1013 |
-
.done(function(result, textStatus, jqXHR) {
|
1014 |
that._onDone(result, textStatus, jqXHR, options);
|
1015 |
})
|
1016 |
-
.fail(function(jqXHR, textStatus, errorThrown) {
|
1017 |
that._onFail(jqXHR, textStatus, errorThrown, options);
|
1018 |
})
|
1019 |
-
.always(function(jqXHRorResult, textStatus, jqXHRorError) {
|
1020 |
that._deinitProgressListener(options);
|
1021 |
that._onAlways(
|
1022 |
jqXHRorResult,
|
@@ -1058,15 +1061,15 @@
|
|
1058 |
if (this.options.limitConcurrentUploads > 1) {
|
1059 |
slot = $.Deferred();
|
1060 |
this._slots.push(slot);
|
1061 |
-
pipe = slot.
|
1062 |
} else {
|
1063 |
-
this._sequence = this._sequence.
|
1064 |
pipe = this._sequence;
|
1065 |
}
|
1066 |
// Return the piped Promise object, enhanced with an abort method,
|
1067 |
// which is delegated to the jqXHR object of the current upload,
|
1068 |
// and jqXHR callbacks mapped to the equivalent Promise methods:
|
1069 |
-
pipe.abort = function() {
|
1070 |
aborted = [undefined, 'abort', 'abort'];
|
1071 |
if (!jqXHR) {
|
1072 |
if (slot) {
|
@@ -1081,7 +1084,7 @@
|
|
1081 |
return send();
|
1082 |
},
|
1083 |
|
1084 |
-
_onAdd: function(e, data) {
|
1085 |
var that = this,
|
1086 |
result = true,
|
1087 |
options = $.extend({}, this.options, data),
|
@@ -1144,7 +1147,7 @@
|
|
1144 |
paramNameSet = paramName;
|
1145 |
}
|
1146 |
data.originalFiles = files;
|
1147 |
-
$.each(fileSet || files, function(index, element) {
|
1148 |
var newData = $.extend({}, data);
|
1149 |
newData.files = fileSet ? element : [element];
|
1150 |
newData.paramName = paramNameSet[index];
|
@@ -1161,29 +1164,27 @@
|
|
1161 |
return result;
|
1162 |
},
|
1163 |
|
1164 |
-
_replaceFileInput: function(data) {
|
1165 |
var input = data.fileInput,
|
1166 |
inputClone = input.clone(true),
|
1167 |
restoreFocus = input.is(document.activeElement);
|
1168 |
// Add a reference for the new cloned file input to the data argument:
|
1169 |
data.fileInputClone = inputClone;
|
1170 |
-
$('<form></form>')
|
1171 |
-
.append(inputClone)[0]
|
1172 |
-
.reset();
|
1173 |
// Detaching allows to insert the fileInput on another form
|
1174 |
// without loosing the file input value:
|
1175 |
input.after(inputClone).detach();
|
1176 |
// If the fileInput had focus before it was detached,
|
1177 |
// restore focus to the inputClone.
|
1178 |
if (restoreFocus) {
|
1179 |
-
inputClone.focus
|
1180 |
}
|
1181 |
// Avoid memory leaks with the detached file input:
|
1182 |
-
$.cleanData(input.
|
1183 |
// Replace the original file input element in the fileInput
|
1184 |
// elements set with the clone, which has been copied including
|
1185 |
// event handlers:
|
1186 |
-
this.options.fileInput = this.options.fileInput.map(function(i, el) {
|
1187 |
if (el === input[0]) {
|
1188 |
return inputClone[0];
|
1189 |
}
|
@@ -1196,12 +1197,12 @@
|
|
1196 |
}
|
1197 |
},
|
1198 |
|
1199 |
-
_handleFileTreeEntry: function(entry, path) {
|
1200 |
var that = this,
|
1201 |
dfd = $.Deferred(),
|
1202 |
entries = [],
|
1203 |
dirReader,
|
1204 |
-
errorHandler = function(e) {
|
1205 |
if (e && !e.entry) {
|
1206 |
e.entry = entry;
|
1207 |
}
|
@@ -1211,16 +1212,16 @@
|
|
1211 |
// to be returned together in one set:
|
1212 |
dfd.resolve([e]);
|
1213 |
},
|
1214 |
-
successHandler = function(entries) {
|
1215 |
that
|
1216 |
._handleFileTreeEntries(entries, path + entry.name + '/')
|
1217 |
-
.done(function(files) {
|
1218 |
dfd.resolve(files);
|
1219 |
})
|
1220 |
.fail(errorHandler);
|
1221 |
},
|
1222 |
-
readEntries = function() {
|
1223 |
-
dirReader.readEntries(function(results) {
|
1224 |
if (!results.length) {
|
1225 |
successHandler(entries);
|
1226 |
} else {
|
@@ -1237,7 +1238,7 @@
|
|
1237 |
entry._file.relativePath = path;
|
1238 |
dfd.resolve(entry._file);
|
1239 |
} else {
|
1240 |
-
entry.file(function(file) {
|
1241 |
file.relativePath = path;
|
1242 |
dfd.resolve(file);
|
1243 |
}, errorHandler);
|
@@ -1253,21 +1254,21 @@
|
|
1253 |
return dfd.promise();
|
1254 |
},
|
1255 |
|
1256 |
-
_handleFileTreeEntries: function(entries, path) {
|
1257 |
var that = this;
|
1258 |
return $.when
|
1259 |
.apply(
|
1260 |
$,
|
1261 |
-
$.map(entries, function(entry) {
|
1262 |
return that._handleFileTreeEntry(entry, path);
|
1263 |
})
|
1264 |
)
|
1265 |
-
.
|
1266 |
return Array.prototype.concat.apply([], arguments);
|
1267 |
});
|
1268 |
},
|
1269 |
|
1270 |
-
_getDroppedFiles: function(dataTransfer) {
|
1271 |
// eslint-disable-next-line no-param-reassign
|
1272 |
dataTransfer = dataTransfer || {};
|
1273 |
var items = dataTransfer.items;
|
@@ -1277,7 +1278,7 @@
|
|
1277 |
(items[0].webkitGetAsEntry || items[0].getAsEntry)
|
1278 |
) {
|
1279 |
return this._handleFileTreeEntries(
|
1280 |
-
$.map(items, function(item) {
|
1281 |
var entry;
|
1282 |
if (item.webkitGetAsEntry) {
|
1283 |
entry = item.webkitGetAsEntry();
|
@@ -1291,12 +1292,10 @@
|
|
1291 |
})
|
1292 |
);
|
1293 |
}
|
1294 |
-
return $.Deferred()
|
1295 |
-
.resolve($.makeArray(dataTransfer.files))
|
1296 |
-
.promise();
|
1297 |
},
|
1298 |
|
1299 |
-
_getSingleFileInputFiles: function(fileInput) {
|
1300 |
// eslint-disable-next-line no-param-reassign
|
1301 |
fileInput = $(fileInput);
|
1302 |
var entries =
|
@@ -1310,9 +1309,7 @@
|
|
1310 |
if (!files.length) {
|
1311 |
value = fileInput.prop('value');
|
1312 |
if (!value) {
|
1313 |
-
return $.Deferred()
|
1314 |
-
.resolve([])
|
1315 |
-
.promise();
|
1316 |
}
|
1317 |
// If the files property is not available, the browser does not
|
1318 |
// support the File API and we add a pseudo File object with
|
@@ -1320,34 +1317,32 @@
|
|
1320 |
files = [{ name: value.replace(/^.*\\/, '') }];
|
1321 |
} else if (files[0].name === undefined && files[0].fileName) {
|
1322 |
// File normalization for Safari 4 and Firefox 3:
|
1323 |
-
$.each(files, function(index, file) {
|
1324 |
file.name = file.fileName;
|
1325 |
file.size = file.fileSize;
|
1326 |
});
|
1327 |
}
|
1328 |
-
return $.Deferred()
|
1329 |
-
.resolve(files)
|
1330 |
-
.promise();
|
1331 |
},
|
1332 |
|
1333 |
-
_getFileInputFiles: function(fileInput) {
|
1334 |
if (!(fileInput instanceof $) || fileInput.length === 1) {
|
1335 |
return this._getSingleFileInputFiles(fileInput);
|
1336 |
}
|
1337 |
return $.when
|
1338 |
.apply($, $.map(fileInput, this._getSingleFileInputFiles))
|
1339 |
-
.
|
1340 |
return Array.prototype.concat.apply([], arguments);
|
1341 |
});
|
1342 |
},
|
1343 |
|
1344 |
-
_onChange: function(e) {
|
1345 |
var that = this,
|
1346 |
data = {
|
1347 |
fileInput: $(e.target),
|
1348 |
form: $(e.target.form)
|
1349 |
};
|
1350 |
-
this._getFileInputFiles(data.fileInput).always(function(files) {
|
1351 |
data.files = files;
|
1352 |
if (that.options.replaceFileInput) {
|
1353 |
that._replaceFileInput(data);
|
@@ -1364,14 +1359,14 @@
|
|
1364 |
});
|
1365 |
},
|
1366 |
|
1367 |
-
_onPaste: function(e) {
|
1368 |
var items =
|
1369 |
e.originalEvent &&
|
1370 |
e.originalEvent.clipboardData &&
|
1371 |
e.originalEvent.clipboardData.items,
|
1372 |
data = { files: [] };
|
1373 |
if (items && items.length) {
|
1374 |
-
$.each(items, function(index, item) {
|
1375 |
var file = item.getAsFile && item.getAsFile();
|
1376 |
if (file) {
|
1377 |
data.files.push(file);
|
@@ -1389,14 +1384,14 @@
|
|
1389 |
}
|
1390 |
},
|
1391 |
|
1392 |
-
_onDrop: function(e) {
|
1393 |
e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
|
1394 |
var that = this,
|
1395 |
dataTransfer = e.dataTransfer,
|
1396 |
data = {};
|
1397 |
if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
|
1398 |
e.preventDefault();
|
1399 |
-
this._getDroppedFiles(dataTransfer).always(function(files) {
|
1400 |
data.files = files;
|
1401 |
if (
|
1402 |
that._trigger(
|
@@ -1417,7 +1412,7 @@
|
|
1417 |
|
1418 |
_onDragLeave: getDragHandler('dragleave'),
|
1419 |
|
1420 |
-
_initEventHandlers: function() {
|
1421 |
if (this._isXHRUpload(this.options)) {
|
1422 |
this._on(this.options.dropZone, {
|
1423 |
dragover: this._onDragOver,
|
@@ -1438,17 +1433,17 @@
|
|
1438 |
}
|
1439 |
},
|
1440 |
|
1441 |
-
_destroyEventHandlers: function() {
|
1442 |
this._off(this.options.dropZone, 'dragenter dragleave dragover drop');
|
1443 |
this._off(this.options.pasteZone, 'paste');
|
1444 |
this._off(this.options.fileInput, 'change');
|
1445 |
},
|
1446 |
|
1447 |
-
_destroy: function() {
|
1448 |
this._destroyEventHandlers();
|
1449 |
},
|
1450 |
|
1451 |
-
_setOption: function(key, value) {
|
1452 |
var reinit = $.inArray(key, this._specialOptions) !== -1;
|
1453 |
if (reinit) {
|
1454 |
this._destroyEventHandlers();
|
@@ -1460,7 +1455,7 @@
|
|
1460 |
}
|
1461 |
},
|
1462 |
|
1463 |
-
_initSpecialOptions: function() {
|
1464 |
var options = this.options;
|
1465 |
if (options.fileInput === undefined) {
|
1466 |
options.fileInput = this.element.is('input[type="file"]')
|
@@ -1477,14 +1472,14 @@
|
|
1477 |
}
|
1478 |
},
|
1479 |
|
1480 |
-
_getRegExp: function(str) {
|
1481 |
var parts = str.split('/'),
|
1482 |
modifiers = parts.pop();
|
1483 |
parts.shift();
|
1484 |
return new RegExp(parts.join('/'), modifiers);
|
1485 |
},
|
1486 |
|
1487 |
-
_isRegExpOption: function(key, value) {
|
1488 |
return (
|
1489 |
key !== 'url' &&
|
1490 |
$.type(value) === 'string' &&
|
@@ -1492,17 +1487,17 @@
|
|
1492 |
);
|
1493 |
},
|
1494 |
|
1495 |
-
_initDataAttributes: function() {
|
1496 |
var that = this,
|
1497 |
options = this.options,
|
1498 |
data = this.element.data();
|
1499 |
// Initialize options set via HTML5 data-attributes:
|
1500 |
-
$.each(this.element[0].attributes, function(index, attr) {
|
1501 |
var key = attr.name.toLowerCase(),
|
1502 |
value;
|
1503 |
if (/^data-/.test(key)) {
|
1504 |
// Convert hyphen-ated key to camelCase:
|
1505 |
-
key = key.slice(5).replace(/-[a-z]/g, function(str) {
|
1506 |
return str.charAt(1).toUpperCase();
|
1507 |
});
|
1508 |
value = data[key];
|
@@ -1514,7 +1509,7 @@
|
|
1514 |
});
|
1515 |
},
|
1516 |
|
1517 |
-
_create: function() {
|
1518 |
this._initDataAttributes();
|
1519 |
this._initSpecialOptions();
|
1520 |
this._slots = [];
|
@@ -1526,7 +1521,7 @@
|
|
1526 |
|
1527 |
// This method is exposed to the widget API and allows to query
|
1528 |
// the number of active uploads:
|
1529 |
-
active: function() {
|
1530 |
return this._active;
|
1531 |
},
|
1532 |
|
@@ -1534,7 +1529,7 @@
|
|
1534 |
// the widget upload progress.
|
1535 |
// It returns an object with loaded, total and bitrate properties
|
1536 |
// for the running uploads:
|
1537 |
-
progress: function() {
|
1538 |
return this._progress;
|
1539 |
},
|
1540 |
|
@@ -1542,13 +1537,13 @@
|
|
1542 |
// using the fileupload API. The data parameter accepts an object which
|
1543 |
// must have a files property and can contain additional options:
|
1544 |
// .fileupload('add', {files: filesList});
|
1545 |
-
add: function(data) {
|
1546 |
var that = this;
|
1547 |
if (!data || this.options.disabled) {
|
1548 |
return;
|
1549 |
}
|
1550 |
if (data.fileInput && !data.files) {
|
1551 |
-
this._getFileInputFiles(data.fileInput).always(function(files) {
|
1552 |
data.files = files;
|
1553 |
that._onAdd(null, data);
|
1554 |
});
|
@@ -1563,7 +1558,7 @@
|
|
1563 |
// must have a files or fileInput property and can contain additional options:
|
1564 |
// .fileupload('send', {files: filesList});
|
1565 |
// The method returns a Promise object for the file upload call.
|
1566 |
-
send: function(data) {
|
1567 |
if (data && !this.options.disabled) {
|
1568 |
if (data.fileInput && !data.files) {
|
1569 |
var that = this,
|
@@ -1571,7 +1566,7 @@
|
|
1571 |
promise = dfd.promise(),
|
1572 |
jqXHR,
|
1573 |
aborted;
|
1574 |
-
promise.abort = function() {
|
1575 |
aborted = true;
|
1576 |
if (jqXHR) {
|
1577 |
return jqXHR.abort();
|
@@ -1579,7 +1574,7 @@
|
|
1579 |
dfd.reject(null, 'abort', 'abort');
|
1580 |
return promise;
|
1581 |
};
|
1582 |
-
this._getFileInputFiles(data.fileInput).always(function(files) {
|
1583 |
if (aborted) {
|
1584 |
return;
|
1585 |
}
|
@@ -1590,10 +1585,10 @@
|
|
1590 |
data.files = files;
|
1591 |
jqXHR = that._onSend(null, data);
|
1592 |
jqXHR.then(
|
1593 |
-
function(result, textStatus, jqXHR) {
|
1594 |
dfd.resolve(result, textStatus, jqXHR);
|
1595 |
},
|
1596 |
-
function(jqXHR, textStatus, errorThrown) {
|
1597 |
dfd.reject(jqXHR, textStatus, errorThrown);
|
1598 |
}
|
1599 |
);
|
12 |
/* global define, require */
|
13 |
/* eslint-disable new-cap */
|
14 |
|
15 |
+
(function (factory) {
|
16 |
'use strict';
|
17 |
if (typeof define === 'function' && define.amd) {
|
18 |
// Register as an anonymous AMD module:
|
24 |
// Browser globals:
|
25 |
factory(window.jQuery);
|
26 |
}
|
27 |
+
})(function ($) {
|
28 |
'use strict';
|
29 |
|
30 |
// Detect file input support, based on
|
64 |
*/
|
65 |
function getDragHandler(type) {
|
66 |
var isDragOver = type === 'dragover';
|
67 |
+
return function (e) {
|
68 |
e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
|
69 |
var dataTransfer = e.dataTransfer;
|
70 |
if (
|
185 |
|
186 |
// Translation function, gets the message key to be translated
|
187 |
// and an object with context specific data as arguments:
|
188 |
+
i18n: function (message, context) {
|
189 |
// eslint-disable-next-line no-param-reassign
|
190 |
message = this.messages[message] || message.toString();
|
191 |
if (context) {
|
192 |
+
$.each(context, function (key, value) {
|
193 |
// eslint-disable-next-line no-param-reassign
|
194 |
message = message.replace('{' + key + '}', value);
|
195 |
});
|
202 |
// value properties, a function returning such an array, a FormData
|
203 |
// object (for XHR file uploads), or a simple object.
|
204 |
// The form of the first fileInput is given as parameter to the function:
|
205 |
+
formData: function (form) {
|
206 |
return form.serializeArray();
|
207 |
},
|
208 |
|
217 |
// and allows you to override plugin options as well as define ajax settings.
|
218 |
//
|
219 |
// Listeners for this callback can also be bound the following way:
|
220 |
+
// .on('fileuploadadd', func);
|
221 |
//
|
222 |
// data.submit() returns a Promise object and allows to attach additional
|
223 |
// handlers using jQuery's Deferred callbacks:
|
224 |
// data.submit().done(func).fail(func).always(func);
|
225 |
+
add: function (e, data) {
|
226 |
if (e.isDefaultPrevented()) {
|
227 |
return false;
|
228 |
}
|
231 |
(data.autoUpload !== false &&
|
232 |
$(this).fileupload('option', 'autoUpload'))
|
233 |
) {
|
234 |
+
data.process().done(function () {
|
235 |
data.submit();
|
236 |
});
|
237 |
}
|
240 |
// Other callbacks:
|
241 |
|
242 |
// Callback for the submit event of each file upload:
|
243 |
+
// submit: function (e, data) {}, // .on('fileuploadsubmit', func);
|
244 |
|
245 |
// Callback for the start of each file upload request:
|
246 |
+
// send: function (e, data) {}, // .on('fileuploadsend', func);
|
247 |
|
248 |
// Callback for successful uploads:
|
249 |
+
// done: function (e, data) {}, // .on('fileuploaddone', func);
|
250 |
|
251 |
// Callback for failed (abort or error) uploads:
|
252 |
+
// fail: function (e, data) {}, // .on('fileuploadfail', func);
|
253 |
|
254 |
// Callback for completed (success, abort or error) requests:
|
255 |
+
// always: function (e, data) {}, // .on('fileuploadalways', func);
|
256 |
|
257 |
// Callback for upload progress events:
|
258 |
+
// progress: function (e, data) {}, // .on('fileuploadprogress', func);
|
259 |
|
260 |
// Callback for global upload progress events:
|
261 |
+
// progressall: function (e, data) {}, // .on('fileuploadprogressall', func);
|
262 |
|
263 |
// Callback for uploads start, equivalent to the global ajaxStart event:
|
264 |
+
// start: function (e) {}, // .on('fileuploadstart', func);
|
265 |
|
266 |
// Callback for uploads stop, equivalent to the global ajaxStop event:
|
267 |
+
// stop: function (e) {}, // .on('fileuploadstop', func);
|
268 |
|
269 |
// Callback for change events of the fileInput(s):
|
270 |
+
// change: function (e, data) {}, // .on('fileuploadchange', func);
|
271 |
|
272 |
// Callback for paste events to the pasteZone(s):
|
273 |
+
// paste: function (e, data) {}, // .on('fileuploadpaste', func);
|
274 |
|
275 |
// Callback for drop events of the dropZone(s):
|
276 |
+
// drop: function (e, data) {}, // .on('fileuploaddrop', func);
|
277 |
|
278 |
// Callback for dragover events of the dropZone(s):
|
279 |
+
// dragover: function (e) {}, // .on('fileuploaddragover', func);
|
280 |
|
281 |
// Callback before the start of each chunk upload request (before form data initialization):
|
282 |
+
// chunkbeforesend: function (e, data) {}, // .on('fileuploadchunkbeforesend', func);
|
283 |
|
284 |
// Callback for the start of each chunk upload request:
|
285 |
+
// chunksend: function (e, data) {}, // .on('fileuploadchunksend', func);
|
286 |
|
287 |
// Callback for successful chunk uploads:
|
288 |
+
// chunkdone: function (e, data) {}, // .on('fileuploadchunkdone', func);
|
289 |
|
290 |
// Callback for failed (abort or error) chunk uploads:
|
291 |
+
// chunkfail: function (e, data) {}, // .on('fileuploadchunkfail', func);
|
292 |
|
293 |
// Callback for completed (success, abort or error) chunk upload requests:
|
294 |
+
// chunkalways: function (e, data) {}, // .on('fileuploadchunkalways', func);
|
295 |
|
296 |
// The plugin options are used as settings object for the ajax calls.
|
297 |
// The following are jQuery ajax settings required for the file uploads:
|
301 |
timeout: 0
|
302 |
},
|
303 |
|
304 |
+
// jQuery versions before 1.8 require promise.pipe if the return value is
|
305 |
+
// used, as promise.then in older versions has a different behavior, see:
|
306 |
+
// https://blog.jquery.com/2012/08/09/jquery-1-8-released/
|
307 |
+
// https://bugs.jquery.com/ticket/11010
|
308 |
+
// https://github.com/blueimp/jQuery-File-Upload/pull/3435
|
309 |
+
_promisePipe: (function () {
|
310 |
+
var parts = $.fn.jquery.split('.');
|
311 |
+
return Number(parts[0]) > 1 || Number(parts[1]) > 7 ? 'then' : 'pipe';
|
312 |
+
})(),
|
313 |
+
|
314 |
// A list of options that require reinitializing event listeners and/or
|
315 |
// special initialization code:
|
316 |
_specialOptions: [
|
323 |
|
324 |
_blobSlice:
|
325 |
$.support.blobSlice &&
|
326 |
+
function () {
|
327 |
var slice = this.slice || this.webkitSlice || this.mozSlice;
|
328 |
return slice.apply(this, arguments);
|
329 |
},
|
330 |
|
331 |
+
_BitrateTimer: function () {
|
332 |
this.timestamp = Date.now ? Date.now() : new Date().getTime();
|
333 |
this.loaded = 0;
|
334 |
this.bitrate = 0;
|
335 |
+
this.getBitrate = function (now, loaded, interval) {
|
336 |
var timeDiff = now - this.timestamp;
|
337 |
if (!this.bitrate || !interval || timeDiff > interval) {
|
338 |
this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
|
343 |
};
|
344 |
},
|
345 |
|
346 |
+
_isXHRUpload: function (options) {
|
347 |
return (
|
348 |
!options.forceIframeTransport &&
|
349 |
((!options.multipart && $.support.xhrFileUpload) ||
|
351 |
);
|
352 |
},
|
353 |
|
354 |
+
_getFormData: function (options) {
|
355 |
var formData;
|
356 |
if ($.type(options.formData) === 'function') {
|
357 |
return options.formData(options.form);
|
361 |
}
|
362 |
if ($.type(options.formData) === 'object') {
|
363 |
formData = [];
|
364 |
+
$.each(options.formData, function (name, value) {
|
365 |
formData.push({ name: name, value: value });
|
366 |
});
|
367 |
return formData;
|
369 |
return [];
|
370 |
},
|
371 |
|
372 |
+
_getTotal: function (files) {
|
373 |
var total = 0;
|
374 |
+
$.each(files, function (index, file) {
|
375 |
total += file.size || 1;
|
376 |
});
|
377 |
return total;
|
378 |
},
|
379 |
|
380 |
+
_initProgressObject: function (obj) {
|
381 |
var progress = {
|
382 |
loaded: 0,
|
383 |
total: 0,
|
390 |
}
|
391 |
},
|
392 |
|
393 |
+
_initResponseObject: function (obj) {
|
394 |
var prop;
|
395 |
if (obj._response) {
|
396 |
for (prop in obj._response) {
|
403 |
}
|
404 |
},
|
405 |
|
406 |
+
_onProgress: function (e, data) {
|
407 |
if (e.lengthComputable) {
|
408 |
var now = Date.now ? Date.now() : new Date().getTime(),
|
409 |
loaded;
|
452 |
}
|
453 |
},
|
454 |
|
455 |
+
_initProgressListener: function (options) {
|
456 |
var that = this,
|
457 |
xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
|
458 |
// Accesss to the native XHR object is required to add event listeners
|
459 |
// for the upload progress event:
|
460 |
if (xhr.upload) {
|
461 |
+
$(xhr.upload).on('progress', function (e) {
|
462 |
var oe = e.originalEvent;
|
463 |
// Make sure the progress event properties get copied over:
|
464 |
e.lengthComputable = oe.lengthComputable;
|
466 |
e.total = oe.total;
|
467 |
that._onProgress(e, options);
|
468 |
});
|
469 |
+
options.xhr = function () {
|
470 |
return xhr;
|
471 |
};
|
472 |
}
|
473 |
},
|
474 |
|
475 |
+
_deinitProgressListener: function (options) {
|
476 |
var xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
|
477 |
if (xhr.upload) {
|
478 |
+
$(xhr.upload).off('progress');
|
479 |
}
|
480 |
},
|
481 |
|
482 |
+
_isInstanceOf: function (type, obj) {
|
483 |
// Cross-frame instanceof check
|
484 |
return Object.prototype.toString.call(obj) === '[object ' + type + ']';
|
485 |
},
|
486 |
|
487 |
+
_getUniqueFilename: function (name, map) {
|
488 |
// eslint-disable-next-line no-param-reassign
|
489 |
name = String(name);
|
490 |
if (map[name]) {
|
491 |
// eslint-disable-next-line no-param-reassign
|
492 |
+
name = name.replace(/(?: \(([\d]+)\))?(\.[^.]+)?$/, function (
|
493 |
_,
|
494 |
p1,
|
495 |
p2
|
504 |
return name;
|
505 |
},
|
506 |
|
507 |
+
_initXHRData: function (options) {
|
508 |
var that = this,
|
509 |
formData,
|
510 |
file = options.files[0],
|
540 |
value: options.blob
|
541 |
});
|
542 |
} else {
|
543 |
+
$.each(options.files, function (index, file) {
|
544 |
formData.push({
|
545 |
name:
|
546 |
($.type(options.paramName) === 'array' &&
|
555 |
formData = options.formData;
|
556 |
} else {
|
557 |
formData = new FormData();
|
558 |
+
$.each(this._getFormData(options), function (index, field) {
|
559 |
formData.append(field.name, field.value);
|
560 |
});
|
561 |
}
|
566 |
file.uploadName || file.name
|
567 |
);
|
568 |
} else {
|
569 |
+
$.each(options.files, function (index, file) {
|
570 |
// This check allows the tests to run with
|
571 |
// dummy objects:
|
572 |
if (
|
597 |
options.blob = null;
|
598 |
},
|
599 |
|
600 |
+
_initIframeSettings: function (options) {
|
601 |
+
var targetHost = $('<a></a>').prop('href', options.url).prop('host');
|
|
|
|
|
602 |
// Setting the dataType to iframe enables the iframe transport:
|
603 |
options.dataType = 'iframe ' + (options.dataType || '');
|
604 |
// The iframe transport accepts a serialized array as form data:
|
612 |
}
|
613 |
},
|
614 |
|
615 |
+
_initDataSettings: function (options) {
|
616 |
if (this._isXHRUpload(options)) {
|
617 |
if (!this._chunkedUpload(options, true)) {
|
618 |
if (!options.data) {
|
630 |
}
|
631 |
},
|
632 |
|
633 |
+
_getParamName: function (options) {
|
634 |
var fileInput = $(options.fileInput),
|
635 |
paramName = options.paramName;
|
636 |
if (!paramName) {
|
637 |
paramName = [];
|
638 |
+
fileInput.each(function () {
|
639 |
var input = $(this),
|
640 |
name = input.prop('name') || 'files[]',
|
641 |
i = (input.prop('files') || [1]).length;
|
653 |
return paramName;
|
654 |
},
|
655 |
|
656 |
+
_initFormSettings: function (options) {
|
657 |
// Retrieve missing options from the input field and the
|
658 |
// associated form, if available:
|
659 |
if (!options.form || !options.form.length) {
|
687 |
}
|
688 |
},
|
689 |
|
690 |
+
_getAJAXSettings: function (data) {
|
691 |
var options = $.extend({}, this.options, data);
|
692 |
this._initFormSettings(options);
|
693 |
this._initDataSettings(options);
|
696 |
|
697 |
// jQuery 1.6 doesn't provide .state(),
|
698 |
// while jQuery 1.8+ removed .isRejected() and .isResolved():
|
699 |
+
_getDeferredState: function (deferred) {
|
700 |
if (deferred.state) {
|
701 |
return deferred.state();
|
702 |
}
|
711 |
|
712 |
// Maps jqXHR callbacks to the equivalent
|
713 |
// methods of the given Promise object:
|
714 |
+
_enhancePromise: function (promise) {
|
715 |
promise.success = promise.done;
|
716 |
promise.error = promise.fail;
|
717 |
promise.complete = promise.always;
|
720 |
|
721 |
// Creates and returns a Promise object enhanced with
|
722 |
// the jqXHR methods abort, success, error and complete:
|
723 |
+
_getXHRPromise: function (resolveOrReject, context, args) {
|
724 |
var dfd = $.Deferred(),
|
725 |
promise = dfd.promise();
|
726 |
// eslint-disable-next-line no-param-reassign
|
735 |
},
|
736 |
|
737 |
// Adds convenience methods to the data callback argument:
|
738 |
+
_addConvenienceMethods: function (e, data) {
|
739 |
var that = this,
|
740 |
+
getPromise = function (args) {
|
741 |
+
return $.Deferred().resolveWith(that, args).promise();
|
|
|
|
|
742 |
};
|
743 |
+
data.process = function (resolveFunc, rejectFunc) {
|
744 |
if (resolveFunc || rejectFunc) {
|
745 |
+
data._processQueue = this._processQueue = (this._processQueue ||
|
746 |
+
getPromise([this]))
|
747 |
+
[that._promisePipe](function () {
|
|
|
748 |
if (data.errorThrown) {
|
749 |
+
return $.Deferred().rejectWith(that, [data]).promise();
|
|
|
|
|
750 |
}
|
751 |
return getPromise(arguments);
|
752 |
})
|
753 |
+
[that._promisePipe](resolveFunc, rejectFunc);
|
754 |
}
|
755 |
return this._processQueue || getPromise([this]);
|
756 |
};
|
757 |
+
data.submit = function () {
|
758 |
if (this.state() !== 'pending') {
|
759 |
data.jqXHR = this.jqXHR =
|
760 |
that._trigger(
|
765 |
}
|
766 |
return this.jqXHR || that._getXHRPromise();
|
767 |
};
|
768 |
+
data.abort = function () {
|
769 |
if (this.jqXHR) {
|
770 |
return this.jqXHR.abort();
|
771 |
}
|
773 |
that._trigger('fail', null, this);
|
774 |
return that._getXHRPromise(false);
|
775 |
};
|
776 |
+
data.state = function () {
|
777 |
if (this.jqXHR) {
|
778 |
return that._getDeferredState(this.jqXHR);
|
779 |
}
|
781 |
return that._getDeferredState(this._processQueue);
|
782 |
}
|
783 |
};
|
784 |
+
data.processing = function () {
|
785 |
return (
|
786 |
!this.jqXHR &&
|
787 |
this._processQueue &&
|
788 |
that._getDeferredState(this._processQueue) === 'pending'
|
789 |
);
|
790 |
};
|
791 |
+
data.progress = function () {
|
792 |
return this._progress;
|
793 |
};
|
794 |
+
data.response = function () {
|
795 |
return this._response;
|
796 |
};
|
797 |
},
|
798 |
|
799 |
// Parses the Range header from the server response
|
800 |
// and returns the uploaded bytes:
|
801 |
+
_getUploadedBytes: function (jqXHR) {
|
802 |
var range = jqXHR.getResponseHeader('Range'),
|
803 |
parts = range && range.split('-'),
|
804 |
upperBytesPos = parts && parts.length > 1 && parseInt(parts[1], 10);
|
810 |
// If the second parameter is true, only tests if the file
|
811 |
// should be uploaded in chunks, but does not invoke any
|
812 |
// upload requests:
|
813 |
+
_chunkedUpload: function (options, testOnly) {
|
814 |
options.uploadedBytes = options.uploadedBytes || 0;
|
815 |
var that = this,
|
816 |
file = options.files[0],
|
844 |
]);
|
845 |
}
|
846 |
// The chunk upload method:
|
847 |
+
upload = function () {
|
848 |
// Clone the options object for each chunk upload:
|
849 |
var o = $.extend({}, options),
|
850 |
currentLoaded = o._progress.loaded;
|
870 |
(that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
|
871 |
that._getXHRPromise(false, o.context)
|
872 |
)
|
873 |
+
.done(function (result, textStatus, jqXHR) {
|
874 |
ub = that._getUploadedBytes(jqXHR) || ub + o.chunkSize;
|
875 |
// Create a progress event if no final progress event
|
876 |
// with loaded equaling total has been triggered
|
899 |
dfd.resolveWith(o.context, [result, textStatus, jqXHR]);
|
900 |
}
|
901 |
})
|
902 |
+
.fail(function (jqXHR, textStatus, errorThrown) {
|
903 |
o.jqXHR = jqXHR;
|
904 |
o.textStatus = textStatus;
|
905 |
o.errorThrown = errorThrown;
|
907 |
that._trigger('chunkalways', null, o);
|
908 |
dfd.rejectWith(o.context, [jqXHR, textStatus, errorThrown]);
|
909 |
})
|
910 |
+
.always(function () {
|
911 |
that._deinitProgressListener(o);
|
912 |
});
|
913 |
};
|
914 |
this._enhancePromise(promise);
|
915 |
+
promise.abort = function () {
|
916 |
return jqXHR.abort();
|
917 |
};
|
918 |
upload();
|
919 |
return promise;
|
920 |
},
|
921 |
|
922 |
+
_beforeSend: function (e, data) {
|
923 |
if (this._active === 0) {
|
924 |
// the start callback is triggered when an upload starts
|
925 |
// and no other uploads are currently running,
|
945 |
this._progress.total += data.total;
|
946 |
},
|
947 |
|
948 |
+
_onDone: function (result, textStatus, jqXHR, options) {
|
949 |
var total = options._progress.total,
|
950 |
response = options._response;
|
951 |
if (options._progress.loaded < total) {
|
966 |
this._trigger('done', null, options);
|
967 |
},
|
968 |
|
969 |
+
_onFail: function (jqXHR, textStatus, errorThrown, options) {
|
970 |
var response = options._response;
|
971 |
if (options.recalculateProgress) {
|
972 |
// Remove the failed (error or abort) file upload from
|
980 |
this._trigger('fail', null, options);
|
981 |
},
|
982 |
|
983 |
+
_onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
|
984 |
// jqXHRorResult, textStatus and jqXHRorError are added to the
|
985 |
// options object via done and fail callbacks
|
986 |
this._trigger('always', null, options);
|
987 |
},
|
988 |
|
989 |
+
_onSend: function (e, data) {
|
990 |
if (!data.submit) {
|
991 |
this._addConvenienceMethods(e, data);
|
992 |
}
|
996 |
slot,
|
997 |
pipe,
|
998 |
options = that._getAJAXSettings(data),
|
999 |
+
send = function () {
|
1000 |
that._sending += 1;
|
1001 |
// Set timer for bitrate progress calculation:
|
1002 |
options._bitrateTimer = new that._BitrateTimer();
|
1013 |
that._chunkedUpload(options) ||
|
1014 |
$.ajax(options)
|
1015 |
)
|
1016 |
+
.done(function (result, textStatus, jqXHR) {
|
1017 |
that._onDone(result, textStatus, jqXHR, options);
|
1018 |
})
|
1019 |
+
.fail(function (jqXHR, textStatus, errorThrown) {
|
1020 |
that._onFail(jqXHR, textStatus, errorThrown, options);
|
1021 |
})
|
1022 |
+
.always(function (jqXHRorResult, textStatus, jqXHRorError) {
|
1023 |
that._deinitProgressListener(options);
|
1024 |
that._onAlways(
|
1025 |
jqXHRorResult,
|
1061 |
if (this.options.limitConcurrentUploads > 1) {
|
1062 |
slot = $.Deferred();
|
1063 |
this._slots.push(slot);
|
1064 |
+
pipe = slot[that._promisePipe](send);
|
1065 |
} else {
|
1066 |
+
this._sequence = this._sequence[that._promisePipe](send, send);
|
1067 |
pipe = this._sequence;
|
1068 |
}
|
1069 |
// Return the piped Promise object, enhanced with an abort method,
|
1070 |
// which is delegated to the jqXHR object of the current upload,
|
1071 |
// and jqXHR callbacks mapped to the equivalent Promise methods:
|
1072 |
+
pipe.abort = function () {
|
1073 |
aborted = [undefined, 'abort', 'abort'];
|
1074 |
if (!jqXHR) {
|
1075 |
if (slot) {
|
1084 |
return send();
|
1085 |
},
|
1086 |
|
1087 |
+
_onAdd: function (e, data) {
|
1088 |
var that = this,
|
1089 |
result = true,
|
1090 |
options = $.extend({}, this.options, data),
|
1147 |
paramNameSet = paramName;
|
1148 |
}
|
1149 |
data.originalFiles = files;
|
1150 |
+
$.each(fileSet || files, function (index, element) {
|
1151 |
var newData = $.extend({}, data);
|
1152 |
newData.files = fileSet ? element : [element];
|
1153 |
newData.paramName = paramNameSet[index];
|
1164 |
return result;
|
1165 |
},
|
1166 |
|
1167 |
+
_replaceFileInput: function (data) {
|
1168 |
var input = data.fileInput,
|
1169 |
inputClone = input.clone(true),
|
1170 |
restoreFocus = input.is(document.activeElement);
|
1171 |
// Add a reference for the new cloned file input to the data argument:
|
1172 |
data.fileInputClone = inputClone;
|
1173 |
+
$('<form></form>').append(inputClone)[0].reset();
|
|
|
|
|
1174 |
// Detaching allows to insert the fileInput on another form
|
1175 |
// without loosing the file input value:
|
1176 |
input.after(inputClone).detach();
|
1177 |
// If the fileInput had focus before it was detached,
|
1178 |
// restore focus to the inputClone.
|
1179 |
if (restoreFocus) {
|
1180 |
+
inputClone.trigger('focus');
|
1181 |
}
|
1182 |
// Avoid memory leaks with the detached file input:
|
1183 |
+
$.cleanData(input.off('remove'));
|
1184 |
// Replace the original file input element in the fileInput
|
1185 |
// elements set with the clone, which has been copied including
|
1186 |
// event handlers:
|
1187 |
+
this.options.fileInput = this.options.fileInput.map(function (i, el) {
|
1188 |
if (el === input[0]) {
|
1189 |
return inputClone[0];
|
1190 |
}
|
1197 |
}
|
1198 |
},
|
1199 |
|
1200 |
+
_handleFileTreeEntry: function (entry, path) {
|
1201 |
var that = this,
|
1202 |
dfd = $.Deferred(),
|
1203 |
entries = [],
|
1204 |
dirReader,
|
1205 |
+
errorHandler = function (e) {
|
1206 |
if (e && !e.entry) {
|
1207 |
e.entry = entry;
|
1208 |
}
|
1212 |
// to be returned together in one set:
|
1213 |
dfd.resolve([e]);
|
1214 |
},
|
1215 |
+
successHandler = function (entries) {
|
1216 |
that
|
1217 |
._handleFileTreeEntries(entries, path + entry.name + '/')
|
1218 |
+
.done(function (files) {
|
1219 |
dfd.resolve(files);
|
1220 |
})
|
1221 |
.fail(errorHandler);
|
1222 |
},
|
1223 |
+
readEntries = function () {
|
1224 |
+
dirReader.readEntries(function (results) {
|
1225 |
if (!results.length) {
|
1226 |
successHandler(entries);
|
1227 |
} else {
|
1238 |
entry._file.relativePath = path;
|
1239 |
dfd.resolve(entry._file);
|
1240 |
} else {
|
1241 |
+
entry.file(function (file) {
|
1242 |
file.relativePath = path;
|
1243 |
dfd.resolve(file);
|
1244 |
}, errorHandler);
|
1254 |
return dfd.promise();
|
1255 |
},
|
1256 |
|
1257 |
+
_handleFileTreeEntries: function (entries, path) {
|
1258 |
var that = this;
|
1259 |
return $.when
|
1260 |
.apply(
|
1261 |
$,
|
1262 |
+
$.map(entries, function (entry) {
|
1263 |
return that._handleFileTreeEntry(entry, path);
|
1264 |
})
|
1265 |
)
|
1266 |
+
[this._promisePipe](function () {
|
1267 |
return Array.prototype.concat.apply([], arguments);
|
1268 |
});
|
1269 |
},
|
1270 |
|
1271 |
+
_getDroppedFiles: function (dataTransfer) {
|
1272 |
// eslint-disable-next-line no-param-reassign
|
1273 |
dataTransfer = dataTransfer || {};
|
1274 |
var items = dataTransfer.items;
|
1278 |
(items[0].webkitGetAsEntry || items[0].getAsEntry)
|
1279 |
) {
|
1280 |
return this._handleFileTreeEntries(
|
1281 |
+
$.map(items, function (item) {
|
1282 |
var entry;
|
1283 |
if (item.webkitGetAsEntry) {
|
1284 |
entry = item.webkitGetAsEntry();
|
1292 |
})
|
1293 |
);
|
1294 |
}
|
1295 |
+
return $.Deferred().resolve($.makeArray(dataTransfer.files)).promise();
|
|
|
|
|
1296 |
},
|
1297 |
|
1298 |
+
_getSingleFileInputFiles: function (fileInput) {
|
1299 |
// eslint-disable-next-line no-param-reassign
|
1300 |
fileInput = $(fileInput);
|
1301 |
var entries =
|
1309 |
if (!files.length) {
|
1310 |
value = fileInput.prop('value');
|
1311 |
if (!value) {
|
1312 |
+
return $.Deferred().resolve([]).promise();
|
|
|
|
|
1313 |
}
|
1314 |
// If the files property is not available, the browser does not
|
1315 |
// support the File API and we add a pseudo File object with
|
1317 |
files = [{ name: value.replace(/^.*\\/, '') }];
|
1318 |
} else if (files[0].name === undefined && files[0].fileName) {
|
1319 |
// File normalization for Safari 4 and Firefox 3:
|
1320 |
+
$.each(files, function (index, file) {
|
1321 |
file.name = file.fileName;
|
1322 |
file.size = file.fileSize;
|
1323 |
});
|
1324 |
}
|
1325 |
+
return $.Deferred().resolve(files).promise();
|
|
|
|
|
1326 |
},
|
1327 |
|
1328 |
+
_getFileInputFiles: function (fileInput) {
|
1329 |
if (!(fileInput instanceof $) || fileInput.length === 1) {
|
1330 |
return this._getSingleFileInputFiles(fileInput);
|
1331 |
}
|
1332 |
return $.when
|
1333 |
.apply($, $.map(fileInput, this._getSingleFileInputFiles))
|
1334 |
+
[this._promisePipe](function () {
|
1335 |
return Array.prototype.concat.apply([], arguments);
|
1336 |
});
|
1337 |
},
|
1338 |
|
1339 |
+
_onChange: function (e) {
|
1340 |
var that = this,
|
1341 |
data = {
|
1342 |
fileInput: $(e.target),
|
1343 |
form: $(e.target.form)
|
1344 |
};
|
1345 |
+
this._getFileInputFiles(data.fileInput).always(function (files) {
|
1346 |
data.files = files;
|
1347 |
if (that.options.replaceFileInput) {
|
1348 |
that._replaceFileInput(data);
|
1359 |
});
|
1360 |
},
|
1361 |
|
1362 |
+
_onPaste: function (e) {
|
1363 |
var items =
|
1364 |
e.originalEvent &&
|
1365 |
e.originalEvent.clipboardData &&
|
1366 |
e.originalEvent.clipboardData.items,
|
1367 |
data = { files: [] };
|
1368 |
if (items && items.length) {
|
1369 |
+
$.each(items, function (index, item) {
|
1370 |
var file = item.getAsFile && item.getAsFile();
|
1371 |
if (file) {
|
1372 |
data.files.push(file);
|
1384 |
}
|
1385 |
},
|
1386 |
|
1387 |
+
_onDrop: function (e) {
|
1388 |
e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
|
1389 |
var that = this,
|
1390 |
dataTransfer = e.dataTransfer,
|
1391 |
data = {};
|
1392 |
if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
|
1393 |
e.preventDefault();
|
1394 |
+
this._getDroppedFiles(dataTransfer).always(function (files) {
|
1395 |
data.files = files;
|
1396 |
if (
|
1397 |
that._trigger(
|
1412 |
|
1413 |
_onDragLeave: getDragHandler('dragleave'),
|
1414 |
|
1415 |
+
_initEventHandlers: function () {
|
1416 |
if (this._isXHRUpload(this.options)) {
|
1417 |
this._on(this.options.dropZone, {
|
1418 |
dragover: this._onDragOver,
|
1433 |
}
|
1434 |
},
|
1435 |
|
1436 |
+
_destroyEventHandlers: function () {
|
1437 |
this._off(this.options.dropZone, 'dragenter dragleave dragover drop');
|
1438 |
this._off(this.options.pasteZone, 'paste');
|
1439 |
this._off(this.options.fileInput, 'change');
|
1440 |
},
|
1441 |
|
1442 |
+
_destroy: function () {
|
1443 |
this._destroyEventHandlers();
|
1444 |
},
|
1445 |
|
1446 |
+
_setOption: function (key, value) {
|
1447 |
var reinit = $.inArray(key, this._specialOptions) !== -1;
|
1448 |
if (reinit) {
|
1449 |
this._destroyEventHandlers();
|
1455 |
}
|
1456 |
},
|
1457 |
|
1458 |
+
_initSpecialOptions: function () {
|
1459 |
var options = this.options;
|
1460 |
if (options.fileInput === undefined) {
|
1461 |
options.fileInput = this.element.is('input[type="file"]')
|
1472 |
}
|
1473 |
},
|
1474 |
|
1475 |
+
_getRegExp: function (str) {
|
1476 |
var parts = str.split('/'),
|
1477 |
modifiers = parts.pop();
|
1478 |
parts.shift();
|
1479 |
return new RegExp(parts.join('/'), modifiers);
|
1480 |
},
|
1481 |
|
1482 |
+
_isRegExpOption: function (key, value) {
|
1483 |
return (
|
1484 |
key !== 'url' &&
|
1485 |
$.type(value) === 'string' &&
|
1487 |
);
|
1488 |
},
|
1489 |
|
1490 |
+
_initDataAttributes: function () {
|
1491 |
var that = this,
|
1492 |
options = this.options,
|
1493 |
data = this.element.data();
|
1494 |
// Initialize options set via HTML5 data-attributes:
|
1495 |
+
$.each(this.element[0].attributes, function (index, attr) {
|
1496 |
var key = attr.name.toLowerCase(),
|
1497 |
value;
|
1498 |
if (/^data-/.test(key)) {
|
1499 |
// Convert hyphen-ated key to camelCase:
|
1500 |
+
key = key.slice(5).replace(/-[a-z]/g, function (str) {
|
1501 |
return str.charAt(1).toUpperCase();
|
1502 |
});
|
1503 |
value = data[key];
|
1509 |
});
|
1510 |
},
|
1511 |
|
1512 |
+
_create: function () {
|
1513 |
this._initDataAttributes();
|
1514 |
this._initSpecialOptions();
|
1515 |
this._slots = [];
|
1521 |
|
1522 |
// This method is exposed to the widget API and allows to query
|
1523 |
// the number of active uploads:
|
1524 |
+
active: function () {
|
1525 |
return this._active;
|
1526 |
},
|
1527 |
|
1529 |
// the widget upload progress.
|
1530 |
// It returns an object with loaded, total and bitrate properties
|
1531 |
// for the running uploads:
|
1532 |
+
progress: function () {
|
1533 |
return this._progress;
|
1534 |
},
|
1535 |
|
1537 |
// using the fileupload API. The data parameter accepts an object which
|
1538 |
// must have a files property and can contain additional options:
|
1539 |
// .fileupload('add', {files: filesList});
|
1540 |
+
add: function (data) {
|
1541 |
var that = this;
|
1542 |
if (!data || this.options.disabled) {
|
1543 |
return;
|
1544 |
}
|
1545 |
if (data.fileInput && !data.files) {
|
1546 |
+
this._getFileInputFiles(data.fileInput).always(function (files) {
|
1547 |
data.files = files;
|
1548 |
that._onAdd(null, data);
|
1549 |
});
|
1558 |
// must have a files or fileInput property and can contain additional options:
|
1559 |
// .fileupload('send', {files: filesList});
|
1560 |
// The method returns a Promise object for the file upload call.
|
1561 |
+
send: function (data) {
|
1562 |
if (data && !this.options.disabled) {
|
1563 |
if (data.fileInput && !data.files) {
|
1564 |
var that = this,
|
1566 |
promise = dfd.promise(),
|
1567 |
jqXHR,
|
1568 |
aborted;
|
1569 |
+
promise.abort = function () {
|
1570 |
aborted = true;
|
1571 |
if (jqXHR) {
|
1572 |
return jqXHR.abort();
|
1574 |
dfd.reject(null, 'abort', 'abort');
|
1575 |
return promise;
|
1576 |
};
|
1577 |
+
this._getFileInputFiles(data.fileInput).always(function (files) {
|
1578 |
if (aborted) {
|
1579 |
return;
|
1580 |
}
|
1585 |
data.files = files;
|
1586 |
jqXHR = that._onSend(null, data);
|
1587 |
jqXHR.then(
|
1588 |
+
function (result, textStatus, jqXHR) {
|
1589 |
dfd.resolve(result, textStatus, jqXHR);
|
1590 |
},
|
1591 |
+
function (jqXHR, textStatus, errorThrown) {
|
1592 |
dfd.reject(jqXHR, textStatus, errorThrown);
|
1593 |
}
|
1594 |
);
|
filemanager/js/jq_uploader/jquery.iframe-transport.js
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
/* global define, require */
|
13 |
|
14 |
-
(function(factory) {
|
15 |
'use strict';
|
16 |
if (typeof define === 'function' && define.amd) {
|
17 |
// Register as an anonymous AMD module:
|
@@ -23,7 +23,7 @@
|
|
23 |
// Browser globals:
|
24 |
factory(window.jQuery);
|
25 |
}
|
26 |
-
})(function($) {
|
27 |
'use strict';
|
28 |
|
29 |
// Helper variable to create unique names for the transport iframes:
|
@@ -46,7 +46,7 @@
|
|
46 |
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
47 |
// options.initialIframeSrc: the URL of the initial iframe src,
|
48 |
// by default set to "javascript:false;"
|
49 |
-
$.ajaxTransport('iframe', function(options) {
|
50 |
if (options.async) {
|
51 |
// javascript:false as initial iframe src
|
52 |
// prevents warning popups on HTTPS in IE6:
|
@@ -56,7 +56,7 @@
|
|
56 |
iframe,
|
57 |
addParamChar;
|
58 |
return {
|
59 |
-
send: function(_, completeCallback) {
|
60 |
form = $('<form style="display:none;"></form>');
|
61 |
form.attr('accept-charset', options.formAcceptCharset);
|
62 |
addParamChar = /\?/.test(options.url) ? '&' : '?';
|
@@ -81,12 +81,12 @@
|
|
81 |
'" name="iframe-transport-' +
|
82 |
counter +
|
83 |
'"></iframe>'
|
84 |
-
).
|
85 |
var fileInputClones,
|
86 |
paramNames = $.isArray(options.paramName)
|
87 |
? options.paramName
|
88 |
: [options.paramName];
|
89 |
-
iframe.
|
90 |
var response;
|
91 |
// Wrap in a try/catch block to catch exceptions thrown
|
92 |
// when trying to access cross-domain iframe contents:
|
@@ -109,7 +109,7 @@
|
|
109 |
$('<iframe src="' + initialIframeSrc + '"></iframe>').appendTo(
|
110 |
form
|
111 |
);
|
112 |
-
window.setTimeout(function() {
|
113 |
// Removing the form in a setTimeout call
|
114 |
// allows Chrome's developer tools to display
|
115 |
// the response result
|
@@ -121,7 +121,7 @@
|
|
121 |
.prop('action', options.url)
|
122 |
.prop('method', options.type);
|
123 |
if (options.formData) {
|
124 |
-
$.each(options.formData, function(index, field) {
|
125 |
$('<input type="hidden"/>')
|
126 |
.prop('name', field.name)
|
127 |
.val(field.value)
|
@@ -135,11 +135,11 @@
|
|
135 |
) {
|
136 |
fileInputClones = options.fileInput.clone();
|
137 |
// Insert a clone for each file input field:
|
138 |
-
options.fileInput.after(function(index) {
|
139 |
return fileInputClones[index];
|
140 |
});
|
141 |
if (options.paramName) {
|
142 |
-
options.fileInput.each(function(index) {
|
143 |
$(this).prop('name', paramNames[index] || options.paramName);
|
144 |
});
|
145 |
}
|
@@ -153,27 +153,33 @@
|
|
153 |
// Remove the HTML5 form attribute from the input(s):
|
154 |
options.fileInput.removeAttr('form');
|
155 |
}
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
});
|
170 |
form.append(iframe).appendTo(document.body);
|
171 |
},
|
172 |
-
abort: function() {
|
173 |
if (iframe) {
|
174 |
// javascript:false as iframe src aborts the request
|
175 |
// and prevents warning popups on HTTPS in IE6.
|
176 |
-
iframe.
|
177 |
}
|
178 |
if (form) {
|
179 |
form.remove();
|
@@ -195,16 +201,16 @@
|
|
195 |
// https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
|
196 |
$.ajaxSetup({
|
197 |
converters: {
|
198 |
-
'iframe text': function(iframe) {
|
199 |
return iframe && $(iframe[0].body).text();
|
200 |
},
|
201 |
-
'iframe json': function(iframe) {
|
202 |
return iframe && jsonAPI[jsonParse]($(iframe[0].body).text());
|
203 |
},
|
204 |
-
'iframe html': function(iframe) {
|
205 |
return iframe && $(iframe[0].body).html();
|
206 |
},
|
207 |
-
'iframe xml': function(iframe) {
|
208 |
var xmlDoc = iframe && iframe[0];
|
209 |
return xmlDoc && $.isXMLDoc(xmlDoc)
|
210 |
? xmlDoc
|
@@ -213,7 +219,7 @@
|
|
213 |
$(xmlDoc.body).html()
|
214 |
);
|
215 |
},
|
216 |
-
'iframe script': function(iframe) {
|
217 |
return iframe && $.globalEval($(iframe[0].body).text());
|
218 |
}
|
219 |
}
|
11 |
|
12 |
/* global define, require */
|
13 |
|
14 |
+
(function (factory) {
|
15 |
'use strict';
|
16 |
if (typeof define === 'function' && define.amd) {
|
17 |
// Register as an anonymous AMD module:
|
23 |
// Browser globals:
|
24 |
factory(window.jQuery);
|
25 |
}
|
26 |
+
})(function ($) {
|
27 |
'use strict';
|
28 |
|
29 |
// Helper variable to create unique names for the transport iframes:
|
46 |
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
47 |
// options.initialIframeSrc: the URL of the initial iframe src,
|
48 |
// by default set to "javascript:false;"
|
49 |
+
$.ajaxTransport('iframe', function (options) {
|
50 |
if (options.async) {
|
51 |
// javascript:false as initial iframe src
|
52 |
// prevents warning popups on HTTPS in IE6:
|
56 |
iframe,
|
57 |
addParamChar;
|
58 |
return {
|
59 |
+
send: function (_, completeCallback) {
|
60 |
form = $('<form style="display:none;"></form>');
|
61 |
form.attr('accept-charset', options.formAcceptCharset);
|
62 |
addParamChar = /\?/.test(options.url) ? '&' : '?';
|
81 |
'" name="iframe-transport-' +
|
82 |
counter +
|
83 |
'"></iframe>'
|
84 |
+
).on('load', function () {
|
85 |
var fileInputClones,
|
86 |
paramNames = $.isArray(options.paramName)
|
87 |
? options.paramName
|
88 |
: [options.paramName];
|
89 |
+
iframe.off('load').on('load', function () {
|
90 |
var response;
|
91 |
// Wrap in a try/catch block to catch exceptions thrown
|
92 |
// when trying to access cross-domain iframe contents:
|
109 |
$('<iframe src="' + initialIframeSrc + '"></iframe>').appendTo(
|
110 |
form
|
111 |
);
|
112 |
+
window.setTimeout(function () {
|
113 |
// Removing the form in a setTimeout call
|
114 |
// allows Chrome's developer tools to display
|
115 |
// the response result
|
121 |
.prop('action', options.url)
|
122 |
.prop('method', options.type);
|
123 |
if (options.formData) {
|
124 |
+
$.each(options.formData, function (index, field) {
|
125 |
$('<input type="hidden"/>')
|
126 |
.prop('name', field.name)
|
127 |
.val(field.value)
|
135 |
) {
|
136 |
fileInputClones = options.fileInput.clone();
|
137 |
// Insert a clone for each file input field:
|
138 |
+
options.fileInput.after(function (index) {
|
139 |
return fileInputClones[index];
|
140 |
});
|
141 |
if (options.paramName) {
|
142 |
+
options.fileInput.each(function (index) {
|
143 |
$(this).prop('name', paramNames[index] || options.paramName);
|
144 |
});
|
145 |
}
|
153 |
// Remove the HTML5 form attribute from the input(s):
|
154 |
options.fileInput.removeAttr('form');
|
155 |
}
|
156 |
+
window.setTimeout(function () {
|
157 |
+
// Submitting the form in a setTimeout call fixes an issue with
|
158 |
+
// Safari 13 not triggering the iframe load event after resetting
|
159 |
+
// the load event handler, see also:
|
160 |
+
// https://github.com/blueimp/jQuery-File-Upload/issues/3633
|
161 |
+
form.submit();
|
162 |
+
// Insert the file input fields at their original location
|
163 |
+
// by replacing the clones with the originals:
|
164 |
+
if (fileInputClones && fileInputClones.length) {
|
165 |
+
options.fileInput.each(function (index, input) {
|
166 |
+
var clone = $(fileInputClones[index]);
|
167 |
+
// Restore the original name and form properties:
|
168 |
+
$(input)
|
169 |
+
.prop('name', clone.prop('name'))
|
170 |
+
.attr('form', clone.attr('form'));
|
171 |
+
clone.replaceWith(input);
|
172 |
+
});
|
173 |
+
}
|
174 |
+
}, 0);
|
175 |
});
|
176 |
form.append(iframe).appendTo(document.body);
|
177 |
},
|
178 |
+
abort: function () {
|
179 |
if (iframe) {
|
180 |
// javascript:false as iframe src aborts the request
|
181 |
// and prevents warning popups on HTTPS in IE6.
|
182 |
+
iframe.off('load').prop('src', initialIframeSrc);
|
183 |
}
|
184 |
if (form) {
|
185 |
form.remove();
|
201 |
// https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
|
202 |
$.ajaxSetup({
|
203 |
converters: {
|
204 |
+
'iframe text': function (iframe) {
|
205 |
return iframe && $(iframe[0].body).text();
|
206 |
},
|
207 |
+
'iframe json': function (iframe) {
|
208 |
return iframe && jsonAPI[jsonParse]($(iframe[0].body).text());
|
209 |
},
|
210 |
+
'iframe html': function (iframe) {
|
211 |
return iframe && $(iframe[0].body).html();
|
212 |
},
|
213 |
+
'iframe xml': function (iframe) {
|
214 |
var xmlDoc = iframe && iframe[0];
|
215 |
return xmlDoc && $.isXMLDoc(xmlDoc)
|
216 |
? xmlDoc
|
219 |
$(xmlDoc.body).html()
|
220 |
);
|
221 |
},
|
222 |
+
'iframe script': function (iframe) {
|
223 |
return iframe && $.globalEval($(iframe[0].body).text());
|
224 |
}
|
225 |
}
|
filemanager/model.php
CHANGED
@@ -209,101 +209,118 @@ class FilemanagerModel {
|
|
209 |
*
|
210 |
* @param array $params
|
211 |
*/
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
}
|
279 |
-
$data = array_merge($dirs
|
280 |
$insert = 0;
|
281 |
$tbl = $wpdb->prefix . 'bwg_file_paths';
|
282 |
if ( !empty($params['refresh']) ) {
|
283 |
-
$wpdb->delete($tbl, array( 'path' => $path ), array( '%s'));
|
284 |
}
|
285 |
foreach ( $data as $val ) {
|
286 |
$insert = $wpdb->insert($tbl, $val);
|
287 |
}
|
|
|
288 |
return $insert;
|
289 |
}
|
290 |
-
|
291 |
|
292 |
/**
|
293 |
-
*
|
|
|
294 |
* @param $key
|
295 |
* @param $default
|
296 |
*
|
297 |
* @return mixed
|
298 |
*/
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
}
|
303 |
-
else {
|
304 |
-
$_REQUEST[$key] = stripslashes($default);
|
305 |
-
}
|
306 |
|
307 |
-
|
308 |
-
|
309 |
-
|
|
|
|
|
|
|
|
209 |
*
|
210 |
* @param array $params
|
211 |
*/
|
212 |
+
function files_parsing_db( $params = array() ) {
|
213 |
+
global $wpdb;
|
214 |
+
$dir = $params['dir'];
|
215 |
+
$path = $params['path'];
|
216 |
+
$valid_types = $params['valid_types'];
|
217 |
+
$truncate = !empty($params['truncate']) ? TRUE : FALSE;
|
218 |
+
$dir = str_replace('/', DIRECTORY_SEPARATOR, $dir);
|
219 |
+
$data = array();
|
220 |
+
$dirs = array();
|
221 |
+
$files = array();
|
222 |
+
$items = $this->get_dir_contents($dir);
|
223 |
+
if ( !empty($items) ) {
|
224 |
+
foreach ( $items as $item ) {
|
225 |
+
$value = str_replace($dir, '', $item);
|
226 |
+
$value = explode(DIRECTORY_SEPARATOR, $value);
|
227 |
+
$name = end($value);
|
228 |
+
/*
|
229 |
+
$paths = $value;
|
230 |
+
array_pop($paths);
|
231 |
+
$implode_path = implode('/', $paths);
|
232 |
+
$path = !empty($implode_path) ? '/'. $implode_path . '/' : '/';
|
233 |
+
*/
|
234 |
+
if ( is_dir($item) == TRUE ) {
|
235 |
+
$file = array();
|
236 |
+
$file['is_dir'] = 1;
|
237 |
+
$file['path'] = $path;
|
238 |
+
$file['name'] = $name;
|
239 |
+
$file['filename'] = str_replace("_", " ", $name);
|
240 |
+
$file['alt'] = str_replace("_", " ", $name);
|
241 |
+
$file['thumb'] = '/filemanager/images/dir.png';
|
242 |
+
$file['author'] = !empty($wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'")) ? $wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'") : 1;
|
243 |
+
$dirs[] = $file;
|
244 |
+
}
|
245 |
+
else {
|
246 |
+
$file = array();
|
247 |
+
$file['is_dir'] = 0;
|
248 |
+
$file['path'] = $path;
|
249 |
+
$file['name'] = $name;
|
250 |
+
$filename = substr($name, 0, strrpos($name, '.'));
|
251 |
+
$file['filename'] = str_replace("_", " ", $filename);
|
252 |
+
$file_extension = explode('.', $name);
|
253 |
+
$file['type'] = strtolower(end($file_extension));
|
254 |
+
$file['thumb'] = 'thumb/' . $name;
|
255 |
+
if ( ($valid_types[0] != '*') && (in_array($file['type'], $valid_types) == FALSE) ) {
|
256 |
+
continue;
|
257 |
+
}
|
258 |
+
$file_size_kb = (int) (filesize($item) / 1024);
|
259 |
+
$file['size'] = $file_size_kb . ' KB';
|
260 |
+
$image_info = getimagesize(htmlspecialchars_decode($item, ENT_COMPAT | ENT_QUOTES));
|
261 |
+
if ($this->is_img($file['type'])) {
|
262 |
+
if ($file['type'] === 'svg') {
|
263 |
+
$file_size_array = WDWLibrary::get_svg_size(BWG()->upload_url . $file['path'] . $file['name']);
|
264 |
+
if( !empty($file_size_array['width']) && !empty($file_size_array['height']) ) {
|
265 |
+
$file['resolution'] = $file_size_array['width'] . " x " . $file_size_array['height'] . " px ";
|
266 |
+
$file['resolution_thumb'] = $file_size_array['width'] . "x" . $file_size_array['height'];
|
267 |
+
} else {
|
268 |
+
$file['resolution'] = WDWLibrary::get('upload_img_width') . " x " . WDWLibrary::get('upload_img_height') . " px ";
|
269 |
+
$file['resolution_thumb'] = WDWLibrary::get('upload_thumb_width') . "x" . WDWLibrary::get('upload_thumb_height');
|
270 |
+
}
|
271 |
+
} else {
|
272 |
+
$file['resolution'] = $image_info[0] . ' x ' . $image_info[1] . ' px';
|
273 |
+
$file['resolution_thumb'] = WDWLibrary::get_thumb_size("/" . $file['thumb']);
|
274 |
+
}
|
275 |
+
} else {
|
276 |
+
$file['resolution'] = '';
|
277 |
+
$file['resolution_thumb'] = '';
|
278 |
+
}
|
279 |
+
$exif = WDWLibrary::read_image_metadata($dir . '/.original/' . $name);
|
280 |
+
$file['alt'] = BWG()->options->read_metadata && $exif['title'] ? $exif['title'] : str_replace("_", " ", $filename);
|
281 |
+
$file['credit'] = !empty($exif['credit']) ? $exif['credit'] : '';
|
282 |
+
$file['aperture'] = !empty($exif['aperture']) ? $exif['aperture'] : '';
|
283 |
+
$file['camera'] = !empty($exif['camera']) ? $exif['camera'] : '';
|
284 |
+
$file['caption'] = !empty($exif['caption']) ? $exif['caption'] : '';
|
285 |
+
$file['iso'] = !empty($exif['iso']) ? $exif['iso'] : '';
|
286 |
+
$file['orientation'] = !empty($exif['orientation']) ? $exif['orientation'] : '';
|
287 |
+
$file['copyright'] = !empty($exif['copyright']) ? $exif['copyright'] : '';
|
288 |
+
$file['tags'] = !empty($exif['tags']) ? $exif['tags'] : '';
|
289 |
+
$file['date_modified'] = date("Y-m-d H:i:s", filemtime($item));
|
290 |
+
$file['author'] = !empty($wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'")) ? $wpdb->get_var("SELECT `author` FROM `" . $wpdb->prefix . "bwg_file_paths` WHERE `name` = '$name'") : 1;
|
291 |
+
$files[] = $file;
|
292 |
}
|
293 |
}
|
294 |
+
$data = array_merge($dirs, $files);
|
295 |
$insert = 0;
|
296 |
$tbl = $wpdb->prefix . 'bwg_file_paths';
|
297 |
if ( !empty($params['refresh']) ) {
|
298 |
+
$wpdb->delete($tbl, array( 'path' => $path ), array( '%s' ));
|
299 |
}
|
300 |
foreach ( $data as $val ) {
|
301 |
$insert = $wpdb->insert($tbl, $val);
|
302 |
}
|
303 |
+
|
304 |
return $insert;
|
305 |
}
|
306 |
+
}
|
307 |
|
308 |
/**
|
309 |
+
* Set the passed value to the REQUEST to make it possible to get from other page.
|
310 |
+
*
|
311 |
* @param $key
|
312 |
* @param $default
|
313 |
*
|
314 |
* @return mixed
|
315 |
*/
|
316 |
+
public function get_from_session( $key, $default ) {
|
317 |
+
// Sanitize the get value.
|
318 |
+
$value = WDWLibrary::get($key, $default, 'sanitize_text_field', 'REQUEST');
|
|
|
|
|
|
|
|
|
319 |
|
320 |
+
// Set the REQUEST value to make it possible to get from other page.
|
321 |
+
$_REQUEST[$key] = $value;
|
322 |
+
|
323 |
+
// Return the escaped value to use it in HTML.
|
324 |
+
return esc_html($value);
|
325 |
+
}
|
326 |
+
}
|
filemanager/view.php
CHANGED
@@ -59,8 +59,8 @@ class FilemanagerView {
|
|
59 |
wp_print_styles('wp-auth-check');
|
60 |
wp_print_styles('wp-pointer');
|
61 |
?>
|
62 |
-
<script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js?v=10.
|
63 |
-
<script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.fileupload.js?v=10.
|
64 |
<script>
|
65 |
var DS = "<?php echo addslashes('/'); ?>";
|
66 |
var demo_message = "<?php echo addslashes(__('This option is disabled in demo.', BWG()->prefix)); ?>";
|
@@ -218,7 +218,7 @@ class FilemanagerView {
|
|
218 |
<a id="add_selectid_img" title="<?php echo $add_image_btn; ?>" class="button button-primary button-large" onclick="window.parent.bwg_create_loading_block(); onBtnOpenClick(event, this);">
|
219 |
<div id="bwg_img_add"><?php echo $add_image_btn; ?></div>
|
220 |
</a>
|
221 |
-
<a class="button button-secondary button-large" title="<?php _e('Cancel', BWG()->prefix); ?>" onclick="onBtnCancelClick(event, this);">
|
222 |
<div id="bwg_img_cancel"><?php _e('Cancel', BWG()->prefix); ?></div>
|
223 |
</a>
|
224 |
</div>
|
59 |
wp_print_styles('wp-auth-check');
|
60 |
wp_print_styles('wp-pointer');
|
61 |
?>
|
62 |
+
<script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js?v=10.31.0"></script>
|
63 |
+
<script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.fileupload.js?v=10.31.0"></script>
|
64 |
<script>
|
65 |
var DS = "<?php echo addslashes('/'); ?>";
|
66 |
var demo_message = "<?php echo addslashes(__('This option is disabled in demo.', BWG()->prefix)); ?>";
|
218 |
<a id="add_selectid_img" title="<?php echo $add_image_btn; ?>" class="button button-primary button-large" onclick="window.parent.bwg_create_loading_block(); onBtnOpenClick(event, this);">
|
219 |
<div id="bwg_img_add"><?php echo $add_image_btn; ?></div>
|
220 |
</a>
|
221 |
+
<a id="cancel_add_img" class="button button-secondary button-large" title="<?php _e('Cancel', BWG()->prefix); ?>" onclick="onBtnCancelClick(event, this);">
|
222 |
<div id="bwg_img_cancel"><?php _e('Cancel', BWG()->prefix); ?></div>
|
223 |
</a>
|
224 |
</div>
|
framework/WDWLibrary.php
CHANGED
@@ -251,9 +251,9 @@ class WDWLibrary {
|
|
251 |
}
|
252 |
if ($message) {
|
253 |
ob_start();
|
254 |
-
?><div class="<?php echo $type; ?> inline">
|
255 |
<p>
|
256 |
-
<strong><?php echo $message; ?></strong>
|
257 |
</p>
|
258 |
</div><?php
|
259 |
$message = ob_get_clean();
|
@@ -263,7 +263,7 @@ class WDWLibrary {
|
|
263 |
}
|
264 |
|
265 |
public static function message($message, $type) {
|
266 |
-
return '<div style="width:100%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
|
267 |
}
|
268 |
|
269 |
/**
|
@@ -288,10 +288,10 @@ class WDWLibrary {
|
|
288 |
$order = (($orderby == $id) && ($order == 'asc')) ? 'desc' : 'asc';
|
289 |
ob_start();
|
290 |
?>
|
291 |
-
<th id="order-<?php echo $id; ?>" class="<?php echo implode(' ', $class); ?>">
|
292 |
-
<a href="<?php echo add_query_arg( array('orderby' => $id, 'order' => $order), $page_url ); ?>"
|
293 |
title="<?php _e('Click to sort by this item', BWG()->prefix); ?>">
|
294 |
-
<span><?php echo $text; ?></span><span class="sorting-indicator"></span>
|
295 |
</a>
|
296 |
</th>
|
297 |
<?php
|
@@ -340,7 +340,7 @@ class WDWLibrary {
|
|
340 |
$margin_right = 5;
|
341 |
}
|
342 |
?>
|
343 |
-
<div class="<?php echo $position_search; ?> actions" style="clear:both;">
|
344 |
<script>
|
345 |
function spider_search() {
|
346 |
document.getElementById("page_number").value = "1";
|
@@ -365,8 +365,8 @@ class WDWLibrary {
|
|
365 |
}
|
366 |
</script>
|
367 |
<div class="alignleft actions">
|
368 |
-
<label for="search_value" style="font-size:14px; width:50px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
369 |
-
<input type="text" id="search_value" name="search_value" class="spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo
|
370 |
</div>
|
371 |
<div class="alignleft actions">
|
372 |
<input type="button" value="" title="<?php _e('Search',BWG()->prefix); ?>" onclick="spider_search()" class="wd-search-btn action">
|
@@ -470,18 +470,18 @@ class WDWLibrary {
|
|
470 |
}
|
471 |
?>
|
472 |
<span class="pagination-links">
|
473 |
-
<a class="<?php echo $first_page; ?>" title="Go to the first page" href="javascript:spider_page(<?php echo $page_number; ?>,-2);">«</a>
|
474 |
-
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="javascript:spider_page(<?php echo $page_number; ?>,-1);">‹</a>
|
475 |
<span class="paging-input">
|
476 |
<span class="total-pages">
|
477 |
-
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event, this)" title="Go to the page" type="text" size="1" />
|
478 |
</span> <?php echo __('of', BWG()->prefix); ?>
|
479 |
<span class="total-pages">
|
480 |
-
<?php echo $items_county; ?>
|
481 |
</span>
|
482 |
</span>
|
483 |
-
<a class="<?php echo $next_page ?>" title="Go to the next page" href="javascript:spider_page(<?php echo $page_number; ?>,1);">›</a>
|
484 |
-
<a class="<?php echo $last_page ?>" title="Go to the last page" href="javascript:spider_page(<?php echo $page_number; ?>,2);">»</a>
|
485 |
<?php
|
486 |
}
|
487 |
?>
|
@@ -517,8 +517,8 @@ class WDWLibrary {
|
|
517 |
}
|
518 |
</script>
|
519 |
<div class="alignleft actions">
|
520 |
-
<label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
521 |
-
<input type="text" id="search_value" name="search_value" class="spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo
|
522 |
</div>
|
523 |
<div class="alignleft actions">
|
524 |
<input type="button" value="" title="<?php echo __('Search',BWG()->prefix); ?>" onclick="spider_search()" class="wd-search-btn action">
|
@@ -617,8 +617,8 @@ class WDWLibrary {
|
|
617 |
}
|
618 |
?>
|
619 |
<span class="pagination-links">
|
620 |
-
<a class="bwg-a <?php echo $first_page; ?>" title="Go to the first page" onclick="spider_page(<?php echo $page_number; ?>,-2)">«</a>
|
621 |
-
<a class="bwg-a <?php echo $prev_page; ?>" title="Go to the previous page" onclick="spider_page(<?php echo $page_number; ?>,-1)">‹</a>
|
622 |
<span class="paging-input">
|
623 |
<span class="total-pages">
|
624 |
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event, this)" title="Go to the page" type="text" size="1" />
|
@@ -2301,7 +2301,7 @@ class WDWLibrary {
|
|
2301 |
$title = ($title != '') ? strtolower($title) : 'items';
|
2302 |
ob_start();
|
2303 |
?><tr class="no-items">
|
2304 |
-
<td class="colspanchange" <?php echo $colspan_count ? 'colspan="' . $colspan_count . '"' : ''?>><?php echo sprintf(__('No %s found.', BWG()->prefix), $title); ?></td>
|
2305 |
</tr><?php
|
2306 |
return ob_get_clean();
|
2307 |
}
|
@@ -2325,7 +2325,7 @@ class WDWLibrary {
|
|
2325 |
$t_id = $tag->term_id; // Get the ID of the term you're editing
|
2326 |
$term = get_term($t_id, 'bwg_tag');
|
2327 |
?>
|
2328 |
-
<input type="hidden" name="old_tag" value="<?php echo isset($term->slug) ? $term->slug : ''; ?>" />
|
2329 |
<?php
|
2330 |
}
|
2331 |
|
@@ -2778,7 +2778,7 @@ class WDWLibrary {
|
|
2778 |
<?php
|
2779 |
if ( $show_guide_link ) {
|
2780 |
?>
|
2781 |
-
<a href="<?php echo $user_guide_link; ?>" target="_blank" class="bwg-topbar_user_guid">
|
2782 |
<div class="bwg-topbar-links-item">
|
2783 |
<?php _e('User guide', BWG()->prefix); ?>
|
2784 |
</div>
|
@@ -2792,9 +2792,9 @@ class WDWLibrary {
|
|
2792 |
?>
|
2793 |
<div class="bwg-topbar bwg-topbar-links bwg-topbar_support_forum">
|
2794 |
<div class="bwg-topbar-links-container">
|
2795 |
-
<a href="<?php echo $support_forum_link; ?>" target="_blank" class="bwg-topbar_support_forum">
|
2796 |
<div class="bwg-topbar-links-item">
|
2797 |
-
<img src="<?php echo BWG()->plugin_url . '/css/images/help.svg'; ?>" class="help_icon" />
|
2798 |
<?php _e('Ask a question', BWG()->prefix); ?>
|
2799 |
</div>
|
2800 |
</a>
|
@@ -2823,7 +2823,7 @@ class WDWLibrary {
|
|
2823 |
?>
|
2824 |
<style>#wpbody-content>div:not(.wrap), .wrap .notice:not(#wd_bp_notice_cont) { display: none; }</style>
|
2825 |
<div class="bwg-head">
|
2826 |
-
<div><img src="<?php echo BWG()->plugin_url . '/images/FormMaker.png'; ?>"></div>
|
2827 |
<ul class="bwg-breadcrumbs">
|
2828 |
<?php
|
2829 |
foreach ( $menus as $key => $item ) {
|
@@ -2832,7 +2832,7 @@ class WDWLibrary {
|
|
2832 |
}
|
2833 |
?>
|
2834 |
<li class="bwg-breadcrumb-item">
|
2835 |
-
<a class="bwg-breadcrumb-item-link<?php echo ( $key == $page ) ? ' bwg-breadcrumb-item-link-active' : ''; ?>" href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a>
|
2836 |
</li>
|
2837 |
<?php
|
2838 |
}
|
@@ -2914,8 +2914,8 @@ class WDWLibrary {
|
|
2914 |
ob_start();
|
2915 |
if ( $show_guide_link ) {
|
2916 |
?>
|
2917 |
-
<a href="<?php echo $user_guide_link; ?>" target="_blank" class="bwg-topbar_user_guid">
|
2918 |
-
<img class="wd-question-mark" src="<?php echo BWG()->plugin_url . '/images/question_mark.svg';?>">
|
2919 |
</a>
|
2920 |
<?php
|
2921 |
}?>
|
@@ -2940,7 +2940,7 @@ class WDWLibrary {
|
|
2940 |
<p class="upgrade-text"><?php _e('features of the Premium Plugin', BWG()->prefix); ?></p>
|
2941 |
<a class="upgrade-button" href="<?php echo $premium_link; ?>" target="_blank"><?php _e( 'Upgrade Now', BWG()->prefix ); ?></a>
|
2942 |
</div>
|
2943 |
-
<a class="wd-list-view-ask-question" href="<?php echo $support_forum_link; ?>" target="_blank"><?php _e('Ask a question', BWG()->prefix); ?></a>
|
2944 |
<?php
|
2945 |
echo ob_get_clean();
|
2946 |
}
|
@@ -2954,7 +2954,7 @@ class WDWLibrary {
|
|
2954 |
$support_forum_link = 'https://wordpress.org/support/plugin/photo-gallery/#new-post';
|
2955 |
ob_start();
|
2956 |
?>
|
2957 |
-
<a class="wd-list-view-ask-question" href="<?php echo $support_forum_link; ?>" target="_blank"><?php _e('Ask a question', BWG()->prefix); ?></a>
|
2958 |
<?php
|
2959 |
echo ob_get_clean();
|
2960 |
}
|
251 |
}
|
252 |
if ($message) {
|
253 |
ob_start();
|
254 |
+
?><div class="<?php echo sanitize_html_class($type); ?> inline">
|
255 |
<p>
|
256 |
+
<strong><?php echo esc_html($message); ?></strong>
|
257 |
</p>
|
258 |
</div><?php
|
259 |
$message = ob_get_clean();
|
263 |
}
|
264 |
|
265 |
public static function message($message, $type) {
|
266 |
+
return '<div style="width:100%"><div class="' . sanitize_html_class($type) . '"><p><strong>' . esc_html($message) . '</strong></p></div></div>';
|
267 |
}
|
268 |
|
269 |
/**
|
288 |
$order = (($orderby == $id) && ($order == 'asc')) ? 'desc' : 'asc';
|
289 |
ob_start();
|
290 |
?>
|
291 |
+
<th id="order-<?php echo sanitize_html_class($id); ?>" class="<?php echo esc_html(implode(' ', $class)); ?>">
|
292 |
+
<a href="<?php echo esc_url(add_query_arg( array('orderby' => $id, 'order' => $order), $page_url )); ?>"
|
293 |
title="<?php _e('Click to sort by this item', BWG()->prefix); ?>">
|
294 |
+
<span><?php echo esc_html($text); ?></span><span class="sorting-indicator"></span>
|
295 |
</a>
|
296 |
</th>
|
297 |
<?php
|
340 |
$margin_right = 5;
|
341 |
}
|
342 |
?>
|
343 |
+
<div class="<?php echo sanitize_html_class($position_search); ?> actions" style="clear:both;">
|
344 |
<script>
|
345 |
function spider_search() {
|
346 |
document.getElementById("page_number").value = "1";
|
365 |
}
|
366 |
</script>
|
367 |
<div class="alignleft actions">
|
368 |
+
<label for="search_value" style="font-size:14px; width:50px; display:inline-block;"><?php echo esc_html($search_by); ?>:</label>
|
369 |
+
<input type="text" id="search_value" name="search_value" class="spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_attr($search_value); ?>" style="width: 150px;margin-right:<?php echo $margin_right; ?>px; padding-top:10px; <?php echo (get_bloginfo('version') > '3.7') ? ' height: 33px;' : ''; ?>" />
|
370 |
</div>
|
371 |
<div class="alignleft actions">
|
372 |
<input type="button" value="" title="<?php _e('Search',BWG()->prefix); ?>" onclick="spider_search()" class="wd-search-btn action">
|
470 |
}
|
471 |
?>
|
472 |
<span class="pagination-links">
|
473 |
+
<a class="<?php echo esc_html($first_page); ?>" title="Go to the first page" href="javascript:spider_page(<?php echo $page_number; ?>,-2);">«</a>
|
474 |
+
<a class="<?php echo esc_html($prev_page); ?>" title="Go to the previous page" href="javascript:spider_page(<?php echo $page_number; ?>,-1);">‹</a>
|
475 |
<span class="paging-input">
|
476 |
<span class="total-pages">
|
477 |
+
<input class="current_page" id="current_page" name="current_page" value="<?php echo esc_attr($page_number); ?>" onkeypress="return check_enter_key(event, this)" title="Go to the page" type="text" size="1" />
|
478 |
</span> <?php echo __('of', BWG()->prefix); ?>
|
479 |
<span class="total-pages">
|
480 |
+
<?php echo esc_html($items_county); ?>
|
481 |
</span>
|
482 |
</span>
|
483 |
+
<a class="<?php echo esc_html($next_page) ?>" title="Go to the next page" href="javascript:spider_page(<?php echo $page_number; ?>,1);">›</a>
|
484 |
+
<a class="<?php echo esc_html($last_page) ?>" title="Go to the last page" href="javascript:spider_page(<?php echo $page_number; ?>,2);">»</a>
|
485 |
<?php
|
486 |
}
|
487 |
?>
|
517 |
}
|
518 |
</script>
|
519 |
<div class="alignleft actions">
|
520 |
+
<label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo esc_html($search_by); ?>:</label>
|
521 |
+
<input type="text" id="search_value" name="search_value" class="spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_attr($search_value); ?>" style="width: 150px;margin-right:5px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 33px;' : ''; ?>" />
|
522 |
</div>
|
523 |
<div class="alignleft actions">
|
524 |
<input type="button" value="" title="<?php echo __('Search',BWG()->prefix); ?>" onclick="spider_search()" class="wd-search-btn action">
|
617 |
}
|
618 |
?>
|
619 |
<span class="pagination-links">
|
620 |
+
<a class="bwg-a <?php echo esc_html($first_page); ?>" title="Go to the first page" onclick="spider_page(<?php echo $page_number; ?>,-2)">«</a>
|
621 |
+
<a class="bwg-a <?php echo esc_html($prev_page); ?>" title="Go to the previous page" onclick="spider_page(<?php echo $page_number; ?>,-1)">‹</a>
|
622 |
<span class="paging-input">
|
623 |
<span class="total-pages">
|
624 |
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event, this)" title="Go to the page" type="text" size="1" />
|
2301 |
$title = ($title != '') ? strtolower($title) : 'items';
|
2302 |
ob_start();
|
2303 |
?><tr class="no-items">
|
2304 |
+
<td class="colspanchange" <?php echo $colspan_count ? 'colspan="' . esc_attr($colspan_count) . '"' : ''?>><?php echo sprintf(__('No %s found.', BWG()->prefix), $title); ?></td>
|
2305 |
</tr><?php
|
2306 |
return ob_get_clean();
|
2307 |
}
|
2325 |
$t_id = $tag->term_id; // Get the ID of the term you're editing
|
2326 |
$term = get_term($t_id, 'bwg_tag');
|
2327 |
?>
|
2328 |
+
<input type="hidden" name="old_tag" value="<?php echo isset($term->slug) ? esc_attr($term->slug) : ''; ?>" />
|
2329 |
<?php
|
2330 |
}
|
2331 |
|
2778 |
<?php
|
2779 |
if ( $show_guide_link ) {
|
2780 |
?>
|
2781 |
+
<a href="<?php echo esc_url($user_guide_link); ?>" target="_blank" class="bwg-topbar_user_guid">
|
2782 |
<div class="bwg-topbar-links-item">
|
2783 |
<?php _e('User guide', BWG()->prefix); ?>
|
2784 |
</div>
|
2792 |
?>
|
2793 |
<div class="bwg-topbar bwg-topbar-links bwg-topbar_support_forum">
|
2794 |
<div class="bwg-topbar-links-container">
|
2795 |
+
<a href="<?php echo esc_url($support_forum_link); ?>" target="_blank" class="bwg-topbar_support_forum">
|
2796 |
<div class="bwg-topbar-links-item">
|
2797 |
+
<img src="<?php echo esc_url(BWG()->plugin_url . '/css/images/help.svg'); ?>" class="help_icon" />
|
2798 |
<?php _e('Ask a question', BWG()->prefix); ?>
|
2799 |
</div>
|
2800 |
</a>
|
2823 |
?>
|
2824 |
<style>#wpbody-content>div:not(.wrap), .wrap .notice:not(#wd_bp_notice_cont) { display: none; }</style>
|
2825 |
<div class="bwg-head">
|
2826 |
+
<div><img src="<?php echo esc_url(BWG()->plugin_url . '/images/FormMaker.png'); ?>"></div>
|
2827 |
<ul class="bwg-breadcrumbs">
|
2828 |
<?php
|
2829 |
foreach ( $menus as $key => $item ) {
|
2832 |
}
|
2833 |
?>
|
2834 |
<li class="bwg-breadcrumb-item">
|
2835 |
+
<a class="bwg-breadcrumb-item-link<?php echo ( $key == $page ) ? ' bwg-breadcrumb-item-link-active' : ''; ?>" href="<?php echo esc_url($item['href']); ?>"><?php echo esc_html($item['name']); ?></a>
|
2836 |
</li>
|
2837 |
<?php
|
2838 |
}
|
2914 |
ob_start();
|
2915 |
if ( $show_guide_link ) {
|
2916 |
?>
|
2917 |
+
<a href="<?php echo esc_url($user_guide_link); ?>" target="_blank" class="bwg-topbar_user_guid">
|
2918 |
+
<img class="wd-question-mark" src="<?php echo esc_url(BWG()->plugin_url . '/images/question_mark.svg');?>">
|
2919 |
</a>
|
2920 |
<?php
|
2921 |
}?>
|
2940 |
<p class="upgrade-text"><?php _e('features of the Premium Plugin', BWG()->prefix); ?></p>
|
2941 |
<a class="upgrade-button" href="<?php echo $premium_link; ?>" target="_blank"><?php _e( 'Upgrade Now', BWG()->prefix ); ?></a>
|
2942 |
</div>
|
2943 |
+
<a class="wd-list-view-ask-question" href="<?php echo esc_url($support_forum_link); ?>" target="_blank"><?php _e('Ask a question', BWG()->prefix); ?></a>
|
2944 |
<?php
|
2945 |
echo ob_get_clean();
|
2946 |
}
|
2954 |
$support_forum_link = 'https://wordpress.org/support/plugin/photo-gallery/#new-post';
|
2955 |
ob_start();
|
2956 |
?>
|
2957 |
+
<a class="wd-list-view-ask-question" href="<?php echo esc_url($support_forum_link); ?>" target="_blank"><?php _e('Ask a question', BWG()->prefix); ?></a>
|
2958 |
<?php
|
2959 |
echo ob_get_clean();
|
2960 |
}
|
frontend/controllers/BWGControllerDownload_gallery.php
CHANGED
@@ -6,6 +6,12 @@ class BWGControllerDownload_gallery {
|
|
6 |
}
|
7 |
|
8 |
public function display() {
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
require_once BWG()->plugin_dir . "/frontend/views/BWGViewDownload_gallery.php";
|
10 |
$view = new BWGViewDownload_gallery();
|
11 |
|
6 |
}
|
7 |
|
8 |
public function display() {
|
9 |
+
$nonce = WDWLibrary::get('_wpnonce', '', 'sanitize_text_field', 'GET');
|
10 |
+
if( !wp_verify_nonce( $nonce, "bwg-download-nonce" ) ){
|
11 |
+
echo "Permission denied";
|
12 |
+
die;
|
13 |
+
}
|
14 |
+
|
15 |
require_once BWG()->plugin_dir . "/frontend/views/BWGViewDownload_gallery.php";
|
16 |
$view = new BWGViewDownload_gallery();
|
17 |
|
frontend/controllers/BWGControllerGalleryBox.php
CHANGED
@@ -22,7 +22,7 @@ class BWGControllerGalleryBox {
|
|
22 |
|
23 |
public function save_rate() {
|
24 |
global $wpdb;
|
25 |
-
$image_id = WDWLibrary::get('image_id', 0, 'intval','POST');
|
26 |
$rate = WDWLibrary::get('rate');
|
27 |
$ip = BWG()->options->save_ip ? $_SERVER['REMOTE_ADDR'] : '';
|
28 |
if ( !$ip || !$wpdb->get_var($wpdb->prepare('SELECT `image_id` FROM `' . $wpdb->prefix . 'bwg_image_rate` WHERE `ip`="%s" AND `image_id`="%d"', $ip, $image_id)) ) {
|
@@ -31,19 +31,24 @@ class BWGControllerGalleryBox {
|
|
31 |
'rate' => $rate,
|
32 |
'ip' => $ip,
|
33 |
'date' => date('Y-m-d H:i:s'),
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
}
|
41 |
$rates = $wpdb->get_row($wpdb->prepare('SELECT AVG(`rate`) as `average`, COUNT(`rate`) as `rate_count` FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $image_id));
|
42 |
-
$wpdb->update($wpdb->prefix . 'bwg_image',
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
$this->display();
|
48 |
}
|
49 |
|
@@ -65,7 +70,7 @@ class BWGControllerGalleryBox {
|
|
65 |
$image_id = WDWLibrary::get('comment_image_id', 0);
|
66 |
$name = trim(WDWLibrary::get('comment_name', ''));
|
67 |
$email = WDWLibrary::get('comment_email', '');
|
68 |
-
$comment = trim(WDWLibrary::get('comment_text', ''));
|
69 |
$moderation = trim(WDWLibrary::get('comment_moderation', 0));
|
70 |
$privacy_policy = WDWLibrary::get('privacy_policy', '');
|
71 |
$published = (current_user_can('manage_options') || !$moderation) ? 1 : 0;
|
22 |
|
23 |
public function save_rate() {
|
24 |
global $wpdb;
|
25 |
+
$image_id = WDWLibrary::get('image_id', 0, 'intval', 'POST');
|
26 |
$rate = WDWLibrary::get('rate');
|
27 |
$ip = BWG()->options->save_ip ? $_SERVER['REMOTE_ADDR'] : '';
|
28 |
if ( !$ip || !$wpdb->get_var($wpdb->prepare('SELECT `image_id` FROM `' . $wpdb->prefix . 'bwg_image_rate` WHERE `ip`="%s" AND `image_id`="%d"', $ip, $image_id)) ) {
|
31 |
'rate' => $rate,
|
32 |
'ip' => $ip,
|
33 |
'date' => date('Y-m-d H:i:s'),
|
34 |
+
), array(
|
35 |
+
'%d',
|
36 |
+
'%f',
|
37 |
+
'%s',
|
38 |
+
'%s',
|
39 |
+
));
|
40 |
}
|
41 |
$rates = $wpdb->get_row($wpdb->prepare('SELECT AVG(`rate`) as `average`, COUNT(`rate`) as `rate_count` FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $image_id));
|
42 |
+
$wpdb->update($wpdb->prefix . 'bwg_image',
|
43 |
+
array(
|
44 |
+
'avg_rating' => $rates->average,
|
45 |
+
'rate_count' => $rates->rate_count,
|
46 |
+
),
|
47 |
+
array( 'id' => $image_id ),
|
48 |
+
array( '%f', '%d' ),
|
49 |
+
array( '%d' )
|
50 |
+
);
|
51 |
+
|
52 |
$this->display();
|
53 |
}
|
54 |
|
70 |
$image_id = WDWLibrary::get('comment_image_id', 0);
|
71 |
$name = trim(WDWLibrary::get('comment_name', ''));
|
72 |
$email = WDWLibrary::get('comment_email', '');
|
73 |
+
$comment = trim(WDWLibrary::get('comment_text', '', 'htmlentities'));
|
74 |
$moderation = trim(WDWLibrary::get('comment_moderation', 0));
|
75 |
$privacy_policy = WDWLibrary::get('privacy_policy', '');
|
76 |
$published = (current_user_can('manage_options') || !$moderation) ? 1 : 0;
|
frontend/models/BWGModelGalleryBox.php
CHANGED
@@ -6,7 +6,7 @@ class BWGModelGalleryBox {
|
|
6 |
return $row;
|
7 |
}
|
8 |
|
9 |
-
public function get_image_rows_data($gallery_id, $bwg, $sort_by, $order_by = 'asc', $tag = 0) {
|
10 |
global $wpdb;
|
11 |
$bwg_sort_by_temp = WDWLibrary::get('filtersortby', '');
|
12 |
if ( $bwg_sort_by_temp == '' ) { /* for thumbnail view */
|
@@ -38,10 +38,10 @@ class BWGModelGalleryBox {
|
|
38 |
|
39 |
$bwg_random_seed = WDWLibrary::get('bwg_random_seed','');
|
40 |
$bwg_filter_tag_temp = WDWLibrary::get('filter_tag', 0);
|
41 |
-
if ( $bwg_filter_tag_temp
|
42 |
$filter_tags = array();
|
43 |
$bwg_filter_tag_temp = WDWLibrary::get('filter_tag_' . $bwg, 0);
|
44 |
-
if ( $bwg_filter_tag_temp
|
45 |
$filter_tags = explode(",", $bwg_filter_tag_temp);
|
46 |
}
|
47 |
}
|
@@ -113,14 +113,17 @@ class BWGModelGalleryBox {
|
|
113 |
$where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode($compare_sign, $filter_tags) . ')," ';
|
114 |
}
|
115 |
|
116 |
-
$
|
|
|
|
|
|
|
|
|
117 |
$query .= ' ORDER BY ' . str_replace('RAND()', 'RAND(' . $bwg_random_seed . ')', $sort_by) . ' ' . $order_by . ', image.id asc';
|
118 |
if( !empty($prepareArgs) ) {
|
119 |
$rows = $wpdb->get_results($wpdb->prepare($query, $prepareArgs));
|
120 |
} else {
|
121 |
$rows = $wpdb->get_results($query);
|
122 |
}
|
123 |
-
|
124 |
$images = array();
|
125 |
if ( !empty($rows) ) {
|
126 |
foreach ( $rows as $row ) {
|
6 |
return $row;
|
7 |
}
|
8 |
|
9 |
+
public function get_image_rows_data($gallery_id, $bwg, $sort_by, $order_by = 'asc', $tag = 0, $popup_enable_rate = 0 ) {
|
10 |
global $wpdb;
|
11 |
$bwg_sort_by_temp = WDWLibrary::get('filtersortby', '');
|
12 |
if ( $bwg_sort_by_temp == '' ) { /* for thumbnail view */
|
38 |
|
39 |
$bwg_random_seed = WDWLibrary::get('bwg_random_seed','');
|
40 |
$bwg_filter_tag_temp = WDWLibrary::get('filter_tag', 0);
|
41 |
+
if ( empty($bwg_filter_tag_temp) ) {
|
42 |
$filter_tags = array();
|
43 |
$bwg_filter_tag_temp = WDWLibrary::get('filter_tag_' . $bwg, 0);
|
44 |
+
if ( !empty($bwg_filter_tag_temp) ) {
|
45 |
$filter_tags = explode(",", $bwg_filter_tag_temp);
|
46 |
}
|
47 |
}
|
113 |
$where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode($compare_sign, $filter_tags) . ')," ';
|
114 |
}
|
115 |
|
116 |
+
$rate_join = '';
|
117 |
+
if( $popup_enable_rate ) {
|
118 |
+
$rate_join = ' LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="' . $_SERVER['REMOTE_ADDR'] . '") as rates ON image.id=rates.image_id ';
|
119 |
+
}
|
120 |
+
$query = 'SELECT image.*' . ($popup_enable_rate ? ', rates.rate' : '') . ' FROM ' . $wpdb->prefix . 'bwg_image as image' . $rate_join . $join . ' WHERE image.published=1 ' . $where;
|
121 |
$query .= ' ORDER BY ' . str_replace('RAND()', 'RAND(' . $bwg_random_seed . ')', $sort_by) . ' ' . $order_by . ', image.id asc';
|
122 |
if( !empty($prepareArgs) ) {
|
123 |
$rows = $wpdb->get_results($wpdb->prepare($query, $prepareArgs));
|
124 |
} else {
|
125 |
$rows = $wpdb->get_results($query);
|
126 |
}
|
|
|
127 |
$images = array();
|
128 |
if ( !empty($rows) ) {
|
129 |
foreach ( $rows as $row ) {
|
frontend/models/model.php
CHANGED
@@ -7,6 +7,15 @@ class BWGModelSite {
|
|
7 |
$id = $wpdb->get_var('SELECT id FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme=1');
|
8 |
}
|
9 |
$row = new WD_BWG_Theme($id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
return $row;
|
11 |
}
|
12 |
|
7 |
$id = $wpdb->get_var('SELECT id FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme=1');
|
8 |
}
|
9 |
$row = new WD_BWG_Theme($id);
|
10 |
+
foreach ( $row as $key => $val ) {
|
11 |
+
// '#' is removed from the color (jscolor lib v2.4.5)
|
12 |
+
preg_match('/_color/', $key, $is_color_array);
|
13 |
+
if ( !empty($is_color_array) && !empty($is_color_array[0]) ) {
|
14 |
+
$val = str_replace('#', '', $val);
|
15 |
+
}
|
16 |
+
$row->$key = $val;
|
17 |
+
}
|
18 |
+
|
19 |
return $row;
|
20 |
}
|
21 |
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
@@ -53,25 +53,25 @@ class BWGViewAlbum_compact_preview extends BWGViewSite {
|
|
53 |
if ( !WDWLibrary::elementor_is_active() ) {
|
54 |
if ( !$params['ajax'] ) {
|
55 |
if ( BWG()->options->use_inline_stiles_and_scripts ) {
|
56 |
-
|
57 |
}
|
58 |
else {
|
59 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
60 |
}
|
61 |
}
|
62 |
}
|
63 |
else {
|
64 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
65 |
}
|
66 |
ob_start();
|
67 |
|
68 |
if ( $params['album_view_type'] != 'gallery' ) {
|
69 |
?>
|
70 |
-
<div data-max-count="<?php echo $params['items_col_num']; ?>"
|
71 |
-
data-thumbnail-width="<?php echo $params['compuct_album_thumb_width']; ?>"
|
72 |
-
data-bwg="<?php echo $bwg; ?>"
|
73 |
-
id="<?php echo $params['container_id']; ?>"
|
74 |
-
class="bwg-thumbnails bwg-container bwg-container-<?php echo $bwg; ?> bwg-album-thumbnails <?php echo $params['album_gallery_div_class']; ?>">
|
75 |
<?php
|
76 |
if ( !$params['album_gallery_rows']['page_nav']['total'] ) {
|
77 |
echo WDWLibrary::message(__('No results found.', BWG()->prefix), 'wd_error');
|
@@ -96,25 +96,25 @@ class BWGViewAlbum_compact_preview extends BWGViewSite {
|
|
96 |
$enable_dynamic_url = (int) BWG()->options->front_ajax;
|
97 |
?>
|
98 |
<div class="bwg-item">
|
99 |
-
<a class="bwg-a <?php echo $from !== "widget" ? 'bwg-album ' : ''; ?>bwg_album_<?php echo $bwg; ?>"
|
100 |
<?php echo ( ($enable_seo || $enable_dynamic_url) && $from !== "widget" ? "href='" . esc_url($href) . "'" : ""); ?>
|
101 |
<?php echo $from === "widget" ? 'href="' . $row->permalink . '"' : ''; ?>
|
102 |
-
data-container_id="<?php echo $params['container_id']; ?>"
|
103 |
-
data-def_type="<?php echo $row->def_type; ?>"
|
104 |
-
data-album_gallery_id="<?php echo $params['album_gallery_id']; ?>"
|
105 |
-
data-alb_gal_id="<?php echo (($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
|
106 |
-
data-title="<?php echo
|
107 |
-
data-bwg="<?php echo $bwg; ?>">
|
108 |
-
<?php if ( $params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top' ) { echo $title; } ?>
|
109 |
<div class="bwg-item0 <?php echo ($lazyload) ? 'lazy_loader': ''; ?>">
|
110 |
<div class="bwg-item1 <?php echo $theme_row->album_compact_thumb_hover_effect == 'zoom' && $params['compuct_album_title'] == 'hover' ? 'bwg-zoom-effect' : ''; ?>">
|
111 |
<div class="bwg-item2">
|
112 |
<img class="skip-lazy <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
113 |
-
data-width="<?php echo $image_thumb_width; ?>"
|
114 |
-
data-height="<?php echo $image_thumb_height; ?>"
|
115 |
-
data-original="<?php echo $row->preview_image; ?>"
|
116 |
-
src="<?php if( !$lazyload ) { echo $row->preview_image; } else { echo BWG()->plugin_url."/images/lazy_placeholder.gif"; } ?>"
|
117 |
-
alt="<?php echo $row->name; ?>" />
|
118 |
</div>
|
119 |
<div class="<?php echo $theme_row->album_compact_thumb_hover_effect == 'zoom' && $params['compuct_album_title'] == 'hover' ? 'bwg-zoom-effect-overlay' : ''; ?>">
|
120 |
<?php if ( $params['compuct_album_title'] == 'hover' ) { echo $title; } ?>
|
@@ -137,7 +137,7 @@ class BWGViewAlbum_compact_preview extends BWGViewSite {
|
|
137 |
}
|
138 |
}
|
139 |
?>
|
140 |
-
<input type="hidden" id="bwg_album_breadcrumb_<?php echo $bwg; ?>" name="bwg_album_breadcrumb_<?php echo $bwg; ?>" value='<?php echo esc_attr($breadcrumb); ?>' />
|
141 |
<?php
|
142 |
$content = ob_get_clean();
|
143 |
if ( $ajax ) {/* Ajax response after ajax call for filters and pagination.*/
|
53 |
if ( !WDWLibrary::elementor_is_active() ) {
|
54 |
if ( !$params['ajax'] ) {
|
55 |
if ( BWG()->options->use_inline_stiles_and_scripts ) {
|
56 |
+
wp_add_inline_style('bwg_frontend', $inline_style);
|
57 |
}
|
58 |
else {
|
59 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
60 |
}
|
61 |
}
|
62 |
}
|
63 |
else {
|
64 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
65 |
}
|
66 |
ob_start();
|
67 |
|
68 |
if ( $params['album_view_type'] != 'gallery' ) {
|
69 |
?>
|
70 |
+
<div data-max-count="<?php echo esc_attr($params['items_col_num']); ?>"
|
71 |
+
data-thumbnail-width="<?php echo esc_attr($params['compuct_album_thumb_width']); ?>"
|
72 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
73 |
+
id="<?php echo esc_attr($params['container_id']); ?>"
|
74 |
+
class="bwg-thumbnails bwg-container bwg-container-<?php echo sanitize_html_class($bwg); ?> bwg-album-thumbnails <?php echo sanitize_html_class($params['album_gallery_div_class']); ?>">
|
75 |
<?php
|
76 |
if ( !$params['album_gallery_rows']['page_nav']['total'] ) {
|
77 |
echo WDWLibrary::message(__('No results found.', BWG()->prefix), 'wd_error');
|
96 |
$enable_dynamic_url = (int) BWG()->options->front_ajax;
|
97 |
?>
|
98 |
<div class="bwg-item">
|
99 |
+
<a class="bwg-a <?php echo $from !== "widget" ? 'bwg-album ' : ''; ?>bwg_album_<?php echo sanitize_html_class($bwg); ?>"
|
100 |
<?php echo ( ($enable_seo || $enable_dynamic_url) && $from !== "widget" ? "href='" . esc_url($href) . "'" : ""); ?>
|
101 |
<?php echo $from === "widget" ? 'href="' . $row->permalink . '"' : ''; ?>
|
102 |
+
data-container_id="<?php echo esc_attr($params['container_id']); ?>"
|
103 |
+
data-def_type="<?php echo esc_attr($row->def_type); ?>"
|
104 |
+
data-album_gallery_id="<?php echo esc_attr($params['album_gallery_id']); ?>"
|
105 |
+
data-alb_gal_id="<?php echo (($params['album_gallery_id'] != 0) ? esc_attr($row->alb_gal_id) : esc_attr($row->id)); ?>"
|
106 |
+
data-title="<?php echo esc_attr($row->name); ?>"
|
107 |
+
data-bwg="<?php echo esc_attr($bwg); ?>">
|
108 |
+
<?php if ( $params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top' ) { echo esc_html($title); } ?>
|
109 |
<div class="bwg-item0 <?php echo ($lazyload) ? 'lazy_loader': ''; ?>">
|
110 |
<div class="bwg-item1 <?php echo $theme_row->album_compact_thumb_hover_effect == 'zoom' && $params['compuct_album_title'] == 'hover' ? 'bwg-zoom-effect' : ''; ?>">
|
111 |
<div class="bwg-item2">
|
112 |
<img class="skip-lazy <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
113 |
+
data-width="<?php echo esc_attr($image_thumb_width); ?>"
|
114 |
+
data-height="<?php echo esc_attr($image_thumb_height); ?>"
|
115 |
+
data-original="<?php echo esc_attr($row->preview_image); ?>"
|
116 |
+
src="<?php if( !$lazyload ) { echo esc_url($row->preview_image); } else { echo esc_url(BWG()->plugin_url."/images/lazy_placeholder.gif"); } ?>"
|
117 |
+
alt="<?php echo esc_attr($row->name); ?>" />
|
118 |
</div>
|
119 |
<div class="<?php echo $theme_row->album_compact_thumb_hover_effect == 'zoom' && $params['compuct_album_title'] == 'hover' ? 'bwg-zoom-effect-overlay' : ''; ?>">
|
120 |
<?php if ( $params['compuct_album_title'] == 'hover' ) { echo $title; } ?>
|
137 |
}
|
138 |
}
|
139 |
?>
|
140 |
+
<input type="hidden" id="bwg_album_breadcrumb_<?php echo sanitize_html_class($bwg); ?>" name="bwg_album_breadcrumb_<?php echo sanitize_html_class($bwg); ?>" value='<?php echo esc_attr($breadcrumb); ?>' />
|
141 |
<?php
|
142 |
$content = ob_get_clean();
|
143 |
if ( $ajax ) {/* Ajax response after ajax call for filters and pagination.*/
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
@@ -62,25 +62,25 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
62 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
63 |
}
|
64 |
else {
|
65 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
66 |
}
|
67 |
}
|
68 |
}
|
69 |
else {
|
70 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
71 |
}
|
72 |
|
73 |
ob_start();
|
74 |
|
75 |
if ( $params['album_view_type'] != 'gallery' ) {
|
76 |
?>
|
77 |
-
<div data-max-count="<?php echo $params['extended_album_column_number']; ?>"
|
78 |
-
data-thumbnail-width="<?php echo $params['extended_album_thumb_width']; ?>"
|
79 |
-
data-global-spacing="<?php echo $theme_row->album_extended_div_margin; ?>"
|
80 |
-
data-spacing="<?php echo $theme_row->album_extended_div_padding; ?>"
|
81 |
-
data-bwg="<?php echo $bwg; ?>"
|
82 |
-
id="<?php echo $params['container_id']; ?>"
|
83 |
-
class="bwg-album-extended bwg-border-box bwg-thumbnails bwg-container bwg-container-<?php echo $bwg; ?> bwg-album-thumbnails bwg_album_extended_thumbnails_<?php echo $bwg; ?>">
|
84 |
<?php
|
85 |
if ( !$params['album_gallery_rows']['page_nav']['total'] ) {
|
86 |
echo WDWLibrary::message(__('No results found.', BWG()->prefix), 'wd_error');
|
@@ -105,23 +105,23 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
105 |
?>
|
106 |
<div class="bwg-extended-item">
|
107 |
<div class="bwg-extended-item0">
|
108 |
-
<a class="bwg-a bwg-album bwg_album_<?php echo $bwg; ?>"
|
109 |
<?php echo ( ($enable_seo || $enable_dynamic_url ) ? "href='" . esc_url($href) . "'" : ""); ?>
|
110 |
style="font-size: 0;"
|
111 |
-
data-bwg="<?php echo $bwg; ?>"
|
112 |
-
data-container_id="<?php echo $params['container_id']; ?>"
|
113 |
-
data-alb_gal_id="<?php echo (($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
|
114 |
-
data-def_type="<?php echo $row->def_type; ?>"
|
115 |
data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
|
116 |
-
<div class="bwg-item0 bwg_album_thumb_<?php echo $bwg; ?> <?php echo ($lazyload) ? 'lazy_loader' : ''; ?>">
|
117 |
-
<div class="bwg-item1 bwg_album_thumb_spun1_<?php echo $bwg; ?>">
|
118 |
<div class="bwg-item2">
|
119 |
<img class="skip-lazy <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
120 |
-
data-width="<?php echo $image_thumb_width; ?>"
|
121 |
-
data-height="<?php echo $image_thumb_height; ?>"
|
122 |
-
data-original="<?php echo $row->preview_image; ?>"
|
123 |
-
src="<?php if( !$lazyload ) { echo $row->preview_image; } else { echo BWG()->plugin_url."/images/lazy_placeholder.gif"; } ?>"
|
124 |
-
alt="<?php echo $row->name; ?>" />
|
125 |
</div>
|
126 |
</div>
|
127 |
</div>
|
@@ -131,14 +131,14 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
131 |
<?php
|
132 |
if ( $row->name ) {
|
133 |
?>
|
134 |
-
<a class="bwg-album bwg_album_<?php echo $bwg; ?>"
|
135 |
<?php echo ( ($enable_seo || $enable_dynamic_url) ? "href='" . esc_url($href) . "'" : "" ); ?>
|
136 |
-
data-bwg="<?php echo $bwg; ?>"
|
137 |
-
data-container_id="<?php echo $params['container_id']; ?>"
|
138 |
-
data-alb_gal_id="<?php echo(($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
|
139 |
-
data-def_type="<?php echo $row->def_type; ?>"
|
140 |
data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
|
141 |
-
<span class="bwg_title_spun_<?php echo $bwg; ?>"><?php echo $row->name; ?></span>
|
142 |
</a>
|
143 |
<?php
|
144 |
}
|
@@ -148,18 +148,18 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
148 |
$description_short = $description_array[0];
|
149 |
$description_full = $description_array[1];
|
150 |
?>
|
151 |
-
<span class="bwg_description_spun1_<?php echo $bwg; ?>">
|
152 |
-
<span class="bwg_description_spun2_<?php echo $bwg; ?>">
|
153 |
-
<span class="bwg_description_short_<?php echo $bwg; ?>">
|
154 |
-
<?php echo $description_short; ?>
|
155 |
</span>
|
156 |
<span class="bwg_description_full">
|
157 |
-
<?php echo $description_full; ?>
|
158 |
</span>
|
159 |
</span>
|
160 |
<span data-more-msg="<?php _e('More', BWG()->prefix); ?>"
|
161 |
data-hide-msg="<?php _e('Hide', BWG()->prefix); ?>"
|
162 |
-
class="bwg_description_more bwg_description_more_<?php echo $bwg; ?> bwg_more">
|
163 |
<?php _e('More', BWG()->prefix); ?>
|
164 |
</span>
|
165 |
</span>
|
@@ -167,9 +167,9 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
167 |
}
|
168 |
else {
|
169 |
?>
|
170 |
-
<span class="bwg_description_spun1_<?php echo $bwg; ?>">
|
171 |
-
<span class="bwg_description_short_<?php echo $bwg; ?>">
|
172 |
-
<?php echo $row->description; ?>
|
173 |
</span>
|
174 |
</span>
|
175 |
<?php
|
@@ -191,7 +191,7 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
191 |
}
|
192 |
}
|
193 |
?>
|
194 |
-
<input type="hidden" id="bwg_album_breadcrumb_<?php echo $bwg; ?>" name="bwg_album_breadcrumb_<?php echo $bwg; ?>" value='<?php echo esc_attr($breadcrumb); ?>' />
|
195 |
<?php
|
196 |
|
197 |
$content = ob_get_clean();
|
62 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
63 |
}
|
64 |
else {
|
65 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
66 |
}
|
67 |
}
|
68 |
}
|
69 |
else {
|
70 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
71 |
}
|
72 |
|
73 |
ob_start();
|
74 |
|
75 |
if ( $params['album_view_type'] != 'gallery' ) {
|
76 |
?>
|
77 |
+
<div data-max-count="<?php echo esc_attr($params['extended_album_column_number']); ?>"
|
78 |
+
data-thumbnail-width="<?php echo esc_attr($params['extended_album_thumb_width']); ?>"
|
79 |
+
data-global-spacing="<?php echo esc_attr($theme_row->album_extended_div_margin); ?>"
|
80 |
+
data-spacing="<?php echo esc_attr($theme_row->album_extended_div_padding); ?>"
|
81 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
82 |
+
id="<?php echo sanitize_html_class($params['container_id']); ?>"
|
83 |
+
class="bwg-album-extended bwg-border-box bwg-thumbnails bwg-container bwg-container-<?php echo sanitize_html_class($bwg); ?> bwg-album-thumbnails bwg_album_extended_thumbnails_<?php echo sanitize_html_class($bwg); ?>">
|
84 |
<?php
|
85 |
if ( !$params['album_gallery_rows']['page_nav']['total'] ) {
|
86 |
echo WDWLibrary::message(__('No results found.', BWG()->prefix), 'wd_error');
|
105 |
?>
|
106 |
<div class="bwg-extended-item">
|
107 |
<div class="bwg-extended-item0">
|
108 |
+
<a class="bwg-a bwg-album bwg_album_<?php echo sanitize_html_class($bwg); ?>"
|
109 |
<?php echo ( ($enable_seo || $enable_dynamic_url ) ? "href='" . esc_url($href) . "'" : ""); ?>
|
110 |
style="font-size: 0;"
|
111 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
112 |
+
data-container_id="<?php echo esc_attr($params['container_id']); ?>"
|
113 |
+
data-alb_gal_id="<?php echo (($params['album_gallery_id'] != 0) ? esc_attr($row->alb_gal_id) : esc_attr($row->id)); ?>"
|
114 |
+
data-def_type="<?php echo esc_attr($row->def_type); ?>"
|
115 |
data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
|
116 |
+
<div class="bwg-item0 bwg_album_thumb_<?php echo sanitize_html_class($bwg); ?> <?php echo ($lazyload) ? 'lazy_loader' : ''; ?>">
|
117 |
+
<div class="bwg-item1 bwg_album_thumb_spun1_<?php echo sanitize_html_class($bwg); ?>">
|
118 |
<div class="bwg-item2">
|
119 |
<img class="skip-lazy <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
120 |
+
data-width="<?php echo esc_attr($image_thumb_width); ?>"
|
121 |
+
data-height="<?php echo esc_attr($image_thumb_height); ?>"
|
122 |
+
data-original="<?php echo esc_url($row->preview_image); ?>"
|
123 |
+
src="<?php if( !$lazyload ) { echo esc_url($row->preview_image); } else { echo esc_url(BWG()->plugin_url."/images/lazy_placeholder.gif"); } ?>"
|
124 |
+
alt="<?php echo esc_attr($row->name); ?>" />
|
125 |
</div>
|
126 |
</div>
|
127 |
</div>
|
131 |
<?php
|
132 |
if ( $row->name ) {
|
133 |
?>
|
134 |
+
<a class="bwg-album bwg_album_<?php echo sanitize_html_class($bwg); ?>"
|
135 |
<?php echo ( ($enable_seo || $enable_dynamic_url) ? "href='" . esc_url($href) . "'" : "" ); ?>
|
136 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
137 |
+
data-container_id="<?php echo esc_attr($params['container_id']); ?>"
|
138 |
+
data-alb_gal_id="<?php echo(($params['album_gallery_id'] != 0) ? esc_attr($row->alb_gal_id) : esc_attr($row->id)); ?>"
|
139 |
+
data-def_type="<?php echo esc_attr($row->def_type); ?>"
|
140 |
data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
|
141 |
+
<span class="bwg_title_spun_<?php echo sanitize_html_class($bwg); ?>"><?php echo esc_html($row->name); ?></span>
|
142 |
</a>
|
143 |
<?php
|
144 |
}
|
148 |
$description_short = $description_array[0];
|
149 |
$description_full = $description_array[1];
|
150 |
?>
|
151 |
+
<span class="bwg_description_spun1_<?php echo sanitize_html_class($bwg); ?>">
|
152 |
+
<span class="bwg_description_spun2_<?php echo sanitize_html_class($bwg); ?>">
|
153 |
+
<span class="bwg_description_short_<?php echo sanitize_html_class($bwg); ?>">
|
154 |
+
<?php echo esc_html($description_short); ?>
|
155 |
</span>
|
156 |
<span class="bwg_description_full">
|
157 |
+
<?php echo esc_html($description_full); ?>
|
158 |
</span>
|
159 |
</span>
|
160 |
<span data-more-msg="<?php _e('More', BWG()->prefix); ?>"
|
161 |
data-hide-msg="<?php _e('Hide', BWG()->prefix); ?>"
|
162 |
+
class="bwg_description_more bwg_description_more_<?php echo sanitize_html_class($bwg); ?> bwg_more">
|
163 |
<?php _e('More', BWG()->prefix); ?>
|
164 |
</span>
|
165 |
</span>
|
167 |
}
|
168 |
else {
|
169 |
?>
|
170 |
+
<span class="bwg_description_spun1_<?php echo sanitize_html_class($bwg); ?>">
|
171 |
+
<span class="bwg_description_short_<?php echo sanitize_html_class($bwg); ?>">
|
172 |
+
<?php echo esc_html($row->description); ?>
|
173 |
</span>
|
174 |
</span>
|
175 |
<?php
|
191 |
}
|
192 |
}
|
193 |
?>
|
194 |
+
<input type="hidden" id="bwg_album_breadcrumb_<?php echo sanitize_html_class($bwg); ?>" name="bwg_album_breadcrumb_<?php echo esc_attr($bwg); ?>" value='<?php echo esc_attr($breadcrumb); ?>' />
|
195 |
<?php
|
196 |
|
197 |
$content = ob_get_clean();
|
frontend/views/BWGViewGalleryBox.php
CHANGED
@@ -28,7 +28,6 @@ class BWGViewGalleryBox {
|
|
28 |
$params['sort_by'] = WDWLibrary::esc_script('get', 'sort_by', 'RAND()');
|
29 |
$params['order_by'] = WDWLibrary::esc_script('get', 'order_by', 'asc');
|
30 |
$params['watermark_position'] = explode('-', $params['watermark_position']);
|
31 |
-
|
32 |
if ( !BWG()->is_pro ) {
|
33 |
$params['popup_enable_filmstrip'] = FALSE;
|
34 |
$params['open_comment'] = FALSE;
|
@@ -70,7 +69,7 @@ class BWGViewGalleryBox {
|
|
70 |
$image_filmstrip_height = round($thumb_ratio * $image_filmstrip_width);
|
71 |
}
|
72 |
}
|
73 |
-
$image_rows = $this->model->get_image_rows_data($gallery_id, $bwg, $params['sort_by'], $params['order_by'], $tag);
|
74 |
$image_id = WDWLibrary::get('image_id', $current_image_id, 'intval', 'POST');
|
75 |
$pricelist_id = 0;
|
76 |
if ( BWG()->is_pro && function_exists('BWGEC') && $params['popup_enable_ecommerce'] == 1 ) {
|
@@ -104,7 +103,6 @@ class BWGViewGalleryBox {
|
|
104 |
}
|
105 |
|
106 |
$popup_url = add_query_arg(array($params_array), admin_url('admin-ajax.php'));
|
107 |
-
|
108 |
$filmstrip_thumb_margin = trim($theme_row->lightbox_filmstrip_thumb_margin);
|
109 |
|
110 |
$margins_split = explode(" ", $filmstrip_thumb_margin);
|
@@ -574,7 +572,7 @@ class BWGViewGalleryBox {
|
|
574 |
foreach ($image_rows as $key => $image_row) {
|
575 |
if ($image_row->id == $image_id) {
|
576 |
$current_avg_rating = $image_row->avg_rating;
|
577 |
-
$current_rate = $image_row->rate;
|
578 |
$current_rate_count = $image_row->rate_count;
|
579 |
$current_image_key = $key;
|
580 |
}
|
@@ -620,7 +618,7 @@ class BWGViewGalleryBox {
|
|
620 |
$data[$key]["filetype"] = $image_row->filetype;
|
621 |
$data[$key]["filename"] = $image_row->filename;
|
622 |
$data[$key]["avg_rating"] = $image_row->avg_rating;
|
623 |
-
$data[$key]["rate"] = $image_row->rate;
|
624 |
$data[$key]["rate_count"] = $image_row->rate_count;
|
625 |
$data[$key]["hit_count"] = $image_row->hit_count;
|
626 |
if ( BWG()->is_pro && function_exists('BWGEC') ) {
|
@@ -640,10 +638,10 @@ class BWGViewGalleryBox {
|
|
640 |
$current_pos = 0;
|
641 |
if ( $params['popup_enable_filmstrip'] ) {
|
642 |
?>
|
643 |
-
<div class="bwg_filmstrip_container" data-direction="<?php echo $filmstrip_direction; ?>">
|
644 |
<div class="bwg_filmstrip_left"><i class="<?php echo ($filmstrip_direction == 'horizontal'? 'bwg-icon-angle-left-sm' : 'bwg-icon-angle-up-sm'); ?> "></i></div>
|
645 |
<div class="bwg_filmstrip">
|
646 |
-
<div class="bwg_filmstrip_thumbnails" data-all-images-right-left-space="<?php echo $all_images_right_left_space; ?>" data-all-images-top-bottom-space="<?php echo $all_images_top_bottom_space; ?>">
|
647 |
<?php
|
648 |
foreach ($image_rows as $key => $image_row) {
|
649 |
if ($image_row->id == $current_image_id) {
|
@@ -702,16 +700,16 @@ class BWGViewGalleryBox {
|
|
702 |
$thumb_left = ($_image_filmstrip_width - $image_thumb_width) / 2;
|
703 |
$thumb_top = ($_image_filmstrip_height - $image_thumb_height) / 2;
|
704 |
?>
|
705 |
-
<div id="bwg_filmstrip_thumbnail_<?php echo $key; ?>" class="bwg_filmstrip_thumbnail <?php echo (($image_row->id == $current_image_id) ? 'bwg_thumb_active' : 'bwg_thumb_deactive'); ?>">
|
706 |
<div class="bwg_filmstrip_thumbnail_img_wrap">
|
707 |
<img <?php if( $is_embed || $resolution_thumb ) { ?>
|
708 |
style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" <?php } ?>
|
709 |
class="bwg_filmstrip_thumbnail_img bwg-hidden"
|
710 |
-
data-url="<?php echo ($is_embed ? "" : BWG()->upload_url) . urldecode($image_row->thumb_url); ?>"
|
711 |
src=""
|
712 |
onclick='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")' ontouchend='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")'
|
713 |
-
image_id="<?php echo $image_row->id; ?>"
|
714 |
-
image_key="<?php echo $key; ?>" alt="<?php echo $image_row->alt; ?>" />
|
715 |
</div>
|
716 |
</div>
|
717 |
<?php
|
@@ -734,7 +732,7 @@ class BWGViewGalleryBox {
|
|
734 |
if ($params['watermark_type'] == 'image') {
|
735 |
?>
|
736 |
<a class="bwg-a" href="<?php echo esc_js($params['watermark_link']); ?>" target="_blank">
|
737 |
-
<img class="bwg_watermark_image bwg_watermark" src="<?php echo $params['watermark_url']; ?>" />
|
738 |
</a>
|
739 |
<?php
|
740 |
}
|
@@ -765,7 +763,7 @@ class BWGViewGalleryBox {
|
|
765 |
if ($params['show_image_counts']) {
|
766 |
?>
|
767 |
<span class="bwg_image_count_container bwg_ctrl_btn">
|
768 |
-
<span class="bwg_image_count"><?php echo $current_image_key + 1; ?></span> /
|
769 |
<span><?php echo count($image_rows); ?></span>
|
770 |
</span>
|
771 |
<?php
|
@@ -878,29 +876,33 @@ class BWGViewGalleryBox {
|
|
878 |
</div>
|
879 |
</div>
|
880 |
<?php
|
881 |
-
$
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
<div class="
|
891 |
-
<
|
892 |
-
<span class="
|
893 |
-
<
|
894 |
-
<span
|
895 |
-
<
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
|
|
|
|
|
|
900 |
</span>
|
901 |
-
</
|
902 |
</div>
|
903 |
-
|
|
|
904 |
<div class="bwg_slide_container">
|
905 |
<div class="bwg_slide_bg">
|
906 |
<div class="bwg_slider">
|
@@ -914,7 +916,7 @@ class BWGViewGalleryBox {
|
|
914 |
if ($image_row->id == $current_image_id) {
|
915 |
$current_key = $key;
|
916 |
?>
|
917 |
-
<span class="bwg_popup_image_spun" id="bwg_popup_image" image_id="<?php echo $image_row->id; ?>">
|
918 |
<span class="bwg_popup_image_spun1" style="display: <?php echo ( !$is_embed ? 'table' : 'block' ); ?>;">
|
919 |
<span class="bwg_popup_image_spun2" style="display: <?php echo ( !$is_embed ? 'table-cell' : 'block' ); ?>; ">
|
920 |
<?php
|
@@ -926,8 +928,8 @@ class BWGViewGalleryBox {
|
|
926 |
}
|
927 |
?>
|
928 |
<img class="bwg_popup_image bwg_popup_watermark"
|
929 |
-
src="<?php echo BWG()->upload_url . $image_row->image_url; ?>"
|
930 |
-
alt="<?php echo $image_row->alt; ?>"/>
|
931 |
<?php
|
932 |
if ( $params['popup_enable_zoom'] ) {
|
933 |
?>
|
@@ -971,7 +973,7 @@ class BWGViewGalleryBox {
|
|
971 |
</span>
|
972 |
<span class="bwg_popup_image_second_spun">
|
973 |
</span>
|
974 |
-
<input type="hidden" id="bwg_current_image_key" value="<?php echo $key; ?>" />
|
975 |
<?php
|
976 |
break;
|
977 |
}
|
@@ -980,8 +982,8 @@ class BWGViewGalleryBox {
|
|
980 |
</div>
|
981 |
</div>
|
982 |
</div>
|
983 |
-
<a id="spider_popup_left" <?php echo ($params['enable_loop'] == 0 && $current_key == 0) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_left-ico"><span><i class="bwg_prev_btn <?php echo $theme_row->lightbox_rl_btn_style; ?>-left"></i></span></span></a>
|
984 |
-
<a id="spider_popup_right" <?php echo ($params['enable_loop'] == 0 && $current_key == count($image_rows) - 1) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_right-ico"><span><i class="bwg_next_btn <?php echo $theme_row->lightbox_rl_btn_style; ?>-right"></i></span></span></a>
|
985 |
</div>
|
986 |
</div>
|
987 |
<?php if ( $params['popup_enable_comment'] ) {
|
@@ -997,18 +999,18 @@ class BWGViewGalleryBox {
|
|
997 |
</div>
|
998 |
<div class="bwg_comments bwg_popup_sidebar">
|
999 |
<div title="<?php echo __('Hide Comments', BWG()->prefix); ?>" class="bwg_comments_close bwg_popup_sidebar_close">
|
1000 |
-
<i class="bwg-icon-arrow-<?php echo $theme_row->lightbox_comment_pos; ?> bwg_comments_close_btn bwg_popup_sidebar_close_btn"></i>
|
1001 |
</div>
|
1002 |
-
<form id="bwg_comment_form" method="post" action="<?php echo $popup_url; ?>">
|
1003 |
<p><label for="bwg_name"><?php echo __('Name', BWG()->prefix); ?> </label></p>
|
1004 |
<p><input class="bwg-validate" type="text" name="bwg_name" id="bwg_name" <?php echo ((get_current_user_id() != 0) ? 'readonly="readonly"' : ''); ?>
|
1005 |
-
value="<?php echo ((get_current_user_id() != 0) ? get_userdata(get_current_user_id())->display_name : $bwg_name); ?>" />
|
1006 |
</p>
|
1007 |
<p><span class="bwg_comment_error bwg_comment_name_error"></span></p>
|
1008 |
<?php if ($params['popup_enable_email']) { ?>
|
1009 |
<p><label for="bwg_email"><?php echo __('Email', BWG()->prefix); ?> </label></p>
|
1010 |
<p><input class="bwg-validate" type="text" name="bwg_email" id="bwg_email"
|
1011 |
-
value="<?php echo ((get_current_user_id() != 0) ? get_userdata(get_current_user_id())->user_email : $bwg_email); ?>" /></p>
|
1012 |
<p><span class="bwg_comment_error bwg_comment_email_error"></span></p>
|
1013 |
<?php } ?>
|
1014 |
<p><label for="bwg_comment"><?php echo __('Comment', BWG()->prefix); ?> </label></p>
|
@@ -1054,10 +1056,10 @@ class BWGViewGalleryBox {
|
|
1054 |
</p>
|
1055 |
<p class="bwg_comment_waiting_message"><?php _e('Your comment is awaiting moderation', BWG()->prefix); ?></p>
|
1056 |
<input id="ajax_task" name="ajax_task" type="hidden" value="" />
|
1057 |
-
<input id="image_id"id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
|
1058 |
<input id="comment_id" name="comment_id" type="hidden" value="" />
|
1059 |
-
<input type="hidden" value="<?php echo $params['comment_moderation'] ?>" id="bwg_comment_moderation">
|
1060 |
-
<input type="hidden" value="<?php echo ($params['gdpr_compliance']) ? 0 : $params['popup_enable_captcha']; ?>" id="bwg_popup_enable_captcha">
|
1061 |
</form>
|
1062 |
<div id="bwg_added_comments">
|
1063 |
<?php
|
@@ -1090,13 +1092,13 @@ class BWGViewGalleryBox {
|
|
1090 |
<p title="<?php echo __('Hide Ecommerce', BWG()->prefix); ?>" class="bwg_ecommerce_close bwg_popup_sidebar_close" >
|
1091 |
<i class="bwg-icon-arrow-<?php echo $theme_row->lightbox_comment_pos; ?> bwg_ecommerce_close_btn bwg_popup_sidebar_close_btn"></i>
|
1092 |
</p>
|
1093 |
-
<form id="bwg_ecommerce_form" method="post" action="<?php echo $popup_url; ?>">
|
1094 |
<div class="pge_add_to_cart">
|
1095 |
<div>
|
1096 |
<span class="pge_add_to_cart_title"><?php echo (__('Add to cart', BWG()->prefix)); ?></span>
|
1097 |
</div>
|
1098 |
<div>
|
1099 |
-
<a href="<?php echo get_permalink($options->checkout_page);?>"><?php echo "<span class='products_in_cart'>"
|
1100 |
</div>
|
1101 |
</div>
|
1102 |
<div class="bwg_ecommerce_body">
|
@@ -1125,7 +1127,7 @@ class BWGViewGalleryBox {
|
|
1125 |
<?php if ($pricelist->price) {
|
1126 |
?>
|
1127 |
<p>
|
1128 |
-
<span><?php echo __('Price', BWG()->prefix).': '
|
1129 |
<span class="_product_manual_price"><?php echo number_format((float)$pricelist->price,2)?></span>
|
1130 |
</p>
|
1131 |
<?php
|
@@ -1137,7 +1139,7 @@ class BWGViewGalleryBox {
|
|
1137 |
<div class="product_manual_desc_div">
|
1138 |
<p>
|
1139 |
<span><?php echo __('Description', BWG()->prefix);?>:</span>
|
1140 |
-
<span class="product_manual_desc"><?php echo $pricelist->manual_description;?></span>
|
1141 |
</p>
|
1142 |
</div>
|
1143 |
<?php
|
@@ -1158,43 +1160,43 @@ class BWGViewGalleryBox {
|
|
1158 |
echo '<div class="parameter_row">';
|
1159 |
switch($parameter["type"]){
|
1160 |
case "1" :
|
1161 |
-
echo '<div class="image_selected_parameter" data-parameter-id="'
|
1162 |
-
echo $parameter["title"].": <span class='parameter_single'>". $parameter["values"][0]["parameter_value"]."</span>";
|
1163 |
echo '</div>';
|
1164 |
break;
|
1165 |
case "2" :
|
1166 |
-
echo '<div class="image_selected_parameter" data-parameter-id="'
|
1167 |
-
echo '<label for="parameter_input">'
|
1168 |
-
echo '<input type="text" name="parameter_input'
|
1169 |
echo '</div>';
|
1170 |
break;
|
1171 |
case "3" :
|
1172 |
-
echo '<div class="image_selected_parameter" data-parameter-id="'
|
1173 |
echo '<label for="parameter_textarea">'.$parameter["title"].'</label>';
|
1174 |
-
echo '<textarea name="parameter_textarea'
|
1175 |
echo '</div>';
|
1176 |
break;
|
1177 |
case "4" :
|
1178 |
-
echo '<div class="image_selected_parameter" data-parameter-id="'
|
1179 |
-
echo '<label for="parameter_select">'
|
1180 |
-
echo '<select name="parameter_select'
|
1181 |
echo '<option value="+*0*">-Select-</option>';
|
1182 |
foreach($parameter["values"] as $values){
|
1183 |
$price_addon = $values["parameter_value_price"] == "0" ? "" : ' ('.$values["parameter_value_price_sign"].$options->currency_sign.number_format((float)$values["parameter_value_price"],2).')';
|
1184 |
-
echo '<option value="'
|
1185 |
}
|
1186 |
echo '</select>';
|
1187 |
echo '<input type="hidden" class="already_selected_values">';
|
1188 |
echo '</div>';
|
1189 |
break;
|
1190 |
case "5" :
|
1191 |
-
echo '<div class="image_selected_parameter" data-parameter-id="'
|
1192 |
-
echo '<label>'
|
1193 |
foreach($parameter["values"] as $values){
|
1194 |
$price_addon = $values["parameter_value_price"] == "0" ? "" : ' ('.$values["parameter_value_price_sign"].$options->currency_sign.number_format((float)$values["parameter_value_price"],2).')';
|
1195 |
echo '<div>';
|
1196 |
-
echo '<input type="radio" name="parameter_radio'
|
1197 |
-
echo '<label for="parameter_radio'.$i.'">'
|
1198 |
echo '</div>';
|
1199 |
$i++;
|
1200 |
}
|
@@ -1202,13 +1204,13 @@ class BWGViewGalleryBox {
|
|
1202 |
echo '</div>';
|
1203 |
break;
|
1204 |
case "6" :
|
1205 |
-
echo '<div class="image_selected_parameter" data-parameter-id="'
|
1206 |
-
echo '<label>'
|
1207 |
foreach($parameter["values"] as $values){
|
1208 |
$price_addon = $values["parameter_value_price"] == "0" ? "" : ' ('.$values["parameter_value_price_sign"].$options->currency_sign.number_format((float)$values["parameter_value_price"],2).')';
|
1209 |
echo '<div>';
|
1210 |
-
echo '<input type="checkbox" name="parameter_checkbox'
|
1211 |
-
echo '<label for="parameter_checkbox'.$i.'">'
|
1212 |
echo '</div>';
|
1213 |
$i++;
|
1214 |
}
|
@@ -1225,8 +1227,8 @@ class BWGViewGalleryBox {
|
|
1225 |
</div>
|
1226 |
<?php } ?>
|
1227 |
<p>
|
1228 |
-
<span><b><?php echo __('Total', BWG()->prefix).': '
|
1229 |
-
<b><span class="product_manual_price" data-price="<?php echo $pricelist->price; ?>" data-actual-price="<?php echo $pricelist->price; ?>"><?php echo number_format((float)$pricelist->price,2)?></span></b>
|
1230 |
</p>
|
1231 |
</div>
|
1232 |
</div>
|
@@ -1246,13 +1248,13 @@ class BWGViewGalleryBox {
|
|
1246 |
if(empty($download_items) === false){
|
1247 |
foreach($download_items as $download_item){
|
1248 |
?>
|
1249 |
-
<tr data-price="<?php echo $download_item->item_price; ?>" data-id="<?php echo $download_item->id; ?>">
|
1250 |
-
<td><?php echo $download_item->item_name; ?></td>
|
1251 |
-
<td><?php echo $download_item->item_longest_dimension.'px'; ?></td>
|
1252 |
-
<td class="item_price"><?php echo $options->currency_sign. number_format((float)$download_item->item_price, 2); ?></td>
|
1253 |
<?php if($options->show_digital_items_count == 0){
|
1254 |
?>
|
1255 |
-
<td><input type="checkbox" name="selected_download_item" value="<?php echo $download_item->id; ?>" onchange="changeDownloadsTotal(this);"></td>
|
1256 |
<?php
|
1257 |
}
|
1258 |
else{
|
@@ -1269,7 +1271,7 @@ class BWGViewGalleryBox {
|
|
1269 |
</tbody>
|
1270 |
</table>
|
1271 |
<p>
|
1272 |
-
<span><b><?php echo __('Total', BWG()->prefix).': '
|
1273 |
<b><span class="product_downloads_price">0</span></b>
|
1274 |
</p>
|
1275 |
</div>
|
@@ -1282,11 +1284,11 @@ class BWGViewGalleryBox {
|
|
1282 |
</div>
|
1283 |
<input id="ajax_task" name="ajax_task" type="hidden" value="" />
|
1284 |
<input id="ajax_url" type="hidden" value="<?php echo admin_url('admin-ajax.php'); ?>" />
|
1285 |
-
<input id="type" name="type" type="hidden" value="<?php echo isset($pricelist_sections[0]) ? $pricelist_sections[0] : "" ?>" />
|
1286 |
-
<input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
|
1287 |
<div class="pge_options">
|
1288 |
-
<input type="hidden" name="option_checkout_page" value="<?php echo get_permalink($options->checkout_page);?>">
|
1289 |
-
<input type="hidden" name="option_show_digital_items_count" value="<?php echo $options->show_digital_items_count;?>">
|
1290 |
</div>
|
1291 |
</form>
|
1292 |
</div>
|
@@ -1381,18 +1383,18 @@ class BWGViewGalleryBox {
|
|
1381 |
public function html_comments_block( $row = array() ) {
|
1382 |
ob_start();
|
1383 |
?>
|
1384 |
-
<div id="bwg_comment_block_<?php echo $row->id; ?>" class="bwg_single_comment">
|
1385 |
<p class="bwg_comment_header_p">
|
1386 |
-
<span class="bwg_comment_header"><?php echo $row->name; ?></span>
|
1387 |
<?php if ( current_user_can('manage_options') ) { ?>
|
1388 |
<i onclick="bwg_remove_comment(<?php echo $row->id; ?>); return false;"
|
1389 |
ontouchend="bwg_remove_comment(<?php echo $row->id; ?>); return false;"
|
1390 |
title="<?php _e('Delete Comment', BWG()->prefix); ?>" class="bwg-icon-times bwg_comment_delete_btn"></i>
|
1391 |
<?php } ?>
|
1392 |
-
<span class="bwg_comment_date"><?php echo $row->date; ?></span>
|
1393 |
</p>
|
1394 |
<div class="bwg_comment_body_p">
|
1395 |
-
<span class="bwg_comment_body"><?php echo wpautop($row->comment); ?></span>
|
1396 |
</div>
|
1397 |
</div>
|
1398 |
<?php
|
28 |
$params['sort_by'] = WDWLibrary::esc_script('get', 'sort_by', 'RAND()');
|
29 |
$params['order_by'] = WDWLibrary::esc_script('get', 'order_by', 'asc');
|
30 |
$params['watermark_position'] = explode('-', $params['watermark_position']);
|
|
|
31 |
if ( !BWG()->is_pro ) {
|
32 |
$params['popup_enable_filmstrip'] = FALSE;
|
33 |
$params['open_comment'] = FALSE;
|
69 |
$image_filmstrip_height = round($thumb_ratio * $image_filmstrip_width);
|
70 |
}
|
71 |
}
|
72 |
+
$image_rows = $this->model->get_image_rows_data($gallery_id, $bwg, $params['sort_by'], $params['order_by'], $tag, $params['popup_enable_rate']);
|
73 |
$image_id = WDWLibrary::get('image_id', $current_image_id, 'intval', 'POST');
|
74 |
$pricelist_id = 0;
|
75 |
if ( BWG()->is_pro && function_exists('BWGEC') && $params['popup_enable_ecommerce'] == 1 ) {
|
103 |
}
|
104 |
|
105 |
$popup_url = add_query_arg(array($params_array), admin_url('admin-ajax.php'));
|
|
|
106 |
$filmstrip_thumb_margin = trim($theme_row->lightbox_filmstrip_thumb_margin);
|
107 |
|
108 |
$margins_split = explode(" ", $filmstrip_thumb_margin);
|
572 |
foreach ($image_rows as $key => $image_row) {
|
573 |
if ($image_row->id == $image_id) {
|
574 |
$current_avg_rating = $image_row->avg_rating;
|
575 |
+
$current_rate = isset($image_row->rate) ? $image_row->rate : 0;
|
576 |
$current_rate_count = $image_row->rate_count;
|
577 |
$current_image_key = $key;
|
578 |
}
|
618 |
$data[$key]["filetype"] = $image_row->filetype;
|
619 |
$data[$key]["filename"] = $image_row->filename;
|
620 |
$data[$key]["avg_rating"] = $image_row->avg_rating;
|
621 |
+
$data[$key]["rate"] = isset($image_row->rate) ? $image_row->rate : 0;
|
622 |
$data[$key]["rate_count"] = $image_row->rate_count;
|
623 |
$data[$key]["hit_count"] = $image_row->hit_count;
|
624 |
if ( BWG()->is_pro && function_exists('BWGEC') ) {
|
638 |
$current_pos = 0;
|
639 |
if ( $params['popup_enable_filmstrip'] ) {
|
640 |
?>
|
641 |
+
<div class="bwg_filmstrip_container" data-direction="<?php echo esc_attr($filmstrip_direction); ?>">
|
642 |
<div class="bwg_filmstrip_left"><i class="<?php echo ($filmstrip_direction == 'horizontal'? 'bwg-icon-angle-left-sm' : 'bwg-icon-angle-up-sm'); ?> "></i></div>
|
643 |
<div class="bwg_filmstrip">
|
644 |
+
<div class="bwg_filmstrip_thumbnails" data-all-images-right-left-space="<?php echo esc_attr($all_images_right_left_space); ?>" data-all-images-top-bottom-space="<?php echo esc_attr($all_images_top_bottom_space); ?>">
|
645 |
<?php
|
646 |
foreach ($image_rows as $key => $image_row) {
|
647 |
if ($image_row->id == $current_image_id) {
|
700 |
$thumb_left = ($_image_filmstrip_width - $image_thumb_width) / 2;
|
701 |
$thumb_top = ($_image_filmstrip_height - $image_thumb_height) / 2;
|
702 |
?>
|
703 |
+
<div id="bwg_filmstrip_thumbnail_<?php echo sanitize_html_class($key); ?>" class="bwg_filmstrip_thumbnail <?php echo (($image_row->id == $current_image_id) ? 'bwg_thumb_active' : 'bwg_thumb_deactive'); ?>">
|
704 |
<div class="bwg_filmstrip_thumbnail_img_wrap">
|
705 |
<img <?php if( $is_embed || $resolution_thumb ) { ?>
|
706 |
style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" <?php } ?>
|
707 |
class="bwg_filmstrip_thumbnail_img bwg-hidden"
|
708 |
+
data-url="<?php echo ($is_embed ? "" : esc_url(BWG()->upload_url) . urldecode($image_row->thumb_url)); ?>"
|
709 |
src=""
|
710 |
onclick='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")' ontouchend='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")'
|
711 |
+
image_id="<?php echo esc_attr($image_row->id); ?>"
|
712 |
+
image_key="<?php echo esc_attr($key); ?>" alt="<?php echo esc_attr($image_row->alt); ?>" />
|
713 |
</div>
|
714 |
</div>
|
715 |
<?php
|
732 |
if ($params['watermark_type'] == 'image') {
|
733 |
?>
|
734 |
<a class="bwg-a" href="<?php echo esc_js($params['watermark_link']); ?>" target="_blank">
|
735 |
+
<img class="bwg_watermark_image bwg_watermark" src="<?php echo esc_url($params['watermark_url']); ?>" />
|
736 |
</a>
|
737 |
<?php
|
738 |
}
|
763 |
if ($params['show_image_counts']) {
|
764 |
?>
|
765 |
<span class="bwg_image_count_container bwg_ctrl_btn">
|
766 |
+
<span class="bwg_image_count"><?php echo intval($current_image_key) + 1; ?></span> /
|
767 |
<span><?php echo count($image_rows); ?></span>
|
768 |
</span>
|
769 |
<?php
|
876 |
</div>
|
877 |
</div>
|
878 |
<?php
|
879 |
+
if ( $params['popup_enable_rate'] ) {
|
880 |
+
$data_rated = array(
|
881 |
+
'current_rate' => $current_rate,
|
882 |
+
'current_rate_count' => $current_rate_count,
|
883 |
+
'current_avg_rating' => $current_avg_rating,
|
884 |
+
'current_image_key' => $current_image_key,
|
885 |
+
);
|
886 |
+
$data_rated = json_encode($data_rated);
|
887 |
+
?>
|
888 |
+
<div class="bwg_image_rate_container1">
|
889 |
+
<div class="bwg_image_rate_container2">
|
890 |
+
<span class="bwg_image_rate_spun">
|
891 |
+
<span class="bwg_image_rate">
|
892 |
+
<span class="bwg_image_rate_disabled"></span>
|
893 |
+
<form id="bwg_rate_form" method="post" action="<?php echo $popup_url; ?>">
|
894 |
+
<span id="bwg_star" class="bwg_star" data-score="<?php echo $current_avg_rating; ?>"></span>
|
895 |
+
<span id="bwg_rated" data-params='<?php echo $data_rated; ?>' class="bwg_rated"><?php echo __('Rated.', BWG()->prefix); ?></span>
|
896 |
+
<span id="bwg_hint" class="bwg_hint"></span>
|
897 |
+
<input id="rate_ajax_task" name="ajax_task" type="hidden" value="" />
|
898 |
+
<input id="rate_image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
|
899 |
+
</form>
|
900 |
+
</span>
|
901 |
</span>
|
902 |
+
</div>
|
903 |
</div>
|
904 |
+
<?php
|
905 |
+
} ?>
|
906 |
<div class="bwg_slide_container">
|
907 |
<div class="bwg_slide_bg">
|
908 |
<div class="bwg_slider">
|
916 |
if ($image_row->id == $current_image_id) {
|
917 |
$current_key = $key;
|
918 |
?>
|
919 |
+
<span class="bwg_popup_image_spun" id="bwg_popup_image" image_id="<?php echo esc_attr($image_row->id); ?>">
|
920 |
<span class="bwg_popup_image_spun1" style="display: <?php echo ( !$is_embed ? 'table' : 'block' ); ?>;">
|
921 |
<span class="bwg_popup_image_spun2" style="display: <?php echo ( !$is_embed ? 'table-cell' : 'block' ); ?>; ">
|
922 |
<?php
|
928 |
}
|
929 |
?>
|
930 |
<img class="bwg_popup_image bwg_popup_watermark"
|
931 |
+
src="<?php echo esc_url(BWG()->upload_url . $image_row->image_url); ?>"
|
932 |
+
alt="<?php echo esc_attr($image_row->alt); ?>"/>
|
933 |
<?php
|
934 |
if ( $params['popup_enable_zoom'] ) {
|
935 |
?>
|
973 |
</span>
|
974 |
<span class="bwg_popup_image_second_spun">
|
975 |
</span>
|
976 |
+
<input type="hidden" id="bwg_current_image_key" value="<?php echo esc_attr($key); ?>" />
|
977 |
<?php
|
978 |
break;
|
979 |
}
|
982 |
</div>
|
983 |
</div>
|
984 |
</div>
|
985 |
+
<a id="spider_popup_left" <?php echo ($params['enable_loop'] == 0 && $current_key == 0) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_left-ico"><span><i class="bwg_prev_btn <?php echo sanitize_html_class($theme_row->lightbox_rl_btn_style); ?>-left"></i></span></span></a>
|
986 |
+
<a id="spider_popup_right" <?php echo ($params['enable_loop'] == 0 && $current_key == count($image_rows) - 1) ? 'style="display: none;"' : ''; ?>><span id="spider_popup_right-ico"><span><i class="bwg_next_btn <?php echo sanitize_html_class($theme_row->lightbox_rl_btn_style); ?>-right"></i></span></span></a>
|
987 |
</div>
|
988 |
</div>
|
989 |
<?php if ( $params['popup_enable_comment'] ) {
|
999 |
</div>
|
1000 |
<div class="bwg_comments bwg_popup_sidebar">
|
1001 |
<div title="<?php echo __('Hide Comments', BWG()->prefix); ?>" class="bwg_comments_close bwg_popup_sidebar_close">
|
1002 |
+
<i class="bwg-icon-arrow-<?php echo sanitize_html_class($theme_row->lightbox_comment_pos); ?> bwg_comments_close_btn bwg_popup_sidebar_close_btn"></i>
|
1003 |
</div>
|
1004 |
+
<form id="bwg_comment_form" method="post" action="<?php echo esc_url($popup_url); ?>">
|
1005 |
<p><label for="bwg_name"><?php echo __('Name', BWG()->prefix); ?> </label></p>
|
1006 |
<p><input class="bwg-validate" type="text" name="bwg_name" id="bwg_name" <?php echo ((get_current_user_id() != 0) ? 'readonly="readonly"' : ''); ?>
|
1007 |
+
value="<?php echo ((get_current_user_id() != 0) ? esc_attr(get_userdata(get_current_user_id())->display_name) : esc_attr($bwg_name)); ?>" />
|
1008 |
</p>
|
1009 |
<p><span class="bwg_comment_error bwg_comment_name_error"></span></p>
|
1010 |
<?php if ($params['popup_enable_email']) { ?>
|
1011 |
<p><label for="bwg_email"><?php echo __('Email', BWG()->prefix); ?> </label></p>
|
1012 |
<p><input class="bwg-validate" type="text" name="bwg_email" id="bwg_email"
|
1013 |
+
value="<?php echo ((get_current_user_id() != 0) ? esc_attr(get_userdata(get_current_user_id())->user_email) : esc_attr($bwg_email)); ?>" /></p>
|
1014 |
<p><span class="bwg_comment_error bwg_comment_email_error"></span></p>
|
1015 |
<?php } ?>
|
1016 |
<p><label for="bwg_comment"><?php echo __('Comment', BWG()->prefix); ?> </label></p>
|
1056 |
</p>
|
1057 |
<p class="bwg_comment_waiting_message"><?php _e('Your comment is awaiting moderation', BWG()->prefix); ?></p>
|
1058 |
<input id="ajax_task" name="ajax_task" type="hidden" value="" />
|
1059 |
+
<input id="image_id"id="image_id" name="image_id" type="hidden" value="<?php echo esc_attr($image_id); ?>" />
|
1060 |
<input id="comment_id" name="comment_id" type="hidden" value="" />
|
1061 |
+
<input type="hidden" value="<?php echo esc_attr($params['comment_moderation']) ?>" id="bwg_comment_moderation">
|
1062 |
+
<input type="hidden" value="<?php echo ($params['gdpr_compliance']) ? 0 : esc_attr($params['popup_enable_captcha']); ?>" id="bwg_popup_enable_captcha">
|
1063 |
</form>
|
1064 |
<div id="bwg_added_comments">
|
1065 |
<?php
|
1092 |
<p title="<?php echo __('Hide Ecommerce', BWG()->prefix); ?>" class="bwg_ecommerce_close bwg_popup_sidebar_close" >
|
1093 |
<i class="bwg-icon-arrow-<?php echo $theme_row->lightbox_comment_pos; ?> bwg_ecommerce_close_btn bwg_popup_sidebar_close_btn"></i>
|
1094 |
</p>
|
1095 |
+
<form id="bwg_ecommerce_form" method="post" action="<?php echo esc_url($popup_url); ?>">
|
1096 |
<div class="pge_add_to_cart">
|
1097 |
<div>
|
1098 |
<span class="pge_add_to_cart_title"><?php echo (__('Add to cart', BWG()->prefix)); ?></span>
|
1099 |
</div>
|
1100 |
<div>
|
1101 |
+
<a href="<?php echo esc_url(get_permalink($options->checkout_page));?>"><?php echo "<span class='products_in_cart'>".esc_html($products_in_cart) ."</span> ". __('items', BWG()->prefix); ?></a>
|
1102 |
</div>
|
1103 |
</div>
|
1104 |
<div class="bwg_ecommerce_body">
|
1127 |
<?php if ($pricelist->price) {
|
1128 |
?>
|
1129 |
<p>
|
1130 |
+
<span><?php echo __('Price', BWG()->prefix).': '.esc_html($options->currency_sign);?></span>
|
1131 |
<span class="_product_manual_price"><?php echo number_format((float)$pricelist->price,2)?></span>
|
1132 |
</p>
|
1133 |
<?php
|
1139 |
<div class="product_manual_desc_div">
|
1140 |
<p>
|
1141 |
<span><?php echo __('Description', BWG()->prefix);?>:</span>
|
1142 |
+
<span class="product_manual_desc"><?php echo esc_html($pricelist->manual_description);?></span>
|
1143 |
</p>
|
1144 |
</div>
|
1145 |
<?php
|
1160 |
echo '<div class="parameter_row">';
|
1161 |
switch($parameter["type"]){
|
1162 |
case "1" :
|
1163 |
+
echo '<div class="image_selected_parameter" data-parameter-id="'.esc_attr($parameter_id).'" data-parameter-type = "'.esc_attr($parameter["type"]).'">';
|
1164 |
+
echo $parameter["title"].": <span class='parameter_single'>". esc_html($parameter["values"][0]["parameter_value"])."</span>";
|
1165 |
echo '</div>';
|
1166 |
break;
|
1167 |
case "2" :
|
1168 |
+
echo '<div class="image_selected_parameter" data-parameter-id="'.esc_attr($parameter_id).'" data-parameter-type = "'.esc_attr($parameter["type"]).'">';
|
1169 |
+
echo '<label for="parameter_input">'.esc_html($parameter["title"]).'</label>';
|
1170 |
+
echo '<input type="text" name="parameter_input'.esc_attr($parameter_id).'" id="parameter_input" value="'. esc_attr($parameter["values"][0]["parameter_value"]) .'">';
|
1171 |
echo '</div>';
|
1172 |
break;
|
1173 |
case "3" :
|
1174 |
+
echo '<div class="image_selected_parameter" data-parameter-id="'.esc_attr($parameter_id).'" data-parameter-type = "'.esc_attr($parameter["type"]).'">';
|
1175 |
echo '<label for="parameter_textarea">'.$parameter["title"].'</label>';
|
1176 |
+
echo '<textarea name="parameter_textarea'.esc_attr($parameter_id).'" id="parameter_textarea" >'. esc_html($parameter["values"][0]["parameter_value"]) .'</textarea>';
|
1177 |
echo '</div>';
|
1178 |
break;
|
1179 |
case "4" :
|
1180 |
+
echo '<div class="image_selected_parameter" data-parameter-id="'.esc_attr($parameter_id).'" data-parameter-type = "'.esc_attr($parameter["type"]).'">';
|
1181 |
+
echo '<label for="parameter_select">'.esc_html($parameter["title"]).'</label>';
|
1182 |
+
echo '<select name="parameter_select'.esc_attr($parameter_id).'" id="parameter_select" onchange="onSelectableParametersChange(this)">';
|
1183 |
echo '<option value="+*0*">-Select-</option>';
|
1184 |
foreach($parameter["values"] as $values){
|
1185 |
$price_addon = $values["parameter_value_price"] == "0" ? "" : ' ('.$values["parameter_value_price_sign"].$options->currency_sign.number_format((float)$values["parameter_value_price"],2).')';
|
1186 |
+
echo '<option value="'.esc_attr($values["parameter_value_price_sign"].'*'.$values["parameter_value_price"].'*'.$values["parameter_value"]).'">'.$values["parameter_value"].$price_addon.'</option>';
|
1187 |
}
|
1188 |
echo '</select>';
|
1189 |
echo '<input type="hidden" class="already_selected_values">';
|
1190 |
echo '</div>';
|
1191 |
break;
|
1192 |
case "5" :
|
1193 |
+
echo '<div class="image_selected_parameter" data-parameter-id="'.esc_attr($parameter_id).'" data-parameter-type = "'.esc_attr($parameter["type"]).'">';
|
1194 |
+
echo '<label>'.esc_html($parameter["title"]).'</label>';
|
1195 |
foreach($parameter["values"] as $values){
|
1196 |
$price_addon = $values["parameter_value_price"] == "0" ? "" : ' ('.$values["parameter_value_price_sign"].$options->currency_sign.number_format((float)$values["parameter_value_price"],2).')';
|
1197 |
echo '<div>';
|
1198 |
+
echo '<input type="radio" name="parameter_radio'.esc_attr($parameter_id).'" id="parameter_radio'.$i.'" value="'.esc_attr($values["parameter_value_price_sign"].'*'.$values["parameter_value_price"].'*'.$values["parameter_value"]).'" onchange="onSelectableParametersChange(this)">';
|
1199 |
+
echo '<label for="parameter_radio'.$i.'">'.esc_html($values["parameter_value"].$price_addon).'</label>';
|
1200 |
echo '</div>';
|
1201 |
$i++;
|
1202 |
}
|
1204 |
echo '</div>';
|
1205 |
break;
|
1206 |
case "6" :
|
1207 |
+
echo '<div class="image_selected_parameter" data-parameter-id="'.esc_attr($parameter_id).'" data-parameter-type = "'.esc_attr($parameter["type"]).'">';
|
1208 |
+
echo '<label>'.esc_html($parameter["title"]).'</label>';
|
1209 |
foreach($parameter["values"] as $values){
|
1210 |
$price_addon = $values["parameter_value_price"] == "0" ? "" : ' ('.$values["parameter_value_price_sign"].$options->currency_sign.number_format((float)$values["parameter_value_price"],2).')';
|
1211 |
echo '<div>';
|
1212 |
+
echo '<input type="checkbox" name="parameter_checkbox'.esc_attr($parameter_id).'" id="parameter_checkbox'.$i.'" value="'.esc_attr($values["parameter_value_price_sign"].'*'.$values["parameter_value_price"].'*'.$values["parameter_value"]).'" onchange="onSelectableParametersChange(this)">';
|
1213 |
+
echo '<label for="parameter_checkbox'.$i.'">'.esc_html($values["parameter_value"].$price_addon).'</label>';
|
1214 |
echo '</div>';
|
1215 |
$i++;
|
1216 |
}
|
1227 |
</div>
|
1228 |
<?php } ?>
|
1229 |
<p>
|
1230 |
+
<span><b><?php echo __('Total', BWG()->prefix).': '.esc_html($options->currency_sign);?></b></span>
|
1231 |
+
<b><span class="product_manual_price" data-price="<?php echo esc_attr($pricelist->price); ?>" data-actual-price="<?php echo esc_attr($pricelist->price); ?>"><?php echo number_format((float)$pricelist->price,2)?></span></b>
|
1232 |
</p>
|
1233 |
</div>
|
1234 |
</div>
|
1248 |
if(empty($download_items) === false){
|
1249 |
foreach($download_items as $download_item){
|
1250 |
?>
|
1251 |
+
<tr data-price="<?php echo esc_attr($download_item->item_price); ?>" data-id="<?php echo esc_attr($download_item->id); ?>">
|
1252 |
+
<td><?php echo esc_html($download_item->item_name); ?></td>
|
1253 |
+
<td><?php echo esc_html($download_item->item_longest_dimension.'px'); ?></td>
|
1254 |
+
<td class="item_price"><?php echo esc_html($options->currency_sign. number_format((float)$download_item->item_price, 2)); ?></td>
|
1255 |
<?php if($options->show_digital_items_count == 0){
|
1256 |
?>
|
1257 |
+
<td><input type="checkbox" name="selected_download_item" value="<?php echo esc_attr($download_item->id); ?>" onchange="changeDownloadsTotal(this);"></td>
|
1258 |
<?php
|
1259 |
}
|
1260 |
else{
|
1271 |
</tbody>
|
1272 |
</table>
|
1273 |
<p>
|
1274 |
+
<span><b><?php echo __('Total', BWG()->prefix).': '.esc_html($options->currency_sign);?></b></span>
|
1275 |
<b><span class="product_downloads_price">0</span></b>
|
1276 |
</p>
|
1277 |
</div>
|
1284 |
</div>
|
1285 |
<input id="ajax_task" name="ajax_task" type="hidden" value="" />
|
1286 |
<input id="ajax_url" type="hidden" value="<?php echo admin_url('admin-ajax.php'); ?>" />
|
1287 |
+
<input id="type" name="type" type="hidden" value="<?php echo isset($pricelist_sections[0]) ? esc_attr($pricelist_sections[0]) : "" ?>" />
|
1288 |
+
<input id="image_id" name="image_id" type="hidden" value="<?php echo esc_attr($image_id); ?>" />
|
1289 |
<div class="pge_options">
|
1290 |
+
<input type="hidden" name="option_checkout_page" value="<?php echo esc_attr(get_permalink($options->checkout_page));?>">
|
1291 |
+
<input type="hidden" name="option_show_digital_items_count" value="<?php echo esc_attr($options->show_digital_items_count);?>">
|
1292 |
</div>
|
1293 |
</form>
|
1294 |
</div>
|
1383 |
public function html_comments_block( $row = array() ) {
|
1384 |
ob_start();
|
1385 |
?>
|
1386 |
+
<div id="bwg_comment_block_<?php echo sanitize_html_class($row->id); ?>" class="bwg_single_comment">
|
1387 |
<p class="bwg_comment_header_p">
|
1388 |
+
<span class="bwg_comment_header"><?php echo esc_html($row->name); ?></span>
|
1389 |
<?php if ( current_user_can('manage_options') ) { ?>
|
1390 |
<i onclick="bwg_remove_comment(<?php echo $row->id; ?>); return false;"
|
1391 |
ontouchend="bwg_remove_comment(<?php echo $row->id; ?>); return false;"
|
1392 |
title="<?php _e('Delete Comment', BWG()->prefix); ?>" class="bwg-icon-times bwg_comment_delete_btn"></i>
|
1393 |
<?php } ?>
|
1394 |
+
<span class="bwg_comment_date"><?php echo esc_html($row->date); ?></span>
|
1395 |
</p>
|
1396 |
<div class="bwg_comment_body_p">
|
1397 |
+
<span class="bwg_comment_body"><?php echo html_entity_decode(wpautop($row->comment)); ?></span>
|
1398 |
</div>
|
1399 |
</div>
|
1400 |
<?php
|
frontend/views/BWGViewImage_browser.php
CHANGED
@@ -34,14 +34,14 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
34 |
$show_watermark = TRUE;
|
35 |
$params['watermark_width'] = 0;
|
36 |
$watermark_a = 'bwg_watermark_text_' . $bwg;
|
37 |
-
$watermark_div = 'class="bwg_image_browser_watermark_text_' . $bwg . '"';
|
38 |
-
$watermark_image_or_text = $params["watermark_text"];
|
39 |
}
|
40 |
elseif ( $params['watermark_type'] == 'image' ) {
|
41 |
$show_watermark = TRUE;
|
42 |
-
$watermark_image_or_text = '<img class="bwg_image_browser_watermark_img_' . $bwg . '" src="' . urldecode($params['watermark_url']) . '" />';
|
43 |
$watermark_a = '';
|
44 |
-
$watermark_div = 'class="bwg_image_browser_watermark_' . $bwg . '"';
|
45 |
$params['watermark_font'] = '';
|
46 |
$params['watermark_color'] = '';
|
47 |
$params['watermark_font_size'] = '';
|
@@ -54,15 +54,15 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
54 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
55 |
}
|
56 |
else {
|
57 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
58 |
}
|
59 |
}
|
60 |
else {
|
61 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
62 |
}
|
63 |
}
|
64 |
else {
|
65 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
66 |
}
|
67 |
$bwg_param = array(
|
68 |
'is_pro' => BWG()->is_pro,
|
@@ -72,11 +72,11 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
72 |
$bwg_params = json_encode($bwg_param);
|
73 |
ob_start();
|
74 |
?>
|
75 |
-
<div id="bwg_<?php echo $params['gallery_type'] . '_' . $bwg ?>" class="image_browser_images_conteiner_<?php echo $bwg; ?> bwg-image_browser-images-wrapper bwg-container"
|
76 |
-
data-params='<?php echo $bwg_params ?>'
|
77 |
-
data-bwg="<?php echo $bwg; ?>"
|
78 |
-
data-lightbox-url="<?php echo addslashes(add_query_arg($params['params_array'], admin_url('admin-ajax.php'))); ?>">
|
79 |
-
<div class="image_browser_images_<?php echo $bwg; ?>">
|
80 |
<?php
|
81 |
foreach ( $images as $image_row ) {
|
82 |
$params['image_id'] = WDWLibrary::get('image_id', $image_row->id, 'intval');
|
@@ -84,28 +84,28 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
84 |
$is_embed_16x9 = ((preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE) && (preg_match('/VIDEO/', $image_row->filetype) == 1 ? TRUE : FALSE) && !(preg_match('/INSTAGRAM/', $image_row->filetype) == 1 ? TRUE : FALSE));
|
85 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
86 |
?>
|
87 |
-
<div class="image_browser_image_buttons_conteiner_<?php echo $bwg; ?>">
|
88 |
-
<div class="image_browser_image_buttons_<?php echo $bwg; ?>">
|
89 |
<?php
|
90 |
if ( $image_title && ($image_browser_image_title_align == 'top') ) {
|
91 |
?>
|
92 |
-
<div class="bwg_image_browser_image_alt_<?php echo $bwg; ?>">
|
93 |
-
<div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
|
94 |
<?php echo html_entity_decode($image_row->alt); ?>
|
95 |
</div>
|
96 |
</div>
|
97 |
<?php
|
98 |
}
|
99 |
?>
|
100 |
-
<div class="bwg_image_browser_image_<?php echo $bwg; ?>">
|
101 |
<?php
|
102 |
if ( $show_watermark ) {
|
103 |
?>
|
104 |
-
<div class="bwg_image_browser_image_contain_<?php echo $bwg; ?>" id="bwg_image_browser_image_contain_<?php echo $image_row->id ?>">
|
105 |
-
<div class="bwg_image_browser_watermark_contain_<?php echo $bwg; ?>">
|
106 |
-
<div class="bwg_image_browser_watermark_cont_<?php echo $bwg; ?>">
|
107 |
<div <?php echo $watermark_div; ?> >
|
108 |
-
<a class="bwg_none_selectable <?php echo $watermark_a; ?>" id="watermark_a<?php echo $image_row->id; ?>" href="<?php echo urldecode($params['watermark_link']); ?>" target="_blank">
|
109 |
<?php echo $watermark_image_or_text; ?>
|
110 |
</a>
|
111 |
</div>
|
@@ -116,11 +116,11 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
116 |
}
|
117 |
if ( !$is_embed ) {
|
118 |
?>
|
119 |
-
<a style="position:relative;" <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg-a bwg_lightbox" data-image-id="' . $image_row->id . '" data-elementor-open-lightbox="no"') : ('class="bwg-a" ' . ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : ''))) ?>>
|
120 |
-
<img class="skip-lazy bwg-item0 bwg_image_browser_img bwg_image_browser_img_<?php echo $bwg; ?> <?php if( $lazyload ) { ?> bwg_lazyload lazy_loader<?php } ?>"
|
121 |
-
src="<?php if( !$lazyload ) { echo BWG()->upload_url . $image_row->image_url; } else { echo BWG()->plugin_url."/images/lazy_placeholder.gif"; } ?>"
|
122 |
-
data-original="<?php echo BWG()->upload_url . $image_row->image_url; ?>"
|
123 |
-
alt="<?php echo $image_row->alt; ?>" />
|
124 |
</a>
|
125 |
<?php
|
126 |
}
|
@@ -156,7 +156,7 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
156 |
}
|
157 |
else {/*for instagram image, video and flickr enable lightbox onclick*/
|
158 |
?>
|
159 |
-
<a style="position:relative;" <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox bwg_lightbox_' . $bwg . '" data-image-id="' . $image_row->id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
160 |
<?php
|
161 |
WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->image_url, $image_row->filename, array(
|
162 |
'id' => "bwg_embed_frame_" . $bwg,
|
@@ -178,8 +178,8 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
178 |
<?php
|
179 |
if ( $image_title && ($image_browser_image_title_align == 'bottom') ) {
|
180 |
?>
|
181 |
-
<div class="bwg_image_browser_image_alt_<?php echo $bwg; ?>">
|
182 |
-
<div class="bwg_image_alt_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
|
183 |
<?php echo html_entity_decode($image_row->alt); ?>
|
184 |
</div>
|
185 |
</div>
|
@@ -187,8 +187,8 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
187 |
}
|
188 |
if ( $enable_image_description && ($image_row->description != "") ) {
|
189 |
?>
|
190 |
-
<div class="bwg_image_browser_image_desp_<?php echo $bwg; ?>">
|
191 |
-
<div class="bwg_image_browser_image_description_<?php echo $bwg; ?>" id="alt<?php echo $image_row->id; ?>">
|
192 |
<?php echo html_entity_decode($image_row->description); ?>
|
193 |
</div>
|
194 |
</div>
|
34 |
$show_watermark = TRUE;
|
35 |
$params['watermark_width'] = 0;
|
36 |
$watermark_a = 'bwg_watermark_text_' . $bwg;
|
37 |
+
$watermark_div = 'class="bwg_image_browser_watermark_text_' . sanitize_html_class($bwg) . '"';
|
38 |
+
$watermark_image_or_text = esc_html($params["watermark_text"]);
|
39 |
}
|
40 |
elseif ( $params['watermark_type'] == 'image' ) {
|
41 |
$show_watermark = TRUE;
|
42 |
+
$watermark_image_or_text = '<img class="bwg_image_browser_watermark_img_' . sanitize_html_class($bwg) . '" src="' . urldecode($params['watermark_url']) . '" />';
|
43 |
$watermark_a = '';
|
44 |
+
$watermark_div = 'class="bwg_image_browser_watermark_' . sanitize_html_class($bwg) . '"';
|
45 |
$params['watermark_font'] = '';
|
46 |
$params['watermark_color'] = '';
|
47 |
$params['watermark_font_size'] = '';
|
54 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
55 |
}
|
56 |
else {
|
57 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
58 |
}
|
59 |
}
|
60 |
else {
|
61 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
62 |
}
|
63 |
}
|
64 |
else {
|
65 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
66 |
}
|
67 |
$bwg_param = array(
|
68 |
'is_pro' => BWG()->is_pro,
|
72 |
$bwg_params = json_encode($bwg_param);
|
73 |
ob_start();
|
74 |
?>
|
75 |
+
<div id="bwg_<?php echo sanitize_html_class($params['gallery_type'] . '_' . $bwg) ?>" class="image_browser_images_conteiner_<?php echo sanitize_html_class($bwg); ?> bwg-image_browser-images-wrapper bwg-container"
|
76 |
+
data-params='<?php echo esc_attr($bwg_params) ?>'
|
77 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
78 |
+
data-lightbox-url="<?php echo esc_url(addslashes(add_query_arg($params['params_array'], admin_url('admin-ajax.php')))); ?>">
|
79 |
+
<div class="image_browser_images_<?php echo sanitize_html_class($bwg); ?>">
|
80 |
<?php
|
81 |
foreach ( $images as $image_row ) {
|
82 |
$params['image_id'] = WDWLibrary::get('image_id', $image_row->id, 'intval');
|
84 |
$is_embed_16x9 = ((preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE) && (preg_match('/VIDEO/', $image_row->filetype) == 1 ? TRUE : FALSE) && !(preg_match('/INSTAGRAM/', $image_row->filetype) == 1 ? TRUE : FALSE));
|
85 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
86 |
?>
|
87 |
+
<div class="image_browser_image_buttons_conteiner_<?php echo sanitize_html_class($bwg); ?>">
|
88 |
+
<div class="image_browser_image_buttons_<?php echo sanitize_html_class($bwg); ?>">
|
89 |
<?php
|
90 |
if ( $image_title && ($image_browser_image_title_align == 'top') ) {
|
91 |
?>
|
92 |
+
<div class="bwg_image_browser_image_alt_<?php echo sanitize_html_class($bwg); ?>">
|
93 |
+
<div class="bwg_image_alt_<?php echo sanitize_html_class($bwg); ?>" id="alt<?php echo sanitize_html_class($image_row->id); ?>">
|
94 |
<?php echo html_entity_decode($image_row->alt); ?>
|
95 |
</div>
|
96 |
</div>
|
97 |
<?php
|
98 |
}
|
99 |
?>
|
100 |
+
<div class="bwg_image_browser_image_<?php echo sanitize_html_class($bwg); ?>">
|
101 |
<?php
|
102 |
if ( $show_watermark ) {
|
103 |
?>
|
104 |
+
<div class="bwg_image_browser_image_contain_<?php echo sanitize_html_class($bwg); ?>" id="bwg_image_browser_image_contain_<?php echo sanitize_html_class($image_row->id) ?>">
|
105 |
+
<div class="bwg_image_browser_watermark_contain_<?php echo sanitize_html_class($bwg); ?>">
|
106 |
+
<div class="bwg_image_browser_watermark_cont_<?php echo sanitize_html_class($bwg); ?>">
|
107 |
<div <?php echo $watermark_div; ?> >
|
108 |
+
<a class="bwg_none_selectable <?php echo sanitize_html_class($watermark_a); ?>" id="watermark_a<?php echo sanitize_html_class($image_row->id); ?>" href="<?php echo urldecode($params['watermark_link']); ?>" target="_blank">
|
109 |
<?php echo $watermark_image_or_text; ?>
|
110 |
</a>
|
111 |
</div>
|
116 |
}
|
117 |
if ( !$is_embed ) {
|
118 |
?>
|
119 |
+
<a style="position:relative;" <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg-a bwg_lightbox" data-image-id="' . esc_attr($image_row->id) . '" data-elementor-open-lightbox="no"') : ('class="bwg-a" ' . ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . esc_url($image_row->redirect_url) . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : ''))) ?>>
|
120 |
+
<img class="skip-lazy bwg-item0 bwg_image_browser_img bwg_image_browser_img_<?php echo sanitize_html_class($bwg); ?> <?php if( $lazyload ) { ?> bwg_lazyload lazy_loader<?php } ?>"
|
121 |
+
src="<?php if( !$lazyload ) { echo esc_url(BWG()->upload_url . $image_row->image_url); } else { echo esc_url(BWG()->plugin_url."/images/lazy_placeholder.gif"); } ?>"
|
122 |
+
data-original="<?php echo esc_url(BWG()->upload_url . $image_row->image_url); ?>"
|
123 |
+
alt="<?php echo esc_attr($image_row->alt); ?>" />
|
124 |
</a>
|
125 |
<?php
|
126 |
}
|
156 |
}
|
157 |
else {/*for instagram image, video and flickr enable lightbox onclick*/
|
158 |
?>
|
159 |
+
<a style="position:relative;" <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox bwg_lightbox_' . sanitize_html_class($bwg) . '" data-image-id="' . esc_attr($image_row->id) . '"') : ($image_row->redirect_url ? 'href="' . esc_url($image_row->redirect_url) . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
160 |
<?php
|
161 |
WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->image_url, $image_row->filename, array(
|
162 |
'id' => "bwg_embed_frame_" . $bwg,
|
178 |
<?php
|
179 |
if ( $image_title && ($image_browser_image_title_align == 'bottom') ) {
|
180 |
?>
|
181 |
+
<div class="bwg_image_browser_image_alt_<?php echo sanitize_html_class($bwg); ?>">
|
182 |
+
<div class="bwg_image_alt_<?php echo sanitize_html_class($bwg); ?>" id="alt<?php echo esc_attr($image_row->id); ?>">
|
183 |
<?php echo html_entity_decode($image_row->alt); ?>
|
184 |
</div>
|
185 |
</div>
|
187 |
}
|
188 |
if ( $enable_image_description && ($image_row->description != "") ) {
|
189 |
?>
|
190 |
+
<div class="bwg_image_browser_image_desp_<?php echo sanitize_html_class($bwg); ?>">
|
191 |
+
<div class="bwg_image_browser_image_description_<?php echo sanitize_html_class($bwg); ?>" id="alt<?php echo esc_attr($image_row->id); ?>">
|
192 |
<?php echo html_entity_decode($image_row->description); ?>
|
193 |
</div>
|
194 |
</div>
|
frontend/views/BWGViewSlideshow.php
CHANGED
@@ -104,11 +104,11 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
104 |
}
|
105 |
}
|
106 |
else {
|
107 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
108 |
}
|
109 |
}
|
110 |
else {
|
111 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
112 |
}
|
113 |
|
114 |
$data = array();
|
@@ -174,19 +174,19 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
174 |
'enable_slideshow_music' => $enable_slideshow_music,
|
175 |
);
|
176 |
?>
|
177 |
-
<div class="bwg_slideshow_image_wrap_<?php echo $bwg; ?> bwg-slideshow-images-wrapper bwg-container"
|
178 |
-
data-bwg="<?php echo $bwg; ?>"
|
179 |
-
data-lightbox-url="<?php echo addslashes(add_query_arg($params['params_array'], admin_url('admin-ajax.php'))); ?>">
|
180 |
<?php
|
181 |
$current_pos = 0;
|
182 |
if ( $enable_slideshow_filmstrip ) {
|
183 |
?>
|
184 |
-
<div class="bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>">
|
185 |
-
<div class="bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>">
|
186 |
<i class="<?php echo($filmstrip_direction == 'horizontal' ? 'bwg-icon-angle-left' : 'bwg-icon-angle-up'); ?>"></i>
|
187 |
</div>
|
188 |
-
<div class="bwg_slideshow_filmstrip_<?php echo $bwg; ?> bwg_slideshow_filmstrip">
|
189 |
-
<div class="bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>">
|
190 |
<?php
|
191 |
foreach ( $image_rows as $key => $image_row ) {
|
192 |
if ( $image_row->id == $current_image_id ) {
|
@@ -196,6 +196,7 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
196 |
$is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
197 |
$is_embed_video = ($is_embed && preg_match('/_VIDEO/', $image_row->filetype) == 1) ? TRUE : FALSE;
|
198 |
$is_embed_instagram = preg_match('/EMBED_OEMBED_INSTAGRAM/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
|
|
199 |
if ( $play_pause_button_display === 'undefined' ) {
|
200 |
if ( $is_embed_video ) {
|
201 |
$play_pause_button_display = 'none';
|
@@ -249,22 +250,22 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
249 |
$thumb_left = ($slideshow_filmstrip_width - $image_thumb_width) / 2;
|
250 |
$thumb_top = ($slideshow_filmstrip_height - $image_thumb_height) / 2;
|
251 |
?>
|
252 |
-
<div id="bwg_filmstrip_thumbnail_<?php echo $key
|
253 |
<img style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;"
|
254 |
-
class="skip-lazy bwg_filmstrip_thumbnail_img bwg_slideshow_filmstrip_thumbnail_img_<?php echo $bwg; ?> <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
255 |
-
src="<?php if( !$lazyload ) { echo
|
256 |
-
data-original="<?php echo
|
257 |
onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), '<?php echo $key; ?>', '', '', '<?php echo $bwg; ?>')"
|
258 |
-
image_id="<?php echo $image_row->id; ?>"
|
259 |
-
image_key="<?php echo $key; ?>"
|
260 |
-
alt="<?php echo $image_row->alt; ?>" />
|
261 |
</div>
|
262 |
<?php
|
263 |
}
|
264 |
?>
|
265 |
</div>
|
266 |
</div>
|
267 |
-
<div class="bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>">
|
268 |
<i class="<?php echo($filmstrip_direction == 'horizontal' ? 'bwg-icon-angle-right' : 'bwg-icon-angle-down'); ?>"></i>
|
269 |
</div>
|
270 |
</div>
|
@@ -272,8 +273,8 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
272 |
}
|
273 |
else {
|
274 |
?>
|
275 |
-
<div class="bwg_slideshow_dots_container_<?php echo $bwg; ?>">
|
276 |
-
<div class="bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>">
|
277 |
<?php
|
278 |
foreach ( $image_rows as $key => $image_row ) {
|
279 |
if ( $image_row->id == $current_image_id ) {
|
@@ -281,7 +282,7 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
281 |
$current_key = $key;
|
282 |
}
|
283 |
?>
|
284 |
-
<span id="bwg_dots_<?php echo $key
|
285 |
<?php
|
286 |
}
|
287 |
?>
|
@@ -292,10 +293,10 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
292 |
$bwg_param['bwg_current_filmstrip_pos'] = $current_pos;
|
293 |
$bwg_params = json_encode($bwg_param);
|
294 |
?>
|
295 |
-
<div id="bwg_slideshow_image_container_<?php echo $bwg; ?>" class="bwg_slideshow_image_container_<?php echo $bwg; ?>" data-params='<?php echo $bwg_params; ?>'>
|
296 |
-
<div class="bwg_slide_container_<?php echo $bwg; ?>">
|
297 |
-
<div class="bwg_slide_bg_<?php echo $bwg; ?>">
|
298 |
-
<div class="bwg_slider_<?php echo $bwg; ?>">
|
299 |
<?php
|
300 |
foreach ( $image_rows as $key => $image_row ) {
|
301 |
$is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
@@ -304,25 +305,25 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
304 |
if ( $image_row->id == $current_image_id ) {
|
305 |
$current_key = $key;
|
306 |
?>
|
307 |
-
<span class="bwg_slideshow_image_spun_<?php echo $bwg; ?>" id="image_id_<?php echo $bwg
|
308 |
-
<span class="bwg_slideshow_image_spun1_<?php echo $bwg; ?>">
|
309 |
-
<span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
|
310 |
<?php
|
311 |
if ( !$is_embed ) {
|
312 |
?>
|
313 |
-
<a <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg-a bwg_lightbox"' . (BWG()->options->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '" data-elementor-open-lightbox="no"') : ('class="bwg-a" ' . ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : ''))); ?>>
|
314 |
-
<img id="bwg_slideshow_image_<?php echo $bwg; ?>"
|
315 |
-
class="skip-lazy bwg_slide bwg_slideshow_image_<?php echo $bwg; ?> <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
316 |
-
src="<?php if( !$lazyload ) { echo BWG()->upload_url . $image_row->image_url; } else { echo BWG()->plugin_url."/images/lazy_placeholder.gif"; } ?>"
|
317 |
-
data-original="<?php echo BWG()->upload_url . $image_row->image_url; ?>"
|
318 |
-
image_id="<?php echo $image_row->id; ?>"
|
319 |
-
alt="<?php echo $image_row->alt; ?>" />
|
320 |
</a>
|
321 |
<?php
|
322 |
}
|
323 |
else { /*$is_embed*/
|
324 |
?>
|
325 |
-
<span id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_embed_<?php echo $bwg; ?>" image_id="<?php echo $image_row->id; ?>">
|
326 |
<?php echo $is_embed_instagram_video ? '<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><span class="bwg_inst_play"></span></span>' : '';
|
327 |
if ( $is_embed_instagram_post ) {
|
328 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
@@ -365,32 +366,32 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
365 |
</span>
|
366 |
</span>
|
367 |
</span>
|
368 |
-
<span class="bwg_slideshow_image_second_spun_<?php echo $bwg; ?>">
|
369 |
</span>
|
370 |
-
<input type="hidden" id="bwg_current_image_key_<?php echo $bwg; ?>" value="<?php echo $key; ?>" />
|
371 |
<?php
|
372 |
break;
|
373 |
}
|
374 |
else {
|
375 |
?>
|
376 |
-
<span class="bwg_slideshow_image_second_spun_<?php echo $bwg; ?>" id="image_id_<?php echo $bwg
|
377 |
-
<span class="bwg_slideshow_image_spun1_<?php echo $bwg; ?>">
|
378 |
-
<span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
|
379 |
<?php
|
380 |
if ( !$is_embed ) {
|
381 |
?>
|
382 |
-
<a <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg-a bwg_lightbox_' . $bwg . '"' . (BWG()->options->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '"') : ('class="bwg-a" ' . ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : ''))) ?>>
|
383 |
-
<img id="bwg_slideshow_image_<?php echo $bwg; ?>"
|
384 |
-
class="skip-lazy bwg_slide bwg_slideshow_image_<?php echo $bwg; ?> <?php if( $lazyload ) { ?> bwg_lazyload lazy_loader <?php } ?>"
|
385 |
-
src="<?php if( !$lazyload ) { echo BWG()->upload_url . $image_row->image_url; } else { echo BWG()->plugin_url."/images/lazy_placeholder.gif"; } ?>"
|
386 |
-
data-original="<?php echo BWG()->upload_url . $image_row->image_url; ?>"
|
387 |
-
image_id="<?php echo $image_row->id; ?>"
|
388 |
-
alt="<?php echo $image_row->alt; ?>" />
|
389 |
</a>
|
390 |
<?php
|
391 |
}
|
392 |
else { /*$is_embed*/ ?>
|
393 |
-
<span class="bwg_slideshow_embed_<?php echo $bwg; ?>">
|
394 |
<?php
|
395 |
if ( $is_embed_instagram_post ) {
|
396 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
@@ -443,9 +444,9 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
443 |
<?php
|
444 |
if ( $enable_slideshow_ctrl ) {
|
445 |
?>
|
446 |
-
<a class="bwg-a" id="spider_slideshow_left_<?php echo $bwg; ?>" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) + <?php echo count($data[$bwg]); ?> - bwg_iterator(<?php echo $bwg; ?>)) % <?php echo count($data[$bwg]); ?>, '', '', <?php echo $bwg; ?>); return false;"><span id="spider_slideshow_left-ico_<?php echo $bwg; ?>"><span><i class="<?php echo $theme_row->slideshow_rl_btn_style; ?>-left bwg_slideshow_prev_btn_<?php echo $bwg; ?>"></i></span></span></a>
|
447 |
-
<span id="bwg_slideshow_play_pause_<?php echo $bwg; ?>" class="bwg_slideshow_play_pause" style="display: <?php echo $play_pause_button_display; ?>;"><span><span id="bwg_slideshow_play_pause-ico_<?php echo $bwg; ?>"><i class="bwg-icon-play bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?>"></i></span></span></span>
|
448 |
-
<a class="bwg-a" id="spider_slideshow_right_<?php echo $bwg; ?>" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) + bwg_iterator(<?php echo $bwg; ?>)) % <?php echo count($data[$bwg]); ?>, '', '', <?php echo $bwg; ?>); return false;"><span id="spider_slideshow_right-ico_<?php echo $bwg; ?>"><span><i class="<?php echo $theme_row->slideshow_rl_btn_style; ?>-right bwg_slideshow_next_btn_<?php echo $bwg; ?>"></i></span></span></a>
|
449 |
<?php
|
450 |
}
|
451 |
?>
|
@@ -453,21 +454,21 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
453 |
<?php
|
454 |
if ( $params['watermark_type'] != 'none' ) {
|
455 |
?>
|
456 |
-
<div class="bwg_slideshow_image_container_<?php echo $bwg; ?> bwg_slideshow_image_container" data-params="<?php echo $bwg_params; ?>">
|
457 |
-
<div class="bwg_slideshow_watermark_container_<?php echo $bwg; ?>">
|
458 |
<div>
|
459 |
-
<span class="bwg_slideshow_watermark_spun_<?php echo $bwg; ?>" id="bwg_slideshow_watermark_container_<?php echo $bwg; ?>">
|
460 |
<?php
|
461 |
if ( $params['watermark_type'] == 'image' ) {
|
462 |
?>
|
463 |
<a class="bwg-a" href="<?php echo urldecode($watermark_link); ?>" target="_blank">
|
464 |
-
<img class="bwg_slideshow_watermark_image_<?php echo $bwg; ?> bwg_slideshow_watermark_<?php echo $bwg; ?>" src="<?php echo urldecode($watermark_url); ?>" />
|
465 |
</a>
|
466 |
<?php
|
467 |
}
|
468 |
elseif ( $params['watermark_type'] == 'text' ) {
|
469 |
?>
|
470 |
-
<a class="bwg_none_selectable_<?php echo $bwg; ?> bwg_slideshow_watermark_text_<?php echo $bwg; ?> bwg_slideshow_watermark_<?php echo $bwg; ?>" target="_blank" href="<?php echo urldecode($watermark_link); ?>"><?php echo $params['watermark_text']; ?></a>
|
471 |
<?php
|
472 |
}
|
473 |
?>
|
@@ -479,11 +480,11 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
479 |
}
|
480 |
if ( $enable_image_title ) {
|
481 |
?>
|
482 |
-
<div class="bwg_slideshow_image_container_<?php echo $bwg; ?> bwg_slideshow_image_container" data-params="<?php echo $bwg_params; ?>">
|
483 |
-
<div class="bwg_slideshow_watermark_container_<?php echo $bwg; ?>">
|
484 |
<div>
|
485 |
-
<span class="bwg_slideshow_title_spun_<?php echo $bwg; ?>">
|
486 |
-
<div class="bwg_slideshow_title_text_<?php echo $bwg; ?> <?php if ( !$current_image_alt ) {
|
487 |
echo 'bwg-hidden';
|
488 |
} ?>">
|
489 |
<?php echo html_entity_decode($current_image_alt); ?>
|
@@ -496,11 +497,11 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
496 |
}
|
497 |
if ( $enable_image_description && isset($current_image_description) ) {
|
498 |
?>
|
499 |
-
<div class="bwg_slideshow_image_container_<?php echo $bwg; ?> bwg_slideshow_image_container" data-params="<?php echo $bwg_params; ?>">
|
500 |
-
<div class="bwg_slideshow_watermark_container_<?php echo $bwg; ?>">
|
501 |
<div>
|
502 |
-
<span class="bwg_slideshow_description_spun_<?php echo $bwg; ?>">
|
503 |
-
<div class="bwg_slideshow_description_text_<?php echo $bwg; ?> <?php if ( !$current_image_description ) {
|
504 |
echo 'bwg-hidden';
|
505 |
} ?>">
|
506 |
<?php echo html_entity_decode(str_replace("\r\n", esc_html('<br />'), $current_image_description)); ?>
|
@@ -513,7 +514,7 @@ public function display($params = array(), $bwg = 0, $ajax = FALSE) {
|
|
513 |
}
|
514 |
if ( $enable_slideshow_music ) {
|
515 |
?>
|
516 |
-
<audio id="bwg_audio_<?php echo $bwg; ?>" src="<?php echo $slideshow_music_url ?>" loop volume="1.0"></audio>
|
517 |
<?php
|
518 |
}
|
519 |
?>
|
104 |
}
|
105 |
}
|
106 |
else {
|
107 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
108 |
}
|
109 |
}
|
110 |
else {
|
111 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
112 |
}
|
113 |
|
114 |
$data = array();
|
174 |
'enable_slideshow_music' => $enable_slideshow_music,
|
175 |
);
|
176 |
?>
|
177 |
+
<div class="bwg_slideshow_image_wrap_<?php echo sanitize_html_class($bwg); ?> bwg-slideshow-images-wrapper bwg-container"
|
178 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
179 |
+
data-lightbox-url="<?php echo esc_url(addslashes(add_query_arg($params['params_array'], admin_url('admin-ajax.php')))); ?>">
|
180 |
<?php
|
181 |
$current_pos = 0;
|
182 |
if ( $enable_slideshow_filmstrip ) {
|
183 |
?>
|
184 |
+
<div class="bwg_slideshow_filmstrip_container_<?php echo sanitize_html_class($bwg); ?>">
|
185 |
+
<div class="bwg_slideshow_filmstrip_left_<?php echo sanitize_html_class($bwg); ?>">
|
186 |
<i class="<?php echo($filmstrip_direction == 'horizontal' ? 'bwg-icon-angle-left' : 'bwg-icon-angle-up'); ?>"></i>
|
187 |
</div>
|
188 |
+
<div class="bwg_slideshow_filmstrip_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_filmstrip">
|
189 |
+
<div class="bwg_slideshow_filmstrip_thumbnails_<?php echo sanitize_html_class($bwg); ?>">
|
190 |
<?php
|
191 |
foreach ( $image_rows as $key => $image_row ) {
|
192 |
if ( $image_row->id == $current_image_id ) {
|
196 |
$is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
197 |
$is_embed_video = ($is_embed && preg_match('/_VIDEO/', $image_row->filetype) == 1) ? TRUE : FALSE;
|
198 |
$is_embed_instagram = preg_match('/EMBED_OEMBED_INSTAGRAM/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
199 |
+
$bwg_thumb_url = esc_url($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->thumb_url);
|
200 |
if ( $play_pause_button_display === 'undefined' ) {
|
201 |
if ( $is_embed_video ) {
|
202 |
$play_pause_button_display = 'none';
|
250 |
$thumb_left = ($slideshow_filmstrip_width - $image_thumb_width) / 2;
|
251 |
$thumb_top = ($slideshow_filmstrip_height - $image_thumb_height) / 2;
|
252 |
?>
|
253 |
+
<div id="bwg_filmstrip_thumbnail_<?php echo sanitize_html_class($key.'_'.$bwg); ?>" class="bwg_slideshow_filmstrip_thumbnail_<?php echo sanitize_html_class($bwg); ?> <?php echo(($image_row->id == $current_image_id) ? 'bwg_slideshow_thumb_active_' . sanitize_html_class($bwg) : 'bwg_slideshow_thumb_deactive_' . sanitize_html_class($bwg)); ?>">
|
254 |
<img style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;"
|
255 |
+
class="skip-lazy bwg_filmstrip_thumbnail_img bwg_slideshow_filmstrip_thumbnail_img_<?php echo sanitize_html_class($bwg); ?> <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
256 |
+
src="<?php if( !$lazyload ) { echo $bwg_thumb_url; } else { echo esc_url(BWG()->plugin_url."/images/lazy_placeholder.gif"); } ?>"
|
257 |
+
data-original="<?php echo $bwg_thumb_url; ?>"
|
258 |
onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), '<?php echo $key; ?>', '', '', '<?php echo $bwg; ?>')"
|
259 |
+
image_id="<?php echo esc_attr($image_row->id); ?>"
|
260 |
+
image_key="<?php echo esc_attr($key); ?>"
|
261 |
+
alt="<?php echo esc_attr($image_row->alt); ?>" />
|
262 |
</div>
|
263 |
<?php
|
264 |
}
|
265 |
?>
|
266 |
</div>
|
267 |
</div>
|
268 |
+
<div class="bwg_slideshow_filmstrip_right_<?php echo sanitize_html_class($bwg); ?>">
|
269 |
<i class="<?php echo($filmstrip_direction == 'horizontal' ? 'bwg-icon-angle-right' : 'bwg-icon-angle-down'); ?>"></i>
|
270 |
</div>
|
271 |
</div>
|
273 |
}
|
274 |
else {
|
275 |
?>
|
276 |
+
<div class="bwg_slideshow_dots_container_<?php echo sanitize_html_class($bwg); ?>">
|
277 |
+
<div class="bwg_slideshow_dots_thumbnails_<?php echo sanitize_html_class($bwg); ?>">
|
278 |
<?php
|
279 |
foreach ( $image_rows as $key => $image_row ) {
|
280 |
if ( $image_row->id == $current_image_id ) {
|
282 |
$current_key = $key;
|
283 |
}
|
284 |
?>
|
285 |
+
<span id="bwg_dots_<?php echo sanitize_html_class($key.'_'.$bwg); ?>" class="bwg_slideshow_dots_<?php echo sanitize_html_class($bwg); ?> <?php echo(($image_row->id == $current_image_id) ? 'bwg_slideshow_dots_active_' . sanitize_html_class($bwg) : 'bwg_slideshow_dots_deactive_' . sanitize_html_class($bwg)); ?>" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), '<?php echo $key; ?>', '', '', <?php echo $bwg; ?>)" image_id="<?php echo esc_attr($image_row->id); ?>" image_key="<?php echo esc_attr($key); ?>"></span>
|
286 |
<?php
|
287 |
}
|
288 |
?>
|
293 |
$bwg_param['bwg_current_filmstrip_pos'] = $current_pos;
|
294 |
$bwg_params = json_encode($bwg_param);
|
295 |
?>
|
296 |
+
<div id="bwg_slideshow_image_container_<?php echo sanitize_html_class($bwg); ?>" class="bwg_slideshow_image_container_<?php echo sanitize_html_class($bwg); ?>" data-params='<?php echo esc_attr($bwg_params); ?>'>
|
297 |
+
<div class="bwg_slide_container_<?php echo sanitize_html_class($bwg); ?>">
|
298 |
+
<div class="bwg_slide_bg_<?php echo sanitize_html_class($bwg); ?>">
|
299 |
+
<div class="bwg_slider_<?php echo sanitize_html_class($bwg); ?>">
|
300 |
<?php
|
301 |
foreach ( $image_rows as $key => $image_row ) {
|
302 |
$is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
305 |
if ( $image_row->id == $current_image_id ) {
|
306 |
$current_key = $key;
|
307 |
?>
|
308 |
+
<span class="bwg_slideshow_image_spun_<?php echo sanitize_html_class($bwg); ?>" id="image_id_<?php echo sanitize_html_class($bwg.'_'.$image_row->id); ?>">
|
309 |
+
<span class="bwg_slideshow_image_spun1_<?php echo sanitize_html_class($bwg); ?>">
|
310 |
+
<span class="bwg_slideshow_image_spun2_<?php echo sanitize_html_class($bwg); ?>">
|
311 |
<?php
|
312 |
if ( !$is_embed ) {
|
313 |
?>
|
314 |
+
<a <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg-a bwg_lightbox"' . (BWG()->options->enable_seo ? ' href="' . esc_url($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->image_url) . '"' : '') . ' data-image-id="' . esc_attr($image_row->id) . '" data-elementor-open-lightbox="no"') : ('class="bwg-a" ' . ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . esc_url($image_row->redirect_url) . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : ''))); ?>>
|
315 |
+
<img id="bwg_slideshow_image_<?php echo sanitize_html_class($bwg); ?>"
|
316 |
+
class="skip-lazy bwg_slide bwg_slideshow_image_<?php echo sanitize_html_class($bwg); ?> <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
317 |
+
src="<?php if( !$lazyload ) { echo esc_url(BWG()->upload_url . $image_row->image_url); } else { echo esc_url(BWG()->plugin_url."/images/lazy_placeholder.gif"); } ?>"
|
318 |
+
data-original="<?php echo esc_url(BWG()->upload_url . $image_row->image_url); ?>"
|
319 |
+
image_id="<?php echo esc_attr($image_row->id); ?>"
|
320 |
+
alt="<?php echo esc_attr($image_row->alt); ?>" />
|
321 |
</a>
|
322 |
<?php
|
323 |
}
|
324 |
else { /*$is_embed*/
|
325 |
?>
|
326 |
+
<span id="bwg_slideshow_image_<?php echo sanitize_html_class($bwg); ?>" class="bwg_slideshow_embed_<?php echo sanitize_html_class($bwg); ?>" image_id="<?php echo esc_attr($image_row->id); ?>">
|
327 |
<?php echo $is_embed_instagram_video ? '<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><span class="bwg_inst_play"></span></span>' : '';
|
328 |
if ( $is_embed_instagram_post ) {
|
329 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
366 |
</span>
|
367 |
</span>
|
368 |
</span>
|
369 |
+
<span class="bwg_slideshow_image_second_spun_<?php echo sanitize_html_class($bwg); ?>">
|
370 |
</span>
|
371 |
+
<input type="hidden" id="bwg_current_image_key_<?php echo sanitize_html_class($bwg); ?>" value="<?php echo esc_attr($key); ?>" />
|
372 |
<?php
|
373 |
break;
|
374 |
}
|
375 |
else {
|
376 |
?>
|
377 |
+
<span class="bwg_slideshow_image_second_spun_<?php echo sanitize_html_class($bwg); ?>" id="image_id_<?php echo sanitize_html_class($bwg.'_'.$image_row->id); ?>">
|
378 |
+
<span class="bwg_slideshow_image_spun1_<?php echo sanitize_html_class($bwg); ?>">
|
379 |
+
<span class="bwg_slideshow_image_spun2_<?php echo sanitize_html_class($bwg); ?>">
|
380 |
<?php
|
381 |
if ( !$is_embed ) {
|
382 |
?>
|
383 |
+
<a <?php echo($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg-a bwg_lightbox_' . sanitize_html_class($bwg) . '"' . (BWG()->options->enable_seo ? ' href="' . esc_url($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->image_url) . '"' : '') . ' data-image-id="' . esc_attr($image_row->id) . '"') : ('class="bwg-a" ' . ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . esc_url($image_row->redirect_url) . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : ''))) ?>>
|
384 |
+
<img id="bwg_slideshow_image_<?php echo sanitize_html_class($bwg); ?>"
|
385 |
+
class="skip-lazy bwg_slide bwg_slideshow_image_<?php echo sanitize_html_class($bwg); ?> <?php if( $lazyload ) { ?> bwg_lazyload lazy_loader <?php } ?>"
|
386 |
+
src="<?php if( !$lazyload ) { echo esc_url(BWG()->upload_url . $image_row->image_url); } else { echo esc_url(BWG()->plugin_url."/images/lazy_placeholder.gif"); } ?>"
|
387 |
+
data-original="<?php echo esc_url(BWG()->upload_url . $image_row->image_url); ?>"
|
388 |
+
image_id="<?php echo esc_attr($image_row->id); ?>"
|
389 |
+
alt="<?php echo esc_attr($image_row->alt); ?>" />
|
390 |
</a>
|
391 |
<?php
|
392 |
}
|
393 |
else { /*$is_embed*/ ?>
|
394 |
+
<span class="bwg_slideshow_embed_<?php echo sanitize_html_class($bwg); ?>">
|
395 |
<?php
|
396 |
if ( $is_embed_instagram_post ) {
|
397 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
444 |
<?php
|
445 |
if ( $enable_slideshow_ctrl ) {
|
446 |
?>
|
447 |
+
<a class="bwg-a" id="spider_slideshow_left_<?php echo sanitize_html_class($bwg); ?>" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) + <?php echo count($data[$bwg]); ?> - bwg_iterator(<?php echo $bwg; ?>)) % <?php echo count($data[$bwg]); ?>, '', '', <?php echo $bwg; ?>); return false;"><span id="spider_slideshow_left-ico_<?php echo sanitize_html_class($bwg); ?>"><span><i class="<?php echo sanitize_html_class($theme_row->slideshow_rl_btn_style); ?>-left bwg_slideshow_prev_btn_<?php echo sanitize_html_class($bwg); ?>"></i></span></span></a>
|
448 |
+
<span id="bwg_slideshow_play_pause_<?php echo sanitize_html_class($bwg); ?>" class="bwg_slideshow_play_pause" style="display: <?php echo $play_pause_button_display; ?>;"><span><span id="bwg_slideshow_play_pause-ico_<?php echo sanitize_html_class($bwg); ?>"><i class="bwg-icon-play bwg_ctrl_btn_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_play_pause_<?php echo sanitize_html_class($bwg); ?>"></i></span></span></span>
|
449 |
+
<a class="bwg-a" id="spider_slideshow_right_<?php echo sanitize_html_class($bwg); ?>" onclick="bwg_change_image(parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()), (parseInt(jQuery('#bwg_current_image_key_<?php echo $bwg; ?>').val()) + bwg_iterator(<?php echo $bwg; ?>)) % <?php echo count($data[$bwg]); ?>, '', '', <?php echo $bwg; ?>); return false;"><span id="spider_slideshow_right-ico_<?php echo sanitize_html_class($bwg); ?>"><span><i class="<?php echo sanitize_html_class($theme_row->slideshow_rl_btn_style); ?>-right bwg_slideshow_next_btn_<?php echo sanitize_html_class($bwg); ?>"></i></span></span></a>
|
450 |
<?php
|
451 |
}
|
452 |
?>
|
454 |
<?php
|
455 |
if ( $params['watermark_type'] != 'none' ) {
|
456 |
?>
|
457 |
+
<div class="bwg_slideshow_image_container_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_image_container" data-params="<?php echo esc_attr($bwg_params); ?>">
|
458 |
+
<div class="bwg_slideshow_watermark_container_<?php echo sanitize_html_class($bwg); ?>">
|
459 |
<div>
|
460 |
+
<span class="bwg_slideshow_watermark_spun_<?php echo sanitize_html_class($bwg); ?>" id="bwg_slideshow_watermark_container_<?php echo sanitize_html_class($bwg); ?>">
|
461 |
<?php
|
462 |
if ( $params['watermark_type'] == 'image' ) {
|
463 |
?>
|
464 |
<a class="bwg-a" href="<?php echo urldecode($watermark_link); ?>" target="_blank">
|
465 |
+
<img class="bwg_slideshow_watermark_image_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_watermark_<?php echo sanitize_html_class($bwg); ?>" src="<?php echo urldecode($watermark_url); ?>" />
|
466 |
</a>
|
467 |
<?php
|
468 |
}
|
469 |
elseif ( $params['watermark_type'] == 'text' ) {
|
470 |
?>
|
471 |
+
<a class="bwg_none_selectable_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_watermark_text_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_watermark_<?php echo sanitize_html_class($bwg); ?>" target="_blank" href="<?php echo urldecode($watermark_link); ?>"><?php echo esc_html($params['watermark_text']); ?></a>
|
472 |
<?php
|
473 |
}
|
474 |
?>
|
480 |
}
|
481 |
if ( $enable_image_title ) {
|
482 |
?>
|
483 |
+
<div class="bwg_slideshow_image_container_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_image_container" data-params="<?php echo esc_attr($bwg_params); ?>">
|
484 |
+
<div class="bwg_slideshow_watermark_container_<?php echo sanitize_html_class($bwg); ?>">
|
485 |
<div>
|
486 |
+
<span class="bwg_slideshow_title_spun_<?php echo sanitize_html_class($bwg); ?>">
|
487 |
+
<div class="bwg_slideshow_title_text_<?php echo sanitize_html_class($bwg); ?> <?php if ( !$current_image_alt ) {
|
488 |
echo 'bwg-hidden';
|
489 |
} ?>">
|
490 |
<?php echo html_entity_decode($current_image_alt); ?>
|
497 |
}
|
498 |
if ( $enable_image_description && isset($current_image_description) ) {
|
499 |
?>
|
500 |
+
<div class="bwg_slideshow_image_container_<?php echo sanitize_html_class($bwg); ?> bwg_slideshow_image_container" data-params="<?php echo esc_attr($bwg_params); ?>">
|
501 |
+
<div class="bwg_slideshow_watermark_container_<?php echo sanitize_html_class($bwg); ?>">
|
502 |
<div>
|
503 |
+
<span class="bwg_slideshow_description_spun_<?php echo sanitize_html_class($bwg); ?>">
|
504 |
+
<div class="bwg_slideshow_description_text_<?php echo sanitize_html_class($bwg); ?> <?php if ( !$current_image_description ) {
|
505 |
echo 'bwg-hidden';
|
506 |
} ?>">
|
507 |
<?php echo html_entity_decode(str_replace("\r\n", esc_html('<br />'), $current_image_description)); ?>
|
514 |
}
|
515 |
if ( $enable_slideshow_music ) {
|
516 |
?>
|
517 |
+
<audio id="bwg_audio_<?php echo sanitize_html_class($bwg); ?>" src="<?php echo esc_url($slideshow_music_url) ?>" loop volume="1.0"></audio>
|
518 |
<?php
|
519 |
}
|
520 |
?>
|
frontend/views/BWGViewThumbnails.php
CHANGED
@@ -13,26 +13,27 @@ class BWGViewThumbnails extends BWGViewSite {
|
|
13 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
14 |
}
|
15 |
else {
|
16 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
17 |
}
|
18 |
}
|
19 |
}
|
20 |
else {
|
21 |
-
echo '<style id="bwg-style-' . $bwg . '">' . $inline_style . '</style>';
|
22 |
}
|
23 |
ob_start();
|
24 |
?>
|
25 |
-
<div data-max-count="<?php echo $params['image_column_number']; ?>"
|
26 |
-
data-thumbnail-width="<?php echo $params['thumb_width']; ?>"
|
27 |
-
data-bwg="<?php echo $bwg; ?>"
|
28 |
-
data-gallery-id="<?php echo $params['gallery_id']; ?>"
|
29 |
-
data-lightbox-url="<?php echo addslashes(add_query_arg($params['params_array'], admin_url('admin-ajax.php'))); ?>"
|
30 |
-
id="bwg_<?php echo $params['gallery_type'].'_'.$bwg ?>"
|
31 |
-
class="bwg-container-<?php echo $bwg; ?> bwg-thumbnails bwg-standard-thumbnails bwg-container bwg-border-box">
|
32 |
<?php
|
33 |
foreach ($image_rows as $image_row) {
|
34 |
$is_embed = preg_match('/EMBED/',$image_row->filetype) == 1 ? true : false;
|
35 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype) == 1 ? true : false;
|
|
|
36 |
$class = '';
|
37 |
$data_image_id = '';
|
38 |
$href = '';
|
@@ -50,13 +51,13 @@ class BWGViewThumbnails extends BWGViewSite {
|
|
50 |
$ecommerce_icon .= '</div></div>';
|
51 |
if ( $params['thumb_click_action'] == 'open_lightbox' ) {
|
52 |
$class = ' bwg_lightbox';
|
53 |
-
$data_image_id = ' data-image-id="' . $image_row->id . '"';
|
54 |
if ( BWG()->options->enable_seo ) {
|
55 |
-
$href = ' href="' . ($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->image_url) . '"';
|
56 |
}
|
57 |
}
|
58 |
elseif ( $params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ) {
|
59 |
-
$href = ' href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"';
|
60 |
}
|
61 |
|
62 |
$resolution_thumb = $image_row->resolution_thumb;
|
@@ -70,18 +71,18 @@ class BWGViewThumbnails extends BWGViewSite {
|
|
70 |
}
|
71 |
?>
|
72 |
<div class="bwg-item">
|
73 |
-
<a class="bwg-a<?php echo $class; ?>" <?php echo $data_image_id; ?><?php echo $href; ?> data-elementor-open-lightbox="no" >
|
74 |
<?php if ( $params['image_title'] == 'show' && $theme_row->thumb_title_pos == 'top' ) { echo $title; } ?>
|
75 |
<div class="bwg-item0 <?php if( $lazyload ) { ?> lazy_loader <?php } ?>">
|
76 |
<div class="bwg-item1 <?php echo $theme_row->thumb_hover_effect == 'zoom' && $params['image_title'] == 'hover' ? 'bwg-zoom-effect' : ''; ?>">
|
77 |
<div class="bwg-item2">
|
78 |
-
<img class="skip-lazy bwg_standart_thumb_img_<?php echo $bwg; ?> <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
79 |
-
data-id="<?php echo $image_row->id; ?>"
|
80 |
-
data-width="<?php echo $image_thumb_width; ?>"
|
81 |
-
data-height="<?php echo $image_thumb_height; ?>"
|
82 |
-
data-original="<?php echo
|
83 |
-
src="<?php if( !$lazyload ) { echo
|
84 |
-
alt="<?php echo $image_row->alt; ?>" />
|
85 |
</div>
|
86 |
<div class="<?php echo $theme_row->thumb_hover_effect == 'zoom' && $params['image_title'] == 'hover' ? 'bwg-zoom-effect-overlay' : ''; ?>">
|
87 |
<?php if ( $params['image_title'] == 'hover' ) { echo $title; } ?>
|
13 |
wp_add_inline_style('bwg_frontend', $inline_style);
|
14 |
}
|
15 |
else {
|
16 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
17 |
}
|
18 |
}
|
19 |
}
|
20 |
else {
|
21 |
+
echo '<style id="bwg-style-' . sanitize_html_class($bwg) . '">' . $inline_style . '</style>';
|
22 |
}
|
23 |
ob_start();
|
24 |
?>
|
25 |
+
<div data-max-count="<?php echo esc_attr($params['image_column_number']); ?>"
|
26 |
+
data-thumbnail-width="<?php echo esc_attr($params['thumb_width']); ?>"
|
27 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
28 |
+
data-gallery-id="<?php echo esc_attr($params['gallery_id']); ?>"
|
29 |
+
data-lightbox-url="<?php echo esc_attr(addslashes(add_query_arg($params['params_array'], admin_url('admin-ajax.php')))); ?>"
|
30 |
+
id="bwg_<?php echo esc_attr($params['gallery_type'].'_'.$bwg) ?>"
|
31 |
+
class="bwg-container-<?php echo sanitize_html_class($bwg); ?> bwg-thumbnails bwg-standard-thumbnails bwg-container bwg-border-box">
|
32 |
<?php
|
33 |
foreach ($image_rows as $image_row) {
|
34 |
$is_embed = preg_match('/EMBED/',$image_row->filetype) == 1 ? true : false;
|
35 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype) == 1 ? true : false;
|
36 |
+
$bwg_thumb_url = esc_url($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->thumb_url);
|
37 |
$class = '';
|
38 |
$data_image_id = '';
|
39 |
$href = '';
|
51 |
$ecommerce_icon .= '</div></div>';
|
52 |
if ( $params['thumb_click_action'] == 'open_lightbox' ) {
|
53 |
$class = ' bwg_lightbox';
|
54 |
+
$data_image_id = ' data-image-id="' . esc_attr($image_row->id) . '"';
|
55 |
if ( BWG()->options->enable_seo ) {
|
56 |
+
$href = ' href="' . esc_url($is_embed ? $image_row->thumb_url : BWG()->upload_url . $image_row->image_url) . '"';
|
57 |
}
|
58 |
}
|
59 |
elseif ( $params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ) {
|
60 |
+
$href = ' href="' . esc_url($image_row->redirect_url) . '" target="' . (esc_attr($params['thumb_link_target']) ? '_blank' : '') . '"';
|
61 |
}
|
62 |
|
63 |
$resolution_thumb = $image_row->resolution_thumb;
|
71 |
}
|
72 |
?>
|
73 |
<div class="bwg-item">
|
74 |
+
<a class="bwg-a <?php echo sanitize_html_class($class); ?>" <?php echo $data_image_id; ?><?php echo $href; ?> data-elementor-open-lightbox="no" >
|
75 |
<?php if ( $params['image_title'] == 'show' && $theme_row->thumb_title_pos == 'top' ) { echo $title; } ?>
|
76 |
<div class="bwg-item0 <?php if( $lazyload ) { ?> lazy_loader <?php } ?>">
|
77 |
<div class="bwg-item1 <?php echo $theme_row->thumb_hover_effect == 'zoom' && $params['image_title'] == 'hover' ? 'bwg-zoom-effect' : ''; ?>">
|
78 |
<div class="bwg-item2">
|
79 |
+
<img class="skip-lazy bwg_standart_thumb_img_<?php echo sanitize_html_class($bwg); ?> <?php if( $lazyload ) { ?> bwg_lazyload <?php } ?>"
|
80 |
+
data-id="<?php echo esc_attr($image_row->id); ?>"
|
81 |
+
data-width="<?php echo esc_attr($image_thumb_width); ?>"
|
82 |
+
data-height="<?php echo esc_attr($image_thumb_height); ?>"
|
83 |
+
data-original="<?php echo $bwg_thumb_url; ?>"
|
84 |
+
src="<?php if( !$lazyload ) { echo $bwg_thumb_url; } else { echo esc_url(BWG()->plugin_url."/images/lazy_placeholder.gif"); } ?>"
|
85 |
+
alt="<?php echo esc_attr($image_row->alt); ?>" />
|
86 |
</div>
|
87 |
<div class="<?php echo $theme_row->thumb_hover_effect == 'zoom' && $params['image_title'] == 'hover' ? 'bwg-zoom-effect-overlay' : ''; ?>">
|
88 |
<?php if ( $params['image_title'] == 'hover' ) { echo $title; } ?>
|
frontend/views/view.php
CHANGED
@@ -58,33 +58,33 @@ class BWGViewSite {
|
|
58 |
$params_array = $params['params_array'];
|
59 |
$theme_row = $params['theme_row'];
|
60 |
?>
|
61 |
-
<div id="bwg_container1_<?php echo $bwg; ?>"
|
62 |
-
class="bwg_container bwg_thumbnail bwg_<?php echo $params['gallery_type']; ?>"
|
63 |
-
data-right-click-protection="<?php echo BWG()->options->image_right_click; ?>"
|
64 |
-
data-bwg="<?php echo $bwg; ?>"
|
65 |
-
data-gallery-type="<?php echo $params['gallery_type']; ?>"
|
66 |
-
data-current-url="<?php echo addslashes(urldecode($params_array['current_url'])); ?>"
|
67 |
-
data-lightbox-url="<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>"
|
68 |
-
data-gallery-id="<?php echo $params_array['gallery_id']; ?>"
|
69 |
-
data-popup-width="<?php echo $params["popup_width"]; ?>"
|
70 |
-
data-popup-height="<?php echo $params["popup_height"]; ?>"
|
71 |
-
data-is-album="<?php echo $params["view_type"]; ?>"
|
72 |
-
data-buttons-position="<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>">
|
73 |
-
<div id="bwg_container2_<?php echo $bwg; ?>">
|
74 |
<?php $this->loading($bwg, $params["image_enable_page"], $params['gallery_type'] ); ?>
|
75 |
-
<form id="gal_front_form_<?php echo $bwg; ?>"
|
76 |
class="bwg-hidden"
|
77 |
method="post"
|
78 |
action="#"
|
79 |
-
data-current="<?php echo $bwg; ?>"
|
80 |
-
data-shortcode-id="<?php echo isset($params['id']) ? $params['id'] : 0; ?>"
|
81 |
-
data-gallery-type="<?php echo $params['gallery_type']; ?>"
|
82 |
-
data-gallery-id="<?php echo $params['gallery_id']; ?>"
|
83 |
-
data-tag="<?php echo $params['tag']; ?>"
|
84 |
-
data-album-id="<?php echo $params['album_id']; ?>"
|
85 |
-
data-theme-id="<?php echo $params['theme_id']; ?>"
|
86 |
-
data-ajax-url="<?php echo add_query_arg(array('action' => 'bwg_frontend_data'), admin_url('admin-ajax.php')); ?>">
|
87 |
-
<div id="bwg_container3_<?php echo $bwg; ?>" class="bwg-background bwg-background-<?php echo $bwg; ?>">
|
88 |
<?php
|
89 |
$get_album_gallery_id = WDWLibrary::get("album_gallery_id_" . $bwg, 0, 'intval');
|
90 |
if ( BWG()->options->front_ajax == "1" && isset($get_album_gallery_id) && intval($get_album_gallery_id) > 0 ) {
|
@@ -158,9 +158,9 @@ class BWGViewSite {
|
|
158 |
echo '<style>' . $inline_style . '</style>';
|
159 |
}
|
160 |
?>
|
161 |
-
<div id="bwg_spider_popup_loading_<?php echo $bwg; ?>" class="bwg_spider_popup_loading"></div>
|
162 |
-
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
163 |
-
<input type="hidden" id="bwg_random_seed_<?php echo $bwg; ?>" value="<?php echo isset($GLOBALS['bwg_random_seed_' . $bwg]) ? $GLOBALS['bwg_random_seed_' . $bwg] : '' ?>">
|
164 |
<?php
|
165 |
}
|
166 |
?>
|
@@ -262,10 +262,10 @@ class BWGViewSite {
|
|
262 |
$load_type_class = "bwg_load_more_ajax_loading";
|
263 |
}
|
264 |
?>
|
265 |
-
<div id="ajax_loading_<?php echo $bwg; ?>" class="<?php echo $load_type_class; ?>">
|
266 |
<div class="bwg_loading_div_2">
|
267 |
<div class="bwg_loading_div_3">
|
268 |
-
<div id="loading_div_<?php echo $bwg; ?>" class="bwg_spider_ajax_loading">
|
269 |
</div>
|
270 |
</div>
|
271 |
</div>
|
@@ -299,7 +299,7 @@ class BWGViewSite {
|
|
299 |
echo '<style>' . $inline_style . '</style>';
|
300 |
}
|
301 |
?>
|
302 |
-
<div class="bwg_back bwg_back_<?php echo $bwg; ?>" onclick="bwg_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $params['container_id']; ?>', 'back', '', 'album')"><i class="bwg-icon-arrow-left"></i> <?php _e('Back', BWG()->prefix); ?></div>
|
303 |
<?php
|
304 |
}
|
305 |
|
@@ -341,12 +341,12 @@ class BWGViewSite {
|
|
341 |
}
|
342 |
if ( $params['showthumbs_name'] && isset($row->name) && $row->name != '' ) {
|
343 |
?>
|
344 |
-
<div class="bwg_gal_title_<?php echo $bwg; ?>"><?php echo WDWLibrary::strip_tags(stripslashes($row->name)); ?></div>
|
345 |
<?php
|
346 |
}
|
347 |
if ( $params['show_gallery_description'] && isset($row->description) && $row->description != '' ) {
|
348 |
?>
|
349 |
-
<div class="bwg_gal_title_<?php echo $bwg; ?> bwg_gal_description_<?php echo $bwg; ?>"><?php echo WDWLibrary::strip_tags(stripslashes($row->description)); ?></div>
|
350 |
<?php
|
351 |
}
|
352 |
}
|
@@ -362,8 +362,10 @@ class BWGViewSite {
|
|
362 |
&& ($params['gallery_row']->id == 0 || ($params['gallery_row']->gallery_type != 'facebook' && $params['gallery_row']->gallery_type != 'instagram' && $params['gallery_row']->gallery_type != 'instagram_post')) ) {
|
363 |
if ( count($params['image_rows']['images']) ) {
|
364 |
$bwg_tags_input_value = WDWLibrary::get('bwg_tag_id_'.$params['container_id']);
|
|
|
365 |
$query_url = addslashes(add_query_arg(array(
|
366 |
"action" => "download_gallery",
|
|
|
367 |
"gallery_id" => $params['gallery_id'],
|
368 |
"bwg" => $bwg,
|
369 |
"type" => 'gallery',
|
@@ -374,7 +376,7 @@ class BWGViewSite {
|
|
374 |
), admin_url('admin-ajax.php')));
|
375 |
?>
|
376 |
<div class="bwg_download_gallery">
|
377 |
-
<a href="<?php echo $query_url; ?>">
|
378 |
<i title="<?php _e('Download gallery', BWG()->prefix); ?>" class="bwg-icon-download bwg_ctrl_btn"></i>
|
379 |
</a>
|
380 |
</div>
|
@@ -425,22 +427,22 @@ class BWGViewSite {
|
|
425 |
$bwg_ajax_reset = "";
|
426 |
}
|
427 |
?>
|
428 |
-
<div class="bwg_search_container_1" id="bwg_search_container_1_<?php echo $current_view; ?>">
|
429 |
-
<div class="bwg_search_container_2" id="bwg_search_container_2_<?php echo $current_view; ?>">
|
430 |
<span class="bwg_search_input_container">
|
431 |
<span class="bwg_search_loupe_container1 bwg-hidden">
|
432 |
<i title="<?php echo __('SEARCH...', BWG()->prefix); ?>" class="bwg-icon-search bwg_search" onclick="bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
|
433 |
</span>
|
434 |
-
<input id="bwg_search_input_<?php echo $current_view; ?>" class="bwg_search_input" type="text" onkeypress="bwg_key_press(this); return bwg_check_search_input_enter(this, event);" name="bwg_search_<?php echo $current_view; ?>" value="<?php echo esc_attr($bwg_search); ?>" placeholder="<?php echo $placeholder; ?>" />
|
435 |
-
<span class="bwg_search_reset_container <?echo $bwg_search_reset; ?>">
|
436 |
<i title="<?php echo __('Reset', BWG()->prefix); ?>" class="bwg-icon-times bwg_reset" onclick="bwg_clear_search_input('<?php echo $current_view; ?>'); <?php echo $bwg_ajax_reset;?> "></i>
|
437 |
</span>
|
438 |
-
<input id="bwg_images_count_<?php echo $current_view; ?>" class="bwg_search_input" type="hidden" name="bwg_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>">
|
439 |
<span class="search_placeholder_title" onclick="bwg_search_focus(this)" <?php echo $bwg_search_focus; ?>>
|
440 |
<span class="bwg_search_loupe_container">
|
441 |
<i title="<?php echo __('SEARCH...', BWG()->prefix); ?>" class="bwg-icon-search bwg_search"></i>
|
442 |
</span>
|
443 |
-
<span style="font-size: 12px; font-family: Ubuntu;"><?php echo $placeholder; ?></span>
|
444 |
</span>
|
445 |
</span>
|
446 |
</div>
|
@@ -474,7 +476,7 @@ class BWGViewSite {
|
|
474 |
}
|
475 |
?>
|
476 |
<div class="bwg_order_cont">
|
477 |
-
<select id="bwg_order_<?php echo $current_view; ?>" class="bwg_order bwg_order_<?php echo $current_view; ?>" onchange="bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
|
478 |
<option <?php if ( $sort_by == 'default' ) {
|
479 |
echo 'selected';
|
480 |
} ?> value="default"><?php echo __('Order by Default', BWG()->prefix); ?></option>
|
@@ -574,13 +576,13 @@ class BWGViewSite {
|
|
574 |
echo '<style>' . $inline_style . '</style>';
|
575 |
}
|
576 |
if ( $theme_row->tags_view == 1 ) { ?>
|
577 |
-
<div class="bwg_tags_container_<?php echo $current_view; ?>" >
|
578 |
<div class="search_tags_container">
|
579 |
-
<select class="search_tags" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" multiple="multiple">
|
580 |
<?php
|
581 |
foreach ( $tags_rows as $tags_row ) {
|
582 |
$selected = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'selected="selected"' : ''; ?>
|
583 |
-
<option value="<?php echo $tags_row->term_id ?>" <?php echo $selected; ?>><?php echo $tags_row->name ?></option>
|
584 |
<?php
|
585 |
}
|
586 |
?>
|
@@ -589,14 +591,14 @@ class BWGViewSite {
|
|
589 |
<?php
|
590 |
}
|
591 |
else { ?>
|
592 |
-
<div class="bwg_tags_container_<?php echo $current_view; ?>">
|
593 |
<div class="bwg_tag_button_view_container" >
|
594 |
<button type="button" class="bwg_all_tags active" data-filter="All Tags"><?php echo __('All Tags', BWG()->prefix);?></button><div class="verLine"></div>
|
595 |
<?php
|
596 |
foreach ( $tags_rows as $tags_row ) {
|
597 |
$active = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'active' : '';
|
598 |
?>
|
599 |
-
<button type="button" class="bwg_tags_filter_buttons <?php echo $active ?>" data-filter="<?php echo $tags_row->name ?>" value="<?php echo $tags_row->term_id; ?>" ><?php echo $tags_row->name ?></button>
|
600 |
<?php
|
601 |
}
|
602 |
?>
|
@@ -604,13 +606,13 @@ class BWGViewSite {
|
|
604 |
<div class="bwg_tag_button_see_all"><div class="see_all_tags show"><span>+</span><?php echo __('see all tags', BWG()->prefix);?></div></div>
|
605 |
<?php
|
606 |
} ?>
|
607 |
-
<input type="hidden" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" value="<?php echo $get_filter_teg ?>" />
|
608 |
-
<input type="hidden" class="current_view" value="<?php echo $current_view; ?>" />
|
609 |
-
<input type="hidden" class="form_id" value="<?php echo $form_id; ?>" />
|
610 |
-
<input type="hidden" class="cur_gal_id" value="<?php echo $cur_gal_id; ?>" />
|
611 |
-
<input type="hidden" class="album_gallery_id" value="<?php echo $album_gallery_id; ?>" />
|
612 |
-
<input type="hidden" class="type" value="<?php echo $type; ?>" />
|
613 |
-
<input type="hidden" class="show_bottom_tag" value="<?php echo $show_bottom_tag; ?>" />
|
614 |
</div>
|
615 |
<?php
|
616 |
}
|
@@ -776,15 +778,15 @@ class BWGViewSite {
|
|
776 |
$next_page = "next-page-" . $current_view;
|
777 |
$last_page = "last-page-" . $current_view;
|
778 |
?>
|
779 |
-
<span class="bwg_nav_cont_<?php echo $current_view; ?>">
|
780 |
<?php
|
781 |
if ( $pagination == 1 ) {
|
782 |
?>
|
783 |
-
<div class="tablenav-pages_<?php echo $current_view; ?>">
|
784 |
<?php
|
785 |
if ( $theme_row->page_nav_number ) {
|
786 |
?>
|
787 |
-
<span class="displaying-num_<?php echo $current_view; ?>"><?php echo $count_items . ' ' . __(' item(s)', BWG()->prefix); ?></span>
|
788 |
<?php
|
789 |
}
|
790 |
if ( $count_items > $limit ) {
|
@@ -809,21 +811,21 @@ class BWGViewSite {
|
|
809 |
$last_page = "last-page disabled";
|
810 |
}
|
811 |
?>
|
812 |
-
<span class="pagination-links_<?php echo $current_view; ?> pagination-links" data-pages-count="<?php echo $items_county; ?>">
|
813 |
<span class="pagination-links_col1">
|
814 |
-
<a class="bwg-a <?php echo $first_page; ?>" title="<?php echo __('Go to the first page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $first_button; ?></a>
|
815 |
-
<a class="bwg-a <?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number - 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $previous_button; ?></a>
|
816 |
</span>
|
817 |
<span class="pagination-links_col2">
|
818 |
-
<input type="number" class="bwg_current_page" name="bwg_current_page" value="<?php echo $page_number; ?>" data-url-info="page_number_<?php echo $current_view; ?>" onkeypress="return bwg_change_page_<?php echo $current_view; ?>(event, this)" min="1" oninput="validity.valid||(value='')" />
|
819 |
<?php echo __('of', BWG()->prefix); ?>
|
820 |
-
<span class="total-pages_<?php echo $current_view; ?>">
|
821 |
-
<?php echo $items_county; ?>
|
822 |
</span>
|
823 |
</span>
|
824 |
<span class="pagination-links_col3">
|
825 |
-
<a class="bwg-a <?php echo $next_page ?>" title="<?php echo __('Go to the next page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number + 1 <= $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number + 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $next_button; ?></a>
|
826 |
-
<a class="bwg-a <?php echo $last_page ?>" title="<?php echo __('Go to the last page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number < $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $items_county ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo $last_button; ?></a>
|
827 |
</span>
|
828 |
</span>
|
829 |
<?php
|
@@ -835,9 +837,9 @@ class BWGViewSite {
|
|
835 |
elseif ($pagination == 2) {
|
836 |
if ($count_items > ($limit * ($page_number - 1)) + $items_per_page['images_per_page']) {
|
837 |
?>
|
838 |
-
<div id="bwg_load_<?php echo $current_view; ?>" class="tablenav-pages_<?php echo $current_view; ?>">
|
839 |
-
<a class="bwg-a bwg_load_btn_<?php echo $current_view; ?> bwg_load_btn" href="javascript:void(0);"><?php echo __('Load More...', BWG()->prefix); ?></a>
|
840 |
-
<input type="hidden" id="bwg_load_more_<?php echo $current_view; ?>" name="bwg_load_more_<?php echo $current_view; ?>" value="on" />
|
841 |
</div>
|
842 |
<?php
|
843 |
} else {
|
@@ -871,7 +873,7 @@ class BWGViewSite {
|
|
871 |
$page_number = WDWLibrary::get('page_number_' . $current_view, 1, 'intval');
|
872 |
$scroll_to_top = $pagination == 1 ? 1 : 0;
|
873 |
?>
|
874 |
-
<input type="hidden" id="page_number_<?php echo $current_view; ?>" name="page_number_<?php echo $current_view; ?>" value="<?php echo $page_number; ?>" />
|
875 |
<script type="text/javascript">
|
876 |
function spider_page_<?php echo $current_view; ?>(cur, x, y, load_more) {
|
877 |
if (typeof load_more == "undefined") {
|
58 |
$params_array = $params['params_array'];
|
59 |
$theme_row = $params['theme_row'];
|
60 |
?>
|
61 |
+
<div id="bwg_container1_<?php echo sanitize_html_class($bwg); ?>"
|
62 |
+
class="bwg_container bwg_thumbnail bwg_<?php echo sanitize_html_class($params['gallery_type']); ?>"
|
63 |
+
data-right-click-protection="<?php echo esc_attr(BWG()->options->image_right_click); ?>"
|
64 |
+
data-bwg="<?php echo esc_attr($bwg); ?>"
|
65 |
+
data-gallery-type="<?php echo esc_attr($params['gallery_type']); ?>"
|
66 |
+
data-current-url="<?php echo esc_url(addslashes(urldecode($params_array['current_url']))); ?>"
|
67 |
+
data-lightbox-url="<?php echo esc_url(addslashes(add_query_arg($params_array, admin_url('admin-ajax.php')))); ?>"
|
68 |
+
data-gallery-id="<?php echo esc_attr($params_array['gallery_id']); ?>"
|
69 |
+
data-popup-width="<?php echo esc_attr($params["popup_width"]); ?>"
|
70 |
+
data-popup-height="<?php echo esc_attr($params["popup_height"]); ?>"
|
71 |
+
data-is-album="<?php echo esc_attr($params["view_type"]); ?>"
|
72 |
+
data-buttons-position="<?php echo esc_attr($theme_row->lightbox_ctrl_btn_pos); ?>">
|
73 |
+
<div id="bwg_container2_<?php echo sanitize_html_class($bwg); ?>">
|
74 |
<?php $this->loading($bwg, $params["image_enable_page"], $params['gallery_type'] ); ?>
|
75 |
+
<form id="gal_front_form_<?php echo sanitize_html_class($bwg); ?>"
|
76 |
class="bwg-hidden"
|
77 |
method="post"
|
78 |
action="#"
|
79 |
+
data-current="<?php echo esc_attr($bwg); ?>"
|
80 |
+
data-shortcode-id="<?php echo isset($params['id']) ? esc_attr($params['id']) : 0; ?>"
|
81 |
+
data-gallery-type="<?php echo esc_attr($params['gallery_type']); ?>"
|
82 |
+
data-gallery-id="<?php echo esc_attr($params['gallery_id']); ?>"
|
83 |
+
data-tag="<?php echo esc_attr($params['tag']); ?>"
|
84 |
+
data-album-id="<?php echo esc_attr($params['album_id']); ?>"
|
85 |
+
data-theme-id="<?php echo esc_attr($params['theme_id']); ?>"
|
86 |
+
data-ajax-url="<?php echo esc_url(add_query_arg(array('action' => 'bwg_frontend_data'), admin_url('admin-ajax.php'))); ?>">
|
87 |
+
<div id="bwg_container3_<?php echo sanitize_html_class($bwg); ?>" class="bwg-background bwg-background-<?php echo sanitize_html_class($bwg); ?>">
|
88 |
<?php
|
89 |
$get_album_gallery_id = WDWLibrary::get("album_gallery_id_" . $bwg, 0, 'intval');
|
90 |
if ( BWG()->options->front_ajax == "1" && isset($get_album_gallery_id) && intval($get_album_gallery_id) > 0 ) {
|
158 |
echo '<style>' . $inline_style . '</style>';
|
159 |
}
|
160 |
?>
|
161 |
+
<div id="bwg_spider_popup_loading_<?php echo sanitize_html_class($bwg); ?>" class="bwg_spider_popup_loading"></div>
|
162 |
+
<div id="spider_popup_overlay_<?php echo sanitize_html_class($bwg); ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
163 |
+
<input type="hidden" id="bwg_random_seed_<?php echo sanitize_html_class($bwg); ?>" value="<?php echo isset($GLOBALS['bwg_random_seed_' . $bwg]) ? esc_attr($GLOBALS['bwg_random_seed_' . $bwg]) : '' ?>">
|
164 |
<?php
|
165 |
}
|
166 |
?>
|
262 |
$load_type_class = "bwg_load_more_ajax_loading";
|
263 |
}
|
264 |
?>
|
265 |
+
<div id="ajax_loading_<?php echo sanitize_html_class($bwg); ?>" class="<?php echo sanitize_html_class($load_type_class); ?>">
|
266 |
<div class="bwg_loading_div_2">
|
267 |
<div class="bwg_loading_div_3">
|
268 |
+
<div id="loading_div_<?php echo sanitize_html_class($bwg); ?>" class="bwg_spider_ajax_loading">
|
269 |
</div>
|
270 |
</div>
|
271 |
</div>
|
299 |
echo '<style>' . $inline_style . '</style>';
|
300 |
}
|
301 |
?>
|
302 |
+
<div class="bwg_back bwg_back_<?php echo sanitize_html_class($bwg); ?>" onclick="bwg_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $params['container_id']; ?>', 'back', '', 'album')"><i class="bwg-icon-arrow-left"></i> <?php _e('Back', BWG()->prefix); ?></div>
|
303 |
<?php
|
304 |
}
|
305 |
|
341 |
}
|
342 |
if ( $params['showthumbs_name'] && isset($row->name) && $row->name != '' ) {
|
343 |
?>
|
344 |
+
<div class="bwg_gal_title_<?php echo sanitize_html_class($bwg); ?>"><?php echo WDWLibrary::strip_tags(stripslashes($row->name)); ?></div>
|
345 |
<?php
|
346 |
}
|
347 |
if ( $params['show_gallery_description'] && isset($row->description) && $row->description != '' ) {
|
348 |
?>
|
349 |
+
<div class="bwg_gal_title_<?php echo sanitize_html_class($bwg); ?> bwg_gal_description_<?php echo sanitize_html_class($bwg); ?>"><?php echo WDWLibrary::strip_tags(stripslashes($row->description)); ?></div>
|
350 |
<?php
|
351 |
}
|
352 |
}
|
362 |
&& ($params['gallery_row']->id == 0 || ($params['gallery_row']->gallery_type != 'facebook' && $params['gallery_row']->gallery_type != 'instagram' && $params['gallery_row']->gallery_type != 'instagram_post')) ) {
|
363 |
if ( count($params['image_rows']['images']) ) {
|
364 |
$bwg_tags_input_value = WDWLibrary::get('bwg_tag_id_'.$params['container_id']);
|
365 |
+
$bwg_download_nonce = wp_create_nonce( 'bwg-download-nonce' );
|
366 |
$query_url = addslashes(add_query_arg(array(
|
367 |
"action" => "download_gallery",
|
368 |
+
"_wpnonce" => esc_attr( $bwg_download_nonce ),
|
369 |
"gallery_id" => $params['gallery_id'],
|
370 |
"bwg" => $bwg,
|
371 |
"type" => 'gallery',
|
376 |
), admin_url('admin-ajax.php')));
|
377 |
?>
|
378 |
<div class="bwg_download_gallery">
|
379 |
+
<a href="<?php echo esc_url($query_url); ?>">
|
380 |
<i title="<?php _e('Download gallery', BWG()->prefix); ?>" class="bwg-icon-download bwg_ctrl_btn"></i>
|
381 |
</a>
|
382 |
</div>
|
427 |
$bwg_ajax_reset = "";
|
428 |
}
|
429 |
?>
|
430 |
+
<div class="bwg_search_container_1" id="bwg_search_container_1_<?php echo sanitize_html_class($current_view); ?>">
|
431 |
+
<div class="bwg_search_container_2" id="bwg_search_container_2_<?php echo sanitize_html_class($current_view); ?>">
|
432 |
<span class="bwg_search_input_container">
|
433 |
<span class="bwg_search_loupe_container1 bwg-hidden">
|
434 |
<i title="<?php echo __('SEARCH...', BWG()->prefix); ?>" class="bwg-icon-search bwg_search" onclick="bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
|
435 |
</span>
|
436 |
+
<input id="bwg_search_input_<?php echo sanitize_html_class($current_view); ?>" class="bwg_search_input" type="text" onkeypress="bwg_key_press(this); return bwg_check_search_input_enter(this, event);" name="bwg_search_<?php echo $current_view; ?>" value="<?php echo esc_attr($bwg_search); ?>" placeholder="<?php echo esc_attr($placeholder); ?>" />
|
437 |
+
<span class="bwg_search_reset_container <?echo sanitize_html_class($bwg_search_reset); ?>">
|
438 |
<i title="<?php echo __('Reset', BWG()->prefix); ?>" class="bwg-icon-times bwg_reset" onclick="bwg_clear_search_input('<?php echo $current_view; ?>'); <?php echo $bwg_ajax_reset;?> "></i>
|
439 |
</span>
|
440 |
+
<input id="bwg_images_count_<?php echo sanitize_html_class($current_view); ?>" class="bwg_search_input" type="hidden" name="bwg_images_count_<?php echo esc_attr($current_view); ?>" value="<?php echo esc_attr($images_count); ?>">
|
441 |
<span class="search_placeholder_title" onclick="bwg_search_focus(this)" <?php echo $bwg_search_focus; ?>>
|
442 |
<span class="bwg_search_loupe_container">
|
443 |
<i title="<?php echo __('SEARCH...', BWG()->prefix); ?>" class="bwg-icon-search bwg_search"></i>
|
444 |
</span>
|
445 |
+
<span style="font-size: 12px; font-family: Ubuntu;"><?php echo esc_html($placeholder); ?></span>
|
446 |
</span>
|
447 |
</span>
|
448 |
</div>
|
476 |
}
|
477 |
?>
|
478 |
<div class="bwg_order_cont">
|
479 |
+
<select id="bwg_order_<?php echo sanitize_html_class($current_view); ?>" class="bwg_order bwg_order_<?php echo sanitize_html_class($current_view); ?>" onchange="bwg_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
|
480 |
<option <?php if ( $sort_by == 'default' ) {
|
481 |
echo 'selected';
|
482 |
} ?> value="default"><?php echo __('Order by Default', BWG()->prefix); ?></option>
|
576 |
echo '<style>' . $inline_style . '</style>';
|
577 |
}
|
578 |
if ( $theme_row->tags_view == 1 ) { ?>
|
579 |
+
<div class="bwg_tags_container_<?php echo sanitize_html_class($current_view); ?>" >
|
580 |
<div class="search_tags_container">
|
581 |
+
<select class="search_tags" id="bwg_tag_id_<?php echo sanitize_html_class($cur_gal_id); ?>" multiple="multiple">
|
582 |
<?php
|
583 |
foreach ( $tags_rows as $tags_row ) {
|
584 |
$selected = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'selected="selected"' : ''; ?>
|
585 |
+
<option value="<?php echo esc_attr($tags_row->term_id) ?>" <?php echo $selected; ?>><?php echo esc_html($tags_row->name) ?></option>
|
586 |
<?php
|
587 |
}
|
588 |
?>
|
591 |
<?php
|
592 |
}
|
593 |
else { ?>
|
594 |
+
<div class="bwg_tags_container_<?php echo sanitize_html_class($current_view); ?>">
|
595 |
<div class="bwg_tag_button_view_container" >
|
596 |
<button type="button" class="bwg_all_tags active" data-filter="All Tags"><?php echo __('All Tags', BWG()->prefix);?></button><div class="verLine"></div>
|
597 |
<?php
|
598 |
foreach ( $tags_rows as $tags_row ) {
|
599 |
$active = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'active' : '';
|
600 |
?>
|
601 |
+
<button type="button" class="bwg_tags_filter_buttons <?php echo sanitize_html_class($active) ?>" data-filter="<?php echo esc_attr($tags_row->name) ?>" value="<?php echo esc_attr($tags_row->term_id); ?>" ><?php echo esc_html($tags_row->name) ?></button>
|
602 |
<?php
|
603 |
}
|
604 |
?>
|
606 |
<div class="bwg_tag_button_see_all"><div class="see_all_tags show"><span>+</span><?php echo __('see all tags', BWG()->prefix);?></div></div>
|
607 |
<?php
|
608 |
} ?>
|
609 |
+
<input type="hidden" id="bwg_tag_id_<?php echo sanitize_html_class($cur_gal_id); ?>" value="<?php echo esc_attr($get_filter_teg) ?>" />
|
610 |
+
<input type="hidden" class="current_view" value="<?php echo esc_attr($current_view); ?>" />
|
611 |
+
<input type="hidden" class="form_id" value="<?php echo esc_attr($form_id); ?>" />
|
612 |
+
<input type="hidden" class="cur_gal_id" value="<?php echo esc_attr($cur_gal_id); ?>" />
|
613 |
+
<input type="hidden" class="album_gallery_id" value="<?php echo esc_attr($album_gallery_id); ?>" />
|
614 |
+
<input type="hidden" class="type" value="<?php echo esc_attr($type); ?>" />
|
615 |
+
<input type="hidden" class="show_bottom_tag" value="<?php echo esc_attr($show_bottom_tag); ?>" />
|
616 |
</div>
|
617 |
<?php
|
618 |
}
|
778 |
$next_page = "next-page-" . $current_view;
|
779 |
$last_page = "last-page-" . $current_view;
|
780 |
?>
|
781 |
+
<span class="bwg_nav_cont_<?php echo sanitize_html_class($current_view); ?>">
|
782 |
<?php
|
783 |
if ( $pagination == 1 ) {
|
784 |
?>
|
785 |
+
<div class="tablenav-pages_<?php echo sanitize_html_class($current_view); ?>">
|
786 |
<?php
|
787 |
if ( $theme_row->page_nav_number ) {
|
788 |
?>
|
789 |
+
<span class="displaying-num_<?php echo sanitize_html_class($current_view); ?>"><?php echo esc_html($count_items) . ' ' . __(' item(s)', BWG()->prefix); ?></span>
|
790 |
<?php
|
791 |
}
|
792 |
if ( $count_items > $limit ) {
|
811 |
$last_page = "last-page disabled";
|
812 |
}
|
813 |
?>
|
814 |
+
<span class="pagination-links_<?php echo sanitize_html_class($current_view); ?> pagination-links" data-pages-count="<?php echo esc_attr($items_county); ?>">
|
815 |
<span class="pagination-links_col1">
|
816 |
+
<a class="bwg-a <?php echo esc_html($first_page); ?>" title="<?php echo __('Go to the first page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo esc_html($first_button); ?></a>
|
817 |
+
<a class="bwg-a <?php echo esc_html($prev_page); ?>" title="<?php echo __('Go to the previous page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number > 1) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number - 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo esc_html($previous_button); ?></a>
|
818 |
</span>
|
819 |
<span class="pagination-links_col2">
|
820 |
+
<input type="number" class="bwg_current_page" name="bwg_current_page" value="<?php echo esc_attr($page_number); ?>" data-url-info="page_number_<?php echo esc_attr($current_view); ?>" onkeypress="return bwg_change_page_<?php echo $current_view; ?>(event, this)" min="1" oninput="validity.valid||(value='')" />
|
821 |
<?php echo __('of', BWG()->prefix); ?>
|
822 |
+
<span class="total-pages_<?php echo sanitize_html_class($current_view); ?>">
|
823 |
+
<?php echo esc_html($items_county); ?>
|
824 |
</span>
|
825 |
</span>
|
826 |
<span class="pagination-links_col3">
|
827 |
+
<a class="bwg-a <?php echo esc_html($next_page) ?>" title="<?php echo __('Go to the next page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number + 1 <= $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $page_number + 1 ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo esc_html($next_button); ?></a>
|
828 |
+
<a class="bwg-a <?php echo esc_html($last_page) ?>" title="<?php echo __('Go to the last page', BWG()->prefix); ?>" <?php echo (($enable_dynamic_url || $enable_seo) && $page_number < $items_county) ? 'href="' . esc_url(add_query_arg(array( "page_number_" . $current_view => $items_county ), $_SERVER['REQUEST_URI'])) . '"' : ""; ?>><?php echo esc_html($last_button); ?></a>
|
829 |
</span>
|
830 |
</span>
|
831 |
<?php
|
837 |
elseif ($pagination == 2) {
|
838 |
if ($count_items > ($limit * ($page_number - 1)) + $items_per_page['images_per_page']) {
|
839 |
?>
|
840 |
+
<div id="bwg_load_<?php echo sanitize_html_class($current_view); ?>" class="tablenav-pages_<?php echo sanitize_html_class($current_view); ?>">
|
841 |
+
<a class="bwg-a bwg_load_btn_<?php echo sanitize_html_class($current_view); ?> bwg_load_btn" href="javascript:void(0);"><?php echo __('Load More...', BWG()->prefix); ?></a>
|
842 |
+
<input type="hidden" id="bwg_load_more_<?php echo sanitize_html_class($current_view); ?>" name="bwg_load_more_<?php echo esc_attr($current_view); ?>" value="on" />
|
843 |
</div>
|
844 |
<?php
|
845 |
} else {
|
873 |
$page_number = WDWLibrary::get('page_number_' . $current_view, 1, 'intval');
|
874 |
$scroll_to_top = $pagination == 1 ? 1 : 0;
|
875 |
?>
|
876 |
+
<input type="hidden" id="page_number_<?php echo sanitize_html_class($current_view); ?>" name="page_number_<?php echo esc_attr($current_view); ?>" value="<?php echo esc_attr($page_number); ?>" />
|
877 |
<script type="text/javascript">
|
878 |
function spider_page_<?php echo $current_view; ?>(cur, x, y, load_more) {
|
879 |
if (typeof load_more == "undefined") {
|
js/bwg.js
CHANGED
@@ -3,7 +3,12 @@ jQuery( function () {
|
|
3 |
if ( jQuery( '.google_font' ).length ) {
|
4 |
jQuery( '.google_font' ).each( function () {
|
5 |
var bwg_google_font = jQuery( this );
|
6 |
-
bwg_google_font.fontselect(
|
|
|
|
|
|
|
|
|
|
|
7 |
input_name = jQuery( this ).closest( 'td' ).find( '.radio_google_fonts' ).children( 'input' ).attr( 'name' );
|
8 |
data_view = input_name + '0';
|
9 |
if ( jQuery( "#" + data_view ).is( ":checked" ) ) {
|
@@ -14,11 +19,11 @@ jQuery( function () {
|
|
14 |
bwg_google_font.next( '.font-select' ).show();
|
15 |
jQuery( '#' + input_name ).hide();
|
16 |
}
|
17 |
-
}
|
18 |
}
|
19 |
jQuery( '.default-font' ).on( 'change', function () {
|
20 |
jQuery( this ).css( { 'font-family': jQuery( this ).val() } );
|
21 |
-
}
|
22 |
|
23 |
/* press ESC hide loading. */
|
24 |
jQuery( document ).keyup( function ( e ) {
|
@@ -2905,3 +2910,21 @@ jQuery(document).mouseup(function(e){
|
|
2905 |
}
|
2906 |
}
|
2907 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
if ( jQuery( '.google_font' ).length ) {
|
4 |
jQuery( '.google_font' ).each( function () {
|
5 |
var bwg_google_font = jQuery( this );
|
6 |
+
bwg_google_font.fontselect({
|
7 |
+
searchable: true,
|
8 |
+
systemFonts: false,
|
9 |
+
}).on('change', function() {
|
10 |
+
applyGoogleFont(bwg_google_font, this.value);
|
11 |
+
});
|
12 |
input_name = jQuery( this ).closest( 'td' ).find( '.radio_google_fonts' ).children( 'input' ).attr( 'name' );
|
13 |
data_view = input_name + '0';
|
14 |
if ( jQuery( "#" + data_view ).is( ":checked" ) ) {
|
19 |
bwg_google_font.next( '.font-select' ).show();
|
20 |
jQuery( '#' + input_name ).hide();
|
21 |
}
|
22 |
+
});
|
23 |
}
|
24 |
jQuery( '.default-font' ).on( 'change', function () {
|
25 |
jQuery( this ).css( { 'font-family': jQuery( this ).val() } );
|
26 |
+
});
|
27 |
|
28 |
/* press ESC hide loading. */
|
29 |
jQuery( document ).keyup( function ( e ) {
|
2910 |
}
|
2911 |
}
|
2912 |
});
|
2913 |
+
|
2914 |
+
|
2915 |
+
function applyGoogleFont(that, font) {
|
2916 |
+
// Replace + signs with spaces for css
|
2917 |
+
font = font.replace(/\+/g, ' ');
|
2918 |
+
// Split font into family and weight/style
|
2919 |
+
font = font.split(':');
|
2920 |
+
var fontFamily = font[0];
|
2921 |
+
var fontSpecs = font[1] || null;
|
2922 |
+
var italic = false, fontWeight = 400;
|
2923 |
+
|
2924 |
+
if (/italic/.test(fontSpecs)) {
|
2925 |
+
italic = true;
|
2926 |
+
fontSpecs = fontSpecs.replace('italic','');
|
2927 |
+
}
|
2928 |
+
fontWeight = +fontSpecs;
|
2929 |
+
that.val(fontFamily);
|
2930 |
+
}
|
js/bwg_frontend.js
CHANGED
@@ -1110,7 +1110,7 @@ function bwg_thumbnail_masonry(that) {
|
|
1110 |
if ( jQuery("#bwg_album_masonry_" + bwg ).length) {
|
1111 |
type = "#bwg_album_masonry_" + bwg;
|
1112 |
}
|
1113 |
-
if( jQuery(".bwg-container-temp" + bwg ).length === 0) {
|
1114 |
jQuery(type).clone().appendTo("#bwg_container3_" + bwg).removeAttr("id").removeClass("bwg-container-" + bwg).addClass("bwg-container-temp" + bwg);
|
1115 |
jQuery(".bwg-container-temp" + bwg).empty();
|
1116 |
}
|
@@ -1174,11 +1174,11 @@ function bwg_thumbnail_masonry(that) {
|
|
1174 |
var order = column_heights.indexOf( Math.min.apply( Math, column_heights ) );
|
1175 |
jQuery( this ).css( { width: min_width + "%", order: order + 1 } );
|
1176 |
if ( jQuery( this ).find("img").attr("data-width").length > 0 && jQuery( this ).find("img").attr("data-height").length > 0 ) {
|
1177 |
-
scale = jQuery( this ).find("img").data("width") / jQuery( this ).find("img").data("height");
|
1178 |
-
scaleHeight = (jQuery( this ).find("img").width() - (thumb_padding / column_count) ) / scale;
|
1179 |
/* calculating height of image title and description */
|
1180 |
/* finding title/description with 'a>' selector to avoid calculating heights for 'Show on hover' option. */
|
1181 |
-
title_h = this.querySelector("a .bwg-zoom-effect-overlay .bwg-title2") || !this.querySelector("a .bwg-title2") ? 0 : this.querySelector("a .bwg-title2").getClientRects()[0].height;
|
1182 |
desc_h = ( jQuery( this ).find('.bwg-masonry-thumb-description').length > 0 ) ? jQuery( this ).find('.bwg-masonry-thumb-description').height() : 0;
|
1183 |
var k = title_h + desc_h;
|
1184 |
jQuery(this).height( Math.floor(scaleHeight + k + (thumb_border * 2)));
|
1110 |
if ( jQuery("#bwg_album_masonry_" + bwg ).length) {
|
1111 |
type = "#bwg_album_masonry_" + bwg;
|
1112 |
}
|
1113 |
+
if ( jQuery(".bwg-container-temp" + bwg ).length === 0 ) {
|
1114 |
jQuery(type).clone().appendTo("#bwg_container3_" + bwg).removeAttr("id").removeClass("bwg-container-" + bwg).addClass("bwg-container-temp" + bwg);
|
1115 |
jQuery(".bwg-container-temp" + bwg).empty();
|
1116 |
}
|
1174 |
var order = column_heights.indexOf( Math.min.apply( Math, column_heights ) );
|
1175 |
jQuery( this ).css( { width: min_width + "%", order: order + 1 } );
|
1176 |
if ( jQuery( this ).find("img").attr("data-width").length > 0 && jQuery( this ).find("img").attr("data-height").length > 0 ) {
|
1177 |
+
scale = parseInt(jQuery( this ).find("img").data("width")) / parseInt(jQuery( this ).find("img").data("height"));
|
1178 |
+
scaleHeight = ( jQuery( this ).find("img").width() - (thumb_padding / column_count) ) / scale;
|
1179 |
/* calculating height of image title and description */
|
1180 |
/* finding title/description with 'a>' selector to avoid calculating heights for 'Show on hover' option. */
|
1181 |
+
title_h = this.querySelector("a .bwg-zoom-effect-overlay .bwg-title2") || !this.querySelector("a .bwg-title1 .bwg-title2") ? 0 : this.querySelector("a .bwg-title1 .bwg-title2").getClientRects()[0].height;
|
1182 |
desc_h = ( jQuery( this ).find('.bwg-masonry-thumb-description').length > 0 ) ? jQuery( this ).find('.bwg-masonry-thumb-description').height() : 0;
|
1183 |
var k = title_h + desc_h;
|
1184 |
jQuery(this).height( Math.floor(scaleHeight + k + (thumb_border * 2)));
|
js/bwg_gallery_box.js
CHANGED
@@ -219,7 +219,7 @@ function gallery_box_ready() {
|
|
219 |
}
|
220 |
});
|
221 |
}
|
222 |
-
|
223 |
jQuery('.bwg_filmstrip').on(mousewheelevt, function(e) {
|
224 |
var evt = window.event || e; /* Equalize event object.*/
|
225 |
evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
|
@@ -345,7 +345,7 @@ function gallery_box_ready() {
|
|
345 |
jQuery( ".bwg_filmstrip_thumbnails" ).stop(true, false);
|
346 |
if ((jQuery(".bwg_filmstrip_thumbnails").position().top) < 0) {
|
347 |
jQuery(".bwg_filmstrip_right").css({opacity: 1});
|
348 |
-
|
349 |
jQuery(".bwg_filmstrip_thumbnails").animate({ top: 0 }, 500, 'linear');
|
350 |
}
|
351 |
else {
|
@@ -432,73 +432,73 @@ function gallery_box_ready() {
|
|
432 |
jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(bwg_click, function() { bwg_ecommerce() });
|
433 |
/* Open/close control buttons.*/
|
434 |
jQuery(".bwg_toggle_container").on(bwg_click, function () {
|
435 |
-
|
436 |
-
|
437 |
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
}
|
469 |
-
else {
|
470 |
-
if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'bottom') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' && gallery_box_data['lightbox_rate_pos'] == 'bottom') {
|
471 |
-
jQuery(".bwg_image_rate").animate({bottom: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
472 |
-
}
|
473 |
-
else if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'top') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'top' && gallery_box_data['lightbox_rate_pos'] == 'top') {
|
474 |
-
jQuery(".bwg_image_rate").animate({top: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
475 |
-
}
|
476 |
-
if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'bottom') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' && gallery_box_data['lightbox_hit_pos'] == 'bottom') {
|
477 |
-
jQuery(".bwg_image_hit").animate({bottom: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
478 |
-
}
|
479 |
-
else if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'top') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'top' && gallery_box_data['lightbox_hit_pos'] == 'top') {
|
480 |
-
jQuery(".bwg_image_hit").animate({top: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
481 |
-
}
|
482 |
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
}
|
500 |
}
|
501 |
-
|
|
|
502 |
});
|
503 |
/* Set window height not full screen */
|
504 |
var bwg_windowheight = window.innerHeight;
|
@@ -782,10 +782,10 @@ function bwg_first_image_load(popup, lightbox_ctrl_btn_pos) {
|
|
782 |
|
783 |
var bwg_ctrl_btn_container_height = jQuery(".bwg_ctrl_btn_container").height();
|
784 |
if (lightbox_ctrl_btn_pos == 'bottom') {
|
785 |
-
|
786 |
}
|
787 |
else if (lightbox_ctrl_btn_pos == 'top') {
|
788 |
-
|
789 |
}
|
790 |
jQuery( ".bwg_spider_popup_loading" ).hide();
|
791 |
if ( gallery_box_data['preload_images'] == 1 ) {
|
@@ -922,6 +922,7 @@ function spider_ajax_save(form_id) {
|
|
922 |
url: jQuery('#' + form_id).attr('action'),
|
923 |
data: post_data,
|
924 |
success: function (data) {
|
|
|
925 |
var str = jQuery(data).find('.bwg_comments').html();
|
926 |
jQuery('.bwg_comments').html(str);
|
927 |
},
|
@@ -947,10 +948,10 @@ function spider_ajax_save(form_id) {
|
|
947 |
}
|
948 |
|
949 |
/* Submit rating. */
|
950 |
-
function spider_rate_ajax_save(form_id) {
|
951 |
var post_data = {};
|
952 |
post_data["image_id"] = jQuery("#" + form_id + " input[name='image_id']").val();
|
953 |
-
post_data["rate"] = jQuery("#" + form_id + " input[name='score']").val();
|
954 |
post_data["ajax_task"] = jQuery("#rate_ajax_task").val();
|
955 |
return jQuery.ajax({
|
956 |
type: "POST",
|
@@ -1001,13 +1002,13 @@ function spider_check_required(id, name) {
|
|
1001 |
|
1002 |
/* Check if privacy polic field is checked. */
|
1003 |
function comment_check_privacy_policy() {
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
}
|
1012 |
|
1013 |
/* Check Email. */
|
@@ -1051,58 +1052,58 @@ function bwg_play_instagram_video(obj,bwg) {
|
|
1051 |
* @returns {boolean}
|
1052 |
*/
|
1053 |
function bwg_add_comment() {
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
post_data['comment_email'] = form.find('#bwg_email').val();
|
1060 |
post_data['comment_text'] = form.find('#bwg_comment').val();
|
1061 |
post_data['comment_captcha'] = form.find('#bwg_captcha_input').val();
|
1062 |
post_data['popup_enable_captcha'] = form.find('#bwg_popup_enable_captcha').val();
|
1063 |
post_data['privacy_policy'] = ( form.find('#bwg_comment_privacy_policy').is(":checked") ) ? 1 : 0;
|
1064 |
-
|
1065 |
post_data['comment_moderation'] = form.find('#bwg_comment_moderation').val();
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
form.find('#bwg_comment').val('');
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
}
|
1107 |
|
1108 |
/**
|
@@ -1112,29 +1113,29 @@ function bwg_add_comment() {
|
|
1112 |
* @returns {boolean}
|
1113 |
*/
|
1114 |
function bwg_remove_comment( id_comment ) {
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
}
|
1139 |
|
1140 |
function bwg_gallery_box( image_id, bwg_container, openEcommerce, gallery_id ) {
|
@@ -1161,7 +1162,7 @@ function bwg_gallery_box( image_id, bwg_container, openEcommerce, gallery_id ) {
|
|
1161 |
var ecommerce = openEcommerce == true ? "&open_ecommerce=1" : "";
|
1162 |
var filtersearchname = jQuery("#bwg_search_input_" + bwg ).val();
|
1163 |
var filtersortby = jQuery("#bwg_order_" + bwg).val() ? "&filtersortby=" + jQuery("#bwg_order_" + bwg).val() : '';
|
1164 |
-
|
1165 |
|
1166 |
if ( typeof gallery_id != "undefined" ) {
|
1167 |
/* Open lightbox with hash.*/
|
@@ -1170,7 +1171,7 @@ function bwg_gallery_box( image_id, bwg_container, openEcommerce, gallery_id ) {
|
|
1170 |
var open_comment = '';
|
1171 |
var open_comment_attr = jQuery('#bwg_blog_style_share_buttons_' + image_id).attr('data-open-comment');
|
1172 |
if (typeof open_comment_attr !== typeof undefined && open_comment_attr !== false) {
|
1173 |
-
|
1174 |
}
|
1175 |
var bwg_random_seed = jQuery("#bwg_random_seed_"+bwg).val();
|
1176 |
spider_createpopup(bwg_lightbox_url + '&bwg_random_seed='+bwg_random_seed+'&image_id=' + image_id + "&filter_tag=" + filterTags + ecommerce + open_comment + '&filter_search_name=' + filtersearchname + filtersortby, bwg, bwg_container.data('popup-width'), bwg_container.data('popup-height'), 1, 'testpopup', 5, bwg_container.data('buttons-position'));
|
@@ -1191,21 +1192,21 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1191 |
jQuery(".bwg_image_info").css("height","auto");
|
1192 |
setTimeout(function(){
|
1193 |
bwg_info_height_set();
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
jQuery("#spider_popup_left").show();
|
1210 |
jQuery("#spider_popup_right").show();
|
1211 |
jQuery(".bwg_image_info").hide();
|
@@ -1301,18 +1302,20 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1301 |
history.replaceState(undefined, undefined, "#bwg" + gallery_box_data['gallery_id'] + "/" + data[key]["id"]);
|
1302 |
}
|
1303 |
jQuery("#bwg_rate_form input[name='image_id']").val(data[key]["id"]);
|
1304 |
-
/*
|
1305 |
-
|
|
|
|
|
|
|
|
|
1306 |
jQuery("#bwg_star").attr("data-score", data[key]["avg_rating"]);
|
1307 |
jQuery("#bwg_star").removeAttr("title");
|
1308 |
data[key]['cur_key'] = key;
|
1309 |
bwg_rating( data[key]["rate"], data[key]["rate_count"], data[key]["avg_rating"], key );
|
1310 |
}
|
1311 |
-
/* Increase image hit counter.*/
|
1312 |
-
spider_set_input_value('rate_ajax_task', 'save_hit_count');
|
1313 |
|
1314 |
-
spider_rate_ajax_save('bwg_rate_form');
|
1315 |
jQuery(".bwg_image_hits span").html(++data[key]["hit_count"]);
|
|
|
1316 |
/* Change image id.*/
|
1317 |
jQuery("#bwg_popup_image").attr('image_id', data[key]["id"]);
|
1318 |
/* Change image title, description.*/
|
@@ -1437,15 +1440,15 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1437 |
if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
|
1438 |
jQuery(".bwg_comments .mCSB_container").css("top","0");
|
1439 |
/* Todo: do not call comments if it's empty */
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
}
|
1450 |
if (jQuery(".bwg_ecommerce_container").hasClass("bwg_open")) {
|
1451 |
/* Pricelist */
|
@@ -1490,7 +1493,7 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1490 |
bwg_afterload();
|
1491 |
}
|
1492 |
if ( typeof instgrm !== 'undefined' && typeof instgrm.Embeds !== 'undefined' ) {
|
1493 |
-
|
1494 |
}
|
1495 |
}
|
1496 |
}
|
@@ -2070,49 +2073,54 @@ function bwg_rating( current_rate, rate_count, avg_rating, cur_key ) {
|
|
2070 |
lightbox_rate_size = gallery_box_data['lightbox_rate_size'];
|
2071 |
lightbox_rate_icon = gallery_box_data['lightbox_rate_icon'];
|
2072 |
var avg_rating_message = "Not rated yet.";
|
2073 |
-
if (avg_rating != 0) {
|
2074 |
-
if (avg_rating != "") {
|
2075 |
avg_rating_message = parseFloat(avg_rating).toFixed(1) + "\n Votes: " + rate_count;
|
2076 |
}
|
2077 |
}
|
2078 |
-
if (typeof jQuery().raty !== 'undefined') {
|
2079 |
-
if (jQuery.isFunction(jQuery().raty)) {
|
2080 |
-
jQuery("#bwg_star").
|
2081 |
-
|
2082 |
-
|
2083 |
-
},
|
2084 |
starType: 'i',
|
2085 |
-
number
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
}
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2116 |
}
|
2117 |
}
|
2118 |
}
|
@@ -2371,55 +2379,55 @@ function bwg_filmstrip_thumb_view( image ) {
|
|
2371 |
|
2372 |
/* Set image info height */
|
2373 |
function bwg_info_height_set(){
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
}
|
2379 |
|
2380 |
/* Set image info position */
|
2381 |
function bwg_info_position( toggle ) {
|
2382 |
-
|
2383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2384 |
|
|
|
2385 |
if (gallery_box_data['lightbox_ctrl_btn_pos'] == 'top') {
|
2386 |
-
|
2387 |
-
|
2388 |
}
|
2389 |
}
|
2390 |
else {
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
}
|
|
|
2395 |
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
number = jQuery(".bwg_ctrl_btn_container").height();
|
2400 |
-
}
|
2401 |
-
}
|
2402 |
-
else {
|
2403 |
-
if (gallery_box_data['lightbox_info_pos'] == 'bottom') {
|
2404 |
-
number = jQuery(".bwg_ctrl_btn_container").height();
|
2405 |
-
}
|
2406 |
-
}
|
2407 |
}
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
|
|
|
|
2416 |
}
|
2417 |
-
else if (type == 'bottom') {
|
2418 |
-
if (toggle == false) {
|
2419 |
-
jQuery(".bwg_image_info").css('bottom', number);
|
2420 |
-
}
|
2421 |
-
else {
|
2422 |
-
jQuery(".bwg_image_info").animate({bottom: number + "px"}, 500);
|
2423 |
-
}
|
2424 |
}
|
2425 |
}
|
219 |
}
|
220 |
});
|
221 |
}
|
222 |
+
var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; /*FF doesn't recognize mousewheel as of FF3.x*/
|
223 |
jQuery('.bwg_filmstrip').on(mousewheelevt, function(e) {
|
224 |
var evt = window.event || e; /* Equalize event object.*/
|
225 |
evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
|
345 |
jQuery( ".bwg_filmstrip_thumbnails" ).stop(true, false);
|
346 |
if ((jQuery(".bwg_filmstrip_thumbnails").position().top) < 0) {
|
347 |
jQuery(".bwg_filmstrip_right").css({opacity: 1});
|
348 |
+
if (jQuery(".bwg_filmstrip_thumbnails").position().top > - (gallery_box_data['filmstrip_thumb_right_left_space'] + gallery_box_data['image_filmstrip_width'])) {
|
349 |
jQuery(".bwg_filmstrip_thumbnails").animate({ top: 0 }, 500, 'linear');
|
350 |
}
|
351 |
else {
|
432 |
jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(bwg_click, function() { bwg_ecommerce() });
|
433 |
/* Open/close control buttons.*/
|
434 |
jQuery(".bwg_toggle_container").on(bwg_click, function () {
|
435 |
+
var bwg_open_toggle_btn_class = (gallery_box_data['lightbox_ctrl_btn_pos'] == 'top') ? 'bwg-icon-caret-up' : 'bwg-icon-caret-down';
|
436 |
+
var bwg_close_toggle_btn_class = (gallery_box_data['lightbox_ctrl_btn_pos'] == 'top') ? 'bwg-icon-caret-down' : 'bwg-icon-caret-up';
|
437 |
|
438 |
+
if (jQuery(".bwg_toggle_container i").hasClass(bwg_open_toggle_btn_class)) {
|
439 |
+
if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'bottom') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' && gallery_box_data['lightbox_rate_pos'] == 'bottom') {
|
440 |
+
jQuery(".bwg_image_rate").animate({bottom: 0}, 500);
|
441 |
+
}
|
442 |
+
else if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'top') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'top' && gallery_box_data['lightbox_rate_pos'] == 'top') {
|
443 |
+
jQuery(".bwg_image_rate").animate({top: 0}, 500);
|
444 |
+
}
|
445 |
+
if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'bottom') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' && gallery_box_data['lightbox_hit_pos'] == 'bottom') {
|
446 |
+
jQuery(".bwg_image_hit").animate({bottom: 0}, 500);
|
447 |
+
}
|
448 |
+
else if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'top') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'top' && gallery_box_data['lightbox_hit_pos'] == 'top') {
|
449 |
+
jQuery(".bwg_image_hit").animate({top: 0}, 500);
|
450 |
+
}
|
451 |
+
if ( gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' ) {
|
452 |
+
jQuery(".bwg_ctrl_btn_container").animate({ bottom : '-' + jQuery(".bwg_ctrl_btn_container").height()}, 500).addClass('closed');
|
453 |
+
jQuery(".bwg_toggle_container").animate({
|
454 |
+
bottom : 0
|
455 |
+
}, {
|
456 |
+
duration: 500,
|
457 |
+
complete: function () { jQuery(".bwg_toggle_container i").attr("class", "bwg_toggle_btn " + bwg_close_toggle_btn_class) }
|
458 |
+
});
|
459 |
+
} else {
|
460 |
+
jQuery(".bwg_ctrl_btn_container").animate({ top : '-' + jQuery(".bwg_ctrl_btn_container").height()}, 500).addClass('closed');
|
461 |
+
jQuery(".bwg_toggle_container").animate({
|
462 |
+
top : 0
|
463 |
+
}, {
|
464 |
+
duration: 500,
|
465 |
+
complete: function () { jQuery(".bwg_toggle_container i").attr("class", "bwg_toggle_btn " + bwg_close_toggle_btn_class) }
|
466 |
+
});
|
467 |
+
}
|
468 |
+
}
|
469 |
+
else {
|
470 |
+
if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'bottom') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' && gallery_box_data['lightbox_rate_pos'] == 'bottom') {
|
471 |
+
jQuery(".bwg_image_rate").animate({bottom: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
472 |
+
}
|
473 |
+
else if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'top') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'top' && gallery_box_data['lightbox_rate_pos'] == 'top') {
|
474 |
+
jQuery(".bwg_image_rate").animate({top: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
475 |
+
}
|
476 |
+
if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'bottom') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' && gallery_box_data['lightbox_hit_pos'] == 'bottom') {
|
477 |
+
jQuery(".bwg_image_hit").animate({bottom: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
478 |
+
}
|
479 |
+
else if ((!gallery_box_data['enable_image_filmstrip'] || gallery_box_data['lightbox_filmstrip_pos'] != 'top') && gallery_box_data['lightbox_ctrl_btn_pos'] == 'top' && gallery_box_data['lightbox_hit_pos'] == 'top') {
|
480 |
+
jQuery(".bwg_image_hit").animate({top: jQuery(".bwg_ctrl_btn_container").height()}, 500);
|
481 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
|
483 |
+
if ( gallery_box_data['lightbox_ctrl_btn_pos'] == 'bottom' ) {
|
484 |
+
jQuery(".bwg_ctrl_btn_container").animate({ bottom: 0 }, 500).removeClass('closed');
|
485 |
+
jQuery(".bwg_toggle_container").animate({
|
486 |
+
bottom : jQuery(".bwg_ctrl_btn_container").height()
|
487 |
+
}, {
|
488 |
+
duration: 500,
|
489 |
+
complete: function () { jQuery(".bwg_toggle_container i").attr("class", "bwg_toggle_btn " + bwg_open_toggle_btn_class) }
|
490 |
+
});
|
491 |
+
} else {
|
492 |
+
jQuery(".bwg_ctrl_btn_container").animate({ top: 0 }, 500).removeClass('closed');
|
493 |
+
jQuery(".bwg_toggle_container").animate({
|
494 |
+
top : jQuery(".bwg_ctrl_btn_container").height()
|
495 |
+
}, {
|
496 |
+
duration: 500,
|
497 |
+
complete: function () { jQuery(".bwg_toggle_container i").attr("class", "bwg_toggle_btn " + bwg_open_toggle_btn_class) }
|
498 |
+
});
|
|
|
499 |
}
|
500 |
+
}
|
501 |
+
bwg_info_position( true );
|
502 |
});
|
503 |
/* Set window height not full screen */
|
504 |
var bwg_windowheight = window.innerHeight;
|
782 |
|
783 |
var bwg_ctrl_btn_container_height = jQuery(".bwg_ctrl_btn_container").height();
|
784 |
if (lightbox_ctrl_btn_pos == 'bottom') {
|
785 |
+
jQuery(".bwg_toggle_container").css("bottom", bwg_ctrl_btn_container_height + "px");
|
786 |
}
|
787 |
else if (lightbox_ctrl_btn_pos == 'top') {
|
788 |
+
jQuery(".bwg_toggle_container").css("top", bwg_ctrl_btn_container_height + "px");
|
789 |
}
|
790 |
jQuery( ".bwg_spider_popup_loading" ).hide();
|
791 |
if ( gallery_box_data['preload_images'] == 1 ) {
|
922 |
url: jQuery('#' + form_id).attr('action'),
|
923 |
data: post_data,
|
924 |
success: function (data) {
|
925 |
+
jQuery('.bwg_comments').mCustomScrollbar('destroy');
|
926 |
var str = jQuery(data).find('.bwg_comments').html();
|
927 |
jQuery('.bwg_comments').html(str);
|
928 |
},
|
948 |
}
|
949 |
|
950 |
/* Submit rating. */
|
951 |
+
function spider_rate_ajax_save(form_id, rate) {
|
952 |
var post_data = {};
|
953 |
post_data["image_id"] = jQuery("#" + form_id + " input[name='image_id']").val();
|
954 |
+
post_data["rate"] = (typeof rate != "undefined") ? rate : jQuery("#" + form_id + " input[name='score']").val();
|
955 |
post_data["ajax_task"] = jQuery("#rate_ajax_task").val();
|
956 |
return jQuery.ajax({
|
957 |
type: "POST",
|
1002 |
|
1003 |
/* Check if privacy polic field is checked. */
|
1004 |
function comment_check_privacy_policy() {
|
1005 |
+
var bwg_submit = jQuery('#bwg_submit');
|
1006 |
+
bwg_submit.removeClass('bwg-submit-disabled');
|
1007 |
+
bwg_submit.removeAttr("disabled");
|
1008 |
+
if ( !jQuery('#bwg_comment_privacy_policy').is(':checked') ) {
|
1009 |
+
bwg_submit.addClass('bwg-submit-disabled');
|
1010 |
+
bwg_submit.attr('disabled', 'disabled');
|
1011 |
+
}
|
1012 |
}
|
1013 |
|
1014 |
/* Check Email. */
|
1052 |
* @returns {boolean}
|
1053 |
*/
|
1054 |
function bwg_add_comment() {
|
1055 |
+
var form = jQuery('#bwg_comment_form');
|
1056 |
+
var url = form.attr('action');
|
1057 |
+
var post_data = {};
|
1058 |
+
post_data['ajax_task'] = 'add_comment';
|
1059 |
+
post_data['comment_name'] = form.find('#bwg_name').val();
|
1060 |
post_data['comment_email'] = form.find('#bwg_email').val();
|
1061 |
post_data['comment_text'] = form.find('#bwg_comment').val();
|
1062 |
post_data['comment_captcha'] = form.find('#bwg_captcha_input').val();
|
1063 |
post_data['popup_enable_captcha'] = form.find('#bwg_popup_enable_captcha').val();
|
1064 |
post_data['privacy_policy'] = ( form.find('#bwg_comment_privacy_policy').is(":checked") ) ? 1 : 0;
|
1065 |
+
post_data['comment_image_id'] = jQuery('#bwg_popup_image').attr('image_id');
|
1066 |
post_data['comment_moderation'] = form.find('#bwg_comment_moderation').val();
|
1067 |
+
jQuery('.bwg_spider_ajax_loading').hide();
|
1068 |
+
jQuery.ajax({
|
1069 |
+
url: url,
|
1070 |
+
type: "POST",
|
1071 |
+
dataType: 'json',
|
1072 |
+
data: post_data,
|
1073 |
+
success: function ( res ) {
|
1074 |
+
jQuery('.bwg_comment_error').text('');
|
1075 |
+
if ( res.error == true ) {
|
1076 |
+
jQuery.each(res.error_messages, function( index, value ) {
|
1077 |
+
if ( value ) {
|
1078 |
+
jQuery('.bwg_comment_'+ index +'_error').text(value);
|
1079 |
+
}
|
1080 |
+
});
|
1081 |
+
}
|
1082 |
+
else {
|
1083 |
form.find('#bwg_comment').val('');
|
1084 |
+
jQuery('.bwg_comment_waiting_message').hide();
|
1085 |
+
if( res.published == 0 ) {
|
1086 |
+
jQuery('.bwg_comment_waiting_message').show();
|
1087 |
+
}
|
1088 |
+
if ( res.html_comments_block != '' ) {
|
1089 |
+
jQuery('#bwg_added_comments').html(res.html_comments_block).show();
|
1090 |
+
}
|
1091 |
+
}
|
1092 |
+
},
|
1093 |
+
beforeSend: function() {
|
1094 |
+
jQuery('.bwg_spider_ajax_loading').show();
|
1095 |
+
},
|
1096 |
+
complete: function() {
|
1097 |
+
if ( form.find('#bwg_comment_privacy_policy').length > 0 ) {
|
1098 |
+
form.find('#bwg_comment_privacy_policy').prop('checked', false);
|
1099 |
+
comment_check_privacy_policy();
|
1100 |
+
}
|
1101 |
+
bwg_captcha_refresh('bwg_captcha');
|
1102 |
+
jQuery('.bwg_spider_ajax_loading').hide();
|
1103 |
+
},
|
1104 |
+
error:function() {}
|
1105 |
+
});
|
1106 |
+
return false;
|
1107 |
}
|
1108 |
|
1109 |
/**
|
1113 |
* @returns {boolean}
|
1114 |
*/
|
1115 |
function bwg_remove_comment( id_comment ) {
|
1116 |
+
var form = jQuery('#bwg_comment_form');
|
1117 |
+
var url = form.attr('action');
|
1118 |
+
var post_data = {};
|
1119 |
+
post_data['ajax_task'] = 'delete_comment';
|
1120 |
+
post_data['id_image'] = jQuery('#bwg_popup_image').attr('image_id');
|
1121 |
+
post_data['id_comment'] = id_comment;
|
1122 |
+
jQuery.ajax({
|
1123 |
+
url: url,
|
1124 |
+
type: "POST",
|
1125 |
+
dataType: 'json',
|
1126 |
+
data: post_data,
|
1127 |
+
success: function ( res ) {
|
1128 |
+
if ( res.error == false) {
|
1129 |
+
jQuery('#bwg_comment_block_' + id_comment ).fadeOut( "slow").remove();
|
1130 |
+
}
|
1131 |
+
},
|
1132 |
+
beforeSend: function() {
|
1133 |
+
},
|
1134 |
+
complete:function() {
|
1135 |
+
},
|
1136 |
+
error:function() {}
|
1137 |
+
});
|
1138 |
+
return false;
|
1139 |
}
|
1140 |
|
1141 |
function bwg_gallery_box( image_id, bwg_container, openEcommerce, gallery_id ) {
|
1162 |
var ecommerce = openEcommerce == true ? "&open_ecommerce=1" : "";
|
1163 |
var filtersearchname = jQuery("#bwg_search_input_" + bwg ).val();
|
1164 |
var filtersortby = jQuery("#bwg_order_" + bwg).val() ? "&filtersortby=" + jQuery("#bwg_order_" + bwg).val() : '';
|
1165 |
+
filtersearchname = filtersearchname ? filtersearchname : '';
|
1166 |
|
1167 |
if ( typeof gallery_id != "undefined" ) {
|
1168 |
/* Open lightbox with hash.*/
|
1171 |
var open_comment = '';
|
1172 |
var open_comment_attr = jQuery('#bwg_blog_style_share_buttons_' + image_id).attr('data-open-comment');
|
1173 |
if (typeof open_comment_attr !== typeof undefined && open_comment_attr !== false) {
|
1174 |
+
open_comment = '&open_comment=1';
|
1175 |
}
|
1176 |
var bwg_random_seed = jQuery("#bwg_random_seed_"+bwg).val();
|
1177 |
spider_createpopup(bwg_lightbox_url + '&bwg_random_seed='+bwg_random_seed+'&image_id=' + image_id + "&filter_tag=" + filterTags + ecommerce + open_comment + '&filter_search_name=' + filtersearchname + filtersortby, bwg, bwg_container.data('popup-width'), bwg_container.data('popup-height'), 1, 'testpopup', 5, bwg_container.data('buttons-position'));
|
1192 |
jQuery(".bwg_image_info").css("height","auto");
|
1193 |
setTimeout(function(){
|
1194 |
bwg_info_height_set();
|
1195 |
+
if(jQuery('.bwg_image_description').height() > jQuery('.bwg_image_info').height() && jQuery('.mCSB_container').hasClass('mCS_no_scrollbar')){
|
1196 |
+
jQuery(".bwg_image_info").mCustomScrollbar("destroy");
|
1197 |
+
}
|
1198 |
+
if (!jQuery('.bwg_image_info').hasClass('mCustomScrollbar')) {
|
1199 |
+
if (typeof jQuery().mCustomScrollbar !== 'undefined' && jQuery.isFunction(jQuery().mCustomScrollbar)) {
|
1200 |
+
jQuery(".bwg_image_info").mCustomScrollbar({
|
1201 |
+
scrollInertia: 150,
|
1202 |
+
theme: 'dark-thick',
|
1203 |
+
advanced:{
|
1204 |
+
updateOnContentResize: true
|
1205 |
+
}
|
1206 |
+
});
|
1207 |
+
}
|
1208 |
+
}
|
1209 |
+
}, 200);
|
1210 |
jQuery("#spider_popup_left").show();
|
1211 |
jQuery("#spider_popup_right").show();
|
1212 |
jQuery(".bwg_image_info").hide();
|
1302 |
history.replaceState(undefined, undefined, "#bwg" + gallery_box_data['gallery_id'] + "/" + data[key]["id"]);
|
1303 |
}
|
1304 |
jQuery("#bwg_rate_form input[name='image_id']").val(data[key]["id"]);
|
1305 |
+
/* Increase image hit counter.*/
|
1306 |
+
spider_set_input_value('rate_ajax_task', 'save_hit_count');
|
1307 |
+
spider_rate_ajax_save('bwg_rate_form');
|
1308 |
+
|
1309 |
+
/* Change image id for rating. */
|
1310 |
+
if ( gallery_box_data['popup_enable_rate'] ) {
|
1311 |
jQuery("#bwg_star").attr("data-score", data[key]["avg_rating"]);
|
1312 |
jQuery("#bwg_star").removeAttr("title");
|
1313 |
data[key]['cur_key'] = key;
|
1314 |
bwg_rating( data[key]["rate"], data[key]["rate_count"], data[key]["avg_rating"], key );
|
1315 |
}
|
|
|
|
|
1316 |
|
|
|
1317 |
jQuery(".bwg_image_hits span").html(++data[key]["hit_count"]);
|
1318 |
+
|
1319 |
/* Change image id.*/
|
1320 |
jQuery("#bwg_popup_image").attr('image_id', data[key]["id"]);
|
1321 |
/* Change image title, description.*/
|
1440 |
if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
|
1441 |
jQuery(".bwg_comments .mCSB_container").css("top","0");
|
1442 |
/* Todo: do not call comments if it's empty */
|
1443 |
+
/* if (data[key]["comment_count"] == 0) {
|
1444 |
+
jQuery("#bwg_added_comments").hide();
|
1445 |
+
}
|
1446 |
+
else {*/
|
1447 |
+
jQuery("#bwg_added_comments").show();
|
1448 |
+
spider_set_input_value('ajax_task', 'display');
|
1449 |
+
spider_set_input_value('image_id', jQuery('#bwg_popup_image').attr('image_id'));
|
1450 |
+
spider_ajax_save('bwg_comment_form');
|
1451 |
+
/* }*/
|
1452 |
}
|
1453 |
if (jQuery(".bwg_ecommerce_container").hasClass("bwg_open")) {
|
1454 |
/* Pricelist */
|
1493 |
bwg_afterload();
|
1494 |
}
|
1495 |
if ( typeof instgrm !== 'undefined' && typeof instgrm.Embeds !== 'undefined' ) {
|
1496 |
+
instgrm.Embeds.process();
|
1497 |
}
|
1498 |
}
|
1499 |
}
|
2073 |
lightbox_rate_size = gallery_box_data['lightbox_rate_size'];
|
2074 |
lightbox_rate_icon = gallery_box_data['lightbox_rate_icon'];
|
2075 |
var avg_rating_message = "Not rated yet.";
|
2076 |
+
if ( avg_rating != 0 ) {
|
2077 |
+
if ( avg_rating != "" ) {
|
2078 |
avg_rating_message = parseFloat(avg_rating).toFixed(1) + "\n Votes: " + rate_count;
|
2079 |
}
|
2080 |
}
|
2081 |
+
if ( typeof jQuery().raty !== 'undefined' ) {
|
2082 |
+
if ( jQuery.isFunction(jQuery().raty) ) {
|
2083 |
+
var curr_score = parseFloat(jQuery("#bwg_star").attr("data-score"));
|
2084 |
+
jQuery("#bwg_star").removeAttr("data-score").html('');
|
2085 |
+
var rate_params = {
|
|
|
2086 |
starType: 'i',
|
2087 |
+
number: lightbox_rate_stars_count,
|
2088 |
+
size: lightbox_rate_size,
|
2089 |
+
noRatedMsg: "Not rated yet.",
|
2090 |
+
readOnly: false,
|
2091 |
+
score: curr_score,
|
2092 |
+
starHalf: 'bwg-icon-' + lightbox_rate_icon + ((lightbox_rate_icon == 'star') ? '-half' : '') + '-o',
|
2093 |
+
starOff: 'bwg-icon-' + lightbox_rate_icon + '-o',
|
2094 |
+
starOn: 'bwg-icon-' + lightbox_rate_icon,
|
2095 |
+
cancelOff: 'bwg-icon-minus-square-o',
|
2096 |
+
cancelOn: 'bwg-icon-minus-square-o',
|
2097 |
+
cancel: false,
|
2098 |
+
// target : '#bwg_hint',
|
2099 |
+
// targetType : 'number',
|
2100 |
+
// targetKeep : true,
|
2101 |
+
cancelHint: 'Cancel your rating.',
|
2102 |
+
hints: [avg_rating_message, avg_rating_message, avg_rating_message, avg_rating_message, avg_rating_message],
|
2103 |
+
alreadyRatedMsg: parseFloat(avg_rating).toFixed(1) + "\n" + "You have already rated.\nVotes: " + rate_count,
|
2104 |
+
};
|
2105 |
+
if (!current_rate) {
|
2106 |
+
rate_params.click = function (score, evt) {
|
2107 |
+
jQuery("#bwg_star").hide();
|
2108 |
+
jQuery("#bwg_rated").show();
|
2109 |
+
spider_set_input_value('rate_ajax_task', 'save_rate');
|
2110 |
+
jQuery.when(spider_rate_ajax_save('bwg_rate_form', score)).then(function () {
|
2111 |
+
gallery_box_data['data'][cur_key]["rate"] = score;
|
2112 |
+
++gallery_box_data['data'][cur_key]["rate_count"];
|
2113 |
+
gallery_box_data['data'][cur_key]["avg_rating"] = curr_score ? ((curr_score + score) / 2).toFixed(1) : score.toFixed(1);
|
2114 |
+
bwg_rating(gallery_box_data['data'][cur_key]["rate"], gallery_box_data['data'][cur_key]["rate_count"], gallery_box_data['data'][cur_key]["avg_rating"], gallery_box_data['current_image_key']);
|
2115 |
+
});
|
2116 |
+
};
|
2117 |
+
}
|
2118 |
+
|
2119 |
+
jQuery("#bwg_star").raty(rate_params);
|
2120 |
+
jQuery('.bwg_image_rate_disabled').hide();
|
2121 |
+
if ( current_rate ) {
|
2122 |
+
jQuery('.bwg_image_rate_disabled').show();
|
2123 |
+
}
|
2124 |
}
|
2125 |
}
|
2126 |
}
|
2379 |
|
2380 |
/* Set image info height */
|
2381 |
function bwg_info_height_set(){
|
2382 |
+
bwg_info_position( false );
|
2383 |
+
if ( jQuery(".mCustomScrollBox").length && jQuery(".bwg_image_info_container1").height() < jQuery(".mCustomScrollBox").height() + jQuery(".bwg_toggle_container").height() + bwg_image_info_pos + 2*( parseInt(gallery_box_data['lightbox_info_margin']))){
|
2384 |
+
jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()- jQuery(".bwg_toggle_container").height()- bwg_image_info_pos - 2*(parseInt(gallery_box_data['lightbox_info_margin']))});
|
2385 |
+
}
|
2386 |
}
|
2387 |
|
2388 |
/* Set image info position */
|
2389 |
function bwg_info_position( toggle ) {
|
2390 |
+
var number = 0;
|
2391 |
+
var type = 'none';
|
2392 |
+
|
2393 |
+
if (gallery_box_data['lightbox_ctrl_btn_pos'] == 'top') {
|
2394 |
+
if (gallery_box_data['lightbox_info_pos'] == 'top') {
|
2395 |
+
type = 'top';
|
2396 |
+
}
|
2397 |
+
}
|
2398 |
+
else {
|
2399 |
+
if (gallery_box_data['lightbox_info_pos'] == 'bottom') {
|
2400 |
+
type = 'bottom';
|
2401 |
+
}
|
2402 |
+
}
|
2403 |
|
2404 |
+
if ( !jQuery('.bwg_ctrl_btn_container').hasClass('closed') ) {
|
2405 |
if (gallery_box_data['lightbox_ctrl_btn_pos'] == 'top') {
|
2406 |
+
if (gallery_box_data['lightbox_info_pos'] == 'top') {
|
2407 |
+
number = jQuery(".bwg_ctrl_btn_container").height();
|
2408 |
}
|
2409 |
}
|
2410 |
else {
|
2411 |
+
if (gallery_box_data['lightbox_info_pos'] == 'bottom') {
|
2412 |
+
number = jQuery(".bwg_ctrl_btn_container").height();
|
2413 |
+
}
|
2414 |
}
|
2415 |
+
}
|
2416 |
|
2417 |
+
if (type == 'top') {
|
2418 |
+
if (toggle == false) {
|
2419 |
+
jQuery(".bwg_image_info").css('top', number);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2420 |
}
|
2421 |
+
else {
|
2422 |
+
jQuery(".bwg_image_info").animate({top: number + "px"}, 500);
|
2423 |
+
}
|
2424 |
+
}
|
2425 |
+
else if (type == 'bottom') {
|
2426 |
+
if (toggle == false) {
|
2427 |
+
jQuery(".bwg_image_info").css('bottom', number);
|
2428 |
+
}
|
2429 |
+
else {
|
2430 |
+
jQuery(".bwg_image_info").animate({bottom: number + "px"}, 500);
|
2431 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2432 |
}
|
2433 |
}
|
js/fontselect/fonts/Action Man.woff
ADDED
Binary file
|
js/fontselect/fonts/Bauer.woff
ADDED
Binary file
|
js/fontselect/fonts/Bubble.woff
ADDED
Binary file
|
js/fontselect/fontselect.css
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.font-select * {
|
2 |
+
-webkit-box-sizing: border-box;
|
3 |
+
box-sizing: border-box;
|
4 |
+
}
|
5 |
+
|
6 |
+
.font-select {
|
7 |
+
font-size: 16px;
|
8 |
+
width: 240px;
|
9 |
+
position: relative;
|
10 |
+
display: inline-block;
|
11 |
+
}
|
12 |
+
|
13 |
+
.font-select .fs-drop {
|
14 |
+
position: absolute;
|
15 |
+
top: 38px;
|
16 |
+
left: 0;
|
17 |
+
z-index: 999;
|
18 |
+
background: #fff;
|
19 |
+
color: #000;
|
20 |
+
width: 100%;
|
21 |
+
border: 1px solid #aaa;
|
22 |
+
border-top: 0;
|
23 |
+
box-shadow: 0 4px 5px rgba(0,0,0,.15);
|
24 |
+
border-radius: 0 0 4px 4px;
|
25 |
+
}
|
26 |
+
|
27 |
+
.font-select > span {
|
28 |
+
outline: 0;
|
29 |
+
border-radius: 0.25rem;
|
30 |
+
border: 1px solid #ced4da;
|
31 |
+
display: block;
|
32 |
+
overflow: hidden;
|
33 |
+
white-space: nowrap;
|
34 |
+
text-overflow: ellipsis;
|
35 |
+
height: 38px;
|
36 |
+
line-height: 32px;
|
37 |
+
padding: 3px 8px 3px 8px;
|
38 |
+
color: #444;
|
39 |
+
background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23303030' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
|
40 |
+
-webkit-user-select: none;
|
41 |
+
-moz-user-select: none;
|
42 |
+
-ms-user-select: none;
|
43 |
+
user-select: none;
|
44 |
+
}
|
45 |
+
|
46 |
+
.font-select-active > span {
|
47 |
+
background-color: #eee;
|
48 |
+
border-bottom-left-radius : 0;
|
49 |
+
border-bottom-right-radius: 0;
|
50 |
+
}
|
51 |
+
|
52 |
+
.font-select .fs-results {
|
53 |
+
max-height: 190px;
|
54 |
+
overflow-x: hidden;
|
55 |
+
overflow-y: auto;
|
56 |
+
margin: 0;
|
57 |
+
padding: 0;
|
58 |
+
}
|
59 |
+
|
60 |
+
.font-select .fs-results li {
|
61 |
+
line-height: 80%;
|
62 |
+
padding: 8px;
|
63 |
+
margin: 0;
|
64 |
+
list-style: none;
|
65 |
+
font-size: 18px;
|
66 |
+
white-space: nowrap;
|
67 |
+
}
|
68 |
+
|
69 |
+
.font-select .fs-results li.active {
|
70 |
+
background-color: #3875d7;
|
71 |
+
color: #fff;
|
72 |
+
cursor: pointer;
|
73 |
+
}
|
74 |
+
|
75 |
+
.font-select .fs-search {
|
76 |
+
border-bottom: 1px solid #aaa;
|
77 |
+
padding: 4px;
|
78 |
+
}
|
79 |
+
|
80 |
+
.font-select .fs-search input {
|
81 |
+
padding: 7px;
|
82 |
+
width: 100%;
|
83 |
+
border: 1px solid #aaa;
|
84 |
+
font: 16px Helvetica, Sans-serif;
|
85 |
+
box-shadow: inset 0 1px 3px rgba(0,0,0,.06);
|
86 |
+
border-radius: .1875rem;
|
87 |
+
}
|
88 |
+
|
89 |
+
|
js/fontselect/fontselect.js
ADDED
@@ -0,0 +1,1314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery.fontselect - A font selector for system fonts, local fonts and Google Web Fonts
|
3 |
+
*
|
4 |
+
* Made by Arjan Haverkamp, https://www.webgear.nl
|
5 |
+
* Based on original by Tom Moor, http://tommoor.com
|
6 |
+
* Copyright (c) 2011 Tom Moor, 2019-2020 Arjan Haverkamp
|
7 |
+
* MIT Licensed
|
8 |
+
* @version 1.0 - 2020-02-26
|
9 |
+
* @url https://github.com/av01d/fontselect-jquery-plugin
|
10 |
+
*/
|
11 |
+
|
12 |
+
(function($){
|
13 |
+
|
14 |
+
var fontsLoaded = {};
|
15 |
+
|
16 |
+
$.fn.fontselect = function(options) {
|
17 |
+
var __bind = function(fn, me) { return function(){ return fn.apply(me, arguments); }; };
|
18 |
+
|
19 |
+
var settings = {
|
20 |
+
style: 'font-select',
|
21 |
+
placeholder: 'Select a font',
|
22 |
+
placeholderSearch: 'Search...',
|
23 |
+
searchable: true,
|
24 |
+
lookahead: 2,
|
25 |
+
googleApi: 'https://fonts.googleapis.com/css?family=',
|
26 |
+
localFontsUrl: '/fonts/',
|
27 |
+
systemFonts: 'Arial|Helvetica+Neue|Courier+New|Times+New+Roman|Comic+Sans+MS|Verdana|Impact'.split('|'),
|
28 |
+
|
29 |
+
googleFonts: [
|
30 |
+
"ABeeZee:400,italic",
|
31 |
+
"Abel:400",
|
32 |
+
"Abhaya+Libre:400,500,600,700,800",
|
33 |
+
"Abril+Fatface:400",
|
34 |
+
"Aclonica:400",
|
35 |
+
"Acme:400",
|
36 |
+
"Actor:400",
|
37 |
+
"Adamina:400",
|
38 |
+
"Advent+Pro:100,200,300,400,500,600,700",
|
39 |
+
"Aguafina+Script:400",
|
40 |
+
"Akronim:400",
|
41 |
+
"Aladin:400",
|
42 |
+
"Alata:400",
|
43 |
+
"Alatsi:400",
|
44 |
+
"Aldrich:400",
|
45 |
+
"Alef:400,700",
|
46 |
+
"Alegreya:400,italic,500,500italic,700,700italic,800,800italic,900,900italic",
|
47 |
+
"Alegreya+SC:400,italic,500,500italic,700,700italic,800,800italic,900,900italic",
|
48 |
+
"Alegreya+Sans:100,100italic,300,300italic,400,italic,500,500italic,700,700italic,800,800italic,900,900italic",
|
49 |
+
"Alegreya+Sans+SC:100,100italic,300,300italic,400,italic,500,500italic,700,700italic,800,800italic,900,900italic",
|
50 |
+
"Aleo:300,300italic,400,italic,700,700italic",
|
51 |
+
"Alex+Brush:400",
|
52 |
+
"Alfa+Slab+One:400",
|
53 |
+
"Alice:400",
|
54 |
+
"Alike:400",
|
55 |
+
"Alike+Angular:400",
|
56 |
+
"Allan:400,700",
|
57 |
+
"Allerta:400",
|
58 |
+
"Allerta+Stencil:400",
|
59 |
+
"Allura:400",
|
60 |
+
"Almarai:300,400,700,800",
|
61 |
+
"Almendra:400,italic,700,700italic",
|
62 |
+
"Almendra+Display:400",
|
63 |
+
"Almendra+SC:400",
|
64 |
+
"Amarante:400",
|
65 |
+
"Amaranth:400,italic,700,700italic",
|
66 |
+
"Amatic+SC:400,700",
|
67 |
+
"Amethysta:400",
|
68 |
+
"Amiko:400,600,700",
|
69 |
+
"Amiri:400,italic,700,700italic",
|
70 |
+
"Amita:400,700",
|
71 |
+
"Anaheim:400",
|
72 |
+
"Andada:400",
|
73 |
+
"Andika:400",
|
74 |
+
"Angkor:400",
|
75 |
+
"Annie+Use+Your+Telescope:400",
|
76 |
+
"Anonymous+Pro:400,italic,700,700italic",
|
77 |
+
"Antic:400",
|
78 |
+
"Antic+Didone:400",
|
79 |
+
"Antic+Slab:400",
|
80 |
+
"Anton:400",
|
81 |
+
"Arapey:400,italic",
|
82 |
+
"Arbutus:400",
|
83 |
+
"Arbutus+Slab:400",
|
84 |
+
"Architects+Daughter:400",
|
85 |
+
"Archivo:400,italic,500,500italic,600,600italic,700,700italic",
|
86 |
+
"Archivo+Black:400",
|
87 |
+
"Archivo+Narrow:400,italic,500,500italic,600,600italic,700,700italic",
|
88 |
+
"Aref+Ruqaa:400,700",
|
89 |
+
"Arima+Madurai:100,200,300,400,500,700,800,900",
|
90 |
+
"Arimo:400,italic,700,700italic",
|
91 |
+
"Arizonia:400",
|
92 |
+
"Armata:400",
|
93 |
+
"Arsenal:400,italic,700,700italic",
|
94 |
+
"Artifika:400",
|
95 |
+
"Arvo:400,italic,700,700italic",
|
96 |
+
"Arya:400,700",
|
97 |
+
"Asap:400,italic,500,500italic,600,600italic,700,700italic",
|
98 |
+
"Asap+Condensed:400,italic,500,500italic,600,600italic,700,700italic",
|
99 |
+
"Asar:400",
|
100 |
+
"Asset:400",
|
101 |
+
"Assistant:200,300,400,600,700,800",
|
102 |
+
"Astloch:400,700",
|
103 |
+
"Asul:400,700",
|
104 |
+
"Athiti:200,300,400,500,600,700",
|
105 |
+
"Atma:300,400,500,600,700",
|
106 |
+
"Atomic+Age:400",
|
107 |
+
"Aubrey:400",
|
108 |
+
"Audiowide:400",
|
109 |
+
"Autour+One:400",
|
110 |
+
"Average:400",
|
111 |
+
"Average+Sans:400",
|
112 |
+
"Averia+Gruesa+Libre:400",
|
113 |
+
"Averia+Libre:300,300italic,400,italic,700,700italic",
|
114 |
+
"Averia+Sans+Libre:300,300italic,400,italic,700,700italic",
|
115 |
+
"Averia+Serif+Libre:300,300italic,400,italic,700,700italic",
|
116 |
+
"B612:400,italic,700,700italic",
|
117 |
+
"B612+Mono:400,italic,700,700italic",
|
118 |
+
"Bad+Script:400",
|
119 |
+
"Bahiana:400",
|
120 |
+
"Bahianita:400",
|
121 |
+
"Bai+Jamjuree:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
122 |
+
"Baloo:400",
|
123 |
+
"Baloo+Bhai:400",
|
124 |
+
"Baloo+Bhaijaan:400",
|
125 |
+
"Baloo+Bhaina:400",
|
126 |
+
"Baloo+Chettan:400",
|
127 |
+
"Baloo+Da:400",
|
128 |
+
"Baloo+Paaji:400",
|
129 |
+
"Baloo+Tamma:400",
|
130 |
+
"Baloo+Tammudu:400",
|
131 |
+
"Baloo+Thambi:400",
|
132 |
+
"Balthazar:400",
|
133 |
+
"Bangers:400",
|
134 |
+
"Barlow:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
135 |
+
"Barlow+Condensed:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
136 |
+
"Barlow+Semi+Condensed:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
137 |
+
"Barriecito:400",
|
138 |
+
"Barrio:400",
|
139 |
+
"Basic:400",
|
140 |
+
"Baskervville:400,italic",
|
141 |
+
"Battambang:400,700",
|
142 |
+
"Baumans:400",
|
143 |
+
"Bayon:400",
|
144 |
+
"Be+Vietnam:100,100italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic",
|
145 |
+
"Bebas+Neue:400",
|
146 |
+
"Belgrano:400",
|
147 |
+
"Bellefair:400",
|
148 |
+
"Belleza:400",
|
149 |
+
"BenchNine:300,400,700",
|
150 |
+
"Bentham:400",
|
151 |
+
"Berkshire+Swash:400",
|
152 |
+
"Beth+Ellen:400",
|
153 |
+
"Bevan:400",
|
154 |
+
"Big+Shoulders+Display:100,300,400,500,600,700,800,900",
|
155 |
+
"Big+Shoulders+Text:100,300,400,500,600,700,800,900",
|
156 |
+
"Bigelow+Rules:400",
|
157 |
+
"Bigshot+One:400",
|
158 |
+
"Bilbo:400",
|
159 |
+
"Bilbo+Swash+Caps:400",
|
160 |
+
"BioRhyme:200,300,400,700,800",
|
161 |
+
"BioRhyme+Expanded:200,300,400,700,800",
|
162 |
+
"Biryani:200,300,400,600,700,800,900",
|
163 |
+
"Bitter:400,italic,700",
|
164 |
+
"Black+And+White+Picture:400",
|
165 |
+
"Black+Han+Sans:400",
|
166 |
+
"Black+Ops+One:400",
|
167 |
+
"Blinker:100,200,300,400,600,700,800,900",
|
168 |
+
"Bokor:400",
|
169 |
+
"Bonbon:400",
|
170 |
+
"Boogaloo:400",
|
171 |
+
"Bowlby+One:400",
|
172 |
+
"Bowlby+One+SC:400",
|
173 |
+
"Brawler:400",
|
174 |
+
"Bree+Serif:400",
|
175 |
+
"Bubblegum+Sans:400",
|
176 |
+
"Bubbler+One:400",
|
177 |
+
"Buda:300",
|
178 |
+
"Buenard:400,700",
|
179 |
+
"Bungee:400",
|
180 |
+
"Bungee+Hairline:400",
|
181 |
+
"Bungee+Inline:400",
|
182 |
+
"Bungee+Outline:400",
|
183 |
+
"Bungee+Shade:400",
|
184 |
+
"Butcherman:400",
|
185 |
+
"Butterfly+Kids:400",
|
186 |
+
"Cabin:400,italic,500,500italic,600,600italic,700,700italic",
|
187 |
+
"Cabin+Condensed:400,500,600,700",
|
188 |
+
"Cabin+Sketch:400,700",
|
189 |
+
"Caesar+Dressing:400",
|
190 |
+
"Cagliostro:400",
|
191 |
+
"Cairo:200,300,400,600,700,900",
|
192 |
+
"Calistoga:400",
|
193 |
+
"Calligraffitti:400",
|
194 |
+
"Cambay:400,italic,700,700italic",
|
195 |
+
"Cambo:400",
|
196 |
+
"Candal:400",
|
197 |
+
"Cantarell:400,italic,700,700italic",
|
198 |
+
"Cantata+One:400",
|
199 |
+
"Cantora+One:400",
|
200 |
+
"Capriola:400",
|
201 |
+
"Cardo:400,italic,700",
|
202 |
+
"Carme:400",
|
203 |
+
"Carrois+Gothic:400",
|
204 |
+
"Carrois+Gothic+SC:400",
|
205 |
+
"Carter+One:400",
|
206 |
+
"Catamaran:100,200,300,400,500,600,700,800,900",
|
207 |
+
"Caudex:400,italic,700,700italic",
|
208 |
+
"Caveat:400,700",
|
209 |
+
"Caveat+Brush:400",
|
210 |
+
"Cedarville+Cursive:400",
|
211 |
+
"Ceviche+One:400",
|
212 |
+
"Chakra+Petch:300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
213 |
+
"Changa:200,300,400,500,600,700,800",
|
214 |
+
"Changa+One:400,italic",
|
215 |
+
"Chango:400",
|
216 |
+
"Charm:400,700",
|
217 |
+
"Charmonman:400,700",
|
218 |
+
"Chathura:100,300,400,700,800",
|
219 |
+
"Chau+Philomene+One:400,italic",
|
220 |
+
"Chela+One:400",
|
221 |
+
"Chelsea+Market:400",
|
222 |
+
"Chenla:400",
|
223 |
+
"Cherry+Cream+Soda:400",
|
224 |
+
"Cherry+Swash:400,700",
|
225 |
+
"Chewy:400",
|
226 |
+
"Chicle:400",
|
227 |
+
"Chilanka:400",
|
228 |
+
"Chivo:300,300italic,400,italic,700,700italic,900,900italic",
|
229 |
+
"Chonburi:400",
|
230 |
+
"Cinzel:400,700,900",
|
231 |
+
"Cinzel+Decorative:400,700,900",
|
232 |
+
"Clicker+Script:400",
|
233 |
+
"Coda:400,800",
|
234 |
+
"Coda+Caption:800",
|
235 |
+
"Codystar:300,400",
|
236 |
+
"Coiny:400",
|
237 |
+
"Combo:400",
|
238 |
+
"Comfortaa:300,400,500,600,700",
|
239 |
+
"Coming+Soon:400",
|
240 |
+
"Concert+One:400",
|
241 |
+
"Condiment:400",
|
242 |
+
"Content:400,700",
|
243 |
+
"Contrail+One:400",
|
244 |
+
"Convergence:400",
|
245 |
+
"Cookie:400",
|
246 |
+
"Copse:400",
|
247 |
+
"Corben:400,700",
|
248 |
+
"Cormorant:300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
249 |
+
"Cormorant+Garamond:300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
250 |
+
"Cormorant+Infant:300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
251 |
+
"Cormorant+SC:300,400,500,600,700",
|
252 |
+
"Cormorant+Unicase:300,400,500,600,700",
|
253 |
+
"Cormorant+Upright:300,400,500,600,700",
|
254 |
+
"Courgette:400",
|
255 |
+
"Courier+Prime:400,italic,700,700italic",
|
256 |
+
"Cousine:400,italic,700,700italic",
|
257 |
+
"Coustard:400,900",
|
258 |
+
"Covered+By+Your+Grace:400",
|
259 |
+
"Crafty+Girls:400",
|
260 |
+
"Creepster:400",
|
261 |
+
"Crete+Round:400,italic",
|
262 |
+
"Crimson+Pro:200,300,400,500,600,700,800,900,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic",
|
263 |
+
"Crimson+Text:400,italic,600,600italic,700,700italic",
|
264 |
+
"Croissant+One:400",
|
265 |
+
"Crushed:400",
|
266 |
+
"Cuprum:400,italic,700,700italic",
|
267 |
+
"Cute+Font:400",
|
268 |
+
"Cutive:400",
|
269 |
+
"Cutive+Mono:400",
|
270 |
+
"DM+Sans:400,italic,500,500italic,700,700italic",
|
271 |
+
"DM+Serif+Display:400,italic",
|
272 |
+
"DM+Serif+Text:400,italic",
|
273 |
+
"Damion:400",
|
274 |
+
"Dancing+Script:400,500,600,700",
|
275 |
+
"Dangrek:400",
|
276 |
+
"Darker+Grotesque:300,400,500,600,700,800,900",
|
277 |
+
"David+Libre:400,500,700",
|
278 |
+
"Dawning+of+a+New+Day:400",
|
279 |
+
"Days+One:400",
|
280 |
+
"Dekko:400",
|
281 |
+
"Delius:400",
|
282 |
+
"Delius+Swash+Caps:400",
|
283 |
+
"Delius+Unicase:400,700",
|
284 |
+
"Della+Respira:400",
|
285 |
+
"Denk+One:400",
|
286 |
+
"Devonshire:400",
|
287 |
+
"Dhurjati:400",
|
288 |
+
"Didact+Gothic:400",
|
289 |
+
"Diplomata:400",
|
290 |
+
"Diplomata+SC:400",
|
291 |
+
"Do+Hyeon:400",
|
292 |
+
"Dokdo:400",
|
293 |
+
"Domine:400,700",
|
294 |
+
"Donegal+One:400",
|
295 |
+
"Doppio+One:400",
|
296 |
+
"Dorsa:400",
|
297 |
+
"Dosis:200,300,400,500,600,700,800",
|
298 |
+
"Dr+Sugiyama:400",
|
299 |
+
"Duru+Sans:400",
|
300 |
+
"Dynalight:400",
|
301 |
+
"EB+Garamond:400,500,600,700,800,italic,500italic,600italic,700italic,800italic",
|
302 |
+
"Eagle+Lake:400",
|
303 |
+
"East+Sea+Dokdo:400",
|
304 |
+
"Eater:400",
|
305 |
+
"Economica:400,italic,700,700italic",
|
306 |
+
"Eczar:400,500,600,700,800",
|
307 |
+
"El+Messiri:400,500,600,700",
|
308 |
+
"Electrolize:400",
|
309 |
+
"Elsie:400,900",
|
310 |
+
"Elsie+Swash+Caps:400,900",
|
311 |
+
"Emblema+One:400",
|
312 |
+
"Emilys+Candy:400",
|
313 |
+
"Encode+Sans:100,200,300,400,500,600,700,800,900",
|
314 |
+
"Encode+Sans+Condensed:100,200,300,400,500,600,700,800,900",
|
315 |
+
"Encode+Sans+Expanded:100,200,300,400,500,600,700,800,900",
|
316 |
+
"Encode+Sans+Semi+Condensed:100,200,300,400,500,600,700,800,900",
|
317 |
+
"Encode+Sans+Semi+Expanded:100,200,300,400,500,600,700,800,900",
|
318 |
+
"Engagement:400",
|
319 |
+
"Englebert:400",
|
320 |
+
"Enriqueta:400,500,600,700",
|
321 |
+
"Erica+One:400",
|
322 |
+
"Esteban:400",
|
323 |
+
"Euphoria+Script:400",
|
324 |
+
"Ewert:400",
|
325 |
+
"Exo:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
326 |
+
"Exo+2:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
327 |
+
"Expletus+Sans:400,italic,500,500italic,600,600italic,700,700italic",
|
328 |
+
"Fahkwang:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
329 |
+
"Fanwood+Text:400,italic",
|
330 |
+
"Farro:300,400,500,700",
|
331 |
+
"Farsan:400",
|
332 |
+
"Fascinate:400",
|
333 |
+
"Fascinate+Inline:400",
|
334 |
+
"Faster+One:400",
|
335 |
+
"Fasthand:400",
|
336 |
+
"Fauna+One:400",
|
337 |
+
"Faustina:400,500,600,700,italic,500italic,600italic,700italic",
|
338 |
+
"Federant:400",
|
339 |
+
"Federo:400",
|
340 |
+
"Felipa:400",
|
341 |
+
"Fenix:400",
|
342 |
+
"Finger+Paint:400",
|
343 |
+
"Fira+Code:300,400,500,600,700",
|
344 |
+
"Fira+Mono:400,500,700",
|
345 |
+
"Fira+Sans:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
346 |
+
"Fira+Sans+Condensed:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
347 |
+
"Fira+Sans+Extra+Condensed:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
348 |
+
"Fjalla+One:400",
|
349 |
+
"Fjord+One:400",
|
350 |
+
"Flamenco:300,400",
|
351 |
+
"Flavors:400",
|
352 |
+
"Fondamento:400,italic",
|
353 |
+
"Fontdiner+Swanky:400",
|
354 |
+
"Forum:400",
|
355 |
+
"Francois+One:400",
|
356 |
+
"Frank+Ruhl+Libre:300,400,500,700,900",
|
357 |
+
"Freckle+Face:400",
|
358 |
+
"Fredericka+the+Great:400",
|
359 |
+
"Fredoka+One:400",
|
360 |
+
"Freehand:400",
|
361 |
+
"Fresca:400",
|
362 |
+
"Frijole:400",
|
363 |
+
"Fruktur:400",
|
364 |
+
"Fugaz+One:400",
|
365 |
+
"GFS+Didot:400",
|
366 |
+
"GFS+Neohellenic:400,italic,700,700italic",
|
367 |
+
"Gabriela:400",
|
368 |
+
"Gaegu:300,400,700",
|
369 |
+
"Gafata:400",
|
370 |
+
"Galada:400",
|
371 |
+
"Galdeano:400",
|
372 |
+
"Galindo:400",
|
373 |
+
"Gamja+Flower:400",
|
374 |
+
"Gayathri:100,400,700",
|
375 |
+
"Gelasio:400,italic,500,500italic,600,600italic,700,700italic",
|
376 |
+
"Gentium+Basic:400,italic,700,700italic",
|
377 |
+
"Gentium+Book+Basic:400,italic,700,700italic",
|
378 |
+
"Geo:400,italic",
|
379 |
+
"Geostar:400",
|
380 |
+
"Geostar+Fill:400",
|
381 |
+
"Germania+One:400",
|
382 |
+
"Gidugu:400",
|
383 |
+
"Gilda+Display:400",
|
384 |
+
"Girassol:400",
|
385 |
+
"Give+You+Glory:400",
|
386 |
+
"Glass+Antiqua:400",
|
387 |
+
"Glegoo:400,700",
|
388 |
+
"Gloria+Hallelujah:400",
|
389 |
+
"Goblin+One:400",
|
390 |
+
"Gochi+Hand:400",
|
391 |
+
"Gorditas:400,700",
|
392 |
+
"Gothic+A1:100,200,300,400,500,600,700,800,900",
|
393 |
+
"Goudy+Bookletter+1911:400",
|
394 |
+
"Graduate:400",
|
395 |
+
"Grand+Hotel:400",
|
396 |
+
"Gravitas+One:400",
|
397 |
+
"Great+Vibes:400",
|
398 |
+
"Grenze:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
399 |
+
"Griffy:400",
|
400 |
+
"Gruppo:400",
|
401 |
+
"Gudea:400,italic,700",
|
402 |
+
"Gugi:400",
|
403 |
+
"Gupter:400,500,700",
|
404 |
+
"Gurajada:400",
|
405 |
+
"Habibi:400",
|
406 |
+
"Halant:300,400,500,600,700",
|
407 |
+
"Hammersmith+One:400",
|
408 |
+
"Hanalei:400",
|
409 |
+
"Hanalei+Fill:400",
|
410 |
+
"Handlee:400",
|
411 |
+
"Hanuman:400,700",
|
412 |
+
"Happy+Monkey:400",
|
413 |
+
"Harmattan:400",
|
414 |
+
"Headland+One:400",
|
415 |
+
"Heebo:100,300,400,500,700,800,900",
|
416 |
+
"Henny+Penny:400",
|
417 |
+
"Hepta+Slab:100,200,300,400,500,600,700,800,900",
|
418 |
+
"Herr+Von+Muellerhoff:400",
|
419 |
+
"Hi+Melody:400",
|
420 |
+
"Hind:300,400,500,600,700",
|
421 |
+
"Hind+Guntur:300,400,500,600,700",
|
422 |
+
"Hind+Madurai:300,400,500,600,700",
|
423 |
+
"Hind+Siliguri:300,400,500,600,700",
|
424 |
+
"Hind+Vadodara:300,400,500,600,700",
|
425 |
+
"Holtwood+One+SC:400",
|
426 |
+
"Homemade+Apple:400",
|
427 |
+
"Homenaje:400",
|
428 |
+
"IBM+Plex+Mono:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
429 |
+
"IBM+Plex+Sans:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
430 |
+
"IBM+Plex+Sans+Condensed:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
431 |
+
"IBM+Plex+Serif:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
432 |
+
"IM+Fell+DW+Pica:400,italic",
|
433 |
+
"IM+Fell+DW+Pica+SC:400",
|
434 |
+
"IM+Fell+Double+Pica:400,italic",
|
435 |
+
"IM+Fell+Double+Pica+SC:400",
|
436 |
+
"IM+Fell+English:400,italic",
|
437 |
+
"IM+Fell+English+SC:400",
|
438 |
+
"IM+Fell+French+Canon:400,italic",
|
439 |
+
"IM+Fell+French+Canon+SC:400",
|
440 |
+
"IM+Fell+Great+Primer:400,italic",
|
441 |
+
"IM+Fell+Great+Primer+SC:400",
|
442 |
+
"Ibarra+Real+Nova:400,italic,600,600italic,700,700italic",
|
443 |
+
"Iceberg:400",
|
444 |
+
"Iceland:400",
|
445 |
+
"Imprima:400",
|
446 |
+
"Inconsolata:400,700",
|
447 |
+
"Inder:400",
|
448 |
+
"Indie+Flower:400",
|
449 |
+
"Inika:400,700",
|
450 |
+
"Inknut+Antiqua:300,400,500,600,700,800,900",
|
451 |
+
"Inria+Serif:300,300italic,400,italic,700,700italic",
|
452 |
+
"Irish+Grover:400",
|
453 |
+
"Istok+Web:400,italic,700,700italic",
|
454 |
+
"Italiana:400",
|
455 |
+
"Italianno:400",
|
456 |
+
"Itim:400",
|
457 |
+
"Jacques+Francois:400",
|
458 |
+
"Jacques+Francois+Shadow:400",
|
459 |
+
"Jaldi:400,700",
|
460 |
+
"Jim+Nightshade:400",
|
461 |
+
"Jockey+One:400",
|
462 |
+
"Jolly+Lodger:400",
|
463 |
+
"Jomhuria:400",
|
464 |
+
"Jomolhari:400",
|
465 |
+
"Josefin+Sans:100,100italic,300,300italic,400,italic,600,600italic,700,700italic",
|
466 |
+
"Josefin+Slab:100,100italic,300,300italic,400,italic,600,600italic,700,700italic",
|
467 |
+
"Joti+One:400",
|
468 |
+
"Jua:400",
|
469 |
+
"Judson:400,italic,700",
|
470 |
+
"Julee:400",
|
471 |
+
"Julius+Sans+One:400",
|
472 |
+
"Junge:400",
|
473 |
+
"Jura:300,400,500,600,700",
|
474 |
+
"Just+Another+Hand:400",
|
475 |
+
"Just+Me+Again+Down+Here:400",
|
476 |
+
"K2D:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic",
|
477 |
+
"Kadwa:400,700",
|
478 |
+
"Kalam:300,400,700",
|
479 |
+
"Kameron:400,700",
|
480 |
+
"Kanit:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
481 |
+
"Kantumruy:300,400,700",
|
482 |
+
"Karla:400,italic,700,700italic",
|
483 |
+
"Karma:300,400,500,600,700",
|
484 |
+
"Katibeh:400",
|
485 |
+
"Kaushan+Script:400",
|
486 |
+
"Kavivanar:400",
|
487 |
+
"Kavoon:400",
|
488 |
+
"Kdam+Thmor:400",
|
489 |
+
"Keania+One:400",
|
490 |
+
"Kelly+Slab:400",
|
491 |
+
"Kenia:400",
|
492 |
+
"Khand:300,400,500,600,700",
|
493 |
+
"Khmer:400",
|
494 |
+
"Khula:300,400,600,700,800",
|
495 |
+
"Kirang+Haerang:400",
|
496 |
+
"Kite+One:400",
|
497 |
+
"Knewave:400",
|
498 |
+
"KoHo:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
499 |
+
"Kodchasan:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
500 |
+
"Kosugi:400",
|
501 |
+
"Kosugi+Maru:400",
|
502 |
+
"Kotta+One:400",
|
503 |
+
"Koulen:400",
|
504 |
+
"Kranky:400",
|
505 |
+
"Kreon:300,400,500,600,700",
|
506 |
+
"Kristi:400",
|
507 |
+
"Krona+One:400",
|
508 |
+
"Krub:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
509 |
+
"Kulim+Park:200,200italic,300,300italic,400,italic,600,600italic,700,700italic",
|
510 |
+
"Kumar+One:400",
|
511 |
+
"Kumar+One+Outline:400",
|
512 |
+
"Kurale:400",
|
513 |
+
"La+Belle+Aurore:400",
|
514 |
+
"Lacquer:400",
|
515 |
+
"Laila:300,400,500,600,700",
|
516 |
+
"Lakki+Reddy:400",
|
517 |
+
"Lalezar:400",
|
518 |
+
"Lancelot:400",
|
519 |
+
"Lateef:400",
|
520 |
+
"Lato:100,100italic,300,300italic,400,italic,700,700italic,900,900italic",
|
521 |
+
"League+Script:400",
|
522 |
+
"Leckerli+One:400",
|
523 |
+
"Ledger:400",
|
524 |
+
"Lekton:400,italic,700",
|
525 |
+
"Lemon:400",
|
526 |
+
"Lemonada:300,400,500,600,700",
|
527 |
+
"Lexend+Deca:400",
|
528 |
+
"Lexend+Exa:400",
|
529 |
+
"Lexend+Giga:400",
|
530 |
+
"Lexend+Mega:400",
|
531 |
+
"Lexend+Peta:400",
|
532 |
+
"Lexend+Tera:400",
|
533 |
+
"Lexend+Zetta:400",
|
534 |
+
"Libre+Barcode+128:400",
|
535 |
+
"Libre+Barcode+128+Text:400",
|
536 |
+
"Libre+Barcode+39:400",
|
537 |
+
"Libre+Barcode+39+Extended:400",
|
538 |
+
"Libre+Barcode+39+Extended+Text:400",
|
539 |
+
"Libre+Barcode+39+Text:400",
|
540 |
+
"Libre+Baskerville:400,italic,700",
|
541 |
+
"Libre+Caslon+Display:400",
|
542 |
+
"Libre+Caslon+Text:400,italic,700",
|
543 |
+
"Libre+Franklin:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
544 |
+
"Life+Savers:400,700,800",
|
545 |
+
"Lilita+One:400",
|
546 |
+
"Lily+Script+One:400",
|
547 |
+
"Limelight:400",
|
548 |
+
"Linden+Hill:400,italic",
|
549 |
+
"Literata:400,500,600,700,italic,500italic,600italic,700italic",
|
550 |
+
"Liu+Jian+Mao+Cao:400",
|
551 |
+
"Livvic:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,900,900italic",
|
552 |
+
"Lobster:400",
|
553 |
+
"Lobster+Two:400,italic,700,700italic",
|
554 |
+
"Londrina+Outline:400",
|
555 |
+
"Londrina+Shadow:400",
|
556 |
+
"Londrina+Sketch:400",
|
557 |
+
"Londrina+Solid:100,300,400,900",
|
558 |
+
"Long+Cang:400",
|
559 |
+
"Lora:400,italic,700,700italic",
|
560 |
+
"Love+Ya+Like+A+Sister:400",
|
561 |
+
"Loved+by+the+King:400",
|
562 |
+
"Lovers+Quarrel:400",
|
563 |
+
"Luckiest+Guy:400",
|
564 |
+
"Lusitana:400,700",
|
565 |
+
"Lustria:400",
|
566 |
+
"M+PLUS+1p:100,300,400,500,700,800,900",
|
567 |
+
"M+PLUS+Rounded+1c:100,300,400,500,700,800,900",
|
568 |
+
"Ma+Shan+Zheng:400",
|
569 |
+
"Macondo:400",
|
570 |
+
"Macondo+Swash+Caps:400",
|
571 |
+
"Mada:200,300,400,500,600,700,900",
|
572 |
+
"Magra:400,700",
|
573 |
+
"Maiden+Orange:400",
|
574 |
+
"Maitree:200,300,400,500,600,700",
|
575 |
+
"Major+Mono+Display:400",
|
576 |
+
"Mako:400",
|
577 |
+
"Mali:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
578 |
+
"Mallanna:400",
|
579 |
+
"Mandali:400",
|
580 |
+
"Manjari:100,400,700",
|
581 |
+
"Mansalva:400",
|
582 |
+
"Manuale:400,500,600,700,italic,500italic,600italic,700italic",
|
583 |
+
"Marcellus:400",
|
584 |
+
"Marcellus+SC:400",
|
585 |
+
"Marck+Script:400",
|
586 |
+
"Margarine:400",
|
587 |
+
"Markazi+Text:400,500,600,700",
|
588 |
+
"Marko+One:400",
|
589 |
+
"Marmelad:400",
|
590 |
+
"Martel:200,300,400,600,700,800,900",
|
591 |
+
"Martel+Sans:200,300,400,600,700,800,900",
|
592 |
+
"Marvel:400,italic,700,700italic",
|
593 |
+
"Mate:400,italic",
|
594 |
+
"Mate+SC:400",
|
595 |
+
"Maven+Pro:400,500,600,700,800,900",
|
596 |
+
"McLaren:400",
|
597 |
+
"Meddon:400",
|
598 |
+
"MedievalSharp:400",
|
599 |
+
"Medula+One:400",
|
600 |
+
"Meera+Inimai:400",
|
601 |
+
"Megrim:400",
|
602 |
+
"Meie+Script:400",
|
603 |
+
"Merienda:400,700",
|
604 |
+
"Merienda+One:400",
|
605 |
+
"Merriweather:300,300italic,400,italic,700,700italic,900,900italic",
|
606 |
+
"Merriweather+Sans:300,300italic,400,italic,700,700italic,800,800italic",
|
607 |
+
"Metal:400",
|
608 |
+
"Metal+Mania:400",
|
609 |
+
"Metamorphous:400",
|
610 |
+
"Metrophobic:400",
|
611 |
+
"Michroma:400",
|
612 |
+
"Milonga:400",
|
613 |
+
"Miltonian:400",
|
614 |
+
"Miltonian+Tattoo:400",
|
615 |
+
"Mina:400,700",
|
616 |
+
"Miniver:400",
|
617 |
+
"Miriam+Libre:400,700",
|
618 |
+
"Mirza:400,500,600,700",
|
619 |
+
"Miss+Fajardose:400",
|
620 |
+
"Mitr:200,300,400,500,600,700",
|
621 |
+
"Modak:400",
|
622 |
+
"Modern+Antiqua:400",
|
623 |
+
"Mogra:400",
|
624 |
+
"Molengo:400",
|
625 |
+
"Molle:italic",
|
626 |
+
"Monda:400,700",
|
627 |
+
"Monofett:400",
|
628 |
+
"Monoton:400",
|
629 |
+
"Monsieur+La+Doulaise:400",
|
630 |
+
"Montaga:400",
|
631 |
+
"Montez:400",
|
632 |
+
"Montserrat:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
633 |
+
"Montserrat+Alternates:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
634 |
+
"Montserrat+Subrayada:400,700",
|
635 |
+
"Moul:400",
|
636 |
+
"Moulpali:400",
|
637 |
+
"Mountains+of+Christmas:400,700",
|
638 |
+
"Mouse+Memoirs:400",
|
639 |
+
"Mr+Bedfort:400",
|
640 |
+
"Mr+Dafoe:400",
|
641 |
+
"Mr+De+Haviland:400",
|
642 |
+
"Mrs+Saint+Delafield:400",
|
643 |
+
"Mrs+Sheppards:400",
|
644 |
+
"Mukta:200,300,400,500,600,700,800",
|
645 |
+
"Mukta+Mahee:200,300,400,500,600,700,800",
|
646 |
+
"Mukta+Malar:200,300,400,500,600,700,800",
|
647 |
+
"Mukta+Vaani:200,300,400,500,600,700,800",
|
648 |
+
"Muli:200,300,400,500,600,700,800,900,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic",
|
649 |
+
"Mystery+Quest:400",
|
650 |
+
"NTR:400",
|
651 |
+
"Nanum+Brush+Script:400",
|
652 |
+
"Nanum+Gothic:400,700,800",
|
653 |
+
"Nanum+Gothic+Coding:400,700",
|
654 |
+
"Nanum+Myeongjo:400,700,800",
|
655 |
+
"Nanum+Pen+Script:400",
|
656 |
+
"Neucha:400",
|
657 |
+
"Neuton:200,300,400,italic,700,800",
|
658 |
+
"New+Rocker:400",
|
659 |
+
"News+Cycle:400,700",
|
660 |
+
"Niconne:400",
|
661 |
+
"Niramit:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
662 |
+
"Nixie+One:400",
|
663 |
+
"Nobile:400,italic,500,500italic,700,700italic",
|
664 |
+
"Nokora:400,700",
|
665 |
+
"Norican:400",
|
666 |
+
"Nosifer:400",
|
667 |
+
"Notable:400",
|
668 |
+
"Nothing+You+Could+Do:400",
|
669 |
+
"Noticia+Text:400,italic,700,700italic",
|
670 |
+
"Noto+Sans:400,italic,700,700italic",
|
671 |
+
"Noto+Sans+HK:100,300,400,500,700,900",
|
672 |
+
"Noto+Sans+JP:100,300,400,500,700,900",
|
673 |
+
"Noto+Sans+KR:100,300,400,500,700,900",
|
674 |
+
"Noto+Sans+SC:100,300,400,500,700,900",
|
675 |
+
"Noto+Sans+TC:100,300,400,500,700,900",
|
676 |
+
"Noto+Serif:400,italic,700,700italic",
|
677 |
+
"Noto+Serif+JP:200,300,400,500,600,700,900",
|
678 |
+
"Noto+Serif+KR:200,300,400,500,600,700,900",
|
679 |
+
"Noto+Serif+SC:200,300,400,500,600,700,900",
|
680 |
+
"Noto+Serif+TC:200,300,400,500,600,700,900",
|
681 |
+
"Nova+Cut:400",
|
682 |
+
"Nova+Flat:400",
|
683 |
+
"Nova+Mono:400",
|
684 |
+
"Nova+Oval:400",
|
685 |
+
"Nova+Round:400",
|
686 |
+
"Nova+Script:400",
|
687 |
+
"Nova+Slim:400",
|
688 |
+
"Nova+Square:400",
|
689 |
+
"Numans:400",
|
690 |
+
"Nunito:200,200italic,300,300italic,400,italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
691 |
+
"Nunito+Sans:200,200italic,300,300italic,400,italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
692 |
+
"Odibee+Sans:400",
|
693 |
+
"Odor+Mean+Chey:400",
|
694 |
+
"Offside:400",
|
695 |
+
"Old+Standard+TT:400,italic,700",
|
696 |
+
"Oldenburg:400",
|
697 |
+
"Oleo+Script:400,700",
|
698 |
+
"Oleo+Script+Swash+Caps:400,700",
|
699 |
+
"Open+Sans:300,300italic,400,italic,600,600italic,700,700italic,800,800italic",
|
700 |
+
"Open+Sans+Condensed:300,300italic,700",
|
701 |
+
"Oranienbaum:400",
|
702 |
+
"Orbitron:400,500,600,700,800,900",
|
703 |
+
"Oregano:400,italic",
|
704 |
+
"Orienta:400",
|
705 |
+
"Original+Surfer:400",
|
706 |
+
"Oswald:200,300,400,500,600,700",
|
707 |
+
"Over+the+Rainbow:400",
|
708 |
+
"Overlock:400,italic,700,700italic,900,900italic",
|
709 |
+
"Overlock+SC:400",
|
710 |
+
"Overpass:100,100italic,200,200italic,300,300italic,400,italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
711 |
+
"Overpass+Mono:300,400,600,700",
|
712 |
+
"Ovo:400",
|
713 |
+
"Oxygen:300,400,700",
|
714 |
+
"Oxygen+Mono:400",
|
715 |
+
"PT+Mono:400",
|
716 |
+
"PT+Sans:400,italic,700,700italic",
|
717 |
+
"PT+Sans+Caption:400,700",
|
718 |
+
"PT+Sans+Narrow:400,700",
|
719 |
+
"PT+Serif:400,italic,700,700italic",
|
720 |
+
"PT+Serif+Caption:400,italic",
|
721 |
+
"Pacifico:400",
|
722 |
+
"Padauk:400,700",
|
723 |
+
"Palanquin:100,200,300,400,500,600,700",
|
724 |
+
"Palanquin+Dark:400,500,600,700",
|
725 |
+
"Pangolin:400",
|
726 |
+
"Paprika:400",
|
727 |
+
"Parisienne:400",
|
728 |
+
"Passero+One:400",
|
729 |
+
"Passion+One:400,700,900",
|
730 |
+
"Pathway+Gothic+One:400",
|
731 |
+
"Patrick+Hand:400",
|
732 |
+
"Patrick+Hand+SC:400",
|
733 |
+
"Pattaya:400",
|
734 |
+
"Patua+One:400",
|
735 |
+
"Pavanam:400",
|
736 |
+
"Paytone+One:400",
|
737 |
+
"Peddana:400",
|
738 |
+
"Peralta:400",
|
739 |
+
"Permanent+Marker:400",
|
740 |
+
"Petit+Formal+Script:400",
|
741 |
+
"Petrona:400",
|
742 |
+
"Philosopher:400,italic,700,700italic",
|
743 |
+
"Piedra:400",
|
744 |
+
"Pinyon+Script:400",
|
745 |
+
"Pirata+One:400",
|
746 |
+
"Plaster:400",
|
747 |
+
"Play:400,700",
|
748 |
+
"Playball:400",
|
749 |
+
"Playfair+Display:400,500,600,700,800,900,italic,500italic,600italic,700italic,800italic,900italic",
|
750 |
+
"Playfair+Display+SC:400,italic,700,700italic,900,900italic",
|
751 |
+
"Podkova:400,500,600,700,800",
|
752 |
+
"Poiret+One:400",
|
753 |
+
"Poller+One:400",
|
754 |
+
"Poly:400,italic",
|
755 |
+
"Pompiere:400",
|
756 |
+
"Pontano+Sans:400",
|
757 |
+
"Poor+Story:400",
|
758 |
+
"Poppins:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
759 |
+
"Port+Lligat+Sans:400",
|
760 |
+
"Port+Lligat+Slab:400",
|
761 |
+
"Pragati+Narrow:400,700",
|
762 |
+
"Prata:400",
|
763 |
+
"Preahvihear:400",
|
764 |
+
"Press+Start+2P:400",
|
765 |
+
"Pridi:200,300,400,500,600,700",
|
766 |
+
"Princess+Sofia:400",
|
767 |
+
"Prociono:400",
|
768 |
+
"Prompt:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
769 |
+
"Prosto+One:400",
|
770 |
+
"Proza+Libre:400,italic,500,500italic,600,600italic,700,700italic,800,800italic",
|
771 |
+
"Public+Sans:100,200,300,400,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic",
|
772 |
+
"Puritan:400,italic,700,700italic",
|
773 |
+
"Purple+Purse:400",
|
774 |
+
"Quando:400",
|
775 |
+
"Quantico:400,italic,700,700italic",
|
776 |
+
"Quattrocento:400,700",
|
777 |
+
"Quattrocento+Sans:400,italic,700,700italic",
|
778 |
+
"Questrial:400",
|
779 |
+
"Quicksand:300,400,500,600,700",
|
780 |
+
"Quintessential:400",
|
781 |
+
"Qwigley:400",
|
782 |
+
"Racing+Sans+One:400",
|
783 |
+
"Radley:400,italic",
|
784 |
+
"Rajdhani:300,400,500,600,700",
|
785 |
+
"Rakkas:400",
|
786 |
+
"Raleway:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
787 |
+
"Raleway+Dots:400",
|
788 |
+
"Ramabhadra:400",
|
789 |
+
"Ramaraja:400",
|
790 |
+
"Rambla:400,italic,700,700italic",
|
791 |
+
"Rammetto+One:400",
|
792 |
+
"Ranchers:400",
|
793 |
+
"Rancho:400",
|
794 |
+
"Ranga:400,700",
|
795 |
+
"Rasa:300,400,500,600,700",
|
796 |
+
"Rationale:400",
|
797 |
+
"Ravi+Prakash:400",
|
798 |
+
"Red+Hat+Display:400,italic,500,500italic,700,700italic,900,900italic",
|
799 |
+
"Red+Hat+Text:400,italic,500,500italic,700,700italic",
|
800 |
+
"Redressed:400",
|
801 |
+
"Reem+Kufi:400",
|
802 |
+
"Reenie+Beanie:400",
|
803 |
+
"Revalia:400",
|
804 |
+
"Rhodium+Libre:400",
|
805 |
+
"Ribeye:400",
|
806 |
+
"Ribeye+Marrow:400",
|
807 |
+
"Righteous:400",
|
808 |
+
"Risque:400",
|
809 |
+
"Roboto:100,100italic,300,300italic,400,italic,500,500italic,700,700italic,900,900italic",
|
810 |
+
"Roboto+Condensed:300,300italic,400,italic,700,700italic",
|
811 |
+
"Roboto+Mono:100,100italic,300,300italic,400,italic,500,500italic,700,700italic",
|
812 |
+
"Roboto+Slab:100,200,300,400,500,600,700,800,900",
|
813 |
+
"Rochester:400",
|
814 |
+
"Rock+Salt:400",
|
815 |
+
"Rokkitt:100,200,300,400,500,600,700,800,900",
|
816 |
+
"Romanesco:400",
|
817 |
+
"Ropa+Sans:400,italic",
|
818 |
+
"Rosario:300,400,500,600,700,300italic,italic,500italic,600italic,700italic",
|
819 |
+
"Rosarivo:400,italic",
|
820 |
+
"Rouge+Script:400",
|
821 |
+
"Rozha+One:400",
|
822 |
+
"Rubik:300,300italic,400,italic,500,500italic,700,700italic,900,900italic",
|
823 |
+
"Rubik+Mono+One:400",
|
824 |
+
"Ruda:400,700,900",
|
825 |
+
"Rufina:400,700",
|
826 |
+
"Ruge+Boogie:400",
|
827 |
+
"Ruluko:400",
|
828 |
+
"Rum+Raisin:400",
|
829 |
+
"Ruslan+Display:400",
|
830 |
+
"Russo+One:400",
|
831 |
+
"Ruthie:400",
|
832 |
+
"Rye:400",
|
833 |
+
"Sacramento:400",
|
834 |
+
"Sahitya:400,700",
|
835 |
+
"Sail:400",
|
836 |
+
"Saira:100,200,300,400,500,600,700,800,900",
|
837 |
+
"Saira+Condensed:100,200,300,400,500,600,700,800,900",
|
838 |
+
"Saira+Extra+Condensed:100,200,300,400,500,600,700,800,900",
|
839 |
+
"Saira+Semi+Condensed:100,200,300,400,500,600,700,800,900",
|
840 |
+
"Saira+Stencil+One:400",
|
841 |
+
"Salsa:400",
|
842 |
+
"Sanchez:400,italic",
|
843 |
+
"Sancreek:400",
|
844 |
+
"Sansita:400,italic,700,700italic,800,800italic,900,900italic",
|
845 |
+
"Sarabun:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic",
|
846 |
+
"Sarala:400,700",
|
847 |
+
"Sarina:400",
|
848 |
+
"Sarpanch:400,500,600,700,800,900",
|
849 |
+
"Satisfy:400",
|
850 |
+
"Sawarabi+Gothic:400",
|
851 |
+
"Sawarabi+Mincho:400",
|
852 |
+
"Scada:400,italic,700,700italic",
|
853 |
+
"Scheherazade:400,700",
|
854 |
+
"Schoolbell:400",
|
855 |
+
"Scope+One:400",
|
856 |
+
"Seaweed+Script:400",
|
857 |
+
"Secular+One:400",
|
858 |
+
"Sedgwick+Ave:400",
|
859 |
+
"Sedgwick+Ave+Display:400",
|
860 |
+
"Sevillana:400",
|
861 |
+
"Seymour+One:400",
|
862 |
+
"Shadows+Into+Light:400",
|
863 |
+
"Shadows+Into+Light+Two:400",
|
864 |
+
"Shanti:400",
|
865 |
+
"Share:400,italic,700,700italic",
|
866 |
+
"Share+Tech:400",
|
867 |
+
"Share+Tech+Mono:400",
|
868 |
+
"Shojumaru:400",
|
869 |
+
"Short+Stack:400",
|
870 |
+
"Shrikhand:400",
|
871 |
+
"Siemreap:400",
|
872 |
+
"Sigmar+One:400",
|
873 |
+
"Signika:300,400,600,700",
|
874 |
+
"Signika+Negative:300,400,600,700",
|
875 |
+
"Simonetta:400,italic,900,900italic",
|
876 |
+
"Single+Day:400",
|
877 |
+
"Sintony:400,700",
|
878 |
+
"Sirin+Stencil:400",
|
879 |
+
"Six+Caps:400",
|
880 |
+
"Skranji:400,700",
|
881 |
+
"Slabo+13px:400",
|
882 |
+
"Slabo+27px:400",
|
883 |
+
"Slackey:400",
|
884 |
+
"Smokum:400",
|
885 |
+
"Smythe:400",
|
886 |
+
"Sniglet:400,800",
|
887 |
+
"Snippet:400",
|
888 |
+
"Snowburst+One:400",
|
889 |
+
"Sofadi+One:400",
|
890 |
+
"Sofia:400",
|
891 |
+
"Solway:300,400,500,700,800",
|
892 |
+
"Song+Myung:400",
|
893 |
+
"Sonsie+One:400",
|
894 |
+
"Sorts+Mill+Goudy:400,italic",
|
895 |
+
"Source+Code+Pro:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,900,900italic",
|
896 |
+
"Source+Sans+Pro:200,200italic,300,300italic,400,italic,600,600italic,700,700italic,900,900italic",
|
897 |
+
"Source+Serif+Pro:400,600,700",
|
898 |
+
"Space+Mono:400,italic,700,700italic",
|
899 |
+
"Special+Elite:400",
|
900 |
+
"Spectral:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic",
|
901 |
+
"Spectral+SC:200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic",
|
902 |
+
"Spicy+Rice:400",
|
903 |
+
"Spinnaker:400",
|
904 |
+
"Spirax:400",
|
905 |
+
"Squada+One:400",
|
906 |
+
"Sree+Krushnadevaraya:400",
|
907 |
+
"Sriracha:400",
|
908 |
+
"Srisakdi:400,700",
|
909 |
+
"Staatliches:400",
|
910 |
+
"Stalemate:400",
|
911 |
+
"Stalinist+One:400",
|
912 |
+
"Stardos+Stencil:400,700",
|
913 |
+
"Stint+Ultra+Condensed:400",
|
914 |
+
"Stint+Ultra+Expanded:400",
|
915 |
+
"Stoke:300,400",
|
916 |
+
"Strait:400",
|
917 |
+
"Stylish:400",
|
918 |
+
"Sue+Ellen+Francisco:400",
|
919 |
+
"Suez+One:400",
|
920 |
+
"Sulphur+Point:300,400,700",
|
921 |
+
"Sumana:400,700",
|
922 |
+
"Sunflower:300,500,700",
|
923 |
+
"Sunshiney:400",
|
924 |
+
"Supermercado+One:400",
|
925 |
+
"Sura:400,700",
|
926 |
+
"Suranna:400",
|
927 |
+
"Suravaram:400",
|
928 |
+
"Suwannaphum:400",
|
929 |
+
"Swanky+and+Moo+Moo:400",
|
930 |
+
"Syncopate:400,700",
|
931 |
+
"Tajawal:200,300,400,500,700,800,900",
|
932 |
+
"Tangerine:400,700",
|
933 |
+
"Taprom:400",
|
934 |
+
"Tauri:400",
|
935 |
+
"Taviraj:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
936 |
+
"Teko:300,400,500,600,700",
|
937 |
+
"Telex:400",
|
938 |
+
"Tenali+Ramakrishna:400",
|
939 |
+
"Tenor+Sans:400",
|
940 |
+
"Text+Me+One:400",
|
941 |
+
"Thasadith:400,italic,700,700italic",
|
942 |
+
"The+Girl+Next+Door:400",
|
943 |
+
"Tienne:400,700,900",
|
944 |
+
"Tillana:400,500,600,700,800",
|
945 |
+
"Timmana:400",
|
946 |
+
"Tinos:400,italic,700,700italic",
|
947 |
+
"Titan+One:400",
|
948 |
+
"Titillium+Web:200,200italic,300,300italic,400,italic,600,600italic,700,700italic,900",
|
949 |
+
"Tomorrow:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
950 |
+
"Trade+Winds:400",
|
951 |
+
"Trirong:100,100italic,200,200italic,300,300italic,400,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic",
|
952 |
+
"Trocchi:400",
|
953 |
+
"Trochut:400,italic,700",
|
954 |
+
"Trykker:400",
|
955 |
+
"Tulpen+One:400",
|
956 |
+
"Turret+Road:200,300,400,500,700,800",
|
957 |
+
"Ubuntu:300,300italic,400,italic,500,500italic,700,700italic",
|
958 |
+
"Ubuntu+Condensed:400",
|
959 |
+
"Ubuntu+Mono:400,italic,700,700italic",
|
960 |
+
"Ultra:400",
|
961 |
+
"Uncial+Antiqua:400",
|
962 |
+
"Underdog:400",
|
963 |
+
"Unica+One:400",
|
964 |
+
"UnifrakturCook:700",
|
965 |
+
"UnifrakturMaguntia:400",
|
966 |
+
"Unkempt:400,700",
|
967 |
+
"Unlock:400",
|
968 |
+
"Unna:400,italic,700,700italic",
|
969 |
+
"VT323:400",
|
970 |
+
"Vampiro+One:400",
|
971 |
+
"Varela:400",
|
972 |
+
"Varela+Round:400",
|
973 |
+
"Vast+Shadow:400",
|
974 |
+
"Vesper+Libre:400,500,700,900",
|
975 |
+
"Vibes:400",
|
976 |
+
"Vibur:400",
|
977 |
+
"Vidaloka:400",
|
978 |
+
"Viga:400",
|
979 |
+
"Voces:400",
|
980 |
+
"Volkhov:400,italic,700,700italic",
|
981 |
+
"Vollkorn:400,italic,600,600italic,700,700italic,900,900italic",
|
982 |
+
"Vollkorn+SC:400,600,700,900",
|
983 |
+
"Voltaire:400",
|
984 |
+
"Waiting+for+the+Sunrise:400",
|
985 |
+
"Wallpoet:400",
|
986 |
+
"Walter+Turncoat:400",
|
987 |
+
"Warnes:400",
|
988 |
+
"Wellfleet:400",
|
989 |
+
"Wendy+One:400",
|
990 |
+
"Wire+One:400",
|
991 |
+
"Work+Sans:100,200,300,400,500,600,700,800,900",
|
992 |
+
"Yanone+Kaffeesatz:200,300,400,500,600,700",
|
993 |
+
"Yantramanav:100,300,400,500,700,900",
|
994 |
+
"Yatra+One:400",
|
995 |
+
"Yellowtail:400",
|
996 |
+
"Yeon+Sung:400",
|
997 |
+
"Yeseva+One:400",
|
998 |
+
"Yesteryear:400",
|
999 |
+
"Yrsa:300,400,500,600,700",
|
1000 |
+
"ZCOOL+KuaiLe:400",
|
1001 |
+
"ZCOOL+QingKe+HuangYou:400",
|
1002 |
+
"ZCOOL+XiaoWei:400",
|
1003 |
+
"Zeyada:400",
|
1004 |
+
"Zhi+Mang+Xing:400",
|
1005 |
+
"Zilla+Slab:300,300italic,400,italic,500,500italic,600,600italic,700,700italic",
|
1006 |
+
"Zilla+Slab+Highlight:400,700"
|
1007 |
+
]
|
1008 |
+
};
|
1009 |
+
|
1010 |
+
var Fontselect = (function(){
|
1011 |
+
|
1012 |
+
function Fontselect(original, o) {
|
1013 |
+
if (!o.systemFonts) { o.systemFonts = []; }
|
1014 |
+
if (!o.localFonts) { o.localFonts = []; }
|
1015 |
+
if (!o.googleFonts) { o.googleFonts = []; }
|
1016 |
+
|
1017 |
+
var googleFonts = [];
|
1018 |
+
for (var i = 0; i < o.googleFonts.length; i++) {
|
1019 |
+
var item = o.googleFonts[i].split(':'); // Unna:regular,italic,700,700italic
|
1020 |
+
var fontName = item[0], fontVariants = item[1] ? item[1].split(',') : [];
|
1021 |
+
for (var v = 0; v < fontVariants.length; v++) {
|
1022 |
+
googleFonts.push(fontName + ':' + fontVariants[v]);
|
1023 |
+
}
|
1024 |
+
}
|
1025 |
+
o.googleFonts = googleFonts;
|
1026 |
+
|
1027 |
+
this.options = o;
|
1028 |
+
this.$original = $(original);
|
1029 |
+
this.setupHtml();
|
1030 |
+
this.getVisibleFonts();
|
1031 |
+
this.bindEvents();
|
1032 |
+
this.query = '';
|
1033 |
+
this.keyActive = false;
|
1034 |
+
this.searchBoxHeight = 0;
|
1035 |
+
|
1036 |
+
var font = this.$original.val();
|
1037 |
+
if (font) {
|
1038 |
+
this.updateSelected();
|
1039 |
+
this.addFontLink(font);
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
Fontselect.prototype = {
|
1044 |
+
keyDown: function(e) {
|
1045 |
+
|
1046 |
+
function stop(e) {
|
1047 |
+
e.preventDefault();
|
1048 |
+
e.stopPropagation();
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
this.keyActive = true;
|
1052 |
+
if (e.keyCode == 27) {// Escape
|
1053 |
+
stop(e);
|
1054 |
+
this.toggleDropdown('hide');
|
1055 |
+
return;
|
1056 |
+
}
|
1057 |
+
if (e.keyCode == 38) {// Cursor up
|
1058 |
+
stop(e);
|
1059 |
+
var $li = $('li.active', this.$results), $pli = $li.prev('li');
|
1060 |
+
if ($pli.length > 0) {
|
1061 |
+
$li.removeClass('active');
|
1062 |
+
this.$results.scrollTop($pli.addClass('active')[0].offsetTop - this.searchBoxHeight);
|
1063 |
+
}
|
1064 |
+
return;
|
1065 |
+
}
|
1066 |
+
if (e.keyCode == 40) {// Cursor down
|
1067 |
+
stop(e);
|
1068 |
+
var $li = $('li.active', this.$results), $nli = $li.next('li');
|
1069 |
+
if ($nli.length > 0) {
|
1070 |
+
$li.removeClass('active');
|
1071 |
+
this.$results.scrollTop($nli.addClass('active')[0].offsetTop - this.searchBoxHeight);
|
1072 |
+
}
|
1073 |
+
return;
|
1074 |
+
}
|
1075 |
+
if (e.keyCode == 13) {// Enter
|
1076 |
+
stop(e);
|
1077 |
+
$('li.active', this.$results).trigger('click');
|
1078 |
+
return;
|
1079 |
+
}
|
1080 |
+
this.query += String.fromCharCode(e.keyCode).toLowerCase();
|
1081 |
+
var $found = $("li[data-query^='"+ this.query +"']").first();
|
1082 |
+
if ($found.length > 0) {
|
1083 |
+
$('li.active', this.$results).removeClass('active');
|
1084 |
+
this.$results.scrollTop($found.addClass('active')[0].offsetTop);
|
1085 |
+
}
|
1086 |
+
},
|
1087 |
+
|
1088 |
+
keyUp: function(e) {
|
1089 |
+
this.keyActive = false;
|
1090 |
+
},
|
1091 |
+
|
1092 |
+
bindEvents: function() {
|
1093 |
+
var self = this;
|
1094 |
+
|
1095 |
+
$('li', this.$results)
|
1096 |
+
.click(__bind(this.selectFont, this))
|
1097 |
+
.mouseover(__bind(this.activateFont, this));
|
1098 |
+
|
1099 |
+
this.$select.click(__bind(function() { self.toggleDropdown('show') }, this));
|
1100 |
+
|
1101 |
+
// Call like so: $("input[name='ffSelect']").trigger('setFont', [fontFamily, fontWeight]);
|
1102 |
+
this.$original.on('setFont', function(evt, fontFamily, fontWeight) {
|
1103 |
+
fontWeight = fontWeight || 400;
|
1104 |
+
|
1105 |
+
var fontSpec = fontFamily.replace(/ /g, '+') + ':' + fontWeight;
|
1106 |
+
|
1107 |
+
var $li = $("li[data-value='"+ fontSpec +"']", self.$results);
|
1108 |
+
if ($li.length == 0) {
|
1109 |
+
fontSpec = fontFamily.replace(/ /g, '+');
|
1110 |
+
}
|
1111 |
+
$li = $("li[data-value='"+ fontSpec +"']", self.$results);
|
1112 |
+
$('li.active', self.$results).removeClass('active');
|
1113 |
+
$li.addClass('active');
|
1114 |
+
|
1115 |
+
self.$original.val(fontSpec);
|
1116 |
+
self.updateSelected();
|
1117 |
+
self.addFontLink($li.data('value'));
|
1118 |
+
//$li.trigger('click'); // Removed 2019-10-16
|
1119 |
+
});
|
1120 |
+
this.$original.on('change', function() {
|
1121 |
+
self.updateSelected();
|
1122 |
+
self.addFontLink($('li.active', self.$results).data('value'));
|
1123 |
+
});
|
1124 |
+
|
1125 |
+
if (this.options.searchable) {
|
1126 |
+
this.$input.on('keyup', function() {
|
1127 |
+
var q = this.value.toLowerCase();
|
1128 |
+
// Hide options that don't match query:
|
1129 |
+
$('li', self.$results).each(function() {
|
1130 |
+
if ($(this).text().toLowerCase().indexOf(q) == -1) {
|
1131 |
+
$(this).hide();
|
1132 |
+
}
|
1133 |
+
else {
|
1134 |
+
$(this).show();
|
1135 |
+
}
|
1136 |
+
})
|
1137 |
+
})
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
$(document).on('click', function(e) {
|
1141 |
+
if ($(e.target).closest('.'+self.options.style).length === 0) {
|
1142 |
+
self.toggleDropdown('hide');
|
1143 |
+
}
|
1144 |
+
});
|
1145 |
+
},
|
1146 |
+
|
1147 |
+
toggleDropdown: function(hideShow) {
|
1148 |
+
if (hideShow === 'hide') {
|
1149 |
+
// Make inactive
|
1150 |
+
this.$element.off('keydown keyup');
|
1151 |
+
this.query = '';
|
1152 |
+
this.keyActive = false;
|
1153 |
+
this.$element.removeClass('font-select-active');
|
1154 |
+
this.$drop.hide();
|
1155 |
+
clearInterval(this.visibleInterval);
|
1156 |
+
} else {
|
1157 |
+
// Make active
|
1158 |
+
this.$element.on('keydown', __bind(this.keyDown, this));
|
1159 |
+
this.$element.on('keyup', __bind(this.keyUp, this));
|
1160 |
+
this.$element.addClass('font-select-active');
|
1161 |
+
this.$drop.show();
|
1162 |
+
|
1163 |
+
this.visibleInterval = setInterval(__bind(this.getVisibleFonts, this), 500);
|
1164 |
+
this.searchBoxHeight = this.$search.outerHeight();
|
1165 |
+
this.moveToSelected();
|
1166 |
+
|
1167 |
+
/*
|
1168 |
+
if (this.options.searchable) {
|
1169 |
+
// Focus search box
|
1170 |
+
$this.$input.focus();
|
1171 |
+
}
|
1172 |
+
*/
|
1173 |
+
}
|
1174 |
+
},
|
1175 |
+
|
1176 |
+
selectFont: function() {
|
1177 |
+
var font = $('li.active', this.$results).data('value');
|
1178 |
+
this.$original.val(font).change();
|
1179 |
+
this.updateSelected();
|
1180 |
+
this.toggleDropdown('hide'); // Hide dropdown
|
1181 |
+
},
|
1182 |
+
|
1183 |
+
moveToSelected: function() {
|
1184 |
+
var font = this.$original.val().replace(/ /g, '+');
|
1185 |
+
var $li = font ? $("li[data-value='"+ font +"']", this.$results) : $li = $('li', this.$results).first();
|
1186 |
+
this.$results.scrollTop($li.addClass('active')[0].offsetTop - this.searchBoxHeight);
|
1187 |
+
},
|
1188 |
+
|
1189 |
+
activateFont: function(e) {
|
1190 |
+
if (this.keyActive) { return; }
|
1191 |
+
$('li.active', this.$results).removeClass('active');
|
1192 |
+
$(e.target).addClass('active');
|
1193 |
+
},
|
1194 |
+
|
1195 |
+
updateSelected: function() {
|
1196 |
+
var font = this.$original.val();
|
1197 |
+
$('span', this.$element).text(this.toReadable(font)).css(this.toStyle(font));
|
1198 |
+
},
|
1199 |
+
|
1200 |
+
setupHtml: function() {
|
1201 |
+
this.$original.hide();
|
1202 |
+
this.$element = $('<div>', {'class': this.options.style});
|
1203 |
+
this.$select = $('<span tabindex="0">' + this.options.placeholder + '</span>');
|
1204 |
+
this.$search = $('<div>', {'class': 'fs-search'});
|
1205 |
+
this.$input = $('<input>', {type:'text'});
|
1206 |
+
if (this.options.placeholderSearch) {
|
1207 |
+
this.$input.attr('placeholder', this.options.placeholderSearch);
|
1208 |
+
}
|
1209 |
+
this.$search.append(this.$input);
|
1210 |
+
this.$drop = $('<div>', {'class': 'fs-drop'});
|
1211 |
+
this.$results = $('<ul>', {'class': 'fs-results'});
|
1212 |
+
this.$original.after(this.$element.append(this.$select, this.$drop));
|
1213 |
+
this.options.searchable && this.$drop.append(this.$search);
|
1214 |
+
this.$drop.append(this.$results.append(this.fontsAsHtml())).hide();
|
1215 |
+
},
|
1216 |
+
|
1217 |
+
fontsAsHtml: function() {
|
1218 |
+
var i, r, s, style, h = '';
|
1219 |
+
var systemFonts = this.options.systemFonts;
|
1220 |
+
var localFonts = this.options.localFonts;
|
1221 |
+
var googleFonts = this.options.googleFonts;
|
1222 |
+
|
1223 |
+
for (i = 0; i < systemFonts.length; i++){
|
1224 |
+
r = this.toReadable(systemFonts[i]);
|
1225 |
+
s = this.toStyle(systemFonts[i]);
|
1226 |
+
style = 'font-family:' + s['font-family'];
|
1227 |
+
if ((localFonts.length > 0 || googleFonts.length > 0) && i == systemFonts.length-1) {
|
1228 |
+
style += ';border-bottom:1px solid #444'; // Separator after last system font
|
1229 |
+
}
|
1230 |
+
h += '<li data-value="'+ systemFonts[i] +'" data-query="' + systemFonts[i].toLowerCase() + '" style="' + style + '">' + r + '</li>';
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
for (i = 0; i < localFonts.length; i++){
|
1234 |
+
r = this.toReadable(localFonts[i]);
|
1235 |
+
s = this.toStyle(localFonts[i]);
|
1236 |
+
style = 'font-family:' + s['font-family'];
|
1237 |
+
if (googleFonts.length > 0 && i == localFonts.length-1) {
|
1238 |
+
style += ';border-bottom:1px solid #444'; // Separator after last local font
|
1239 |
+
}
|
1240 |
+
h += '<li data-value="'+ localFonts[i] +'" data-query="' + localFonts[i].toLowerCase() + '" style="' + style + '">' + r + '</li>';
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
for (i = 0; i < googleFonts.length; i++){
|
1244 |
+
r = this.toReadable(googleFonts[i]);
|
1245 |
+
s = this.toStyle(googleFonts[i]);
|
1246 |
+
style = 'font-family:' + s['font-family'] + ';font-weight:' + s['font-weight'] + ';font-style:' + s['font-style'];
|
1247 |
+
h += '<li data-value="'+ googleFonts[i] +'" data-query="' + googleFonts[i].toLowerCase() + '" style="' + style + '">' + r + '</li>';
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
return h;
|
1251 |
+
},
|
1252 |
+
|
1253 |
+
toReadable: function(font) {
|
1254 |
+
return font.replace(/[\+|:]/g, ' ').replace(/(\d+)italic/, '$1 italic');
|
1255 |
+
},
|
1256 |
+
|
1257 |
+
toStyle: function(font) {
|
1258 |
+
var t = font.split(':'), italic = false;
|
1259 |
+
if (t[1] && /italic/.test(t[1])) {
|
1260 |
+
italic = true;
|
1261 |
+
t[1] = t[1].replace('italic','');
|
1262 |
+
}
|
1263 |
+
|
1264 |
+
return {'font-family':"'"+this.toReadable(t[0])+"'", 'font-weight': (t[1] || 400), 'font-style': italic?'italic':'normal'};
|
1265 |
+
},
|
1266 |
+
|
1267 |
+
getVisibleFonts: function() {
|
1268 |
+
if(this.$results.is(':hidden')) { return; }
|
1269 |
+
|
1270 |
+
var fs = this;
|
1271 |
+
var top = this.$results.scrollTop();
|
1272 |
+
var bottom = top + this.$results.height();
|
1273 |
+
|
1274 |
+
if (this.options.lookahead){
|
1275 |
+
var li = $('li', this.$results).first().height();
|
1276 |
+
bottom += li * this.options.lookahead;
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
$('li:visible', this.$results).each(function(){
|
1280 |
+
var ft = $(this).position().top+top;
|
1281 |
+
var fb = ft + $(this).height();
|
1282 |
+
|
1283 |
+
if ((fb >= top) && (ft <= bottom)){
|
1284 |
+
fs.addFontLink($(this).data('value'));
|
1285 |
+
}
|
1286 |
+
});
|
1287 |
+
},
|
1288 |
+
|
1289 |
+
addFontLink: function(font) {
|
1290 |
+
if (fontsLoaded[font]) { return; }
|
1291 |
+
fontsLoaded[font] = true;
|
1292 |
+
|
1293 |
+
if (this.options.googleFonts.indexOf(font) > -1) {
|
1294 |
+
$('link:last').after('<link href="' + this.options.googleApi + font + '" rel="stylesheet" type="text/css">');
|
1295 |
+
}
|
1296 |
+
else if (this.options.localFonts.indexOf(font) > -1) {
|
1297 |
+
font = this.toReadable(font);
|
1298 |
+
$('head').append("<style> @font-face { font-family:'" + font + "'; font-style:normal; font-weight:400; src:local('" + font + "'), url('" + this.options.localFontsUrl + font + ".woff') format('woff'); } </style>");
|
1299 |
+
}
|
1300 |
+
// System fonts need not be loaded!
|
1301 |
+
}
|
1302 |
+
}; // End prototype
|
1303 |
+
|
1304 |
+
return Fontselect;
|
1305 |
+
})();
|
1306 |
+
|
1307 |
+
return this.each(function() {
|
1308 |
+
// If options exist, merge them
|
1309 |
+
if (options) { $.extend(settings, options); }
|
1310 |
+
|
1311 |
+
return new Fontselect(this, settings);
|
1312 |
+
});
|
1313 |
+
};
|
1314 |
+
})(jQuery);
|
js/fontselect/fontselect.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.font-select *{-webkit-box-sizing:border-box;box-sizing:border-box}.font-select{font-size:16px;width:240px;position:relative;display:inline-block}.font-select .fs-drop{position:absolute;top:38px;left:0;z-index:999;background:#fff;color:#000;width:100%;border:1px solid #aaa;border-top:0;box-shadow:0 4px 5px rgba(0,0,0,.15);border-radius:0 0 4px 4px}.font-select>span{outline:0;border-radius:.25rem;border:1px solid #ced4da;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:38px;line-height:32px;padding:3px 8px 3px 8px;color:#444;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23303030' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.font-select-active>span{background-color:#eee;border-bottom-left-radius:0;border-bottom-right-radius:0}.font-select .fs-results{max-height:190px;overflow-x:hidden;overflow-y:auto;margin:0;padding:0}.font-select .fs-results li{line-height:80%;padding:8px;margin:0;list-style:none;font-size:18px;white-space:nowrap}.font-select .fs-results li.active{background-color:#3875d7;color:#fff;cursor:pointer}.font-select .fs-search{border-bottom:1px solid #aaa;padding:4px}.font-select .fs-search input{padding:7px;width:100%;border:1px solid #aaa;font:16px Helvetica,Sans-serif;box-shadow:inset 0 1px 3px rgba(0,0,0,.06);border-radius:.1875rem}
|
js/fontselect/fontselect.min.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(b){var l={};b.fn.fontselect=function(k){var g=function(b,a){return function(){return b.apply(a,arguments)}},m={style:"font-select",placeholder:"Select a font",placeholderSearch:"Search...",searchable:!0,lookahead:2,googleApi:"https://fonts.googleapis.com/css?family=",localFontsUrl:"/fonts/",systemFonts:"Arial Helvetica+Neue Courier+New Times+New+Roman Comic+Sans+MS Verdana Impact".split(" "),googleFonts:"ABeeZee Abel Abhaya+Libre Abril+Fatface Aclonica Acme Actor Adamina Advent+Pro Aguafina+Script Akronim Aladin Alata Alatsi Aldrich Alef Alegreya Alegreya+Sans Alegreya+Sans+SC Alegreya+SC Aleo Alex+Brush Alfa+Slab+One Alice Alike Alike+Angular Allan Allerta Allerta+Stencil Allura Almarai Almendra Almendra+Display Almendra+SC Amarante Amaranth Amatic+SC Amethysta Amiko Amiri Amita Anaheim Andada Andika Angkor Annie+Use+Your+Telescope Anonymous+Pro Antic Antic+Didone Antic+Slab Anton Arapey Arbutus Arbutus+Slab Architects+Daughter Archivo Archivo+Black Archivo+Narrow Aref+Ruqaa Arima+Madurai Arimo Arizonia Armata Arsenal Artifika Arvo Arya Asap Asap+Condensed Asar Asset Assistant Astloch Asul Athiti Atma Atomic+Age Aubrey Audiowide Autour+One Average Average+Sans Averia+Gruesa+Libre Averia+Libre Averia+Sans+Libre Averia+Serif+Libre B612 B612+Mono Bad+Script Bahiana Bahianita Bai+Jamjuree Baloo Baloo+Bhai Baloo+Bhaijaan Baloo+Bhaina Baloo+Chettan Baloo+Da Baloo+Paaji Baloo+Tamma Baloo+Tammudu Baloo+Thambi Balthazar Bangers Barlow Barlow+Condensed Barlow+Semi+Condensed Barriecito Barrio Basic Baskervville Battambang Baumans Bayon Be+Vietnam Bebas+Neue Belgrano Bellefair Belleza BenchNine Bentham Berkshire+Swash Beth+Ellen Bevan Big+Shoulders+Display Big+Shoulders+Text Bigelow+Rules Bigshot+One Bilbo Bilbo+Swash+Caps BioRhyme BioRhyme+Expanded Biryani Bitter Black+And+White+Picture Black+Han+Sans Black+Ops+One Blinker Bokor Bonbon Boogaloo Bowlby+One Bowlby+One+SC Brawler Bree+Serif Bubblegum+Sans Bubbler+One Buda Buenard Bungee Bungee+Hairline Bungee+Inline Bungee+Outline Bungee+Shade Butcherman Butterfly+Kids Cabin Cabin+Condensed Cabin+Sketch Caesar+Dressing Cagliostro Cairo Calistoga Calligraffitti Cambay Cambo Candal Cantarell Cantata+One Cantora+One Capriola Cardo Carme Carrois+Gothic Carrois+Gothic+SC Carter+One Catamaran Caudex Caveat Caveat+Brush Cedarville+Cursive Ceviche+One Chakra+Petch Changa Changa+One Chango Charm Charmonman Chathura Chau+Philomene+One Chela+One Chelsea+Market Chenla Cherry+Cream+Soda Cherry+Swash Chewy Chicle Chilanka Chivo Chonburi Cinzel Cinzel+Decorative Clicker+Script Coda Coda+Caption Codystar Coiny Combo Comfortaa Coming+Soon Concert+One Condiment Content Contrail+One Convergence Cookie Copse Corben Cormorant Cormorant+Garamond Cormorant+Infant Cormorant+SC Cormorant+Unicase Cormorant+Upright Courgette Courier+Prime Cousine Coustard Covered+By+Your+Grace Crafty+Girls Creepster Crete+Round Crimson+Pro Crimson+Text Croissant+One Crushed Cuprum Cute+Font Cutive Cutive+Mono Damion Dancing+Script Dangrek Darker+Grotesque David+Libre Dawning+of+a+New+Day Days+One Dekko Delius Delius+Swash+Caps Delius+Unicase Della+Respira Denk+One Devonshire Dhurjati Didact+Gothic Diplomata Diplomata+SC DM+Sans DM+Serif+Display DM+Serif+Text Do+Hyeon Dokdo Domine Donegal+One Doppio+One Dorsa Dosis Dr+Sugiyama Duru+Sans Dynalight Eagle+Lake East+Sea+Dokdo Eater EB+Garamond Economica Eczar El+Messiri Electrolize Elsie Elsie+Swash+Caps Emblema+One Emilys+Candy Encode+Sans Encode+Sans+Condensed Encode+Sans+Expanded Encode+Sans+Semi+Condensed Encode+Sans+Semi+Expanded Engagement Englebert Enriqueta Erica+One Esteban Euphoria+Script Ewert Exo Exo+2 Expletus+Sans Fahkwang Fanwood+Text Farro Farsan Fascinate Fascinate+Inline Faster+One Fasthand Fauna+One Faustina Federant Federo Felipa Fenix Finger+Paint Fira+Code Fira+Mono Fira+Sans Fira+Sans+Condensed Fira+Sans+Extra+Condensed Fjalla+One Fjord+One Flamenco Flavors Fondamento Fontdiner+Swanky Forum Francois+One Frank+Ruhl+Libre Freckle+Face Fredericka+the+Great Fredoka+One Freehand Fresca Frijole Fruktur Fugaz+One Gabriela Gaegu Gafata Galada Galdeano Galindo Gamja+Flower Gayathri Gelasio Gentium+Basic Gentium+Book+Basic Geo Geostar Geostar+Fill Germania+One GFS+Didot GFS+Neohellenic Gidugu Gilda+Display Girassol Give+You+Glory Glass+Antiqua Glegoo Gloria+Hallelujah Goblin+One Gochi+Hand Gorditas Gothic+A1 Goudy+Bookletter+1911 Graduate Grand+Hotel Gravitas+One Great+Vibes Grenze Griffy Gruppo Gudea Gugi Gupter Gurajada Habibi Halant Hammersmith+One Hanalei Hanalei+Fill Handlee Hanuman Happy+Monkey Harmattan Headland+One Heebo Henny+Penny Hepta+Slab Herr+Von+Muellerhoff Hi+Melody Hind Hind+Guntur Hind+Madurai Hind+Siliguri Hind+Vadodara Holtwood+One+SC Homemade+Apple Homenaje Ibarra+Real+Nova IBM+Plex+Mono IBM+Plex+Sans IBM+Plex+Sans+Condensed IBM+Plex+Serif Iceberg Iceland IM+Fell+Double+Pica IM+Fell+Double+Pica+SC IM+Fell+DW+Pica IM+Fell+DW+Pica+SC IM+Fell+English IM+Fell+English+SC IM+Fell+French+Canon IM+Fell+French+Canon+SC IM+Fell+Great+Primer IM+Fell+Great+Primer+SC Imprima Inconsolata Inder Indie+Flower Inika Inknut+Antiqua Inria+Serif Irish+Grover Istok+Web Italiana Italianno Itim Jacques+Francois Jacques+Francois+Shadow Jaldi Jim+Nightshade Jockey+One Jolly+Lodger Jomhuria Jomolhari Josefin+Sans Josefin+Slab Joti+One Jua Judson Julee Julius+Sans+One Junge Jura Just+Another+Hand Just+Me+Again+Down+Here K2D Kadwa Kalam Kameron Kanit Kantumruy Karla Karma Katibeh Kaushan+Script Kavivanar Kavoon Kdam+Thmor Keania+One Kelly+Slab Kenia Khand Khmer Khula Kirang+Haerang Kite+One Knewave Kodchasan KoHo Kosugi Kosugi+Maru Kotta+One Koulen Kranky Kreon Kristi Krona+One Krub Kulim+Park Kumar+One Kumar+One+Outline Kurale La+Belle+Aurore Lacquer Laila Lakki+Reddy Lalezar Lancelot Lateef Lato League+Script Leckerli+One Ledger Lekton Lemon Lemonada Lexend+Deca Lexend+Exa Lexend+Giga Lexend+Mega Lexend+Peta Lexend+Tera Lexend+Zetta Libre+Barcode+128 Libre+Barcode+128+Text Libre+Barcode+39 Libre+Barcode+39+Extended Libre+Barcode+39+Extended+Text Libre+Barcode+39+Text Libre+Baskerville Libre+Caslon+Display Libre+Caslon+Text Libre+Franklin Life+Savers Lilita+One Lily+Script+One Limelight Linden+Hill Literata Liu+Jian+Mao+Cao Livvic Lobster Lobster+Two Londrina+Outline Londrina+Shadow Londrina+Sketch Londrina+Solid Long+Cang Lora Love+Ya+Like+A+Sister Loved+by+the+King Lovers+Quarrel Luckiest+Guy Lusitana Lustria M+PLUS+1p M+PLUS+Rounded+1c Ma+Shan+Zheng Macondo Macondo+Swash+Caps Mada Magra Maiden+Orange Maitree Major+Mono+Display Mako Mali Mallanna Mandali Manjari Mansalva Manuale Marcellus Marcellus+SC Marck+Script Margarine Markazi+Text Marko+One Marmelad Martel Martel+Sans Marvel Mate Mate+SC Maven+Pro McLaren Meddon MedievalSharp Medula+One Meera+Inimai Megrim Meie+Script Merienda Merienda+One Merriweather Merriweather+Sans Metal Metal+Mania Metamorphous Metrophobic Michroma Milonga Miltonian Miltonian+Tattoo Mina Miniver Miriam+Libre Mirza Miss+Fajardose Mitr Modak Modern+Antiqua Mogra Molengo Molle Monda Monofett Monoton Monsieur+La+Doulaise Montaga Montez Montserrat Montserrat+Alternates Montserrat+Subrayada Moul Moulpali Mountains+of+Christmas Mouse+Memoirs Mr+Bedfort Mr+Dafoe Mr+De+Haviland Mrs+Saint+Delafield Mrs+Sheppards Mukta Mukta+Mahee Mukta+Malar Mukta+Vaani Muli Mystery+Quest Nanum+Brush+Script Nanum+Gothic Nanum+Gothic+Coding Nanum+Myeongjo Nanum+Pen+Script Neucha Neuton New+Rocker News+Cycle Niconne Niramit Nixie+One Nobile Nokora Norican Nosifer Notable Nothing+You+Could+Do Noticia+Text Noto+Sans Noto+Sans+HK Noto+Sans+JP Noto+Sans+KR Noto+Sans+SC Noto+Sans+TC Noto+Serif Noto+Serif+JP Noto+Serif+KR Noto+Serif+SC Noto+Serif+TC Nova+Cut Nova+Flat Nova+Mono Nova+Oval Nova+Round Nova+Script Nova+Slim Nova+Square NTR Numans Nunito Nunito+Sans Odibee+Sans Odor+Mean+Chey Offside Old+Standard+TT Oldenburg Oleo+Script Oleo+Script+Swash+Caps Open+Sans:300 Open+Sans Open+Sans:600 Open+Sans:800 Open+Sans+Condensed:300 Oranienbaum Orbitron Oregano Orienta Original+Surfer Oswald Over+the+Rainbow Overlock Overlock+SC Overpass Overpass+Mono Ovo Oxygen Oxygen+Mono Pacifico Padauk Palanquin Palanquin+Dark Pangolin Paprika Parisienne Passero+One Passion+One Pathway+Gothic+One Patrick+Hand Patrick+Hand+SC Pattaya Patua+One Pavanam Paytone+One Peddana Peralta Permanent+Marker Petit+Formal+Script Petrona Philosopher Piedra Pinyon+Script Pirata+One Plaster Play Playball Playfair+Display Playfair+Display+SC Podkova Poiret+One Poller+One Poly Pompiere Pontano+Sans Poor+Story Poppins Port+Lligat+Sans Port+Lligat+Slab Pragati+Narrow Prata Preahvihear Press+Start+2P Pridi Princess+Sofia Prociono Prompt Prosto+One Proza+Libre PT+Mono PT+Sans PT+Sans+Caption PT+Sans+Narrow PT+Serif PT+Serif+Caption Public+Sans Puritan Purple+Purse Quando Quantico Quattrocento Quattrocento+Sans Questrial Quicksand Quintessential Qwigley Racing+Sans+One Radley Rajdhani Rakkas Raleway Raleway+Dots Ramabhadra Ramaraja Rambla Rammetto+One Ranchers Rancho Ranga Rasa Rationale Ravi+Prakash Red+Hat+Display Red+Hat+Text Redressed Reem+Kufi Reenie+Beanie Revalia Rhodium+Libre Ribeye Ribeye+Marrow Righteous Risque Roboto Roboto+Condensed Roboto+Mono Roboto+Slab Rochester Rock+Salt Rokkitt Romanesco Ropa+Sans Rosario Rosarivo Rouge+Script Rozha+One Rubik Rubik+Mono+One Ruda Rufina Ruge+Boogie Ruluko Rum+Raisin Ruslan+Display Russo+One Ruthie Rye Sacramento Sahitya Sail Saira Saira+Condensed Saira+Extra+Condensed Saira+Semi+Condensed Saira+Stencil+One Salsa Sanchez Sancreek Sansita Sarabun Sarala Sarina Sarpanch Satisfy Sawarabi+Gothic Sawarabi+Mincho Scada Scheherazade Schoolbell Scope+One Seaweed+Script Secular+One Sedgwick+Ave Sedgwick+Ave+Display Sevillana Seymour+One Shadows+Into+Light Shadows+Into+Light+Two Shanti Share Share+Tech Share+Tech+Mono Shojumaru Short+Stack Shrikhand Siemreap Sigmar+One Signika Signika+Negative Simonetta Single+Day Sintony Sirin+Stencil Six+Caps Skranji Slabo+13px Slabo+27px Slackey Smokum Smythe Sniglet Snippet Snowburst+One Sofadi+One Sofia Solway Song+Myung Sonsie+One Sorts+Mill+Goudy Source+Code+Pro Source+Sans+Pro Source+Serif+Pro Space+Mono Special+Elite Spectral Spectral+SC Spicy+Rice Spinnaker Spirax Squada+One Sree+Krushnadevaraya Sriracha Srisakdi Staatliches Stalemate Stalinist+One Stardos+Stencil Stint+Ultra+Condensed Stint+Ultra+Expanded Stoke Strait Stylish Sue+Ellen+Francisco Suez+One Sulphur+Point Sumana Sunflower Sunshiney Supermercado+One Sura Suranna Suravaram Suwannaphum Swanky+and+Moo+Moo Syncopate Tajawal Tangerine Taprom Tauri Taviraj Teko Telex Tenali+Ramakrishna Tenor+Sans Text+Me+One Thasadith The+Girl+Next+Door Tienne Tillana Timmana Tinos Titan+One Titillium+Web Tomorrow Trade+Winds Trirong Trocchi Trochut Trykker Tulpen+One Turret+Road Ubuntu Ubuntu+Condensed Ubuntu+Mono Ultra Uncial+Antiqua Underdog Unica+One UnifrakturCook UnifrakturMaguntia Unkempt Unlock Unna Vampiro+One Varela Varela+Round Vast+Shadow Vesper+Libre Vibes Vibur Vidaloka Viga Voces Volkhov Vollkorn Vollkorn+SC Voltaire VT323 Waiting+for+the+Sunrise Wallpoet Walter+Turncoat Warnes Wellfleet Wendy+One Wire+One Work+Sans Yanone+Kaffeesatz Yantramanav Yatra+One Yellowtail Yeon+Sung Yeseva+One Yesteryear Yrsa ZCOOL+KuaiLe ZCOOL+QingKe+HuangYou ZCOOL+XiaoWei Zeyada Zhi+Mang+Xing Zilla+Slab Zilla+Slab+Highlight".split(" ")},
|
2 |
+
n=function(){function k(a,c){c.systemFonts||(c.systemFonts=[]);c.localFonts||(c.localFonts=[]);c.googleFonts||(c.googleFonts=[]);this.options=c;this.$original=b(a);this.setupHtml();this.getVisibleFonts();this.bindEvents();this.query="";this.keyActive=!1;this.searchBoxHeight=0;if(a=this.$original.val())this.updateSelected(),this.addFontLink(a)}k.prototype={keyDown:function(a){function c(a){a.preventDefault();a.stopPropagation()}this.keyActive=!0;if(27==a.keyCode)c(a),this.toggleDropdown("hide");else if(38==
|
3 |
+
a.keyCode){c(a);a=b("li.active",this.$results);var e=a.prev("li");0<e.length&&(a.removeClass("active"),this.$results.scrollTop(e.addClass("active")[0].offsetTop-this.searchBoxHeight))}else 40==a.keyCode?(c(a),a=b("li.active",this.$results),e=a.next("li"),0<e.length&&(a.removeClass("active"),this.$results.scrollTop(e.addClass("active")[0].offsetTop-this.searchBoxHeight))):13==a.keyCode?(c(a),b("li.active",this.$results).trigger("click")):(this.query+=String.fromCharCode(a.keyCode).toLowerCase(),a=
|
4 |
+
b("li[data-query^='"+this.query+"']").first(),0<a.length&&(b("li.active",this.$results).removeClass("active"),this.$results.scrollTop(a.addClass("active")[0].offsetTop)))},keyUp:function(a){this.keyActive=!1},bindEvents:function(){var a=this;b("li",this.$results).click(g(this.selectFont,this)).mouseover(g(this.activateFont,this));this.$select.click(g(function(){a.toggleDropdown("show")},this));this.$original.on("setFont",function(c,e,d){d=d||400;c=e.replace(/ /g,"+")+(400==d?"":":"+d);d=b("li[data-value='"+
|
5 |
+
c+"']",a.$results);0==d.length&&(c=e.replace(/ /g,"+"));d=b("li[data-value='"+c+"']",a.$results);b("li.active",a.$results).removeClass("active");d.addClass("active");a.$original.val(c);a.updateSelected();a.addFontLink(d.data("value"))});this.$original.on("change",function(){a.updateSelected();a.addFontLink(b("li.active",a.$results).data("value"))});if(this.options.searchable)this.$input.on("keyup",function(){var c=this.value.toLowerCase();b("li",a.$results).each(function(){-1==b(this).text().toLowerCase().indexOf(c)?
|
6 |
+
b(this).hide():b(this).show()})});b(document).on("click",function(c){0===b(c.target).closest("."+a.options.style).length&&a.toggleDropdown("hide")})},toggleDropdown:function(a){"hide"===a?(this.$element.off("keydown keyup"),this.query="",this.keyActive=!1,this.$element.removeClass("font-select-active"),this.$drop.hide(),clearInterval(this.visibleInterval)):(this.$element.on("keydown",g(this.keyDown,this)),this.$element.on("keyup",g(this.keyUp,this)),this.$element.addClass("font-select-active"),this.$drop.show(),
|
7 |
+
this.visibleInterval=setInterval(g(this.getVisibleFonts,this),500),this.searchBoxHeight=this.$search.outerHeight(),this.moveToSelected())},selectFont:function(){var a=b("li.active",this.$results).data("value");this.$original.val(a).change();this.updateSelected();this.toggleDropdown("hide")},moveToSelected:function(){var a=this.$original.val().replace(/ /g,"+");a=a?b("li[data-value='"+a+"']",this.$results):a=b("li",this.$results).first();this.$results.scrollTop(a.addClass("active")[0].offsetTop-this.searchBoxHeight)},
|
8 |
+
activateFont:function(a){this.keyActive||(b("li.active",this.$results).removeClass("active"),b(a.target).addClass("active"))},updateSelected:function(){var a=this.$original.val();b("span",this.$element).text(this.toReadable(a)).css(this.toStyle(a))},setupHtml:function(){this.$original.hide();this.$element=b("<div>",{"class":this.options.style});this.$select=b('<span tabindex="0">'+this.options.placeholder+"</span>");this.$search=b("<div>",{"class":"fs-search"});this.$input=b("<input>",{type:"text"});
|
9 |
+
this.options.placeholderSearch&&this.$input.attr("placeholder",this.options.placeholderSearch);this.$search.append(this.$input);this.$drop=b("<div>",{"class":"fs-drop"});this.$results=b("<ul>",{"class":"fs-results"});this.$original.after(this.$element.append(this.$select,this.$drop));this.options.searchable&&this.$drop.append(this.$search);this.$drop.append(this.$results.append(this.fontsAsHtml())).hide()},fontsAsHtml:function(){var a,b="",e=this.options.systemFonts,d=this.options.localFonts,h=this.options.googleFonts;
|
10 |
+
for(a=0;a<e.length;a++){var g=this.toReadable(e[a]);var f=this.toStyle(e[a]);f="font-family:"+f["font-family"];(0<d.length||0<h.length)&&a==e.length-1&&(f+=";border-bottom:1px solid #444");b+='<li data-value="'+e[a]+'" data-query="'+e[a].toLowerCase()+'" style="'+f+'">'+g+"</li>"}for(a=0;a<d.length;a++)g=this.toReadable(d[a]),f=this.toStyle(d[a]),f="font-family:"+f["font-family"],0<h.length&&a==d.length-1&&(f+=";border-bottom:1px solid #444"),b+='<li data-value="'+d[a]+'" data-query="'+d[a].toLowerCase()+
|
11 |
+
'" style="'+f+'">'+g+"</li>";for(a=0;a<h.length;a++)g=this.toReadable(h[a]),f=this.toStyle(h[a]),f="font-family:"+f["font-family"]+";font-weight:"+f["font-weight"],b+='<li data-value="'+h[a]+'" data-query="'+h[a].toLowerCase()+'" style="'+f+'">'+g+"</li>";return b},toReadable:function(a){return a.replace(/[\+|:]/g," ")},toStyle:function(a){a=a.split(":");return{"font-family":"'"+this.toReadable(a[0])+"'","font-weight":a[1]||400}},getVisibleFonts:function(){if(!this.$results.is(":hidden")){var a=this,
|
12 |
+
c=this.$results.scrollTop(),e=c+this.$results.height();if(this.options.lookahead){var d=b("li",this.$results).first().height();e+=d*this.options.lookahead}b("li:visible",this.$results).each(function(){var d=b(this).position().top+c;d+b(this).height()>=c&&d<=e&&a.addFontLink(b(this).data("value"))})}},addFontLink:function(a){l[a]||(l[a]=!0,-1<this.options.googleFonts.indexOf(a)?b("link:last").after('<link href="'+this.options.googleApi+a+'" rel="stylesheet" type="text/css">'):-1<this.options.localFonts.indexOf(a)&&
|
13 |
+
(a=this.toReadable(a),b("head").append("<style> @font-face { font-family:'"+a+"'; font-style:normal; font-weight:400; src:local('"+a+"'), url('"+this.options.localFontsUrl+a+".woff') format('woff'); } </style>")))}};return k}();return this.each(function(){k&&b.extend(m,k);return new n(this,m)})}})(jQuery);
|
js/jquery.fullscreen.js
ADDED
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jquery.fullscreen v0.6.0
|
3 |
+
* https://github.com/private-face/jquery.fullscreen
|
4 |
+
*
|
5 |
+
* Copyright (c) 2012–2016 Vladimir Zhuravlev
|
6 |
+
* Released under the MIT license
|
7 |
+
* https://github.com/private-face/jquery.fullscreen/blob/master/LICENSE
|
8 |
+
*
|
9 |
+
* Date: 2016-08-25
|
10 |
+
**/
|
11 |
+
(function(global, factory) {
|
12 |
+
if (typeof define === 'function' && define.amd) {
|
13 |
+
// AMD
|
14 |
+
define(['jquery'], function (jQuery) {
|
15 |
+
return factory(jQuery);
|
16 |
+
});
|
17 |
+
} else if (typeof exports === 'object') {
|
18 |
+
// CommonJS/Browserify
|
19 |
+
factory(require('jquery'));
|
20 |
+
} else {
|
21 |
+
// Global
|
22 |
+
factory(global.jQuery);
|
23 |
+
}
|
24 |
+
}(this, function($) {
|
25 |
+
function defined(a) {
|
26 |
+
return typeof a !== "undefined";
|
27 |
+
}
|
28 |
+
|
29 |
+
function extend(child, parent, prototype) {
|
30 |
+
var F = function() {};
|
31 |
+
F.prototype = parent.prototype;
|
32 |
+
child.prototype = new F();
|
33 |
+
child.prototype.constructor = child;
|
34 |
+
parent.prototype.constructor = parent;
|
35 |
+
child._super = parent.prototype;
|
36 |
+
if (prototype) {
|
37 |
+
$.extend(child.prototype, prototype);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
var SUBST = [ [ "", "" ], [ "exit", "cancel" ], [ "screen", "Screen" ] ];
|
42 |
+
|
43 |
+
var VENDOR_PREFIXES = [ "", "o", "ms", "moz", "webkit", "webkitCurrent" ];
|
44 |
+
|
45 |
+
function native(obj, name) {
|
46 |
+
var prefixed;
|
47 |
+
if (typeof obj === "string") {
|
48 |
+
name = obj;
|
49 |
+
obj = document;
|
50 |
+
}
|
51 |
+
for (var i = 0; i < SUBST.length; ++i) {
|
52 |
+
name = name.replace(SUBST[i][0], SUBST[i][1]);
|
53 |
+
for (var j = 0; j < VENDOR_PREFIXES.length; ++j) {
|
54 |
+
prefixed = VENDOR_PREFIXES[j];
|
55 |
+
prefixed += j === 0 ? name : name.charAt(0).toUpperCase() + name.substr(1);
|
56 |
+
if (defined(obj[prefixed])) {
|
57 |
+
return obj[prefixed];
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
return void 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
var ua = navigator.userAgent;
|
65 |
+
|
66 |
+
var fsEnabled = native("fullscreenEnabled");
|
67 |
+
|
68 |
+
var parsedChromeUA = ua.match(/Android.*Chrome\/(\d+)\./);
|
69 |
+
|
70 |
+
var IS_ANDROID_CHROME = !!parsedChromeUA;
|
71 |
+
|
72 |
+
var CHROME_VERSION;
|
73 |
+
|
74 |
+
var ANDROID_CHROME_VERSION;
|
75 |
+
|
76 |
+
if (IS_ANDROID_CHROME) {
|
77 |
+
ANDROID_CHROME_VERSION = parseInt(parsedChromeUA[1]);
|
78 |
+
}
|
79 |
+
|
80 |
+
var IS_NATIVELY_SUPPORTED = (!IS_ANDROID_CHROME || ANDROID_CHROME_VERSION > 37) && defined(native("fullscreenElement")) && (!defined(fsEnabled) || fsEnabled === true);
|
81 |
+
|
82 |
+
var version = $.fn.jquery.split(".");
|
83 |
+
|
84 |
+
var JQ_LT_17 = parseInt(version[0]) < 2 && parseInt(version[1]) < 7;
|
85 |
+
|
86 |
+
var FullScreenAbstract = function() {
|
87 |
+
this.__options = null;
|
88 |
+
this._fullScreenElement = null;
|
89 |
+
this.__savedStyles = {};
|
90 |
+
};
|
91 |
+
|
92 |
+
FullScreenAbstract.prototype = {
|
93 |
+
native: native,
|
94 |
+
_DEFAULT_OPTIONS: {
|
95 |
+
styles: {
|
96 |
+
boxSizing: "border-box",
|
97 |
+
MozBoxSizing: "border-box",
|
98 |
+
WebkitBoxSizing: "border-box"
|
99 |
+
},
|
100 |
+
toggleClass: null
|
101 |
+
},
|
102 |
+
__documentOverflow: "",
|
103 |
+
__htmlOverflow: "",
|
104 |
+
_preventDocumentScroll: function() {
|
105 |
+
this.__documentOverflow = document.body.style.overflow;
|
106 |
+
this.__htmlOverflow = document.documentElement.style.overflow;
|
107 |
+
if (!$(this._fullScreenElement).is("body, html")) {
|
108 |
+
$("body, html").css("overflow", "hidden");
|
109 |
+
}
|
110 |
+
},
|
111 |
+
_allowDocumentScroll: function() {
|
112 |
+
document.body.style.overflow = this.__documentOverflow;
|
113 |
+
document.documentElement.style.overflow = this.__htmlOverflow;
|
114 |
+
},
|
115 |
+
_fullScreenChange: function() {
|
116 |
+
if (!this.__options) {
|
117 |
+
return;
|
118 |
+
}
|
119 |
+
if (!this.isFullScreen()) {
|
120 |
+
this._allowDocumentScroll();
|
121 |
+
this._revertStyles();
|
122 |
+
this._triggerEvents();
|
123 |
+
this._fullScreenElement = null;
|
124 |
+
} else {
|
125 |
+
this._preventDocumentScroll();
|
126 |
+
this._triggerEvents();
|
127 |
+
}
|
128 |
+
},
|
129 |
+
_fullScreenError: function(e) {
|
130 |
+
if (!this.__options) {
|
131 |
+
return;
|
132 |
+
}
|
133 |
+
this._revertStyles();
|
134 |
+
this._fullScreenElement = null;
|
135 |
+
if (e) {
|
136 |
+
$(document).trigger("fscreenerror", [ e ]);
|
137 |
+
}
|
138 |
+
},
|
139 |
+
_triggerEvents: function() {
|
140 |
+
$(this._fullScreenElement).trigger(this.isFullScreen() ? "fscreenopen" : "fscreenclose");
|
141 |
+
$(document).trigger("fscreenchange", [ this.isFullScreen(), this._fullScreenElement ]);
|
142 |
+
},
|
143 |
+
_saveAndApplyStyles: function() {
|
144 |
+
var $elem = $(this._fullScreenElement);
|
145 |
+
this.__savedStyles = {};
|
146 |
+
for (var property in this.__options.styles) {
|
147 |
+
this.__savedStyles[property] = this._fullScreenElement.style[property];
|
148 |
+
this._fullScreenElement.style[property] = this.__options.styles[property];
|
149 |
+
}
|
150 |
+
if ($elem.is("body")) {
|
151 |
+
document.documentElement.style.overflow = this.__options.styles.overflow;
|
152 |
+
}
|
153 |
+
if (this.__options.toggleClass) {
|
154 |
+
$elem.addClass(this.__options.toggleClass);
|
155 |
+
}
|
156 |
+
},
|
157 |
+
_revertStyles: function() {
|
158 |
+
var $elem = $(this._fullScreenElement);
|
159 |
+
for (var property in this.__options.styles) {
|
160 |
+
this._fullScreenElement.style[property] = this.__savedStyles[property];
|
161 |
+
}
|
162 |
+
if ($elem.is("body")) {
|
163 |
+
document.documentElement.style.overflow = this.__savedStyles.overflow;
|
164 |
+
}
|
165 |
+
if (this.__options.toggleClass) {
|
166 |
+
$elem.removeClass(this.__options.toggleClass);
|
167 |
+
}
|
168 |
+
},
|
169 |
+
open: function(elem, options) {
|
170 |
+
if (elem === this._fullScreenElement) {
|
171 |
+
return;
|
172 |
+
}
|
173 |
+
if (this.isFullScreen()) {
|
174 |
+
this.exit();
|
175 |
+
}
|
176 |
+
this._fullScreenElement = elem;
|
177 |
+
this.__options = $.extend(true, {}, this._DEFAULT_OPTIONS, options);
|
178 |
+
this._saveAndApplyStyles();
|
179 |
+
},
|
180 |
+
exit: null,
|
181 |
+
isFullScreen: null,
|
182 |
+
isNativelySupported: function() {
|
183 |
+
return IS_NATIVELY_SUPPORTED;
|
184 |
+
}
|
185 |
+
};
|
186 |
+
|
187 |
+
var FullScreenNative = function() {
|
188 |
+
FullScreenNative._super.constructor.apply(this, arguments);
|
189 |
+
this.exit = $.proxy(native("exitFullscreen"), document);
|
190 |
+
this._DEFAULT_OPTIONS = $.extend(true, {}, this._DEFAULT_OPTIONS, {
|
191 |
+
styles: {
|
192 |
+
width: "100%",
|
193 |
+
height: "100%"
|
194 |
+
}
|
195 |
+
});
|
196 |
+
$(document).bind(this._prefixedString("fullscreenchange") + " MSFullscreenChange", $.proxy(this._fullScreenChange, this)).bind(this._prefixedString("fullscreenerror") + " MSFullscreenError", $.proxy(this._fullScreenError, this));
|
197 |
+
};
|
198 |
+
|
199 |
+
extend(FullScreenNative, FullScreenAbstract, {
|
200 |
+
VENDOR_PREFIXES: [ "", "o", "moz", "webkit" ],
|
201 |
+
_prefixedString: function(str) {
|
202 |
+
return $.map(this.VENDOR_PREFIXES, function(s) {
|
203 |
+
return s + str;
|
204 |
+
}).join(" ");
|
205 |
+
},
|
206 |
+
open: function(elem, options) {
|
207 |
+
FullScreenNative._super.open.apply(this, arguments);
|
208 |
+
var requestFS = native(elem, "requestFullscreen");
|
209 |
+
requestFS.call(elem);
|
210 |
+
},
|
211 |
+
exit: $.noop,
|
212 |
+
isFullScreen: function() {
|
213 |
+
return native("fullscreenElement") !== null;
|
214 |
+
},
|
215 |
+
element: function() {
|
216 |
+
return native("fullscreenElement");
|
217 |
+
}
|
218 |
+
});
|
219 |
+
|
220 |
+
var FullScreenFallback = function() {
|
221 |
+
FullScreenFallback._super.constructor.apply(this, arguments);
|
222 |
+
this._DEFAULT_OPTIONS = $.extend({}, this._DEFAULT_OPTIONS, {
|
223 |
+
styles: {
|
224 |
+
position: "fixed",
|
225 |
+
zIndex: "2147483647",
|
226 |
+
left: 0,
|
227 |
+
top: 0,
|
228 |
+
bottom: 0,
|
229 |
+
right: 0
|
230 |
+
}
|
231 |
+
});
|
232 |
+
this.__delegateKeydownHandler();
|
233 |
+
};
|
234 |
+
|
235 |
+
extend(FullScreenFallback, FullScreenAbstract, {
|
236 |
+
__isFullScreen: false,
|
237 |
+
__delegateKeydownHandler: function() {
|
238 |
+
var $doc = $(document);
|
239 |
+
$doc.delegate("*", "keydown.fullscreen", $.proxy(this.__keydownHandler, this));
|
240 |
+
var data = JQ_LT_17 ? $doc.data("events") : $._data(document).events;
|
241 |
+
var events = data["keydown"];
|
242 |
+
if (!JQ_LT_17) {
|
243 |
+
events.splice(0, 0, events.splice(events.delegateCount - 1, 1)[0]);
|
244 |
+
} else {
|
245 |
+
data.live.unshift(data.live.pop());
|
246 |
+
}
|
247 |
+
},
|
248 |
+
__keydownHandler: function(e) {
|
249 |
+
if (this.isFullScreen() && e.which === 27) {
|
250 |
+
this.exit();
|
251 |
+
return false;
|
252 |
+
}
|
253 |
+
return true;
|
254 |
+
},
|
255 |
+
_revertStyles: function() {
|
256 |
+
FullScreenFallback._super._revertStyles.apply(this, arguments);
|
257 |
+
this._fullScreenElement.offsetHeight;
|
258 |
+
},
|
259 |
+
open: function(elem) {
|
260 |
+
FullScreenFallback._super.open.apply(this, arguments);
|
261 |
+
this.__isFullScreen = true;
|
262 |
+
this._fullScreenChange();
|
263 |
+
},
|
264 |
+
exit: function() {
|
265 |
+
if (!this.__isFullScreen) {
|
266 |
+
return;
|
267 |
+
}
|
268 |
+
this.__isFullScreen = false;
|
269 |
+
this._fullScreenChange();
|
270 |
+
},
|
271 |
+
isFullScreen: function() {
|
272 |
+
return this.__isFullScreen;
|
273 |
+
},
|
274 |
+
element: function() {
|
275 |
+
return this.__isFullScreen ? this._fullScreenElement : null;
|
276 |
+
}
|
277 |
+
});
|
278 |
+
|
279 |
+
$.fullscreen = IS_NATIVELY_SUPPORTED ? new FullScreenNative() : new FullScreenFallback();
|
280 |
+
|
281 |
+
$.fn.fullscreen = function(options) {
|
282 |
+
var elem = this[0];
|
283 |
+
options = $.extend({
|
284 |
+
toggleClass: null,
|
285 |
+
overflow: "hidden"
|
286 |
+
}, options);
|
287 |
+
options.styles = {
|
288 |
+
overflow: options.overflow
|
289 |
+
};
|
290 |
+
delete options.overflow;
|
291 |
+
if (elem) {
|
292 |
+
$.fullscreen.open(elem, options);
|
293 |
+
}
|
294 |
+
return this;
|
295 |
+
};return $.fullscreen;
|
296 |
+
}));
|
js/jquery.fullscreen.min.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jquery.fullscreen v0.6.0
|
3 |
+
* https://github.com/private-face/jquery.fullscreen
|
4 |
+
*
|
5 |
+
* Copyright (c) 2012–2016 Vladimir Zhuravlev
|
6 |
+
* Released under the MIT license
|
7 |
+
* https://github.com/private-face/jquery.fullscreen/blob/master/LICENSE
|
8 |
+
*
|
9 |
+
* Date: 2016-08-25
|
10 |
+
**/
|
11 |
+
(function(global, factory) {
|
12 |
+
if (typeof define === 'function' && define.amd) {
|
13 |
+
// AMD
|
14 |
+
define(['jquery'], function (jQuery) {
|
15 |
+
return factory(jQuery);
|
16 |
+
});
|
17 |
+
} else if (typeof exports === 'object') {
|
18 |
+
// CommonJS/Browserify
|
19 |
+
factory(require('jquery'));
|
20 |
+
} else {
|
21 |
+
// Global
|
22 |
+
factory(global.jQuery);
|
23 |
+
}
|
24 |
+
}(this, function($) {
|
25 |
+
|
26 |
+
function defined(a){return"undefined"!=typeof a}function extend(a,b,c){var d=function(){};d.prototype=b.prototype,a.prototype=new d,a.prototype.constructor=a,b.prototype.constructor=b,a._super=b.prototype,c&&$.extend(a.prototype,c)}function native(a,b){var c;"string"==typeof a&&(b=a,a=document);for(var d=0;d<SUBST.length;++d){b=b.replace(SUBST[d][0],SUBST[d][1]);for(var e=0;e<VENDOR_PREFIXES.length;++e)if(c=VENDOR_PREFIXES[e],c+=0===e?b:b.charAt(0).toUpperCase()+b.substr(1),defined(a[c]))return a[c]}}var SUBST=[["",""],["exit","cancel"],["screen","Screen"]],VENDOR_PREFIXES=["","o","ms","moz","webkit","webkitCurrent"],ua=navigator.userAgent,fsEnabled=native("fullscreenEnabled"),parsedChromeUA=ua.match(/Android.*Chrome\/(\d+)\./),IS_ANDROID_CHROME=!!parsedChromeUA,CHROME_VERSION,ANDROID_CHROME_VERSION;IS_ANDROID_CHROME&&(ANDROID_CHROME_VERSION=parseInt(parsedChromeUA[1]));var IS_NATIVELY_SUPPORTED=(!IS_ANDROID_CHROME||ANDROID_CHROME_VERSION>37)&&defined(native("fullscreenElement"))&&(!defined(fsEnabled)||fsEnabled===!0),version=$.fn.jquery.split("."),JQ_LT_17=parseInt(version[0])<2&&parseInt(version[1])<7,FullScreenAbstract=function(){this.__options=null,this._fullScreenElement=null,this.__savedStyles={}};FullScreenAbstract.prototype={native:native,_DEFAULT_OPTIONS:{styles:{boxSizing:"border-box",MozBoxSizing:"border-box",WebkitBoxSizing:"border-box"},toggleClass:null},__documentOverflow:"",__htmlOverflow:"",_preventDocumentScroll:function(){this.__documentOverflow=document.body.style.overflow,this.__htmlOverflow=document.documentElement.style.overflow,$(this._fullScreenElement).is("body, html")||$("body, html").css("overflow","hidden")},_allowDocumentScroll:function(){document.body.style.overflow=this.__documentOverflow,document.documentElement.style.overflow=this.__htmlOverflow},_fullScreenChange:function(){this.__options&&(this.isFullScreen()?(this._preventDocumentScroll(),this._triggerEvents()):(this._allowDocumentScroll(),this._revertStyles(),this._triggerEvents(),this._fullScreenElement=null))},_fullScreenError:function(a){this.__options&&(this._revertStyles(),this._fullScreenElement=null,a&&$(document).trigger("fscreenerror",[a]))},_triggerEvents:function(){$(this._fullScreenElement).trigger(this.isFullScreen()?"fscreenopen":"fscreenclose"),$(document).trigger("fscreenchange",[this.isFullScreen(),this._fullScreenElement])},_saveAndApplyStyles:function(){var a=$(this._fullScreenElement);this.__savedStyles={};for(var b in this.__options.styles)this.__savedStyles[b]=this._fullScreenElement.style[b],this._fullScreenElement.style[b]=this.__options.styles[b];a.is("body")&&(document.documentElement.style.overflow=this.__options.styles.overflow),this.__options.toggleClass&&a.addClass(this.__options.toggleClass)},_revertStyles:function(){var a=$(this._fullScreenElement);for(var b in this.__options.styles)this._fullScreenElement.style[b]=this.__savedStyles[b];a.is("body")&&(document.documentElement.style.overflow=this.__savedStyles.overflow),this.__options.toggleClass&&a.removeClass(this.__options.toggleClass)},open:function(a,b){a!==this._fullScreenElement&&(this.isFullScreen()&&this.exit(),this._fullScreenElement=a,this.__options=$.extend(!0,{},this._DEFAULT_OPTIONS,b),this._saveAndApplyStyles())},exit:null,isFullScreen:null,isNativelySupported:function(){return IS_NATIVELY_SUPPORTED}};var FullScreenNative=function(){FullScreenNative._super.constructor.apply(this,arguments),this.exit=$.proxy(native("exitFullscreen"),document),this._DEFAULT_OPTIONS=$.extend(!0,{},this._DEFAULT_OPTIONS,{styles:{width:"100%",height:"100%"}}),$(document).bind(this._prefixedString("fullscreenchange")+" MSFullscreenChange",$.proxy(this._fullScreenChange,this)).bind(this._prefixedString("fullscreenerror")+" MSFullscreenError",$.proxy(this._fullScreenError,this))};extend(FullScreenNative,FullScreenAbstract,{VENDOR_PREFIXES:["","o","moz","webkit"],_prefixedString:function(a){return $.map(this.VENDOR_PREFIXES,function(b){return b+a}).join(" ")},open:function(a,b){FullScreenNative._super.open.apply(this,arguments);var c=native(a,"requestFullscreen");c.call(a)},exit:$.noop,isFullScreen:function(){return null!==native("fullscreenElement")},element:function(){return native("fullscreenElement")}});var FullScreenFallback=function(){FullScreenFallback._super.constructor.apply(this,arguments),this._DEFAULT_OPTIONS=$.extend({},this._DEFAULT_OPTIONS,{styles:{position:"fixed",zIndex:"2147483647",left:0,top:0,bottom:0,right:0}}),this.__delegateKeydownHandler()};extend(FullScreenFallback,FullScreenAbstract,{__isFullScreen:!1,__delegateKeydownHandler:function(){var a=$(document);a.delegate("*","keydown.fullscreen",$.proxy(this.__keydownHandler,this));var b=JQ_LT_17?a.data("events"):$._data(document).events,c=b.keydown;JQ_LT_17?b.live.unshift(b.live.pop()):c.splice(0,0,c.splice(c.delegateCount-1,1)[0])},__keydownHandler:function(a){return!this.isFullScreen()||27!==a.which||(this.exit(),!1)},_revertStyles:function(){FullScreenFallback._super._revertStyles.apply(this,arguments),this._fullScreenElement.offsetHeight},open:function(a){FullScreenFallback._super.open.apply(this,arguments),this.__isFullScreen=!0,this._fullScreenChange()},exit:function(){this.__isFullScreen&&(this.__isFullScreen=!1,this._fullScreenChange())},isFullScreen:function(){return this.__isFullScreen},element:function(){return this.__isFullScreen?this._fullScreenElement:null}}),$.fullscreen=IS_NATIVELY_SUPPORTED?new FullScreenNative:new FullScreenFallback,$.fn.fullscreen=function(a){var b=this[0];return a=$.extend({toggleClass:null,overflow:"hidden"},a),a.styles={overflow:a.overflow},delete a.overflow,b&&$.fullscreen.open(b,a),this};
|
27 |
+
//# sourceMappingURL=jquery.fullscreen.min.js.mapreturn $.fullscreen;
|
28 |
+
}));
|
js/jquery.jscolor.js
ADDED
@@ -0,0 +1,3524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jscolor - JavaScript Color Picker
|
3 |
+
*
|
4 |
+
* @link http://jscolor.com
|
5 |
+
* @license For open source use: GPLv3
|
6 |
+
* For commercial use: JSColor Commercial License
|
7 |
+
* @author Jan Odvarko - East Desire
|
8 |
+
* @version 2.4.5
|
9 |
+
*
|
10 |
+
* See usage examples at http://jscolor.com/examples/
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
(function (global, factory) {
|
15 |
+
|
16 |
+
'use strict';
|
17 |
+
|
18 |
+
if (typeof module === 'object' && typeof module.exports === 'object') {
|
19 |
+
// Export jscolor as a module
|
20 |
+
module.exports = global.document ?
|
21 |
+
factory (global) :
|
22 |
+
function (win) {
|
23 |
+
if (!win.document) {
|
24 |
+
throw new Error('jscolor needs a window with document');
|
25 |
+
}
|
26 |
+
return factory(win);
|
27 |
+
}
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
|
31 |
+
// Default use (no module export)
|
32 |
+
factory(global);
|
33 |
+
|
34 |
+
})(typeof window !== 'undefined' ? window : this, function (window) { // BEGIN factory
|
35 |
+
|
36 |
+
// BEGIN jscolor code
|
37 |
+
|
38 |
+
|
39 |
+
'use strict';
|
40 |
+
|
41 |
+
|
42 |
+
var jscolor = (function () { // BEGIN jscolor
|
43 |
+
|
44 |
+
var jsc = {
|
45 |
+
|
46 |
+
|
47 |
+
initialized : false,
|
48 |
+
|
49 |
+
instances : [], // created instances of jscolor
|
50 |
+
|
51 |
+
readyQueue : [], // functions waiting to be called after init
|
52 |
+
|
53 |
+
|
54 |
+
register : function () {
|
55 |
+
if (typeof window !== 'undefined' && window.document) {
|
56 |
+
window.document.addEventListener('DOMContentLoaded', jsc.pub.init, false);
|
57 |
+
}
|
58 |
+
},
|
59 |
+
|
60 |
+
|
61 |
+
installBySelector : function (selector, rootNode) {
|
62 |
+
rootNode = rootNode ? jsc.node(rootNode) : window.document;
|
63 |
+
if (!rootNode) {
|
64 |
+
throw new Error('Missing root node');
|
65 |
+
}
|
66 |
+
|
67 |
+
var elms = rootNode.querySelectorAll(selector);
|
68 |
+
|
69 |
+
// for backward compatibility with DEPRECATED installation/configuration using className
|
70 |
+
var matchClass = new RegExp('(^|\\s)(' + jsc.pub.lookupClass + ')(\\s*(\\{[^}]*\\})|\\s|$)', 'i');
|
71 |
+
|
72 |
+
for (var i = 0; i < elms.length; i += 1) {
|
73 |
+
|
74 |
+
if (elms[i].jscolor && elms[i].jscolor instanceof jsc.pub) {
|
75 |
+
continue; // jscolor already installed on this element
|
76 |
+
}
|
77 |
+
|
78 |
+
if (elms[i].type !== undefined && elms[i].type.toLowerCase() == 'color' && jsc.isColorAttrSupported) {
|
79 |
+
continue; // skips inputs of type 'color' if supported by the browser
|
80 |
+
}
|
81 |
+
|
82 |
+
var dataOpts, m;
|
83 |
+
|
84 |
+
if (
|
85 |
+
(dataOpts = jsc.getDataAttr(elms[i], 'jscolor')) !== null ||
|
86 |
+
(elms[i].className && (m = elms[i].className.match(matchClass))) // installation using className (DEPRECATED)
|
87 |
+
) {
|
88 |
+
var targetElm = elms[i];
|
89 |
+
|
90 |
+
var optsStr = '';
|
91 |
+
if (dataOpts !== null) {
|
92 |
+
optsStr = dataOpts;
|
93 |
+
|
94 |
+
} else if (m) { // installation using className (DEPRECATED)
|
95 |
+
console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.' + jsc.docsRef);
|
96 |
+
if (m[4]) {
|
97 |
+
optsStr = m[4];
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
var opts = null;
|
102 |
+
if (optsStr.trim()) {
|
103 |
+
try {
|
104 |
+
opts = jsc.parseOptionsStr(optsStr);
|
105 |
+
} catch (e) {
|
106 |
+
console.warn(e + '\n' + optsStr);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
try {
|
111 |
+
new jsc.pub(targetElm, opts);
|
112 |
+
} catch (e) {
|
113 |
+
console.warn(e);
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
117 |
+
},
|
118 |
+
|
119 |
+
|
120 |
+
parseOptionsStr : function (str) {
|
121 |
+
var opts = null;
|
122 |
+
|
123 |
+
try {
|
124 |
+
opts = JSON.parse(str);
|
125 |
+
|
126 |
+
} catch (eParse) {
|
127 |
+
if (!jsc.pub.looseJSON) {
|
128 |
+
throw new Error('Could not parse jscolor options as JSON: ' + eParse);
|
129 |
+
} else {
|
130 |
+
// loose JSON syntax is enabled -> try to evaluate the options string as JavaScript object
|
131 |
+
try {
|
132 |
+
opts = (new Function ('var opts = (' + str + '); return typeof opts === "object" ? opts : {};'))();
|
133 |
+
} catch (eEval) {
|
134 |
+
throw new Error('Could not evaluate jscolor options: ' + eEval);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
return opts;
|
139 |
+
},
|
140 |
+
|
141 |
+
|
142 |
+
getInstances : function () {
|
143 |
+
var inst = [];
|
144 |
+
for (var i = 0; i < jsc.instances.length; i += 1) {
|
145 |
+
// if the targetElement still exists, the instance is considered "alive"
|
146 |
+
if (jsc.instances[i] && jsc.instances[i].targetElement) {
|
147 |
+
inst.push(jsc.instances[i]);
|
148 |
+
}
|
149 |
+
}
|
150 |
+
return inst;
|
151 |
+
},
|
152 |
+
|
153 |
+
|
154 |
+
createEl : function (tagName) {
|
155 |
+
var el = window.document.createElement(tagName);
|
156 |
+
jsc.setData(el, 'gui', true);
|
157 |
+
return el;
|
158 |
+
},
|
159 |
+
|
160 |
+
|
161 |
+
node : function (nodeOrSelector) {
|
162 |
+
if (!nodeOrSelector) {
|
163 |
+
return null;
|
164 |
+
}
|
165 |
+
|
166 |
+
if (typeof nodeOrSelector === 'string') {
|
167 |
+
// query selector
|
168 |
+
var sel = nodeOrSelector;
|
169 |
+
var el = null;
|
170 |
+
try {
|
171 |
+
el = window.document.querySelector(sel);
|
172 |
+
} catch (e) {
|
173 |
+
console.warn(e);
|
174 |
+
return null;
|
175 |
+
}
|
176 |
+
if (!el) {
|
177 |
+
console.warn('No element matches the selector: %s', sel);
|
178 |
+
}
|
179 |
+
return el;
|
180 |
+
}
|
181 |
+
|
182 |
+
if (jsc.isNode(nodeOrSelector)) {
|
183 |
+
// DOM node
|
184 |
+
return nodeOrSelector;
|
185 |
+
}
|
186 |
+
|
187 |
+
console.warn('Invalid node of type %s: %s', typeof nodeOrSelector, nodeOrSelector);
|
188 |
+
return null;
|
189 |
+
},
|
190 |
+
|
191 |
+
|
192 |
+
// See https://stackoverflow.com/questions/384286/
|
193 |
+
isNode : function (val) {
|
194 |
+
if (typeof Node === 'object') {
|
195 |
+
return val instanceof Node;
|
196 |
+
}
|
197 |
+
return val && typeof val === 'object' && typeof val.nodeType === 'number' && typeof val.nodeName === 'string';
|
198 |
+
},
|
199 |
+
|
200 |
+
|
201 |
+
nodeName : function (node) {
|
202 |
+
if (node && node.nodeName) {
|
203 |
+
return node.nodeName.toLowerCase();
|
204 |
+
}
|
205 |
+
return false;
|
206 |
+
},
|
207 |
+
|
208 |
+
|
209 |
+
removeChildren : function (node) {
|
210 |
+
while (node.firstChild) {
|
211 |
+
node.removeChild(node.firstChild);
|
212 |
+
}
|
213 |
+
},
|
214 |
+
|
215 |
+
|
216 |
+
isTextInput : function (el) {
|
217 |
+
return el && jsc.nodeName(el) === 'input' && el.type.toLowerCase() === 'text';
|
218 |
+
},
|
219 |
+
|
220 |
+
|
221 |
+
isButton : function (el) {
|
222 |
+
if (!el) {
|
223 |
+
return false;
|
224 |
+
}
|
225 |
+
var n = jsc.nodeName(el);
|
226 |
+
return (
|
227 |
+
(n === 'button') ||
|
228 |
+
(n === 'input' && ['button', 'submit', 'reset'].indexOf(el.type.toLowerCase()) > -1)
|
229 |
+
);
|
230 |
+
},
|
231 |
+
|
232 |
+
|
233 |
+
isButtonEmpty : function (el) {
|
234 |
+
switch (jsc.nodeName(el)) {
|
235 |
+
case 'input': return (!el.value || el.value.trim() === '');
|
236 |
+
case 'button': return (el.textContent.trim() === '');
|
237 |
+
}
|
238 |
+
return null; // could not determine element's text
|
239 |
+
},
|
240 |
+
|
241 |
+
|
242 |
+
// See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
|
243 |
+
isPassiveEventSupported : (function () {
|
244 |
+
var supported = false;
|
245 |
+
|
246 |
+
try {
|
247 |
+
var opts = Object.defineProperty({}, 'passive', {
|
248 |
+
get: function () { supported = true; }
|
249 |
+
});
|
250 |
+
window.addEventListener('testPassive', null, opts);
|
251 |
+
window.removeEventListener('testPassive', null, opts);
|
252 |
+
} catch (e) {}
|
253 |
+
|
254 |
+
return supported;
|
255 |
+
})(),
|
256 |
+
|
257 |
+
|
258 |
+
isColorAttrSupported : (function () {
|
259 |
+
var elm = window.document.createElement('input');
|
260 |
+
if (elm.setAttribute) {
|
261 |
+
elm.setAttribute('type', 'color');
|
262 |
+
if (elm.type.toLowerCase() == 'color') {
|
263 |
+
return true;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
return false;
|
267 |
+
})(),
|
268 |
+
|
269 |
+
|
270 |
+
dataProp : '_data_jscolor',
|
271 |
+
|
272 |
+
|
273 |
+
// usage:
|
274 |
+
// setData(obj, prop, value)
|
275 |
+
// setData(obj, {prop:value, ...})
|
276 |
+
//
|
277 |
+
setData : function () {
|
278 |
+
var obj = arguments[0];
|
279 |
+
|
280 |
+
if (arguments.length === 3) {
|
281 |
+
// setting a single property
|
282 |
+
var data = obj.hasOwnProperty(jsc.dataProp) ? obj[jsc.dataProp] : (obj[jsc.dataProp] = {});
|
283 |
+
var prop = arguments[1];
|
284 |
+
var value = arguments[2];
|
285 |
+
|
286 |
+
data[prop] = value;
|
287 |
+
return true;
|
288 |
+
|
289 |
+
} else if (arguments.length === 2 && typeof arguments[1] === 'object') {
|
290 |
+
// setting multiple properties
|
291 |
+
var data = obj.hasOwnProperty(jsc.dataProp) ? obj[jsc.dataProp] : (obj[jsc.dataProp] = {});
|
292 |
+
var map = arguments[1];
|
293 |
+
|
294 |
+
for (var prop in map) {
|
295 |
+
if (map.hasOwnProperty(prop)) {
|
296 |
+
data[prop] = map[prop];
|
297 |
+
}
|
298 |
+
}
|
299 |
+
return true;
|
300 |
+
}
|
301 |
+
|
302 |
+
throw new Error('Invalid arguments');
|
303 |
+
},
|
304 |
+
|
305 |
+
|
306 |
+
// usage:
|
307 |
+
// removeData(obj, prop, [prop...])
|
308 |
+
//
|
309 |
+
removeData : function () {
|
310 |
+
var obj = arguments[0];
|
311 |
+
if (!obj.hasOwnProperty(jsc.dataProp)) {
|
312 |
+
return true; // data object does not exist
|
313 |
+
}
|
314 |
+
for (var i = 1; i < arguments.length; i += 1) {
|
315 |
+
var prop = arguments[i];
|
316 |
+
delete obj[jsc.dataProp][prop];
|
317 |
+
}
|
318 |
+
return true;
|
319 |
+
},
|
320 |
+
|
321 |
+
|
322 |
+
getData : function (obj, prop, setDefault) {
|
323 |
+
if (!obj.hasOwnProperty(jsc.dataProp)) {
|
324 |
+
// data object does not exist
|
325 |
+
if (setDefault !== undefined) {
|
326 |
+
obj[jsc.dataProp] = {}; // create data object
|
327 |
+
} else {
|
328 |
+
return undefined; // no value to return
|
329 |
+
}
|
330 |
+
}
|
331 |
+
var data = obj[jsc.dataProp];
|
332 |
+
|
333 |
+
if (!data.hasOwnProperty(prop) && setDefault !== undefined) {
|
334 |
+
data[prop] = setDefault;
|
335 |
+
}
|
336 |
+
return data[prop];
|
337 |
+
},
|
338 |
+
|
339 |
+
|
340 |
+
getDataAttr : function (el, name) {
|
341 |
+
var attrName = 'data-' + name;
|
342 |
+
var attrValue = el.getAttribute(attrName);
|
343 |
+
return attrValue;
|
344 |
+
},
|
345 |
+
|
346 |
+
|
347 |
+
setDataAttr : function (el, name, value) {
|
348 |
+
var attrName = 'data-' + name;
|
349 |
+
el.setAttribute(attrName, value);
|
350 |
+
},
|
351 |
+
|
352 |
+
|
353 |
+
_attachedGroupEvents : {},
|
354 |
+
|
355 |
+
|
356 |
+
attachGroupEvent : function (groupName, el, evnt, func) {
|
357 |
+
if (!jsc._attachedGroupEvents.hasOwnProperty(groupName)) {
|
358 |
+
jsc._attachedGroupEvents[groupName] = [];
|
359 |
+
}
|
360 |
+
jsc._attachedGroupEvents[groupName].push([el, evnt, func]);
|
361 |
+
el.addEventListener(evnt, func, false);
|
362 |
+
},
|
363 |
+
|
364 |
+
|
365 |
+
detachGroupEvents : function (groupName) {
|
366 |
+
if (jsc._attachedGroupEvents.hasOwnProperty(groupName)) {
|
367 |
+
for (var i = 0; i < jsc._attachedGroupEvents[groupName].length; i += 1) {
|
368 |
+
var evt = jsc._attachedGroupEvents[groupName][i];
|
369 |
+
evt[0].removeEventListener(evt[1], evt[2], false);
|
370 |
+
}
|
371 |
+
delete jsc._attachedGroupEvents[groupName];
|
372 |
+
}
|
373 |
+
},
|
374 |
+
|
375 |
+
|
376 |
+
preventDefault : function (e) {
|
377 |
+
if (e.preventDefault) { e.preventDefault(); }
|
378 |
+
e.returnValue = false;
|
379 |
+
},
|
380 |
+
|
381 |
+
|
382 |
+
captureTarget : function (target) {
|
383 |
+
// IE
|
384 |
+
if (target.setCapture) {
|
385 |
+
jsc._capturedTarget = target;
|
386 |
+
jsc._capturedTarget.setCapture();
|
387 |
+
}
|
388 |
+
},
|
389 |
+
|
390 |
+
|
391 |
+
releaseTarget : function () {
|
392 |
+
// IE
|
393 |
+
if (jsc._capturedTarget) {
|
394 |
+
jsc._capturedTarget.releaseCapture();
|
395 |
+
jsc._capturedTarget = null;
|
396 |
+
}
|
397 |
+
},
|
398 |
+
|
399 |
+
|
400 |
+
triggerEvent : function (el, eventName, bubbles, cancelable) {
|
401 |
+
if (!el) {
|
402 |
+
return;
|
403 |
+
}
|
404 |
+
|
405 |
+
var ev = null;
|
406 |
+
|
407 |
+
if (typeof Event === 'function') {
|
408 |
+
ev = new Event(eventName, {
|
409 |
+
bubbles: bubbles,
|
410 |
+
cancelable: cancelable
|
411 |
+
});
|
412 |
+
} else {
|
413 |
+
// IE
|
414 |
+
ev = window.document.createEvent('Event');
|
415 |
+
ev.initEvent(eventName, bubbles, cancelable);
|
416 |
+
}
|
417 |
+
|
418 |
+
if (!ev) {
|
419 |
+
return false;
|
420 |
+
}
|
421 |
+
|
422 |
+
// so that we know that the event was triggered internally
|
423 |
+
jsc.setData(ev, 'internal', true);
|
424 |
+
|
425 |
+
el.dispatchEvent(ev);
|
426 |
+
return true;
|
427 |
+
},
|
428 |
+
|
429 |
+
|
430 |
+
triggerInputEvent : function (el, eventName, bubbles, cancelable) {
|
431 |
+
if (!el) {
|
432 |
+
return;
|
433 |
+
}
|
434 |
+
if (jsc.isTextInput(el)) {
|
435 |
+
jsc.triggerEvent(el, eventName, bubbles, cancelable);
|
436 |
+
}
|
437 |
+
},
|
438 |
+
|
439 |
+
|
440 |
+
eventKey : function (ev) {
|
441 |
+
var keys = {
|
442 |
+
9: 'Tab',
|
443 |
+
13: 'Enter',
|
444 |
+
27: 'Escape',
|
445 |
+
};
|
446 |
+
if (typeof ev.code === 'string') {
|
447 |
+
return ev.code;
|
448 |
+
} else if (ev.keyCode !== undefined && keys.hasOwnProperty(ev.keyCode)) {
|
449 |
+
return keys[ev.keyCode];
|
450 |
+
}
|
451 |
+
return null;
|
452 |
+
},
|
453 |
+
|
454 |
+
|
455 |
+
strList : function (str) {
|
456 |
+
if (!str) {
|
457 |
+
return [];
|
458 |
+
}
|
459 |
+
return str.replace(/^\s+|\s+$/g, '').split(/\s+/);
|
460 |
+
},
|
461 |
+
|
462 |
+
|
463 |
+
// The className parameter (str) can only contain a single class name
|
464 |
+
hasClass : function (elm, className) {
|
465 |
+
if (!className) {
|
466 |
+
return false;
|
467 |
+
}
|
468 |
+
if (elm.classList !== undefined) {
|
469 |
+
return elm.classList.contains(className);
|
470 |
+
}
|
471 |
+
// polyfill
|
472 |
+
return -1 != (' ' + elm.className.replace(/\s+/g, ' ') + ' ').indexOf(' ' + className + ' ');
|
473 |
+
},
|
474 |
+
|
475 |
+
|
476 |
+
// The className parameter (str) can contain multiple class names separated by whitespace
|
477 |
+
addClass : function (elm, className) {
|
478 |
+
var classNames = jsc.strList(className);
|
479 |
+
|
480 |
+
if (elm.classList !== undefined) {
|
481 |
+
for (var i = 0; i < classNames.length; i += 1) {
|
482 |
+
elm.classList.add(classNames[i]);
|
483 |
+
}
|
484 |
+
return;
|
485 |
+
}
|
486 |
+
// polyfill
|
487 |
+
for (var i = 0; i < classNames.length; i += 1) {
|
488 |
+
if (!jsc.hasClass(elm, classNames[i])) {
|
489 |
+
elm.className += (elm.className ? ' ' : '') + classNames[i];
|
490 |
+
}
|
491 |
+
}
|
492 |
+
},
|
493 |
+
|
494 |
+
|
495 |
+
// The className parameter (str) can contain multiple class names separated by whitespace
|
496 |
+
removeClass : function (elm, className) {
|
497 |
+
var classNames = jsc.strList(className);
|
498 |
+
|
499 |
+
if (elm.classList !== undefined) {
|
500 |
+
for (var i = 0; i < classNames.length; i += 1) {
|
501 |
+
elm.classList.remove(classNames[i]);
|
502 |
+
}
|
503 |
+
return;
|
504 |
+
}
|
505 |
+
// polyfill
|
506 |
+
for (var i = 0; i < classNames.length; i += 1) {
|
507 |
+
var repl = new RegExp(
|
508 |
+
'^\\s*' + classNames[i] + '\\s*|' +
|
509 |
+
'\\s*' + classNames[i] + '\\s*$|' +
|
510 |
+
'\\s+' + classNames[i] + '(\\s+)',
|
511 |
+
'g'
|
512 |
+
);
|
513 |
+
elm.className = elm.className.replace(repl, '$1');
|
514 |
+
}
|
515 |
+
},
|
516 |
+
|
517 |
+
|
518 |
+
getCompStyle : function (elm) {
|
519 |
+
var compStyle = window.getComputedStyle ? window.getComputedStyle(elm) : elm.currentStyle;
|
520 |
+
|
521 |
+
// Note: In Firefox, getComputedStyle returns null in a hidden iframe,
|
522 |
+
// that's why we need to check if the returned value is non-empty
|
523 |
+
if (!compStyle) {
|
524 |
+
return {};
|
525 |
+
}
|
526 |
+
return compStyle;
|
527 |
+
},
|
528 |
+
|
529 |
+
|
530 |
+
// Note:
|
531 |
+
// Setting a property to NULL reverts it to the state before it was first set
|
532 |
+
// with the 'reversible' flag enabled
|
533 |
+
//
|
534 |
+
setStyle : function (elm, styles, important, reversible) {
|
535 |
+
// using '' for standard priority (IE10 apparently doesn't like value undefined)
|
536 |
+
var priority = important ? 'important' : '';
|
537 |
+
var origStyle = null;
|
538 |
+
|
539 |
+
for (var prop in styles) {
|
540 |
+
if (styles.hasOwnProperty(prop)) {
|
541 |
+
var setVal = null;
|
542 |
+
|
543 |
+
if (styles[prop] === null) {
|
544 |
+
// reverting a property value
|
545 |
+
|
546 |
+
if (!origStyle) {
|
547 |
+
// get the original style object, but dont't try to create it if it doesn't exist
|
548 |
+
origStyle = jsc.getData(elm, 'origStyle');
|
549 |
+
}
|
550 |
+
if (origStyle && origStyle.hasOwnProperty(prop)) {
|
551 |
+
// we have property's original value -> use it
|
552 |
+
setVal = origStyle[prop];
|
553 |
+
}
|
554 |
+
|
555 |
+
} else {
|
556 |
+
// setting a property value
|
557 |
+
|
558 |
+
if (reversible) {
|
559 |
+
if (!origStyle) {
|
560 |
+
// get the original style object and if it doesn't exist, create it
|
561 |
+
origStyle = jsc.getData(elm, 'origStyle', {});
|
562 |
+
}
|
563 |
+
if (!origStyle.hasOwnProperty(prop)) {
|
564 |
+
// original property value not yet stored -> store it
|
565 |
+
origStyle[prop] = elm.style[prop];
|
566 |
+
}
|
567 |
+
}
|
568 |
+
setVal = styles[prop];
|
569 |
+
}
|
570 |
+
|
571 |
+
if (setVal !== null) {
|
572 |
+
elm.style.setProperty(prop, setVal, priority);
|
573 |
+
}
|
574 |
+
}
|
575 |
+
}
|
576 |
+
},
|
577 |
+
|
578 |
+
|
579 |
+
hexColor : function (r, g, b) {
|
580 |
+
return '#' + (
|
581 |
+
('0' + Math.round(r).toString(16)).substr(-2) +
|
582 |
+
('0' + Math.round(g).toString(16)).substr(-2) +
|
583 |
+
('0' + Math.round(b).toString(16)).substr(-2)
|
584 |
+
).toUpperCase();
|
585 |
+
},
|
586 |
+
|
587 |
+
|
588 |
+
hexaColor : function (r, g, b, a) {
|
589 |
+
return '#' + (
|
590 |
+
('0' + Math.round(r).toString(16)).substr(-2) +
|
591 |
+
('0' + Math.round(g).toString(16)).substr(-2) +
|
592 |
+
('0' + Math.round(b).toString(16)).substr(-2) +
|
593 |
+
('0' + Math.round(a * 255).toString(16)).substr(-2)
|
594 |
+
).toUpperCase();
|
595 |
+
},
|
596 |
+
|
597 |
+
|
598 |
+
rgbColor : function (r, g, b) {
|
599 |
+
return 'rgb(' +
|
600 |
+
Math.round(r) + ',' +
|
601 |
+
Math.round(g) + ',' +
|
602 |
+
Math.round(b) +
|
603 |
+
')';
|
604 |
+
},
|
605 |
+
|
606 |
+
|
607 |
+
rgbaColor : function (r, g, b, a) {
|
608 |
+
return 'rgba(' +
|
609 |
+
Math.round(r) + ',' +
|
610 |
+
Math.round(g) + ',' +
|
611 |
+
Math.round(b) + ',' +
|
612 |
+
(Math.round((a===undefined || a===null ? 1 : a) * 100) / 100) +
|
613 |
+
')';
|
614 |
+
},
|
615 |
+
|
616 |
+
|
617 |
+
linearGradient : (function () {
|
618 |
+
|
619 |
+
function getFuncName () {
|
620 |
+
var stdName = 'linear-gradient';
|
621 |
+
var prefixes = ['', '-webkit-', '-moz-', '-o-', '-ms-'];
|
622 |
+
var helper = window.document.createElement('div');
|
623 |
+
|
624 |
+
for (var i = 0; i < prefixes.length; i += 1) {
|
625 |
+
var tryFunc = prefixes[i] + stdName;
|
626 |
+
var tryVal = tryFunc + '(to right, rgba(0,0,0,0), rgba(0,0,0,0))';
|
627 |
+
|
628 |
+
helper.style.background = tryVal;
|
629 |
+
if (helper.style.background) { // CSS background successfully set -> function name is supported
|
630 |
+
return tryFunc;
|
631 |
+
}
|
632 |
+
}
|
633 |
+
return stdName; // fallback to standard 'linear-gradient' without vendor prefix
|
634 |
+
}
|
635 |
+
|
636 |
+
var funcName = getFuncName();
|
637 |
+
|
638 |
+
return function () {
|
639 |
+
return funcName + '(' + Array.prototype.join.call(arguments, ', ') + ')';
|
640 |
+
};
|
641 |
+
|
642 |
+
})(),
|
643 |
+
|
644 |
+
|
645 |
+
setBorderRadius : function (elm, value) {
|
646 |
+
jsc.setStyle(elm, {'border-radius' : value || '0'});
|
647 |
+
},
|
648 |
+
|
649 |
+
|
650 |
+
setBoxShadow : function (elm, value) {
|
651 |
+
jsc.setStyle(elm, {'box-shadow': value || 'none'});
|
652 |
+
},
|
653 |
+
|
654 |
+
|
655 |
+
getElementPos : function (e, relativeToViewport) {
|
656 |
+
var x=0, y=0;
|
657 |
+
var rect = e.getBoundingClientRect();
|
658 |
+
x = rect.left;
|
659 |
+
y = rect.top;
|
660 |
+
if (!relativeToViewport) {
|
661 |
+
var viewPos = jsc.getViewPos();
|
662 |
+
x += viewPos[0];
|
663 |
+
y += viewPos[1];
|
664 |
+
}
|
665 |
+
return [x, y];
|
666 |
+
},
|
667 |
+
|
668 |
+
|
669 |
+
getElementSize : function (e) {
|
670 |
+
return [e.offsetWidth, e.offsetHeight];
|
671 |
+
},
|
672 |
+
|
673 |
+
|
674 |
+
// get pointer's X/Y coordinates relative to viewport
|
675 |
+
getAbsPointerPos : function (e) {
|
676 |
+
var x = 0, y = 0;
|
677 |
+
if (typeof e.changedTouches !== 'undefined' && e.changedTouches.length) {
|
678 |
+
// touch devices
|
679 |
+
x = e.changedTouches[0].clientX;
|
680 |
+
y = e.changedTouches[0].clientY;
|
681 |
+
} else if (typeof e.clientX === 'number') {
|
682 |
+
x = e.clientX;
|
683 |
+
y = e.clientY;
|
684 |
+
}
|
685 |
+
return { x: x, y: y };
|
686 |
+
},
|
687 |
+
|
688 |
+
|
689 |
+
// get pointer's X/Y coordinates relative to target element
|
690 |
+
getRelPointerPos : function (e) {
|
691 |
+
var target = e.target || e.srcElement;
|
692 |
+
var targetRect = target.getBoundingClientRect();
|
693 |
+
|
694 |
+
var x = 0, y = 0;
|
695 |
+
|
696 |
+
var clientX = 0, clientY = 0;
|
697 |
+
if (typeof e.changedTouches !== 'undefined' && e.changedTouches.length) {
|
698 |
+
// touch devices
|
699 |
+
clientX = e.changedTouches[0].clientX;
|
700 |
+
clientY = e.changedTouches[0].clientY;
|
701 |
+
} else if (typeof e.clientX === 'number') {
|
702 |
+
clientX = e.clientX;
|
703 |
+
clientY = e.clientY;
|
704 |
+
}
|
705 |
+
|
706 |
+
x = clientX - targetRect.left;
|
707 |
+
y = clientY - targetRect.top;
|
708 |
+
return { x: x, y: y };
|
709 |
+
},
|
710 |
+
|
711 |
+
|
712 |
+
getViewPos : function () {
|
713 |
+
var doc = window.document.documentElement;
|
714 |
+
return [
|
715 |
+
(window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0),
|
716 |
+
(window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)
|
717 |
+
];
|
718 |
+
},
|
719 |
+
|
720 |
+
|
721 |
+
getViewSize : function () {
|
722 |
+
var doc = window.document.documentElement;
|
723 |
+
return [
|
724 |
+
(window.innerWidth || doc.clientWidth),
|
725 |
+
(window.innerHeight || doc.clientHeight),
|
726 |
+
];
|
727 |
+
},
|
728 |
+
|
729 |
+
|
730 |
+
// r: 0-255
|
731 |
+
// g: 0-255
|
732 |
+
// b: 0-255
|
733 |
+
//
|
734 |
+
// returns: [ 0-360, 0-100, 0-100 ]
|
735 |
+
//
|
736 |
+
RGB_HSV : function (r, g, b) {
|
737 |
+
r /= 255;
|
738 |
+
g /= 255;
|
739 |
+
b /= 255;
|
740 |
+
var n = Math.min(Math.min(r,g),b);
|
741 |
+
var v = Math.max(Math.max(r,g),b);
|
742 |
+
var m = v - n;
|
743 |
+
if (m === 0) { return [ null, 0, 100 * v ]; }
|
744 |
+
var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
|
745 |
+
return [
|
746 |
+
60 * (h===6?0:h),
|
747 |
+
100 * (m/v),
|
748 |
+
100 * v
|
749 |
+
];
|
750 |
+
},
|
751 |
+
|
752 |
+
|
753 |
+
// h: 0-360
|
754 |
+
// s: 0-100
|
755 |
+
// v: 0-100
|
756 |
+
//
|
757 |
+
// returns: [ 0-255, 0-255, 0-255 ]
|
758 |
+
//
|
759 |
+
HSV_RGB : function (h, s, v) {
|
760 |
+
var u = 255 * (v / 100);
|
761 |
+
|
762 |
+
if (h === null) {
|
763 |
+
return [ u, u, u ];
|
764 |
+
}
|
765 |
+
|
766 |
+
h /= 60;
|
767 |
+
s /= 100;
|
768 |
+
|
769 |
+
var i = Math.floor(h);
|
770 |
+
var f = i%2 ? h-i : 1-(h-i);
|
771 |
+
var m = u * (1 - s);
|
772 |
+
var n = u * (1 - s * f);
|
773 |
+
switch (i) {
|
774 |
+
case 6:
|
775 |
+
case 0: return [u,n,m];
|
776 |
+
case 1: return [n,u,m];
|
777 |
+
case 2: return [m,u,n];
|
778 |
+
case 3: return [m,n,u];
|
779 |
+
case 4: return [n,m,u];
|
780 |
+
case 5: return [u,m,n];
|
781 |
+
}
|
782 |
+
},
|
783 |
+
|
784 |
+
|
785 |
+
parseColorString : function (str) {
|
786 |
+
var ret = {
|
787 |
+
rgba: null,
|
788 |
+
format: null // 'hex' | 'hexa' | 'rgb' | 'rgba'
|
789 |
+
};
|
790 |
+
|
791 |
+
var m;
|
792 |
+
|
793 |
+
if (m = str.match(/^\W*([0-9A-F]{3,8})\W*$/i)) {
|
794 |
+
// HEX notation
|
795 |
+
|
796 |
+
if (m[1].length === 8) {
|
797 |
+
// 8-char notation (= with alpha)
|
798 |
+
ret.format = 'hexa';
|
799 |
+
ret.rgba = [
|
800 |
+
parseInt(m[1].substr(0,2),16),
|
801 |
+
parseInt(m[1].substr(2,2),16),
|
802 |
+
parseInt(m[1].substr(4,2),16),
|
803 |
+
parseInt(m[1].substr(6,2),16) / 255
|
804 |
+
];
|
805 |
+
|
806 |
+
} else if (m[1].length === 6) {
|
807 |
+
// 6-char notation
|
808 |
+
ret.format = 'hex';
|
809 |
+
ret.rgba = [
|
810 |
+
parseInt(m[1].substr(0,2),16),
|
811 |
+
parseInt(m[1].substr(2,2),16),
|
812 |
+
parseInt(m[1].substr(4,2),16),
|
813 |
+
null
|
814 |
+
];
|
815 |
+
|
816 |
+
} else if (m[1].length === 3) {
|
817 |
+
// 3-char notation
|
818 |
+
ret.format = 'hex';
|
819 |
+
ret.rgba = [
|
820 |
+
parseInt(m[1].charAt(0) + m[1].charAt(0),16),
|
821 |
+
parseInt(m[1].charAt(1) + m[1].charAt(1),16),
|
822 |
+
parseInt(m[1].charAt(2) + m[1].charAt(2),16),
|
823 |
+
null
|
824 |
+
];
|
825 |
+
|
826 |
+
} else {
|
827 |
+
return false;
|
828 |
+
}
|
829 |
+
|
830 |
+
return ret;
|
831 |
+
}
|
832 |
+
|
833 |
+
if (m = str.match(/^\W*rgba?\(([^)]*)\)\W*$/i)) {
|
834 |
+
// rgb(...) or rgba(...) notation
|
835 |
+
|
836 |
+
var par = m[1].split(',');
|
837 |
+
var re = /^\s*(\d+|\d*\.\d+|\d+\.\d*)\s*$/;
|
838 |
+
var mR, mG, mB, mA;
|
839 |
+
if (
|
840 |
+
par.length >= 3 &&
|
841 |
+
(mR = par[0].match(re)) &&
|
842 |
+
(mG = par[1].match(re)) &&
|
843 |
+
(mB = par[2].match(re))
|
844 |
+
) {
|
845 |
+
ret.format = 'rgb';
|
846 |
+
ret.rgba = [
|
847 |
+
parseFloat(mR[1]) || 0,
|
848 |
+
parseFloat(mG[1]) || 0,
|
849 |
+
parseFloat(mB[1]) || 0,
|
850 |
+
null
|
851 |
+
];
|
852 |
+
|
853 |
+
if (
|
854 |
+
par.length >= 4 &&
|
855 |
+
(mA = par[3].match(re))
|
856 |
+
) {
|
857 |
+
ret.format = 'rgba';
|
858 |
+
ret.rgba[3] = parseFloat(mA[1]) || 0;
|
859 |
+
}
|
860 |
+
return ret;
|
861 |
+
}
|
862 |
+
}
|
863 |
+
|
864 |
+
return false;
|
865 |
+
},
|
866 |
+
|
867 |
+
|
868 |
+
parsePaletteValue : function (mixed) {
|
869 |
+
var vals = [];
|
870 |
+
|
871 |
+
if (typeof mixed === 'string') { // input is a string of space separated color values
|
872 |
+
// rgb() and rgba() may contain spaces too, so let's find all color values by regex
|
873 |
+
mixed.replace(/#[0-9A-F]{3}([0-9A-F]{3})?|rgba?\(([^)]*)\)/ig, function (val) {
|
874 |
+
vals.push(val);
|
875 |
+
});
|
876 |
+
} else if (Array.isArray(mixed)) { // input is an array of color values
|
877 |
+
vals = mixed;
|
878 |
+
}
|
879 |
+
|
880 |
+
// convert all values into uniform color format
|
881 |
+
|
882 |
+
var colors = [];
|
883 |
+
|
884 |
+
for (var i = 0; i < vals.length; i++) {
|
885 |
+
var color = jsc.parseColorString(vals[i]);
|
886 |
+
if (color) {
|
887 |
+
colors.push(color);
|
888 |
+
}
|
889 |
+
}
|
890 |
+
|
891 |
+
return colors;
|
892 |
+
},
|
893 |
+
|
894 |
+
|
895 |
+
containsTranparentColor : function (colors) {
|
896 |
+
for (var i = 0; i < colors.length; i++) {
|
897 |
+
var a = colors[i].rgba[3];
|
898 |
+
if (a !== null && a < 1.0) {
|
899 |
+
return true;
|
900 |
+
}
|
901 |
+
}
|
902 |
+
return false;
|
903 |
+
},
|
904 |
+
|
905 |
+
|
906 |
+
isAlphaFormat : function (format) {
|
907 |
+
switch (format.toLowerCase()) {
|
908 |
+
case 'hexa':
|
909 |
+
case 'rgba':
|
910 |
+
return true;
|
911 |
+
}
|
912 |
+
return false;
|
913 |
+
},
|
914 |
+
|
915 |
+
|
916 |
+
// Canvas scaling for retina displays
|
917 |
+
//
|
918 |
+
// adapted from https://www.html5rocks.com/en/tutorials/canvas/hidpi/
|
919 |
+
//
|
920 |
+
scaleCanvasForHighDPR : function (canvas) {
|
921 |
+
var dpr = window.devicePixelRatio || 1;
|
922 |
+
canvas.width *= dpr;
|
923 |
+
canvas.height *= dpr;
|
924 |
+
var ctx = canvas.getContext('2d');
|
925 |
+
ctx.scale(dpr, dpr);
|
926 |
+
},
|
927 |
+
|
928 |
+
|
929 |
+
genColorPreviewCanvas : function (color, separatorPos, specWidth, scaleForHighDPR) {
|
930 |
+
|
931 |
+
var sepW = Math.round(jsc.pub.previewSeparator.length);
|
932 |
+
var sqSize = jsc.pub.chessboardSize;
|
933 |
+
var sqColor1 = jsc.pub.chessboardColor1;
|
934 |
+
var sqColor2 = jsc.pub.chessboardColor2;
|
935 |
+
|
936 |
+
var cWidth = specWidth ? specWidth : sqSize * 2;
|
937 |
+
var cHeight = sqSize * 2;
|
938 |
+
|
939 |
+
var canvas = jsc.createEl('canvas');
|
940 |
+
var ctx = canvas.getContext('2d');
|
941 |
+
|
942 |
+
canvas.width = cWidth;
|
943 |
+
canvas.height = cHeight;
|
944 |
+
if (scaleForHighDPR) {
|
945 |
+
jsc.scaleCanvasForHighDPR(canvas);
|
946 |
+
}
|
947 |
+
|
948 |
+
// transparency chessboard - background
|
949 |
+
ctx.fillStyle = sqColor1;
|
950 |
+
ctx.fillRect(0, 0, cWidth, cHeight);
|
951 |
+
|
952 |
+
// transparency chessboard - squares
|
953 |
+
ctx.fillStyle = sqColor2;
|
954 |
+
for (var x = 0; x < cWidth; x += sqSize * 2) {
|
955 |
+
ctx.fillRect(x, 0, sqSize, sqSize);
|
956 |
+
ctx.fillRect(x + sqSize, sqSize, sqSize, sqSize);
|
957 |
+
}
|
958 |
+
|
959 |
+
if (color) {
|
960 |
+
// actual color in foreground
|
961 |
+
ctx.fillStyle = color;
|
962 |
+
ctx.fillRect(0, 0, cWidth, cHeight);
|
963 |
+
}
|
964 |
+
|
965 |
+
var start = null;
|
966 |
+
switch (separatorPos) {
|
967 |
+
case 'left':
|
968 |
+
start = 0;
|
969 |
+
ctx.clearRect(0, 0, sepW/2, cHeight);
|
970 |
+
break;
|
971 |
+
case 'right':
|
972 |
+
start = cWidth - sepW;
|
973 |
+
ctx.clearRect(cWidth - (sepW/2), 0, sepW/2, cHeight);
|
974 |
+
break;
|
975 |
+
}
|
976 |
+
if (start !== null) {
|
977 |
+
ctx.lineWidth = 1;
|
978 |
+
for (var i = 0; i < jsc.pub.previewSeparator.length; i += 1) {
|
979 |
+
ctx.beginPath();
|
980 |
+
ctx.strokeStyle = jsc.pub.previewSeparator[i];
|
981 |
+
ctx.moveTo(0.5 + start + i, 0);
|
982 |
+
ctx.lineTo(0.5 + start + i, cHeight);
|
983 |
+
ctx.stroke();
|
984 |
+
}
|
985 |
+
}
|
986 |
+
|
987 |
+
return {
|
988 |
+
canvas: canvas,
|
989 |
+
width: cWidth,
|
990 |
+
height: cHeight,
|
991 |
+
};
|
992 |
+
},
|
993 |
+
|
994 |
+
|
995 |
+
// if position or width is not set => fill the entire element (0%-100%)
|
996 |
+
genColorPreviewGradient : function (color, position, width) {
|
997 |
+
var params = [];
|
998 |
+
|
999 |
+
if (position && width) {
|
1000 |
+
params = [
|
1001 |
+
'to ' + {'left':'right', 'right':'left'}[position],
|
1002 |
+
color + ' 0%',
|
1003 |
+
color + ' ' + width + 'px',
|
1004 |
+
'rgba(0,0,0,0) ' + (width + 1) + 'px',
|
1005 |
+
'rgba(0,0,0,0) 100%',
|
1006 |
+
];
|
1007 |
+
} else {
|
1008 |
+
params = [
|
1009 |
+
'to right',
|
1010 |
+
color + ' 0%',
|
1011 |
+
color + ' 100%',
|
1012 |
+
];
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
return jsc.linearGradient.apply(this, params);
|
1016 |
+
},
|
1017 |
+
|
1018 |
+
|
1019 |
+
redrawPosition : function () {
|
1020 |
+
|
1021 |
+
if (!jsc.picker || !jsc.picker.owner) {
|
1022 |
+
return; // picker is not shown
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
var thisObj = jsc.picker.owner;
|
1026 |
+
|
1027 |
+
var tp, vp;
|
1028 |
+
|
1029 |
+
if (thisObj.fixed) {
|
1030 |
+
// Fixed elements are positioned relative to viewport,
|
1031 |
+
// therefore we can ignore the scroll offset
|
1032 |
+
tp = jsc.getElementPos(thisObj.targetElement, true); // target pos
|
1033 |
+
vp = [0, 0]; // view pos
|
1034 |
+
} else {
|
1035 |
+
tp = jsc.getElementPos(thisObj.targetElement); // target pos
|
1036 |
+
vp = jsc.getViewPos(); // view pos
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
var ts = jsc.getElementSize(thisObj.targetElement); // target size
|
1040 |
+
var vs = jsc.getViewSize(); // view size
|
1041 |
+
var pd = jsc.getPickerDims(thisObj);
|
1042 |
+
var ps = [pd.borderW, pd.borderH]; // picker outer size
|
1043 |
+
var a, b, c;
|
1044 |
+
switch (thisObj.position.toLowerCase()) {
|
1045 |
+
case 'left': a=1; b=0; c=-1; break;
|
1046 |
+
case 'right':a=1; b=0; c=1; break;
|
1047 |
+
case 'top': a=0; b=1; c=-1; break;
|
1048 |
+
default: a=0; b=1; c=1; break;
|
1049 |
+
}
|
1050 |
+
var l = (ts[b]+ps[b])/2;
|
1051 |
+
|
1052 |
+
// compute picker position
|
1053 |
+
if (!thisObj.smartPosition) {
|
1054 |
+
var pp = [
|
1055 |
+
tp[a],
|
1056 |
+
tp[b]+ts[b]-l+l*c
|
1057 |
+
];
|
1058 |
+
} else {
|
1059 |
+
var pp = [
|
1060 |
+
-vp[a]+tp[a]+ps[a] > vs[a] ?
|
1061 |
+
(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
|
1062 |
+
tp[a],
|
1063 |
+
-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
|
1064 |
+
(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
|
1065 |
+
(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
|
1066 |
+
];
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
var x = pp[a];
|
1070 |
+
var y = pp[b];
|
1071 |
+
var positionValue = thisObj.fixed ? 'fixed' : 'absolute';
|
1072 |
+
var contractShadow =
|
1073 |
+
(pp[0] + ps[0] > tp[0] || pp[0] < tp[0] + ts[0]) &&
|
1074 |
+
(pp[1] + ps[1] < tp[1] + ts[1]);
|
1075 |
+
|
1076 |
+
jsc._drawPosition(thisObj, x, y, positionValue, contractShadow);
|
1077 |
+
},
|
1078 |
+
|
1079 |
+
|
1080 |
+
_drawPosition : function (thisObj, x, y, positionValue, contractShadow) {
|
1081 |
+
var vShadow = contractShadow ? 0 : thisObj.shadowBlur; // px
|
1082 |
+
|
1083 |
+
jsc.picker.wrap.style.position = positionValue;
|
1084 |
+
jsc.picker.wrap.style.left = x + 'px';
|
1085 |
+
jsc.picker.wrap.style.top = y + 'px';
|
1086 |
+
|
1087 |
+
jsc.setBoxShadow(
|
1088 |
+
jsc.picker.boxS,
|
1089 |
+
thisObj.shadow ?
|
1090 |
+
new jsc.BoxShadow(0, vShadow, thisObj.shadowBlur, 0, thisObj.shadowColor) :
|
1091 |
+
null);
|
1092 |
+
},
|
1093 |
+
|
1094 |
+
|
1095 |
+
getPickerDims : function (thisObj) {
|
1096 |
+
var w = 2 * thisObj.controlBorderWidth + thisObj.width;
|
1097 |
+
var h = 2 * thisObj.controlBorderWidth + thisObj.height;
|
1098 |
+
|
1099 |
+
var sliderSpace = 2 * thisObj.controlBorderWidth + 2 * jsc.getControlPadding(thisObj) + thisObj.sliderSize;
|
1100 |
+
|
1101 |
+
if (jsc.getSliderChannel(thisObj)) {
|
1102 |
+
w += sliderSpace;
|
1103 |
+
}
|
1104 |
+
if (thisObj.hasAlphaChannel()) {
|
1105 |
+
w += sliderSpace;
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
var pal = jsc.getPaletteDims(thisObj, w);
|
1109 |
+
|
1110 |
+
if (pal.height) {
|
1111 |
+
h += pal.height + thisObj.padding;
|
1112 |
+
}
|
1113 |
+
if (thisObj.closeButton) {
|
1114 |
+
h += 2 * thisObj.controlBorderWidth + thisObj.padding + thisObj.buttonHeight;
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
var pW = w + (2 * thisObj.padding);
|
1118 |
+
var pH = h + (2 * thisObj.padding);
|
1119 |
+
|
1120 |
+
return {
|
1121 |
+
contentW: w,
|
1122 |
+
contentH: h,
|
1123 |
+
paddedW: pW,
|
1124 |
+
paddedH: pH,
|
1125 |
+
borderW: pW + (2 * thisObj.borderWidth),
|
1126 |
+
borderH: pH + (2 * thisObj.borderWidth),
|
1127 |
+
palette: pal,
|
1128 |
+
};
|
1129 |
+
},
|
1130 |
+
|
1131 |
+
|
1132 |
+
getPaletteDims : function (thisObj, width) {
|
1133 |
+
var cols = 0, rows = 0, cellW = 0, cellH = 0, height = 0;
|
1134 |
+
var sampleCount = thisObj._palette ? thisObj._palette.length : 0;
|
1135 |
+
|
1136 |
+
if (sampleCount) {
|
1137 |
+
cols = thisObj.paletteCols;
|
1138 |
+
rows = cols > 0 ? Math.ceil(sampleCount / cols) : 0;
|
1139 |
+
|
1140 |
+
// color sample's dimensions (includes border)
|
1141 |
+
cellW = Math.max(1, Math.floor((width - ((cols - 1) * thisObj.paletteSpacing)) / cols));
|
1142 |
+
cellH = thisObj.paletteHeight ? Math.min(thisObj.paletteHeight, cellW) : cellW;
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
if (rows) {
|
1146 |
+
height =
|
1147 |
+
rows * cellH +
|
1148 |
+
(rows - 1) * thisObj.paletteSpacing;
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
return {
|
1152 |
+
cols: cols,
|
1153 |
+
rows: rows,
|
1154 |
+
cellW: cellW,
|
1155 |
+
cellH: cellH,
|
1156 |
+
width: width,
|
1157 |
+
height: height,
|
1158 |
+
};
|
1159 |
+
},
|
1160 |
+
|
1161 |
+
|
1162 |
+
getControlPadding : function (thisObj) {
|
1163 |
+
return Math.max(
|
1164 |
+
thisObj.padding / 2,
|
1165 |
+
(2 * thisObj.pointerBorderWidth + thisObj.pointerThickness) - thisObj.controlBorderWidth
|
1166 |
+
);
|
1167 |
+
},
|
1168 |
+
|
1169 |
+
|
1170 |
+
getPadYChannel : function (thisObj) {
|
1171 |
+
switch (thisObj.mode.charAt(1).toLowerCase()) {
|
1172 |
+
case 'v': return 'v'; break;
|
1173 |
+
}
|
1174 |
+
return 's';
|
1175 |
+
},
|
1176 |
+
|
1177 |
+
|
1178 |
+
getSliderChannel : function (thisObj) {
|
1179 |
+
if (thisObj.mode.length > 2) {
|
1180 |
+
switch (thisObj.mode.charAt(2).toLowerCase()) {
|
1181 |
+
case 's': return 's'; break;
|
1182 |
+
case 'v': return 'v'; break;
|
1183 |
+
}
|
1184 |
+
}
|
1185 |
+
return null;
|
1186 |
+
},
|
1187 |
+
|
1188 |
+
|
1189 |
+
// calls function specified in picker's property
|
1190 |
+
triggerCallback : function (thisObj, prop) {
|
1191 |
+
if (!thisObj[prop]) {
|
1192 |
+
return; // callback func not specified
|
1193 |
+
}
|
1194 |
+
var callback = null;
|
1195 |
+
|
1196 |
+
if (typeof thisObj[prop] === 'string') {
|
1197 |
+
// string with code
|
1198 |
+
try {
|
1199 |
+
callback = new Function (thisObj[prop]);
|
1200 |
+
} catch (e) {
|
1201 |
+
console.error(e);
|
1202 |
+
}
|
1203 |
+
} else {
|
1204 |
+
// function
|
1205 |
+
callback = thisObj[prop];
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
if (callback) {
|
1209 |
+
callback.call(thisObj);
|
1210 |
+
}
|
1211 |
+
},
|
1212 |
+
|
1213 |
+
|
1214 |
+
// Triggers a color change related event(s) on all picker instances.
|
1215 |
+
// It is possible to specify multiple events separated with a space.
|
1216 |
+
triggerGlobal : function (eventNames) {
|
1217 |
+
var inst = jsc.getInstances();
|
1218 |
+
for (var i = 0; i < inst.length; i += 1) {
|
1219 |
+
inst[i].trigger(eventNames);
|
1220 |
+
}
|
1221 |
+
},
|
1222 |
+
|
1223 |
+
|
1224 |
+
_pointerMoveEvent : {
|
1225 |
+
mouse: 'mousemove',
|
1226 |
+
touch: 'touchmove'
|
1227 |
+
},
|
1228 |
+
_pointerEndEvent : {
|
1229 |
+
mouse: 'mouseup',
|
1230 |
+
touch: 'touchend'
|
1231 |
+
},
|
1232 |
+
|
1233 |
+
|
1234 |
+
_pointerOrigin : null,
|
1235 |
+
_capturedTarget : null,
|
1236 |
+
|
1237 |
+
|
1238 |
+
onDocumentKeyUp : function (e) {
|
1239 |
+
if (['Tab', 'Escape'].indexOf(jsc.eventKey(e)) !== -1) {
|
1240 |
+
if (jsc.picker && jsc.picker.owner) {
|
1241 |
+
jsc.picker.owner.tryHide();
|
1242 |
+
}
|
1243 |
+
}
|
1244 |
+
},
|
1245 |
+
|
1246 |
+
|
1247 |
+
onWindowResize : function (e) {
|
1248 |
+
jsc.redrawPosition();
|
1249 |
+
},
|
1250 |
+
|
1251 |
+
|
1252 |
+
onWindowScroll : function (e) {
|
1253 |
+
jsc.redrawPosition();
|
1254 |
+
},
|
1255 |
+
|
1256 |
+
|
1257 |
+
onParentScroll : function (e) {
|
1258 |
+
// hide the picker when one of the parent elements is scrolled
|
1259 |
+
if (jsc.picker && jsc.picker.owner) {
|
1260 |
+
jsc.picker.owner.tryHide();
|
1261 |
+
}
|
1262 |
+
},
|
1263 |
+
|
1264 |
+
|
1265 |
+
onDocumentMouseDown : function (e) {
|
1266 |
+
var target = e.target || e.srcElement;
|
1267 |
+
|
1268 |
+
if (target.jscolor && target.jscolor instanceof jsc.pub) { // clicked targetElement -> show picker
|
1269 |
+
if (target.jscolor.showOnClick && !target.disabled) {
|
1270 |
+
target.jscolor.show();
|
1271 |
+
}
|
1272 |
+
} else if (jsc.getData(target, 'gui')) { // clicked jscolor's GUI element
|
1273 |
+
var control = jsc.getData(target, 'control');
|
1274 |
+
if (control) {
|
1275 |
+
// jscolor's control
|
1276 |
+
jsc.onControlPointerStart(e, target, jsc.getData(target, 'control'), 'mouse');
|
1277 |
+
}
|
1278 |
+
} else {
|
1279 |
+
// mouse is outside the picker's controls -> hide the color picker!
|
1280 |
+
if (jsc.picker && jsc.picker.owner) {
|
1281 |
+
jsc.picker.owner.tryHide();
|
1282 |
+
}
|
1283 |
+
}
|
1284 |
+
},
|
1285 |
+
|
1286 |
+
|
1287 |
+
onPickerTouchStart : function (e) {
|
1288 |
+
var target = e.target || e.srcElement;
|
1289 |
+
|
1290 |
+
if (jsc.getData(target, 'control')) {
|
1291 |
+
jsc.onControlPointerStart(e, target, jsc.getData(target, 'control'), 'touch');
|
1292 |
+
}
|
1293 |
+
},
|
1294 |
+
|
1295 |
+
|
1296 |
+
onControlPointerStart : function (e, target, controlName, pointerType) {
|
1297 |
+
var thisObj = jsc.getData(target, 'instance');
|
1298 |
+
|
1299 |
+
jsc.preventDefault(e);
|
1300 |
+
jsc.captureTarget(target);
|
1301 |
+
|
1302 |
+
var registerDragEvents = function (doc, offset) {
|
1303 |
+
jsc.attachGroupEvent('drag', doc, jsc._pointerMoveEvent[pointerType],
|
1304 |
+
jsc.onDocumentPointerMove(e, target, controlName, pointerType, offset));
|
1305 |
+
jsc.attachGroupEvent('drag', doc, jsc._pointerEndEvent[pointerType],
|
1306 |
+
jsc.onDocumentPointerEnd(e, target, controlName, pointerType));
|
1307 |
+
};
|
1308 |
+
|
1309 |
+
registerDragEvents(window.document, [0, 0]);
|
1310 |
+
|
1311 |
+
if (window.parent && window.frameElement) {
|
1312 |
+
var rect = window.frameElement.getBoundingClientRect();
|
1313 |
+
var ofs = [-rect.left, -rect.top];
|
1314 |
+
registerDragEvents(window.parent.window.document, ofs);
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
var abs = jsc.getAbsPointerPos(e);
|
1318 |
+
var rel = jsc.getRelPointerPos(e);
|
1319 |
+
jsc._pointerOrigin = {
|
1320 |
+
x: abs.x - rel.x,
|
1321 |
+
y: abs.y - rel.y
|
1322 |
+
};
|
1323 |
+
|
1324 |
+
switch (controlName) {
|
1325 |
+
case 'pad':
|
1326 |
+
// if the value slider is at the bottom, move it up
|
1327 |
+
if (jsc.getSliderChannel(thisObj) === 'v' && thisObj.channels.v === 0) {
|
1328 |
+
thisObj.fromHSVA(null, null, 100, null);
|
1329 |
+
}
|
1330 |
+
jsc.setPad(thisObj, e, 0, 0);
|
1331 |
+
break;
|
1332 |
+
|
1333 |
+
case 'sld':
|
1334 |
+
jsc.setSld(thisObj, e, 0);
|
1335 |
+
break;
|
1336 |
+
|
1337 |
+
case 'asld':
|
1338 |
+
jsc.setASld(thisObj, e, 0);
|
1339 |
+
break;
|
1340 |
+
}
|
1341 |
+
thisObj.trigger('input');
|
1342 |
+
},
|
1343 |
+
|
1344 |
+
|
1345 |
+
onDocumentPointerMove : function (e, target, controlName, pointerType, offset) {
|
1346 |
+
return function (e) {
|
1347 |
+
var thisObj = jsc.getData(target, 'instance');
|
1348 |
+
switch (controlName) {
|
1349 |
+
case 'pad':
|
1350 |
+
jsc.setPad(thisObj, e, offset[0], offset[1]);
|
1351 |
+
break;
|
1352 |
+
|
1353 |
+
case 'sld':
|
1354 |
+
jsc.setSld(thisObj, e, offset[1]);
|
1355 |
+
break;
|
1356 |
+
|
1357 |
+
case 'asld':
|
1358 |
+
jsc.setASld(thisObj, e, offset[1]);
|
1359 |
+
break;
|
1360 |
+
}
|
1361 |
+
thisObj.trigger('input');
|
1362 |
+
}
|
1363 |
+
},
|
1364 |
+
|
1365 |
+
|
1366 |
+
onDocumentPointerEnd : function (e, target, controlName, pointerType) {
|
1367 |
+
return function (e) {
|
1368 |
+
var thisObj = jsc.getData(target, 'instance');
|
1369 |
+
jsc.detachGroupEvents('drag');
|
1370 |
+
jsc.releaseTarget();
|
1371 |
+
|
1372 |
+
// Always trigger changes AFTER detaching outstanding mouse handlers,
|
1373 |
+
// in case some color change that occured in user-defined onChange/onInput handler
|
1374 |
+
// intruded into current mouse events
|
1375 |
+
thisObj.trigger('input');
|
1376 |
+
thisObj.trigger('change');
|
1377 |
+
};
|
1378 |
+
},
|
1379 |
+
|
1380 |
+
|
1381 |
+
onPaletteSampleClick : function (e) {
|
1382 |
+
var target = e.currentTarget;
|
1383 |
+
var thisObj = jsc.getData(target, 'instance');
|
1384 |
+
var color = jsc.getData(target, 'color');
|
1385 |
+
|
1386 |
+
// when format is flexible, use the original format of this color sample
|
1387 |
+
if (thisObj.format.toLowerCase() === 'any') {
|
1388 |
+
thisObj._setFormat(color.format); // adapt format
|
1389 |
+
if (!jsc.isAlphaFormat(thisObj.getFormat())) {
|
1390 |
+
color.rgba[3] = 1.0; // when switching to a format that doesn't support alpha, set full opacity
|
1391 |
+
}
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
// if this color doesn't specify alpha, use alpha of 1.0 (if applicable)
|
1395 |
+
if (color.rgba[3] === null) {
|
1396 |
+
if (thisObj.paletteSetsAlpha === true || (thisObj.paletteSetsAlpha === 'auto' && thisObj._paletteHasTransparency)) {
|
1397 |
+
color.rgba[3] = 1.0;
|
1398 |
+
}
|
1399 |
+
}
|
1400 |
+
|
1401 |
+
thisObj.fromRGBA.apply(thisObj, color.rgba);
|
1402 |
+
|
1403 |
+
thisObj.trigger('input');
|
1404 |
+
thisObj.trigger('change');
|
1405 |
+
|
1406 |
+
if (thisObj.hideOnPaletteClick) {
|
1407 |
+
thisObj.hide();
|
1408 |
+
}
|
1409 |
+
},
|
1410 |
+
|
1411 |
+
|
1412 |
+
setPad : function (thisObj, e, ofsX, ofsY) {
|
1413 |
+
var pointerAbs = jsc.getAbsPointerPos(e);
|
1414 |
+
var x = ofsX + pointerAbs.x - jsc._pointerOrigin.x - thisObj.padding - thisObj.controlBorderWidth;
|
1415 |
+
var y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.controlBorderWidth;
|
1416 |
+
|
1417 |
+
var xVal = x * (360 / (thisObj.width - 1));
|
1418 |
+
var yVal = 100 - (y * (100 / (thisObj.height - 1)));
|
1419 |
+
|
1420 |
+
switch (jsc.getPadYChannel(thisObj)) {
|
1421 |
+
case 's': thisObj.fromHSVA(xVal, yVal, null, null); break;
|
1422 |
+
case 'v': thisObj.fromHSVA(xVal, null, yVal, null); break;
|
1423 |
+
}
|
1424 |
+
},
|
1425 |
+
|
1426 |
+
|
1427 |
+
setSld : function (thisObj, e, ofsY) {
|
1428 |
+
var pointerAbs = jsc.getAbsPointerPos(e);
|
1429 |
+
var y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.controlBorderWidth;
|
1430 |
+
var yVal = 100 - (y * (100 / (thisObj.height - 1)));
|
1431 |
+
|
1432 |
+
switch (jsc.getSliderChannel(thisObj)) {
|
1433 |
+
case 's': thisObj.fromHSVA(null, yVal, null, null); break;
|
1434 |
+
case 'v': thisObj.fromHSVA(null, null, yVal, null); break;
|
1435 |
+
}
|
1436 |
+
},
|
1437 |
+
|
1438 |
+
|
1439 |
+
setASld : function (thisObj, e, ofsY) {
|
1440 |
+
var pointerAbs = jsc.getAbsPointerPos(e);
|
1441 |
+
var y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.controlBorderWidth;
|
1442 |
+
var yVal = 1.0 - (y * (1.0 / (thisObj.height - 1)));
|
1443 |
+
|
1444 |
+
if (yVal < 1.0) {
|
1445 |
+
// if format is flexible and the current format doesn't support alpha, switch to a suitable one
|
1446 |
+
var fmt = thisObj.getFormat();
|
1447 |
+
if (thisObj.format.toLowerCase() === 'any' && !jsc.isAlphaFormat(fmt)) {
|
1448 |
+
thisObj._setFormat(fmt === 'hex' ? 'hexa' : 'rgba');
|
1449 |
+
}
|
1450 |
+
}
|
1451 |
+
|
1452 |
+
thisObj.fromHSVA(null, null, null, yVal);
|
1453 |
+
},
|
1454 |
+
|
1455 |
+
|
1456 |
+
createPadCanvas : function () {
|
1457 |
+
|
1458 |
+
var ret = {
|
1459 |
+
elm: null,
|
1460 |
+
draw: null
|
1461 |
+
};
|
1462 |
+
|
1463 |
+
var canvas = jsc.createEl('canvas');
|
1464 |
+
var ctx = canvas.getContext('2d');
|
1465 |
+
|
1466 |
+
var drawFunc = function (width, height, type) {
|
1467 |
+
canvas.width = width;
|
1468 |
+
canvas.height = height;
|
1469 |
+
|
1470 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
1471 |
+
|
1472 |
+
var hGrad = ctx.createLinearGradient(0, 0, canvas.width, 0);
|
1473 |
+
hGrad.addColorStop(0 / 6, '#F00');
|
1474 |
+
hGrad.addColorStop(1 / 6, '#FF0');
|
1475 |
+
hGrad.addColorStop(2 / 6, '#0F0');
|
1476 |
+
hGrad.addColorStop(3 / 6, '#0FF');
|
1477 |
+
hGrad.addColorStop(4 / 6, '#00F');
|
1478 |
+
hGrad.addColorStop(5 / 6, '#F0F');
|
1479 |
+
hGrad.addColorStop(6 / 6, '#F00');
|
1480 |
+
|
1481 |
+
ctx.fillStyle = hGrad;
|
1482 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
1483 |
+
|
1484 |
+
var vGrad = ctx.createLinearGradient(0, 0, 0, canvas.height);
|
1485 |
+
switch (type.toLowerCase()) {
|
1486 |
+
case 's':
|
1487 |
+
vGrad.addColorStop(0, 'rgba(255,255,255,0)');
|
1488 |
+
vGrad.addColorStop(1, 'rgba(255,255,255,1)');
|
1489 |
+
break;
|
1490 |
+
case 'v':
|
1491 |
+
vGrad.addColorStop(0, 'rgba(0,0,0,0)');
|
1492 |
+
vGrad.addColorStop(1, 'rgba(0,0,0,1)');
|
1493 |
+
break;
|
1494 |
+
}
|
1495 |
+
ctx.fillStyle = vGrad;
|
1496 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
1497 |
+
};
|
1498 |
+
|
1499 |
+
ret.elm = canvas;
|
1500 |
+
ret.draw = drawFunc;
|
1501 |
+
|
1502 |
+
return ret;
|
1503 |
+
},
|
1504 |
+
|
1505 |
+
|
1506 |
+
createSliderGradient : function () {
|
1507 |
+
|
1508 |
+
var ret = {
|
1509 |
+
elm: null,
|
1510 |
+
draw: null
|
1511 |
+
};
|
1512 |
+
|
1513 |
+
var canvas = jsc.createEl('canvas');
|
1514 |
+
var ctx = canvas.getContext('2d');
|
1515 |
+
|
1516 |
+
var drawFunc = function (width, height, color1, color2) {
|
1517 |
+
canvas.width = width;
|
1518 |
+
canvas.height = height;
|
1519 |
+
|
1520 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
1521 |
+
|
1522 |
+
var grad = ctx.createLinearGradient(0, 0, 0, canvas.height);
|
1523 |
+
grad.addColorStop(0, color1);
|
1524 |
+
grad.addColorStop(1, color2);
|
1525 |
+
|
1526 |
+
ctx.fillStyle = grad;
|
1527 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
1528 |
+
};
|
1529 |
+
|
1530 |
+
ret.elm = canvas;
|
1531 |
+
ret.draw = drawFunc;
|
1532 |
+
|
1533 |
+
return ret;
|
1534 |
+
},
|
1535 |
+
|
1536 |
+
|
1537 |
+
createASliderGradient : function () {
|
1538 |
+
|
1539 |
+
var ret = {
|
1540 |
+
elm: null,
|
1541 |
+
draw: null
|
1542 |
+
};
|
1543 |
+
|
1544 |
+
var canvas = jsc.createEl('canvas');
|
1545 |
+
var ctx = canvas.getContext('2d');
|
1546 |
+
|
1547 |
+
var drawFunc = function (width, height, color) {
|
1548 |
+
canvas.width = width;
|
1549 |
+
canvas.height = height;
|
1550 |
+
|
1551 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
1552 |
+
|
1553 |
+
var sqSize = canvas.width / 2;
|
1554 |
+
var sqColor1 = jsc.pub.chessboardColor1;
|
1555 |
+
var sqColor2 = jsc.pub.chessboardColor2;
|
1556 |
+
|
1557 |
+
// dark gray background
|
1558 |
+
ctx.fillStyle = sqColor1;
|
1559 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
1560 |
+
|
1561 |
+
if (sqSize > 0) { // to avoid infinite loop
|
1562 |
+
for (var y = 0; y < canvas.height; y += sqSize * 2) {
|
1563 |
+
// light gray squares
|
1564 |
+
ctx.fillStyle = sqColor2;
|
1565 |
+
ctx.fillRect(0, y, sqSize, sqSize);
|
1566 |
+
ctx.fillRect(sqSize, y + sqSize, sqSize, sqSize);
|
1567 |
+
}
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
var grad = ctx.createLinearGradient(0, 0, 0, canvas.height);
|
1571 |
+
grad.addColorStop(0, color);
|
1572 |
+
grad.addColorStop(1, 'rgba(0,0,0,0)');
|
1573 |
+
|
1574 |
+
ctx.fillStyle = grad;
|
1575 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
1576 |
+
};
|
1577 |
+
|
1578 |
+
ret.elm = canvas;
|
1579 |
+
ret.draw = drawFunc;
|
1580 |
+
|
1581 |
+
return ret;
|
1582 |
+
},
|
1583 |
+
|
1584 |
+
|
1585 |
+
BoxShadow : (function () {
|
1586 |
+
var BoxShadow = function (hShadow, vShadow, blur, spread, color, inset) {
|
1587 |
+
this.hShadow = hShadow;
|
1588 |
+
this.vShadow = vShadow;
|
1589 |
+
this.blur = blur;
|
1590 |
+
this.spread = spread;
|
1591 |
+
this.color = color;
|
1592 |
+
this.inset = !!inset;
|
1593 |
+
};
|
1594 |
+
|
1595 |
+
BoxShadow.prototype.toString = function () {
|
1596 |
+
var vals = [
|
1597 |
+
Math.round(this.hShadow) + 'px',
|
1598 |
+
Math.round(this.vShadow) + 'px',
|
1599 |
+
Math.round(this.blur) + 'px',
|
1600 |
+
Math.round(this.spread) + 'px',
|
1601 |
+
this.color
|
1602 |
+
];
|
1603 |
+
if (this.inset) {
|
1604 |
+
vals.push('inset');
|
1605 |
+
}
|
1606 |
+
return vals.join(' ');
|
1607 |
+
};
|
1608 |
+
|
1609 |
+
return BoxShadow;
|
1610 |
+
})(),
|
1611 |
+
|
1612 |
+
|
1613 |
+
flags : {
|
1614 |
+
leaveValue : 1 << 0,
|
1615 |
+
leaveAlpha : 1 << 1,
|
1616 |
+
leavePreview : 1 << 2,
|
1617 |
+
},
|
1618 |
+
|
1619 |
+
|
1620 |
+
enumOpts : {
|
1621 |
+
format: ['auto', 'any', 'hex', 'hexa', 'rgb', 'rgba'],
|
1622 |
+
previewPosition: ['left', 'right'],
|
1623 |
+
mode: ['hsv', 'hvs', 'hs', 'hv'],
|
1624 |
+
position: ['left', 'right', 'top', 'bottom'],
|
1625 |
+
alphaChannel: ['auto', true, false],
|
1626 |
+
paletteSetsAlpha: ['auto', true, false],
|
1627 |
+
},
|
1628 |
+
|
1629 |
+
|
1630 |
+
deprecatedOpts : {
|
1631 |
+
// <old_option>: <new_option> (<new_option> can be null)
|
1632 |
+
'styleElement': 'previewElement',
|
1633 |
+
'onFineChange': 'onInput',
|
1634 |
+
'overwriteImportant': 'forceStyle',
|
1635 |
+
'closable': 'closeButton',
|
1636 |
+
'insetWidth': 'controlBorderWidth',
|
1637 |
+
'insetColor': 'controlBorderColor',
|
1638 |
+
'refine': null,
|
1639 |
+
},
|
1640 |
+
|
1641 |
+
|
1642 |
+
docsRef : ' ' + 'See https://jscolor.com/docs/',
|
1643 |
+
|
1644 |
+
|
1645 |
+
//
|
1646 |
+
// Usage:
|
1647 |
+
// var myPicker = new JSColor(<targetElement> [, <options>])
|
1648 |
+
//
|
1649 |
+
// (constructor is accessible via both 'jscolor' and 'JSColor' name)
|
1650 |
+
//
|
1651 |
+
|
1652 |
+
pub : function (targetElement, opts) {
|
1653 |
+
|
1654 |
+
var THIS = this;
|
1655 |
+
|
1656 |
+
if (!opts) {
|
1657 |
+
opts = {};
|
1658 |
+
}
|
1659 |
+
|
1660 |
+
this.channels = {
|
1661 |
+
r: 255, // red [0-255]
|
1662 |
+
g: 255, // green [0-255]
|
1663 |
+
b: 255, // blue [0-255]
|
1664 |
+
h: 0, // hue [0-360]
|
1665 |
+
s: 0, // saturation [0-100]
|
1666 |
+
v: 100, // value (brightness) [0-100]
|
1667 |
+
a: 1.0, // alpha (opacity) [0.0 - 1.0]
|
1668 |
+
};
|
1669 |
+
|
1670 |
+
// General options
|
1671 |
+
//
|
1672 |
+
this.format = 'auto'; // 'auto' | 'any' | 'hex' | 'hexa' | 'rgb' | 'rgba' - Format of the input/output value
|
1673 |
+
this.value = undefined; // INITIAL color value in any supported format. To change it later, use method fromString(), fromHSVA(), fromRGBA() or channel()
|
1674 |
+
this.alpha = undefined; // INITIAL alpha value. To change it later, call method channel('A', <value>)
|
1675 |
+
this.onChange = undefined; // called when color changes. Value can be either a function or a string with JS code.
|
1676 |
+
this.onInput = undefined; // called repeatedly as the color is being changed, e.g. while dragging a slider. Value can be either a function or a string with JS code.
|
1677 |
+
this.valueElement = undefined; // element that will be used to display and input the color value
|
1678 |
+
this.alphaElement = undefined; // element that will be used to display and input the alpha (opacity) value
|
1679 |
+
this.previewElement = undefined; // element that will preview the picked color using CSS background
|
1680 |
+
this.previewPosition = 'left'; // 'left' | 'right' - position of the color preview in previewElement
|
1681 |
+
this.previewSize = 32; // (px) width of the color preview displayed in previewElement
|
1682 |
+
this.previewPadding = 8; // (px) space between color preview and content of the previewElement
|
1683 |
+
this.required = true; // whether the associated text input must always contain a color value. If false, the input can be left empty.
|
1684 |
+
this.hash = true; // whether to prefix the HEX color code with # symbol (only applicable for HEX format)
|
1685 |
+
this.uppercase = true; // whether to show the HEX color code in upper case (only applicable for HEX format)
|
1686 |
+
this.forceStyle = true; // whether to overwrite CSS style of the previewElement using !important flag
|
1687 |
+
|
1688 |
+
// Color Picker options
|
1689 |
+
//
|
1690 |
+
this.width = 181; // width of the color spectrum (in px)
|
1691 |
+
this.height = 101; // height of the color spectrum (in px)
|
1692 |
+
this.mode = 'HSV'; // 'HSV' | 'HVS' | 'HS' | 'HV' - layout of the color picker controls
|
1693 |
+
this.alphaChannel = 'auto'; // 'auto' | true | false - if alpha channel is enabled, the alpha slider will be visible. If 'auto', it will be determined according to color format
|
1694 |
+
this.position = 'bottom'; // 'left' | 'right' | 'top' | 'bottom' - position relative to the target element
|
1695 |
+
this.smartPosition = true; // automatically change picker position when there is not enough space for it
|
1696 |
+
this.showOnClick = true; // whether to show the picker when user clicks its target element
|
1697 |
+
this.hideOnLeave = true; // whether to automatically hide the picker when user leaves its target element (e.g. upon clicking the document)
|
1698 |
+
this.palette = []; // colors to be displayed in the palette, specified as an array or a string of space separated color values (in any supported format)
|
1699 |
+
this.paletteCols = 10; // number of columns in the palette
|
1700 |
+
this.paletteSetsAlpha = 'auto'; // 'auto' | true | false - if true, palette colors that don't specify alpha will set alpha to 1.0
|
1701 |
+
this.paletteHeight = 16; // maximum height (px) of a row in the palette
|
1702 |
+
this.paletteSpacing = 4; // distance (px) between color samples in the palette
|
1703 |
+
this.hideOnPaletteClick = false; // when set to true, clicking the palette will also hide the color picker
|
1704 |
+
this.sliderSize = 16; // px
|
1705 |
+
this.crossSize = 8; // px
|
1706 |
+
this.closeButton = false; // whether to display the Close button
|
1707 |
+
this.closeText = 'Close';
|
1708 |
+
this.buttonColor = 'rgba(0,0,0,1)'; // CSS color
|
1709 |
+
this.buttonHeight = 18; // px
|
1710 |
+
this.padding = 12; // px
|
1711 |
+
this.backgroundColor = 'rgba(255,255,255,1)'; // CSS color
|
1712 |
+
this.borderWidth = 1; // px
|
1713 |
+
this.borderColor = 'rgba(187,187,187,1)'; // CSS color
|
1714 |
+
this.borderRadius = 8; // px
|
1715 |
+
this.controlBorderWidth = 1; // px
|
1716 |
+
this.controlBorderColor = 'rgba(187,187,187,1)'; // CSS color
|
1717 |
+
this.shadow = true; // whether to display a shadow
|
1718 |
+
this.shadowBlur = 15; // px
|
1719 |
+
this.shadowColor = 'rgba(0,0,0,0.2)'; // CSS color
|
1720 |
+
this.pointerColor = 'rgba(76,76,76,1)'; // CSS color
|
1721 |
+
this.pointerBorderWidth = 1; // px
|
1722 |
+
this.pointerBorderColor = 'rgba(255,255,255,1)'; // CSS color
|
1723 |
+
this.pointerThickness = 2; // px
|
1724 |
+
this.zIndex = 5000;
|
1725 |
+
this.container = undefined; // where to append the color picker (BODY element by default)
|
1726 |
+
|
1727 |
+
// Experimental
|
1728 |
+
//
|
1729 |
+
this.minS = 0; // min allowed saturation (0 - 100)
|
1730 |
+
this.maxS = 100; // max allowed saturation (0 - 100)
|
1731 |
+
this.minV = 0; // min allowed value (brightness) (0 - 100)
|
1732 |
+
this.maxV = 100; // max allowed value (brightness) (0 - 100)
|
1733 |
+
this.minA = 0.0; // min allowed alpha (opacity) (0.0 - 1.0)
|
1734 |
+
this.maxA = 1.0; // max allowed alpha (opacity) (0.0 - 1.0)
|
1735 |
+
|
1736 |
+
|
1737 |
+
// Getter: option(name)
|
1738 |
+
// Setter: option(name, value)
|
1739 |
+
// option({name:value, ...})
|
1740 |
+
//
|
1741 |
+
this.option = function () {
|
1742 |
+
if (!arguments.length) {
|
1743 |
+
throw new Error('No option specified');
|
1744 |
+
}
|
1745 |
+
|
1746 |
+
if (arguments.length === 1 && typeof arguments[0] === 'string') {
|
1747 |
+
// getting a single option
|
1748 |
+
try {
|
1749 |
+
return getOption(arguments[0]);
|
1750 |
+
} catch (e) {
|
1751 |
+
console.warn(e);
|
1752 |
+
}
|
1753 |
+
return false;
|
1754 |
+
|
1755 |
+
} else if (arguments.length >= 2 && typeof arguments[0] === 'string') {
|
1756 |
+
// setting a single option
|
1757 |
+
try {
|
1758 |
+
if (!setOption(arguments[0], arguments[1])) {
|
1759 |
+
return false;
|
1760 |
+
}
|
1761 |
+
} catch (e) {
|
1762 |
+
console.warn(e);
|
1763 |
+
return false;
|
1764 |
+
}
|
1765 |
+
this.redraw(); // immediately redraws the picker, if it's displayed
|
1766 |
+
this.exposeColor(); // in case some preview-related or format-related option was changed
|
1767 |
+
return true;
|
1768 |
+
|
1769 |
+
} else if (arguments.length === 1 && typeof arguments[0] === 'object') {
|
1770 |
+
// setting multiple options
|
1771 |
+
var opts = arguments[0];
|
1772 |
+
var success = true;
|
1773 |
+
for (var opt in opts) {
|
1774 |
+
if (opts.hasOwnProperty(opt)) {
|
1775 |
+
try {
|
1776 |
+
if (!setOption(opt, opts[opt])) {
|
1777 |
+
success = false;
|
1778 |
+
}
|
1779 |
+
} catch (e) {
|
1780 |
+
console.warn(e);
|
1781 |
+
success = false;
|
1782 |
+
}
|
1783 |
+
}
|
1784 |
+
}
|
1785 |
+
this.redraw(); // immediately redraws the picker, if it's displayed
|
1786 |
+
this.exposeColor(); // in case some preview-related or format-related option was changed
|
1787 |
+
return success;
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
throw new Error('Invalid arguments');
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
|
1794 |
+
// Getter: channel(name)
|
1795 |
+
// Setter: channel(name, value)
|
1796 |
+
//
|
1797 |
+
this.channel = function (name, value) {
|
1798 |
+
if (typeof name !== 'string') {
|
1799 |
+
throw new Error('Invalid value for channel name: ' + name);
|
1800 |
+
}
|
1801 |
+
|
1802 |
+
if (value === undefined) {
|
1803 |
+
// getting channel value
|
1804 |
+
if (!this.channels.hasOwnProperty(name.toLowerCase())) {
|
1805 |
+
console.warn('Getting unknown channel: ' + name);
|
1806 |
+
return false;
|
1807 |
+
}
|
1808 |
+
return this.channels[name.toLowerCase()];
|
1809 |
+
|
1810 |
+
} else {
|
1811 |
+
// setting channel value
|
1812 |
+
var res = false;
|
1813 |
+
switch (name.toLowerCase()) {
|
1814 |
+
case 'r': res = this.fromRGBA(value, null, null, null); break;
|
1815 |
+
case 'g': res = this.fromRGBA(null, value, null, null); break;
|
1816 |
+
case 'b': res = this.fromRGBA(null, null, value, null); break;
|
1817 |
+
case 'h': res = this.fromHSVA(value, null, null, null); break;
|
1818 |
+
case 's': res = this.fromHSVA(null, value, null, null); break;
|
1819 |
+
case 'v': res = this.fromHSVA(null, null, value, null); break;
|
1820 |
+
case 'a': res = this.fromHSVA(null, null, null, value); break;
|
1821 |
+
default:
|
1822 |
+
console.warn('Setting unknown channel: ' + name);
|
1823 |
+
return false;
|
1824 |
+
}
|
1825 |
+
if (res) {
|
1826 |
+
this.redraw(); // immediately redraws the picker, if it's displayed
|
1827 |
+
return true;
|
1828 |
+
}
|
1829 |
+
}
|
1830 |
+
|
1831 |
+
return false;
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
|
1835 |
+
// Triggers given input event(s) by:
|
1836 |
+
// - executing on<Event> callback specified as picker's option
|
1837 |
+
// - triggering standard DOM event listeners attached to the value element
|
1838 |
+
//
|
1839 |
+
// It is possible to specify multiple events separated with a space.
|
1840 |
+
//
|
1841 |
+
this.trigger = function (eventNames) {
|
1842 |
+
var evs = jsc.strList(eventNames);
|
1843 |
+
for (var i = 0; i < evs.length; i += 1) {
|
1844 |
+
var ev = evs[i].toLowerCase();
|
1845 |
+
|
1846 |
+
// trigger a callback
|
1847 |
+
var callbackProp = null;
|
1848 |
+
switch (ev) {
|
1849 |
+
case 'input': callbackProp = 'onInput'; break;
|
1850 |
+
case 'change': callbackProp = 'onChange'; break;
|
1851 |
+
}
|
1852 |
+
if (callbackProp) {
|
1853 |
+
jsc.triggerCallback(this, callbackProp);
|
1854 |
+
}
|
1855 |
+
|
1856 |
+
// trigger standard DOM event listeners on the value element
|
1857 |
+
jsc.triggerInputEvent(this.valueElement, ev, true, true);
|
1858 |
+
}
|
1859 |
+
};
|
1860 |
+
|
1861 |
+
|
1862 |
+
// h: 0-360
|
1863 |
+
// s: 0-100
|
1864 |
+
// v: 0-100
|
1865 |
+
// a: 0.0-1.0
|
1866 |
+
//
|
1867 |
+
this.fromHSVA = function (h, s, v, a, flags) { // null = don't change
|
1868 |
+
if (h === undefined) { h = null; }
|
1869 |
+
if (s === undefined) { s = null; }
|
1870 |
+
if (v === undefined) { v = null; }
|
1871 |
+
if (a === undefined) { a = null; }
|
1872 |
+
|
1873 |
+
if (h !== null) {
|
1874 |
+
if (isNaN(h)) { return false; }
|
1875 |
+
this.channels.h = Math.max(0, Math.min(360, h));
|
1876 |
+
}
|
1877 |
+
if (s !== null) {
|
1878 |
+
if (isNaN(s)) { return false; }
|
1879 |
+
this.channels.s = Math.max(0, Math.min(100, this.maxS, s), this.minS);
|
1880 |
+
}
|
1881 |
+
if (v !== null) {
|
1882 |
+
if (isNaN(v)) { return false; }
|
1883 |
+
this.channels.v = Math.max(0, Math.min(100, this.maxV, v), this.minV);
|
1884 |
+
}
|
1885 |
+
if (a !== null) {
|
1886 |
+
if (isNaN(a)) { return false; }
|
1887 |
+
this.channels.a = this.hasAlphaChannel() ?
|
1888 |
+
Math.max(0, Math.min(1, this.maxA, a), this.minA) :
|
1889 |
+
1.0; // if alpha channel is disabled, the color should stay 100% opaque
|
1890 |
+
}
|
1891 |
+
|
1892 |
+
var rgb = jsc.HSV_RGB(
|
1893 |
+
this.channels.h,
|
1894 |
+
this.channels.s,
|
1895 |
+
this.channels.v
|
1896 |
+
);
|
1897 |
+
this.channels.r = rgb[0];
|
1898 |
+
this.channels.g = rgb[1];
|
1899 |
+
this.channels.b = rgb[2];
|
1900 |
+
|
1901 |
+
this.exposeColor(flags);
|
1902 |
+
return true;
|
1903 |
+
};
|
1904 |
+
|
1905 |
+
|
1906 |
+
// r: 0-255
|
1907 |
+
// g: 0-255
|
1908 |
+
// b: 0-255
|
1909 |
+
// a: 0.0-1.0
|
1910 |
+
//
|
1911 |
+
this.fromRGBA = function (r, g, b, a, flags) { // null = don't change
|
1912 |
+
if (r === undefined) { r = null; }
|
1913 |
+
if (g === undefined) { g = null; }
|
1914 |
+
if (b === undefined) { b = null; }
|
1915 |
+
if (a === undefined) { a = null; }
|
1916 |
+
|
1917 |
+
if (r !== null) {
|
1918 |
+
if (isNaN(r)) { return false; }
|
1919 |
+
r = Math.max(0, Math.min(255, r));
|
1920 |
+
}
|
1921 |
+
if (g !== null) {
|
1922 |
+
if (isNaN(g)) { return false; }
|
1923 |
+
g = Math.max(0, Math.min(255, g));
|
1924 |
+
}
|
1925 |
+
if (b !== null) {
|
1926 |
+
if (isNaN(b)) { return false; }
|
1927 |
+
b = Math.max(0, Math.min(255, b));
|
1928 |
+
}
|
1929 |
+
if (a !== null) {
|
1930 |
+
if (isNaN(a)) { return false; }
|
1931 |
+
this.channels.a = this.hasAlphaChannel() ?
|
1932 |
+
Math.max(0, Math.min(1, this.maxA, a), this.minA) :
|
1933 |
+
1.0; // if alpha channel is disabled, the color should stay 100% opaque
|
1934 |
+
}
|
1935 |
+
|
1936 |
+
var hsv = jsc.RGB_HSV(
|
1937 |
+
r===null ? this.channels.r : r,
|
1938 |
+
g===null ? this.channels.g : g,
|
1939 |
+
b===null ? this.channels.b : b
|
1940 |
+
);
|
1941 |
+
if (hsv[0] !== null) {
|
1942 |
+
this.channels.h = Math.max(0, Math.min(360, hsv[0]));
|
1943 |
+
}
|
1944 |
+
if (hsv[2] !== 0) { // fully black color stays black through entire saturation range, so let's not change saturation
|
1945 |
+
this.channels.s = Math.max(0, this.minS, Math.min(100, this.maxS, hsv[1]));
|
1946 |
+
}
|
1947 |
+
this.channels.v = Math.max(0, this.minV, Math.min(100, this.maxV, hsv[2]));
|
1948 |
+
|
1949 |
+
// update RGB according to final HSV, as some values might be trimmed
|
1950 |
+
var rgb = jsc.HSV_RGB(this.channels.h, this.channels.s, this.channels.v);
|
1951 |
+
this.channels.r = rgb[0];
|
1952 |
+
this.channels.g = rgb[1];
|
1953 |
+
this.channels.b = rgb[2];
|
1954 |
+
|
1955 |
+
this.exposeColor(flags);
|
1956 |
+
return true;
|
1957 |
+
};
|
1958 |
+
|
1959 |
+
|
1960 |
+
// DEPRECATED. Use .fromHSVA() instead
|
1961 |
+
//
|
1962 |
+
this.fromHSV = function (h, s, v, flags) {
|
1963 |
+
console.warn('fromHSV() method is DEPRECATED. Using fromHSVA() instead.' + jsc.docsRef);
|
1964 |
+
return this.fromHSVA(h, s, v, null, flags);
|
1965 |
+
};
|
1966 |
+
|
1967 |
+
|
1968 |
+
// DEPRECATED. Use .fromRGBA() instead
|
1969 |
+
//
|
1970 |
+
this.fromRGB = function (r, g, b, flags) {
|
1971 |
+
console.warn('fromRGB() method is DEPRECATED. Using fromRGBA() instead.' + jsc.docsRef);
|
1972 |
+
return this.fromRGBA(r, g, b, null, flags);
|
1973 |
+
};
|
1974 |
+
|
1975 |
+
|
1976 |
+
this.fromString = function (str, flags) {
|
1977 |
+
if (!this.required && str.trim() === '') {
|
1978 |
+
// setting empty string to an optional color input
|
1979 |
+
this.setPreviewElementBg(null);
|
1980 |
+
this.setValueElementValue('');
|
1981 |
+
return true;
|
1982 |
+
}
|
1983 |
+
|
1984 |
+
var color = jsc.parseColorString(str);
|
1985 |
+
if (!color) {
|
1986 |
+
return false; // could not parse
|
1987 |
+
}
|
1988 |
+
if (this.format.toLowerCase() === 'any') {
|
1989 |
+
this._setFormat(color.format); // adapt format
|
1990 |
+
if (!jsc.isAlphaFormat(this.getFormat())) {
|
1991 |
+
color.rgba[3] = 1.0; // when switching to a format that doesn't support alpha, set full opacity
|
1992 |
+
}
|
1993 |
+
}
|
1994 |
+
this.fromRGBA(
|
1995 |
+
color.rgba[0],
|
1996 |
+
color.rgba[1],
|
1997 |
+
color.rgba[2],
|
1998 |
+
color.rgba[3],
|
1999 |
+
flags
|
2000 |
+
);
|
2001 |
+
return true;
|
2002 |
+
};
|
2003 |
+
|
2004 |
+
|
2005 |
+
this.toString = function (format) {
|
2006 |
+
if (format === undefined) {
|
2007 |
+
format = this.getFormat(); // format not specified -> use the current format
|
2008 |
+
}
|
2009 |
+
switch (format.toLowerCase()) {
|
2010 |
+
case 'hex': return this.toHEXString(); break;
|
2011 |
+
case 'hexa': return this.toHEXAString(); break;
|
2012 |
+
case 'rgb': return this.toRGBString(); break;
|
2013 |
+
case 'rgba': return this.toRGBAString(); break;
|
2014 |
+
}
|
2015 |
+
return false;
|
2016 |
+
};
|
2017 |
+
|
2018 |
+
|
2019 |
+
this.toHEXString = function () {
|
2020 |
+
return jsc.hexColor(
|
2021 |
+
this.channels.r,
|
2022 |
+
this.channels.g,
|
2023 |
+
this.channels.b
|
2024 |
+
);
|
2025 |
+
};
|
2026 |
+
|
2027 |
+
|
2028 |
+
this.toHEXAString = function () {
|
2029 |
+
return jsc.hexaColor(
|
2030 |
+
this.channels.r,
|
2031 |
+
this.channels.g,
|
2032 |
+
this.channels.b,
|
2033 |
+
this.channels.a
|
2034 |
+
);
|
2035 |
+
};
|
2036 |
+
|
2037 |
+
|
2038 |
+
this.toRGBString = function () {
|
2039 |
+
return jsc.rgbColor(
|
2040 |
+
this.channels.r,
|
2041 |
+
this.channels.g,
|
2042 |
+
this.channels.b
|
2043 |
+
);
|
2044 |
+
};
|
2045 |
+
|
2046 |
+
|
2047 |
+
this.toRGBAString = function () {
|
2048 |
+
return jsc.rgbaColor(
|
2049 |
+
this.channels.r,
|
2050 |
+
this.channels.g,
|
2051 |
+
this.channels.b,
|
2052 |
+
this.channels.a
|
2053 |
+
);
|
2054 |
+
};
|
2055 |
+
|
2056 |
+
|
2057 |
+
this.toGrayscale = function () {
|
2058 |
+
return (
|
2059 |
+
0.213 * this.channels.r +
|
2060 |
+
0.715 * this.channels.g +
|
2061 |
+
0.072 * this.channels.b
|
2062 |
+
);
|
2063 |
+
};
|
2064 |
+
|
2065 |
+
|
2066 |
+
this.toCanvas = function () {
|
2067 |
+
return jsc.genColorPreviewCanvas(this.toRGBAString()).canvas;
|
2068 |
+
};
|
2069 |
+
|
2070 |
+
|
2071 |
+
this.toDataURL = function () {
|
2072 |
+
return this.toCanvas().toDataURL();
|
2073 |
+
};
|
2074 |
+
|
2075 |
+
|
2076 |
+
this.toBackground = function () {
|
2077 |
+
return jsc.pub.background(this.toRGBAString());
|
2078 |
+
};
|
2079 |
+
|
2080 |
+
|
2081 |
+
this.isLight = function () {
|
2082 |
+
return this.toGrayscale() > 255 / 2;
|
2083 |
+
};
|
2084 |
+
|
2085 |
+
|
2086 |
+
this.hide = function () {
|
2087 |
+
if (isPickerOwner()) {
|
2088 |
+
detachPicker();
|
2089 |
+
}
|
2090 |
+
};
|
2091 |
+
|
2092 |
+
|
2093 |
+
this.show = function () {
|
2094 |
+
drawPicker();
|
2095 |
+
};
|
2096 |
+
|
2097 |
+
|
2098 |
+
this.redraw = function () {
|
2099 |
+
if (isPickerOwner()) {
|
2100 |
+
drawPicker();
|
2101 |
+
}
|
2102 |
+
};
|
2103 |
+
|
2104 |
+
|
2105 |
+
this.getFormat = function () {
|
2106 |
+
return this._currentFormat;
|
2107 |
+
};
|
2108 |
+
|
2109 |
+
|
2110 |
+
this._setFormat = function (format) {
|
2111 |
+
this._currentFormat = format.toLowerCase();
|
2112 |
+
};
|
2113 |
+
|
2114 |
+
|
2115 |
+
this.hasAlphaChannel = function () {
|
2116 |
+
if (this.alphaChannel === 'auto') {
|
2117 |
+
return (
|
2118 |
+
this.format.toLowerCase() === 'any' || // format can change on the fly (e.g. from hex to rgba), so let's consider the alpha channel enabled
|
2119 |
+
jsc.isAlphaFormat(this.getFormat()) || // the current format supports alpha channel
|
2120 |
+
this.alpha !== undefined || // initial alpha value is set, so we're working with alpha channel
|
2121 |
+
this.alphaElement !== undefined // the alpha value is redirected, so we're working with alpha channel
|
2122 |
+
);
|
2123 |
+
}
|
2124 |
+
|
2125 |
+
return this.alphaChannel; // the alpha channel is explicitly set
|
2126 |
+
};
|
2127 |
+
|
2128 |
+
|
2129 |
+
this.processValueInput = function (str) {
|
2130 |
+
if (!this.fromString(str)) {
|
2131 |
+
// could not parse the color value - let's just expose the current color
|
2132 |
+
this.exposeColor();
|
2133 |
+
}
|
2134 |
+
};
|
2135 |
+
|
2136 |
+
|
2137 |
+
this.processAlphaInput = function (str) {
|
2138 |
+
if (!this.fromHSVA(null, null, null, parseFloat(str))) {
|
2139 |
+
// could not parse the alpha value - let's just expose the current color
|
2140 |
+
this.exposeColor();
|
2141 |
+
}
|
2142 |
+
};
|
2143 |
+
|
2144 |
+
|
2145 |
+
this.exposeColor = function (flags) {
|
2146 |
+
var colorStr = this.toString();
|
2147 |
+
var fmt = this.getFormat();
|
2148 |
+
|
2149 |
+
// reflect current color in data- attribute
|
2150 |
+
jsc.setDataAttr(this.targetElement, 'current-color', colorStr);
|
2151 |
+
|
2152 |
+
if (!(flags & jsc.flags.leaveValue) && this.valueElement) {
|
2153 |
+
if (fmt === 'hex' || fmt === 'hexa') {
|
2154 |
+
if (!this.uppercase) { colorStr = colorStr.toLowerCase(); }
|
2155 |
+
if (!this.hash) { colorStr = colorStr.replace(/^#/, ''); }
|
2156 |
+
}
|
2157 |
+
this.setValueElementValue(colorStr);
|
2158 |
+
}
|
2159 |
+
|
2160 |
+
if (!(flags & jsc.flags.leaveAlpha) && this.alphaElement) {
|
2161 |
+
var alphaVal = Math.round(this.channels.a * 100) / 100;
|
2162 |
+
this.setAlphaElementValue(alphaVal);
|
2163 |
+
}
|
2164 |
+
|
2165 |
+
if (!(flags & jsc.flags.leavePreview) && this.previewElement) {
|
2166 |
+
var previewPos = null; // 'left' | 'right' (null -> fill the entire element)
|
2167 |
+
|
2168 |
+
if (
|
2169 |
+
jsc.isTextInput(this.previewElement) || // text input
|
2170 |
+
(jsc.isButton(this.previewElement) && !jsc.isButtonEmpty(this.previewElement)) // button with text
|
2171 |
+
) {
|
2172 |
+
previewPos = this.previewPosition;
|
2173 |
+
}
|
2174 |
+
|
2175 |
+
this.setPreviewElementBg(this.toRGBAString());
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
if (isPickerOwner()) {
|
2179 |
+
redrawPad();
|
2180 |
+
redrawSld();
|
2181 |
+
redrawASld();
|
2182 |
+
}
|
2183 |
+
};
|
2184 |
+
|
2185 |
+
|
2186 |
+
this.setPreviewElementBg = function (color) {
|
2187 |
+
if (!this.previewElement) {
|
2188 |
+
return;
|
2189 |
+
}
|
2190 |
+
|
2191 |
+
var position = null; // color preview position: null | 'left' | 'right'
|
2192 |
+
var width = null; // color preview width: px | null = fill the entire element
|
2193 |
+
if (
|
2194 |
+
jsc.isTextInput(this.previewElement) || // text input
|
2195 |
+
(jsc.isButton(this.previewElement) && !jsc.isButtonEmpty(this.previewElement)) // button with text
|
2196 |
+
) {
|
2197 |
+
position = this.previewPosition;
|
2198 |
+
width = this.previewSize;
|
2199 |
+
}
|
2200 |
+
|
2201 |
+
var backgrounds = [];
|
2202 |
+
|
2203 |
+
if (!color) {
|
2204 |
+
// there is no color preview to display -> let's remove any previous background image
|
2205 |
+
backgrounds.push({
|
2206 |
+
image: 'none',
|
2207 |
+
position: 'left top',
|
2208 |
+
size: 'auto',
|
2209 |
+
repeat: 'no-repeat',
|
2210 |
+
origin: 'padding-box',
|
2211 |
+
});
|
2212 |
+
} else {
|
2213 |
+
// CSS gradient for background color preview
|
2214 |
+
backgrounds.push({
|
2215 |
+
image: jsc.genColorPreviewGradient(
|
2216 |
+
color,
|
2217 |
+
position,
|
2218 |
+
width ? width - jsc.pub.previewSeparator.length : null
|
2219 |
+
),
|
2220 |
+
position: 'left top',
|
2221 |
+
size: 'auto',
|
2222 |
+
repeat: position ? 'repeat-y' : 'repeat',
|
2223 |
+
origin: 'padding-box',
|
2224 |
+
});
|
2225 |
+
|
2226 |
+
// data URL of generated PNG image with a gray transparency chessboard
|
2227 |
+
var preview = jsc.genColorPreviewCanvas(
|
2228 |
+
'rgba(0,0,0,0)',
|
2229 |
+
position ? {'left':'right', 'right':'left'}[position] : null,
|
2230 |
+
width,
|
2231 |
+
true
|
2232 |
+
);
|
2233 |
+
backgrounds.push({
|
2234 |
+
image: 'url(\'' + preview.canvas.toDataURL() + '\')',
|
2235 |
+
position: (position || 'left') + ' top',
|
2236 |
+
size: preview.width + 'px ' + preview.height + 'px',
|
2237 |
+
repeat: position ? 'repeat-y' : 'repeat',
|
2238 |
+
origin: 'padding-box',
|
2239 |
+
});
|
2240 |
+
}
|
2241 |
+
|
2242 |
+
var bg = {
|
2243 |
+
image: [],
|
2244 |
+
position: [],
|
2245 |
+
size: [],
|
2246 |
+
repeat: [],
|
2247 |
+
origin: [],
|
2248 |
+
};
|
2249 |
+
for (var i = 0; i < backgrounds.length; i += 1) {
|
2250 |
+
bg.image.push(backgrounds[i].image);
|
2251 |
+
bg.position.push(backgrounds[i].position);
|
2252 |
+
bg.size.push(backgrounds[i].size);
|
2253 |
+
bg.repeat.push(backgrounds[i].repeat);
|
2254 |
+
bg.origin.push(backgrounds[i].origin);
|
2255 |
+
}
|
2256 |
+
|
2257 |
+
// set previewElement's background-images
|
2258 |
+
var sty = {
|
2259 |
+
'background-image': bg.image.join(', '),
|
2260 |
+
'background-position': bg.position.join(', '),
|
2261 |
+
'background-size': bg.size.join(', '),
|
2262 |
+
'background-repeat': bg.repeat.join(', '),
|
2263 |
+
'background-origin': bg.origin.join(', '),
|
2264 |
+
};
|
2265 |
+
jsc.setStyle(this.previewElement, sty, this.forceStyle);
|
2266 |
+
|
2267 |
+
|
2268 |
+
// set/restore previewElement's padding
|
2269 |
+
var padding = {
|
2270 |
+
left: null,
|
2271 |
+
right: null,
|
2272 |
+
};
|
2273 |
+
if (position) {
|
2274 |
+
padding[position] = (this.previewSize + this.previewPadding) + 'px';
|
2275 |
+
}
|
2276 |
+
|
2277 |
+
var sty = {
|
2278 |
+
'padding-left': padding.left,
|
2279 |
+
'padding-right': padding.right,
|
2280 |
+
};
|
2281 |
+
jsc.setStyle(this.previewElement, sty, this.forceStyle, true);
|
2282 |
+
};
|
2283 |
+
|
2284 |
+
|
2285 |
+
this.setValueElementValue = function (str) {
|
2286 |
+
if (this.valueElement) {
|
2287 |
+
if (jsc.nodeName(this.valueElement) === 'input') {
|
2288 |
+
this.valueElement.value = str;
|
2289 |
+
} else {
|
2290 |
+
this.valueElement.innerHTML = str;
|
2291 |
+
}
|
2292 |
+
}
|
2293 |
+
};
|
2294 |
+
|
2295 |
+
|
2296 |
+
this.setAlphaElementValue = function (str) {
|
2297 |
+
if (this.alphaElement) {
|
2298 |
+
if (jsc.nodeName(this.alphaElement) === 'input') {
|
2299 |
+
this.alphaElement.value = str;
|
2300 |
+
} else {
|
2301 |
+
this.alphaElement.innerHTML = str;
|
2302 |
+
}
|
2303 |
+
}
|
2304 |
+
};
|
2305 |
+
|
2306 |
+
|
2307 |
+
this._processParentElementsInDOM = function () {
|
2308 |
+
if (this._parentElementsProcessed) { return; }
|
2309 |
+
this._parentElementsProcessed = true;
|
2310 |
+
|
2311 |
+
var elm = this.targetElement;
|
2312 |
+
do {
|
2313 |
+
// If the target element or one of its parent nodes has fixed position,
|
2314 |
+
// then use fixed positioning instead
|
2315 |
+
var compStyle = jsc.getCompStyle(elm);
|
2316 |
+
if (compStyle.position && compStyle.position.toLowerCase() === 'fixed') {
|
2317 |
+
this.fixed = true;
|
2318 |
+
}
|
2319 |
+
|
2320 |
+
if (elm !== this.targetElement) {
|
2321 |
+
// Ensure to attach onParentScroll only once to each parent element
|
2322 |
+
// (multiple targetElements can share the same parent nodes)
|
2323 |
+
//
|
2324 |
+
// Note: It's not just offsetParents that can be scrollable,
|
2325 |
+
// that's why we loop through all parent nodes
|
2326 |
+
if (!jsc.getData(elm, 'hasScrollListener')) {
|
2327 |
+
elm.addEventListener('scroll', jsc.onParentScroll, false);
|
2328 |
+
jsc.setData(elm, 'hasScrollListener', true);
|
2329 |
+
}
|
2330 |
+
}
|
2331 |
+
} while ((elm = elm.parentNode) && jsc.nodeName(elm) !== 'body');
|
2332 |
+
};
|
2333 |
+
|
2334 |
+
|
2335 |
+
this.tryHide = function () {
|
2336 |
+
if (this.hideOnLeave) {
|
2337 |
+
this.hide();
|
2338 |
+
}
|
2339 |
+
};
|
2340 |
+
|
2341 |
+
|
2342 |
+
this.set__palette = function (val) {
|
2343 |
+
this.palette = val;
|
2344 |
+
this._palette = jsc.parsePaletteValue(val);
|
2345 |
+
this._paletteHasTransparency = jsc.containsTranparentColor(this._palette);
|
2346 |
+
};
|
2347 |
+
|
2348 |
+
|
2349 |
+
function setOption (option, value) {
|
2350 |
+
if (typeof option !== 'string') {
|
2351 |
+
throw new Error('Invalid value for option name: ' + option);
|
2352 |
+
}
|
2353 |
+
|
2354 |
+
// enum option
|
2355 |
+
if (jsc.enumOpts.hasOwnProperty(option)) {
|
2356 |
+
if (typeof value === 'string') { // enum string values are case insensitive
|
2357 |
+
value = value.toLowerCase();
|
2358 |
+
}
|
2359 |
+
if (jsc.enumOpts[option].indexOf(value) === -1) {
|
2360 |
+
throw new Error('Option \'' + option + '\' has invalid value: ' + value);
|
2361 |
+
}
|
2362 |
+
}
|
2363 |
+
|
2364 |
+
// deprecated option
|
2365 |
+
if (jsc.deprecatedOpts.hasOwnProperty(option)) {
|
2366 |
+
var oldOpt = option;
|
2367 |
+
var newOpt = jsc.deprecatedOpts[option];
|
2368 |
+
if (newOpt) {
|
2369 |
+
// if we have a new name for this option, let's log a warning and use the new name
|
2370 |
+
console.warn('Option \'%s\' is DEPRECATED, using \'%s\' instead.' + jsc.docsRef, oldOpt, newOpt);
|
2371 |
+
option = newOpt;
|
2372 |
+
} else {
|
2373 |
+
// new name not available for the option
|
2374 |
+
throw new Error('Option \'' + option + '\' is DEPRECATED');
|
2375 |
+
}
|
2376 |
+
}
|
2377 |
+
|
2378 |
+
var setter = 'set__' + option;
|
2379 |
+
|
2380 |
+
if (typeof THIS[setter] === 'function') { // a setter exists for this option
|
2381 |
+
THIS[setter](value);
|
2382 |
+
return true;
|
2383 |
+
|
2384 |
+
} else if (option in THIS) { // option exists as a property
|
2385 |
+
THIS[option] = value;
|
2386 |
+
return true;
|
2387 |
+
}
|
2388 |
+
|
2389 |
+
throw new Error('Unrecognized configuration option: ' + option);
|
2390 |
+
}
|
2391 |
+
|
2392 |
+
|
2393 |
+
function getOption (option) {
|
2394 |
+
if (typeof option !== 'string') {
|
2395 |
+
throw new Error('Invalid value for option name: ' + option);
|
2396 |
+
}
|
2397 |
+
|
2398 |
+
// deprecated option
|
2399 |
+
if (jsc.deprecatedOpts.hasOwnProperty(option)) {
|
2400 |
+
var oldOpt = option;
|
2401 |
+
var newOpt = jsc.deprecatedOpts[option];
|
2402 |
+
if (newOpt) {
|
2403 |
+
// if we have a new name for this option, let's log a warning and use the new name
|
2404 |
+
console.warn('Option \'%s\' is DEPRECATED, using \'%s\' instead.' + jsc.docsRef, oldOpt, newOpt);
|
2405 |
+
option = newOpt;
|
2406 |
+
} else {
|
2407 |
+
// new name not available for the option
|
2408 |
+
throw new Error('Option \'' + option + '\' is DEPRECATED');
|
2409 |
+
}
|
2410 |
+
}
|
2411 |
+
|
2412 |
+
var getter = 'get__' + option;
|
2413 |
+
|
2414 |
+
if (typeof THIS[getter] === 'function') { // a getter exists for this option
|
2415 |
+
return THIS[getter](value);
|
2416 |
+
|
2417 |
+
} else if (option in THIS) { // option exists as a property
|
2418 |
+
return THIS[option];
|
2419 |
+
}
|
2420 |
+
|
2421 |
+
throw new Error('Unrecognized configuration option: ' + option);
|
2422 |
+
}
|
2423 |
+
|
2424 |
+
|
2425 |
+
function detachPicker () {
|
2426 |
+
jsc.removeClass(THIS.targetElement, jsc.pub.activeClassName);
|
2427 |
+
jsc.picker.wrap.parentNode.removeChild(jsc.picker.wrap);
|
2428 |
+
delete jsc.picker.owner;
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
|
2432 |
+
function drawPicker () {
|
2433 |
+
|
2434 |
+
// At this point, when drawing the picker, we know what the parent elements are
|
2435 |
+
// and we can do all related DOM operations, such as registering events on them
|
2436 |
+
// or checking their positioning
|
2437 |
+
THIS._processParentElementsInDOM();
|
2438 |
+
|
2439 |
+
if (!jsc.picker) {
|
2440 |
+
jsc.picker = {
|
2441 |
+
owner: null, // owner picker instance
|
2442 |
+
wrap : jsc.createEl('div'),
|
2443 |
+
box : jsc.createEl('div'),
|
2444 |
+
boxS : jsc.createEl('div'), // shadow area
|
2445 |
+
boxB : jsc.createEl('div'), // border
|
2446 |
+
pad : jsc.createEl('div'),
|
2447 |
+
padB : jsc.createEl('div'), // border
|
2448 |
+
padM : jsc.createEl('div'), // mouse/touch area
|
2449 |
+
padCanvas : jsc.createPadCanvas(),
|
2450 |
+
cross : jsc.createEl('div'),
|
2451 |
+
crossBY : jsc.createEl('div'), // border Y
|
2452 |
+
crossBX : jsc.createEl('div'), // border X
|
2453 |
+
crossLY : jsc.createEl('div'), // line Y
|
2454 |
+
crossLX : jsc.createEl('div'), // line X
|
2455 |
+
sld : jsc.createEl('div'), // slider
|
2456 |
+
sldB : jsc.createEl('div'), // border
|
2457 |
+
sldM : jsc.createEl('div'), // mouse/touch area
|
2458 |
+
sldGrad : jsc.createSliderGradient(),
|
2459 |
+
sldPtrS : jsc.createEl('div'), // slider pointer spacer
|
2460 |
+
sldPtrIB : jsc.createEl('div'), // slider pointer inner border
|
2461 |
+
sldPtrMB : jsc.createEl('div'), // slider pointer middle border
|
2462 |
+
sldPtrOB : jsc.createEl('div'), // slider pointer outer border
|
2463 |
+
asld : jsc.createEl('div'), // alpha slider
|
2464 |
+
asldB : jsc.createEl('div'), // border
|
2465 |
+
asldM : jsc.createEl('div'), // mouse/touch area
|
2466 |
+
asldGrad : jsc.createASliderGradient(),
|
2467 |
+
asldPtrS : jsc.createEl('div'), // slider pointer spacer
|
2468 |
+
asldPtrIB : jsc.createEl('div'), // slider pointer inner border
|
2469 |
+
asldPtrMB : jsc.createEl('div'), // slider pointer middle border
|
2470 |
+
asldPtrOB : jsc.createEl('div'), // slider pointer outer border
|
2471 |
+
pal : jsc.createEl('div'), // palette
|
2472 |
+
btn : jsc.createEl('div'),
|
2473 |
+
btnT : jsc.createEl('span'), // text
|
2474 |
+
};
|
2475 |
+
|
2476 |
+
jsc.picker.pad.appendChild(jsc.picker.padCanvas.elm);
|
2477 |
+
jsc.picker.padB.appendChild(jsc.picker.pad);
|
2478 |
+
jsc.picker.cross.appendChild(jsc.picker.crossBY);
|
2479 |
+
jsc.picker.cross.appendChild(jsc.picker.crossBX);
|
2480 |
+
jsc.picker.cross.appendChild(jsc.picker.crossLY);
|
2481 |
+
jsc.picker.cross.appendChild(jsc.picker.crossLX);
|
2482 |
+
jsc.picker.padB.appendChild(jsc.picker.cross);
|
2483 |
+
jsc.picker.box.appendChild(jsc.picker.padB);
|
2484 |
+
jsc.picker.box.appendChild(jsc.picker.padM);
|
2485 |
+
|
2486 |
+
jsc.picker.sld.appendChild(jsc.picker.sldGrad.elm);
|
2487 |
+
jsc.picker.sldB.appendChild(jsc.picker.sld);
|
2488 |
+
jsc.picker.sldB.appendChild(jsc.picker.sldPtrOB);
|
2489 |
+
jsc.picker.sldPtrOB.appendChild(jsc.picker.sldPtrMB);
|
2490 |
+
jsc.picker.sldPtrMB.appendChild(jsc.picker.sldPtrIB);
|
2491 |
+
jsc.picker.sldPtrIB.appendChild(jsc.picker.sldPtrS);
|
2492 |
+
jsc.picker.box.appendChild(jsc.picker.sldB);
|
2493 |
+
jsc.picker.box.appendChild(jsc.picker.sldM);
|
2494 |
+
|
2495 |
+
jsc.picker.asld.appendChild(jsc.picker.asldGrad.elm);
|
2496 |
+
jsc.picker.asldB.appendChild(jsc.picker.asld);
|
2497 |
+
jsc.picker.asldB.appendChild(jsc.picker.asldPtrOB);
|
2498 |
+
jsc.picker.asldPtrOB.appendChild(jsc.picker.asldPtrMB);
|
2499 |
+
jsc.picker.asldPtrMB.appendChild(jsc.picker.asldPtrIB);
|
2500 |
+
jsc.picker.asldPtrIB.appendChild(jsc.picker.asldPtrS);
|
2501 |
+
jsc.picker.box.appendChild(jsc.picker.asldB);
|
2502 |
+
jsc.picker.box.appendChild(jsc.picker.asldM);
|
2503 |
+
|
2504 |
+
jsc.picker.box.appendChild(jsc.picker.pal);
|
2505 |
+
|
2506 |
+
jsc.picker.btn.appendChild(jsc.picker.btnT);
|
2507 |
+
jsc.picker.box.appendChild(jsc.picker.btn);
|
2508 |
+
|
2509 |
+
jsc.picker.boxB.appendChild(jsc.picker.box);
|
2510 |
+
jsc.picker.wrap.appendChild(jsc.picker.boxS);
|
2511 |
+
jsc.picker.wrap.appendChild(jsc.picker.boxB);
|
2512 |
+
|
2513 |
+
jsc.picker.wrap.addEventListener('touchstart', jsc.onPickerTouchStart,
|
2514 |
+
jsc.isPassiveEventSupported ? {passive: false} : false);
|
2515 |
+
}
|
2516 |
+
|
2517 |
+
var p = jsc.picker;
|
2518 |
+
|
2519 |
+
var displaySlider = !!jsc.getSliderChannel(THIS);
|
2520 |
+
var displayAlphaSlider = THIS.hasAlphaChannel();
|
2521 |
+
var pickerDims = jsc.getPickerDims(THIS);
|
2522 |
+
var crossOuterSize = (2 * THIS.pointerBorderWidth + THIS.pointerThickness + 2 * THIS.crossSize);
|
2523 |
+
var controlPadding = jsc.getControlPadding(THIS);
|
2524 |
+
var borderRadius = Math.min(
|
2525 |
+
THIS.borderRadius,
|
2526 |
+
Math.round(THIS.padding * Math.PI)); // px
|
2527 |
+
var padCursor = 'crosshair';
|
2528 |
+
|
2529 |
+
// wrap
|
2530 |
+
p.wrap.className = 'jscolor-picker-wrap';
|
2531 |
+
p.wrap.style.clear = 'both';
|
2532 |
+
p.wrap.style.width = pickerDims.borderW + 'px';
|
2533 |
+
p.wrap.style.height = pickerDims.borderH + 'px';
|
2534 |
+
p.wrap.style.zIndex = THIS.zIndex;
|
2535 |
+
|
2536 |
+
// picker
|
2537 |
+
p.box.className = 'jscolor-picker';
|
2538 |
+
p.box.style.width = pickerDims.paddedW + 'px';
|
2539 |
+
p.box.style.height = pickerDims.paddedH + 'px';
|
2540 |
+
p.box.style.position = 'relative';
|
2541 |
+
|
2542 |
+
// picker shadow
|
2543 |
+
p.boxS.className = 'jscolor-picker-shadow';
|
2544 |
+
p.boxS.style.position = 'absolute';
|
2545 |
+
p.boxS.style.left = '0';
|
2546 |
+
p.boxS.style.top = '0';
|
2547 |
+
p.boxS.style.width = '100%';
|
2548 |
+
p.boxS.style.height = '100%';
|
2549 |
+
jsc.setBorderRadius(p.boxS, borderRadius + 'px');
|
2550 |
+
|
2551 |
+
// picker border
|
2552 |
+
p.boxB.className = 'jscolor-picker-border';
|
2553 |
+
p.boxB.style.position = 'relative';
|
2554 |
+
p.boxB.style.border = THIS.borderWidth + 'px solid';
|
2555 |
+
p.boxB.style.borderColor = THIS.borderColor;
|
2556 |
+
p.boxB.style.background = THIS.backgroundColor;
|
2557 |
+
jsc.setBorderRadius(p.boxB, borderRadius + 'px');
|
2558 |
+
|
2559 |
+
// IE hack:
|
2560 |
+
// If the element is transparent, IE will trigger the event on the elements under it,
|
2561 |
+
// e.g. on Canvas or on elements with border
|
2562 |
+
p.padM.style.background = 'rgba(255,0,0,.2)';
|
2563 |
+
p.sldM.style.background = 'rgba(0,255,0,.2)';
|
2564 |
+
p.asldM.style.background = 'rgba(0,0,255,.2)';
|
2565 |
+
|
2566 |
+
p.padM.style.opacity =
|
2567 |
+
p.sldM.style.opacity =
|
2568 |
+
p.asldM.style.opacity =
|
2569 |
+
'0';
|
2570 |
+
|
2571 |
+
// pad
|
2572 |
+
p.pad.style.position = 'relative';
|
2573 |
+
p.pad.style.width = THIS.width + 'px';
|
2574 |
+
p.pad.style.height = THIS.height + 'px';
|
2575 |
+
|
2576 |
+
// pad - color spectrum (HSV and HVS)
|
2577 |
+
p.padCanvas.draw(THIS.width, THIS.height, jsc.getPadYChannel(THIS));
|
2578 |
+
|
2579 |
+
// pad border
|
2580 |
+
p.padB.style.position = 'absolute';
|
2581 |
+
p.padB.style.left = THIS.padding + 'px';
|
2582 |
+
p.padB.style.top = THIS.padding + 'px';
|
2583 |
+
p.padB.style.border = THIS.controlBorderWidth + 'px solid';
|
2584 |
+
p.padB.style.borderColor = THIS.controlBorderColor;
|
2585 |
+
|
2586 |
+
// pad mouse area
|
2587 |
+
p.padM.style.position = 'absolute';
|
2588 |
+
p.padM.style.left = 0 + 'px';
|
2589 |
+
p.padM.style.top = 0 + 'px';
|
2590 |
+
p.padM.style.width = (THIS.padding + 2 * THIS.controlBorderWidth + THIS.width + controlPadding) + 'px';
|
2591 |
+
p.padM.style.height = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';
|
2592 |
+
p.padM.style.cursor = padCursor;
|
2593 |
+
jsc.setData(p.padM, {
|
2594 |
+
instance: THIS,
|
2595 |
+
control: 'pad',
|
2596 |
+
})
|
2597 |
+
|
2598 |
+
// pad cross
|
2599 |
+
p.cross.style.position = 'absolute';
|
2600 |
+
p.cross.style.left =
|
2601 |
+
p.cross.style.top =
|
2602 |
+
'0';
|
2603 |
+
p.cross.style.width =
|
2604 |
+
p.cross.style.height =
|
2605 |
+
crossOuterSize + 'px';
|
2606 |
+
|
2607 |
+
// pad cross border Y and X
|
2608 |
+
p.crossBY.style.position =
|
2609 |
+
p.crossBX.style.position =
|
2610 |
+
'absolute';
|
2611 |
+
p.crossBY.style.background =
|
2612 |
+
p.crossBX.style.background =
|
2613 |
+
THIS.pointerBorderColor;
|
2614 |
+
p.crossBY.style.width =
|
2615 |
+
p.crossBX.style.height =
|
2616 |
+
(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';
|
2617 |
+
p.crossBY.style.height =
|
2618 |
+
p.crossBX.style.width =
|
2619 |
+
crossOuterSize + 'px';
|
2620 |
+
p.crossBY.style.left =
|
2621 |
+
p.crossBX.style.top =
|
2622 |
+
(Math.floor(crossOuterSize / 2) - Math.floor(THIS.pointerThickness / 2) - THIS.pointerBorderWidth) + 'px';
|
2623 |
+
p.crossBY.style.top =
|
2624 |
+
p.crossBX.style.left =
|
2625 |
+
'0';
|
2626 |
+
|
2627 |
+
// pad cross line Y and X
|
2628 |
+
p.crossLY.style.position =
|
2629 |
+
p.crossLX.style.position =
|
2630 |
+
'absolute';
|
2631 |
+
p.crossLY.style.background =
|
2632 |
+
p.crossLX.style.background =
|
2633 |
+
THIS.pointerColor;
|
2634 |
+
p.crossLY.style.height =
|
2635 |
+
p.crossLX.style.width =
|
2636 |
+
(crossOuterSize - 2 * THIS.pointerBorderWidth) + 'px';
|
2637 |
+
p.crossLY.style.width =
|
2638 |
+
p.crossLX.style.height =
|
2639 |
+
THIS.pointerThickness + 'px';
|
2640 |
+
p.crossLY.style.left =
|
2641 |
+
p.crossLX.style.top =
|
2642 |
+
(Math.floor(crossOuterSize / 2) - Math.floor(THIS.pointerThickness / 2)) + 'px';
|
2643 |
+
p.crossLY.style.top =
|
2644 |
+
p.crossLX.style.left =
|
2645 |
+
THIS.pointerBorderWidth + 'px';
|
2646 |
+
|
2647 |
+
|
2648 |
+
// slider
|
2649 |
+
p.sld.style.overflow = 'hidden';
|
2650 |
+
p.sld.style.width = THIS.sliderSize + 'px';
|
2651 |
+
p.sld.style.height = THIS.height + 'px';
|
2652 |
+
|
2653 |
+
// slider gradient
|
2654 |
+
p.sldGrad.draw(THIS.sliderSize, THIS.height, '#000', '#000');
|
2655 |
+
|
2656 |
+
// slider border
|
2657 |
+
p.sldB.style.display = displaySlider ? 'block' : 'none';
|
2658 |
+
p.sldB.style.position = 'absolute';
|
2659 |
+
p.sldB.style.left = (THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + 2 * controlPadding) + 'px';
|
2660 |
+
p.sldB.style.top = THIS.padding + 'px';
|
2661 |
+
p.sldB.style.border = THIS.controlBorderWidth + 'px solid';
|
2662 |
+
p.sldB.style.borderColor = THIS.controlBorderColor;
|
2663 |
+
|
2664 |
+
// slider mouse area
|
2665 |
+
p.sldM.style.display = displaySlider ? 'block' : 'none';
|
2666 |
+
p.sldM.style.position = 'absolute';
|
2667 |
+
p.sldM.style.left = (THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + controlPadding) + 'px';
|
2668 |
+
p.sldM.style.top = 0 + 'px';
|
2669 |
+
p.sldM.style.width = (
|
2670 |
+
(THIS.sliderSize + 2 * controlPadding + 2 * THIS.controlBorderWidth) +
|
2671 |
+
(displayAlphaSlider ? 0 : Math.max(0, THIS.padding - controlPadding)) // remaining padding to the right edge
|
2672 |
+
) + 'px';
|
2673 |
+
p.sldM.style.height = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';
|
2674 |
+
p.sldM.style.cursor = 'default';
|
2675 |
+
jsc.setData(p.sldM, {
|
2676 |
+
instance: THIS,
|
2677 |
+
control: 'sld',
|
2678 |
+
});
|
2679 |
+
|
2680 |
+
// slider pointer inner and outer border
|
2681 |
+
p.sldPtrIB.style.border =
|
2682 |
+
p.sldPtrOB.style.border =
|
2683 |
+
THIS.pointerBorderWidth + 'px solid ' + THIS.pointerBorderColor;
|
2684 |
+
|
2685 |
+
// slider pointer outer border
|
2686 |
+
p.sldPtrOB.style.position = 'absolute';
|
2687 |
+
p.sldPtrOB.style.left = -(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';
|
2688 |
+
p.sldPtrOB.style.top = '0';
|
2689 |
+
|
2690 |
+
// slider pointer middle border
|
2691 |
+
p.sldPtrMB.style.border = THIS.pointerThickness + 'px solid ' + THIS.pointerColor;
|
2692 |
+
|
2693 |
+
// slider pointer spacer
|
2694 |
+
p.sldPtrS.style.width = THIS.sliderSize + 'px';
|
2695 |
+
p.sldPtrS.style.height = jsc.pub.sliderInnerSpace + 'px';
|
2696 |
+
|
2697 |
+
|
2698 |
+
// alpha slider
|
2699 |
+
p.asld.style.overflow = 'hidden';
|
2700 |
+
p.asld.style.width = THIS.sliderSize + 'px';
|
2701 |
+
p.asld.style.height = THIS.height + 'px';
|
2702 |
+
|
2703 |
+
// alpha slider gradient
|
2704 |
+
p.asldGrad.draw(THIS.sliderSize, THIS.height, '#000');
|
2705 |
+
|
2706 |
+
// alpha slider border
|
2707 |
+
p.asldB.style.display = displayAlphaSlider ? 'block' : 'none';
|
2708 |
+
p.asldB.style.position = 'absolute';
|
2709 |
+
p.asldB.style.left = (
|
2710 |
+
(THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + controlPadding) +
|
2711 |
+
(displaySlider ? (THIS.sliderSize + 3 * controlPadding + 2 * THIS.controlBorderWidth) : 0)
|
2712 |
+
) + 'px';
|
2713 |
+
p.asldB.style.top = THIS.padding + 'px';
|
2714 |
+
p.asldB.style.border = THIS.controlBorderWidth + 'px solid';
|
2715 |
+
p.asldB.style.borderColor = THIS.controlBorderColor;
|
2716 |
+
|
2717 |
+
// alpha slider mouse area
|
2718 |
+
p.asldM.style.display = displayAlphaSlider ? 'block' : 'none';
|
2719 |
+
p.asldM.style.position = 'absolute';
|
2720 |
+
p.asldM.style.left = (
|
2721 |
+
(THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + controlPadding) +
|
2722 |
+
(displaySlider ? (THIS.sliderSize + 2 * controlPadding + 2 * THIS.controlBorderWidth) : 0)
|
2723 |
+
) + 'px';
|
2724 |
+
p.asldM.style.top = 0 + 'px';
|
2725 |
+
p.asldM.style.width = (
|
2726 |
+
(THIS.sliderSize + 2 * controlPadding + 2 * THIS.controlBorderWidth) +
|
2727 |
+
Math.max(0, THIS.padding - controlPadding) // remaining padding to the right edge
|
2728 |
+
) + 'px';
|
2729 |
+
p.asldM.style.height = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';
|
2730 |
+
p.asldM.style.cursor = 'default';
|
2731 |
+
jsc.setData(p.asldM, {
|
2732 |
+
instance: THIS,
|
2733 |
+
control: 'asld',
|
2734 |
+
})
|
2735 |
+
|
2736 |
+
// alpha slider pointer inner and outer border
|
2737 |
+
p.asldPtrIB.style.border =
|
2738 |
+
p.asldPtrOB.style.border =
|
2739 |
+
THIS.pointerBorderWidth + 'px solid ' + THIS.pointerBorderColor;
|
2740 |
+
|
2741 |
+
// alpha slider pointer outer border
|
2742 |
+
p.asldPtrOB.style.position = 'absolute';
|
2743 |
+
p.asldPtrOB.style.left = -(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';
|
2744 |
+
p.asldPtrOB.style.top = '0';
|
2745 |
+
|
2746 |
+
// alpha slider pointer middle border
|
2747 |
+
p.asldPtrMB.style.border = THIS.pointerThickness + 'px solid ' + THIS.pointerColor;
|
2748 |
+
|
2749 |
+
// alpha slider pointer spacer
|
2750 |
+
p.asldPtrS.style.width = THIS.sliderSize + 'px';
|
2751 |
+
p.asldPtrS.style.height = jsc.pub.sliderInnerSpace + 'px';
|
2752 |
+
|
2753 |
+
|
2754 |
+
// palette
|
2755 |
+
p.pal.className = 'jscolor-palette';
|
2756 |
+
p.pal.style.display = pickerDims.palette.rows ? 'block' : 'none';
|
2757 |
+
p.pal.style.position = 'absolute';
|
2758 |
+
p.pal.style.left = THIS.padding + 'px';
|
2759 |
+
p.pal.style.top = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';
|
2760 |
+
|
2761 |
+
// palette's color samples
|
2762 |
+
|
2763 |
+
p.pal.innerHTML = '';
|
2764 |
+
|
2765 |
+
var chessboard = jsc.genColorPreviewCanvas('rgba(0,0,0,0)');
|
2766 |
+
|
2767 |
+
var si = 0; // color sample's index
|
2768 |
+
for (var r = 0; r < pickerDims.palette.rows; r++) {
|
2769 |
+
for (var c = 0; c < pickerDims.palette.cols && si < THIS._palette.length; c++, si++) {
|
2770 |
+
var sampleColor = THIS._palette[si];
|
2771 |
+
var sampleCssColor = jsc.rgbaColor.apply(null, sampleColor.rgba);
|
2772 |
+
|
2773 |
+
var sc = jsc.createEl('div'); // color sample's color
|
2774 |
+
sc.style.width = (pickerDims.palette.cellW - 2 * THIS.controlBorderWidth) + 'px';
|
2775 |
+
sc.style.height = (pickerDims.palette.cellH - 2 * THIS.controlBorderWidth) + 'px';
|
2776 |
+
sc.style.backgroundColor = sampleCssColor;
|
2777 |
+
|
2778 |
+
var sw = jsc.createEl('div'); // color sample's wrap
|
2779 |
+
sw.className = 'jscolor-palette-sample';
|
2780 |
+
sw.style.display = 'block';
|
2781 |
+
sw.style.position = 'absolute';
|
2782 |
+
sw.style.left = (
|
2783 |
+
pickerDims.palette.cols <= 1 ? 0 :
|
2784 |
+
Math.round(10 * (c * ((pickerDims.contentW - pickerDims.palette.cellW) / (pickerDims.palette.cols - 1)))) / 10
|
2785 |
+
) + 'px';
|
2786 |
+
sw.style.top = (r * (pickerDims.palette.cellH + THIS.paletteSpacing)) + 'px';
|
2787 |
+
sw.style.border = THIS.controlBorderWidth + 'px solid';
|
2788 |
+
sw.style.borderColor = THIS.controlBorderColor;
|
2789 |
+
sw.style.cursor = 'pointer';
|
2790 |
+
if (sampleColor.rgba[3] !== null && sampleColor.rgba[3] < 1.0) { // only create chessboard background if the sample has transparency
|
2791 |
+
sw.style.backgroundImage = 'url(\'' + chessboard.canvas.toDataURL() + '\')';
|
2792 |
+
sw.style.backgroundRepeat = 'repeat';
|
2793 |
+
sw.style.backgroundPosition = 'center center';
|
2794 |
+
}
|
2795 |
+
jsc.setData(sw, {
|
2796 |
+
instance: THIS,
|
2797 |
+
control: 'palette-sample',
|
2798 |
+
color: sampleColor,
|
2799 |
+
})
|
2800 |
+
sw.addEventListener('click', jsc.onPaletteSampleClick, false);
|
2801 |
+
sw.appendChild(sc);
|
2802 |
+
p.pal.appendChild(sw);
|
2803 |
+
}
|
2804 |
+
}
|
2805 |
+
|
2806 |
+
|
2807 |
+
// the Close button
|
2808 |
+
function setBtnBorder () {
|
2809 |
+
var insetColors = THIS.controlBorderColor.split(/\s+/);
|
2810 |
+
var outsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
|
2811 |
+
p.btn.style.borderColor = outsetColor;
|
2812 |
+
}
|
2813 |
+
var btnPadding = 15; // px
|
2814 |
+
p.btn.className = 'jscolor-btn-close';
|
2815 |
+
p.btn.style.display = THIS.closeButton ? 'block' : 'none';
|
2816 |
+
p.btn.style.position = 'absolute';
|
2817 |
+
p.btn.style.left = THIS.padding + 'px';
|
2818 |
+
p.btn.style.bottom = THIS.padding + 'px';
|
2819 |
+
p.btn.style.padding = '0 ' + btnPadding + 'px';
|
2820 |
+
p.btn.style.maxWidth = (pickerDims.contentW - 2 * THIS.controlBorderWidth - 2 * btnPadding) + 'px';
|
2821 |
+
p.btn.style.overflow = 'hidden';
|
2822 |
+
p.btn.style.height = THIS.buttonHeight + 'px';
|
2823 |
+
p.btn.style.whiteSpace = 'nowrap';
|
2824 |
+
p.btn.style.border = THIS.controlBorderWidth + 'px solid';
|
2825 |
+
setBtnBorder();
|
2826 |
+
p.btn.style.color = THIS.buttonColor;
|
2827 |
+
p.btn.style.font = '12px sans-serif';
|
2828 |
+
p.btn.style.textAlign = 'center';
|
2829 |
+
p.btn.style.cursor = 'pointer';
|
2830 |
+
p.btn.onmousedown = function () {
|
2831 |
+
THIS.hide();
|
2832 |
+
};
|
2833 |
+
p.btnT.style.lineHeight = THIS.buttonHeight + 'px';
|
2834 |
+
p.btnT.innerHTML = '';
|
2835 |
+
p.btnT.appendChild(window.document.createTextNode(THIS.closeText));
|
2836 |
+
|
2837 |
+
// reposition the pointers
|
2838 |
+
redrawPad();
|
2839 |
+
redrawSld();
|
2840 |
+
redrawASld();
|
2841 |
+
|
2842 |
+
// If we are changing the owner without first closing the picker,
|
2843 |
+
// make sure to first deal with the old owner
|
2844 |
+
if (jsc.picker.owner && jsc.picker.owner !== THIS) {
|
2845 |
+
jsc.removeClass(jsc.picker.owner.targetElement, jsc.pub.activeClassName);
|
2846 |
+
}
|
2847 |
+
|
2848 |
+
// Set a new picker owner
|
2849 |
+
jsc.picker.owner = THIS;
|
2850 |
+
|
2851 |
+
// The redrawPosition() method needs picker.owner to be set, that's why we call it here,
|
2852 |
+
// after setting the owner
|
2853 |
+
if (THIS.container === window.document.body) {
|
2854 |
+
jsc.redrawPosition();
|
2855 |
+
} else {
|
2856 |
+
jsc._drawPosition(THIS, 0, 0, 'relative', false);
|
2857 |
+
}
|
2858 |
+
|
2859 |
+
if (p.wrap.parentNode !== THIS.container) {
|
2860 |
+
THIS.container.appendChild(p.wrap);
|
2861 |
+
}
|
2862 |
+
|
2863 |
+
jsc.addClass(THIS.targetElement, jsc.pub.activeClassName);
|
2864 |
+
}
|
2865 |
+
|
2866 |
+
|
2867 |
+
function redrawPad () {
|
2868 |
+
// redraw the pad pointer
|
2869 |
+
var yChannel = jsc.getPadYChannel(THIS);
|
2870 |
+
var x = Math.round((THIS.channels.h / 360) * (THIS.width - 1));
|
2871 |
+
var y = Math.round((1 - THIS.channels[yChannel] / 100) * (THIS.height - 1));
|
2872 |
+
var crossOuterSize = (2 * THIS.pointerBorderWidth + THIS.pointerThickness + 2 * THIS.crossSize);
|
2873 |
+
var ofs = -Math.floor(crossOuterSize / 2);
|
2874 |
+
jsc.picker.cross.style.left = (x + ofs) + 'px';
|
2875 |
+
jsc.picker.cross.style.top = (y + ofs) + 'px';
|
2876 |
+
|
2877 |
+
// redraw the slider
|
2878 |
+
switch (jsc.getSliderChannel(THIS)) {
|
2879 |
+
case 's':
|
2880 |
+
var rgb1 = jsc.HSV_RGB(THIS.channels.h, 100, THIS.channels.v);
|
2881 |
+
var rgb2 = jsc.HSV_RGB(THIS.channels.h, 0, THIS.channels.v);
|
2882 |
+
var color1 = 'rgb(' +
|
2883 |
+
Math.round(rgb1[0]) + ',' +
|
2884 |
+
Math.round(rgb1[1]) + ',' +
|
2885 |
+
Math.round(rgb1[2]) + ')';
|
2886 |
+
var color2 = 'rgb(' +
|
2887 |
+
Math.round(rgb2[0]) + ',' +
|
2888 |
+
Math.round(rgb2[1]) + ',' +
|
2889 |
+
Math.round(rgb2[2]) + ')';
|
2890 |
+
jsc.picker.sldGrad.draw(THIS.sliderSize, THIS.height, color1, color2);
|
2891 |
+
break;
|
2892 |
+
case 'v':
|
2893 |
+
var rgb = jsc.HSV_RGB(THIS.channels.h, THIS.channels.s, 100);
|
2894 |
+
var color1 = 'rgb(' +
|
2895 |
+
Math.round(rgb[0]) + ',' +
|
2896 |
+
Math.round(rgb[1]) + ',' +
|
2897 |
+
Math.round(rgb[2]) + ')';
|
2898 |
+
var color2 = '#000';
|
2899 |
+
jsc.picker.sldGrad.draw(THIS.sliderSize, THIS.height, color1, color2);
|
2900 |
+
break;
|
2901 |
+
}
|
2902 |
+
|
2903 |
+
// redraw the alpha slider
|
2904 |
+
jsc.picker.asldGrad.draw(THIS.sliderSize, THIS.height, THIS.toHEXString());
|
2905 |
+
}
|
2906 |
+
|
2907 |
+
|
2908 |
+
function redrawSld () {
|
2909 |
+
var sldChannel = jsc.getSliderChannel(THIS);
|
2910 |
+
if (sldChannel) {
|
2911 |
+
// redraw the slider pointer
|
2912 |
+
var y = Math.round((1 - THIS.channels[sldChannel] / 100) * (THIS.height - 1));
|
2913 |
+
jsc.picker.sldPtrOB.style.top = (y - (2 * THIS.pointerBorderWidth + THIS.pointerThickness) - Math.floor(jsc.pub.sliderInnerSpace / 2)) + 'px';
|
2914 |
+
}
|
2915 |
+
|
2916 |
+
// redraw the alpha slider
|
2917 |
+
jsc.picker.asldGrad.draw(THIS.sliderSize, THIS.height, THIS.toHEXString());
|
2918 |
+
}
|
2919 |
+
|
2920 |
+
|
2921 |
+
function redrawASld () {
|
2922 |
+
var y = Math.round((1 - THIS.channels.a) * (THIS.height - 1));
|
2923 |
+
jsc.picker.asldPtrOB.style.top = (y - (2 * THIS.pointerBorderWidth + THIS.pointerThickness) - Math.floor(jsc.pub.sliderInnerSpace / 2)) + 'px';
|
2924 |
+
}
|
2925 |
+
|
2926 |
+
|
2927 |
+
function isPickerOwner () {
|
2928 |
+
return jsc.picker && jsc.picker.owner === THIS;
|
2929 |
+
}
|
2930 |
+
|
2931 |
+
|
2932 |
+
function onValueKeyDown (ev) {
|
2933 |
+
if (jsc.eventKey(ev) === 'Enter') {
|
2934 |
+
if (THIS.valueElement) {
|
2935 |
+
THIS.processValueInput(THIS.valueElement.value);
|
2936 |
+
}
|
2937 |
+
THIS.tryHide();
|
2938 |
+
}
|
2939 |
+
}
|
2940 |
+
|
2941 |
+
|
2942 |
+
function onAlphaKeyDown (ev) {
|
2943 |
+
if (jsc.eventKey(ev) === 'Enter') {
|
2944 |
+
if (THIS.alphaElement) {
|
2945 |
+
THIS.processAlphaInput(THIS.alphaElement.value);
|
2946 |
+
}
|
2947 |
+
THIS.tryHide();
|
2948 |
+
}
|
2949 |
+
}
|
2950 |
+
|
2951 |
+
|
2952 |
+
function onValueChange (ev) {
|
2953 |
+
if (jsc.getData(ev, 'internal')) {
|
2954 |
+
return; // skip if the event was internally triggered by jscolor
|
2955 |
+
}
|
2956 |
+
|
2957 |
+
var oldVal = THIS.valueElement.value;
|
2958 |
+
|
2959 |
+
THIS.processValueInput(THIS.valueElement.value); // this might change the value
|
2960 |
+
|
2961 |
+
jsc.triggerCallback(THIS, 'onChange');
|
2962 |
+
|
2963 |
+
if (THIS.valueElement.value !== oldVal) {
|
2964 |
+
// value was additionally changed -> let's trigger the change event again, even though it was natively dispatched
|
2965 |
+
jsc.triggerInputEvent(THIS.valueElement, 'change', true, true);
|
2966 |
+
}
|
2967 |
+
}
|
2968 |
+
|
2969 |
+
|
2970 |
+
function onAlphaChange (ev) {
|
2971 |
+
if (jsc.getData(ev, 'internal')) {
|
2972 |
+
return; // skip if the event was internally triggered by jscolor
|
2973 |
+
}
|
2974 |
+
|
2975 |
+
var oldVal = THIS.alphaElement.value;
|
2976 |
+
|
2977 |
+
THIS.processAlphaInput(THIS.alphaElement.value); // this might change the value
|
2978 |
+
|
2979 |
+
jsc.triggerCallback(THIS, 'onChange');
|
2980 |
+
|
2981 |
+
// triggering valueElement's onChange (because changing alpha changes the entire color, e.g. with rgba format)
|
2982 |
+
jsc.triggerInputEvent(THIS.valueElement, 'change', true, true);
|
2983 |
+
|
2984 |
+
if (THIS.alphaElement.value !== oldVal) {
|
2985 |
+
// value was additionally changed -> let's trigger the change event again, even though it was natively dispatched
|
2986 |
+
jsc.triggerInputEvent(THIS.alphaElement, 'change', true, true);
|
2987 |
+
}
|
2988 |
+
}
|
2989 |
+
|
2990 |
+
|
2991 |
+
function onValueInput (ev) {
|
2992 |
+
if (jsc.getData(ev, 'internal')) {
|
2993 |
+
return; // skip if the event was internally triggered by jscolor
|
2994 |
+
}
|
2995 |
+
|
2996 |
+
if (THIS.valueElement) {
|
2997 |
+
THIS.fromString(THIS.valueElement.value, jsc.flags.leaveValue);
|
2998 |
+
}
|
2999 |
+
|
3000 |
+
jsc.triggerCallback(THIS, 'onInput');
|
3001 |
+
|
3002 |
+
// triggering valueElement's onInput
|
3003 |
+
// (not needed, it was dispatched normally by the browser)
|
3004 |
+
}
|
3005 |
+
|
3006 |
+
|
3007 |
+
function onAlphaInput (ev) {
|
3008 |
+
if (jsc.getData(ev, 'internal')) {
|
3009 |
+
return; // skip if the event was internally triggered by jscolor
|
3010 |
+
}
|
3011 |
+
|
3012 |
+
if (THIS.alphaElement) {
|
3013 |
+
THIS.fromHSVA(null, null, null, parseFloat(THIS.alphaElement.value), jsc.flags.leaveAlpha);
|
3014 |
+
}
|
3015 |
+
|
3016 |
+
jsc.triggerCallback(THIS, 'onInput');
|
3017 |
+
|
3018 |
+
// triggering valueElement's onInput (because changing alpha changes the entire color, e.g. with rgba format)
|
3019 |
+
jsc.triggerInputEvent(THIS.valueElement, 'input', true, true);
|
3020 |
+
}
|
3021 |
+
|
3022 |
+
|
3023 |
+
// let's process the DEPRECATED 'options' property (this will be later removed)
|
3024 |
+
if (jsc.pub.options) {
|
3025 |
+
// let's set custom default options, if specified
|
3026 |
+
for (var opt in jsc.pub.options) {
|
3027 |
+
if (jsc.pub.options.hasOwnProperty(opt)) {
|
3028 |
+
try {
|
3029 |
+
setOption(opt, jsc.pub.options[opt]);
|
3030 |
+
} catch (e) {
|
3031 |
+
console.warn(e);
|
3032 |
+
}
|
3033 |
+
}
|
3034 |
+
}
|
3035 |
+
}
|
3036 |
+
|
3037 |
+
|
3038 |
+
// let's apply configuration presets
|
3039 |
+
//
|
3040 |
+
var presetsArr = [];
|
3041 |
+
|
3042 |
+
if (opts.preset) {
|
3043 |
+
if (typeof opts.preset === 'string') {
|
3044 |
+
presetsArr = opts.preset.split(/\s+/);
|
3045 |
+
} else if (Array.isArray(opts.preset)) {
|
3046 |
+
presetsArr = opts.preset.slice(); // slice() to clone
|
3047 |
+
} else {
|
3048 |
+
console.warn('Unrecognized preset value');
|
3049 |
+
}
|
3050 |
+
}
|
3051 |
+
|
3052 |
+
// always use the 'default' preset. If it's not listed, append it to the end.
|
3053 |
+
if (presetsArr.indexOf('default') === -1) {
|
3054 |
+
presetsArr.push('default');
|
3055 |
+
}
|
3056 |
+
|
3057 |
+
// let's apply the presets in reverse order, so that should there be any overlapping options,
|
3058 |
+
// the formerly listed preset will override the latter
|
3059 |
+
for (var i = presetsArr.length - 1; i >= 0; i -= 1) {
|
3060 |
+
var pres = presetsArr[i];
|
3061 |
+
if (!pres) {
|
3062 |
+
continue; // preset is empty string
|
3063 |
+
}
|
3064 |
+
if (!jsc.pub.presets.hasOwnProperty(pres)) {
|
3065 |
+
console.warn('Unknown preset: %s', pres);
|
3066 |
+
continue;
|
3067 |
+
}
|
3068 |
+
for (var opt in jsc.pub.presets[pres]) {
|
3069 |
+
if (jsc.pub.presets[pres].hasOwnProperty(opt)) {
|
3070 |
+
try {
|
3071 |
+
setOption(opt, jsc.pub.presets[pres][opt]);
|
3072 |
+
} catch (e) {
|
3073 |
+
console.warn(e);
|
3074 |
+
}
|
3075 |
+
}
|
3076 |
+
}
|
3077 |
+
}
|
3078 |
+
|
3079 |
+
|
3080 |
+
// let's set specific options for this color picker
|
3081 |
+
var nonProperties = [
|
3082 |
+
// these options won't be set as instance properties
|
3083 |
+
'preset',
|
3084 |
+
];
|
3085 |
+
for (var opt in opts) {
|
3086 |
+
if (opts.hasOwnProperty(opt)) {
|
3087 |
+
if (nonProperties.indexOf(opt) === -1) {
|
3088 |
+
try {
|
3089 |
+
setOption(opt, opts[opt]);
|
3090 |
+
} catch (e) {
|
3091 |
+
console.warn(e);
|
3092 |
+
}
|
3093 |
+
}
|
3094 |
+
}
|
3095 |
+
}
|
3096 |
+
|
3097 |
+
|
3098 |
+
//
|
3099 |
+
// Install the color picker on chosen element(s)
|
3100 |
+
//
|
3101 |
+
|
3102 |
+
|
3103 |
+
// Determine picker's container element
|
3104 |
+
if (this.container === undefined) {
|
3105 |
+
this.container = window.document.body; // default container is BODY element
|
3106 |
+
|
3107 |
+
} else { // explicitly set to custom element
|
3108 |
+
this.container = jsc.node(this.container);
|
3109 |
+
}
|
3110 |
+
|
3111 |
+
if (!this.container) {
|
3112 |
+
throw new Error('Cannot instantiate color picker without a container element');
|
3113 |
+
}
|
3114 |
+
|
3115 |
+
|
3116 |
+
// Fetch the target element
|
3117 |
+
this.targetElement = jsc.node(targetElement);
|
3118 |
+
|
3119 |
+
if (!this.targetElement) {
|
3120 |
+
// temporarily customized error message to help with migrating from versions prior to 2.2
|
3121 |
+
if (typeof targetElement === 'string' && /^[a-zA-Z][\w:.-]*$/.test(targetElement)) {
|
3122 |
+
// targetElement looks like valid ID
|
3123 |
+
var possiblyId = targetElement;
|
3124 |
+
throw new Error('If \'' + possiblyId + '\' is supposed to be an ID, please use \'#' + possiblyId + '\' or any valid CSS selector.');
|
3125 |
+
}
|
3126 |
+
|
3127 |
+
throw new Error('Cannot instantiate color picker without a target element');
|
3128 |
+
}
|
3129 |
+
|
3130 |
+
if (this.targetElement.jscolor && this.targetElement.jscolor instanceof jsc.pub) {
|
3131 |
+
throw new Error('Color picker already installed on this element');
|
3132 |
+
}
|
3133 |
+
|
3134 |
+
|
3135 |
+
// link this instance with the target element
|
3136 |
+
this.targetElement.jscolor = this;
|
3137 |
+
jsc.addClass(this.targetElement, jsc.pub.className);
|
3138 |
+
|
3139 |
+
// register this instance
|
3140 |
+
jsc.instances.push(this);
|
3141 |
+
|
3142 |
+
|
3143 |
+
// if target is BUTTON
|
3144 |
+
if (jsc.isButton(this.targetElement)) {
|
3145 |
+
|
3146 |
+
if (this.targetElement.type.toLowerCase() !== 'button') {
|
3147 |
+
// on buttons, always force type to be 'button', e.g. in situations the target <button> has no type
|
3148 |
+
// and thus defaults to 'submit' and would submit the form when clicked
|
3149 |
+
this.targetElement.type = 'button';
|
3150 |
+
}
|
3151 |
+
|
3152 |
+
if (jsc.isButtonEmpty(this.targetElement)) { // empty button
|
3153 |
+
// it is important to clear element's contents first.
|
3154 |
+
// if we're re-instantiating color pickers on DOM that has been modified by changing page's innerHTML,
|
3155 |
+
// we would keep adding more non-breaking spaces to element's content (because element's contents survive
|
3156 |
+
// innerHTML changes, but picker instances don't)
|
3157 |
+
jsc.removeChildren(this.targetElement);
|
3158 |
+
|
3159 |
+
// let's insert a non-breaking space
|
3160 |
+
this.targetElement.appendChild(window.document.createTextNode('\xa0'));
|
3161 |
+
|
3162 |
+
// set min-width = previewSize, if not already greater
|
3163 |
+
var compStyle = jsc.getCompStyle(this.targetElement);
|
3164 |
+
var currMinWidth = parseFloat(compStyle['min-width']) || 0;
|
3165 |
+
if (currMinWidth < this.previewSize) {
|
3166 |
+
jsc.setStyle(this.targetElement, {
|
3167 |
+
'min-width': this.previewSize + 'px',
|
3168 |
+
}, this.forceStyle);
|
3169 |
+
}
|
3170 |
+
}
|
3171 |
+
}
|
3172 |
+
|
3173 |
+
// Determine the value element
|
3174 |
+
if (this.valueElement === undefined) {
|
3175 |
+
if (jsc.isTextInput(this.targetElement)) {
|
3176 |
+
// for text inputs, default valueElement is targetElement
|
3177 |
+
this.valueElement = this.targetElement;
|
3178 |
+
} else {
|
3179 |
+
// leave it undefined
|
3180 |
+
}
|
3181 |
+
|
3182 |
+
} else if (this.valueElement === null) { // explicitly set to null
|
3183 |
+
// leave it null
|
3184 |
+
|
3185 |
+
} else { // explicitly set to custom element
|
3186 |
+
this.valueElement = jsc.node(this.valueElement);
|
3187 |
+
}
|
3188 |
+
|
3189 |
+
// Determine the alpha element
|
3190 |
+
if (this.alphaElement) {
|
3191 |
+
this.alphaElement = jsc.node(this.alphaElement);
|
3192 |
+
}
|
3193 |
+
|
3194 |
+
// Determine the preview element
|
3195 |
+
if (this.previewElement === undefined) {
|
3196 |
+
this.previewElement = this.targetElement; // default previewElement is targetElement
|
3197 |
+
|
3198 |
+
} else if (this.previewElement === null) { // explicitly set to null
|
3199 |
+
// leave it null
|
3200 |
+
|
3201 |
+
} else { // explicitly set to custom element
|
3202 |
+
this.previewElement = jsc.node(this.previewElement);
|
3203 |
+
}
|
3204 |
+
|
3205 |
+
// valueElement
|
3206 |
+
if (this.valueElement && jsc.isTextInput(this.valueElement)) {
|
3207 |
+
|
3208 |
+
// If the value element has onInput event already set, we need to detach it and attach AFTER our listener.
|
3209 |
+
// otherwise the picker instance would still contain the old color when accessed from the onInput handler.
|
3210 |
+
var valueElementOrigEvents = {
|
3211 |
+
onInput: this.valueElement.oninput
|
3212 |
+
};
|
3213 |
+
this.valueElement.oninput = null;
|
3214 |
+
|
3215 |
+
this.valueElement.addEventListener('keydown', onValueKeyDown, false);
|
3216 |
+
this.valueElement.addEventListener('change', onValueChange, false);
|
3217 |
+
this.valueElement.addEventListener('input', onValueInput, false);
|
3218 |
+
// the original event listener must be attached AFTER our handler (to let it first set picker's color)
|
3219 |
+
if (valueElementOrigEvents.onInput) {
|
3220 |
+
this.valueElement.addEventListener('input', valueElementOrigEvents.onInput, false);
|
3221 |
+
}
|
3222 |
+
|
3223 |
+
this.valueElement.setAttribute('autocomplete', 'off');
|
3224 |
+
this.valueElement.setAttribute('autocorrect', 'off');
|
3225 |
+
this.valueElement.setAttribute('autocapitalize', 'off');
|
3226 |
+
this.valueElement.setAttribute('spellcheck', false);
|
3227 |
+
}
|
3228 |
+
|
3229 |
+
// alphaElement
|
3230 |
+
if (this.alphaElement && jsc.isTextInput(this.alphaElement)) {
|
3231 |
+
this.alphaElement.addEventListener('keydown', onAlphaKeyDown, false);
|
3232 |
+
this.alphaElement.addEventListener('change', onAlphaChange, false);
|
3233 |
+
this.alphaElement.addEventListener('input', onAlphaInput, false);
|
3234 |
+
|
3235 |
+
this.alphaElement.setAttribute('autocomplete', 'off');
|
3236 |
+
this.alphaElement.setAttribute('autocorrect', 'off');
|
3237 |
+
this.alphaElement.setAttribute('autocapitalize', 'off');
|
3238 |
+
this.alphaElement.setAttribute('spellcheck', false);
|
3239 |
+
}
|
3240 |
+
|
3241 |
+
// determine initial color value
|
3242 |
+
//
|
3243 |
+
var initValue = 'FFFFFF';
|
3244 |
+
|
3245 |
+
if (this.value !== undefined) {
|
3246 |
+
initValue = this.value; // get initial color from the 'value' property
|
3247 |
+
} else if (this.valueElement && this.valueElement.value !== undefined) {
|
3248 |
+
initValue = this.valueElement.value; // get initial color from valueElement's value
|
3249 |
+
}
|
3250 |
+
|
3251 |
+
// determine initial alpha value
|
3252 |
+
//
|
3253 |
+
var initAlpha = undefined;
|
3254 |
+
|
3255 |
+
if (this.alpha !== undefined) {
|
3256 |
+
initAlpha = (''+this.alpha); // get initial alpha value from the 'alpha' property
|
3257 |
+
} else if (this.alphaElement && this.alphaElement.value !== undefined) {
|
3258 |
+
initAlpha = this.alphaElement.value; // get initial color from alphaElement's value
|
3259 |
+
}
|
3260 |
+
|
3261 |
+
// determine current format based on the initial color value
|
3262 |
+
//
|
3263 |
+
this._currentFormat = null;
|
3264 |
+
|
3265 |
+
if (['auto', 'any'].indexOf(this.format.toLowerCase()) > -1) {
|
3266 |
+
// format is 'auto' or 'any' -> let's auto-detect current format
|
3267 |
+
var color = jsc.parseColorString(initValue);
|
3268 |
+
this._currentFormat = color ? color.format : 'hex';
|
3269 |
+
} else {
|
3270 |
+
// format is specified
|
3271 |
+
this._currentFormat = this.format.toLowerCase();
|
3272 |
+
}
|
3273 |
+
|
3274 |
+
|
3275 |
+
// let's parse the initial color value and expose color's preview
|
3276 |
+
this.processValueInput(initValue);
|
3277 |
+
|
3278 |
+
// let's also parse and expose the initial alpha value, if any
|
3279 |
+
//
|
3280 |
+
// Note: If the initial color value contains alpha value in it (e.g. in rgba format),
|
3281 |
+
// this will overwrite it. So we should only process alpha input if there was any initial
|
3282 |
+
// alpha explicitly set, otherwise we could needlessly lose initial value's alpha
|
3283 |
+
if (initAlpha !== undefined) {
|
3284 |
+
this.processAlphaInput(initAlpha);
|
3285 |
+
}
|
3286 |
+
|
3287 |
+
}
|
3288 |
+
|
3289 |
+
};
|
3290 |
+
|
3291 |
+
|
3292 |
+
//================================
|
3293 |
+
// Public properties and methods
|
3294 |
+
//================================
|
3295 |
+
|
3296 |
+
//
|
3297 |
+
// These will be publicly available via jscolor.<name> and JSColor.<name>
|
3298 |
+
//
|
3299 |
+
|
3300 |
+
|
3301 |
+
// class that will be set to elements having jscolor installed on them
|
3302 |
+
jsc.pub.className = 'jscolor';
|
3303 |
+
|
3304 |
+
|
3305 |
+
// class that will be set to elements having jscolor active on them
|
3306 |
+
jsc.pub.activeClassName = 'jscolor-active';
|
3307 |
+
|
3308 |
+
|
3309 |
+
// whether to try to parse the options string by evaluating it using 'new Function()'
|
3310 |
+
// in case it could not be parsed with JSON.parse()
|
3311 |
+
jsc.pub.looseJSON = true;
|
3312 |
+
|
3313 |
+
|
3314 |
+
// presets
|
3315 |
+
jsc.pub.presets = {};
|
3316 |
+
|
3317 |
+
// built-in presets
|
3318 |
+
jsc.pub.presets['default'] = {}; // baseline for customization
|
3319 |
+
|
3320 |
+
jsc.pub.presets['light'] = { // default color scheme
|
3321 |
+
backgroundColor: 'rgba(255,255,255,1)',
|
3322 |
+
controlBorderColor: 'rgba(187,187,187,1)',
|
3323 |
+
buttonColor: 'rgba(0,0,0,1)',
|
3324 |
+
};
|
3325 |
+
jsc.pub.presets['dark'] = {
|
3326 |
+
backgroundColor: 'rgba(51,51,51,1)',
|
3327 |
+
controlBorderColor: 'rgba(153,153,153,1)',
|
3328 |
+
buttonColor: 'rgba(240,240,240,1)',
|
3329 |
+
};
|
3330 |
+
|
3331 |
+
jsc.pub.presets['small'] = { width:101, height:101, padding:10, sliderSize:14, paletteCols:8 };
|
3332 |
+
jsc.pub.presets['medium'] = { width:181, height:101, padding:12, sliderSize:16, paletteCols:10 }; // default size
|
3333 |
+
jsc.pub.presets['large'] = { width:271, height:151, padding:12, sliderSize:24, paletteCols:15 };
|
3334 |
+
|
3335 |
+
jsc.pub.presets['thin'] = { borderWidth:1, controlBorderWidth:1, pointerBorderWidth:1 }; // default thickness
|
3336 |
+
jsc.pub.presets['thick'] = { borderWidth:2, controlBorderWidth:2, pointerBorderWidth:2 };
|
3337 |
+
|
3338 |
+
|
3339 |
+
// size of space in the sliders
|
3340 |
+
jsc.pub.sliderInnerSpace = 3; // px
|
3341 |
+
|
3342 |
+
// transparency chessboard
|
3343 |
+
jsc.pub.chessboardSize = 8; // px
|
3344 |
+
jsc.pub.chessboardColor1 = '#666666';
|
3345 |
+
jsc.pub.chessboardColor2 = '#999999';
|
3346 |
+
|
3347 |
+
// preview separator
|
3348 |
+
jsc.pub.previewSeparator = ['rgba(255,255,255,.65)', 'rgba(128,128,128,.65)'];
|
3349 |
+
|
3350 |
+
|
3351 |
+
// Initializes jscolor
|
3352 |
+
jsc.pub.init = function () {
|
3353 |
+
if (jsc.initialized) {
|
3354 |
+
return;
|
3355 |
+
}
|
3356 |
+
|
3357 |
+
// attach some necessary handlers
|
3358 |
+
window.document.addEventListener('mousedown', jsc.onDocumentMouseDown, false);
|
3359 |
+
window.document.addEventListener('keyup', jsc.onDocumentKeyUp, false);
|
3360 |
+
window.addEventListener('resize', jsc.onWindowResize, false);
|
3361 |
+
window.addEventListener('scroll', jsc.onWindowScroll, false);
|
3362 |
+
|
3363 |
+
// install jscolor on current DOM
|
3364 |
+
jsc.pub.install();
|
3365 |
+
|
3366 |
+
jsc.initialized = true;
|
3367 |
+
|
3368 |
+
// call functions waiting in the queue
|
3369 |
+
while (jsc.readyQueue.length) {
|
3370 |
+
var func = jsc.readyQueue.shift();
|
3371 |
+
func();
|
3372 |
+
}
|
3373 |
+
};
|
3374 |
+
|
3375 |
+
|
3376 |
+
// Installs jscolor on current DOM tree
|
3377 |
+
jsc.pub.install = function (rootNode) {
|
3378 |
+
var success = true;
|
3379 |
+
|
3380 |
+
try {
|
3381 |
+
jsc.installBySelector('[data-jscolor]', rootNode);
|
3382 |
+
} catch (e) {
|
3383 |
+
success = false;
|
3384 |
+
console.warn(e);
|
3385 |
+
}
|
3386 |
+
|
3387 |
+
// for backward compatibility with DEPRECATED installation using class name
|
3388 |
+
if (jsc.pub.lookupClass) {
|
3389 |
+
try {
|
3390 |
+
jsc.installBySelector(
|
3391 |
+
(
|
3392 |
+
'input.' + jsc.pub.lookupClass + ', ' +
|
3393 |
+
'button.' + jsc.pub.lookupClass
|
3394 |
+
),
|
3395 |
+
rootNode
|
3396 |
+
);
|
3397 |
+
} catch (e) {}
|
3398 |
+
}
|
3399 |
+
|
3400 |
+
return success;
|
3401 |
+
};
|
3402 |
+
|
3403 |
+
|
3404 |
+
// Registers function to be called as soon as jscolor is initialized (or immediately, if it already is).
|
3405 |
+
//
|
3406 |
+
jsc.pub.ready = function (func) {
|
3407 |
+
if (typeof func !== 'function') {
|
3408 |
+
console.warn('Passed value is not a function');
|
3409 |
+
return false;
|
3410 |
+
}
|
3411 |
+
|
3412 |
+
if (jsc.initialized) {
|
3413 |
+
func();
|
3414 |
+
} else {
|
3415 |
+
jsc.readyQueue.push(func);
|
3416 |
+
}
|
3417 |
+
return true;
|
3418 |
+
};
|
3419 |
+
|
3420 |
+
|
3421 |
+
// Triggers given input event(s) (e.g. 'input' or 'change') on all color pickers.
|
3422 |
+
//
|
3423 |
+
// It is possible to specify multiple events separated with a space.
|
3424 |
+
// If called before jscolor is initialized, then the events will be triggered after initialization.
|
3425 |
+
//
|
3426 |
+
jsc.pub.trigger = function (eventNames) {
|
3427 |
+
var triggerNow = function () {
|
3428 |
+
jsc.triggerGlobal(eventNames);
|
3429 |
+
};
|
3430 |
+
|
3431 |
+
if (jsc.initialized) {
|
3432 |
+
triggerNow();
|
3433 |
+
} else {
|
3434 |
+
jsc.pub.ready(triggerNow);
|
3435 |
+
}
|
3436 |
+
};
|
3437 |
+
|
3438 |
+
|
3439 |
+
// Hides current color picker box
|
3440 |
+
jsc.pub.hide = function () {
|
3441 |
+
if (jsc.picker && jsc.picker.owner) {
|
3442 |
+
jsc.picker.owner.hide();
|
3443 |
+
}
|
3444 |
+
};
|
3445 |
+
|
3446 |
+
|
3447 |
+
// Returns a data URL of a gray chessboard image that indicates transparency
|
3448 |
+
jsc.pub.chessboard = function (color) {
|
3449 |
+
if (!color) {
|
3450 |
+
color = 'rgba(0,0,0,0)';
|
3451 |
+
}
|
3452 |
+
var preview = jsc.genColorPreviewCanvas(color);
|
3453 |
+
return preview.canvas.toDataURL();
|
3454 |
+
};
|
3455 |
+
|
3456 |
+
|
3457 |
+
// Returns a data URL of a gray chessboard image that indicates transparency
|
3458 |
+
jsc.pub.background = function (color) {
|
3459 |
+
var backgrounds = [];
|
3460 |
+
|
3461 |
+
// CSS gradient for background color preview
|
3462 |
+
backgrounds.push(jsc.genColorPreviewGradient(color));
|
3463 |
+
|
3464 |
+
// data URL of generated PNG image with a gray transparency chessboard
|
3465 |
+
var preview = jsc.genColorPreviewCanvas();
|
3466 |
+
backgrounds.push([
|
3467 |
+
'url(\'' + preview.canvas.toDataURL() + '\')',
|
3468 |
+
'left top',
|
3469 |
+
'repeat',
|
3470 |
+
].join(' '));
|
3471 |
+
|
3472 |
+
return backgrounds.join(', ');
|
3473 |
+
};
|
3474 |
+
|
3475 |
+
|
3476 |
+
//
|
3477 |
+
// DEPRECATED properties and methods
|
3478 |
+
//
|
3479 |
+
|
3480 |
+
|
3481 |
+
// DEPRECATED. Use jscolor.presets.default instead.
|
3482 |
+
//
|
3483 |
+
// Custom default options for all color pickers, e.g. { hash: true, width: 300 }
|
3484 |
+
jsc.pub.options = {};
|
3485 |
+
|
3486 |
+
|
3487 |
+
// DEPRECATED. Use data-jscolor attribute instead, which installs jscolor on given element.
|
3488 |
+
//
|
3489 |
+
// By default, we'll search for all elements with class="jscolor" and install a color picker on them.
|
3490 |
+
//
|
3491 |
+
// You can change what class name will be looked for by setting the property jscolor.lookupClass
|
3492 |
+
// anywhere in your HTML document. To completely disable the automatic lookup, set it to null.
|
3493 |
+
//
|
3494 |
+
jsc.pub.lookupClass = 'jscolor';
|
3495 |
+
|
3496 |
+
|
3497 |
+
// DEPRECATED. Use data-jscolor attribute instead, which installs jscolor on given element.
|
3498 |
+
//
|
3499 |
+
// Install jscolor on all elements that have the specified class name
|
3500 |
+
jsc.pub.installByClassName = function () {
|
3501 |
+
console.error('jscolor.installByClassName() is DEPRECATED. Use data-jscolor="" attribute instead of a class name.' + jsc.docsRef);
|
3502 |
+
return false;
|
3503 |
+
};
|
3504 |
+
|
3505 |
+
|
3506 |
+
jsc.register();
|
3507 |
+
|
3508 |
+
|
3509 |
+
return jsc.pub;
|
3510 |
+
|
3511 |
+
|
3512 |
+
})(); // END jscolor
|
3513 |
+
|
3514 |
+
|
3515 |
+
if (typeof window.jscolor === 'undefined') {
|
3516 |
+
window.jscolor = window.JSColor = jscolor;
|
3517 |
+
}
|
3518 |
+
|
3519 |
+
|
3520 |
+
// END jscolor code
|
3521 |
+
|
3522 |
+
return jscolor;
|
3523 |
+
|
3524 |
+
}); // END factory
|
js/jquery.mCustomScrollbar.concat.min.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
/*mousewheel*/
|
2 |
-
(function(a){function
|
3 |
-
/*custom scrollbar*/
|
4 |
-
(function(c){var b={init:function(e){var f={set_width:false,set_height:false,horizontalScroll:false,scrollInertia:950,mouseWheel:true,mouseWheelPixels:"auto",autoDraggerLength:true,autoHideScrollbar:false,snapAmount:null,snapOffset:0,scrollButtons:{enable:false,scrollType:"continuous",scrollSpeed:"auto",scrollAmount:40},advanced:{updateOnBrowserResize:true,updateOnContentResize:false,autoExpandHorizontalScroll:false,autoScrollOnFocus:true,normalizeMouseWheelDelta:false},contentTouchScroll:true,callbacks:{onScrollStart:function(){},onScroll:function(){},onTotalScroll:function(){},onTotalScrollBack:function(){},onTotalScrollOffset:0,onTotalScrollBackOffset:0,whileScrolling:function(){}},theme:"light"},e=c.extend(true,f,e);return this.each(function(){var m=c(this);if(e.set_width){m.css("width",e.set_width)}if(e.set_height){m.css("height",e.set_height)}if(!c(document).data("mCustomScrollbar-index")){c(document).data("mCustomScrollbar-index","1")}else{var t=parseInt(c(document).data("mCustomScrollbar-index"));c(document).data("mCustomScrollbar-index",t+1)}m.wrapInner("<div class='mCustomScrollBox mCS-"+e.theme+"' id='mCSB_"+c(document).data("mCustomScrollbar-index")+"' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_"+c(document).data("mCustomScrollbar-index"));var g=m.children(".mCustomScrollBox");if(e.horizontalScroll){g.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />");var k=g.children(".mCSB_h_wrapper");k.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({width:k.children().outerWidth(),position:"relative"}).unwrap()}else{g.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />")}var o=g.children(".mCSB_container");if(c.support.touch){o.addClass("mCS_touch")}o.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'></div></div><div class='mCSB_draggerRail'></div></div></div>");var l=g.children(".mCSB_scrollTools"),h=l.children(".mCSB_draggerContainer"),q=h.children(".mCSB_dragger");if(e.horizontalScroll){q.data("minDraggerWidth",q.width())}else{q.data("minDraggerHeight",q.height())}if(e.scrollButtons.enable){if(e.horizontalScroll){l.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'></a>")}else{l.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'></a>")}}g.bind("scroll",function(){if(!m.is(".mCS_disabled")){g.scrollTop(0).scrollLeft(0)}});m.data({mCS_Init:true,mCustomScrollbarIndex:c(document).data("mCustomScrollbar-index"),horizontalScroll:e.horizontalScroll,scrollInertia:e.scrollInertia,scrollEasing:"mcsEaseOut",mouseWheel:e.mouseWheel,mouseWheelPixels:e.mouseWheelPixels,autoDraggerLength:e.autoDraggerLength,autoHideScrollbar:e.autoHideScrollbar,snapAmount:e.snapAmount,snapOffset:e.snapOffset,scrollButtons_enable:e.scrollButtons.enable,scrollButtons_scrollType:e.scrollButtons.scrollType,scrollButtons_scrollSpeed:e.scrollButtons.scrollSpeed,scrollButtons_scrollAmount:e.scrollButtons.scrollAmount,autoExpandHorizontalScroll:e.advanced.autoExpandHorizontalScroll,autoScrollOnFocus:e.advanced.autoScrollOnFocus,normalizeMouseWheelDelta:e.advanced.normalizeMouseWheelDelta,contentTouchScroll:e.contentTouchScroll,onScrollStart_Callback:e.callbacks.onScrollStart,onScroll_Callback:e.callbacks.onScroll,onTotalScroll_Callback:e.callbacks.onTotalScroll,onTotalScrollBack_Callback:e.callbacks.onTotalScrollBack,onTotalScroll_Offset:e.callbacks.onTotalScrollOffset,onTotalScrollBack_Offset:e.callbacks.onTotalScrollBackOffset,whileScrolling_Callback:e.callbacks.whileScrolling,bindEvent_scrollbar_drag:false,bindEvent_content_touch:false,bindEvent_scrollbar_click:false,bindEvent_mousewheel:false,bindEvent_buttonsContinuous_y:false,bindEvent_buttonsContinuous_x:false,bindEvent_buttonsPixels_y:false,bindEvent_buttonsPixels_x:false,bindEvent_focusin:false,bindEvent_autoHideScrollbar:false,mCSB_buttonScrollRight:false,mCSB_buttonScrollLeft:false,mCSB_buttonScrollDown:false,mCSB_buttonScrollUp:false});if(e.horizontalScroll){if(m.css("max-width")!=="none"){if(!e.advanced.updateOnContentResize){e.advanced.updateOnContentResize=true}}}else{if(m.css("max-height")!=="none"){var s=false,r=parseInt(m.css("max-height"));if(m.css("max-height").indexOf("%")>=0){s=r,r=m.parent().height()*s/100}m.css("overflow","hidden");g.css("max-height",r)}}m.mCustomScrollbar("update");if(e.advanced.updateOnBrowserResize){var i,j=c(window).width(),u=c(window).height();c(window).bind("resize."+m.data("mCustomScrollbarIndex"),function(){if(i){clearTimeout(i)}i=setTimeout(function(){if(!m.is(".mCS_disabled")&&!m.is(".mCS_destroyed")){var w=c(window).width(),v=c(window).height();if(j!==w||u!==v){if(m.css("max-height")!=="none"&&s){g.css("max-height",m.parent().height()*s/100)}m.mCustomScrollbar("update");j=w;u=v}}},150)})}if(e.advanced.updateOnContentResize){var p;if(e.horizontalScroll){var n=o.outerWidth()}else{var n=o.outerHeight()}p=setInterval(function(){if(e.horizontalScroll){if(e.advanced.autoExpandHorizontalScroll){o.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:o.outerWidth(),position:"relative"}).unwrap()}var v=o.outerWidth()}else{var v=o.outerHeight()}if(v!=n){m.mCustomScrollbar("update");n=v}},300)}})},update:function(){var n=c(this),k=n.children(".mCustomScrollBox"),q=k.children(".mCSB_container");q.removeClass("mCS_no_scrollbar");n.removeClass("mCS_disabled mCS_destroyed");k.scrollTop(0).scrollLeft(0);var y=k.children(".mCSB_scrollTools"),o=y.children(".mCSB_draggerContainer"),m=o.children(".mCSB_dragger");if(n.data("horizontalScroll")){var A=y.children(".mCSB_buttonLeft"),t=y.children(".mCSB_buttonRight"),f=k.width();if(n.data("autoExpandHorizontalScroll")){q.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:q.outerWidth(),position:"relative"}).unwrap()}var z=q.outerWidth()}else{var w=y.children(".mCSB_buttonUp"),g=y.children(".mCSB_buttonDown"),r=k.height(),i=q.outerHeight()}if(i>r&&!n.data("horizontalScroll")){y.css("display","block");var s=o.height();if(n.data("autoDraggerLength")){var u=Math.round(r/i*s),l=m.data("minDraggerHeight");if(u<=l){m.css({height:l})}else{if(u>=s-10){var p=s-10;m.css({height:p})}else{m.css({height:u})}}m.children(".mCSB_dragger_bar").css({"line-height":m.height()+"px"})}var B=m.height(),x=(i-r)/(s-B);n.data("scrollAmount",x).mCustomScrollbar("scrolling",k,q,o,m,w,g,A,t);var D=Math.abs(q.position().top);n.mCustomScrollbar("scrollTo",D,{scrollInertia:0,trigger:"internal"})}else{if(z>f&&n.data("horizontalScroll")){y.css("display","block");var h=o.width();if(n.data("autoDraggerLength")){var j=Math.round(f/z*h),C=m.data("minDraggerWidth");if(j<=C){m.css({width:C})}else{if(j>=h-10){var e=h-10;m.css({width:e})}else{m.css({width:j})}}}var v=m.width(),x=(z-f)/(h-v);n.data("scrollAmount",x).mCustomScrollbar("scrolling",k,q,o,m,w,g,A,t);var D=Math.abs(q.position().left);n.mCustomScrollbar("scrollTo",D,{scrollInertia:0,trigger:"internal"})}else{k.unbind("mousewheel focusin");if(n.data("horizontalScroll")){m.add(q).css("left",0)}else{m.add(q).css("top",0)}y.css("display","none");q.addClass("mCS_no_scrollbar");n.data({bindEvent_mousewheel:false,bindEvent_focusin:false})}}},scrolling:function(h,p,m,j,w,e,A,v){var k=c(this);if(!k.data("bindEvent_scrollbar_drag")){var n,o;if(c.support.msPointer){j.bind("MSPointerDown",function(H){H.preventDefault();k.data({on_drag:true});j.addClass("mCSB_dragger_onDrag");var G=c(this),J=G.offset(),F=H.originalEvent.pageX-J.left,I=H.originalEvent.pageY-J.top;if(F<G.width()&&F>0&&I<G.height()&&I>0){n=I;o=F}});c(document).bind("MSPointerMove."+k.data("mCustomScrollbarIndex"),function(H){H.preventDefault();if(k.data("on_drag")){var G=j,J=G.offset(),F=H.originalEvent.pageX-J.left,I=H.originalEvent.pageY-J.top;D(n,o,I,F)}}).bind("MSPointerUp."+k.data("mCustomScrollbarIndex"),function(x){k.data({on_drag:false});j.removeClass("mCSB_dragger_onDrag")})}else{j.bind("mousedown touchstart",function(H){H.preventDefault();H.stopImmediatePropagation();var G=c(this),K=G.offset(),F,J;if(H.type==="touchstart"){var I=H.originalEvent.touches[0]||H.originalEvent.changedTouches[0];F=I.pageX-K.left;J=I.pageY-K.top}else{k.data({on_drag:true});j.addClass("mCSB_dragger_onDrag");F=H.pageX-K.left;J=H.pageY-K.top}if(F<G.width()&&F>0&&J<G.height()&&J>0){n=J;o=F}}).bind("touchmove",function(H){H.preventDefault();H.stopImmediatePropagation();var K=H.originalEvent.touches[0]||H.originalEvent.changedTouches[0],G=c(this),J=G.offset(),F=K.pageX-J.left,I=K.pageY-J.top;D(n,o,I,F)});c(document).bind("mousemove."+k.data("mCustomScrollbarIndex"),function(H){if(k.data("on_drag")){var G=j,J=G.offset(),F=H.pageX-J.left,I=H.pageY-J.top;D(n,o,I,F)}}).bind("mouseup."+k.data("mCustomScrollbarIndex"),function(x){k.data({on_drag:false});j.removeClass("mCSB_dragger_onDrag")})}k.data({bindEvent_scrollbar_drag:true})}function D(G,H,I,F){if(k.data("horizontalScroll")){k.mCustomScrollbar("scrollTo",(j.position().left-(H))+F,{moveDragger:true,trigger:"internal"})}else{k.mCustomScrollbar("scrollTo",(j.position().top-(G))+I,{moveDragger:true,trigger:"internal"})}}if(c.support.touch&&k.data("contentTouchScroll")){if(!k.data("bindEvent_content_touch")){var l,B,r,s,u,C,E;p.bind("touchstart",function(x){x.stopImmediatePropagation();l=x.originalEvent.touches[0]||x.originalEvent.changedTouches[0];B=c(this);r=B.offset();u=l.pageX-r.left;s=l.pageY-r.top;C=s;E=u});p.bind("touchmove",function(x){x.preventDefault();x.stopImmediatePropagation();l=x.originalEvent.touches[0]||x.originalEvent.changedTouches[0];B=c(this).parent();r=B.offset();u=l.pageX-r.left;s=l.pageY-r.top;if(k.data("horizontalScroll")){k.mCustomScrollbar("scrollTo",E-u,{trigger:"internal"})}else{k.mCustomScrollbar("scrollTo",C-s,{trigger:"internal"})}})}}if(!k.data("bindEvent_scrollbar_click")){m.bind("click",function(F){var x=(F.pageY-m.offset().top)*k.data("scrollAmount"),y=c(F.target);if(k.data("horizontalScroll")){x=(F.pageX-m.offset().left)*k.data("scrollAmount")}if(y.hasClass("mCSB_draggerContainer")||y.hasClass("mCSB_draggerRail")){k.mCustomScrollbar("scrollTo",x,{trigger:"internal",scrollEasing:"draggerRailEase"})}});k.data({bindEvent_scrollbar_click:true})}if(k.data("mouseWheel")){if(!k.data("bindEvent_mousewheel")){h.bind("mousewheel",function(H,J){var G,F=k.data("mouseWheelPixels"),x=Math.abs(p.position().top),I=j.position().top,y=m.height()-j.height();if(k.data("normalizeMouseWheelDelta")){if(J<0){J=-1}else{J=1}}if(F==="auto"){F=100+Math.round(k.data("scrollAmount")/2)}if(k.data("horizontalScroll")){I=j.position().left;y=m.width()-j.width();x=Math.abs(p.position().left)}if((J>0&&I!==0)||(J<0&&I!==y)){H.preventDefault();H.stopImmediatePropagation()}G=x-(J*F);k.mCustomScrollbar("scrollTo",G,{trigger:"internal"})});k.data({bindEvent_mousewheel:true})}}if(k.data("scrollButtons_enable")){if(k.data("scrollButtons_scrollType")==="pixels"){if(k.data("horizontalScroll")){v.add(A).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",i,g);k.data({bindEvent_buttonsContinuous_x:false});if(!k.data("bindEvent_buttonsPixels_x")){v.bind("click",function(x){x.preventDefault();q(Math.abs(p.position().left)+k.data("scrollButtons_scrollAmount"))});A.bind("click",function(x){x.preventDefault();q(Math.abs(p.position().left)-k.data("scrollButtons_scrollAmount"))});k.data({bindEvent_buttonsPixels_x:true})}}else{e.add(w).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",i,g);k.data({bindEvent_buttonsContinuous_y:false});if(!k.data("bindEvent_buttonsPixels_y")){e.bind("click",function(x){x.preventDefault();q(Math.abs(p.position().top)+k.data("scrollButtons_scrollAmount"))});w.bind("click",function(x){x.preventDefault();q(Math.abs(p.position().top)-k.data("scrollButtons_scrollAmount"))});k.data({bindEvent_buttonsPixels_y:true})}}function q(x){if(!j.data("preventAction")){j.data("preventAction",true);k.mCustomScrollbar("scrollTo",x,{trigger:"internal"})}}}else{if(k.data("horizontalScroll")){v.add(A).unbind("click");k.data({bindEvent_buttonsPixels_x:false});if(!k.data("bindEvent_buttonsContinuous_x")){v.bind("mousedown touchstart MSPointerDown",function(y){y.preventDefault();var x=z();k.data({mCSB_buttonScrollRight:setInterval(function(){k.mCustomScrollbar("scrollTo",Math.abs(p.position().left)+x,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var i=function(x){x.preventDefault();clearInterval(k.data("mCSB_buttonScrollRight"))};v.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",i);A.bind("mousedown touchstart MSPointerDown",function(y){y.preventDefault();var x=z();k.data({mCSB_buttonScrollLeft:setInterval(function(){k.mCustomScrollbar("scrollTo",Math.abs(p.position().left)-x,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var g=function(x){x.preventDefault();clearInterval(k.data("mCSB_buttonScrollLeft"))};A.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",g);k.data({bindEvent_buttonsContinuous_x:true})}}else{e.add(w).unbind("click");k.data({bindEvent_buttonsPixels_y:false});if(!k.data("bindEvent_buttonsContinuous_y")){e.bind("mousedown touchstart MSPointerDown",function(y){y.preventDefault();var x=z();k.data({mCSB_buttonScrollDown:setInterval(function(){k.mCustomScrollbar("scrollTo",Math.abs(p.position().top)+x,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var t=function(x){x.preventDefault();clearInterval(k.data("mCSB_buttonScrollDown"))};e.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",t);w.bind("mousedown touchstart MSPointerDown",function(y){y.preventDefault();var x=z();k.data({mCSB_buttonScrollUp:setInterval(function(){k.mCustomScrollbar("scrollTo",Math.abs(p.position().top)-x,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var f=function(x){x.preventDefault();clearInterval(k.data("mCSB_buttonScrollUp"))};w.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",f);k.data({bindEvent_buttonsContinuous_y:true})}}function z(){var x=k.data("scrollButtons_scrollSpeed");if(k.data("scrollButtons_scrollSpeed")==="auto"){x=Math.round((k.data("scrollInertia")+100)/40)}return x}}}if(k.data("autoScrollOnFocus")){if(!k.data("bindEvent_focusin")){h.bind("focusin",function(){h.scrollTop(0).scrollLeft(0);var x=c(document.activeElement);if(x.is("input,textarea,select,button,a[tabindex],area,object")){var G=p.position().top,y=x.position().top,F=h.height()-x.outerHeight();if(k.data("horizontalScroll")){G=p.position().left;y=x.position().left;F=h.width()-x.outerWidth()}if(G+y<0||G+y>F){k.mCustomScrollbar("scrollTo",y,{trigger:"internal"})}}});k.data({bindEvent_focusin:true})}}if(k.data("autoHideScrollbar")){if(!k.data("bindEvent_autoHideScrollbar")){h.bind("mouseenter",function(x){h.addClass("mCS-mouse-over");d.showScrollbar.call(h.children(".mCSB_scrollTools"))}).bind("mouseleave touchend",function(x){h.removeClass("mCS-mouse-over");if(x.type==="mouseleave"){d.hideScrollbar.call(h.children(".mCSB_scrollTools"))}});k.data({bindEvent_autoHideScrollbar:true})}}},scrollTo:function(e,f){var i=c(this),o={moveDragger:false,trigger:"external",callbacks:true,scrollInertia:i.data("scrollInertia"),scrollEasing:i.data("scrollEasing")},f=c.extend(o,f),p,g=i.children(".mCustomScrollBox"),k=g.children(".mCSB_container"),r=g.children(".mCSB_scrollTools"),j=r.children(".mCSB_draggerContainer"),h=j.children(".mCSB_dragger"),t=draggerSpeed=f.scrollInertia,q,s,m,l;if(!k.hasClass("mCS_no_scrollbar")){i.data({mCS_trigger:f.trigger});if(i.data("mCS_Init")){f.callbacks=false}if(e||e===0){if(typeof(e)==="number"){if(f.moveDragger){p=e;if(i.data("horizontalScroll")){e=h.position().left*i.data("scrollAmount")}else{e=h.position().top*i.data("scrollAmount")}draggerSpeed=0}else{p=e/i.data("scrollAmount")}}else{if(typeof(e)==="string"){var v;if(e==="top"){v=0}else{if(e==="bottom"&&!i.data("horizontalScroll")){v=k.outerHeight()-g.height()}else{if(e==="left"){v=0}else{if(e==="right"&&i.data("horizontalScroll")){v=k.outerWidth()-g.width()}else{if(e==="first"){v=i.find(".mCSB_container").find(":first")}else{if(e==="last"){v=i.find(".mCSB_container").find(":last")}else{v=i.find(e)}}}}}}if(v.length===1){if(i.data("horizontalScroll")){e=v.position().left}else{e=v.position().top}p=e/i.data("scrollAmount")}else{p=e=v}}}if(i.data("horizontalScroll")){if(i.data("onTotalScrollBack_Offset")){s=-i.data("onTotalScrollBack_Offset")}if(i.data("onTotalScroll_Offset")){l=g.width()-k.outerWidth()+i.data("onTotalScroll_Offset")}if(p<0){p=e=0;clearInterval(i.data("mCSB_buttonScrollLeft"));if(!s){q=true}}else{if(p>=j.width()-h.width()){p=j.width()-h.width();e=g.width()-k.outerWidth();clearInterval(i.data("mCSB_buttonScrollRight"));if(!l){m=true}}else{e=-e}}var n=i.data("snapAmount");if(n){e=Math.round(e/n)*n-i.data("snapOffset")}d.mTweenAxis.call(this,h[0],"left",Math.round(p),draggerSpeed,f.scrollEasing);d.mTweenAxis.call(this,k[0],"left",Math.round(e),t,f.scrollEasing,{onStart:function(){if(f.callbacks&&!i.data("mCS_tweenRunning")){u("onScrollStart")}if(i.data("autoHideScrollbar")){d.showScrollbar.call(r)}},onUpdate:function(){if(f.callbacks){u("whileScrolling")}},onComplete:function(){if(f.callbacks){u("onScroll");if(q||(s&&k.position().left>=s)){u("onTotalScrollBack")}if(m||(l&&k.position().left<=l)){u("onTotalScroll")}}h.data("preventAction",false);i.data("mCS_tweenRunning",false);if(i.data("autoHideScrollbar")){if(!g.hasClass("mCS-mouse-over")){d.hideScrollbar.call(r)}}}})}else{if(i.data("onTotalScrollBack_Offset")){s=-i.data("onTotalScrollBack_Offset")}if(i.data("onTotalScroll_Offset")){l=g.height()-k.outerHeight()+i.data("onTotalScroll_Offset")}if(p<0){p=e=0;clearInterval(i.data("mCSB_buttonScrollUp"));if(!s){q=true}}else{if(p>=j.height()-h.height()){p=j.height()-h.height();e=g.height()-k.outerHeight();clearInterval(i.data("mCSB_buttonScrollDown"));if(!l){m=true}}else{e=-e}}var n=i.data("snapAmount");if(n){e=Math.round(e/n)*n-i.data("snapOffset")}d.mTweenAxis.call(this,h[0],"top",Math.round(p),draggerSpeed,f.scrollEasing);d.mTweenAxis.call(this,k[0],"top",Math.round(e),t,f.scrollEasing,{onStart:function(){if(f.callbacks&&!i.data("mCS_tweenRunning")){u("onScrollStart")}if(i.data("autoHideScrollbar")){d.showScrollbar.call(r)}},onUpdate:function(){if(f.callbacks){u("whileScrolling")}},onComplete:function(){if(f.callbacks){u("onScroll");if(q||(s&&k.position().top>=s)){u("onTotalScrollBack")}if(m||(l&&k.position().top<=l)){u("onTotalScroll")}}h.data("preventAction",false);i.data("mCS_tweenRunning",false);if(i.data("autoHideScrollbar")){if(!g.hasClass("mCS-mouse-over")){d.hideScrollbar.call(r)}}}})}if(i.data("mCS_Init")){i.data({mCS_Init:false})}}}function u(w){this.mcs={top:k.position().top,left:k.position().left,draggerTop:h.position().top,draggerLeft:h.position().left,topPct:Math.round((100*Math.abs(k.position().top))/Math.abs(k.outerHeight()-g.height())),leftPct:Math.round((100*Math.abs(k.position().left))/Math.abs(k.outerWidth()-g.width()))};switch(w){case"onScrollStart":i.data("mCS_tweenRunning",true).data("onScrollStart_Callback").call(i,this.mcs);break;case"whileScrolling":i.data("whileScrolling_Callback").call(i,this.mcs);break;case"onScroll":i.data("onScroll_Callback").call(i,this.mcs);break;case"onTotalScrollBack":i.data("onTotalScrollBack_Callback").call(i,this.mcs);break;case"onTotalScroll":i.data("onTotalScroll_Callback").call(i,this.mcs);break}}},stop:function(){var g=c(this),e=g.children().children(".mCSB_container"),f=g.children().children().children().children(".mCSB_dragger");d.mTweenAxisStop.call(this,e[0]);d.mTweenAxisStop.call(this,f[0])},disable:function(e){var j=c(this),f=j.children(".mCustomScrollBox"),h=f.children(".mCSB_container"),g=f.children(".mCSB_scrollTools"),i=g.children().children(".mCSB_dragger");f.unbind("mousewheel focusin mouseenter mouseleave touchend");h.unbind("touchstart touchmove");if(e){if(j.data("horizontalScroll")){i.add(h).css("left",0)}else{i.add(h).css("top",0)}}g.css("display","none");h.addClass("mCS_no_scrollbar");j.data({bindEvent_mousewheel:false,bindEvent_focusin:false,bindEvent_content_touch:false,bindEvent_autoHideScrollbar:false}).addClass("mCS_disabled")},destroy:function(){var e=c(this);e.removeClass("mCustomScrollbar _mCS_"+e.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove();c(document).unbind("mousemove."+e.data("mCustomScrollbarIndex")+" mouseup."+e.data("mCustomScrollbarIndex")+" MSPointerMove."+e.data("mCustomScrollbarIndex")+" MSPointerUp."+e.data("mCustomScrollbarIndex"));c(window).unbind("resize."+e.data("mCustomScrollbarIndex"))}},d={showScrollbar:function(){this.stop().animate({opacity:1},"fast")},hideScrollbar:function(){this.stop().animate({opacity:0},"fast")},mTweenAxis:function(g,i,h,f,o,y){var y=y||{},v=y.onStart||function(){},p=y.onUpdate||function(){},w=y.onComplete||function(){};var n=t(),l,j=0,r=g.offsetTop,s=g.style;if(i==="left"){r=g.offsetLeft}var m=h-r;q();e();function t(){if(window.performance&&window.performance.now){return window.performance.now()}else{if(window.performance&&window.performance.webkitNow){return window.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return new Date().getTime()}}}}function x(){if(!j){v.call()}j=t()-n;u();if(j>=g._time){g._time=(j>g._time)?j+l-(j-g._time):j+l-1;if(g._time<j+1){g._time=j+1}}if(g._time<f){g._id=_request(x)}else{w.call()}}function u(){if(f>0){g.currVal=k(g._time,r,m,f,o);s[i]=Math.round(g.currVal)+"px"}else{s[i]=h+"px"}p.call()}function e(){l=1000/60;g._time=j+l;_request=(!window.requestAnimationFrame)?function(z){u();return setTimeout(z,0.01)}:window.requestAnimationFrame;g._id=_request(x)}function q(){if(g._id==null){return}if(!window.requestAnimationFrame){clearTimeout(g._id)}else{window.cancelAnimationFrame(g._id)}g._id=null}function k(B,A,F,E,C){switch(C){case"linear":return F*B/E+A;break;case"easeOutQuad":B/=E;return -F*B*(B-2)+A;break;case"easeInOutQuad":B/=E/2;if(B<1){return F/2*B*B+A}B--;return -F/2*(B*(B-2)-1)+A;break;case"easeOutCubic":B/=E;B--;return F*(B*B*B+1)+A;break;case"easeOutQuart":B/=E;B--;return -F*(B*B*B*B-1)+A;break;case"easeOutQuint":B/=E;B--;return F*(B*B*B*B*B+1)+A;break;case"easeOutCirc":B/=E;B--;return F*Math.sqrt(1-B*B)+A;break;case"easeOutSine":return F*Math.sin(B/E*(Math.PI/2))+A;break;case"easeOutExpo":return F*(-Math.pow(2,-10*B/E)+1)+A;break;case"mcsEaseOut":var D=(B/=E)*B,z=D*B;return A+F*(0.499999999999997*z*D+-2.5*D*D+5.5*z+-6.5*D+4*B);break;case"draggerRailEase":B/=E/2;if(B<1){return F/2*B*B*B+A}B-=2;return F/2*(B*B*B+2)+A;break}}},mTweenAxisStop:function(e){if(e._id==null){return}if(!window.requestAnimationFrame){clearTimeout(e._id)}else{window.cancelAnimationFrame(e._id)}e._id=null},rafPolyfill:function(){var f=["ms","moz","webkit","o"],e=f.length;while(--e>-1&&!window.requestAnimationFrame){window.requestAnimationFrame=window[f[e]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[f[e]+"CancelAnimationFrame"]||window[f[e]+"CancelRequestAnimationFrame"]}}};d.rafPolyfill.call();c.support.touch=!!("ontouchstart" in window);c.support.msPointer=window.navigator.msPointerEnabled;var a=("https:"==document.location.protocol)?"https:":"http:";c.event.special.mousewheel||document.write('<script src="'+a+'//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"><\/script>');c.fn.mCustomScrollbar=function(e){if(b[e]){return b[e].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof e==="object"||!e){return b.init.apply(this,arguments)}else{c.error("Method "+e+" does not exist")}}}})(jQuery);
|
|
1 |
+
/* == jquery mousewheel plugin == Version: 3.1.15, License: MIT License (MIT) */
|
2 |
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
|
3 |
+
/* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */
|
4 |
+
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+n.langDir+"' /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' "+r+" />","<a href='#' class='"+d[14]+"' "+r+" />","<a href='#' class='"+d[15]+"' "+r+" />","<a href='#' class='"+d[16]+"' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||"yx"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||"yx"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass("mCS_touch_action")),U&&e.preventDefault(),w="yx"===T.axis?[u-o,f-a]:"x"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],R,n,"y","all",!0),B.overflowed[1]&&s(w[1],R,n,"x",L,!0)}}function i(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),Q(y),p=K();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],W=[]}function r(e){if(te(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]<l.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<l.width()-o.outerWidth(!1)],c="yx"!==n.axis||s[0]||s[1]?"all":"none";"x"===n.axis||s[0]||G(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i}),"y"===n.axis||s[1]||G(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i})},t[0]._focusTimer))})},U=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(){0===i.scrollTop()&&0===i.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){
|
5 |
+
return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},$=function(e,t){try{delete e[t]}catch(o){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},oe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ne=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).bind("load",function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+ae(n)[0]>=0&&a[0]+ae(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ae(n)[1]>=0&&a[1]+ae(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(".mCSB_container"),d="exact"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ae(s)[0],c[0].offsetLeft+ae(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]],r[0]-i[0]*l[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});
|
js/jquery.mCustomScrollbar.js
ADDED
@@ -0,0 +1,2454 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
== malihu jquery custom scrollbar plugin ==
|
3 |
+
Version: 3.1.5
|
4 |
+
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
|
5 |
+
Author: malihu
|
6 |
+
Author URI: http://manos.malihu.gr
|
7 |
+
License: MIT License (MIT)
|
8 |
+
*/
|
9 |
+
|
10 |
+
/*
|
11 |
+
Copyright Manos Malihutsakis (email: manos@malihu.gr)
|
12 |
+
|
13 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
14 |
+
of this software and associated documentation files (the "Software"), to deal
|
15 |
+
in the Software without restriction, including without limitation the rights
|
16 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
17 |
+
copies of the Software, and to permit persons to whom the Software is
|
18 |
+
furnished to do so, subject to the following conditions:
|
19 |
+
|
20 |
+
The above copyright notice and this permission notice shall be included in
|
21 |
+
all copies or substantial portions of the Software.
|
22 |
+
|
23 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
24 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
25 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
26 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
27 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
28 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
29 |
+
THE SOFTWARE.
|
30 |
+
*/
|
31 |
+
|
32 |
+
/*
|
33 |
+
The code below is fairly long, fully commented and should be normally used in development.
|
34 |
+
For production, use either the minified jquery.mCustomScrollbar.min.js script or
|
35 |
+
the production-ready jquery.mCustomScrollbar.concat.min.js which contains the plugin
|
36 |
+
and dependencies (minified).
|
37 |
+
*/
|
38 |
+
|
39 |
+
(function(factory){
|
40 |
+
if(typeof define==="function" && define.amd){
|
41 |
+
define(["jquery"],factory);
|
42 |
+
}else if(typeof module!=="undefined" && module.exports){
|
43 |
+
module.exports=factory;
|
44 |
+
}else{
|
45 |
+
factory(jQuery,window,document);
|
46 |
+
}
|
47 |
+
}(function($){
|
48 |
+
(function(init){
|
49 |
+
var _rjs=typeof define==="function" && define.amd, /* RequireJS */
|
50 |
+
_njs=typeof module !== "undefined" && module.exports, /* NodeJS */
|
51 |
+
_dlp=("https:"==document.location.protocol) ? "https:" : "http:", /* location protocol */
|
52 |
+
_url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";
|
53 |
+
if(!_rjs){
|
54 |
+
if(_njs){
|
55 |
+
require("jquery-mousewheel")($);
|
56 |
+
}else{
|
57 |
+
/* load jquery-mousewheel plugin (via CDN) if it's not present or not loaded via RequireJS
|
58 |
+
(works when mCustomScrollbar fn is called on window load) */
|
59 |
+
$.event.special.mousewheel || $("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E"));
|
60 |
+
}
|
61 |
+
}
|
62 |
+
init();
|
63 |
+
}(function(){
|
64 |
+
|
65 |
+
/*
|
66 |
+
----------------------------------------
|
67 |
+
PLUGIN NAMESPACE, PREFIX, DEFAULT SELECTOR(S)
|
68 |
+
----------------------------------------
|
69 |
+
*/
|
70 |
+
|
71 |
+
var pluginNS="mCustomScrollbar",
|
72 |
+
pluginPfx="mCS",
|
73 |
+
defaultSelector=".mCustomScrollbar",
|
74 |
+
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
+
/*
|
80 |
+
----------------------------------------
|
81 |
+
DEFAULT OPTIONS
|
82 |
+
----------------------------------------
|
83 |
+
*/
|
84 |
+
|
85 |
+
defaults={
|
86 |
+
/*
|
87 |
+
set element/content width/height programmatically
|
88 |
+
values: boolean, pixels, percentage
|
89 |
+
option default
|
90 |
+
-------------------------------------
|
91 |
+
setWidth false
|
92 |
+
setHeight false
|
93 |
+
*/
|
94 |
+
/*
|
95 |
+
set the initial css top property of content
|
96 |
+
values: string (e.g. "-100px", "10%" etc.)
|
97 |
+
*/
|
98 |
+
setTop:0,
|
99 |
+
/*
|
100 |
+
set the initial css left property of content
|
101 |
+
values: string (e.g. "-100px", "10%" etc.)
|
102 |
+
*/
|
103 |
+
setLeft:0,
|
104 |
+
/*
|
105 |
+
scrollbar axis (vertical and/or horizontal scrollbars)
|
106 |
+
values (string): "y", "x", "yx"
|
107 |
+
*/
|
108 |
+
axis:"y",
|
109 |
+
/*
|
110 |
+
position of scrollbar relative to content
|
111 |
+
values (string): "inside", "outside" ("outside" requires elements with position:relative)
|
112 |
+
*/
|
113 |
+
scrollbarPosition:"inside",
|
114 |
+
/*
|
115 |
+
scrolling inertia
|
116 |
+
values: integer (milliseconds)
|
117 |
+
*/
|
118 |
+
scrollInertia:950,
|
119 |
+
/*
|
120 |
+
auto-adjust scrollbar dragger length
|
121 |
+
values: boolean
|
122 |
+
*/
|
123 |
+
autoDraggerLength:true,
|
124 |
+
/*
|
125 |
+
auto-hide scrollbar when idle
|
126 |
+
values: boolean
|
127 |
+
option default
|
128 |
+
-------------------------------------
|
129 |
+
autoHideScrollbar false
|
130 |
+
*/
|
131 |
+
/*
|
132 |
+
auto-expands scrollbar on mouse-over and dragging
|
133 |
+
values: boolean
|
134 |
+
option default
|
135 |
+
-------------------------------------
|
136 |
+
autoExpandScrollbar false
|
137 |
+
*/
|
138 |
+
/*
|
139 |
+
always show scrollbar, even when there's nothing to scroll
|
140 |
+
values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean
|
141 |
+
*/
|
142 |
+
alwaysShowScrollbar:0,
|
143 |
+
/*
|
144 |
+
scrolling always snaps to a multiple of this number in pixels
|
145 |
+
values: integer, array ([y,x])
|
146 |
+
option default
|
147 |
+
-------------------------------------
|
148 |
+
snapAmount null
|
149 |
+
*/
|
150 |
+
/*
|
151 |
+
when snapping, snap with this number in pixels as an offset
|
152 |
+
values: integer
|
153 |
+
*/
|
154 |
+
snapOffset:0,
|
155 |
+
/*
|
156 |
+
mouse-wheel scrolling
|
157 |
+
*/
|
158 |
+
mouseWheel:{
|
159 |
+
/*
|
160 |
+
enable mouse-wheel scrolling
|
161 |
+
values: boolean
|
162 |
+
*/
|
163 |
+
enable:true,
|
164 |
+
/*
|
165 |
+
scrolling amount in pixels
|
166 |
+
values: "auto", integer
|
167 |
+
*/
|
168 |
+
scrollAmount:"auto",
|
169 |
+
/*
|
170 |
+
mouse-wheel scrolling axis
|
171 |
+
the default scrolling direction when both vertical and horizontal scrollbars are present
|
172 |
+
values (string): "y", "x"
|
173 |
+
*/
|
174 |
+
axis:"y",
|
175 |
+
/*
|
176 |
+
prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached
|
177 |
+
values: boolean
|
178 |
+
option default
|
179 |
+
-------------------------------------
|
180 |
+
preventDefault null
|
181 |
+
*/
|
182 |
+
/*
|
183 |
+
the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls.
|
184 |
+
values: "auto", integer
|
185 |
+
"auto" uses the default OS/browser value
|
186 |
+
*/
|
187 |
+
deltaFactor:"auto",
|
188 |
+
/*
|
189 |
+
normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration)
|
190 |
+
values: boolean
|
191 |
+
option default
|
192 |
+
-------------------------------------
|
193 |
+
normalizeDelta null
|
194 |
+
*/
|
195 |
+
/*
|
196 |
+
invert mouse-wheel scrolling direction
|
197 |
+
values: boolean
|
198 |
+
option default
|
199 |
+
-------------------------------------
|
200 |
+
invert null
|
201 |
+
*/
|
202 |
+
/*
|
203 |
+
the tags that disable mouse-wheel when cursor is over them
|
204 |
+
*/
|
205 |
+
disableOver:["select","option","keygen","datalist","textarea"]
|
206 |
+
},
|
207 |
+
/*
|
208 |
+
scrollbar buttons
|
209 |
+
*/
|
210 |
+
scrollButtons:{
|
211 |
+
/*
|
212 |
+
enable scrollbar buttons
|
213 |
+
values: boolean
|
214 |
+
option default
|
215 |
+
-------------------------------------
|
216 |
+
enable null
|
217 |
+
*/
|
218 |
+
/*
|
219 |
+
scrollbar buttons scrolling type
|
220 |
+
values (string): "stepless", "stepped"
|
221 |
+
*/
|
222 |
+
scrollType:"stepless",
|
223 |
+
/*
|
224 |
+
scrolling amount in pixels
|
225 |
+
values: "auto", integer
|
226 |
+
*/
|
227 |
+
scrollAmount:"auto"
|
228 |
+
/*
|
229 |
+
tabindex of the scrollbar buttons
|
230 |
+
values: false, integer
|
231 |
+
option default
|
232 |
+
-------------------------------------
|
233 |
+
tabindex null
|
234 |
+
*/
|
235 |
+
},
|
236 |
+
/*
|
237 |
+
keyboard scrolling
|
238 |
+
*/
|
239 |
+
keyboard:{
|
240 |
+
/*
|
241 |
+
enable scrolling via keyboard
|
242 |
+
values: boolean
|
243 |
+
*/
|
244 |
+
enable:true,
|
245 |
+
/*
|
246 |
+
keyboard scrolling type
|
247 |
+
values (string): "stepless", "stepped"
|
248 |
+
*/
|
249 |
+
scrollType:"stepless",
|
250 |
+
/*
|
251 |
+
scrolling amount in pixels
|
252 |
+
values: "auto", integer
|
253 |
+
*/
|
254 |
+
scrollAmount:"auto"
|
255 |
+
},
|
256 |
+
/*
|
257 |
+
enable content touch-swipe scrolling
|
258 |
+
values: boolean, integer, string (number)
|
259 |
+
integer values define the axis-specific minimum amount required for scrolling momentum
|
260 |
+
*/
|
261 |
+
contentTouchScroll:25,
|
262 |
+
/*
|
263 |
+
enable/disable document (default) touch-swipe scrolling
|
264 |
+
*/
|
265 |
+
documentTouchScroll:true,
|
266 |
+
/*
|
267 |
+
advanced option parameters
|
268 |
+
*/
|
269 |
+
advanced:{
|
270 |
+
/*
|
271 |
+
auto-expand content horizontally (for "x" or "yx" axis)
|
272 |
+
values: boolean, integer (the value 2 forces the non scrollHeight/scrollWidth method, the value 3 forces the scrollHeight/scrollWidth method)
|
273 |
+
option default
|
274 |
+
-------------------------------------
|
275 |
+
autoExpandHorizontalScroll null
|
276 |
+
*/
|
277 |
+
/*
|
278 |
+
auto-scroll to elements with focus
|
279 |
+
*/
|
280 |
+
autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",
|
281 |
+
/*
|
282 |
+
auto-update scrollbars on content, element or viewport resize
|
283 |
+
should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc.
|
284 |
+
values: boolean
|
285 |
+
*/
|
286 |
+
updateOnContentResize:true,
|
287 |
+
/*
|
288 |
+
auto-update scrollbars each time each image inside the element is fully loaded
|
289 |
+
values: "auto", boolean
|
290 |
+
*/
|
291 |
+
updateOnImageLoad:"auto",
|
292 |
+
/*
|
293 |
+
auto-update scrollbars based on the amount and size changes of specific selectors
|
294 |
+
useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size
|
295 |
+
values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed)
|
296 |
+
a value of true (boolean) will auto-update scrollbars each time any element is changed
|
297 |
+
option default
|
298 |
+
-------------------------------------
|
299 |
+
updateOnSelectorChange null
|
300 |
+
*/
|
301 |
+
/*
|
302 |
+
extra selectors that'll allow scrollbar dragging upon mousemove/up, pointermove/up, touchend etc. (e.g. "selector-1, selector-2")
|
303 |
+
option default
|
304 |
+
-------------------------------------
|
305 |
+
extraDraggableSelectors null
|
306 |
+
*/
|
307 |
+
/*
|
308 |
+
extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2")
|
309 |
+
option default
|
310 |
+
-------------------------------------
|
311 |
+
releaseDraggableSelectors null
|
312 |
+
*/
|
313 |
+
/*
|
314 |
+
auto-update timeout
|
315 |
+
values: integer (milliseconds)
|
316 |
+
*/
|
317 |
+
autoUpdateTimeout:60
|
318 |
+
},
|
319 |
+
/*
|
320 |
+
scrollbar theme
|
321 |
+
values: string (see CSS/plugin URI for a list of ready-to-use themes)
|
322 |
+
*/
|
323 |
+
theme:"light",
|
324 |
+
/*
|
325 |
+
user defined callback functions
|
326 |
+
*/
|
327 |
+
callbacks:{
|
328 |
+
/*
|
329 |
+
Available callbacks:
|
330 |
+
callback default
|
331 |
+
-------------------------------------
|
332 |
+
onCreate null
|
333 |
+
onInit null
|
334 |
+
onScrollStart null
|
335 |
+
onScroll null
|
336 |
+
onTotalScroll null
|
337 |
+
onTotalScrollBack null
|
338 |
+
whileScrolling null
|
339 |
+
onOverflowY null
|
340 |
+
onOverflowX null
|
341 |
+
onOverflowYNone null
|
342 |
+
onOverflowXNone null
|
343 |
+
onImageLoad null
|
344 |
+
onSelectorChange null
|
345 |
+
onBeforeUpdate null
|
346 |
+
onUpdate null
|
347 |
+
*/
|
348 |
+
onTotalScrollOffset:0,
|
349 |
+
onTotalScrollBackOffset:0,
|
350 |
+
alwaysTriggerOffsets:true
|
351 |
+
}
|
352 |
+
/*
|
353 |
+
add scrollbar(s) on all elements matching the current selector, now and in the future
|
354 |
+
values: boolean, string
|
355 |
+
string values: "on" (enable), "once" (disable after first invocation), "off" (disable)
|
356 |
+
liveSelector values: string (selector)
|
357 |
+
option default
|
358 |
+
-------------------------------------
|
359 |
+
live false
|
360 |
+
liveSelector null
|
361 |
+
*/
|
362 |
+
},
|
363 |
+
|
364 |
+
|
365 |
+
|
366 |
+
|
367 |
+
|
368 |
+
/*
|
369 |
+
----------------------------------------
|
370 |
+
VARS, CONSTANTS
|
371 |
+
----------------------------------------
|
372 |
+
*/
|
373 |
+
|
374 |
+
totalInstances=0, /* plugin instances amount */
|
375 |
+
liveTimers={}, /* live option timers */
|
376 |
+
oldIE=(window.attachEvent && !window.addEventListener) ? 1 : 0, /* detect IE < 9 */
|
377 |
+
touchActive=false,touchable, /* global touch vars (for touch and pointer events) */
|
378 |
+
/* general plugin classes */
|
379 |
+
classes=[
|
380 |
+
"mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar",
|
381 |
+
"mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer",
|
382 |
+
"mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"
|
383 |
+
],
|
384 |
+
|
385 |
+
|
386 |
+
|
387 |
+
|
388 |
+
|
389 |
+
/*
|
390 |
+
----------------------------------------
|
391 |
+
METHODS
|
392 |
+
----------------------------------------
|
393 |
+
*/
|
394 |
+
|
395 |
+
methods={
|
396 |
+
|
397 |
+
/*
|
398 |
+
plugin initialization method
|
399 |
+
creates the scrollbar(s), plugin data object and options
|
400 |
+
----------------------------------------
|
401 |
+
*/
|
402 |
+
|
403 |
+
init:function(options){
|
404 |
+
|
405 |
+
var options=$.extend(true,{},defaults,options),
|
406 |
+
selector=_selector.call(this); /* validate selector */
|
407 |
+
|
408 |
+
/*
|
409 |
+
if live option is enabled, monitor for elements matching the current selector and
|
410 |
+
apply scrollbar(s) when found (now and in the future)
|
411 |
+
*/
|
412 |
+
if(options.live){
|
413 |
+
var liveSelector=options.liveSelector || this.selector || defaultSelector, /* live selector(s) */
|
414 |
+
$liveSelector=$(liveSelector); /* live selector(s) as jquery object */
|
415 |
+
if(options.live==="off"){
|
416 |
+
/*
|
417 |
+
disable live if requested
|
418 |
+
usage: $(selector).mCustomScrollbar({live:"off"});
|
419 |
+
*/
|
420 |
+
removeLiveTimers(liveSelector);
|
421 |
+
return;
|
422 |
+
}
|
423 |
+
liveTimers[liveSelector]=setTimeout(function(){
|
424 |
+
/* call mCustomScrollbar fn on live selector(s) every half-second */
|
425 |
+
$liveSelector.mCustomScrollbar(options);
|
426 |
+
if(options.live==="once" && $liveSelector.length){
|
427 |
+
/* disable live after first invocation */
|
428 |
+
removeLiveTimers(liveSelector);
|
429 |
+
}
|
430 |
+
},500);
|
431 |
+
}else{
|
432 |
+
removeLiveTimers(liveSelector);
|
433 |
+
}
|
434 |
+
|
435 |
+
/* options backward compatibility (for versions < 3.0.0) and normalization */
|
436 |
+
options.setWidth=(options.set_width) ? options.set_width : options.setWidth;
|
437 |
+
options.setHeight=(options.set_height) ? options.set_height : options.setHeight;
|
438 |
+
options.axis=(options.horizontalScroll) ? "x" : _findAxis(options.axis);
|
439 |
+
options.scrollInertia=options.scrollInertia>0 && options.scrollInertia<17 ? 17 : options.scrollInertia;
|
440 |
+
if(typeof options.mouseWheel!=="object" && options.mouseWheel==true){ /* old school mouseWheel option (non-object) */
|
441 |
+
options.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false}
|
442 |
+
}
|
443 |
+
options.mouseWheel.scrollAmount=!options.mouseWheelPixels ? options.mouseWheel.scrollAmount : options.mouseWheelPixels;
|
444 |
+
options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta ? options.mouseWheel.normalizeDelta : options.advanced.normalizeMouseWheelDelta;
|
445 |
+
options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType);
|
446 |
+
|
447 |
+
_theme(options); /* theme-specific options */
|
448 |
+
|
449 |
+
/* plugin constructor */
|
450 |
+
return $(selector).each(function(){
|
451 |
+
|
452 |
+
var $this=$(this);
|
453 |
+
|
454 |
+
if(!$this.data(pluginPfx)){ /* prevent multiple instantiations */
|
455 |
+
|
456 |
+
/* store options and create objects in jquery data */
|
457 |
+
$this.data(pluginPfx,{
|
458 |
+
idx:++totalInstances, /* instance index */
|
459 |
+
opt:options, /* options */
|
460 |
+
scrollRatio:{y:null,x:null}, /* scrollbar to content ratio */
|
461 |
+
overflowed:null, /* overflowed axis */
|
462 |
+
contentReset:{y:null,x:null}, /* object to check when content resets */
|
463 |
+
bindEvents:false, /* object to check if events are bound */
|
464 |
+
tweenRunning:false, /* object to check if tween is running */
|
465 |
+
sequential:{}, /* sequential scrolling object */
|
466 |
+
langDir:$this.css("direction"), /* detect/store direction (ltr or rtl) */
|
467 |
+
cbOffsets:null, /* object to check whether callback offsets always trigger */
|
468 |
+
/*
|
469 |
+
object to check how scrolling events where last triggered
|
470 |
+
"internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method)
|
471 |
+
usage: object.data("mCS").trigger
|
472 |
+
*/
|
473 |
+
trigger:null,
|
474 |
+
/*
|
475 |
+
object to check for changes in elements in order to call the update method automatically
|
476 |
+
*/
|
477 |
+
poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}
|
478 |
+
});
|
479 |
+
|
480 |
+
var d=$this.data(pluginPfx),o=d.opt,
|
481 |
+
/* HTML data attributes */
|
482 |
+
htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme");
|
483 |
+
|
484 |
+
if(htmlDataAxis){o.axis=htmlDataAxis;} /* usage example: data-mcs-axis="y" */
|
485 |
+
if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos;} /* usage example: data-mcs-scrollbar-position="outside" */
|
486 |
+
if(htmlDataTheme){ /* usage example: data-mcs-theme="minimal" */
|
487 |
+
o.theme=htmlDataTheme;
|
488 |
+
_theme(o); /* theme-specific options */
|
489 |
+
}
|
490 |
+
|
491 |
+
_pluginMarkup.call(this); /* add plugin markup */
|
492 |
+
|
493 |
+
if(d && o.callbacks.onCreate && typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this);} /* callbacks: onCreate */
|
494 |
+
|
495 |
+
$("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]); /* flag loaded images */
|
496 |
+
|
497 |
+
methods.update.call(null,$this); /* call the update method */
|
498 |
+
|
499 |
+
}
|
500 |
+
|
501 |
+
});
|
502 |
+
|
503 |
+
},
|
504 |
+
/* ---------------------------------------- */
|
505 |
+
|
506 |
+
|
507 |
+
|
508 |
+
/*
|
509 |
+
plugin update method
|
510 |
+
updates content and scrollbar(s) values, events and status
|
511 |
+
----------------------------------------
|
512 |
+
usage: $(selector).mCustomScrollbar("update");
|
513 |
+
*/
|
514 |
+
|
515 |
+
update:function(el,cb){
|
516 |
+
|
517 |
+
var selector=el || _selector.call(this); /* validate selector */
|
518 |
+
|
519 |
+
return $(selector).each(function(){
|
520 |
+
|
521 |
+
var $this=$(this);
|
522 |
+
|
523 |
+
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
524 |
+
|
525 |
+
var d=$this.data(pluginPfx),o=d.opt,
|
526 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
527 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
528 |
+
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
|
529 |
+
|
530 |
+
if(!mCSB_container.length){return;}
|
531 |
+
|
532 |
+
if(d.tweenRunning){_stop($this);} /* stop any running tweens while updating */
|
533 |
+
|
534 |
+
if(cb && d && o.callbacks.onBeforeUpdate && typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this);} /* callbacks: onBeforeUpdate */
|
535 |
+
|
536 |
+
/* if element was disabled or destroyed, remove class(es) */
|
537 |
+
if($this.hasClass(classes[3])){$this.removeClass(classes[3]);}
|
538 |
+
if($this.hasClass(classes[4])){$this.removeClass(classes[4]);}
|
539 |
+
|
540 |
+
/* css flexbox fix, detect/set max-height */
|
541 |
+
mCustomScrollBox.css("max-height","none");
|
542 |
+
if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height());}
|
543 |
+
|
544 |
+
_expandContentHorizontally.call(this); /* expand content horizontally */
|
545 |
+
|
546 |
+
if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){
|
547 |
+
mCSB_container.css("width",_contentWidth(mCSB_container));
|
548 |
+
}
|
549 |
+
|
550 |
+
d.overflowed=_overflowed.call(this); /* determine if scrolling is required */
|
551 |
+
|
552 |
+
_scrollbarVisibility.call(this); /* show/hide scrollbar(s) */
|
553 |
+
|
554 |
+
/* auto-adjust scrollbar dragger length analogous to content */
|
555 |
+
if(o.autoDraggerLength){_setDraggerLength.call(this);}
|
556 |
+
|
557 |
+
_scrollRatio.call(this); /* calculate and store scrollbar to content ratio */
|
558 |
+
|
559 |
+
_bindEvents.call(this); /* bind scrollbar events */
|
560 |
+
|
561 |
+
/* reset scrolling position and/or events */
|
562 |
+
var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)];
|
563 |
+
if(o.axis!=="x"){ /* y/yx axis */
|
564 |
+
if(!d.overflowed[0]){ /* y scrolling is not required */
|
565 |
+
_resetContentPosition.call(this); /* reset content position */
|
566 |
+
if(o.axis==="y"){
|
567 |
+
_unbindEvents.call(this);
|
568 |
+
}else if(o.axis==="yx" && d.overflowed[1]){
|
569 |
+
_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"});
|
570 |
+
}
|
571 |
+
}else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){
|
572 |
+
_resetContentPosition.call(this); /* reset content position */
|
573 |
+
}else{ /* y scrolling is required */
|
574 |
+
_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"});
|
575 |
+
d.contentReset.y=null;
|
576 |
+
}
|
577 |
+
}
|
578 |
+
if(o.axis!=="y"){ /* x/yx axis */
|
579 |
+
if(!d.overflowed[1]){ /* x scrolling is not required */
|
580 |
+
_resetContentPosition.call(this); /* reset content position */
|
581 |
+
if(o.axis==="x"){
|
582 |
+
_unbindEvents.call(this);
|
583 |
+
}else if(o.axis==="yx" && d.overflowed[0]){
|
584 |
+
_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"});
|
585 |
+
}
|
586 |
+
}else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){
|
587 |
+
_resetContentPosition.call(this); /* reset content position */
|
588 |
+
}else{ /* x scrolling is required */
|
589 |
+
_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"});
|
590 |
+
d.contentReset.x=null;
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
/* callbacks: onImageLoad, onSelectorChange, onUpdate */
|
595 |
+
if(cb && d){
|
596 |
+
if(cb===2 && o.callbacks.onImageLoad && typeof o.callbacks.onImageLoad==="function"){
|
597 |
+
o.callbacks.onImageLoad.call(this);
|
598 |
+
}else if(cb===3 && o.callbacks.onSelectorChange && typeof o.callbacks.onSelectorChange==="function"){
|
599 |
+
o.callbacks.onSelectorChange.call(this);
|
600 |
+
}else if(o.callbacks.onUpdate && typeof o.callbacks.onUpdate==="function"){
|
601 |
+
o.callbacks.onUpdate.call(this);
|
602 |
+
}
|
603 |
+
}
|
604 |
+
|
605 |
+
_autoUpdate.call(this); /* initialize automatic updating (for dynamic content, fluid layouts etc.) */
|
606 |
+
|
607 |
+
}
|
608 |
+
|
609 |
+
});
|
610 |
+
|
611 |
+
},
|
612 |
+
/* ---------------------------------------- */
|
613 |
+
|
614 |
+
|
615 |
+
|
616 |
+
/*
|
617 |
+
plugin scrollTo method
|
618 |
+
triggers a scrolling event to a specific value
|
619 |
+
----------------------------------------
|
620 |
+
usage: $(selector).mCustomScrollbar("scrollTo",value,options);
|
621 |
+
*/
|
622 |
+
|
623 |
+
scrollTo:function(val,options){
|
624 |
+
|
625 |
+
/* prevent silly things like $(selector).mCustomScrollbar("scrollTo",undefined); */
|
626 |
+
if(typeof val=="undefined" || val==null){return;}
|
627 |
+
|
628 |
+
var selector=_selector.call(this); /* validate selector */
|
629 |
+
|
630 |
+
return $(selector).each(function(){
|
631 |
+
|
632 |
+
var $this=$(this);
|
633 |
+
|
634 |
+
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
635 |
+
|
636 |
+
var d=$this.data(pluginPfx),o=d.opt,
|
637 |
+
/* method default options */
|
638 |
+
methodDefaults={
|
639 |
+
trigger:"external", /* method is by default triggered externally (e.g. from other scripts) */
|
640 |
+
scrollInertia:o.scrollInertia, /* scrolling inertia (animation duration) */
|
641 |
+
scrollEasing:"mcsEaseInOut", /* animation easing */
|
642 |
+
moveDragger:false, /* move dragger instead of content */
|
643 |
+
timeout:60, /* scroll-to delay */
|
644 |
+
callbacks:true, /* enable/disable callbacks */
|
645 |
+
onStart:true,
|
646 |
+
onUpdate:true,
|
647 |
+
onComplete:true
|
648 |
+
},
|
649 |
+
methodOptions=$.extend(true,{},methodDefaults,options),
|
650 |
+
to=_arr.call(this,val),dur=methodOptions.scrollInertia>0 && methodOptions.scrollInertia<17 ? 17 : methodOptions.scrollInertia;
|
651 |
+
|
652 |
+
/* translate yx values to actual scroll-to positions */
|
653 |
+
to[0]=_to.call(this,to[0],"y");
|
654 |
+
to[1]=_to.call(this,to[1],"x");
|
655 |
+
|
656 |
+
/*
|
657 |
+
check if scroll-to value moves the dragger instead of content.
|
658 |
+
Only pixel values apply on dragger (e.g. 100, "100px", "-=100" etc.)
|
659 |
+
*/
|
660 |
+
if(methodOptions.moveDragger){
|
661 |
+
to[0]*=d.scrollRatio.y;
|
662 |
+
to[1]*=d.scrollRatio.x;
|
663 |
+
}
|
664 |
+
|
665 |
+
methodOptions.dur=_isTabHidden() ? 0 : dur; //skip animations if browser tab is hidden
|
666 |
+
|
667 |
+
setTimeout(function(){
|
668 |
+
/* do the scrolling */
|
669 |
+
if(to[0]!==null && typeof to[0]!=="undefined" && o.axis!=="x" && d.overflowed[0]){ /* scroll y */
|
670 |
+
methodOptions.dir="y";
|
671 |
+
methodOptions.overwrite="all";
|
672 |
+
_scrollTo($this,to[0].toString(),methodOptions);
|
673 |
+
}
|
674 |
+
if(to[1]!==null && typeof to[1]!=="undefined" && o.axis!=="y" && d.overflowed[1]){ /* scroll x */
|
675 |
+
methodOptions.dir="x";
|
676 |
+
methodOptions.overwrite="none";
|
677 |
+
_scrollTo($this,to[1].toString(),methodOptions);
|
678 |
+
}
|
679 |
+
},methodOptions.timeout);
|
680 |
+
|
681 |
+
}
|
682 |
+
|
683 |
+
});
|
684 |
+
|
685 |
+
},
|
686 |
+
/* ---------------------------------------- */
|
687 |
+
|
688 |
+
|
689 |
+
|
690 |
+
/*
|
691 |
+
plugin stop method
|
692 |
+
stops scrolling animation
|
693 |
+
----------------------------------------
|
694 |
+
usage: $(selector).mCustomScrollbar("stop");
|
695 |
+
*/
|
696 |
+
stop:function(){
|
697 |
+
|
698 |
+
var selector=_selector.call(this); /* validate selector */
|
699 |
+
|
700 |
+
return $(selector).each(function(){
|
701 |
+
|
702 |
+
var $this=$(this);
|
703 |
+
|
704 |
+
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
705 |
+
|
706 |
+
_stop($this);
|
707 |
+
|
708 |
+
}
|
709 |
+
|
710 |
+
});
|
711 |
+
|
712 |
+
},
|
713 |
+
/* ---------------------------------------- */
|
714 |
+
|
715 |
+
|
716 |
+
|
717 |
+
/*
|
718 |
+
plugin disable method
|
719 |
+
temporarily disables the scrollbar(s)
|
720 |
+
----------------------------------------
|
721 |
+
usage: $(selector).mCustomScrollbar("disable",reset);
|
722 |
+
reset (boolean): resets content position to 0
|
723 |
+
*/
|
724 |
+
disable:function(r){
|
725 |
+
|
726 |
+
var selector=_selector.call(this); /* validate selector */
|
727 |
+
|
728 |
+
return $(selector).each(function(){
|
729 |
+
|
730 |
+
var $this=$(this);
|
731 |
+
|
732 |
+
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
733 |
+
|
734 |
+
var d=$this.data(pluginPfx);
|
735 |
+
|
736 |
+
_autoUpdate.call(this,"remove"); /* remove automatic updating */
|
737 |
+
|
738 |
+
_unbindEvents.call(this); /* unbind events */
|
739 |
+
|
740 |
+
if(r){_resetContentPosition.call(this);} /* reset content position */
|
741 |
+
|
742 |
+
_scrollbarVisibility.call(this,true); /* show/hide scrollbar(s) */
|
743 |
+
|
744 |
+
$this.addClass(classes[3]); /* add disable class */
|
745 |
+
|
746 |
+
}
|
747 |
+
|
748 |
+
});
|
749 |
+
|
750 |
+
},
|
751 |
+
/* ---------------------------------------- */
|
752 |
+
|
753 |
+
|
754 |
+
|
755 |
+
/*
|
756 |
+
plugin destroy method
|
757 |
+
completely removes the scrollbar(s) and returns the element to its original state
|
758 |
+
----------------------------------------
|
759 |
+
usage: $(selector).mCustomScrollbar("destroy");
|
760 |
+
*/
|
761 |
+
destroy:function(){
|
762 |
+
|
763 |
+
var selector=_selector.call(this); /* validate selector */
|
764 |
+
|
765 |
+
return $(selector).each(function(){
|
766 |
+
|
767 |
+
var $this=$(this);
|
768 |
+
|
769 |
+
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
770 |
+
|
771 |
+
var d=$this.data(pluginPfx),o=d.opt,
|
772 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
773 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
774 |
+
scrollbar=$(".mCSB_"+d.idx+"_scrollbar");
|
775 |
+
|
776 |
+
if(o.live){removeLiveTimers(o.liveSelector || $(selector).selector);} /* remove live timers */
|
777 |
+
|
778 |
+
_autoUpdate.call(this,"remove"); /* remove automatic updating */
|
779 |
+
|
780 |
+
_unbindEvents.call(this); /* unbind events */
|
781 |
+
|
782 |
+
_resetContentPosition.call(this); /* reset content position */
|
783 |
+
|
784 |
+
$this.removeData(pluginPfx); /* remove plugin data object */
|
785 |
+
|
786 |
+
_delete(this,"mcs"); /* delete callbacks object */
|
787 |
+
|
788 |
+
/* remove plugin markup */
|
789 |
+
scrollbar.remove(); /* remove scrollbar(s) first (those can be either inside or outside plugin's inner wrapper) */
|
790 |
+
mCSB_container.find("img."+classes[2]).removeClass(classes[2]); /* remove loaded images flag */
|
791 |
+
mCustomScrollBox.replaceWith(mCSB_container.contents()); /* replace plugin's inner wrapper with the original content */
|
792 |
+
/* remove plugin classes from the element and add destroy class */
|
793 |
+
$this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4]);
|
794 |
+
|
795 |
+
}
|
796 |
+
|
797 |
+
});
|
798 |
+
|
799 |
+
}
|
800 |
+
/* ---------------------------------------- */
|
801 |
+
|
802 |
+
},
|
803 |
+
|
804 |
+
|
805 |
+
|
806 |
+
|
807 |
+
|
808 |
+
/*
|
809 |
+
----------------------------------------
|
810 |
+
FUNCTIONS
|
811 |
+
----------------------------------------
|
812 |
+
*/
|
813 |
+
|
814 |
+
/* validates selector (if selector is invalid or undefined uses the default one) */
|
815 |
+
_selector=function(){
|
816 |
+
return (typeof $(this)!=="object" || $(this).length<1) ? defaultSelector : this;
|
817 |
+
},
|
818 |
+
/* -------------------- */
|
819 |
+
|
820 |
+
|
821 |
+
/* changes options according to theme */
|
822 |
+
_theme=function(obj){
|
823 |
+
var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],
|
824 |
+
nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],
|
825 |
+
disabledScrollButtonsThemes=["minimal","minimal-dark"],
|
826 |
+
enabledAutoHideScrollbarThemes=["minimal","minimal-dark"],
|
827 |
+
scrollbarPositionOutsideThemes=["minimal","minimal-dark"];
|
828 |
+
obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes) > -1 ? false : obj.autoDraggerLength;
|
829 |
+
obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes) > -1 ? false : obj.autoExpandScrollbar;
|
830 |
+
obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes) > -1 ? false : obj.scrollButtons.enable;
|
831 |
+
obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes) > -1 ? true : obj.autoHideScrollbar;
|
832 |
+
obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes) > -1 ? "outside" : obj.scrollbarPosition;
|
833 |
+
},
|
834 |
+
/* -------------------- */
|
835 |
+
|
836 |
+
|
837 |
+
/* live option timers removal */
|
838 |
+
removeLiveTimers=function(selector){
|
839 |
+
if(liveTimers[selector]){
|
840 |
+
clearTimeout(liveTimers[selector]);
|
841 |
+
_delete(liveTimers,selector);
|
842 |
+
}
|
843 |
+
},
|
844 |
+
/* -------------------- */
|
845 |
+
|
846 |
+
|
847 |
+
/* normalizes axis option to valid values: "y", "x", "yx" */
|
848 |
+
_findAxis=function(val){
|
849 |
+
return (val==="yx" || val==="xy" || val==="auto") ? "yx" : (val==="x" || val==="horizontal") ? "x" : "y";
|
850 |
+
},
|
851 |
+
/* -------------------- */
|
852 |
+
|
853 |
+
|
854 |
+
/* normalizes scrollButtons.scrollType option to valid values: "stepless", "stepped" */
|
855 |
+
_findScrollButtonsType=function(val){
|
856 |
+
return (val==="stepped" || val==="pixels" || val==="step" || val==="click") ? "stepped" : "stepless";
|
857 |
+
},
|
858 |
+
/* -------------------- */
|
859 |
+
|
860 |
+
|
861 |
+
/* generates plugin markup */
|
862 |
+
_pluginMarkup=function(){
|
863 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
864 |
+
expandClass=o.autoExpandScrollbar ? " "+classes[1]+"_expand" : "",
|
865 |
+
scrollbar=["<div id='mCSB_"+d.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+d.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],
|
866 |
+
wrapperClass=o.axis==="yx" ? "mCSB_vertical_horizontal" : o.axis==="x" ? "mCSB_horizontal" : "mCSB_vertical",
|
867 |
+
scrollbars=o.axis==="yx" ? scrollbar[0]+scrollbar[1] : o.axis==="x" ? scrollbar[1] : scrollbar[0],
|
868 |
+
contentWrapper=o.axis==="yx" ? "<div id='mCSB_"+d.idx+"_container_wrapper' class='mCSB_container_wrapper' />" : "",
|
869 |
+
autoHideClass=o.autoHideScrollbar ? " "+classes[6] : "",
|
870 |
+
scrollbarDirClass=(o.axis!=="x" && d.langDir==="rtl") ? " "+classes[7] : "";
|
871 |
+
if(o.setWidth){$this.css("width",o.setWidth);} /* set element width */
|
872 |
+
if(o.setHeight){$this.css("height",o.setHeight);} /* set element height */
|
873 |
+
o.setLeft=(o.axis!=="y" && d.langDir==="rtl") ? "989999px" : o.setLeft; /* adjust left position for rtl direction */
|
874 |
+
$this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("<div id='mCSB_"+d.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+wrapperClass+"'><div id='mCSB_"+d.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir='"+d.langDir+"' /></div>");
|
875 |
+
var mCustomScrollBox=$("#mCSB_"+d.idx),
|
876 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
877 |
+
if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){
|
878 |
+
mCSB_container.css("width",_contentWidth(mCSB_container));
|
879 |
+
}
|
880 |
+
if(o.scrollbarPosition==="outside"){
|
881 |
+
if($this.css("position")==="static"){ /* requires elements with non-static position */
|
882 |
+
$this.css("position","relative");
|
883 |
+
}
|
884 |
+
$this.css("overflow","visible");
|
885 |
+
mCustomScrollBox.addClass("mCSB_outside").after(scrollbars);
|
886 |
+
}else{
|
887 |
+
mCustomScrollBox.addClass("mCSB_inside").append(scrollbars);
|
888 |
+
mCSB_container.wrap(contentWrapper);
|
889 |
+
}
|
890 |
+
_scrollButtons.call(this); /* add scrollbar buttons */
|
891 |
+
/* minimum dragger length */
|
892 |
+
var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
|
893 |
+
mCSB_dragger[0].css("min-height",mCSB_dragger[0].height());
|
894 |
+
mCSB_dragger[1].css("min-width",mCSB_dragger[1].width());
|
895 |
+
},
|
896 |
+
/* -------------------- */
|
897 |
+
|
898 |
+
|
899 |
+
/* calculates content width */
|
900 |
+
_contentWidth=function(el){
|
901 |
+
var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(true);}).get())],w=el.parent().width();
|
902 |
+
return val[0]>w ? val[0] : val[1]>w ? val[1] : "100%";
|
903 |
+
},
|
904 |
+
/* -------------------- */
|
905 |
+
|
906 |
+
|
907 |
+
/* expands content horizontally */
|
908 |
+
_expandContentHorizontally=function(){
|
909 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
910 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
911 |
+
if(o.advanced.autoExpandHorizontalScroll && o.axis!=="y"){
|
912 |
+
/* calculate scrollWidth */
|
913 |
+
mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"});
|
914 |
+
var w=Math.ceil(mCSB_container[0].scrollWidth);
|
915 |
+
if(o.advanced.autoExpandHorizontalScroll===3 || (o.advanced.autoExpandHorizontalScroll!==2 && w>mCSB_container.parent().width())){
|
916 |
+
mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"});
|
917 |
+
}else{
|
918 |
+
/*
|
919 |
+
wrap content with an infinite width div and set its position to absolute and width to auto.
|
920 |
+
Setting width to auto before calculating the actual width is important!
|
921 |
+
We must let the browser set the width as browser zoom values are impossible to calculate.
|
922 |
+
*/
|
923 |
+
mCSB_container.css({"overflow-x":"inherit","position":"absolute"})
|
924 |
+
.wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />")
|
925 |
+
.css({ /* set actual width, original position and un-wrap */
|
926 |
+
/*
|
927 |
+
get the exact width (with decimals) and then round-up.
|
928 |
+
Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width
|
929 |
+
*/
|
930 |
+
"width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)),
|
931 |
+
"min-width":"100%",
|
932 |
+
"position":"relative"
|
933 |
+
}).unwrap();
|
934 |
+
}
|
935 |
+
}
|
936 |
+
},
|
937 |
+
/* -------------------- */
|
938 |
+
|
939 |
+
|
940 |
+
/* adds scrollbar buttons */
|
941 |
+
_scrollButtons=function(){
|
942 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
943 |
+
mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"),
|
944 |
+
tabindex=!_isNumeric(o.scrollButtons.tabindex) ? "" : "tabindex='"+o.scrollButtons.tabindex+"'",
|
945 |
+
btnHTML=[
|
946 |
+
"<a href='#' class='"+classes[13]+"' "+tabindex+" />",
|
947 |
+
"<a href='#' class='"+classes[14]+"' "+tabindex+" />",
|
948 |
+
"<a href='#' class='"+classes[15]+"' "+tabindex+" />",
|
949 |
+
"<a href='#' class='"+classes[16]+"' "+tabindex+" />"
|
950 |
+
],
|
951 |
+
btn=[(o.axis==="x" ? btnHTML[2] : btnHTML[0]),(o.axis==="x" ? btnHTML[3] : btnHTML[1]),btnHTML[2],btnHTML[3]];
|
952 |
+
if(o.scrollButtons.enable){
|
953 |
+
mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3]);
|
954 |
+
}
|
955 |
+
},
|
956 |
+
/* -------------------- */
|
957 |
+
|
958 |
+
|
959 |
+
/* auto-adjusts scrollbar dragger length */
|
960 |
+
_setDraggerLength=function(){
|
961 |
+
var $this=$(this),d=$this.data(pluginPfx),
|
962 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
963 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
964 |
+
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
965 |
+
ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(false),mCustomScrollBox.width()/mCSB_container.outerWidth(false)],
|
966 |
+
l=[
|
967 |
+
parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()),
|
968 |
+
parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width())
|
969 |
+
],
|
970 |
+
h=oldIE && (l[1]<l[0]) ? l[0] : l[1],w=oldIE && (l[3]<l[2]) ? l[2] : l[3];
|
971 |
+
mCSB_dragger[0].css({
|
972 |
+
"height":h,"max-height":(mCSB_dragger[0].parent().height()-10)
|
973 |
+
}).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"});
|
974 |
+
mCSB_dragger[1].css({
|
975 |
+
"width":w,"max-width":(mCSB_dragger[1].parent().width()-10)
|
976 |
+
});
|
977 |
+
},
|
978 |
+
/* -------------------- */
|
979 |
+
|
980 |
+
|
981 |
+
/* calculates scrollbar to content ratio */
|
982 |
+
_scrollRatio=function(){
|
983 |
+
var $this=$(this),d=$this.data(pluginPfx),
|
984 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
985 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
986 |
+
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
987 |
+
scrollAmount=[mCSB_container.outerHeight(false)-mCustomScrollBox.height(),mCSB_container.outerWidth(false)-mCustomScrollBox.width()],
|
988 |
+
ratio=[
|
989 |
+
scrollAmount[0]/(mCSB_dragger[0].parent().height()-mCSB_dragger[0].height()),
|
990 |
+
scrollAmount[1]/(mCSB_dragger[1].parent().width()-mCSB_dragger[1].width())
|
991 |
+
];
|
992 |
+
d.scrollRatio={y:ratio[0],x:ratio[1]};
|
993 |
+
},
|
994 |
+
/* -------------------- */
|
995 |
+
|
996 |
+
|
997 |
+
/* toggles scrolling classes */
|
998 |
+
_onDragClasses=function(el,action,xpnd){
|
999 |
+
var expandClass=xpnd ? classes[0]+"_expanded" : "",
|
1000 |
+
scrollbar=el.closest(".mCSB_scrollTools");
|
1001 |
+
if(action==="active"){
|
1002 |
+
el.toggleClass(classes[0]+" "+expandClass); scrollbar.toggleClass(classes[1]);
|
1003 |
+
el[0]._draggable=el[0]._draggable ? 0 : 1;
|
1004 |
+
}else{
|
1005 |
+
if(!el[0]._draggable){
|
1006 |
+
if(action==="hide"){
|
1007 |
+
el.removeClass(classes[0]); scrollbar.removeClass(classes[1]);
|
1008 |
+
}else{
|
1009 |
+
el.addClass(classes[0]); scrollbar.addClass(classes[1]);
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
},
|
1014 |
+
/* -------------------- */
|
1015 |
+
|
1016 |
+
|
1017 |
+
/* checks if content overflows its container to determine if scrolling is required */
|
1018 |
+
_overflowed=function(){
|
1019 |
+
var $this=$(this),d=$this.data(pluginPfx),
|
1020 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1021 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1022 |
+
contentHeight=d.overflowed==null ? mCSB_container.height() : mCSB_container.outerHeight(false),
|
1023 |
+
contentWidth=d.overflowed==null ? mCSB_container.width() : mCSB_container.outerWidth(false),
|
1024 |
+
h=mCSB_container[0].scrollHeight,w=mCSB_container[0].scrollWidth;
|
1025 |
+
if(h>contentHeight){contentHeight=h;}
|
1026 |
+
if(w>contentWidth){contentWidth=w;}
|
1027 |
+
return [contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()];
|
1028 |
+
},
|
1029 |
+
/* -------------------- */
|
1030 |
+
|
1031 |
+
|
1032 |
+
/* resets content position to 0 */
|
1033 |
+
_resetContentPosition=function(){
|
1034 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1035 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1036 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1037 |
+
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
|
1038 |
+
_stop($this); /* stop any current scrolling before resetting */
|
1039 |
+
if((o.axis!=="x" && !d.overflowed[0]) || (o.axis==="y" && d.overflowed[0])){ /* reset y */
|
1040 |
+
mCSB_dragger[0].add(mCSB_container).css("top",0);
|
1041 |
+
_scrollTo($this,"_resetY");
|
1042 |
+
}
|
1043 |
+
if((o.axis!=="y" && !d.overflowed[1]) || (o.axis==="x" && d.overflowed[1])){ /* reset x */
|
1044 |
+
var cx=dx=0;
|
1045 |
+
if(d.langDir==="rtl"){ /* adjust left position for rtl direction */
|
1046 |
+
cx=mCustomScrollBox.width()-mCSB_container.outerWidth(false);
|
1047 |
+
dx=Math.abs(cx/d.scrollRatio.x);
|
1048 |
+
}
|
1049 |
+
mCSB_container.css("left",cx);
|
1050 |
+
mCSB_dragger[1].css("left",dx);
|
1051 |
+
_scrollTo($this,"_resetX");
|
1052 |
+
}
|
1053 |
+
},
|
1054 |
+
/* -------------------- */
|
1055 |
+
|
1056 |
+
|
1057 |
+
/* binds scrollbar events */
|
1058 |
+
_bindEvents=function(){
|
1059 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt;
|
1060 |
+
if(!d.bindEvents){ /* check if events are already bound */
|
1061 |
+
_draggable.call(this);
|
1062 |
+
if(o.contentTouchScroll){_contentDraggable.call(this);}
|
1063 |
+
_selectable.call(this);
|
1064 |
+
if(o.mouseWheel.enable){ /* bind mousewheel fn when plugin is available */
|
1065 |
+
function _mwt(){
|
1066 |
+
mousewheelTimeout=setTimeout(function(){
|
1067 |
+
if(!$.event.special.mousewheel){
|
1068 |
+
_mwt();
|
1069 |
+
}else{
|
1070 |
+
clearTimeout(mousewheelTimeout);
|
1071 |
+
_mousewheel.call($this[0]);
|
1072 |
+
}
|
1073 |
+
},100);
|
1074 |
+
}
|
1075 |
+
var mousewheelTimeout;
|
1076 |
+
_mwt();
|
1077 |
+
}
|
1078 |
+
_draggerRail.call(this);
|
1079 |
+
_wrapperScroll.call(this);
|
1080 |
+
if(o.advanced.autoScrollOnFocus){_focus.call(this);}
|
1081 |
+
if(o.scrollButtons.enable){_buttons.call(this);}
|
1082 |
+
if(o.keyboard.enable){_keyboard.call(this);}
|
1083 |
+
d.bindEvents=true;
|
1084 |
+
}
|
1085 |
+
},
|
1086 |
+
/* -------------------- */
|
1087 |
+
|
1088 |
+
|
1089 |
+
/* unbinds scrollbar events */
|
1090 |
+
_unbindEvents=function(){
|
1091 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1092 |
+
namespace=pluginPfx+"_"+d.idx,
|
1093 |
+
sb=".mCSB_"+d.idx+"_scrollbar",
|
1094 |
+
sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"),
|
1095 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
1096 |
+
if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors));}
|
1097 |
+
if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors));}
|
1098 |
+
if(d.bindEvents){ /* check if events are bound */
|
1099 |
+
/* unbind namespaced events from document/selectors */
|
1100 |
+
$(document).add($(!_canAccessIFrame() || top.document)).unbind("."+namespace);
|
1101 |
+
sel.each(function(){
|
1102 |
+
$(this).unbind("."+namespace);
|
1103 |
+
});
|
1104 |
+
/* clear and delete timeouts/objects */
|
1105 |
+
clearTimeout($this[0]._focusTimeout); _delete($this[0],"_focusTimeout");
|
1106 |
+
clearTimeout(d.sequential.step); _delete(d.sequential,"step");
|
1107 |
+
clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0],"onCompleteTimeout");
|
1108 |
+
d.bindEvents=false;
|
1109 |
+
}
|
1110 |
+
},
|
1111 |
+
/* -------------------- */
|
1112 |
+
|
1113 |
+
|
1114 |
+
/* toggles scrollbar visibility */
|
1115 |
+
_scrollbarVisibility=function(disabled){
|
1116 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1117 |
+
contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"),
|
1118 |
+
content=contentWrapper.length ? contentWrapper : $("#mCSB_"+d.idx+"_container"),
|
1119 |
+
scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")],
|
1120 |
+
mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")];
|
1121 |
+
if(o.axis!=="x"){
|
1122 |
+
if(d.overflowed[0] && !disabled){
|
1123 |
+
scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block");
|
1124 |
+
content.removeClass(classes[8]+" "+classes[10]);
|
1125 |
+
}else{
|
1126 |
+
if(o.alwaysShowScrollbar){
|
1127 |
+
if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none");}
|
1128 |
+
content.removeClass(classes[10]);
|
1129 |
+
}else{
|
1130 |
+
scrollbar[0].css("display","none");
|
1131 |
+
content.addClass(classes[10]);
|
1132 |
+
}
|
1133 |
+
content.addClass(classes[8]);
|
1134 |
+
}
|
1135 |
+
}
|
1136 |
+
if(o.axis!=="y"){
|
1137 |
+
if(d.overflowed[1] && !disabled){
|
1138 |
+
scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block");
|
1139 |
+
content.removeClass(classes[9]+" "+classes[11]);
|
1140 |
+
}else{
|
1141 |
+
if(o.alwaysShowScrollbar){
|
1142 |
+
if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none");}
|
1143 |
+
content.removeClass(classes[11]);
|
1144 |
+
}else{
|
1145 |
+
scrollbar[1].css("display","none");
|
1146 |
+
content.addClass(classes[11]);
|
1147 |
+
}
|
1148 |
+
content.addClass(classes[9]);
|
1149 |
+
}
|
1150 |
+
}
|
1151 |
+
if(!d.overflowed[0] && !d.overflowed[1]){
|
1152 |
+
$this.addClass(classes[5]);
|
1153 |
+
}else{
|
1154 |
+
$this.removeClass(classes[5]);
|
1155 |
+
}
|
1156 |
+
},
|
1157 |
+
/* -------------------- */
|
1158 |
+
|
1159 |
+
|
1160 |
+
/* returns input coordinates of pointer, touch and mouse events (relative to document) */
|
1161 |
+
_coordinates=function(e){
|
1162 |
+
var t=e.type,o=e.target.ownerDocument!==document && frameElement!==null ? [$(frameElement).offset().top,$(frameElement).offset().left] : null,
|
1163 |
+
io=_canAccessIFrame() && e.target.ownerDocument!==top.document && frameElement!==null ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0];
|
1164 |
+
switch(t){
|
1165 |
+
case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp":
|
1166 |
+
return o ? [e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],false] : [e.originalEvent.pageY,e.originalEvent.pageX,false];
|
1167 |
+
break;
|
1168 |
+
case "touchstart": case "touchmove": case "touchend":
|
1169 |
+
var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0],
|
1170 |
+
touches=e.originalEvent.touches.length || e.originalEvent.changedTouches.length;
|
1171 |
+
return e.target.ownerDocument!==document ? [touch.screenY,touch.screenX,touches>1] : [touch.pageY,touch.pageX,touches>1];
|
1172 |
+
break;
|
1173 |
+
default:
|
1174 |
+
return o ? [e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],false] : [e.pageY,e.pageX,false];
|
1175 |
+
}
|
1176 |
+
},
|
1177 |
+
/* -------------------- */
|
1178 |
+
|
1179 |
+
|
1180 |
+
/*
|
1181 |
+
SCROLLBAR DRAG EVENTS
|
1182 |
+
scrolls content via scrollbar dragging
|
1183 |
+
*/
|
1184 |
+
_draggable=function(){
|
1185 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1186 |
+
namespace=pluginPfx+"_"+d.idx,
|
1187 |
+
draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],
|
1188 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1189 |
+
mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]),
|
1190 |
+
draggable,dragY,dragX,
|
1191 |
+
rds=o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger,
|
1192 |
+
eds=o.advanced.extraDraggableSelectors ? $(!_canAccessIFrame() || top.document).add($(o.advanced.extraDraggableSelectors)) : $(!_canAccessIFrame() || top.document);
|
1193 |
+
mCSB_dragger.bind("contextmenu."+namespace,function(e){
|
1194 |
+
e.preventDefault(); //prevent right click
|
1195 |
+
}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){
|
1196 |
+
e.stopImmediatePropagation();
|
1197 |
+
e.preventDefault();
|
1198 |
+
if(!_mouseBtnLeft(e)){return;} /* left mouse button only */
|
1199 |
+
touchActive=true;
|
1200 |
+
if(oldIE){document.onselectstart=function(){return false;}} /* disable text selection for IE < 9 */
|
1201 |
+
_iframe.call(mCSB_container,false); /* enable scrollbar dragging over iframes by disabling their events */
|
1202 |
+
_stop($this);
|
1203 |
+
draggable=$(this);
|
1204 |
+
var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,
|
1205 |
+
h=draggable.height()+offset.top,w=draggable.width()+offset.left;
|
1206 |
+
if(y<h && y>0 && x<w && x>0){
|
1207 |
+
dragY=y;
|
1208 |
+
dragX=x;
|
1209 |
+
}
|
1210 |
+
_onDragClasses(draggable,"active",o.autoExpandScrollbar);
|
1211 |
+
}).bind("touchmove."+namespace,function(e){
|
1212 |
+
e.stopImmediatePropagation();
|
1213 |
+
e.preventDefault();
|
1214 |
+
var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;
|
1215 |
+
_drag(dragY,dragX,y,x);
|
1216 |
+
});
|
1217 |
+
$(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){
|
1218 |
+
if(draggable){
|
1219 |
+
var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;
|
1220 |
+
if(dragY===y && dragX===x){return;} /* has it really moved? */
|
1221 |
+
_drag(dragY,dragX,y,x);
|
1222 |
+
}
|
1223 |
+
}).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){
|
1224 |
+
if(draggable){
|
1225 |
+
_onDragClasses(draggable,"active",o.autoExpandScrollbar);
|
1226 |
+
draggable=null;
|
1227 |
+
}
|
1228 |
+
touchActive=false;
|
1229 |
+
if(oldIE){document.onselectstart=null;} /* enable text selection for IE < 9 */
|
1230 |
+
_iframe.call(mCSB_container,true); /* enable iframes events */
|
1231 |
+
});
|
1232 |
+
function _drag(dragY,dragX,y,x){
|
1233 |
+
mCSB_container[0].idleTimer=o.scrollInertia<233 ? 250 : 0;
|
1234 |
+
if(draggable.attr("id")===draggerId[1]){
|
1235 |
+
var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x;
|
1236 |
+
}else{
|
1237 |
+
var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y;
|
1238 |
+
}
|
1239 |
+
_scrollTo($this,to.toString(),{dir:dir,drag:true});
|
1240 |
+
}
|
1241 |
+
},
|
1242 |
+
/* -------------------- */
|
1243 |
+
|
1244 |
+
|
1245 |
+
/*
|
1246 |
+
TOUCH SWIPE EVENTS
|
1247 |
+
scrolls content via touch swipe
|
1248 |
+
Emulates the native touch-swipe scrolling with momentum found in iOS, Android and WP devices
|
1249 |
+
*/
|
1250 |
+
_contentDraggable=function(){
|
1251 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1252 |
+
namespace=pluginPfx+"_"+d.idx,
|
1253 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1254 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1255 |
+
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
1256 |
+
draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount,
|
1257 |
+
durA=0,durB,overwrite=o.axis==="yx" ? "none" : "all",touchIntent=[],touchDrag,docDrag,
|
1258 |
+
iframe=mCSB_container.find("iframe"),
|
1259 |
+
events=[
|
1260 |
+
"touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace, //start
|
1261 |
+
"touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace, //move
|
1262 |
+
"touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace //end
|
1263 |
+
],
|
1264 |
+
touchAction=document.body.style.touchAction!==undefined && document.body.style.touchAction!=="";
|
1265 |
+
mCSB_container.bind(events[0],function(e){
|
1266 |
+
_onTouchstart(e);
|
1267 |
+
}).bind(events[1],function(e){
|
1268 |
+
_onTouchmove(e);
|
1269 |
+
});
|
1270 |
+
mCustomScrollBox.bind(events[0],function(e){
|
1271 |
+
_onTouchstart2(e);
|
1272 |
+
}).bind(events[2],function(e){
|
1273 |
+
_onTouchend(e);
|
1274 |
+
});
|
1275 |
+
if(iframe.length){
|
1276 |
+
iframe.each(function(){
|
1277 |
+
$(this).bind("load",function(){
|
1278 |
+
/* bind events on accessible iframes */
|
1279 |
+
if(_canAccessIFrame(this)){
|
1280 |
+
$(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){
|
1281 |
+
_onTouchstart(e);
|
1282 |
+
_onTouchstart2(e);
|
1283 |
+
}).bind(events[1],function(e){
|
1284 |
+
_onTouchmove(e);
|
1285 |
+
}).bind(events[2],function(e){
|
1286 |
+
_onTouchend(e);
|
1287 |
+
});
|
1288 |
+
}
|
1289 |
+
});
|
1290 |
+
});
|
1291 |
+
}
|
1292 |
+
function _onTouchstart(e){
|
1293 |
+
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;}
|
1294 |
+
touchable=1; touchDrag=0; docDrag=0; draggable=1;
|
1295 |
+
$this.removeClass("mCS_touch_action");
|
1296 |
+
var offset=mCSB_container.offset();
|
1297 |
+
dragY=_coordinates(e)[0]-offset.top;
|
1298 |
+
dragX=_coordinates(e)[1]-offset.left;
|
1299 |
+
touchIntent=[_coordinates(e)[0],_coordinates(e)[1]];
|
1300 |
+
}
|
1301 |
+
function _onTouchmove(e){
|
1302 |
+
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;}
|
1303 |
+
if(!o.documentTouchScroll){e.preventDefault();}
|
1304 |
+
e.stopImmediatePropagation();
|
1305 |
+
if(docDrag && !touchDrag){return;}
|
1306 |
+
if(draggable){
|
1307 |
+
runningTime=_getTime();
|
1308 |
+
var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,
|
1309 |
+
easing="mcsLinearOut";
|
1310 |
+
touchMoveY.push(y);
|
1311 |
+
touchMoveX.push(x);
|
1312 |
+
touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]); touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]);
|
1313 |
+
if(d.overflowed[0]){
|
1314 |
+
var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),
|
1315 |
+
prevent=((dragY-y)>0 && (y-dragY)>-(limit*d.scrollRatio.y) && (touchIntent[3]*2<touchIntent[2] || o.axis==="yx"));
|
1316 |
+
}
|
1317 |
+
if(d.overflowed[1]){
|
1318 |
+
var limitX=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),
|
1319 |
+
preventX=((dragX-x)>0 && (x-dragX)>-(limitX*d.scrollRatio.x) && (touchIntent[2]*2<touchIntent[3] || o.axis==="yx"));
|
1320 |
+
}
|
1321 |
+
if(prevent || preventX){ /* prevent native document scrolling */
|
1322 |
+
if(!touchAction){e.preventDefault();}
|
1323 |
+
touchDrag=1;
|
1324 |
+
}else{
|
1325 |
+
docDrag=1;
|
1326 |
+
$this.addClass("mCS_touch_action");
|
1327 |
+
}
|
1328 |
+
if(touchAction){e.preventDefault();}
|
1329 |
+
amount=o.axis==="yx" ? [(dragY-y),(dragX-x)] : o.axis==="x" ? [null,(dragX-x)] : [(dragY-y),null];
|
1330 |
+
mCSB_container[0].idleTimer=250;
|
1331 |
+
if(d.overflowed[0]){_drag(amount[0],durA,easing,"y","all",true);}
|
1332 |
+
if(d.overflowed[1]){_drag(amount[1],durA,easing,"x",overwrite,true);}
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
+
function _onTouchstart2(e){
|
1336 |
+
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;}
|
1337 |
+
touchable=1;
|
1338 |
+
e.stopImmediatePropagation();
|
1339 |
+
_stop($this);
|
1340 |
+
startTime=_getTime();
|
1341 |
+
var offset=mCustomScrollBox.offset();
|
1342 |
+
touchStartY=_coordinates(e)[0]-offset.top;
|
1343 |
+
touchStartX=_coordinates(e)[1]-offset.left;
|
1344 |
+
touchMoveY=[]; touchMoveX=[];
|
1345 |
+
}
|
1346 |
+
function _onTouchend(e){
|
1347 |
+
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;}
|
1348 |
+
draggable=0;
|
1349 |
+
e.stopImmediatePropagation();
|
1350 |
+
touchDrag=0; docDrag=0;
|
1351 |
+
endTime=_getTime();
|
1352 |
+
var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;
|
1353 |
+
if((endTime-runningTime)>30){return;}
|
1354 |
+
speed=1000/(endTime-startTime);
|
1355 |
+
var easing="mcsEaseOut",slow=speed<2.5,
|
1356 |
+
diff=slow ? [touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]] : [0,0];
|
1357 |
+
distance=slow ? [(y-diff[0]),(x-diff[1])] : [y-touchStartY,x-touchStartX];
|
1358 |
+
var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])];
|
1359 |
+
speed=slow ? [Math.abs(distance[0]/4),Math.abs(distance[1]/4)] : [speed,speed];
|
1360 |
+
var a=[
|
1361 |
+
Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])),
|
1362 |
+
Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1]))
|
1363 |
+
];
|
1364 |
+
amount=o.axis==="yx" ? [a[0],a[1]] : o.axis==="x" ? [null,a[1]] : [a[0],null];
|
1365 |
+
durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia];
|
1366 |
+
var md=parseInt(o.contentTouchScroll) || 0; /* absolute minimum distance required */
|
1367 |
+
amount[0]=absDistance[0]>md ? amount[0] : 0;
|
1368 |
+
amount[1]=absDistance[1]>md ? amount[1] : 0;
|
1369 |
+
if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,false);}
|
1370 |
+
if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,false);}
|
1371 |
+
}
|
1372 |
+
function _m(ds,s){
|
1373 |
+
var r=[s*1.5,s*2,s/1.5,s/2];
|
1374 |
+
if(ds>90){
|
1375 |
+
return s>4 ? r[0] : r[3];
|
1376 |
+
}else if(ds>60){
|
1377 |
+
return s>3 ? r[3] : r[2];
|
1378 |
+
}else if(ds>30){
|
1379 |
+
return s>8 ? r[1] : s>6 ? r[0] : s>4 ? s : r[2];
|
1380 |
+
}else{
|
1381 |
+
return s>8 ? s : r[3];
|
1382 |
+
}
|
1383 |
+
}
|
1384 |
+
function _drag(amount,dur,easing,dir,overwrite,drag){
|
1385 |
+
if(!amount){return;}
|
1386 |
+
_scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag});
|
1387 |
+
}
|
1388 |
+
},
|
1389 |
+
/* -------------------- */
|
1390 |
+
|
1391 |
+
|
1392 |
+
/*
|
1393 |
+
SELECT TEXT EVENTS
|
1394 |
+
scrolls content when text is selected
|
1395 |
+
*/
|
1396 |
+
_selectable=function(){
|
1397 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,
|
1398 |
+
namespace=pluginPfx+"_"+d.idx,
|
1399 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1400 |
+
wrapper=mCSB_container.parent(),
|
1401 |
+
action;
|
1402 |
+
mCSB_container.bind("mousedown."+namespace,function(e){
|
1403 |
+
if(touchable){return;}
|
1404 |
+
if(!action){action=1; touchActive=true;}
|
1405 |
+
}).add(document).bind("mousemove."+namespace,function(e){
|
1406 |
+
if(!touchable && action && _sel()){
|
1407 |
+
var offset=mCSB_container.offset(),
|
1408 |
+
y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft;
|
1409 |
+
if(y>0 && y<wrapper.height() && x>0 && x<wrapper.width()){
|
1410 |
+
if(seq.step){_seq("off",null,"stepped");}
|
1411 |
+
}else{
|
1412 |
+
if(o.axis!=="x" && d.overflowed[0]){
|
1413 |
+
if(y<0){
|
1414 |
+
_seq("on",38);
|
1415 |
+
}else if(y>wrapper.height()){
|
1416 |
+
_seq("on",40);
|
1417 |
+
}
|
1418 |
+
}
|
1419 |
+
if(o.axis!=="y" && d.overflowed[1]){
|
1420 |
+
if(x<0){
|
1421 |
+
_seq("on",37);
|
1422 |
+
}else if(x>wrapper.width()){
|
1423 |
+
_seq("on",39);
|
1424 |
+
}
|
1425 |
+
}
|
1426 |
+
}
|
1427 |
+
}
|
1428 |
+
}).bind("mouseup."+namespace+" dragend."+namespace,function(e){
|
1429 |
+
if(touchable){return;}
|
1430 |
+
if(action){action=0; _seq("off",null);}
|
1431 |
+
touchActive=false;
|
1432 |
+
});
|
1433 |
+
function _sel(){
|
1434 |
+
return window.getSelection ? window.getSelection().toString() :
|
1435 |
+
document.selection && document.selection.type!="Control" ? document.selection.createRange().text : 0;
|
1436 |
+
}
|
1437 |
+
function _seq(a,c,s){
|
1438 |
+
seq.type=s && action ? "stepped" : "stepless";
|
1439 |
+
seq.scrollAmount=10;
|
1440 |
+
_sequentialScroll($this,a,c,"mcsLinearOut",s ? 60 : null);
|
1441 |
+
}
|
1442 |
+
},
|
1443 |
+
/* -------------------- */
|
1444 |
+
|
1445 |
+
|
1446 |
+
/*
|
1447 |
+
MOUSE WHEEL EVENT
|
1448 |
+
scrolls content via mouse-wheel
|
1449 |
+
via mouse-wheel plugin (https://github.com/brandonaaron/jquery-mousewheel)
|
1450 |
+
*/
|
1451 |
+
_mousewheel=function(){
|
1452 |
+
if(!$(this).data(pluginPfx)){return;} /* Check if the scrollbar is ready to use mousewheel events (issue: #185) */
|
1453 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1454 |
+
namespace=pluginPfx+"_"+d.idx,
|
1455 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1456 |
+
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
1457 |
+
iframe=$("#mCSB_"+d.idx+"_container").find("iframe");
|
1458 |
+
if(iframe.length){
|
1459 |
+
iframe.each(function(){
|
1460 |
+
$(this).bind("load",function(){
|
1461 |
+
/* bind events on accessible iframes */
|
1462 |
+
if(_canAccessIFrame(this)){
|
1463 |
+
$(this.contentDocument || this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){
|
1464 |
+
_onMousewheel(e,delta);
|
1465 |
+
});
|
1466 |
+
}
|
1467 |
+
});
|
1468 |
+
});
|
1469 |
+
}
|
1470 |
+
mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){
|
1471 |
+
_onMousewheel(e,delta);
|
1472 |
+
});
|
1473 |
+
function _onMousewheel(e,delta){
|
1474 |
+
_stop($this);
|
1475 |
+
if(_disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */
|
1476 |
+
var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor || 100,
|
1477 |
+
dur=o.scrollInertia;
|
1478 |
+
if(o.axis==="x" || o.mouseWheel.axis==="x"){
|
1479 |
+
var dir="x",
|
1480 |
+
px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)],
|
1481 |
+
amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.width() ? mCustomScrollBox.width()*0.9 : px[0],
|
1482 |
+
contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft),
|
1483 |
+
draggerPos=mCSB_dragger[1][0].offsetLeft,
|
1484 |
+
limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),
|
1485 |
+
dlt=o.mouseWheel.axis==="y" ? (e.deltaY || delta) : e.deltaX;
|
1486 |
+
}else{
|
1487 |
+
var dir="y",
|
1488 |
+
px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)],
|
1489 |
+
amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.height() ? mCustomScrollBox.height()*0.9 : px[0],
|
1490 |
+
contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop),
|
1491 |
+
draggerPos=mCSB_dragger[0][0].offsetTop,
|
1492 |
+
limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),
|
1493 |
+
dlt=e.deltaY || delta;
|
1494 |
+
}
|
1495 |
+
if((dir==="y" && !d.overflowed[0]) || (dir==="x" && !d.overflowed[1])){return;}
|
1496 |
+
if(o.mouseWheel.invert || e.webkitDirectionInvertedFromDevice){dlt=-dlt;}
|
1497 |
+
if(o.mouseWheel.normalizeDelta){dlt=dlt<0 ? -1 : 1;}
|
1498 |
+
if((dlt>0 && draggerPos!==0) || (dlt<0 && draggerPos!==limit) || o.mouseWheel.preventDefault){
|
1499 |
+
e.stopImmediatePropagation();
|
1500 |
+
e.preventDefault();
|
1501 |
+
}
|
1502 |
+
if(e.deltaFactor<5 && !o.mouseWheel.normalizeDelta){
|
1503 |
+
//very low deltaFactor values mean some kind of delta acceleration (e.g. osx trackpad), so adjusting scrolling accordingly
|
1504 |
+
amount=e.deltaFactor; dur=17;
|
1505 |
+
}
|
1506 |
+
_scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur});
|
1507 |
+
}
|
1508 |
+
},
|
1509 |
+
/* -------------------- */
|
1510 |
+
|
1511 |
+
|
1512 |
+
/* checks if iframe can be accessed */
|
1513 |
+
_canAccessIFrameCache=new Object(),
|
1514 |
+
_canAccessIFrame=function(iframe){
|
1515 |
+
var result=false,cacheKey=false,html=null;
|
1516 |
+
if(iframe===undefined){
|
1517 |
+
cacheKey="#empty";
|
1518 |
+
}else if($(iframe).attr("id")!==undefined){
|
1519 |
+
cacheKey=$(iframe).attr("id");
|
1520 |
+
}
|
1521 |
+
if(cacheKey!==false && _canAccessIFrameCache[cacheKey]!==undefined){
|
1522 |
+
return _canAccessIFrameCache[cacheKey];
|
1523 |
+
}
|
1524 |
+
if(!iframe){
|
1525 |
+
try{
|
1526 |
+
var doc=top.document;
|
1527 |
+
html=doc.body.innerHTML;
|
1528 |
+
}catch(err){/* do nothing */}
|
1529 |
+
result=(html!==null);
|
1530 |
+
}else{
|
1531 |
+
try{
|
1532 |
+
var doc=iframe.contentDocument || iframe.contentWindow.document;
|
1533 |
+
html=doc.body.innerHTML;
|
1534 |
+
}catch(err){/* do nothing */}
|
1535 |
+
result=(html!==null);
|
1536 |
+
}
|
1537 |
+
if(cacheKey!==false){_canAccessIFrameCache[cacheKey]=result;}
|
1538 |
+
return result;
|
1539 |
+
},
|
1540 |
+
/* -------------------- */
|
1541 |
+
|
1542 |
+
|
1543 |
+
/* switches iframe's pointer-events property (drag, mousewheel etc. over cross-domain iframes) */
|
1544 |
+
_iframe=function(evt){
|
1545 |
+
var el=this.find("iframe");
|
1546 |
+
if(!el.length){return;} /* check if content contains iframes */
|
1547 |
+
var val=!evt ? "none" : "auto";
|
1548 |
+
el.css("pointer-events",val); /* for IE11, iframe's display property should not be "block" */
|
1549 |
+
},
|
1550 |
+
/* -------------------- */
|
1551 |
+
|
1552 |
+
|
1553 |
+
/* disables mouse-wheel when hovering specific elements like select, datalist etc. */
|
1554 |
+
_disableMousewheel=function(el,target){
|
1555 |
+
var tag=target.nodeName.toLowerCase(),
|
1556 |
+
tags=el.data(pluginPfx).opt.mouseWheel.disableOver,
|
1557 |
+
/* elements that require focus */
|
1558 |
+
focusTags=["select","textarea"];
|
1559 |
+
return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus"));
|
1560 |
+
},
|
1561 |
+
/* -------------------- */
|
1562 |
+
|
1563 |
+
|
1564 |
+
/*
|
1565 |
+
DRAGGER RAIL CLICK EVENT
|
1566 |
+
scrolls content via dragger rail
|
1567 |
+
*/
|
1568 |
+
_draggerRail=function(){
|
1569 |
+
var $this=$(this),d=$this.data(pluginPfx),
|
1570 |
+
namespace=pluginPfx+"_"+d.idx,
|
1571 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1572 |
+
wrapper=mCSB_container.parent(),
|
1573 |
+
mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]),
|
1574 |
+
clickable;
|
1575 |
+
mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){
|
1576 |
+
touchActive=true;
|
1577 |
+
if(!$(e.target).hasClass("mCSB_dragger")){clickable=1;}
|
1578 |
+
}).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){
|
1579 |
+
touchActive=false;
|
1580 |
+
}).bind("click."+namespace,function(e){
|
1581 |
+
if(!clickable){return;}
|
1582 |
+
clickable=0;
|
1583 |
+
if($(e.target).hasClass(classes[12]) || $(e.target).hasClass("mCSB_draggerRail")){
|
1584 |
+
_stop($this);
|
1585 |
+
var el=$(this),mCSB_dragger=el.find(".mCSB_dragger");
|
1586 |
+
if(el.parent(".mCSB_scrollTools_horizontal").length>0){
|
1587 |
+
if(!d.overflowed[1]){return;}
|
1588 |
+
var dir="x",
|
1589 |
+
clickDir=e.pageX>mCSB_dragger.offset().left ? -1 : 1,
|
1590 |
+
to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9));
|
1591 |
+
}else{
|
1592 |
+
if(!d.overflowed[0]){return;}
|
1593 |
+
var dir="y",
|
1594 |
+
clickDir=e.pageY>mCSB_dragger.offset().top ? -1 : 1,
|
1595 |
+
to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9));
|
1596 |
+
}
|
1597 |
+
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"});
|
1598 |
+
}
|
1599 |
+
});
|
1600 |
+
},
|
1601 |
+
/* -------------------- */
|
1602 |
+
|
1603 |
+
|
1604 |
+
/*
|
1605 |
+
FOCUS EVENT
|
1606 |
+
scrolls content via element focus (e.g. clicking an input, pressing TAB key etc.)
|
1607 |
+
*/
|
1608 |
+
_focus=function(){
|
1609 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1610 |
+
namespace=pluginPfx+"_"+d.idx,
|
1611 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1612 |
+
wrapper=mCSB_container.parent();
|
1613 |
+
mCSB_container.bind("focusin."+namespace,function(e){
|
1614 |
+
var el=$(document.activeElement),
|
1615 |
+
nested=mCSB_container.find(".mCustomScrollBox").length,
|
1616 |
+
dur=0;
|
1617 |
+
if(!el.is(o.advanced.autoScrollOnFocus)){return;}
|
1618 |
+
_stop($this);
|
1619 |
+
clearTimeout($this[0]._focusTimeout);
|
1620 |
+
$this[0]._focusTimer=nested ? (dur+17)*nested : 0;
|
1621 |
+
$this[0]._focusTimeout=setTimeout(function(){
|
1622 |
+
var to=[_childPos(el)[0],_childPos(el)[1]],
|
1623 |
+
contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft],
|
1624 |
+
isVisible=[
|
1625 |
+
(contentPos[0]+to[0]>=0 && contentPos[0]+to[0]<wrapper.height()-el.outerHeight(false)),
|
1626 |
+
(contentPos[1]+to[1]>=0 && contentPos[0]+to[1]<wrapper.width()-el.outerWidth(false))
|
1627 |
+
],
|
1628 |
+
overwrite=(o.axis==="yx" && !isVisible[0] && !isVisible[1]) ? "none" : "all";
|
1629 |
+
if(o.axis!=="x" && !isVisible[0]){
|
1630 |
+
_scrollTo($this,to[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur});
|
1631 |
+
}
|
1632 |
+
if(o.axis!=="y" && !isVisible[1]){
|
1633 |
+
_scrollTo($this,to[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur});
|
1634 |
+
}
|
1635 |
+
},$this[0]._focusTimer);
|
1636 |
+
});
|
1637 |
+
},
|
1638 |
+
/* -------------------- */
|
1639 |
+
|
1640 |
+
|
1641 |
+
/* sets content wrapper scrollTop/scrollLeft always to 0 */
|
1642 |
+
_wrapperScroll=function(){
|
1643 |
+
var $this=$(this),d=$this.data(pluginPfx),
|
1644 |
+
namespace=pluginPfx+"_"+d.idx,
|
1645 |
+
wrapper=$("#mCSB_"+d.idx+"_container").parent();
|
1646 |
+
wrapper.bind("scroll."+namespace,function(e){
|
1647 |
+
if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){
|
1648 |
+
$(".mCSB_"+d.idx+"_scrollbar").css("visibility","hidden"); /* hide scrollbar(s) */
|
1649 |
+
}
|
1650 |
+
});
|
1651 |
+
},
|
1652 |
+
/* -------------------- */
|
1653 |
+
|
1654 |
+
|
1655 |
+
/*
|
1656 |
+
BUTTONS EVENTS
|
1657 |
+
scrolls content via up, down, left and right buttons
|
1658 |
+
*/
|
1659 |
+
_buttons=function(){
|
1660 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,
|
1661 |
+
namespace=pluginPfx+"_"+d.idx,
|
1662 |
+
sel=".mCSB_"+d.idx+"_scrollbar",
|
1663 |
+
btn=$(sel+">a");
|
1664 |
+
btn.bind("contextmenu."+namespace,function(e){
|
1665 |
+
e.preventDefault(); //prevent right click
|
1666 |
+
}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){
|
1667 |
+
e.preventDefault();
|
1668 |
+
if(!_mouseBtnLeft(e)){return;} /* left mouse button only */
|
1669 |
+
var btnClass=$(this).attr("class");
|
1670 |
+
seq.type=o.scrollButtons.scrollType;
|
1671 |
+
switch(e.type){
|
1672 |
+
case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown":
|
1673 |
+
if(seq.type==="stepped"){return;}
|
1674 |
+
touchActive=true;
|
1675 |
+
d.tweenRunning=false;
|
1676 |
+
_seq("on",btnClass);
|
1677 |
+
break;
|
1678 |
+
case "mouseup": case "touchend": case "pointerup": case "MSPointerUp":
|
1679 |
+
case "mouseout": case "pointerout": case "MSPointerOut":
|
1680 |
+
if(seq.type==="stepped"){return;}
|
1681 |
+
touchActive=false;
|
1682 |
+
if(seq.dir){_seq("off",btnClass);}
|
1683 |
+
break;
|
1684 |
+
case "click":
|
1685 |
+
if(seq.type!=="stepped" || d.tweenRunning){return;}
|
1686 |
+
_seq("on",btnClass);
|
1687 |
+
break;
|
1688 |
+
}
|
1689 |
+
function _seq(a,c){
|
1690 |
+
seq.scrollAmount=o.scrollButtons.scrollAmount;
|
1691 |
+
_sequentialScroll($this,a,c);
|
1692 |
+
}
|
1693 |
+
});
|
1694 |
+
},
|
1695 |
+
/* -------------------- */
|
1696 |
+
|
1697 |
+
|
1698 |
+
/*
|
1699 |
+
KEYBOARD EVENTS
|
1700 |
+
scrolls content via keyboard
|
1701 |
+
Keys: up arrow, down arrow, left arrow, right arrow, PgUp, PgDn, Home, End
|
1702 |
+
*/
|
1703 |
+
_keyboard=function(){
|
1704 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,
|
1705 |
+
namespace=pluginPfx+"_"+d.idx,
|
1706 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1707 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1708 |
+
wrapper=mCSB_container.parent(),
|
1709 |
+
editables="input,textarea,select,datalist,keygen,[contenteditable='true']",
|
1710 |
+
iframe=mCSB_container.find("iframe"),
|
1711 |
+
events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace];
|
1712 |
+
if(iframe.length){
|
1713 |
+
iframe.each(function(){
|
1714 |
+
$(this).bind("load",function(){
|
1715 |
+
/* bind events on accessible iframes */
|
1716 |
+
if(_canAccessIFrame(this)){
|
1717 |
+
$(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){
|
1718 |
+
_onKeyboard(e);
|
1719 |
+
});
|
1720 |
+
}
|
1721 |
+
});
|
1722 |
+
});
|
1723 |
+
}
|
1724 |
+
mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){
|
1725 |
+
_onKeyboard(e);
|
1726 |
+
});
|
1727 |
+
function _onKeyboard(e){
|
1728 |
+
switch(e.type){
|
1729 |
+
case "blur":
|
1730 |
+
if(d.tweenRunning && seq.dir){_seq("off",null);}
|
1731 |
+
break;
|
1732 |
+
case "keydown": case "keyup":
|
1733 |
+
var code=e.keyCode ? e.keyCode : e.which,action="on";
|
1734 |
+
if((o.axis!=="x" && (code===38 || code===40)) || (o.axis!=="y" && (code===37 || code===39))){
|
1735 |
+
/* up (38), down (40), left (37), right (39) arrows */
|
1736 |
+
if(((code===38 || code===40) && !d.overflowed[0]) || ((code===37 || code===39) && !d.overflowed[1])){return;}
|
1737 |
+
if(e.type==="keyup"){action="off";}
|
1738 |
+
if(!$(document.activeElement).is(editables)){
|
1739 |
+
e.preventDefault();
|
1740 |
+
e.stopImmediatePropagation();
|
1741 |
+
_seq(action,code);
|
1742 |
+
}
|
1743 |
+
}else if(code===33 || code===34){
|
1744 |
+
/* PgUp (33), PgDn (34) */
|
1745 |
+
if(d.overflowed[0] || d.overflowed[1]){
|
1746 |
+
e.preventDefault();
|
1747 |
+
e.stopImmediatePropagation();
|
1748 |
+
}
|
1749 |
+
if(e.type==="keyup"){
|
1750 |
+
_stop($this);
|
1751 |
+
var keyboardDir=code===34 ? -1 : 1;
|
1752 |
+
if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){
|
1753 |
+
var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9));
|
1754 |
+
}else{
|
1755 |
+
var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9));
|
1756 |
+
}
|
1757 |
+
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"});
|
1758 |
+
}
|
1759 |
+
}else if(code===35 || code===36){
|
1760 |
+
/* End (35), Home (36) */
|
1761 |
+
if(!$(document.activeElement).is(editables)){
|
1762 |
+
if(d.overflowed[0] || d.overflowed[1]){
|
1763 |
+
e.preventDefault();
|
1764 |
+
e.stopImmediatePropagation();
|
1765 |
+
}
|
1766 |
+
if(e.type==="keyup"){
|
1767 |
+
if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){
|
1768 |
+
var dir="x",to=code===35 ? Math.abs(wrapper.width()-mCSB_container.outerWidth(false)) : 0;
|
1769 |
+
}else{
|
1770 |
+
var dir="y",to=code===35 ? Math.abs(wrapper.height()-mCSB_container.outerHeight(false)) : 0;
|
1771 |
+
}
|
1772 |
+
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"});
|
1773 |
+
}
|
1774 |
+
}
|
1775 |
+
}
|
1776 |
+
break;
|
1777 |
+
}
|
1778 |
+
function _seq(a,c){
|
1779 |
+
seq.type=o.keyboard.scrollType;
|
1780 |
+
seq.scrollAmount=o.keyboard.scrollAmount;
|
1781 |
+
if(seq.type==="stepped" && d.tweenRunning){return;}
|
1782 |
+
_sequentialScroll($this,a,c);
|
1783 |
+
}
|
1784 |
+
}
|
1785 |
+
},
|
1786 |
+
/* -------------------- */
|
1787 |
+
|
1788 |
+
|
1789 |
+
/* scrolls content sequentially (used when scrolling via buttons, keyboard arrows etc.) */
|
1790 |
+
_sequentialScroll=function(el,action,trigger,e,s){
|
1791 |
+
var d=el.data(pluginPfx),o=d.opt,seq=d.sequential,
|
1792 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1793 |
+
once=seq.type==="stepped" ? true : false,
|
1794 |
+
steplessSpeed=o.scrollInertia < 26 ? 26 : o.scrollInertia, /* 26/1.5=17 */
|
1795 |
+
steppedSpeed=o.scrollInertia < 1 ? 17 : o.scrollInertia;
|
1796 |
+
switch(action){
|
1797 |
+
case "on":
|
1798 |
+
seq.dir=[
|
1799 |
+
(trigger===classes[16] || trigger===classes[15] || trigger===39 || trigger===37 ? "x" : "y"),
|
1800 |
+
(trigger===classes[13] || trigger===classes[15] || trigger===38 || trigger===37 ? -1 : 1)
|
1801 |
+
];
|
1802 |
+
_stop(el);
|
1803 |
+
if(_isNumeric(trigger) && seq.type==="stepped"){return;}
|
1804 |
+
_on(once);
|
1805 |
+
break;
|
1806 |
+
case "off":
|
1807 |
+
_off();
|
1808 |
+
if(once || (d.tweenRunning && seq.dir)){
|
1809 |
+
_on(true);
|
1810 |
+
}
|
1811 |
+
break;
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
/* starts sequence */
|
1815 |
+
function _on(once){
|
1816 |
+
if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : seq.dir[0]==="x" ? o.snapAmount[1] : o.snapAmount[0];} /* scrolling snapping */
|
1817 |
+
var c=seq.type!=="stepped", /* continuous scrolling */
|
1818 |
+
t=s ? s : !once ? 1000/60 : c ? steplessSpeed/1.5 : steppedSpeed, /* timer */
|
1819 |
+
m=!once ? 2.5 : c ? 7.5 : 40, /* multiplier */
|
1820 |
+
contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)],
|
1821 |
+
ratio=[d.scrollRatio.y>10 ? 10 : d.scrollRatio.y,d.scrollRatio.x>10 ? 10 : d.scrollRatio.x],
|
1822 |
+
amount=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*(ratio[1]*m)) : contentPos[0]+(seq.dir[1]*(ratio[0]*m)),
|
1823 |
+
px=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)) : contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)),
|
1824 |
+
to=seq.scrollAmount!=="auto" ? px : amount,
|
1825 |
+
easing=e ? e : !once ? "mcsLinear" : c ? "mcsLinearOut" : "mcsEaseInOut",
|
1826 |
+
onComplete=!once ? false : true;
|
1827 |
+
if(once && t<17){
|
1828 |
+
to=seq.dir[0]==="x" ? contentPos[1] : contentPos[0];
|
1829 |
+
}
|
1830 |
+
_scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete});
|
1831 |
+
if(once){
|
1832 |
+
seq.dir=false;
|
1833 |
+
return;
|
1834 |
+
}
|
1835 |
+
clearTimeout(seq.step);
|
1836 |
+
seq.step=setTimeout(function(){
|
1837 |
+
_on();
|
1838 |
+
},t);
|
1839 |
+
}
|
1840 |
+
/* stops sequence */
|
1841 |
+
function _off(){
|
1842 |
+
clearTimeout(seq.step);
|
1843 |
+
_delete(seq,"step");
|
1844 |
+
_stop(el);
|
1845 |
+
}
|
1846 |
+
},
|
1847 |
+
/* -------------------- */
|
1848 |
+
|
1849 |
+
|
1850 |
+
/* returns a yx array from value */
|
1851 |
+
_arr=function(val){
|
1852 |
+
var o=$(this).data(pluginPfx).opt,vals=[];
|
1853 |
+
if(typeof val==="function"){val=val();} /* check if the value is a single anonymous function */
|
1854 |
+
/* check if value is object or array, its length and create an array with yx values */
|
1855 |
+
if(!(val instanceof Array)){ /* object value (e.g. {y:"100",x:"100"}, 100 etc.) */
|
1856 |
+
vals[0]=val.y ? val.y : val.x || o.axis==="x" ? null : val;
|
1857 |
+
vals[1]=val.x ? val.x : val.y || o.axis==="y" ? null : val;
|
1858 |
+
}else{ /* array value (e.g. [100,100]) */
|
1859 |
+
vals=val.length>1 ? [val[0],val[1]] : o.axis==="x" ? [null,val[0]] : [val[0],null];
|
1860 |
+
}
|
1861 |
+
/* check if array values are anonymous functions */
|
1862 |
+
if(typeof vals[0]==="function"){vals[0]=vals[0]();}
|
1863 |
+
if(typeof vals[1]==="function"){vals[1]=vals[1]();}
|
1864 |
+
return vals;
|
1865 |
+
},
|
1866 |
+
/* -------------------- */
|
1867 |
+
|
1868 |
+
|
1869 |
+
/* translates values (e.g. "top", 100, "100px", "#id") to actual scroll-to positions */
|
1870 |
+
_to=function(val,dir){
|
1871 |
+
if(val==null || typeof val=="undefined"){return;}
|
1872 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1873 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1874 |
+
wrapper=mCSB_container.parent(),
|
1875 |
+
t=typeof val;
|
1876 |
+
if(!dir){dir=o.axis==="x" ? "x" : "y";}
|
1877 |
+
var contentLength=dir==="x" ? mCSB_container.outerWidth(false)-wrapper.width() : mCSB_container.outerHeight(false)-wrapper.height(),
|
1878 |
+
contentPos=dir==="x" ? mCSB_container[0].offsetLeft : mCSB_container[0].offsetTop,
|
1879 |
+
cssProp=dir==="x" ? "left" : "top";
|
1880 |
+
switch(t){
|
1881 |
+
case "function": /* this currently is not used. Consider removing it */
|
1882 |
+
return val();
|
1883 |
+
break;
|
1884 |
+
case "object": /* js/jquery object */
|
1885 |
+
var obj=val.jquery ? val : $(val);
|
1886 |
+
if(!obj.length){return;}
|
1887 |
+
return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0];
|
1888 |
+
break;
|
1889 |
+
case "string": case "number":
|
1890 |
+
if(_isNumeric(val)){ /* numeric value */
|
1891 |
+
return Math.abs(val);
|
1892 |
+
}else if(val.indexOf("%")!==-1){ /* percentage value */
|
1893 |
+
return Math.abs(contentLength*parseInt(val)/100);
|
1894 |
+
}else if(val.indexOf("-=")!==-1){ /* decrease value */
|
1895 |
+
return Math.abs(contentPos-parseInt(val.split("-=")[1]));
|
1896 |
+
}else if(val.indexOf("+=")!==-1){ /* inrease value */
|
1897 |
+
var p=(contentPos+parseInt(val.split("+=")[1]));
|
1898 |
+
return p>=0 ? 0 : Math.abs(p);
|
1899 |
+
}else if(val.indexOf("px")!==-1 && _isNumeric(val.split("px")[0])){ /* pixels string value (e.g. "100px") */
|
1900 |
+
return Math.abs(val.split("px")[0]);
|
1901 |
+
}else{
|
1902 |
+
if(val==="top" || val==="left"){ /* special strings */
|
1903 |
+
return 0;
|
1904 |
+
}else if(val==="bottom"){
|
1905 |
+
return Math.abs(wrapper.height()-mCSB_container.outerHeight(false));
|
1906 |
+
}else if(val==="right"){
|
1907 |
+
return Math.abs(wrapper.width()-mCSB_container.outerWidth(false));
|
1908 |
+
}else if(val==="first" || val==="last"){
|
1909 |
+
var obj=mCSB_container.find(":"+val);
|
1910 |
+
return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0];
|
1911 |
+
}else{
|
1912 |
+
if($(val).length){ /* jquery selector */
|
1913 |
+
return dir==="x" ? _childPos($(val))[1] : _childPos($(val))[0];
|
1914 |
+
}else{ /* other values (e.g. "100em") */
|
1915 |
+
mCSB_container.css(cssProp,val);
|
1916 |
+
methods.update.call(null,$this[0]);
|
1917 |
+
return;
|
1918 |
+
}
|
1919 |
+
}
|
1920 |
+
}
|
1921 |
+
break;
|
1922 |
+
}
|
1923 |
+
},
|
1924 |
+
/* -------------------- */
|
1925 |
+
|
1926 |
+
|
1927 |
+
/* calls the update method automatically */
|
1928 |
+
_autoUpdate=function(rem){
|
1929 |
+
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1930 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
1931 |
+
if(rem){
|
1932 |
+
/*
|
1933 |
+
removes autoUpdate timer
|
1934 |
+
usage: _autoUpdate.call(this,"remove");
|
1935 |
+
*/
|
1936 |
+
clearTimeout(mCSB_container[0].autoUpdate);
|
1937 |
+
_delete(mCSB_container[0],"autoUpdate");
|
1938 |
+
return;
|
1939 |
+
}
|
1940 |
+
upd();
|
1941 |
+
function upd(){
|
1942 |
+
clearTimeout(mCSB_container[0].autoUpdate);
|
1943 |
+
if($this.parents("html").length===0){
|
1944 |
+
/* check element in dom tree */
|
1945 |
+
$this=null;
|
1946 |
+
return;
|
1947 |
+
}
|
1948 |
+
mCSB_container[0].autoUpdate=setTimeout(function(){
|
1949 |
+
/* update on specific selector(s) length and size change */
|
1950 |
+
if(o.advanced.updateOnSelectorChange){
|
1951 |
+
d.poll.change.n=sizesSum();
|
1952 |
+
if(d.poll.change.n!==d.poll.change.o){
|
1953 |
+
d.poll.change.o=d.poll.change.n;
|
1954 |
+
doUpd(3);
|
1955 |
+
return;
|
1956 |
+
}
|
1957 |
+
}
|
1958 |
+
/* update on main element and scrollbar size changes */
|
1959 |
+
if(o.advanced.updateOnContentResize){
|
1960 |
+
d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth;
|
1961 |
+
if(d.poll.size.n!==d.poll.size.o){
|
1962 |
+
d.poll.size.o=d.poll.size.n;
|
1963 |
+
doUpd(1);
|
1964 |
+
return;
|
1965 |
+
}
|
1966 |
+
}
|
1967 |
+
/* update on image load */
|
1968 |
+
if(o.advanced.updateOnImageLoad){
|
1969 |
+
if(!(o.advanced.updateOnImageLoad==="auto" && o.axis==="y")){ //by default, it doesn't run on vertical content
|
1970 |
+
d.poll.img.n=mCSB_container.find("img").length;
|
1971 |
+
if(d.poll.img.n!==d.poll.img.o){
|
1972 |
+
d.poll.img.o=d.poll.img.n;
|
1973 |
+
mCSB_container.find("img").each(function(){
|
1974 |
+
imgLoader(this);
|
1975 |
+
});
|
1976 |
+
return;
|
1977 |
+
}
|
1978 |
+
}
|
1979 |
+
}
|
1980 |
+
if(o.advanced.updateOnSelectorChange || o.advanced.updateOnContentResize || o.advanced.updateOnImageLoad){upd();}
|
1981 |
+
},o.advanced.autoUpdateTimeout);
|
1982 |
+
}
|
1983 |
+
/* a tiny image loader */
|
1984 |
+
function imgLoader(el){
|
1985 |
+
if($(el).hasClass(classes[2])){doUpd(); return;}
|
1986 |
+
var img=new Image();
|
1987 |
+
function createDelegate(contextObject,delegateMethod){
|
1988 |
+
return function(){return delegateMethod.apply(contextObject,arguments);}
|
1989 |
+
}
|
1990 |
+
function imgOnLoad(){
|
1991 |
+
this.onload=null;
|
1992 |
+
$(el).addClass(classes[2]);
|
1993 |
+
doUpd(2);
|
1994 |
+
}
|
1995 |
+
img.onload=createDelegate(img,imgOnLoad);
|
1996 |
+
img.src=el.src;
|
1997 |
+
}
|
1998 |
+
/* returns the total height and width sum of all elements matching the selector */
|
1999 |
+
function sizesSum(){
|
2000 |
+
if(o.advanced.updateOnSelectorChange===true){o.advanced.updateOnSelectorChange="*";}
|
2001 |
+
var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange);
|
2002 |
+
if(o.advanced.updateOnSelectorChange && sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth;});}
|
2003 |
+
return total;
|
2004 |
+
}
|
2005 |
+
/* calls the update method */
|
2006 |
+
function doUpd(cb){
|
2007 |
+
clearTimeout(mCSB_container[0].autoUpdate);
|
2008 |
+
methods.update.call(null,$this[0],cb);
|
2009 |
+
}
|
2010 |
+
},
|
2011 |
+
/* -------------------- */
|
2012 |
+
|
2013 |
+
|
2014 |
+
/* snaps scrolling to a multiple of a pixels number */
|
2015 |
+
_snapAmount=function(to,amount,offset){
|
2016 |
+
return (Math.round(to/amount)*amount-offset);
|
2017 |
+
},
|
2018 |
+
/* -------------------- */
|
2019 |
+
|
2020 |
+
|
2021 |
+
/* stops content and scrollbar animations */
|
2022 |
+
_stop=function(el){
|
2023 |
+
var d=el.data(pluginPfx),
|
2024 |
+
sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal");
|
2025 |
+
sel.each(function(){
|
2026 |
+
_stopTween.call(this);
|
2027 |
+
});
|
2028 |
+
},
|
2029 |
+
/* -------------------- */
|
2030 |
+
|
2031 |
+
|
2032 |
+
/*
|
2033 |
+
ANIMATES CONTENT
|
2034 |
+
This is where the actual scrolling happens
|
2035 |
+
*/
|
2036 |
+
_scrollTo=function(el,to,options){
|
2037 |
+
var d=el.data(pluginPfx),o=d.opt,
|
2038 |
+
defaults={
|
2039 |
+
trigger:"internal",
|
2040 |
+
dir:"y",
|
2041 |
+
scrollEasing:"mcsEaseOut",
|
2042 |
+
drag:false,
|
2043 |
+
dur:o.scrollInertia,
|
2044 |
+
overwrite:"all",
|
2045 |
+
callbacks:true,
|
2046 |
+
onStart:true,
|
2047 |
+
onUpdate:true,
|
2048 |
+
onComplete:true
|
2049 |
+
},
|
2050 |
+
options=$.extend(defaults,options),
|
2051 |
+
dur=[options.dur,(options.drag ? 0 : options.dur)],
|
2052 |
+
mCustomScrollBox=$("#mCSB_"+d.idx),
|
2053 |
+
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
2054 |
+
wrapper=mCSB_container.parent(),
|
2055 |
+
totalScrollOffsets=o.callbacks.onTotalScrollOffset ? _arr.call(el,o.callbacks.onTotalScrollOffset) : [0,0],
|
2056 |
+
totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset ? _arr.call(el,o.callbacks.onTotalScrollBackOffset) : [0,0];
|
2057 |
+
d.trigger=options.trigger;
|
2058 |
+
if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ /* always reset scrollTop/Left */
|
2059 |
+
$(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible");
|
2060 |
+
wrapper.scrollTop(0).scrollLeft(0);
|
2061 |
+
}
|
2062 |
+
if(to==="_resetY" && !d.contentReset.y){
|
2063 |
+
/* callbacks: onOverflowYNone */
|
2064 |
+
if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0]);}
|
2065 |
+
d.contentReset.y=1;
|
2066 |
+
}
|
2067 |
+
if(to==="_resetX" && !d.contentReset.x){
|
2068 |
+
/* callbacks: onOverflowXNone */
|
2069 |
+
if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0]);}
|
2070 |
+
d.contentReset.x=1;
|
2071 |
+
}
|
2072 |
+
if(to==="_resetY" || to==="_resetX"){return;}
|
2073 |
+
if((d.contentReset.y || !el[0].mcs) && d.overflowed[0]){
|
2074 |
+
/* callbacks: onOverflowY */
|
2075 |
+
if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0]);}
|
2076 |
+
d.contentReset.x=null;
|
2077 |
+
}
|
2078 |
+
if((d.contentReset.x || !el[0].mcs) && d.overflowed[1]){
|
2079 |
+
/* callbacks: onOverflowX */
|
2080 |
+
if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0]);}
|
2081 |
+
d.contentReset.x=null;
|
2082 |
+
}
|
2083 |
+
if(o.snapAmount){ /* scrolling snapping */
|
2084 |
+
var snapAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : options.dir==="x" ? o.snapAmount[1] : o.snapAmount[0];
|
2085 |
+
to=_snapAmount(to,snapAmount,o.snapOffset);
|
2086 |
+
}
|
2087 |
+
switch(options.dir){
|
2088 |
+
case "x":
|
2089 |
+
var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"),
|
2090 |
+
property="left",
|
2091 |
+
contentPos=mCSB_container[0].offsetLeft,
|
2092 |
+
limit=[
|
2093 |
+
mCustomScrollBox.width()-mCSB_container.outerWidth(false),
|
2094 |
+
mCSB_dragger.parent().width()-mCSB_dragger.width()
|
2095 |
+
],
|
2096 |
+
scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.x)],
|
2097 |
+
tso=totalScrollOffsets[1],
|
2098 |
+
tsbo=totalScrollBackOffsets[1],
|
2099 |
+
totalScrollOffset=tso>0 ? tso/d.scrollRatio.x : 0,
|
2100 |
+
totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.x : 0;
|
2101 |
+
break;
|
2102 |
+
case "y":
|
2103 |
+
var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"),
|
2104 |
+
property="top",
|
2105 |
+
contentPos=mCSB_container[0].offsetTop,
|
2106 |
+
limit=[
|
2107 |
+
mCustomScrollBox.height()-mCSB_container.outerHeight(false),
|
2108 |
+
mCSB_dragger.parent().height()-mCSB_dragger.height()
|
2109 |
+
],
|
2110 |
+
scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.y)],
|
2111 |
+
tso=totalScrollOffsets[0],
|
2112 |
+
tsbo=totalScrollBackOffsets[0],
|
2113 |
+
totalScrollOffset=tso>0 ? tso/d.scrollRatio.y : 0,
|
2114 |
+
totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.y : 0;
|
2115 |
+
break;
|
2116 |
+
}
|
2117 |
+
if(scrollTo[1]<0 || (scrollTo[0]===0 && scrollTo[1]===0)){
|
2118 |
+
scrollTo=[0,0];
|
2119 |
+
}else if(scrollTo[1]>=limit[1]){
|
2120 |
+
scrollTo=[limit[0],limit[1]];
|
2121 |
+
}else{
|
2122 |
+
scrollTo[0]=-scrollTo[0];
|
2123 |
+
}
|
2124 |
+
if(!el[0].mcs){
|
2125 |
+
_mcs(); /* init mcs object (once) to make it available before callbacks */
|
2126 |
+
if(_cb("onInit")){o.callbacks.onInit.call(el[0]);} /* callbacks: onInit */
|
2127 |
+
}
|
2128 |
+
clearTimeout(mCSB_container[0].onCompleteTimeout);
|
2129 |
+
_tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing);
|
2130 |
+
if(!d.tweenRunning && ((contentPos===0 && scrollTo[0]>=0) || (contentPos===limit[0] && scrollTo[0]<=limit[0]))){return;}
|
2131 |
+
_tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{
|
2132 |
+
onStart:function(){
|
2133 |
+
if(options.callbacks && options.onStart && !d.tweenRunning){
|
2134 |
+
/* callbacks: onScrollStart */
|
2135 |
+
if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);}
|
2136 |
+
d.tweenRunning=true;
|
2137 |
+
_onDragClasses(mCSB_dragger);
|
2138 |
+
d.cbOffsets=_cbOffsets();
|
2139 |
+
}
|
2140 |
+
},onUpdate:function(){
|
2141 |
+
if(options.callbacks && options.onUpdate){
|
2142 |
+
/* callbacks: whileScrolling */
|
2143 |
+
if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);}
|
2144 |
+
}
|
2145 |
+
},onComplete:function(){
|
2146 |
+
if(options.callbacks && options.onComplete){
|
2147 |
+
if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout);}
|
2148 |
+
var t=mCSB_container[0].idleTimer || 0;
|
2149 |
+
mCSB_container[0].onCompleteTimeout=setTimeout(function(){
|
2150 |
+
/* callbacks: onScroll, onTotalScroll, onTotalScrollBack */
|
2151 |
+
if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);}
|
2152 |
+
if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);}
|
2153 |
+
if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);}
|
2154 |
+
d.tweenRunning=false;
|
2155 |
+
mCSB_container[0].idleTimer=0;
|
2156 |
+
_onDragClasses(mCSB_dragger,"hide");
|
2157 |
+
},t);
|
2158 |
+
}
|
2159 |
+
}
|
2160 |
+
});
|
2161 |
+
/* checks if callback function exists */
|
2162 |
+
function _cb(cb){
|
2163 |
+
return d && o.callbacks[cb] && typeof o.callbacks[cb]==="function";
|
2164 |
+
}
|
2165 |
+
/* checks whether callback offsets always trigger */
|
2166 |
+
function _cbOffsets(){
|
2167 |
+
return [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || contentPos<=-tsbo];
|
2168 |
+
}
|
2169 |
+
/*
|
2170 |
+
populates object with useful values for the user
|
2171 |
+
values:
|
2172 |
+
content: this.mcs.content
|
2173 |
+
content top position: this.mcs.top
|
2174 |
+
content left position: this.mcs.left
|
2175 |
+
dragger top position: this.mcs.draggerTop
|
2176 |
+
dragger left position: this.mcs.draggerLeft
|
2177 |
+
scrolling y percentage: this.mcs.topPct
|
2178 |
+
scrolling x percentage: this.mcs.leftPct
|
2179 |
+
scrolling direction: this.mcs.direction
|
2180 |
+
*/
|
2181 |
+
function _mcs(){
|
2182 |
+
var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], /* content position */
|
2183 |
+
dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft], /* dragger position */
|
2184 |
+
cl=[mCSB_container.outerHeight(false),mCSB_container.outerWidth(false)], /* content length */
|
2185 |
+
pl=[mCustomScrollBox.height(),mCustomScrollBox.width()]; /* content parent length */
|
2186 |
+
el[0].mcs={
|
2187 |
+
content:mCSB_container, /* original content wrapper as jquery object */
|
2188 |
+
top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1],
|
2189 |
+
topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])),
|
2190 |
+
direction:options.dir
|
2191 |
+
};
|
2192 |
+
/*
|
2193 |
+
this refers to the original element containing the scrollbar(s)
|
2194 |
+
usage: this.mcs.top, this.mcs.leftPct etc.
|
2195 |
+
*/
|
2196 |
+
}
|
2197 |
+
},
|
2198 |
+
/* -------------------- */
|
2199 |
+
|
2200 |
+
|
2201 |
+
/*
|
2202 |
+
CUSTOM JAVASCRIPT ANIMATION TWEEN
|
2203 |
+
Lighter and faster than jquery animate() and css transitions
|
2204 |
+
Animates top/left properties and includes easings
|
2205 |
+
*/
|
2206 |
+
_tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){
|
2207 |
+
if(!el._mTween){el._mTween={top:{},left:{}};}
|
2208 |
+
var callbacks=callbacks || {},
|
2209 |
+
onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){},
|
2210 |
+
startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop];
|
2211 |
+
if(prop==="left"){from=el.offsetLeft;}
|
2212 |
+
var diff=to-from;
|
2213 |
+
tobj.stop=0;
|
2214 |
+
if(overwrite!=="none"){_cancelTween();}
|
2215 |
+
_startTween();
|
2216 |
+
function _step(){
|
2217 |
+
if(tobj.stop){return;}
|
2218 |
+
if(!progress){onStart.call();}
|
2219 |
+
progress=_getTime()-startTime;
|
2220 |
+
_tween();
|
2221 |
+
if(progress>=tobj.time){
|
2222 |
+
tobj.time=(progress>tobj.time) ? progress+_delay-(progress-tobj.time) : progress+_delay-1;
|
2223 |
+
if(tobj.time<progress+1){tobj.time=progress+1;}
|
2224 |
+
}
|
2225 |
+
if(tobj.time<duration){tobj.id=_request(_step);}else{onComplete.call();}
|
2226 |
+
}
|
2227 |
+
function _tween(){
|
2228 |
+
if(duration>0){
|
2229 |
+
tobj.currVal=_ease(tobj.time,from,diff,duration,easing);
|
2230 |
+
elStyle[prop]=Math.round(tobj.currVal)+"px";
|
2231 |
+
}else{
|
2232 |
+
elStyle[prop]=to+"px";
|
2233 |
+
}
|
2234 |
+
onUpdate.call();
|
2235 |
+
}
|
2236 |
+
function _startTween(){
|
2237 |
+
_delay=1000/60;
|
2238 |
+
tobj.time=progress+_delay;
|
2239 |
+
_request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame;
|
2240 |
+
tobj.id=_request(_step);
|
2241 |
+
}
|
2242 |
+
function _cancelTween(){
|
2243 |
+
if(tobj.id==null){return;}
|
2244 |
+
if(!window.requestAnimationFrame){clearTimeout(tobj.id);
|
2245 |
+
}else{window.cancelAnimationFrame(tobj.id);}
|
2246 |
+
tobj.id=null;
|
2247 |
+
}
|
2248 |
+
function _ease(t,b,c,d,type){
|
2249 |
+
switch(type){
|
2250 |
+
case "linear": case "mcsLinear":
|
2251 |
+
return c*t/d + b;
|
2252 |
+
break;
|
2253 |
+
case "mcsLinearOut":
|
2254 |
+
t/=d; t--; return c * Math.sqrt(1 - t*t) + b;
|
2255 |
+
break;
|
2256 |
+
case "easeInOutSmooth":
|
2257 |
+
t/=d/2;
|
2258 |
+
if(t<1) return c/2*t*t + b;
|
2259 |
+
t--;
|
2260 |
+
return -c/2 * (t*(t-2) - 1) + b;
|
2261 |
+
break;
|
2262 |
+
case "easeInOutStrong":
|
2263 |
+
t/=d/2;
|
2264 |
+
if(t<1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b;
|
2265 |
+
t--;
|
2266 |
+
return c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b;
|
2267 |
+
break;
|
2268 |
+
case "easeInOut": case "mcsEaseInOut":
|
2269 |
+
t/=d/2;
|
2270 |
+
if(t<1) return c/2*t*t*t + b;
|
2271 |
+
t-=2;
|
2272 |
+
return c/2*(t*t*t + 2) + b;
|
2273 |
+
break;
|
2274 |
+
case "easeOutSmooth":
|
2275 |
+
t/=d; t--;
|
2276 |
+
return -c * (t*t*t*t - 1) + b;
|
2277 |
+
break;
|
2278 |
+
case "easeOutStrong":
|
2279 |
+
return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b;
|
2280 |
+
break;
|
2281 |
+
case "easeOut": case "mcsEaseOut": default:
|
2282 |
+
var ts=(t/=d)*t,tc=ts*t;
|
2283 |
+
return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t);
|
2284 |
+
}
|
2285 |
+
}
|
2286 |
+
},
|
2287 |
+
/* -------------------- */
|
2288 |
+
|
2289 |
+
|
2290 |
+
/* returns current time */
|
2291 |
+
_getTime=function(){
|
2292 |
+
if(window.performance && window.performance.now){
|
2293 |
+
return window.performance.now();
|
2294 |
+
}else{
|
2295 |
+
if(window.performance && window.performance.webkitNow){
|
2296 |
+
return window.performance.webkitNow();
|
2297 |
+
}else{
|
2298 |
+
if(Date.now){return Date.now();}else{return new Date().getTime();}
|
2299 |
+
}
|
2300 |
+
}
|
2301 |
+
},
|
2302 |
+
/* -------------------- */
|
2303 |
+
|
2304 |
+
|
2305 |
+
/* stops a tween */
|
2306 |
+
_stopTween=function(){
|
2307 |
+
var el=this;
|
2308 |
+
if(!el._mTween){el._mTween={top:{},left:{}};}
|
2309 |
+
var props=["top","left"];
|
2310 |
+
for(var i=0; i<props.length; i++){
|
2311 |
+
var prop=props[i];
|
2312 |
+
if(el._mTween[prop].id){
|
2313 |
+
if(!window.requestAnimationFrame){clearTimeout(el._mTween[prop].id);
|
2314 |
+
}else{window.cancelAnimationFrame(el._mTween[prop].id);}
|
2315 |
+
el._mTween[prop].id=null;
|
2316 |
+
el._mTween[prop].stop=1;
|
2317 |
+
}
|
2318 |
+
}
|
2319 |
+
},
|
2320 |
+
/* -------------------- */
|
2321 |
+
|
2322 |
+
|
2323 |
+
/* deletes a property (avoiding the exception thrown by IE) */
|
2324 |
+
_delete=function(c,m){
|
2325 |
+
try{delete c[m];}catch(e){c[m]=null;}
|
2326 |
+
},
|
2327 |
+
/* -------------------- */
|
2328 |
+
|
2329 |
+
|
2330 |
+
/* detects left mouse button */
|
2331 |
+
_mouseBtnLeft=function(e){
|
2332 |
+
return !(e.which && e.which!==1);
|
2333 |
+
},
|
2334 |
+
/* -------------------- */
|
2335 |
+
|
2336 |
+
|
2337 |
+
/* detects if pointer type event is touch */
|
2338 |
+
_pointerTouch=function(e){
|
2339 |
+
var t=e.originalEvent.pointerType;
|
2340 |
+
return !(t && t!=="touch" && t!==2);
|
2341 |
+
},
|
2342 |
+
/* -------------------- */
|
2343 |
+
|
2344 |
+
|
2345 |
+
/* checks if value is numeric */
|
2346 |
+
_isNumeric=function(val){
|
2347 |
+
return !isNaN(parseFloat(val)) && isFinite(val);
|
2348 |
+
},
|
2349 |
+
/* -------------------- */
|
2350 |
+
|
2351 |
+
|
2352 |
+
/* returns element position according to content */
|
2353 |
+
_childPos=function(el){
|
2354 |
+
var p=el.parents(".mCSB_container");
|
2355 |
+
return [el.offset().top-p.offset().top,el.offset().left-p.offset().left];
|
2356 |
+
},
|
2357 |
+
/* -------------------- */
|
2358 |
+
|
2359 |
+
|
2360 |
+
/* checks if browser tab is hidden/inactive via Page Visibility API */
|
2361 |
+
_isTabHidden=function(){
|
2362 |
+
var prop=_getHiddenProp();
|
2363 |
+
if(!prop) return false;
|
2364 |
+
return document[prop];
|
2365 |
+
function _getHiddenProp(){
|
2366 |
+
var pfx=["webkit","moz","ms","o"];
|
2367 |
+
if("hidden" in document) return "hidden"; //natively supported
|
2368 |
+
for(var i=0; i<pfx.length; i++){ //prefixed
|
2369 |
+
if((pfx[i]+"Hidden") in document)
|
2370 |
+
return pfx[i]+"Hidden";
|
2371 |
+
}
|
2372 |
+
return null; //not supported
|
2373 |
+
}
|
2374 |
+
};
|
2375 |
+
/* -------------------- */
|
2376 |
+
|
2377 |
+
/*
|
2378 |
+
----------------------------------------
|
2379 |
+
PLUGIN SETUP
|
2380 |
+
----------------------------------------
|
2381 |
+
*/
|
2382 |
+
|
2383 |
+
/* plugin constructor functions */
|
2384 |
+
$.fn[pluginNS]=function(method){ /* usage: $(selector).mCustomScrollbar(); */
|
2385 |
+
if(methods[method]){
|
2386 |
+
return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
|
2387 |
+
}else if(typeof method==="object" || !method){
|
2388 |
+
return methods.init.apply(this,arguments);
|
2389 |
+
}else{
|
2390 |
+
$.error("Method "+method+" does not exist");
|
2391 |
+
}
|
2392 |
+
};
|
2393 |
+
$[pluginNS]=function(method){ /* usage: $.mCustomScrollbar(); */
|
2394 |
+
if(methods[method]){
|
2395 |
+
return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
|
2396 |
+
}else if(typeof method==="object" || !method){
|
2397 |
+
return methods.init.apply(this,arguments);
|
2398 |
+
}else{
|
2399 |
+
$.error("Method "+method+" does not exist");
|
2400 |
+
}
|
2401 |
+
};
|
2402 |
+
|
2403 |
+
/*
|
2404 |
+
allow setting plugin default options.
|
2405 |
+
usage: $.mCustomScrollbar.defaults.scrollInertia=500;
|
2406 |
+
to apply any changed default options on default selectors (below), use inside document ready fn
|
2407 |
+
e.g.: $(document).ready(function(){ $.mCustomScrollbar.defaults.scrollInertia=500; });
|
2408 |
+
*/
|
2409 |
+
$[pluginNS].defaults=defaults;
|
2410 |
+
|
2411 |
+
/*
|
2412 |
+
add window object (window.mCustomScrollbar)
|
2413 |
+
usage: if(window.mCustomScrollbar){console.log("custom scrollbar plugin loaded");}
|
2414 |
+
*/
|
2415 |
+
window[pluginNS]=true;
|
2416 |
+
|
2417 |
+
$(window).bind("load",function(){
|
2418 |
+
|
2419 |
+
$(defaultSelector)[pluginNS](); /* add scrollbars automatically on default selector */
|
2420 |
+
|
2421 |
+
/* extend jQuery expressions */
|
2422 |
+
$.extend($.expr[":"],{
|
2423 |
+
/* checks if element is within scrollable viewport */
|
2424 |
+
mcsInView:$.expr[":"].mcsInView || function(el){
|
2425 |
+
var $el=$(el),content=$el.parents(".mCSB_container"),wrapper,cPos;
|
2426 |
+
if(!content.length){return;}
|
2427 |
+
wrapper=content.parent();
|
2428 |
+
cPos=[content[0].offsetTop,content[0].offsetLeft];
|
2429 |
+
return cPos[0]+_childPos($el)[0]>=0 && cPos[0]+_childPos($el)[0]<wrapper.height()-$el.outerHeight(false) &&
|
2430 |
+
cPos[1]+_childPos($el)[1]>=0 && cPos[1]+_childPos($el)[1]<wrapper.width()-$el.outerWidth(false);
|
2431 |
+
},
|
2432 |
+
/* checks if element or part of element is in view of scrollable viewport */
|
2433 |
+
mcsInSight:$.expr[":"].mcsInSight || function(el,i,m){
|
2434 |
+
var $el=$(el),elD,content=$el.parents(".mCSB_container"),wrapperView,pos,wrapperViewPct,
|
2435 |
+
pctVals=m[3]==="exact" ? [[1,0],[1,0]] : [[0.9,0.1],[0.6,0.4]];
|
2436 |
+
if(!content.length){return;}
|
2437 |
+
elD=[$el.outerHeight(false),$el.outerWidth(false)];
|
2438 |
+
pos=[content[0].offsetTop+_childPos($el)[0],content[0].offsetLeft+_childPos($el)[1]];
|
2439 |
+
wrapperView=[content.parent()[0].offsetHeight,content.parent()[0].offsetWidth];
|
2440 |
+
wrapperViewPct=[elD[0]<wrapperView[0] ? pctVals[0] : pctVals[1],elD[1]<wrapperView[1] ? pctVals[0] : pctVals[1]];
|
2441 |
+
return pos[0]-(wrapperView[0]*wrapperViewPct[0][0])<0 && pos[0]+elD[0]-(wrapperView[0]*wrapperViewPct[0][1])>=0 &&
|
2442 |
+
pos[1]-(wrapperView[1]*wrapperViewPct[1][0])<0 && pos[1]+elD[1]-(wrapperView[1]*wrapperViewPct[1][1])>=0;
|
2443 |
+
},
|
2444 |
+
/* checks if element is overflowed having visible scrollbar(s) */
|
2445 |
+
mcsOverflow:$.expr[":"].mcsOverflow || function(el){
|
2446 |
+
var d=$(el).data(pluginPfx);
|
2447 |
+
if(!d){return;}
|
2448 |
+
return d.overflowed[0] || d.overflowed[1];
|
2449 |
+
}
|
2450 |
+
});
|
2451 |
+
|
2452 |
+
});
|
2453 |
+
|
2454 |
+
}))}));
|
js/jquery.mobile.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
/*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
|
3 |
-
!function(e,t,n){"function"==typeof define&&define.amd?define(["jquery"],function(i){return n(i,e,t),i.mobile}):n(e.jQuery,e,t)}(this,document,function(e,t,n,i){!function(e,t,i){function o(e){return"#"+(e=e||location.href).replace(/^[^#]*#?(.*)$/,"$1")}var a,r="hashchange",s=n,l=e.event.special,c=s.documentMode,u="on"+r in t&&(void 0===c||c>7);e.fn[r]=function(e){return e?this.bind(r,e):this.trigger(r)},e.fn[r].delay=50,l[r]=e.extend(l[r],{setup:function(){if(u)return!1;e(a.start)},teardown:function(){if(u)return!1;e(a.stop)}}),a=function(){function n(){var a=o(),s=h(l);a!==l?(d(l=a,s),e(t).trigger(r)):s!==l&&(location.href=location.href.replace(/#.*/,"")+s),i=setTimeout(n,e.fn[r].delay)}var i,a={},l=o(),c=function(e){return e},d=c,h=c;return a.start=function(){i||n()},a.stop=function(){i&&clearTimeout(i),i=void 0},t.attachEvent&&!t.addEventListener&&!u&&function(){var t,i;a.start=function(){t||(i=(i=e.fn[r].src)&&i+o(),t=e('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){i||d(o()),n()}).attr("src",i||"javascript:0").insertAfter("body")[0].contentWindow,s.onpropertychange=function(){try{"title"===event.propertyName&&(t.document.title=s.title)}catch(e){}})},a.stop=c,h=function(){return o(t.location.href)},d=function(n,i){var o=t.document,a=e.fn[r].domain;n!==i&&(o.title=s.title,o.open(),a&&o.write('<script>document.domain="'+a+'"<\/script>'),o.close(),t.location.hash=n)}}(),a}()}(e,this),function(e){e.mobile={}}(e),function(e,t,n){e.extend(e.mobile,{version:"1.4.5",subPageUrlKey:"ui-page",hideUrlBar:!0,keepNative:":jqmData(role='none'), :jqmData(role='nojs')",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:0,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"a",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,buttonMarkup:{hoverDelay:200},dynamicBaseEnabled:!0,pageContainer:e(),allowCrossDomainPages:!1,dialogHashKey:"&ui-state=dialog"})}(e),function(e,t,n){var i={},o=e.find,a=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,r=/:jqmData\(([^)]*)\)/g;e.extend(e.mobile,{ns:"",getAttribute:function(t,n){var i;(t=t.jquery?t[0]:t)&&t.getAttribute&&(i=t.getAttribute("data-"+e.mobile.ns+n));try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:a.test(i)?JSON.parse(i):i)}catch(e){}return i},nsNormalizeDict:i,nsNormalize:function(t){return i[t]||(i[t]=e.camelCase(e.mobile.ns+t))},closestPageData:function(e){return e.closest(":jqmData(role='page'), :jqmData(role='dialog')").data("mobile-page")}}),e.fn.jqmData=function(t,n){var i;return void 0!==t&&(t&&(t=e.mobile.nsNormalize(t)),i=arguments.length<2||void 0===n?this.data(t):this.data(t,n)),i},e.jqmData=function(t,n,i){var o;return void 0!==n&&(o=e.data(t,n?e.mobile.nsNormalize(n):n,i)),o},e.fn.jqmRemoveData=function(t){return this.removeData(e.mobile.nsNormalize(t))},e.jqmRemoveData=function(t,n){return e.removeData(t,e.mobile.nsNormalize(n))},e.find=function(t,n,i,a){return t.indexOf(":jqmData")>-1&&(t=t.replace(r,"[data-"+(e.mobile.ns||"")+"$1]")),o.call(this,t,n,i,a)},e.extend(e.find,o)}(e),function(e,t){function i(t,n){var i,a,r,s=t.nodeName.toLowerCase();return"area"===s?(a=(i=t.parentNode).name,!(!t.href||!a||"map"!==i.nodeName.toLowerCase())&&!!(r=e("img[usemap=#"+a+"]")[0])&&o(r)):(/input|select|textarea|button|object/.test(s)?!t.disabled:"a"===s&&t.href||n)&&o(t)}function o(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,r=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"c0ab71056b936627e8a7821f03c044aec6280a40",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(n,i){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),i&&i.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(this[0].ownerDocument||n):t},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),o=isNaN(n);return(o||n>=0)&&i(t,!o)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,n){function i(t,n,i,a){return e.each(o,function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var o="Width"===n?["Left","Right"]:["Top","Bottom"],a=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(t){return void 0===t?r["inner"+n].call(this):this.each(function(){e(this).css(a,i(this,t)+"px")})},e.fn["outer"+n]=function(t,o){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(a,i(this,t,!0,o)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in n.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,o,a=e(this[0]);a.length&&a[0]!==n;){if(("absolute"===(i=a.css("position"))||"relative"===i||"fixed"===i)&&(o=parseInt(a.css("zIndex"),10),!isNaN(o)&&0!==o))return o;a=a.parent()}return 0}}),e.ui.plugin={add:function(t,n,i){var o,a=e.ui[t].prototype;for(o in i)a.plugins[o]=a.plugins[o]||[],a.plugins[o].push([n,i[o]])},call:function(e,t,n,i){var o,a=e.plugins[t];if(a&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(o=0;o<a.length;o++)e.options[a[o][0]]&&a[o][1].apply(e.element,n)}}}(e),function(e,t,i){e.extend(e.mobile,{window:e(t),document:e(n),keyCode:e.ui.keyCode,behaviors:{},silentScroll:function(n){"number"!==e.type(n)&&(n=e.mobile.defaultHomeScroll),e.event.special.scrollstart.enabled=!1,setTimeout(function(){t.scrollTo(0,n),e.mobile.document.trigger("silentscroll",{x:0,y:n})},20),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},getClosestBaseUrl:function(t){var n=e(t).closest(".ui-page").jqmData("url"),i=e.mobile.path.documentBase.hrefNoHash;return e.mobile.dynamicBaseEnabled&&n&&e.mobile.path.isPath(n)||(n=i),e.mobile.path.makeUrlAbsolute(n,i)},removeActiveLinkClass:function(t){!e.mobile.activeClickedLink||e.mobile.activeClickedLink.closest("."+e.mobile.activePageClass).length&&!t||e.mobile.activeClickedLink.removeClass(e.mobile.activeBtnClass),e.mobile.activeClickedLink=null},getInheritedTheme:function(e,t){for(var n,i,o=e[0],a="",r=/ui-(bar|body|overlay)-([a-z])\b/;o&&!((n=o.className||"")&&(i=r.exec(n))&&(a=i[2]));)o=o.parentNode;return a||t||"a"},enhanceable:function(e){return this.haveParents(e,"enhance")},hijackable:function(e){return this.haveParents(e,"ajax")},haveParents:function(t,n){if(!e.mobile.ignoreContentEnabled)return t;var i,o,a,r,s=t.length,l=e();for(r=0;r<s;r++){for(o=t.eq(r),a=!1,i=t[r];i;){if("false"===(i.getAttribute?i.getAttribute("data-"+e.mobile.ns+n):"")){a=!0;break}i=i.parentNode}a||(l=l.add(o))}return l},getScreenHeight:function(){return t.innerHeight||e.mobile.window.height()},resetActivePageHeight:function(t){var n=e("."+e.mobile.activePageClass),i=n.height(),o=n.outerHeight(!0);t=function(t,n){var i=t.parent(),o=[],a=function(){var t=e(this),n=e.mobile.toolbar&&t.data("mobile-toolbar")?t.toolbar("option"):{position:t.attr("data-"+e.mobile.ns+"position"),updatePagePadding:!1!==t.attr("data-"+e.mobile.ns+"update-page-padding")};return!("fixed"===n.position&&!0===n.updatePagePadding)},r=i.children(":jqmData(role='header')").filter(a),s=t.children(":jqmData(role='header')"),l=i.children(":jqmData(role='footer')").filter(a),c=t.children(":jqmData(role='footer')");return 0===s.length&&r.length>0&&(o=o.concat(r.toArray())),0===c.length&&l.length>0&&(o=o.concat(l.toArray())),e.each(o,function(t,i){n-=e(i).outerHeight()}),Math.max(0,n)}(n,"number"==typeof t?t:e.mobile.getScreenHeight()),n.css("min-height",""),n.height()<t&&n.css("min-height",t-(o-i))},loading:function(){var t=this.loading._widget||e(e.mobile.loader.prototype.defaultHtml).loader(),n=t.loader.apply(t,arguments);return this.loading._widget=t,n}}),e.addDependents=function(t,n){var i=e(t),o=i.jqmData("dependents")||e();i.jqmData("dependents",e(o).add(n))},e.fn.extend({removeWithDependents:function(){e.removeWithDependents(this)},enhanceWithin:function(){var t,n={},i=e.mobile.page.prototype.keepNativeSelector(),o=this;for(t in e.mobile.nojs&&e.mobile.nojs(this),e.mobile.links&&e.mobile.links(this),e.mobile.degradeInputsWithin&&e.mobile.degradeInputsWithin(this),e.fn.buttonMarkup&&this.find(e.fn.buttonMarkup.initSelector).not(i).jqmEnhanceable().buttonMarkup(),e.fn.fieldcontain&&this.find(":jqmData(role='fieldcontain')").not(i).jqmEnhanceable().fieldcontain(),e.each(e.mobile.widgets,function(t,a){if(a.initSelector){var r=e.mobile.enhanceable(o.find(a.initSelector));r.length>0&&(r=r.not(i)),r.length>0&&(n[a.prototype.widgetName]=r)}}),n)n[t][t]();return this},addDependents:function(t){e.addDependents(this,t)},getEncodedText:function(){return e("<a>").text(this.text()).html()},jqmEnhanceable:function(){return e.mobile.enhanceable(this)},jqmHijackable:function(){return e.mobile.hijackable(this)}}),e.removeWithDependents=function(t){var n=e(t);(n.jqmData("dependents")||e()).remove(),n.remove()},e.addDependents=function(t,n){var i=e(t),o=i.jqmData("dependents")||e();i.jqmData("dependents",e(o).add(n))},e.find.matches=function(t,n){return e.find(t,null,null,n)},e.find.matchesSelector=function(t,n){return e.find(n,null,null,[t]).length>0}}(e,this),function(e,i){t.matchMedia=t.matchMedia||function(e,t){var n,i=e.documentElement,o=i.firstElementChild||i.firstChild,a=e.createElement("body"),r=e.createElement("div");return r.id="mq-test-1",r.style.cssText="position:absolute;top:-100em",a.style.background="none",a.appendChild(r),function(e){return r.innerHTML='­<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',i.insertBefore(a,o),n=42===r.offsetWidth,i.removeChild(a),{matches:n,media:e}}}(n),e.mobile.media=function(e){return t.matchMedia(e).matches}}(e),function(e,t){var i={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,i),e.extend(e.mobile.support,i)}(e),function(e,n){e.extend(e.support,{orientation:"orientation"in t&&"onorientationchange"in t})}(e),function(e,i){function o(e){var t,n=e.charAt(0).toUpperCase()+e.substr(1),o=(e+" "+l.join(n+" ")+n).split(" ");for(t in o)if(s[o[t]]!==i)return!0}var a,r=e("<body>").prependTo("html"),s=r[0].style,l=["Webkit","Moz","O"],c="palmGetResource"in t,u=t.operamini&&"[object OperaMini]"==={}.toString.call(t.operamini),d=t.blackberry&&!o("-webkit-transform");e.extend(e.mobile,{browser:{}}),e.mobile.browser.oldIE=function(){var e=3,t=n.createElement("div"),i=t.all||[];do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><br><![endif]--\x3e"}while(i[0]);return e>4?e:!e}(),e.extend(e.support,{pushState:"pushState"in history&&"replaceState"in history&&!(t.navigator.userAgent.indexOf("Firefox")>=0&&t.top!==t)&&-1===t.navigator.userAgent.search(/CriOS/),mediaquery:e.mobile.media("only all"),cssPseudoElement:!!o("content"),touchOverflow:!!o("overflowScrolling"),cssTransform3d:function(){var o,a,s,c="transform-3d",u=e.mobile.media("(-"+l.join("-"+c+"),(-")+"-"+c+"),("+c+")");if(u)return!!u;for(s in o=n.createElement("div"),a={MozTransform:"-moz-transform",transform:"transform"},r.append(o),a)o.style[s]!==i&&(o.style[s]="translate3d( 100px, 1px, 1px )",u=t.getComputedStyle(o).getPropertyValue(a[s]));return!!u&&"none"!==u}(),boxShadow:!!o("boxShadow")&&!d,fixedPosition:function(){var e=t,n=navigator.userAgent,i=navigator.platform,o=n.match(/AppleWebKit\/([0-9]+)/),a=!!o&&o[1],r=n.match(/Fennec\/([0-9]+)/),s=!!r&&r[1],l=n.match(/Opera Mobi\/([0-9]+)/),c=!!l&&l[1];return!((i.indexOf("iPhone")>-1||i.indexOf("iPad")>-1||i.indexOf("iPod")>-1)&&a&&a<534||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||l&&c<7458||n.indexOf("Android")>-1&&a&&a<533||s&&s<6||"palmGetResource"in t&&a&&a<534||n.indexOf("MeeGo")>-1&&n.indexOf("NokiaBrowser/8.5.0")>-1)}(),scrollTop:("pageXOffset"in t||"scrollTop"in n.documentElement||"scrollTop"in r[0])&&!c&&!u,dynamicBaseTag:function(){var t,n=location.protocol+"//"+location.host+location.pathname+"ui-dir/",i=e("head base"),o=null,a="";return i.length?a=i.attr("href"):i=o=e("<base>",{href:n}).appendTo("head"),t=e("<a href='testurl' />").prependTo(r)[0].href,i[0].href=a||location.pathname,o&&o.remove(),0===t.indexOf(n)}(),cssPointerEvents:function(){var e,i=n.createElement("x"),o=n.documentElement,a=t.getComputedStyle;return"pointerEvents"in i.style&&(i.style.pointerEvents="auto",i.style.pointerEvents="x",o.appendChild(i),e=a&&"auto"===a(i,"").pointerEvents,o.removeChild(i),!!e)}(),boundingRect:void 0!==n.createElement("div").getBoundingClientRect,inlineSVG:function(){var n=t,i=!(!n.document.createElementNS||!n.document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||n.opera&&-1===navigator.userAgent.indexOf("Chrome")),o=function(t){t&&i||e("html").addClass("ui-nosvg")},a=new n.Image;a.onerror=function(){o(!1)},a.onload=function(){o(1===a.width&&1===a.height)},a.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}}),r.remove(),a=function(){var e=t.navigator.userAgent;return e.indexOf("Nokia")>-1&&(e.indexOf("Symbian/3")>-1||e.indexOf("Series60/5")>-1)&&e.indexOf("AppleWebKit")>-1&&e.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}(),e.mobile.gradeA=function(){return(e.support.mediaquery&&e.support.cssPseudoElement||e.mobile.browser.oldIE&&e.mobile.browser.oldIE>=8)&&(e.support.boundingRect||null!==e.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/))},e.mobile.ajaxBlacklist=t.blackberry&&!t.WebKitPoint||u||a,a&&e(function(){e("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),e.support.boxShadow||e("html").addClass("ui-noboxshadow")}(e),function(e,t){var n,i=e.mobile.window,o=function(){};e.event.special.beforenavigate={setup:function(){i.on("navigate",o)},teardown:function(){i.off("navigate",o)}},e.event.special.navigate=n={bound:!1,pushStateEnabled:!0,originalEventName:void 0,isPushStateEnabled:function(){return e.support.pushState&&!0===e.mobile.pushStateEnabled&&this.isHashChangeEnabled()},isHashChangeEnabled:function(){return!0===e.mobile.hashListeningEnabled},popstate:function(t){var n=new e.Event("navigate"),o=new e.Event("beforenavigate"),a=t.originalEvent.state||{};o.originalEvent=t,i.trigger(o),o.isDefaultPrevented()||(t.historyState&&e.extend(a,t.historyState),n.originalEvent=t,setTimeout(function(){i.trigger(n,{state:a})},0))},hashchange:function(t){var n=new e.Event("navigate"),o=new e.Event("beforenavigate");o.originalEvent=t,i.trigger(o),o.isDefaultPrevented()||(n.originalEvent=t,i.trigger(n,{state:t.hashchangeState||{}}))},setup:function(){n.bound||(n.bound=!0,n.isPushStateEnabled()?(n.originalEventName="popstate",i.bind("popstate.navigate",n.popstate)):n.isHashChangeEnabled()&&(n.originalEventName="hashchange",i.bind("hashchange.navigate",n.hashchange)))}}}(e),function(e){e.event.special.throttledresize={setup:function(){e(this).bind("resize",o)},teardown:function(){e(this).unbind("resize",o)}};var t,n,i,o=function(){n=(new Date).getTime(),(i=n-a)>=250?(a=n,e(this).trigger("throttledresize")):(t&&clearTimeout(t),t=setTimeout(o,250-i))},a=0}(e),function(e,t){function i(){var e=o();e!==a&&(a=e,u.trigger(d))}var o,a,r,s,l,c,u=e(t),d="orientationchange",h={0:!0,180:!0};e.support.orientation&&(50,r=(l=t.innerWidth||u.width())>(c=t.innerHeight||u.height())&&l-c>50,s=h[t.orientation],(r&&s||!r&&!s)&&(h={"-90":!0,90:!0})),e.event.special.orientationchange=e.extend({},e.event.special.orientationchange,{setup:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;a=o(),u.bind("throttledresize",i)},teardown:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;u.unbind("throttledresize",i)},add:function(e){var t=e.handler;e.handler=function(e){return e.orientation=o(),t.apply(this,arguments)}}}),e.event.special.orientationchange.orientation=o=function(){var i=n.documentElement;return(e.support.orientation?h[t.orientation]:i&&i.clientWidth/i.clientHeight<1.1)?"portrait":"landscape"},e.fn[d]=function(e){return e?this.bind(d,e):this.trigger(d)}}(e,this),function(e,t,n,i){function o(e){for(;e&&void 0!==e.originalEvent;)e=e.originalEvent;return e}function a(t,n){var a,r,s,l,c,u,d,h,f,p=t.type;if((t=e.Event(t)).type=n,a=t.originalEvent,r=e.event.props,p.search(/^(mouse|click)/)>-1&&(r=A),a)for(d=r.length;d;)t[l=r[--d]]=a[l];if(p.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),-1!==p.search(/^touch/)&&(p=(s=o(a)).touches,c=s.changedTouches,u=p&&p.length?p[0]:c&&c.length?c[0]:i))for(h=0,f=T.length;h<f;h++)t[l=T[h]]=u[l];return t}function r(t){for(var n,i,o={};t;){for(i in n=e.data(t,y))n[i]&&(o[i]=o.hasVirtualBinding=!0);t=t.parentNode}return o}function s(){M=!0}function l(){M=!1}function c(){u(),k=setTimeout(function(){k=0,L=0,q.length=0,O=!1,s()},e.vmouse.resetTimerDuration)}function u(){k&&(clearTimeout(k),k=0)}function d(t,n,i){var o;return(i&&i[t]||!i&&function(t,n){for(var i;t;){if((i=e.data(t,y))&&(!n||i[n]))return t;t=t.parentNode}return null}(n.target,t))&&(o=a(n,t),e(n.target).trigger(o)),o}function h(t){var n,i=e.data(t.target,x);O||L&&L===i||(n=d("v"+t.type,t))&&(n.isDefaultPrevented()&&t.preventDefault(),n.isPropagationStopped()&&t.stopPropagation(),n.isImmediatePropagationStopped()&&t.stopImmediatePropagation())}function f(t){var n,i,a,s=o(t).touches;s&&1===s.length&&((i=r(n=t.target)).hasVirtualBinding&&(L=H++,e.data(n,x,L),u(),l(),N=!1,a=o(t).touches[0],C=a.pageX,j=a.pageY,d("vmouseover",t,i),d("vmousedown",t,i)))}function p(e){M||(N||d("vmousecancel",e,r(e.target)),N=!0,c())}function m(t){if(!M){var n=o(t).touches[0],i=N,a=e.vmouse.moveDistanceThreshold,s=r(t.target);(N=N||Math.abs(n.pageX-C)>a||Math.abs(n.pageY-j)>a)&&!i&&d("vmousecancel",t,s),d("vmousemove",t,s),c()}}function v(e){if(!M){s();var t,n,i=r(e.target);d("vmouseup",e,i),N||(t=d("vclick",e,i))&&t.isDefaultPrevented()&&(n=o(e).changedTouches[0],q.push({touchID:L,x:n.clientX,y:n.clientY}),O=!0),d("vmouseout",e,i),N=!1,c()}}function g(t){var n,i=e.data(t,y);if(i)for(n in i)if(i[n])return!0;return!1}function b(){}var w,E,y="virtualMouseBindings",x="virtualTouchID",D="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),T="clientX clientY pageX pageY screenX screenY".split(" "),P=e.event.mouseHooks?e.event.mouseHooks.props:[],A=e.event.props.concat(P),S={},k=0,C=0,j=0,N=!1,q=[],O=!1,M=!1,I="addEventListener"in n,B=e(n),H=1,L=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},E=0;E<D.length;E++)e.event.special[D[E]]=function(t){var n=t.substr(1);return{setup:function(){g(this)||e.data(this,y,{}),e.data(this,y)[t]=!0,S[t]=(S[t]||0)+1,1===S[t]&&B.bind(n,h),e(this).bind(n,b),I&&(S.touchstart=(S.touchstart||0)+1,1===S.touchstart&&B.bind("touchstart",f).bind("touchend",v).bind("touchmove",m).bind("scroll",p))},teardown:function(){--S[t],S[t]||B.unbind(n,h),I&&(--S.touchstart||B.unbind("touchstart",f).unbind("touchmove",m).unbind("touchend",v).unbind("scroll",p));var i=e(this),o=e.data(this,y);o&&(o[t]=!1),i.unbind(n,b),g(this)||i.removeData(y)}}}(D[E]);I&&n.addEventListener("click",function(t){var n,i,o,a,r,s=q.length,l=t.target;if(s)for(n=t.clientX,i=t.clientY,w=e.vmouse.clickDistanceThreshold,o=l;o;){for(a=0;a<s;a++)if(r=q[a],o===l&&Math.abs(r.x-n)<w&&Math.abs(r.y-i)<w||e.data(o,x)===r.touchID)return t.preventDefault(),void t.stopPropagation();o=o.parentNode}},!0)}(e,0,n),function(e,t,i){function o(t,n,o,a){var r=o.type;o.type=n,a?e.event.trigger(o,i,t):e.event.dispatch.call(t,o),o.type=r}var a=e(n),r=e.mobile.support.touch,s=r?"touchstart":"mousedown",l=r?"touchend":"mouseup",c=r?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)}}),e.event.special.scrollstart={enabled:!0,setup:function(){function t(e,t){o(a,(n=t)?"scrollstart":"scrollstop",e)}var n,i,a=this;e(a).bind("touchmove scroll",function(o){e.event.special.scrollstart.enabled&&(n||t(o,!0),clearTimeout(i),i=setTimeout(function(){t(o,!1)},50))})},teardown:function(){e(this).unbind("touchmove scroll")}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),i=!1;n.bind("vmousedown",function(r){function s(){clearTimeout(u)}function l(){s(),n.unbind("vclick",c).unbind("vmouseup",s),a.unbind("vmousecancel",l)}function c(e){l(),i||d!==e.target?i&&e.preventDefault():o(t,"tap",e)}if(i=!1,r.which&&1!==r.which)return!1;var u,d=r.target;n.bind("vmouseup",s).bind("vclick",c),a.bind("vmousecancel",l),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(i=!0),o(t,"taphold",e.Event("taphold",{target:d}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),a.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,i=t.pageYOffset,o=e.clientX,a=e.clientY;return 0===e.pageY&&Math.floor(a)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(o)>Math.floor(e.pageX)?(o-=n,a-=i):(a<e.pageY-i||o<e.pageX-n)&&(o=e.pageX-n,a=e.pageY-i),{x:o,y:a}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[i.x,i.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[i.x,i.y]}},handleSwipe:function(t,n,i,a){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var r=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return o(i,"swipe",e.Event("swipe",{target:a,swipestart:t,swipestop:n}),!0),o(i,r,e.Event(r,{target:a,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,i=e(n),o={};(t=e.data(this,"mobile-events"))||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=o,o.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var i,r=e.event.special.swipe.start(t),s=t.target,u=!1;o.move=function(t){r&&!t.isDefaultPrevented()&&(i=e.event.special.swipe.stop(t),u||(u=e.event.special.swipe.handleSwipe(r,i,n,s))&&(e.event.special.swipe.eventInProgress=!1),Math.abs(r.coords[0]-i.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},o.stop=function(){u=!0,e.event.special.swipe.eventInProgress=!1,a.off(c,o.move),o.move=null},a.on(c,o.move).one(l,o.stop)}},i.on(s,o.start)},teardown:function(){var t,n;(t=e.data(this,"mobile-events"))&&(n=t.swipe,delete t.swipe,0==--t.length&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(s,n.start),n.move&&a.off(c,n.move),n.stop&&a.off(l,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
|
1 |
/*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
|
3 |
+
!function(e,t,n){"function"==typeof define&&define.amd?define(["jquery"],function(i){return n(i,e,t),i.mobile}):n(e.jQuery,e,t)}(this,document,function(e,t,n,i){!function(e,t,i){function o(e){return"#"+(e=e||location.href).replace(/^[^#]*#?(.*)$/,"$1")}var a,r="hashchange",s=n,l=e.event.special,c=s.documentMode,u="on"+r in t&&(void 0===c||c>7);e.fn[r]=function(e){return e?this.bind(r,e):this.trigger(r)},e.fn[r].delay=50,l[r]=e.extend(l[r],{setup:function(){if(u)return!1;e(a.start)},teardown:function(){if(u)return!1;e(a.stop)}}),a=function(){function n(){var a=o(),s=h(l);a!==l?(d(l=a,s),e(t).trigger(r)):s!==l&&(location.href=location.href.replace(/#.*/,"")+s),i=setTimeout(n,e.fn[r].delay)}var i,a={},l=o(),c=function(e){return e},d=c,h=c;return a.start=function(){i||n()},a.stop=function(){i&&clearTimeout(i),i=void 0},t.attachEvent&&!t.addEventListener&&!u&&function(){var t,i;a.start=function(){t||(i=(i=e.fn[r].src)&&i+o(),t=e('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){i||d(o()),n()}).attr("src",i||"javascript:0").insertAfter("body")[0].contentWindow,s.onpropertychange=function(){try{"title"===event.propertyName&&(t.document.title=s.title)}catch(e){}})},a.stop=c,h=function(){return o(t.location.href)},d=function(n,i){var o=t.document,a=e.fn[r].domain;n!==i&&(o.title=s.title,o.open(),a&&o.write('<script>document.domain="'+a+'"<\/script>'),o.close(),t.location.hash=n)}}(),a}()}(e,this),function(e){e.mobile={}}(e),function(e,t,n){e.extend(e.mobile,{version:"1.4.5",subPageUrlKey:"ui-page",hideUrlBar:!0,keepNative:":jqmData(role='none'), :jqmData(role='nojs')",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:0,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"a",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,buttonMarkup:{hoverDelay:200},dynamicBaseEnabled:!0,pageContainer:e(),allowCrossDomainPages:!1,dialogHashKey:"&ui-state=dialog"})}(e),function(e,t,n){var i={},o=e.find,a=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,r=/:jqmData\(([^)]*)\)/g;e.extend(e.mobile,{ns:"",getAttribute:function(t,n){var i;(t=t.jquery?t[0]:t)&&t.getAttribute&&(i=t.getAttribute("data-"+e.mobile.ns+n));try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:a.test(i)?JSON.parse(i):i)}catch(e){}return i},nsNormalizeDict:i,nsNormalize:function(t){return i[t]||(i[t]=e.camelCase(e.mobile.ns+t))},closestPageData:function(e){return e.closest(":jqmData(role='page'), :jqmData(role='dialog')").data("mobile-page")}}),e.fn.jqmData=function(t,n){var i;return void 0!==t&&(t&&(t=e.mobile.nsNormalize(t)),i=arguments.length<2||void 0===n?this.data(t):this.data(t,n)),i},e.jqmData=function(t,n,i){var o;return void 0!==n&&(o=e.data(t,n?e.mobile.nsNormalize(n):n,i)),o},e.fn.jqmRemoveData=function(t){return this.removeData(e.mobile.nsNormalize(t))},e.jqmRemoveData=function(t,n){return e.removeData(t,e.mobile.nsNormalize(n))},e.find=function(t,n,i,a){return t.indexOf(":jqmData")>-1&&(t=t.replace(r,"[data-"+(e.mobile.ns||"")+"$1]")),o.call(this,t,n,i,a)},e.extend(e.find,o)}(e),function(e,t){function i(t,n){var i,a,r,s=t.nodeName.toLowerCase();return"area"===s?(a=(i=t.parentNode).name,!(!t.href||!a||"map"!==i.nodeName.toLowerCase())&&!!(r=e("img[usemap=#"+a+"]")[0])&&o(r)):(/input|select|textarea|button|object/.test(s)?!t.disabled:"a"===s&&t.href||n)&&o(t)}function o(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,r=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"c0ab71056b936627e8a7821f03c044aec6280a40",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(n,i){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),i&&i.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(this[0].ownerDocument||n):t},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),o=isNaN(n);return(o||n>=0)&&i(t,!o)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,n){function i(t,n,i,a){return e.each(o,function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var o="Width"===n?["Left","Right"]:["Top","Bottom"],a=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(t){return void 0===t?r["inner"+n].call(this):this.each(function(){e(this).css(a,i(this,t)+"px")})},e.fn["outer"+n]=function(t,o){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(a,i(this,t,!0,o)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in n.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,o,a=e(this[0]);a.length&&a[0]!==n;){if(("absolute"===(i=a.css("position"))||"relative"===i||"fixed"===i)&&(o=parseInt(a.css("zIndex"),10),!isNaN(o)&&0!==o))return o;a=a.parent()}return 0}}),e.ui.plugin={add:function(t,n,i){var o,a=e.ui[t].prototype;for(o in i)a.plugins[o]=a.plugins[o]||[],a.plugins[o].push([n,i[o]])},call:function(e,t,n,i){var o,a=e.plugins[t];if(a&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(o=0;o<a.length;o++)e.options[a[o][0]]&&a[o][1].apply(e.element,n)}}}(e),function(e,t,i){e.extend(e.mobile,{window:e(t),document:e(n),keyCode:e.ui.keyCode,behaviors:{},silentScroll:function(n){"number"!==e.type(n)&&(n=e.mobile.defaultHomeScroll),e.event.special.scrollstart.enabled=!1,setTimeout(function(){t.scrollTo(0,n),e.mobile.document.trigger("silentscroll",{x:0,y:n})},20),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},getClosestBaseUrl:function(t){var n=e(t).closest(".ui-page").jqmData("url"),i=e.mobile.path.documentBase.hrefNoHash;return e.mobile.dynamicBaseEnabled&&n&&e.mobile.path.isPath(n)||(n=i),e.mobile.path.makeUrlAbsolute(n,i)},removeActiveLinkClass:function(t){!e.mobile.activeClickedLink||e.mobile.activeClickedLink.closest("."+e.mobile.activePageClass).length&&!t||e.mobile.activeClickedLink.removeClass(e.mobile.activeBtnClass),e.mobile.activeClickedLink=null},getInheritedTheme:function(e,t){for(var n,i,o=e[0],a="",r=/ui-(bar|body|overlay)-([a-z])\b/;o&&!((n=o.className||"")&&(i=r.exec(n))&&(a=i[2]));)o=o.parentNode;return a||t||"a"},enhanceable:function(e){return this.haveParents(e,"enhance")},hijackable:function(e){return this.haveParents(e,"ajax")},haveParents:function(t,n){if(!e.mobile.ignoreContentEnabled)return t;var i,o,a,r,s=t.length,l=e();for(r=0;r<s;r++){for(o=t.eq(r),a=!1,i=t[r];i;){if("false"===(i.getAttribute?i.getAttribute("data-"+e.mobile.ns+n):"")){a=!0;break}i=i.parentNode}a||(l=l.add(o))}return l},getScreenHeight:function(){return t.innerHeight||e.mobile.window.height()},resetActivePageHeight:function(t){var n=e("."+e.mobile.activePageClass),i=n.height(),o=n.outerHeight(!0);t=function(t,n){var i=t.parent(),o=[],a=function(){var t=e(this),n=e.mobile.toolbar&&t.data("mobile-toolbar")?t.toolbar("option"):{position:t.attr("data-"+e.mobile.ns+"position"),updatePagePadding:!1!==t.attr("data-"+e.mobile.ns+"update-page-padding")};return!("fixed"===n.position&&!0===n.updatePagePadding)},r=i.children(":jqmData(role='header')").filter(a),s=t.children(":jqmData(role='header')"),l=i.children(":jqmData(role='footer')").filter(a),c=t.children(":jqmData(role='footer')");return 0===s.length&&r.length>0&&(o=o.concat(r.toArray())),0===c.length&&l.length>0&&(o=o.concat(l.toArray())),e.each(o,function(t,i){n-=e(i).outerHeight()}),Math.max(0,n)}(n,"number"==typeof t?t:e.mobile.getScreenHeight()),n.css("min-height",""),n.height()<t&&n.css("min-height",t-(o-i))},loading:function(){var t=this.loading._widget||e(e.mobile.loader.prototype.defaultHtml).loader(),n=t.loader.apply(t,arguments);return this.loading._widget=t,n}}),e.addDependents=function(t,n){var i=e(t),o=i.jqmData("dependents")||e();i.jqmData("dependents",e(o).add(n))},e.fn.extend({removeWithDependents:function(){e.removeWithDependents(this)},enhanceWithin:function(){var t,n={},i=e.mobile.page.prototype.keepNativeSelector(),o=this;for(t in e.mobile.nojs&&e.mobile.nojs(this),e.mobile.links&&e.mobile.links(this),e.mobile.degradeInputsWithin&&e.mobile.degradeInputsWithin(this),e.fn.buttonMarkup&&this.find(e.fn.buttonMarkup.initSelector).not(i).jqmEnhanceable().buttonMarkup(),e.fn.fieldcontain&&this.find(":jqmData(role='fieldcontain')").not(i).jqmEnhanceable().fieldcontain(),e.each(e.mobile.widgets,function(t,a){if(a.initSelector){var r=e.mobile.enhanceable(o.find(a.initSelector));r.length>0&&(r=r.not(i)),r.length>0&&(n[a.prototype.widgetName]=r)}}),n)n[t][t]();return this},addDependents:function(t){e.addDependents(this,t)},getEncodedText:function(){return e("<a>").text(this.text()).html()},jqmEnhanceable:function(){return e.mobile.enhanceable(this)},jqmHijackable:function(){return e.mobile.hijackable(this)}}),e.removeWithDependents=function(t){var n=e(t);(n.jqmData("dependents")||e()).remove(),n.remove()},e.addDependents=function(t,n){var i=e(t),o=i.jqmData("dependents")||e();i.jqmData("dependents",e(o).add(n))},e.find.matches=function(t,n){return e.find(t,null,null,n)},e.find.matchesSelector=function(t,n){return e.find(n,null,null,[t]).length>0}}(e,this),function(e,i){t.matchMedia=t.matchMedia||function(e,t){var n,i=e.documentElement,o=i.firstElementChild||i.firstChild,a=e.createElement("body"),r=e.createElement("div");return r.id="mq-test-1",r.style.cssText="position:absolute;top:-100em",a.style.background="none",a.appendChild(r),function(e){return r.innerHTML='­<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',i.insertBefore(a,o),n=42===r.offsetWidth,i.removeChild(a),{matches:n,media:e}}}(n),e.mobile.media=function(e){return t.matchMedia(e).matches}}(e),function(e,t){var i={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,i),e.extend(e.mobile.support,i)}(e),function(e,n){e.extend(e.support,{orientation:"orientation"in t&&"onorientationchange"in t})}(e),function(e,i){function o(e){var t,n=e.charAt(0).toUpperCase()+e.substr(1),o=(e+" "+l.join(n+" ")+n).split(" ");for(t in o)if(s[o[t]]!==i)return!0}var a,r=e("<body>").prependTo("html"),s=r[0].style,l=["Webkit","Moz","O"],c="palmGetResource"in t,u=t.operamini&&"[object OperaMini]"==={}.toString.call(t.operamini),d=t.blackberry&&!o("-webkit-transform");e.extend(e.mobile,{browser:{}}),e.mobile.browser.oldIE=function(){var e=3,t=n.createElement("div"),i=t.all||[];do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><br><![endif]--\x3e"}while(i[0]);return e>4?e:!e}(),e.extend(e.support,{pushState:"pushState"in history&&"replaceState"in history&&!(t.navigator.userAgent.indexOf("Firefox")>=0&&t.top!==t)&&-1===t.navigator.userAgent.search(/CriOS/),mediaquery:e.mobile.media("only all"),cssPseudoElement:!!o("content"),touchOverflow:!!o("overflowScrolling"),cssTransform3d:function(){var o,a,s,c="transform-3d",u=e.mobile.media("(-"+l.join("-"+c+"),(-")+"-"+c+"),("+c+")");if(u)return!!u;for(s in o=n.createElement("div"),a={MozTransform:"-moz-transform",transform:"transform"},r.append(o),a)o.style[s]!==i&&(o.style[s]="translate3d( 100px, 1px, 1px )",u=t.getComputedStyle(o).getPropertyValue(a[s]));return!!u&&"none"!==u}(),boxShadow:!!o("boxShadow")&&!d,fixedPosition:function(){var e=t,n=navigator.userAgent,i=navigator.platform,o=n.match(/AppleWebKit\/([0-9]+)/),a=!!o&&o[1],r=n.match(/Fennec\/([0-9]+)/),s=!!r&&r[1],l=n.match(/Opera Mobi\/([0-9]+)/),c=!!l&&l[1];return!((i.indexOf("iPhone")>-1||i.indexOf("iPad")>-1||i.indexOf("iPod")>-1)&&a&&a<534||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||l&&c<7458||n.indexOf("Android")>-1&&a&&a<533||s&&s<6||"palmGetResource"in t&&a&&a<534||n.indexOf("MeeGo")>-1&&n.indexOf("NokiaBrowser/8.5.0")>-1)}(),scrollTop:("pageXOffset"in t||"scrollTop"in n.documentElement||"scrollTop"in r[0])&&!c&&!u,dynamicBaseTag:function(){var t,n=location.protocol+"//"+location.host+location.pathname+"ui-dir/",i=e("head base"),o=null,a="";return i.length?a=i.attr("href"):i=o=e("<base>",{href:n}).appendTo("head"),t=e("<a href='testurl' />").prependTo(r)[0].href,i[0].href=a||location.pathname,o&&o.remove(),0===t.indexOf(n)}(),cssPointerEvents:function(){var e,i=n.createElement("x"),o=n.documentElement,a=t.getComputedStyle;return"pointerEvents"in i.style&&(i.style.pointerEvents="auto",i.style.pointerEvents="x",o.appendChild(i),e=a&&"auto"===a(i,"").pointerEvents,o.removeChild(i),!!e)}(),boundingRect:void 0!==n.createElement("div").getBoundingClientRect,inlineSVG:function(){var n=t,i=!(!n.document.createElementNS||!n.document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||n.opera&&-1===navigator.userAgent.indexOf("Chrome")),o=function(t){t&&i||e("html").addClass("ui-nosvg")},a=new n.Image;a.onerror=function(){o(!1)},a.onload=function(){o(1===a.width&&1===a.height)},a.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}}),r.remove(),a=function(){var e=t.navigator.userAgent;return e.indexOf("Nokia")>-1&&(e.indexOf("Symbian/3")>-1||e.indexOf("Series60/5")>-1)&&e.indexOf("AppleWebKit")>-1&&e.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}(),e.mobile.gradeA=function(){return(e.support.mediaquery&&e.support.cssPseudoElement||e.mobile.browser.oldIE&&e.mobile.browser.oldIE>=8)&&(e.support.boundingRect||null!==e.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/))},e.mobile.ajaxBlacklist=t.blackberry&&!t.WebKitPoint||u||a,a&&e(function(){e("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),e.support.boxShadow||e("html").addClass("ui-noboxshadow")}(e),function(e,t){var n,i=e.mobile.window,o=function(){};e.event.special.beforenavigate={setup:function(){i.on("navigate",o)},teardown:function(){i.off("navigate",o)}},e.event.special.navigate=n={bound:!1,pushStateEnabled:!0,originalEventName:void 0,isPushStateEnabled:function(){return e.support.pushState&&!0===e.mobile.pushStateEnabled&&this.isHashChangeEnabled()},isHashChangeEnabled:function(){return!0===e.mobile.hashListeningEnabled},popstate:function(t){var n=new e.Event("navigate"),o=new e.Event("beforenavigate"),a=t.originalEvent.state||{};o.originalEvent=t,i.trigger(o),o.isDefaultPrevented()||(t.historyState&&e.extend(a,t.historyState),n.originalEvent=t,setTimeout(function(){i.trigger(n,{state:a})},0))},hashchange:function(t){var n=new e.Event("navigate"),o=new e.Event("beforenavigate");o.originalEvent=t,i.trigger(o),o.isDefaultPrevented()||(n.originalEvent=t,i.trigger(n,{state:t.hashchangeState||{}}))},setup:function(){n.bound||(n.bound=!0,n.isPushStateEnabled()?(n.originalEventName="popstate",i.bind("popstate.navigate",n.popstate)):n.isHashChangeEnabled()&&(n.originalEventName="hashchange",i.bind("hashchange.navigate",n.hashchange)))}}}(e),function(e){e.event.special.throttledresize={setup:function(){e(this).bind("resize",o)},teardown:function(){e(this).unbind("resize",o)}};var t,n,i,o=function(){n=(new Date).getTime(),(i=n-a)>=250?(a=n,e(this).trigger("throttledresize")):(t&&clearTimeout(t),t=setTimeout(o,250-i))},a=0}(e),function(e,t){function i(){var e=o();e!==a&&(a=e,u.trigger(d))}var o,a,r,s,l,c,u=e(t),d="orientationchange",h={0:!0,180:!0};e.support.orientation&&(50,r=(l=t.innerWidth||u.width())>(c=t.innerHeight||u.height())&&l-c>50,s=h[t.orientation],(r&&s||!r&&!s)&&(h={"-90":!0,90:!0})),e.event.special.orientationchange=e.extend({},e.event.special.orientationchange,{setup:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;a=o(),u.bind("throttledresize",i)},teardown:function(){if(e.support.orientation&&!e.event.special.orientationchange.disabled)return!1;u.unbind("throttledresize",i)},add:function(e){var t=e.handler;e.handler=function(e){return e.orientation=o(),t.apply(this,arguments)}}}),e.event.special.orientationchange.orientation=o=function(){var i=n.documentElement;return(e.support.orientation?h[t.orientation]:i&&i.clientWidth/i.clientHeight<1.1)?"portrait":"landscape"},e.fn[d]=function(e){return e?this.bind(d,e):this.trigger(d)}}(e,this),function(e,t,n,i){function o(e){for(;e&&void 0!==e.originalEvent;)e=e.originalEvent;return e}function a(t,n){var a,r,s,l,c,u,d,h,f,p=t.type;if((t=e.Event(t)).type=n,a=t.originalEvent,r=e.event.props,p.search(/^(mouse|click)/)>-1&&(r=A),a)for(d=r.length;d;)t[l=r[--d]]=a[l];if(p.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),-1!==p.search(/^touch/)&&(p=(s=o(a)).touches,c=s.changedTouches,u=p&&p.length?p[0]:c&&c.length?c[0]:i))for(h=0,f=T.length;h<f;h++)t[l=T[h]]=u[l];return t}function r(t){for(var n,i,o={};t;){for(i in n=e.data(t,y))n[i]&&(o[i]=o.hasVirtualBinding=!0);t=t.parentNode}return o}function s(){M=!0}function l(){M=!1}function c(){u(),k=setTimeout(function(){k=0,L=0,q.length=0,O=!1,s()},e.vmouse.resetTimerDuration)}function u(){k&&(clearTimeout(k),k=0)}function d(t,n,i){var o;return(i&&i[t]||!i&&function(t,n){for(var i;t;){if((i=e.data(t,y))&&(!n||i[n]))return t;t=t.parentNode}return null}(n.target,t))&&(o=a(n,t),e(n.target).trigger(o)),o}function h(t){var n,i=e.data(t.target,x);O||L&&L===i||(n=d("v"+t.type,t))&&(n.isDefaultPrevented()&&t.preventDefault(),n.isPropagationStopped()&&t.stopPropagation(),n.isImmediatePropagationStopped()&&t.stopImmediatePropagation())}function f(t){var n,i,a,s=o(t).touches;s&&1===s.length&&((i=r(n=t.target)).hasVirtualBinding&&(L=H++,e.data(n,x,L),u(),l(),N=!1,a=o(t).touches[0],C=a.pageX,j=a.pageY,d("vmouseover",t,i),d("vmousedown",t,i)))}function p(e){M||(N||d("vmousecancel",e,r(e.target)),N=!0,c())}function m(t){if(!M){var n=o(t).touches[0],i=N,a=e.vmouse.moveDistanceThreshold,s=r(t.target);(N=N||Math.abs(n.pageX-C)>a||Math.abs(n.pageY-j)>a)&&!i&&d("vmousecancel",t,s),d("vmousemove",t,s),c()}}function v(e){if(!M){s();var t,n,i=r(e.target);d("vmouseup",e,i),N||(t=d("vclick",e,i))&&t.isDefaultPrevented()&&(n=o(e).changedTouches[0],q.push({touchID:L,x:n.clientX,y:n.clientY}),O=!0),d("vmouseout",e,i),N=!1,c()}}function g(t){var n,i=e.data(t,y);if(i)for(n in i)if(i[n])return!0;return!1}function b(){}var w,E,y="virtualMouseBindings",x="virtualTouchID",D="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),T="clientX clientY pageX pageY screenX screenY".split(" "),P=e.event.mouseHooks?e.event.mouseHooks.props:[],A=e.event.props.concat(P),S={},k=0,C=0,j=0,N=!1,q=[],O=!1,M=!1,I="addEventListener"in n,B=e(n),H=1,L=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},E=0;E<D.length;E++)e.event.special[D[E]]=function(t){var n=t.substr(1);return{setup:function(){g(this)||e.data(this,y,{}),e.data(this,y)[t]=!0,S[t]=(S[t]||0)+1,1===S[t]&&B.bind(n,h),e(this).bind(n,b),I&&(S.touchstart=(S.touchstart||0)+1,1===S.touchstart&&B.bind("touchstart",f).bind("touchend",v).bind("touchmove",m).bind("scroll",p))},teardown:function(){--S[t],S[t]||B.unbind(n,h),I&&(--S.touchstart||B.unbind("touchstart",f).unbind("touchmove",m).unbind("touchend",v).unbind("scroll",p));var i=e(this),o=e.data(this,y);o&&(o[t]=!1),i.unbind(n,b),g(this)||i.removeData(y)}}}(D[E]);I&&n.addEventListener("click",function(t){var n,i,o,a,r,s=q.length,l=t.target;if(s)for(n=t.clientX,i=t.clientY,w=e.vmouse.clickDistanceThreshold,o=l;o;){for(a=0;a<s;a++)if(r=q[a],o===l&&Math.abs(r.x-n)<w&&Math.abs(r.y-i)<w||e.data(o,x)===r.touchID)return t.preventDefault(),void t.stopPropagation();o=o.parentNode}},!0)}(e,0,n),function(e,t,i){function o(t,n,o,a){var r=o.type;o.type=n,a?e.event.trigger(o,i,t):e.event.dispatch.call(t,o),o.type=r}var a=e(n),r=e.mobile.support.touch,s=r?"touchstart":"mousedown",l=r?"touchend":"mouseup",c=r?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)}}),e.event.special.scrollstart={enabled:!0,setup:function(){function t(e,t){o(a,(n=t)?"scrollstart":"scrollstop",e)}var n,i,a=this;e(a).bind("touchmove scroll",function(o){e.event.special.scrollstart.enabled&&(n||t(o,!0),clearTimeout(i),i=setTimeout(function(){t(o,!1)},50))})},teardown:function(){e(this).unbind("touchmove scroll")}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),i=!1;n.bind("vmousedown",function(r){function s(){clearTimeout(u)}function l(){s(),n.unbind("vclick",c).unbind("vmouseup",s),a.unbind("vmousecancel",l)}function c(e){l(),i||d!==e.target?i&&e.preventDefault():o(t,"tap",e)}if(i=!1,r.which&&1!==r.which)return!1;var u,d=r.target;n.bind("vmouseup",s).bind("vclick",c),a.bind("vmousecancel",l),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(i=!0),o(t,"taphold",e.Event("taphold",{target:d}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),a.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,i=t.pageYOffset,o=e.clientX,a=e.clientY;return 0===e.pageY&&Math.floor(a)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(o)>Math.floor(e.pageX)?(o-=n,a-=i):(a<e.pageY-i||o<e.pageX-n)&&(o=e.pageX-n,a=e.pageY-i),{x:o,y:a}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[i.x,i.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[i.x,i.y]}},handleSwipe:function(t,n,i,a){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var r=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return o(i,"swipe",e.Event("swipe",{target:a,swipestart:t,swipestop:n}),!0),o(i,r,e.Event(r,{target:a,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,i=e(n),o={};(t=e.data(this,"mobile-events"))||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=o,o.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var i,r=e.event.special.swipe.start(t),s=t.target,u=!1;o.move=function(t){r&&!t.isDefaultPrevented()&&(i=e.event.special.swipe.stop(t),u||(u=e.event.special.swipe.handleSwipe(r,i,n,s))&&(e.event.special.swipe.eventInProgress=!1),Math.abs(r.coords[0]-i.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},o.stop=function(){u=!0,e.event.special.swipe.eventInProgress=!1,a.off(c,o.move),o.move=null},a.on(c,o.move).one(l,o.stop)}},i.on(s,o.start)},teardown:function(){var t,n;(t=e.data(this,"mobile-events"))&&(n=t.swipe,delete t.swipe,0==--t.length&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(s,n.start),n.move&&a.off(c,n.move),n.stop&&a.off(l,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
|
js/jquery.sumoselect.js
ADDED
@@ -0,0 +1,913 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*global jQuery, define, module, require*/
|
2 |
+
/*!
|
3 |
+
* jquery.sumoselect v3.3.24
|
4 |
+
* http://hemantnegi.github.io/jquery.sumoselect
|
5 |
+
* 2016-12-12
|
6 |
+
*
|
7 |
+
* Copyright 2015 Hemant Negi
|
8 |
+
* Email : hemant.frnz@gmail.com
|
9 |
+
* Compressor http://refresh-sf.com/
|
10 |
+
*/
|
11 |
+
|
12 |
+
(function (factory) {
|
13 |
+
'use strict';
|
14 |
+
if (typeof define === 'function' && define.amd) {
|
15 |
+
define(['jquery'], factory);
|
16 |
+
} else if (typeof exports !== 'undefined') {
|
17 |
+
module.exports = factory(require('jquery'));
|
18 |
+
} else {
|
19 |
+
factory(jQuery);
|
20 |
+
}
|
21 |
+
|
22 |
+
})(($) => {
|
23 |
+
|
24 |
+
'namespace sumo';
|
25 |
+
$.fn.SumoSelect = function (options) {
|
26 |
+
|
27 |
+
// This is the easiest way to have default options.
|
28 |
+
const defaultOptions = {
|
29 |
+
placeholder: 'Select Here', // Dont change it here.
|
30 |
+
csvDispCount: 3, // display no. of items in multiselect. 0 to display all.
|
31 |
+
captionFormat: '{0} Selected', // format of caption text. you can set your locale.
|
32 |
+
captionFormatAllSelected: '{0} all selected!', // format of caption text when all elements are selected. set null to use captionFormat. It will not work if there are disabled elements in select.
|
33 |
+
floatWidth: 400, // Screen width of device at which the list is rendered in floating popup fashion.
|
34 |
+
forceCustomRendering: false, // force the custom modal on all devices below floatWidth resolution.
|
35 |
+
nativeOnDevice: ['Android', 'BlackBerry', 'iPhone', 'iPad', 'iPod', 'Opera Mini', 'IEMobile', 'Silk'], //
|
36 |
+
outputAsCSV: false, // true to POST data as csv ( false for Html control array ie. default select )
|
37 |
+
csvSepChar: ',', // separation char in csv mode
|
38 |
+
okCancelInMulti: false, // display ok cancel buttons in desktop mode multiselect also.
|
39 |
+
isClickAwayOk: false, // for okCancelInMulti=true. sets whether click outside will trigger Ok or Cancel (default is cancel).
|
40 |
+
triggerChangeCombined: true, // im multi select mode whether to trigger change event on individual selection or combined selection.
|
41 |
+
selectAll: false, // to display select all button in multiselect mode.|| also select all will not be available on mobile devices.
|
42 |
+
|
43 |
+
search: false, // to display input for filtering content. selectAlltext will be input text placeholder
|
44 |
+
searchText: 'Search...', // placeholder for search input
|
45 |
+
searchFn (haystack, needle) { // search function
|
46 |
+
return haystack.toLowerCase().indexOf(needle.toLowerCase()) < 0;
|
47 |
+
},
|
48 |
+
noMatch: 'No matches for "{0}"',
|
49 |
+
prefix: '', // some prefix usually the field name. eg. '<b>Hello</b>'
|
50 |
+
locale: ['OK', 'Cancel', 'Select All'], // all text that is used. don't change the index.
|
51 |
+
up: false, // set true to open upside.
|
52 |
+
showTitle: true, // set to false to prevent title (tooltip) from appearing
|
53 |
+
max: null, // Maximum number of options selected (when multiple)
|
54 |
+
// eslint-disable-next-line no-unused-vars
|
55 |
+
renderLi: (li, _originalOption) => li // Custom <li> item renderer
|
56 |
+
};
|
57 |
+
|
58 |
+
const ret = this.each(function () {
|
59 |
+
const selObj = this; // the original select object.
|
60 |
+
if (this.sumo || !$(this).is('select')) return; //already initialized
|
61 |
+
|
62 |
+
const settings = $.extend({}, defaultOptions, options, $(this).data());
|
63 |
+
|
64 |
+
this.sumo = {
|
65 |
+
E: $(selObj), //the jquery object of original select element.
|
66 |
+
is_multi: $(selObj).attr('multiple'), //if its a multiple select
|
67 |
+
select: '',
|
68 |
+
caption: '',
|
69 |
+
placeholder: '',
|
70 |
+
optDiv: '',
|
71 |
+
CaptionCont: '',
|
72 |
+
ul: '',
|
73 |
+
is_floating: false,
|
74 |
+
is_opened: false,
|
75 |
+
//backdrop: '',
|
76 |
+
mob: false, // if to open device default select
|
77 |
+
Pstate: [],
|
78 |
+
lastUnselected: null,
|
79 |
+
selectedCount: 0,
|
80 |
+
|
81 |
+
createElems () {
|
82 |
+
const O = this;
|
83 |
+
const {0: {selectedOptions}} = O.E;
|
84 |
+
O.E.wrap('<div class="SumoSelect" tabindex="0" role="button" aria-expanded="false">');
|
85 |
+
[...selectedOptions].forEach((selectedOption) => { // Fix for IE resetting index to 0 when -1
|
86 |
+
selectedOption.selected = true;
|
87 |
+
});
|
88 |
+
O.select = O.E.parent();
|
89 |
+
O.caption = $('<span>');
|
90 |
+
O.CaptionCont = $(`<p class="CaptionCont SelectBox ${O.E.attr('class')}" ><label><i></i></label></p>`)
|
91 |
+
.attr('style', O.E.attr('style'))
|
92 |
+
.prepend(O.caption);
|
93 |
+
O.select.append(O.CaptionCont);
|
94 |
+
|
95 |
+
// default turn off if no multiselect
|
96 |
+
if (!O.is_multi) settings.okCancelInMulti = false;
|
97 |
+
|
98 |
+
if (O.E.attr('disabled'))
|
99 |
+
O.select.addClass('disabled').removeAttr('tabindex');
|
100 |
+
|
101 |
+
//if output as csv and is a multiselect.
|
102 |
+
if (settings.outputAsCSV && O.is_multi && O.E.attr('name')) {
|
103 |
+
//create a hidden field to store csv value.
|
104 |
+
O.select.append($('<input class="HEMANT123" type="hidden" />').attr('name', O.E.attr('name')).val(O.getSelStr()));
|
105 |
+
|
106 |
+
// so it can not post the original select.
|
107 |
+
O.E.removeAttr('name');
|
108 |
+
}
|
109 |
+
|
110 |
+
//break for mobile rendring.. if forceCustomRendering is false
|
111 |
+
if (O.isMobile() && !settings.forceCustomRendering) {
|
112 |
+
O.setNativeMobile();
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
// if there is a name attr in select add a class to container div
|
117 |
+
if (O.E.attr('name')) O.select.addClass(`sumo_${O.E.attr('name').replace(/\[\]/, '')}`);
|
118 |
+
|
119 |
+
//hide original select
|
120 |
+
O.E.addClass('SumoUnder').attr('tabindex', '-1');
|
121 |
+
|
122 |
+
//## Creating the list...
|
123 |
+
O.optDiv = $(`<div class="optWrapper ${settings.up ? 'up' : ''}">`);
|
124 |
+
|
125 |
+
//branch for floating list in low res devices.
|
126 |
+
O.floatingList();
|
127 |
+
|
128 |
+
//Creating the markup for the available options
|
129 |
+
O.ul = $('<ul class="options">');
|
130 |
+
O.optDiv.append(O.ul);
|
131 |
+
|
132 |
+
// Select all functionality
|
133 |
+
if (settings.selectAll && O.is_multi && !settings.max) O.SelAll();
|
134 |
+
|
135 |
+
// search functionality
|
136 |
+
if (settings.search) O.Search();
|
137 |
+
|
138 |
+
O.ul.append(O.prepItems(O.E.children()));
|
139 |
+
|
140 |
+
//if multiple then add the class multiple and add OK / CANCEL button
|
141 |
+
if (O.is_multi) O.multiSelelect();
|
142 |
+
|
143 |
+
O.select.append(O.optDiv);
|
144 |
+
O._handleMax();
|
145 |
+
O.basicEvents();
|
146 |
+
O.selAllState();
|
147 |
+
},
|
148 |
+
|
149 |
+
prepItems (opts, d) {
|
150 |
+
const lis = [], O = this;
|
151 |
+
$(opts).each((i, opt) => { // parsing options to li
|
152 |
+
const $opt = $(opt);
|
153 |
+
lis.push($opt.is('optgroup') ?
|
154 |
+
$(`<li class="group ${opt.disabled ? 'disabled' : ''}"><label></label><ul></ul></li>`)
|
155 |
+
.find('label')
|
156 |
+
.text($opt.attr('label'))
|
157 |
+
.end()
|
158 |
+
.find('ul')
|
159 |
+
.append(O.prepItems($opt.children(), opt.disabled))
|
160 |
+
.end()
|
161 |
+
:
|
162 |
+
O.createLi($opt, d)
|
163 |
+
);
|
164 |
+
});
|
165 |
+
return lis;
|
166 |
+
},
|
167 |
+
|
168 |
+
//## Creates a LI element from a given option and binds events to it
|
169 |
+
//## returns the jquery instance of li (not inserted in dom)
|
170 |
+
createLi (opt, d) {
|
171 |
+
const O = this;
|
172 |
+
|
173 |
+
if (!opt.attr('value')) opt.attr('value', opt.val());
|
174 |
+
const li = $(`<li class="opt"><label>${opt.html()}</label></li>`);
|
175 |
+
|
176 |
+
li.data('opt', opt); // store a direct reference to option.
|
177 |
+
opt.data('li', li); // store a direct reference to list item.
|
178 |
+
if (O.is_multi) li.prepend('<span><i></i></span>');
|
179 |
+
|
180 |
+
if (opt[0].disabled || d)
|
181 |
+
li.addClass('disabled');
|
182 |
+
|
183 |
+
O.onOptClick(li);
|
184 |
+
|
185 |
+
if (opt[0].selected) {
|
186 |
+
li.addClass('selected');
|
187 |
+
O.selectedCount++;
|
188 |
+
}
|
189 |
+
|
190 |
+
if (opt.attr('class'))
|
191 |
+
li.addClass(opt.attr('class'));
|
192 |
+
|
193 |
+
if (opt.attr('title'))
|
194 |
+
li.attr('title', opt.attr('title'));
|
195 |
+
|
196 |
+
return settings.renderLi(li, opt);
|
197 |
+
},
|
198 |
+
|
199 |
+
//## Returns the selected items as string in a Multiselect.
|
200 |
+
getSelStr () {
|
201 |
+
// get the pre selected items.
|
202 |
+
const sopt = [];
|
203 |
+
this.E.find('option:checked').each(function () { sopt.push($(this).val()); });
|
204 |
+
return sopt.join(settings.csvSepChar);
|
205 |
+
},
|
206 |
+
|
207 |
+
//## THOSE OK/CANCEL BUTTONS ON MULTIPLE SELECT.
|
208 |
+
multiSelelect () {
|
209 |
+
const O = this;
|
210 |
+
O.optDiv.addClass('multiple');
|
211 |
+
O.okbtn = $('<p tabindex="0" class="btnOk"></p>').click(() => {
|
212 |
+
//if combined change event is set.
|
213 |
+
O._okbtn();
|
214 |
+
O.hideOpts();
|
215 |
+
});
|
216 |
+
[O.okbtn[0].innerText] = settings.locale;
|
217 |
+
|
218 |
+
O.cancelBtn = $('<p tabindex="0" class="btnCancel"></p>').click(() => {
|
219 |
+
O._cnbtn();
|
220 |
+
O.hideOpts();
|
221 |
+
});
|
222 |
+
[, O.cancelBtn[0].innerText] = settings.locale;
|
223 |
+
|
224 |
+
const btns = O.okbtn.add(O.cancelBtn);
|
225 |
+
O.optDiv.append($('<div class="MultiControls">').append(btns));
|
226 |
+
|
227 |
+
// handling keyboard navigation on ok cancel buttons.
|
228 |
+
btns.on('keydown.sumo', function (e) {
|
229 |
+
const el = $(this);
|
230 |
+
switch (e.which) {
|
231 |
+
case 32: // space
|
232 |
+
case 13: // enter
|
233 |
+
el.trigger('click');
|
234 |
+
break;
|
235 |
+
|
236 |
+
case 9: //tab
|
237 |
+
if (el.hasClass('btnOk')) return;
|
238 |
+
break;
|
239 |
+
case 27: // esc
|
240 |
+
O._cnbtn();
|
241 |
+
O.hideOpts();
|
242 |
+
return;
|
243 |
+
default:
|
244 |
+
break;
|
245 |
+
}
|
246 |
+
e.stopPropagation();
|
247 |
+
e.preventDefault();
|
248 |
+
});
|
249 |
+
},
|
250 |
+
|
251 |
+
_okbtn () {
|
252 |
+
const O = this;
|
253 |
+
let cg = 0;
|
254 |
+
//if combined change event is set.
|
255 |
+
if (settings.triggerChangeCombined) {
|
256 |
+
//check for a change in the selection.
|
257 |
+
if (O.E.find('option:checked').length !== O.Pstate.length) {
|
258 |
+
cg = 1;
|
259 |
+
}
|
260 |
+
else {
|
261 |
+
O.E.find('option').each((i, e) => {
|
262 |
+
if (e.selected && O.Pstate.indexOf(i) < 0) cg = 1;
|
263 |
+
});
|
264 |
+
}
|
265 |
+
|
266 |
+
if (cg) {
|
267 |
+
O.callChange();
|
268 |
+
O.setText();
|
269 |
+
}
|
270 |
+
}
|
271 |
+
},
|
272 |
+
_cnbtn () {
|
273 |
+
const O = this;
|
274 |
+
//remove all selections
|
275 |
+
O.E.find('option:checked').each(function () { this.selected = false; });
|
276 |
+
O.optDiv.find('li.selected').removeClass('selected');
|
277 |
+
|
278 |
+
//restore selections from saved state.
|
279 |
+
for (let i = 0; i < O.Pstate.length; i++) {
|
280 |
+
O.E.find('option')[O.Pstate[i]].selected = true;
|
281 |
+
O.ul.find('li.opt').eq(O.Pstate[i]).addClass('selected');
|
282 |
+
}
|
283 |
+
O.selAllState();
|
284 |
+
},
|
285 |
+
|
286 |
+
_handleMax () {
|
287 |
+
// Disable options if max reached
|
288 |
+
if (settings.max) {
|
289 |
+
if (this.selectedCount >= +settings.max) {
|
290 |
+
this.optDiv.find('li.opt').not('.hidden').each((ix, e) => {
|
291 |
+
if (!$(e).hasClass('selected')) {
|
292 |
+
$(e).addClass('temporary-disabled disabled');
|
293 |
+
}
|
294 |
+
});
|
295 |
+
} else {
|
296 |
+
// Enable options back
|
297 |
+
this.optDiv.find('li.opt').not('.hidden').each((ix, e) => {
|
298 |
+
if ($(e).hasClass('temporary-disabled')) {
|
299 |
+
$(e).removeClass('temporary-disabled disabled');
|
300 |
+
}
|
301 |
+
});
|
302 |
+
}
|
303 |
+
}
|
304 |
+
},
|
305 |
+
|
306 |
+
SelAll () {
|
307 |
+
const O = this;
|
308 |
+
if (!O.is_multi) return;
|
309 |
+
O.selAll = $('<p class="select-all"><span><i></i></span><label></label></p>');
|
310 |
+
[, , O.selAll.find('label')[0].innerText] = settings.locale;
|
311 |
+
O.optDiv.addClass('selall');
|
312 |
+
O.selAll.on('click', () => {
|
313 |
+
O.selAll.toggleClass('selected');
|
314 |
+
O.toggSelAll(O.selAll.hasClass('selected'), 1);
|
315 |
+
//O.selAllState();
|
316 |
+
});
|
317 |
+
|
318 |
+
O.optDiv.prepend(O.selAll);
|
319 |
+
},
|
320 |
+
|
321 |
+
// search module (can be removed if not required.)
|
322 |
+
Search () {
|
323 |
+
const O = this,
|
324 |
+
cc = O.CaptionCont.addClass('search'),
|
325 |
+
P = $('<p class="no-match">'),
|
326 |
+
fn = (options.searchFn && typeof options.searchFn === 'function') ? options.searchFn : settings.searchFn;
|
327 |
+
|
328 |
+
O.ftxt = $('<input type="text" class="search-txt" value="" autocomplete="off">')
|
329 |
+
.on('click', (e) => {
|
330 |
+
e.stopPropagation();
|
331 |
+
});
|
332 |
+
O.ftxt.placeholder = settings.searchText;
|
333 |
+
cc.append(O.ftxt);
|
334 |
+
O.optDiv.children('ul').after(P);
|
335 |
+
|
336 |
+
O.ftxt.on('keyup.sumo', () => {
|
337 |
+
const hid = O.optDiv.find('ul.options li.opt').each((ix, e) => {
|
338 |
+
const el = $(e),
|
339 |
+
{0: opt} = el.data('opt');
|
340 |
+
opt.hidden = fn(el.text(), O.ftxt.val());
|
341 |
+
el.toggleClass('hidden', opt.hidden);
|
342 |
+
}).not('.hidden');
|
343 |
+
|
344 |
+
// Hide opt-groups with no options matched
|
345 |
+
O.optDiv[0].querySelectorAll('li.group').forEach(optGroup => {
|
346 |
+
if (optGroup.querySelector('li:not(.hidden)')) {
|
347 |
+
optGroup.classList.remove('hidden');
|
348 |
+
} else {
|
349 |
+
optGroup.classList.add('hidden');
|
350 |
+
}
|
351 |
+
});
|
352 |
+
|
353 |
+
P.html(settings.noMatch.replace(/\{0\}/g, '<em></em>')).toggle(!hid.length);
|
354 |
+
P.find('em').text(O.ftxt.val());
|
355 |
+
O.selAllState();
|
356 |
+
});
|
357 |
+
},
|
358 |
+
|
359 |
+
selAllState () {
|
360 |
+
const O = this;
|
361 |
+
if (settings.selectAll && O.is_multi) {
|
362 |
+
let sc = 0, vc = 0;
|
363 |
+
O.optDiv.find('li.opt').not('.hidden .disabled').each((ix, e) => {
|
364 |
+
if ($(e).hasClass('selected')) sc++;
|
365 |
+
vc++;
|
366 |
+
});
|
367 |
+
//select all checkbox state change.
|
368 |
+
if (sc === vc) O.selAll.removeClass('partial').addClass('selected');
|
369 |
+
else if (sc === 0) O.selAll.removeClass('selected partial');
|
370 |
+
else O.selAll.addClass('partial');//.removeClass('selected');
|
371 |
+
}
|
372 |
+
},
|
373 |
+
|
374 |
+
showOpts () {
|
375 |
+
const O = this;
|
376 |
+
if (O.E.attr('disabled')) return; // if select is disabled then retrun
|
377 |
+
O.E.trigger('sumo:opening', O);
|
378 |
+
O.is_opened = true;
|
379 |
+
O.select.addClass('open').attr('aria-expanded', 'true');
|
380 |
+
O.E.trigger('sumo:opened', O);
|
381 |
+
|
382 |
+
if (O.ftxt) O.ftxt.focus();
|
383 |
+
else O.select.focus();
|
384 |
+
|
385 |
+
// hide options on click outside.
|
386 |
+
$(document).on('click.sumo', (e) => {
|
387 |
+
if (!O.select.is(e.target) // if the target of the click isn't the container...
|
388 |
+
&& O.select.has(e.target).length === 0) { // ... nor a descendant of the container
|
389 |
+
if (!O.is_opened) return;
|
390 |
+
O.hideOpts();
|
391 |
+
if (settings.okCancelInMulti) {
|
392 |
+
if (settings.isClickAwayOk)
|
393 |
+
O._okbtn();
|
394 |
+
else
|
395 |
+
O._cnbtn();
|
396 |
+
}
|
397 |
+
}
|
398 |
+
});
|
399 |
+
|
400 |
+
if (O.is_floating) {
|
401 |
+
let H = O.optDiv.children('ul').outerHeight() + 2; // +2 is clear fix
|
402 |
+
if (O.is_multi) H = H + +O.optDiv.css('padding-bottom');
|
403 |
+
O.optDiv.css('height', H);
|
404 |
+
$('body').addClass('sumoStopScroll');
|
405 |
+
}
|
406 |
+
|
407 |
+
O.setPstate();
|
408 |
+
},
|
409 |
+
|
410 |
+
//maintain state when ok/cancel buttons are available storing the indexes.
|
411 |
+
setPstate () {
|
412 |
+
const O = this;
|
413 |
+
if (O.is_multi && (O.is_floating || settings.okCancelInMulti)) {
|
414 |
+
O.Pstate = [];
|
415 |
+
// assuming that find returns elements in tree order
|
416 |
+
O.E.find('option').each((i, e) => { if (e.selected) O.Pstate.push(i); });
|
417 |
+
}
|
418 |
+
},
|
419 |
+
|
420 |
+
callChange () {
|
421 |
+
this.E.get().forEach(e => {
|
422 |
+
e.dispatchEvent(new Event('change'));
|
423 |
+
e.dispatchEvent(new Event('click'));
|
424 |
+
});
|
425 |
+
},
|
426 |
+
|
427 |
+
hideOpts () {
|
428 |
+
const O = this;
|
429 |
+
if (O.is_opened) {
|
430 |
+
O.E.trigger('sumo:closing', O);
|
431 |
+
O.is_opened = false;
|
432 |
+
O.select.removeClass('open').attr('aria-expanded', 'false').find('ul li.sel').removeClass('sel');
|
433 |
+
O.E.trigger('sumo:closed', O);
|
434 |
+
$(document).off('click.sumo');
|
435 |
+
$('body').removeClass('sumoStopScroll');
|
436 |
+
|
437 |
+
// clear the search
|
438 |
+
if (settings.search) {
|
439 |
+
O.ftxt.val('');
|
440 |
+
O.ftxt.trigger('keyup.sumo');
|
441 |
+
}
|
442 |
+
}
|
443 |
+
},
|
444 |
+
setOnOpen () {
|
445 |
+
const O = this;
|
446 |
+
let li = O.optDiv.find('li.opt:not(.hidden)').eq(settings.search ? 0 : O.E[0].selectedIndex);
|
447 |
+
if (li.hasClass('disabled')) {
|
448 |
+
li = li.next(':not(disabled)');
|
449 |
+
if (!li.length) return;
|
450 |
+
}
|
451 |
+
O.optDiv.find('li.sel').removeClass('sel');
|
452 |
+
li.addClass('sel');
|
453 |
+
O.showOpts();
|
454 |
+
},
|
455 |
+
nav (up) {
|
456 |
+
const O = this;
|
457 |
+
let c = null, sel = O.ul.find('li.opt.sel:not(.hidden)');
|
458 |
+
const
|
459 |
+
s = O.ul.find('li.opt:not(.disabled):not(.hidden)'),
|
460 |
+
idx = s.index(sel);
|
461 |
+
if (O.is_opened && sel.length) {
|
462 |
+
if (up && idx > 0)
|
463 |
+
c = s.eq(idx - 1);
|
464 |
+
else if (!up && idx < s.length - 1 && idx > -1)
|
465 |
+
c = s.eq(idx + 1);
|
466 |
+
else return; // if no items before or after
|
467 |
+
|
468 |
+
sel.removeClass('sel');
|
469 |
+
sel = c.addClass('sel');
|
470 |
+
|
471 |
+
// setting sel item to visible view.
|
472 |
+
const { ul } = O,
|
473 |
+
st = ul.scrollTop(),
|
474 |
+
t = sel.position().top + st;
|
475 |
+
if (t >= st + ul.height() - sel.outerHeight())
|
476 |
+
ul.scrollTop(t - ul.height() + sel.outerHeight());
|
477 |
+
if (t < st)
|
478 |
+
ul.scrollTop(t);
|
479 |
+
|
480 |
+
}
|
481 |
+
else
|
482 |
+
O.setOnOpen();
|
483 |
+
},
|
484 |
+
|
485 |
+
basicEvents () {
|
486 |
+
const O = this;
|
487 |
+
O.CaptionCont.click((evt) => {
|
488 |
+
O.E.trigger('click');
|
489 |
+
if (O.is_opened) O.hideOpts(); else O.showOpts();
|
490 |
+
evt.stopPropagation();
|
491 |
+
});
|
492 |
+
|
493 |
+
O.select.on('keydown.sumo', (e) => {
|
494 |
+
switch (e.which) {
|
495 |
+
case 38: // up
|
496 |
+
O.nav(true);
|
497 |
+
break;
|
498 |
+
|
499 |
+
case 40: // down
|
500 |
+
O.nav(false);
|
501 |
+
break;
|
502 |
+
|
503 |
+
case 65: // shortcut ctrl + a to select all and ctrl + shift + a to unselect all.
|
504 |
+
if (O.is_multi && !settings.max && e.ctrlKey) {
|
505 |
+
O.toggSelAll(!e.shiftKey, 1);
|
506 |
+
break;
|
507 |
+
}
|
508 |
+
else
|
509 |
+
return;
|
510 |
+
|
511 |
+
case 32: // space
|
512 |
+
if (settings.search && O.ftxt.is(e.target)) return;
|
513 |
+
break;
|
514 |
+
case 13: // enter
|
515 |
+
if (O.is_opened)
|
516 |
+
O.optDiv.find('ul li.sel').trigger('click');
|
517 |
+
else
|
518 |
+
O.setOnOpen();
|
519 |
+
break;
|
520 |
+
case 9: //tab
|
521 |
+
if (!settings.okCancelInMulti)
|
522 |
+
O.hideOpts();
|
523 |
+
return;
|
524 |
+
case 27: // esc
|
525 |
+
if (settings.okCancelInMulti) O._cnbtn();
|
526 |
+
O.hideOpts();
|
527 |
+
return;
|
528 |
+
|
529 |
+
default:
|
530 |
+
return; // exit this handler for other keys
|
531 |
+
}
|
532 |
+
e.preventDefault(); // prevent the default action (scroll / move caret)
|
533 |
+
});
|
534 |
+
|
535 |
+
$(window).on('resize.sumo', () => {
|
536 |
+
O.floatingList();
|
537 |
+
});
|
538 |
+
},
|
539 |
+
|
540 |
+
onOptClick (li) {
|
541 |
+
const O = this;
|
542 |
+
li.click(function () {
|
543 |
+
const $li = $(this);
|
544 |
+
if ($li.hasClass('disabled')) return;
|
545 |
+
if (O.is_multi) {
|
546 |
+
$li.toggleClass('selected');
|
547 |
+
$li.data('opt')[0].selected = $li.hasClass('selected');
|
548 |
+
if ($li.data('opt')[0].selected === false) {
|
549 |
+
O.lastUnselected = $li.data('opt')[0].textContent;
|
550 |
+
O.selectedCount--;
|
551 |
+
} else {
|
552 |
+
O.selectedCount++;
|
553 |
+
}
|
554 |
+
|
555 |
+
if (settings.max) {
|
556 |
+
O._handleMax();
|
557 |
+
}
|
558 |
+
|
559 |
+
O.selAllState();
|
560 |
+
}
|
561 |
+
else {
|
562 |
+
$li.parent().find('li.selected').removeClass('selected'); //if not multiselect then remove all selections from this list
|
563 |
+
$li.toggleClass('selected');
|
564 |
+
$li.data('opt')[0].selected = true;
|
565 |
+
O.selectedCount = 1;
|
566 |
+
}
|
567 |
+
|
568 |
+
//branch for combined change event.
|
569 |
+
if (!(O.is_multi && settings.triggerChangeCombined && (O.is_floating || settings.okCancelInMulti))) {
|
570 |
+
O.setText();
|
571 |
+
O.callChange();
|
572 |
+
}
|
573 |
+
|
574 |
+
if (!O.is_multi) O.hideOpts(); //if its not a multiselect then hide on single select.
|
575 |
+
});
|
576 |
+
},
|
577 |
+
|
578 |
+
// fixed some variables that were not explicitly typed (michc)
|
579 |
+
setText () {
|
580 |
+
const O = this;
|
581 |
+
O.placeholder = "";
|
582 |
+
if (O.is_multi) {
|
583 |
+
const sels = O.E.find(':checked').not(':disabled'); //selected options.
|
584 |
+
|
585 |
+
if (settings.csvDispCount && sels.length > settings.csvDispCount) {
|
586 |
+
if (sels.length === O.E.find('option').length && settings.captionFormatAllSelected) {
|
587 |
+
O.placeholder = settings.captionFormatAllSelected.replace(/\{0\}/g, sels.length);
|
588 |
+
}
|
589 |
+
else {
|
590 |
+
O.placeholder = settings.captionFormat.replace(/\{0\}/g, sels.length);
|
591 |
+
}
|
592 |
+
}
|
593 |
+
else {
|
594 |
+
O.placeholder = sels.toArray().map(selected => selected.innerText).join(', ');
|
595 |
+
}
|
596 |
+
}
|
597 |
+
else {
|
598 |
+
O.placeholder = O.E.find(':checked').not(':disabled').text();
|
599 |
+
}
|
600 |
+
|
601 |
+
let is_placeholder = false;
|
602 |
+
|
603 |
+
if (!O.placeholder) {
|
604 |
+
|
605 |
+
is_placeholder = true;
|
606 |
+
|
607 |
+
O.placeholder = O.E.attr('placeholder');
|
608 |
+
if (!O.placeholder) //if placeholder is there then set it
|
609 |
+
O.placeholder = O.E.find('option:disabled:checked').text();
|
610 |
+
}
|
611 |
+
|
612 |
+
O.placeholder = O.placeholder ? (`${settings.prefix} ${O.placeholder}`) : settings.placeholder;
|
613 |
+
|
614 |
+
//set display text
|
615 |
+
O.caption.text(O.placeholder);
|
616 |
+
if (settings.showTitle) O.CaptionCont.attr('title', O.placeholder);
|
617 |
+
|
618 |
+
//set the hidden field if post as csv is true.
|
619 |
+
const csvField = O.select.find('input.HEMANT123');
|
620 |
+
if (csvField.length) csvField.val(O.getSelStr());
|
621 |
+
|
622 |
+
//add class placeholder if its a placeholder text.
|
623 |
+
if (is_placeholder) O.caption.addClass('placeholder'); else O.caption.removeClass('placeholder');
|
624 |
+
return O.placeholder;
|
625 |
+
},
|
626 |
+
|
627 |
+
isMobile () {
|
628 |
+
|
629 |
+
// Adapted from http://www.detectmobilebrowsers.com
|
630 |
+
const ua = navigator.userAgent || navigator.vendor || window.opera;
|
631 |
+
|
632 |
+
// Checks for iOs, Android, Blackberry, Opera Mini, and Windows mobile devices
|
633 |
+
for (let i = 0; i < settings.nativeOnDevice.length; i++) if (ua.toString().toLowerCase().indexOf(settings.nativeOnDevice[i].toLowerCase()) > 0) return settings.nativeOnDevice[i];
|
634 |
+
return false;
|
635 |
+
},
|
636 |
+
|
637 |
+
setNativeMobile () {
|
638 |
+
const O = this;
|
639 |
+
O.E.addClass('SelectClass');//.css('height', O.select.outerHeight());
|
640 |
+
O.mob = true;
|
641 |
+
O.E.change(() => {
|
642 |
+
O.setText();
|
643 |
+
});
|
644 |
+
},
|
645 |
+
|
646 |
+
floatingList () {
|
647 |
+
const O = this;
|
648 |
+
//called on init and also on resize.
|
649 |
+
//O.is_floating = true if window width is < specified float width
|
650 |
+
O.is_floating = $(window).width() <= settings.floatWidth;
|
651 |
+
|
652 |
+
//set class isFloating
|
653 |
+
O.optDiv.toggleClass('isFloating', O.is_floating);
|
654 |
+
|
655 |
+
//remove height if not floating
|
656 |
+
if (!O.is_floating) O.optDiv.css('height', '');
|
657 |
+
|
658 |
+
//toggle class according to okCancelInMulti flag only when it is not floating
|
659 |
+
O.optDiv.toggleClass('okCancelInMulti', settings.okCancelInMulti && !O.is_floating);
|
660 |
+
},
|
661 |
+
|
662 |
+
//HELPERS FOR OUTSIDERS
|
663 |
+
// validates range of given item operations
|
664 |
+
vRange (i) {
|
665 |
+
const O = this;
|
666 |
+
const opts = O.E.find('option');
|
667 |
+
if (opts.length <= i || i < 0) throw new Error("index out of bounds");
|
668 |
+
return O;
|
669 |
+
},
|
670 |
+
|
671 |
+
//toggles selection on c as boolean.
|
672 |
+
toggSel (c, i) {
|
673 |
+
const O = this;
|
674 |
+
let opt = null;
|
675 |
+
if (typeof (i) === "number") {
|
676 |
+
O.vRange(i);
|
677 |
+
opt = O.E.find('option')[i];
|
678 |
+
}
|
679 |
+
else {
|
680 |
+
opt = O.E.find(`option[value="${i}"]`)[0] || 0;
|
681 |
+
}
|
682 |
+
if (!opt || opt.disabled)
|
683 |
+
return;
|
684 |
+
|
685 |
+
if (opt.selected !== c) {
|
686 |
+
if ((settings.max && !opt.selected && O.selectedCount < settings.max) || opt.selected || (!settings.max && !opt.selected)) {
|
687 |
+
opt.selected = c;
|
688 |
+
if (!O.mob) $(opt).data('li').toggleClass('selected', c);
|
689 |
+
|
690 |
+
O.callChange();
|
691 |
+
O.setPstate();
|
692 |
+
O.setText();
|
693 |
+
O.selAllState();
|
694 |
+
}
|
695 |
+
}
|
696 |
+
},
|
697 |
+
|
698 |
+
//toggles disabled on c as boolean.
|
699 |
+
toggDis (c, i) {
|
700 |
+
const O = this.vRange(i);
|
701 |
+
O.E.find('option')[i].disabled = c;
|
702 |
+
if (c) O.E.find('option')[i].selected = false;
|
703 |
+
if (!O.mob) O.optDiv.find('ul.options li.opt').eq(i).toggleClass('disabled', c).removeClass('selected');
|
704 |
+
O.setText();
|
705 |
+
},
|
706 |
+
|
707 |
+
// toggle disable/enable on complete select control
|
708 |
+
toggSumo (val) {
|
709 |
+
const O = this;
|
710 |
+
O.enabled = val;
|
711 |
+
O.select.toggleClass('disabled', val);
|
712 |
+
|
713 |
+
if (val) {
|
714 |
+
O.E.attr('disabled', 'disabled');
|
715 |
+
O.select.removeAttr('tabindex');
|
716 |
+
}
|
717 |
+
else {
|
718 |
+
O.E.removeAttr('disabled');
|
719 |
+
O.select.attr('tabindex', '0');
|
720 |
+
}
|
721 |
+
|
722 |
+
return O;
|
723 |
+
},
|
724 |
+
|
725 |
+
// toggles all option on c as boolean.
|
726 |
+
// set direct=false/0 bypasses okCancelInMulti behaviour.
|
727 |
+
toggSelAll (c, direct) {
|
728 |
+
const O = this;
|
729 |
+
const cloneOriginalEvents = $.extend(true, {}, $._data(O.E.get(0), "events")); // clone original select elements events
|
730 |
+
O.E.off(); // unbind original select elements events because we do not want the following clicks to trigger change on it
|
731 |
+
|
732 |
+
if (O.is_multi) {
|
733 |
+
// Select all
|
734 |
+
if (c) {
|
735 |
+
O.E.find('option:not(:checked):not(:disabled):not(:hidden)').toArray().forEach(option => {
|
736 |
+
if (!$(option).data('li').hasClass('hidden')) {
|
737 |
+
option.selected = true;
|
738 |
+
$(option).data('li').toggleClass('selected', true);
|
739 |
+
}
|
740 |
+
});
|
741 |
+
} else {
|
742 |
+
// Unselect all
|
743 |
+
O.E.find('option:checked:not(:disabled):not(:hidden)').toArray().forEach(option => {
|
744 |
+
if (!$(option).data('li').hasClass('hidden')) {
|
745 |
+
option.selected = false;
|
746 |
+
$(option).data('li').toggleClass('selected', false);
|
747 |
+
}
|
748 |
+
});
|
749 |
+
}
|
750 |
+
} else {
|
751 |
+
if (!c) O.E[0].selectedIndex = -1;
|
752 |
+
else console.warn('You called `SelectAll` on a non-multiple select');
|
753 |
+
}
|
754 |
+
|
755 |
+
// rebind original select elements events
|
756 |
+
$.each(cloneOriginalEvents, (_, e) => {
|
757 |
+
$.each(e, (__, ev) => {
|
758 |
+
O.E.on(ev.type, ev.handler);
|
759 |
+
});
|
760 |
+
});
|
761 |
+
|
762 |
+
O.callChange(); // call change on original select element
|
763 |
+
|
764 |
+
if (!direct) {
|
765 |
+
if (!O.mob && O.selAll) O.selAll.removeClass('partial').toggleClass('selected', !!c);
|
766 |
+
O.setText();
|
767 |
+
O.setPstate();
|
768 |
+
}
|
769 |
+
},
|
770 |
+
|
771 |
+
/* outside accessibility options
|
772 |
+
which can be accessed from the element instance.
|
773 |
+
*/
|
774 |
+
reload () {
|
775 |
+
const elm = this.unload();
|
776 |
+
return $(elm).SumoSelect(settings);
|
777 |
+
},
|
778 |
+
|
779 |
+
unload () {
|
780 |
+
const O = this;
|
781 |
+
O.select.before(O.E);
|
782 |
+
O.E.show();
|
783 |
+
O.E[0].classList.remove('SumoUnder');
|
784 |
+
|
785 |
+
if (settings.outputAsCSV && O.is_multi && O.select.find('input.HEMANT123').length) {
|
786 |
+
O.E.attr('name', O.select.find('input.HEMANT123').attr('name')); // restore the name;
|
787 |
+
}
|
788 |
+
O.select.remove();
|
789 |
+
delete selObj.sumo;
|
790 |
+
O.E.trigger('sumo:unloaded', O);
|
791 |
+
return selObj;
|
792 |
+
},
|
793 |
+
|
794 |
+
//## add a new option to select at a given index.
|
795 |
+
add (val, txt, i, attr) {
|
796 |
+
if (typeof val === "undefined") throw new Error("No value to add");
|
797 |
+
|
798 |
+
const O = this;
|
799 |
+
const opts = O.E.find('option');
|
800 |
+
let
|
801 |
+
value = val,
|
802 |
+
text = txt,
|
803 |
+
index = i;
|
804 |
+
if (typeof txt === "number") { // .add('xxx', 2) shorthand
|
805 |
+
index = txt;
|
806 |
+
text = val;
|
807 |
+
} else if (typeof txt === "undefined") { // .add('xxx') shorthand
|
808 |
+
text = val;
|
809 |
+
}
|
810 |
+
|
811 |
+
const opt = $("<option></option>").val(value).html(text);
|
812 |
+
|
813 |
+
if (attr && typeof attr === "object") {
|
814 |
+
$.each(attr, (j, v) => {
|
815 |
+
opt.attr(j, v);
|
816 |
+
});
|
817 |
+
}
|
818 |
+
|
819 |
+
if (opts.length < index) throw new Error("index out of bounds");
|
820 |
+
|
821 |
+
if (typeof index === "undefined" || opts.length === index) { // add it to the last if given index is last no or no index provides.
|
822 |
+
O.E.append(opt);
|
823 |
+
if (!O.mob) O.ul.append(O.createLi(opt));
|
824 |
+
}
|
825 |
+
else {
|
826 |
+
opts.eq(index).before(opt);
|
827 |
+
if (!O.mob) O.ul.find('li.opt').eq(index).before(O.createLi(opt));
|
828 |
+
}
|
829 |
+
|
830 |
+
return selObj;
|
831 |
+
},
|
832 |
+
|
833 |
+
//## removes an item at a given index.
|
834 |
+
remove (i) {
|
835 |
+
const O = this.vRange(i);
|
836 |
+
O.E.find('option').eq(i).remove();
|
837 |
+
if (!O.mob) O.optDiv.find('ul.options li.opt').eq(i).remove();
|
838 |
+
O.setText();
|
839 |
+
},
|
840 |
+
|
841 |
+
// removes all but the selected one
|
842 |
+
removeAll () {
|
843 |
+
const O = this;
|
844 |
+
const optionList = O.E.find('option');
|
845 |
+
|
846 |
+
for (let x = (optionList.length - 1); x >= 0; x--) {
|
847 |
+
if (optionList[x].selected !== true) {
|
848 |
+
O.remove(x);
|
849 |
+
}
|
850 |
+
}
|
851 |
+
|
852 |
+
},
|
853 |
+
|
854 |
+
|
855 |
+
find (val) {
|
856 |
+
const O = this;
|
857 |
+
const optionList = O.E.find('option');
|
858 |
+
for (let x in optionList) {
|
859 |
+
if (optionList[x].value === val) {
|
860 |
+
return +x;
|
861 |
+
}
|
862 |
+
}
|
863 |
+
|
864 |
+
return -1;
|
865 |
+
|
866 |
+
},
|
867 |
+
|
868 |
+
//## Select an item at a given index.
|
869 |
+
selectItem (i) { this.toggSel(true, i); },
|
870 |
+
|
871 |
+
//## UnSelect an iten at a given index.
|
872 |
+
unSelectItem (i) { this.toggSel(false, i); },
|
873 |
+
|
874 |
+
//## Select all items of the select.
|
875 |
+
selectAll () { this.toggSelAll(true); },
|
876 |
+
|
877 |
+
//## UnSelect all items of the select.
|
878 |
+
unSelectAll () { this.toggSelAll(false); },
|
879 |
+
|
880 |
+
//## Disable an iten at a given index.
|
881 |
+
disableItem (i) { this.toggDis(true, i); },
|
882 |
+
|
883 |
+
//## Removes disabled an iten at a given index.
|
884 |
+
enableItem (i) { this.toggDis(false, i); },
|
885 |
+
|
886 |
+
//## New simple methods as getter and setter are not working fine in ie8-
|
887 |
+
//## variable to check state of control if enabled or disabled.
|
888 |
+
enabled: true,
|
889 |
+
//## Enables the control
|
890 |
+
enable () { return this.toggSumo(false); },
|
891 |
+
|
892 |
+
//## Disables the control
|
893 |
+
disable () { return this.toggSumo(true); },
|
894 |
+
|
895 |
+
|
896 |
+
init () {
|
897 |
+
const O = this;
|
898 |
+
O.createElems();
|
899 |
+
O.setText();
|
900 |
+
O.E.trigger('sumo:initialized', O);
|
901 |
+
return O;
|
902 |
+
}
|
903 |
+
|
904 |
+
};
|
905 |
+
|
906 |
+
selObj.sumo.init();
|
907 |
+
});
|
908 |
+
|
909 |
+
return ret.length === 1 ? ret[0] : ret;
|
910 |
+
};
|
911 |
+
|
912 |
+
|
913 |
+
});
|
js/jquery.sumoselect.min.js
CHANGED
@@ -1,765 +1,97 @@
|
|
1 |
-
/*
|
2 |
-
* jquery.sumoselect
|
3 |
* http://hemantnegi.github.io/jquery.sumoselect
|
4 |
* 2016-12-12
|
5 |
*
|
6 |
* Copyright 2015 Hemant Negi
|
7 |
* Email : hemant.frnz@gmail.com
|
8 |
* Compressor http://refresh-sf.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
if (settings.outputAsCSV && O.is_multi && O.E.attr('name')) {
|
87 |
-
/* create a hidden field to store csv value.*/
|
88 |
-
O.select.append($('<input class="HEMANT123" type="hidden" />').attr('name', O.E.attr('name')).val(O.getSelStr()));
|
89 |
-
|
90 |
-
/* so it can not post the original select.*/
|
91 |
-
O.E.removeAttr('name');
|
92 |
-
}
|
93 |
-
|
94 |
-
/* break for mobile rendring.. if forceCustomRendering is false*/
|
95 |
-
if (O.isMobile() && !settings.forceCustomRendering) {
|
96 |
-
O.setNativeMobile();
|
97 |
-
return;
|
98 |
-
}
|
99 |
-
|
100 |
-
/* if there is a name attr in select add a class to container div*/
|
101 |
-
if(O.E.attr('name')) O.select.addClass('sumo_'+O.E.attr('name').replace(/\[\]/, ''))
|
102 |
-
|
103 |
-
/* hide original select */
|
104 |
-
O.E.addClass('SumoUnder').attr('tabindex','-1');
|
105 |
-
|
106 |
-
/* Creating the list... */
|
107 |
-
O.optDiv = $('<div class="optWrapper '+ (settings.up?'up':'') +'">');
|
108 |
-
|
109 |
-
/* branch for floating list in low res devices.*/
|
110 |
-
O.floatingList();
|
111 |
-
|
112 |
-
/* Creating the markup for the available options*/
|
113 |
-
O.ul = $('<ul class="options">');
|
114 |
-
O.optDiv.append(O.ul);
|
115 |
-
|
116 |
-
/* Select all functionality*/
|
117 |
-
if(settings.selectAll && O.is_multi) O.SelAll();
|
118 |
-
|
119 |
-
/* search functionality*/
|
120 |
-
if(settings.search) O.Search();
|
121 |
-
|
122 |
-
O.ul.append(O.prepItems(O.E.children()));
|
123 |
-
|
124 |
-
/* if multiple then add the class multiple and add OK / CANCEL button */
|
125 |
-
if (O.is_multi) O.multiSelelect();
|
126 |
-
|
127 |
-
O.select.append(O.optDiv);
|
128 |
-
O.basicEvents();
|
129 |
-
O.selAllState();
|
130 |
-
},
|
131 |
-
|
132 |
-
prepItems: function(opts, d){
|
133 |
-
var lis = [], O=this;
|
134 |
-
$(opts).each(function (i, opt) { /* parsing options to li */
|
135 |
-
opt = $(opt);
|
136 |
-
lis.push(opt.is('optgroup')?
|
137 |
-
$('<li class="group '+ (opt[0].disabled?'disabled':'') +'"><label>' + opt.attr('label') +'</label><ul></ul></li>')
|
138 |
-
.find('ul')
|
139 |
-
.append(O.prepItems(opt.children(), opt[0].disabled))
|
140 |
-
.end()
|
141 |
-
:
|
142 |
-
O.createLi(opt, d)
|
143 |
-
);
|
144 |
-
});
|
145 |
-
return lis;
|
146 |
-
},
|
147 |
-
|
148 |
-
/* Creates a LI element from a given option and binds events to it*/
|
149 |
-
/*returns the jquery instance of li (not inserted in dom)*/
|
150 |
-
createLi: function (opt, d) {
|
151 |
-
var O = this;
|
152 |
-
|
153 |
-
if(!opt.attr('value'))opt.attr('value',opt.val());
|
154 |
-
var li = $('<li class="opt"><label>' + opt.text() + '</label></li>');
|
155 |
-
|
156 |
-
li.data('opt', opt); /* store a direct reference to option.*/
|
157 |
-
opt.data('li', li); /* store a direct reference to list item.*/
|
158 |
-
if (O.is_multi) li.prepend('<span><i></i></span>');
|
159 |
-
|
160 |
-
if (opt[0].disabled || d)
|
161 |
-
li = li.addClass('disabled');
|
162 |
-
|
163 |
-
O.onOptClick(li);
|
164 |
-
|
165 |
-
if (opt[0].selected)
|
166 |
-
li.addClass('selected');
|
167 |
-
|
168 |
-
if (opt.attr('class'))
|
169 |
-
li.addClass(opt.attr('class'));
|
170 |
-
|
171 |
-
if (opt.attr('title'))
|
172 |
-
li.attr('title', opt.attr('title'));
|
173 |
-
|
174 |
-
return li;
|
175 |
-
},
|
176 |
-
|
177 |
-
/* Returns the selected items as string in a Multiselect.*/
|
178 |
-
getSelStr: function () {
|
179 |
-
/* get the pre selected items.*/
|
180 |
-
sopt = [];
|
181 |
-
this.E.find('option:selected').each(function () { sopt.push($(this).val()); });
|
182 |
-
return sopt.join(settings.csvSepChar);
|
183 |
-
},
|
184 |
-
|
185 |
-
/* THOSE OK/CANCEL BUTTONS ON MULTIPLE SELECT.*/
|
186 |
-
multiSelelect: function () {
|
187 |
-
var O = this;
|
188 |
-
O.optDiv.addClass('multiple');
|
189 |
-
O.okbtn = $('<p tabindex="0" class="btnOk">'+settings.locale[0]+'</p>').click(function () {
|
190 |
-
/* if combined change event is set.*/
|
191 |
-
O._okbtn();
|
192 |
-
O.hideOpts();
|
193 |
-
});
|
194 |
-
O.cancelBtn = $('<p tabindex="0" class="btnCancel">'+settings.locale[1]+'</p>').click(function () {
|
195 |
-
O._cnbtn();
|
196 |
-
O.hideOpts();
|
197 |
-
});
|
198 |
-
var btns = O.okbtn.add(O.cancelBtn);
|
199 |
-
O.optDiv.append($('<div class="MultiControls">').append(btns));
|
200 |
-
|
201 |
-
/* handling keyboard navigation on ok cancel buttons. */
|
202 |
-
btns.on('keydown.sumo', function (e) {
|
203 |
-
var el = $(this);
|
204 |
-
switch (e.which) {
|
205 |
-
case 32: /* space */
|
206 |
-
case 13: /* enter */
|
207 |
-
el.trigger('click');
|
208 |
-
break;
|
209 |
-
|
210 |
-
case 9: /* tab */
|
211 |
-
if(el.hasClass('btnOk'))return;
|
212 |
-
case 27: /* esc */
|
213 |
-
O._cnbtn();
|
214 |
-
O.hideOpts();
|
215 |
-
return;
|
216 |
-
}
|
217 |
-
e.stopPropagation();
|
218 |
-
e.preventDefault();
|
219 |
-
});
|
220 |
-
},
|
221 |
-
|
222 |
-
_okbtn:function(){
|
223 |
-
var O = this, cg = 0;
|
224 |
-
/* if combined change event is set. */
|
225 |
-
if (settings.triggerChangeCombined) {
|
226 |
-
/* check for a change in the selection. */
|
227 |
-
if (O.E.find('option:selected').length != O.Pstate.length) {
|
228 |
-
cg = 1;
|
229 |
-
}
|
230 |
-
else {
|
231 |
-
O.E.find('option').each(function (i,e) {
|
232 |
-
if(e.selected && O.Pstate.indexOf(i) < 0) cg = 1;
|
233 |
-
});
|
234 |
-
}
|
235 |
-
|
236 |
-
if (cg) {
|
237 |
-
O.callChange();
|
238 |
-
O.setText();
|
239 |
-
}
|
240 |
-
}
|
241 |
-
},
|
242 |
-
_cnbtn:function(){
|
243 |
-
var O = this;
|
244 |
-
/* remove all selections */
|
245 |
-
O.E.find('option:selected').each(function () { this.selected = false; });
|
246 |
-
O.optDiv.find('li.selected').removeClass('selected')
|
247 |
-
|
248 |
-
/* restore selections from saved state. */
|
249 |
-
for(var i = 0; i < O.Pstate.length; i++) {
|
250 |
-
O.E.find('option')[O.Pstate[i]].selected = true;
|
251 |
-
O.ul.find('li.opt').eq(O.Pstate[i]).addClass('selected');
|
252 |
-
}
|
253 |
-
O.selAllState();
|
254 |
-
},
|
255 |
-
|
256 |
-
SelAll:function(){
|
257 |
-
var O = this;
|
258 |
-
if(!O.is_multi)return;
|
259 |
-
O.selAll = $('<p class="select-all"><span><i></i></span><label>' + settings.locale[2] + '</label></p>');
|
260 |
-
O.optDiv.addClass('selall');
|
261 |
-
O.selAll.on('click',function(){
|
262 |
-
O.selAll.toggleClass('selected');
|
263 |
-
O.toggSelAll(O.selAll.hasClass('selected'), 1);
|
264 |
-
//O.selAllState();
|
265 |
-
});
|
266 |
-
|
267 |
-
O.optDiv.prepend(O.selAll);
|
268 |
-
},
|
269 |
-
|
270 |
-
/* search module (can be removed if not required.) */
|
271 |
-
Search: function(){
|
272 |
-
var O = this,
|
273 |
-
cc = O.CaptionCont.addClass('search'),
|
274 |
-
P = $('<p class="no-match">');
|
275 |
-
|
276 |
-
O.ftxt = $('<input type="text" class="search-txt" value="" placeholder="' + settings.searchText + '">')
|
277 |
-
.on('click', function(e){
|
278 |
-
e.stopPropagation();
|
279 |
-
});
|
280 |
-
cc.append(O.ftxt);
|
281 |
-
O.optDiv.children('ul').after(P);
|
282 |
-
|
283 |
-
O.ftxt.on('keyup.sumo',function(){
|
284 |
-
var hid = O.optDiv.find('ul.options li.opt').each(function(ix,e){
|
285 |
-
var e = $(e),
|
286 |
-
opt = e.data('opt')[0];
|
287 |
-
opt.hidden = e.text().toLowerCase().indexOf(O.ftxt.val().toLowerCase()) < 0;
|
288 |
-
e.toggleClass('hidden', opt.hidden);
|
289 |
-
}).not('.hidden');
|
290 |
-
|
291 |
-
P.html(settings.noMatch.replace(/\{0\}/g, '<em></em>')).toggle(!hid.length);
|
292 |
-
P.find('em').text(O.ftxt.val());
|
293 |
-
O.selAllState();
|
294 |
-
});
|
295 |
-
},
|
296 |
-
|
297 |
-
selAllState: function () {
|
298 |
-
var O = this;
|
299 |
-
if (settings.selectAll && O.is_multi) {
|
300 |
-
var sc = 0, vc = 0;
|
301 |
-
O.optDiv.find('li.opt').not('.hidden').each(function (ix, e) {
|
302 |
-
if ($(e).hasClass('selected')) sc++;
|
303 |
-
if (!$(e).hasClass('disabled')) vc++;
|
304 |
-
});
|
305 |
-
/* select all checkbox state change. */
|
306 |
-
if (sc == vc) O.selAll.removeClass('partial').addClass('selected');
|
307 |
-
else if (sc == 0) O.selAll.removeClass('selected partial');
|
308 |
-
else O.selAll.addClass('partial') /* .removeClass('selected'); */
|
309 |
-
}
|
310 |
-
},
|
311 |
-
|
312 |
-
showOpts: function () {
|
313 |
-
var O = this;
|
314 |
-
if (O.E.attr('disabled')) return; /* if select is disabled then retrun */
|
315 |
-
O.E.trigger('sumo:opening', O);
|
316 |
-
O.is_opened = true;
|
317 |
-
O.select.addClass('open').attr('aria-expanded', 'true');
|
318 |
-
O.E.trigger('sumo:opened', O);
|
319 |
-
|
320 |
-
if(O.ftxt)O.ftxt.focus();
|
321 |
-
else O.select.focus();
|
322 |
-
|
323 |
-
/* hide options on click outside.*/
|
324 |
-
$(document).on('click.sumo', function (e) {
|
325 |
-
if (!O.select.is(e.target) /* if the target of the click isn't the container... */
|
326 |
-
&& O.select.has(e.target).length === 0){ /* ... nor a descendant of the container */
|
327 |
-
if(!O.is_opened)return;
|
328 |
-
O.hideOpts();
|
329 |
-
if (settings.okCancelInMulti){
|
330 |
-
if(settings.isClickAwayOk)
|
331 |
-
O._okbtn();
|
332 |
-
else
|
333 |
-
O._cnbtn();
|
334 |
-
}
|
335 |
-
}
|
336 |
-
});
|
337 |
-
|
338 |
-
if (O.is_floating) {
|
339 |
-
H = O.optDiv.children('ul').outerHeight() + 2; /* +2 is clear fix*/
|
340 |
-
if (O.is_multi) H = H + parseInt(O.optDiv.css('padding-bottom'));
|
341 |
-
O.optDiv.css('height', H);
|
342 |
-
$('body').addClass('sumoStopScroll');
|
343 |
-
}
|
344 |
-
|
345 |
-
O.setPstate();
|
346 |
-
},
|
347 |
-
|
348 |
-
/* maintain state when ok/cancel buttons are available storing the indexes. */
|
349 |
-
setPstate: function(){
|
350 |
-
var O = this;
|
351 |
-
if (O.is_multi && (O.is_floating || settings.okCancelInMulti)){
|
352 |
-
O.Pstate = [];
|
353 |
-
/* assuming that find returns elements in tree order */
|
354 |
-
O.E.find('option').each(function (i, e){if(e.selected) O.Pstate.push(i);});
|
355 |
-
}
|
356 |
-
},
|
357 |
-
|
358 |
-
callChange:function(){
|
359 |
-
this.E.trigger('change').trigger('click');
|
360 |
-
},
|
361 |
-
|
362 |
-
hideOpts: function () {
|
363 |
-
var O = this;
|
364 |
-
if(O.is_opened){
|
365 |
-
O.E.trigger('sumo:closing', O);
|
366 |
-
O.is_opened = false;
|
367 |
-
O.select.removeClass('open').attr('aria-expanded', 'true').find('ul li.sel').removeClass('sel');
|
368 |
-
O.E.trigger('sumo:closed', O);
|
369 |
-
$(document).off('click.sumo');
|
370 |
-
O.select.focus();
|
371 |
-
$('body').removeClass('sumoStopScroll');
|
372 |
-
|
373 |
-
/* clear the search */
|
374 |
-
if(settings.search){
|
375 |
-
O.ftxt.val('');
|
376 |
-
O.ftxt.trigger('keyup.sumo');
|
377 |
-
}
|
378 |
-
}
|
379 |
-
},
|
380 |
-
setOnOpen: function () {
|
381 |
-
var O = this,
|
382 |
-
li = O.optDiv.find('li.opt:not(.hidden)').eq(settings.search?0:O.E[0].selectedIndex);
|
383 |
-
if(li.hasClass('disabled')){
|
384 |
-
li = li.next(':not(disabled)')
|
385 |
-
if(!li.length) return;
|
386 |
-
}
|
387 |
-
O.optDiv.find('li.sel').removeClass('sel');
|
388 |
-
li.addClass('sel');
|
389 |
-
O.showOpts();
|
390 |
-
},
|
391 |
-
nav: function (up) {
|
392 |
-
var O = this, c,
|
393 |
-
s=O.ul.find('li.opt:not(.disabled, .hidden)'),
|
394 |
-
sel = O.ul.find('li.opt.sel:not(.hidden)'),
|
395 |
-
idx = s.index(sel);
|
396 |
-
if (O.is_opened && sel.length) {
|
397 |
-
|
398 |
-
if (up && idx > 0)
|
399 |
-
c = s.eq(idx-1);
|
400 |
-
else if(!up && idx < s.length-1 && idx > -1)
|
401 |
-
c = s.eq(idx+1);
|
402 |
-
else return; /* if no items before or after*/
|
403 |
-
|
404 |
-
sel.removeClass('sel');
|
405 |
-
sel = c.addClass('sel');
|
406 |
-
|
407 |
-
/* setting sel item to visible view. */
|
408 |
-
var ul = O.ul,
|
409 |
-
st = ul.scrollTop(),
|
410 |
-
t = sel.position().top + st;
|
411 |
-
if(t >= st + ul.height()-sel.outerHeight())
|
412 |
-
ul.scrollTop(t - ul.height() + sel.outerHeight());
|
413 |
-
if(t<st)
|
414 |
-
ul.scrollTop(t);
|
415 |
-
|
416 |
-
}
|
417 |
-
else
|
418 |
-
O.setOnOpen();
|
419 |
-
},
|
420 |
-
|
421 |
-
basicEvents: function () {
|
422 |
-
var O = this;
|
423 |
-
O.CaptionCont.click(function (evt) {
|
424 |
-
O.E.trigger('click');
|
425 |
-
if (O.is_opened) O.hideOpts(); else O.showOpts();
|
426 |
-
evt.stopPropagation();
|
427 |
-
});
|
428 |
-
|
429 |
-
O.select.on('keydown.sumo', function (e) {
|
430 |
-
switch (e.which) {
|
431 |
-
case 38: /* up */
|
432 |
-
O.nav(true);
|
433 |
-
break;
|
434 |
-
|
435 |
-
case 40: /* down */
|
436 |
-
O.nav(false);
|
437 |
-
break;
|
438 |
-
|
439 |
-
case 65: /* shortcut ctrl + a to select all and ctrl + shift + a to unselect all.*/
|
440 |
-
if (O.is_multi && e.ctrlKey){
|
441 |
-
O.toggSelAll(!e.shiftKey, 1);
|
442 |
-
break;
|
443 |
-
}
|
444 |
-
else
|
445 |
-
return;
|
446 |
-
|
447 |
-
case 32: /* space*/
|
448 |
-
if(settings.search && O.ftxt.is(e.target))return;
|
449 |
-
case 13: /* enter*/
|
450 |
-
if (O.is_opened)
|
451 |
-
O.optDiv.find('ul li.sel').trigger('click');
|
452 |
-
else
|
453 |
-
O.setOnOpen();
|
454 |
-
break;
|
455 |
-
case 9: /* tab*/
|
456 |
-
if(!settings.okCancelInMulti)
|
457 |
-
O.hideOpts();
|
458 |
-
return;
|
459 |
-
case 27: /* esc*/
|
460 |
-
if(settings.okCancelInMulti)O._cnbtn();
|
461 |
-
O.hideOpts();
|
462 |
-
return;
|
463 |
-
|
464 |
-
default:
|
465 |
-
return; /* exit this handler for other keys */
|
466 |
-
}
|
467 |
-
e.preventDefault(); /* prevent the default action (scroll / move caret) */
|
468 |
-
});
|
469 |
-
|
470 |
-
$(window).on('resize.sumo', function () {
|
471 |
-
O.floatingList();
|
472 |
-
});
|
473 |
-
},
|
474 |
-
|
475 |
-
onOptClick: function (li) {
|
476 |
-
var O = this;
|
477 |
-
li.click(function () {
|
478 |
-
var li = $(this);
|
479 |
-
if(li.hasClass('disabled'))return;
|
480 |
-
var txt = "";
|
481 |
-
if (O.is_multi) {
|
482 |
-
li.toggleClass('selected');
|
483 |
-
li.data('opt')[0].selected = li.hasClass('selected');
|
484 |
-
O.selAllState();
|
485 |
-
}
|
486 |
-
else {
|
487 |
-
li.parent().find('li.selected').removeClass('selected'); //if not multiselect then remove all selections from this list
|
488 |
-
li.toggleClass('selected');
|
489 |
-
li.data('opt')[0].selected = true;
|
490 |
-
}
|
491 |
-
|
492 |
-
//branch for combined change event.
|
493 |
-
if (!(O.is_multi && settings.triggerChangeCombined && (O.is_floating || settings.okCancelInMulti))) {
|
494 |
-
O.setText();
|
495 |
-
O.callChange();
|
496 |
-
}
|
497 |
-
|
498 |
-
if (!O.is_multi) O.hideOpts(); //if its not a multiselect then hide on single select.
|
499 |
-
});
|
500 |
-
},
|
501 |
-
|
502 |
-
setText: function () {
|
503 |
-
var O = this;
|
504 |
-
O.placeholder = "";
|
505 |
-
if (O.is_multi) {
|
506 |
-
sels = O.E.find(':selected').not(':disabled'); //selected options.
|
507 |
-
|
508 |
-
for (i = 0; i < sels.length; i++) {
|
509 |
-
if (i + 1 >= settings.csvDispCount && settings.csvDispCount) {
|
510 |
-
if (sels.length == O.E.find('option').length && settings.captionFormatAllSelected) {
|
511 |
-
O.placeholder = settings.captionFormatAllSelected.replace(/\{0\}/g, sels.length)+',';
|
512 |
-
} else {
|
513 |
-
O.placeholder = settings.captionFormat.replace(/\{0\}/g, sels.length)+',';
|
514 |
-
}
|
515 |
-
|
516 |
-
break;
|
517 |
-
}
|
518 |
-
else O.placeholder += $(sels[i]).text() + ", ";
|
519 |
-
}
|
520 |
-
O.placeholder = O.placeholder.replace(/,([^,]*)$/, '$1'); //remove unexpected "," from last.
|
521 |
-
}
|
522 |
-
else {
|
523 |
-
O.placeholder = O.E.find(':selected').not(':disabled').text();
|
524 |
-
}
|
525 |
-
|
526 |
-
var is_placeholder = false;
|
527 |
-
|
528 |
-
if (!O.placeholder) {
|
529 |
-
|
530 |
-
is_placeholder = true;
|
531 |
-
|
532 |
-
O.placeholder = O.E.attr('placeholder');
|
533 |
-
if (!O.placeholder) //if placeholder is there then set it
|
534 |
-
O.placeholder = O.E.find('option:disabled:selected').text();
|
535 |
-
}
|
536 |
-
|
537 |
-
O.placeholder = O.placeholder ? (settings.prefix + ' ' + O.placeholder) : settings.placeholder
|
538 |
-
|
539 |
-
//set display text
|
540 |
-
O.caption.html(O.placeholder);
|
541 |
-
if (settings.showTitle) O.CaptionCont.attr('title', O.placeholder);
|
542 |
-
|
543 |
-
//set the hidden field if post as csv is true.
|
544 |
-
var csvField = O.select.find('input.HEMANT123');
|
545 |
-
if (csvField.length) csvField.val(O.getSelStr());
|
546 |
-
|
547 |
-
//add class placeholder if its a placeholder text.
|
548 |
-
if (is_placeholder) O.caption.addClass('placeholder'); else O.caption.removeClass('placeholder');
|
549 |
-
return O.placeholder;
|
550 |
-
},
|
551 |
-
|
552 |
-
isMobile: function () {
|
553 |
-
|
554 |
-
/* Adapted from http://www.detectmobilebrowsers.com */
|
555 |
-
var ua = navigator.userAgent || navigator.vendor || window.opera;
|
556 |
-
|
557 |
-
/* Checks for iOs, Android, Blackberry, Opera Mini, and Windows mobile devices */
|
558 |
-
for (var i = 0; i < settings.nativeOnDevice.length; i++) if (ua.toString().toLowerCase().indexOf(settings.nativeOnDevice[i].toLowerCase()) > 0) return settings.nativeOnDevice[i];
|
559 |
-
return false;
|
560 |
-
},
|
561 |
-
|
562 |
-
setNativeMobile: function () {
|
563 |
-
var O = this;
|
564 |
-
O.E.addClass('SelectClass'); /* .css('height', O.select.outerHeight()); */
|
565 |
-
O.mob = true;
|
566 |
-
O.E.change(function () {
|
567 |
-
O.setText();
|
568 |
-
});
|
569 |
-
},
|
570 |
-
|
571 |
-
floatingList: function () {
|
572 |
-
var O = this;
|
573 |
-
/*called on init and also on resize.*/
|
574 |
-
/*O.is_floating = true if window width is < specified float width*/
|
575 |
-
O.is_floating = $(window).width() <= settings.floatWidth;
|
576 |
-
|
577 |
-
/*set class isFloating*/
|
578 |
-
O.optDiv.toggleClass('isFloating', O.is_floating);
|
579 |
-
|
580 |
-
/*remove height if not floating*/
|
581 |
-
if (!O.is_floating) O.optDiv.css('height', '');
|
582 |
-
|
583 |
-
/*toggle class according to okCancelInMulti flag only when it is not floating*/
|
584 |
-
O.optDiv.toggleClass('okCancelInMulti', settings.okCancelInMulti && !O.is_floating);
|
585 |
-
},
|
586 |
-
|
587 |
-
/* HELPERS FOR OUTSIDERS*/
|
588 |
-
/* validates range of given item operations*/
|
589 |
-
vRange: function (i) {
|
590 |
-
var O = this;
|
591 |
-
var opts = O.E.find('option');
|
592 |
-
if (opts.length <= i || i < 0) throw "index out of bounds"
|
593 |
-
return O;
|
594 |
-
},
|
595 |
-
|
596 |
-
/*toggles selection on c as boolean.*/
|
597 |
-
toggSel: function (c, i) {
|
598 |
-
var O = this;
|
599 |
-
var opt;
|
600 |
-
if (typeof(i) === "number"){
|
601 |
-
O.vRange(i);
|
602 |
-
opt = O.E.find('option')[i];
|
603 |
-
}
|
604 |
-
else{
|
605 |
-
opt = O.E.find('option[value="'+i+'"]')[0]||0;
|
606 |
-
}
|
607 |
-
if (!opt || opt.disabled)
|
608 |
-
return;
|
609 |
-
|
610 |
-
if(opt.selected != c){
|
611 |
-
opt.selected = c;
|
612 |
-
if(!O.mob) $(opt).data('li').toggleClass('selected',c);
|
613 |
-
|
614 |
-
O.callChange();
|
615 |
-
O.setPstate();
|
616 |
-
O.setText();
|
617 |
-
O.selAllState();
|
618 |
-
}
|
619 |
-
},
|
620 |
-
|
621 |
-
/*toggles disabled on c as boolean.*/
|
622 |
-
toggDis: function (c, i) {
|
623 |
-
var O = this.vRange(i);
|
624 |
-
O.E.find('option')[i].disabled = c;
|
625 |
-
if(c)O.E.find('option')[i].selected = false;
|
626 |
-
if(!O.mob)O.optDiv.find('ul.options li').eq(i).toggleClass('disabled', c).removeClass('selected');
|
627 |
-
O.setText();
|
628 |
-
},
|
629 |
-
|
630 |
-
/* toggle disable/enable on complete select control*/
|
631 |
-
toggSumo: function(val) {
|
632 |
-
var O = this;
|
633 |
-
O.enabled = val;
|
634 |
-
O.select.toggleClass('disabled', val);
|
635 |
-
|
636 |
-
if (val) {
|
637 |
-
O.E.attr('disabled', 'disabled');
|
638 |
-
O.select.removeAttr('tabindex');
|
639 |
-
}
|
640 |
-
else{
|
641 |
-
O.E.removeAttr('disabled');
|
642 |
-
O.select.attr('tabindex','0');
|
643 |
-
}
|
644 |
-
|
645 |
-
return O;
|
646 |
-
},
|
647 |
-
|
648 |
-
/* toggles all option on c as boolean.*/
|
649 |
-
/* set direct=false/0 bypasses okCancelInMulti behaviour.*/
|
650 |
-
toggSelAll: function (c, direct) {
|
651 |
-
var O = this;
|
652 |
-
O.E.find('option:not(:disabled,:hidden)')
|
653 |
-
.each(function(ix,e){
|
654 |
-
var is_selected=e.selected,
|
655 |
-
e = $(e).data('li');
|
656 |
-
if(e.hasClass('hidden'))return;
|
657 |
-
if(!!c){
|
658 |
-
if(!is_selected)e.trigger('click');
|
659 |
-
}
|
660 |
-
else{
|
661 |
-
if(is_selected)e.trigger('click');
|
662 |
-
}
|
663 |
-
});
|
664 |
-
|
665 |
-
if(!direct){
|
666 |
-
if(!O.mob && O.selAll)O.selAll.removeClass('partial').toggleClass('selected',!!c);
|
667 |
-
O.callChange();
|
668 |
-
O.setText();
|
669 |
-
O.setPstate();
|
670 |
-
}
|
671 |
-
},
|
672 |
-
|
673 |
-
/* outside accessibility options
|
674 |
-
which can be accessed from the element instance.
|
675 |
-
*/
|
676 |
-
reload:function(){
|
677 |
-
var elm = this.unload();
|
678 |
-
return $(elm).SumoSelect(settings);
|
679 |
-
},
|
680 |
-
|
681 |
-
unload: function () {
|
682 |
-
var O = this;
|
683 |
-
O.select.before(O.E);
|
684 |
-
O.E.show();
|
685 |
-
|
686 |
-
if (settings.outputAsCSV && O.is_multi && O.select.find('input.HEMANT123').length) {
|
687 |
-
O.E.attr('name', O.select.find('input.HEMANT123').attr('name')); /* restore the name; */
|
688 |
-
}
|
689 |
-
O.select.remove();
|
690 |
-
delete selObj.sumo;
|
691 |
-
return selObj;
|
692 |
-
},
|
693 |
-
|
694 |
-
/* add a new option to select at a given index.*/
|
695 |
-
add: function (val, txt, i) {
|
696 |
-
if (typeof val == "undefined") throw "No value to add"
|
697 |
-
|
698 |
-
var O = this;
|
699 |
-
opts=O.E.find('option')
|
700 |
-
if (typeof txt == "number") { i = txt; txt = val; }
|
701 |
-
if (typeof txt == "undefined") { txt = val; }
|
702 |
-
|
703 |
-
opt = $("<option></option>").val(val).html(txt);
|
704 |
-
|
705 |
-
if (opts.length < i) throw "index out of bounds"
|
706 |
-
|
707 |
-
if (typeof i == "undefined" || opts.length == i) { /* add it to the last if given index is last no or no index provides.*/
|
708 |
-
O.E.append(opt);
|
709 |
-
if(!O.mob)O.ul.append(O.createLi(opt));
|
710 |
-
}
|
711 |
-
else {
|
712 |
-
opts.eq(i).before(opt);
|
713 |
-
if(!O.mob)O.ul.find('li.opt').eq(i).before(O.createLi(opt));
|
714 |
-
}
|
715 |
-
|
716 |
-
return selObj;
|
717 |
-
},
|
718 |
-
|
719 |
-
/* removes an item at a given index. */
|
720 |
-
remove: function (i) {
|
721 |
-
var O = this.vRange(i);
|
722 |
-
O.E.find('option').eq(i).remove();
|
723 |
-
if(!O.mob)O.optDiv.find('ul.options li').eq(i).remove();
|
724 |
-
O.setText();
|
725 |
-
},
|
726 |
-
|
727 |
-
/* Select an item at a given index.*/
|
728 |
-
selectItem: function (i) { this.toggSel(true, i); },
|
729 |
-
|
730 |
-
/* UnSelect an iten at a given index.*/
|
731 |
-
unSelectItem: function (i) { this.toggSel(false, i); },
|
732 |
-
|
733 |
-
/* Select all items of the select.*/
|
734 |
-
selectAll: function () { this.toggSelAll(true); },
|
735 |
-
|
736 |
-
/* UnSelect all items of the select.*/
|
737 |
-
unSelectAll: function () { this.toggSelAll(false); },
|
738 |
-
|
739 |
-
/* Disable an iten at a given index.*/
|
740 |
-
disableItem: function (i) { this.toggDis(true, i) },
|
741 |
-
|
742 |
-
/* Removes disabled an iten at a given index.*/
|
743 |
-
enableItem: function (i) { this.toggDis(false, i) },
|
744 |
-
|
745 |
-
/* New simple methods as getter and setter are not working fine in ie8-*/
|
746 |
-
/* variable to check state of control if enabled or disabled.*/
|
747 |
-
enabled : true,
|
748 |
-
/* Enables the control*/
|
749 |
-
enable: function(){return this.toggSumo(false)},
|
750 |
-
|
751 |
-
/* Disables the control*/
|
752 |
-
disable: function(){return this.toggSumo(true)},
|
753 |
-
init: function () {
|
754 |
-
var O = this;
|
755 |
-
O.createElems();
|
756 |
-
O.setText();
|
757 |
-
return O
|
758 |
-
}
|
759 |
-
};
|
760 |
-
selObj.sumo.init();
|
761 |
-
});
|
762 |
-
|
763 |
-
return ret.length == 1 ? ret[0] : ret;
|
764 |
-
};
|
765 |
-
});
|
1 |
+
"use strict";function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(a,b){var c=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=c){var d,e,f=[],g=!0,h=!1;try{for(c=c.call(a);!(g=(d=c.next()).done)&&(f.push(d.value),!(b&&f.length===b));g=!0);}catch(a){h=!0,e=a}finally{try{g||null==c["return"]||c["return"]()}finally{if(h)throw e}}return f}}function _arrayWithHoles(a){if(Array.isArray(a))return a}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _iterableToArray(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}/*global jQuery, define, module, require*/ /*!
|
2 |
+
* jquery.sumoselect
|
3 |
* http://hemantnegi.github.io/jquery.sumoselect
|
4 |
* 2016-12-12
|
5 |
*
|
6 |
* Copyright 2015 Hemant Negi
|
7 |
* Email : hemant.frnz@gmail.com
|
8 |
* Compressor http://refresh-sf.com/
|
9 |
+
*/(function(a){'use strict';"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"==typeof exports?a(jQuery):module.exports=a(require("jquery"))})(function(a){'namespace sumo';a.fn.SumoSelect=function(b){// This is the easiest way to have default options.
|
10 |
+
var c={placeholder:"Select Here",// Dont change it here.
|
11 |
+
csvDispCount:3,// display no. of items in multiselect. 0 to display all.
|
12 |
+
captionFormat:"{0} Selected",// format of caption text. you can set your locale.
|
13 |
+
captionFormatAllSelected:"{0} all selected!",// format of caption text when all elements are selected. set null to use captionFormat. It will not work if there are disabled elements in select.
|
14 |
+
floatWidth:400,// Screen width of device at which the list is rendered in floating popup fashion.
|
15 |
+
forceCustomRendering:!1,// force the custom modal on all devices below floatWidth resolution.
|
16 |
+
nativeOnDevice:["Android","BlackBerry","iPhone","iPad","iPod","Opera Mini","IEMobile","Silk"],//
|
17 |
+
outputAsCSV:!1,// true to POST data as csv ( false for Html control array ie. default select )
|
18 |
+
csvSepChar:",",// separation char in csv mode
|
19 |
+
okCancelInMulti:!1,// display ok cancel buttons in desktop mode multiselect also.
|
20 |
+
isClickAwayOk:!1,// for okCancelInMulti=true. sets whether click outside will trigger Ok or Cancel (default is cancel).
|
21 |
+
triggerChangeCombined:!0,// im multi select mode whether to trigger change event on individual selection or combined selection.
|
22 |
+
selectAll:!1,// to display select all button in multiselect mode.|| also select all will not be available on mobile devices.
|
23 |
+
search:!1,// to display input for filtering content. selectAlltext will be input text placeholder
|
24 |
+
searchText:"Search...",// placeholder for search input
|
25 |
+
searchFn:function searchFn(a,b){// search function
|
26 |
+
return 0>a.toLowerCase().indexOf(b.toLowerCase())},noMatch:"No matches for \"{0}\"",prefix:"",// some prefix usually the field name. eg. '<b>Hello</b>'
|
27 |
+
locale:["OK","Cancel","Select All"],// all text that is used. don't change the index.
|
28 |
+
up:!1,// set true to open upside.
|
29 |
+
showTitle:!0,// set to false to prevent title (tooltip) from appearing
|
30 |
+
max:null,// Maximum number of options selected (when multiple)
|
31 |
+
// eslint-disable-next-line no-unused-vars
|
32 |
+
renderLi:function renderLi(a){return a}// Custom <li> item renderer
|
33 |
+
},d=this.each(function(){var d=this;// the original select object.
|
34 |
+
if(!this.sumo&&a(this).is("select")){//already initialized
|
35 |
+
var f=a.extend({},c,b,a(this).data());this.sumo={E:a(d),//the jquery object of original select element.
|
36 |
+
is_multi:a(d).attr("multiple"),//if its a multiple select
|
37 |
+
select:"",caption:"",placeholder:"",optDiv:"",CaptionCont:"",ul:"",is_floating:!1,is_opened:!1,//backdrop: '',
|
38 |
+
mob:!1,// if to open device default select
|
39 |
+
Pstate:[],lastUnselected:null,selectedCount:0,createElems:function createElems(){var b=this,c=b.E[0].selectedOptions;//break for mobile rendring.. if forceCustomRendering is false
|
40 |
+
return b.E.wrap("<div class=\"SumoSelect\" tabindex=\"0\" role=\"button\" aria-expanded=\"false\">"),_toConsumableArray(c).forEach(function(a){a.selected=!0}),b.select=b.E.parent(),b.caption=a("<span>"),b.CaptionCont=a("<p class=\"CaptionCont SelectBox ".concat(b.E.attr("class"),"\" ><label><i></i></label></p>")).attr("style",b.E.attr("style")).prepend(b.caption),b.select.append(b.CaptionCont),b.is_multi||(f.okCancelInMulti=!1),b.E.attr("disabled")&&b.select.addClass("disabled").removeAttr("tabindex"),f.outputAsCSV&&b.is_multi&&b.E.attr("name")&&(b.select.append(a("<input class=\"HEMANT123\" type=\"hidden\" />").attr("name",b.E.attr("name")).val(b.getSelStr())),b.E.removeAttr("name")),b.isMobile()&&!f.forceCustomRendering?void b.setNativeMobile():void(//hide original select
|
41 |
+
//## Creating the list...
|
42 |
+
//branch for floating list in low res devices.
|
43 |
+
//Creating the markup for the available options
|
44 |
+
b.E.attr("name")&&b.select.addClass("sumo_".concat(b.E.attr("name").replace(/\[\]/,""))),b.E.addClass("SumoUnder").attr("tabindex","-1"),b.optDiv=a("<div class=\"optWrapper ".concat(f.up?"up":"","\">")),b.floatingList(),b.ul=a("<ul class=\"options\">"),b.optDiv.append(b.ul),f.selectAll&&b.is_multi&&!f.max&&b.SelAll(),f.search&&b.Search(),b.ul.append(b.prepItems(b.E.children())),b.is_multi&&b.multiSelelect(),b.select.append(b.optDiv),b._handleMax(),b.basicEvents(),b.selAllState());// if there is a name attr in select add a class to container div
|
45 |
+
},prepItems:function prepItems(b,c){var d=[],e=this;return a(b).each(function(b,f){// parsing options to li
|
46 |
+
var g=a(f);d.push(g.is("optgroup")?a("<li class=\"group ".concat(f.disabled?"disabled":"","\"><label></label><ul></ul></li>")).find("label").text(g.attr("label")).end().find("ul").append(e.prepItems(g.children(),f.disabled)).end():e.createLi(g,c))}),d},//## Creates a LI element from a given option and binds events to it
|
47 |
+
//## returns the jquery instance of li (not inserted in dom)
|
48 |
+
createLi:function createLi(b,c){var d=this;b.attr("value")||b.attr("value",b.val());var e=a("<li class=\"opt\"><label>".concat(b.html(),"</label></li>"));return e.data("opt",b),b.data("li",e),d.is_multi&&e.prepend("<span><i></i></span>"),(b[0].disabled||c)&&e.addClass("disabled"),d.onOptClick(e),b[0].selected&&(e.addClass("selected"),d.selectedCount++),b.attr("class")&&e.addClass(b.attr("class")),b.attr("title")&&e.attr("title",b.attr("title")),f.renderLi(e,b)},//## Returns the selected items as string in a Multiselect.
|
49 |
+
getSelStr:function getSelStr(){// get the pre selected items.
|
50 |
+
var b=[];return this.E.find("option:checked").each(function(){b.push(a(this).val())}),b.join(f.csvSepChar)},//## THOSE OK/CANCEL BUTTONS ON MULTIPLE SELECT.
|
51 |
+
multiSelelect:function multiSelelect(){var b=this;b.optDiv.addClass("multiple"),b.okbtn=a("<p tabindex=\"0\" class=\"btnOk\"></p>").click(function(){b._okbtn(),b.hideOpts()});var c=_slicedToArray(f.locale,1);b.okbtn[0].innerText=c[0],b.cancelBtn=a("<p tabindex=\"0\" class=\"btnCancel\"></p>").click(function(){b._cnbtn(),b.hideOpts()});var d=_slicedToArray(f.locale,2);b.cancelBtn[0].innerText=d[1];var e=b.okbtn.add(b.cancelBtn);b.optDiv.append(a("<div class=\"MultiControls\">").append(e)),e.on("keydown.sumo",function(c){var d=a(this);switch(c.which){case 32:// space
|
52 |
+
case 13:d.trigger("click");break;case 9://tab
|
53 |
+
if(d.hasClass("btnOk"))return;break;case 27:return b._cnbtn(),void b.hideOpts();default:}c.stopPropagation(),c.preventDefault()})},_okbtn:function _okbtn(){var a=this,b=0;f.triggerChangeCombined&&(a.E.find("option:checked").length===a.Pstate.length?a.E.find("option").each(function(c,d){d.selected&&0>a.Pstate.indexOf(c)&&(b=1)}):b=1,b&&(a.callChange(),a.setText()))},_cnbtn:function _cnbtn(){var a=this;//remove all selections
|
54 |
+
a.E.find("option:checked").each(function(){this.selected=!1}),a.optDiv.find("li.selected").removeClass("selected");//restore selections from saved state.
|
55 |
+
for(var b=0;b<a.Pstate.length;b++)a.E.find("option")[a.Pstate[b]].selected=!0,a.ul.find("li.opt").eq(a.Pstate[b]).addClass("selected");a.selAllState()},_handleMax:function _handleMax(){f.max&&(this.selectedCount>=+f.max?this.optDiv.find("li.opt").not(".hidden").each(function(b,c){a(c).hasClass("selected")||a(c).addClass("temporary-disabled disabled")}):this.optDiv.find("li.opt").not(".hidden").each(function(b,c){a(c).hasClass("temporary-disabled")&&a(c).removeClass("temporary-disabled disabled")}))},SelAll:function SelAll(){var b=this;if(b.is_multi){b.selAll=a("<p class=\"select-all\"><span><i></i></span><label></label></p>");var c=_slicedToArray(f.locale,3);b.selAll.find("label")[0].innerText=c[2],b.optDiv.addClass("selall"),b.selAll.on("click",function(){b.selAll.toggleClass("selected"),b.toggSelAll(b.selAll.hasClass("selected"),1)}),b.optDiv.prepend(b.selAll)}},// search module (can be removed if not required.)
|
56 |
+
Search:function Search(){var c=this,d=c.CaptionCont.addClass("search"),e=a("<p class=\"no-match\">"),g=b.searchFn&&"function"==typeof b.searchFn?b.searchFn:f.searchFn;c.ftxt=a("<input type=\"text\" class=\"search-txt\" value=\"\" autocomplete=\"off\">").on("click",function(a){a.stopPropagation()}),c.ftxt.placeholder=f.searchText,d.append(c.ftxt),c.optDiv.children("ul").after(e),c.ftxt.on("keyup.sumo",function(){var b=c.optDiv.find("ul.options li.opt").each(function(b,d){var e=a(d),f=e.data("opt"),h=f[0];h.hidden=g(e.text(),c.ftxt.val()),e.toggleClass("hidden",h.hidden)}).not(".hidden");// Hide opt-groups with no options matched
|
57 |
+
c.optDiv[0].querySelectorAll("li.group").forEach(function(a){a.querySelector("li:not(.hidden)")?a.classList.remove("hidden"):a.classList.add("hidden")}),e.html(f.noMatch.replace(/\{0\}/g,"<em></em>")).toggle(!b.length),e.find("em").text(c.ftxt.val()),c.selAllState()})},selAllState:function selAllState(){var b=this;if(f.selectAll&&b.is_multi){var c=0,d=0;b.optDiv.find("li.opt").not(".hidden .disabled").each(function(b,f){a(f).hasClass("selected")&&c++,d++}),c==d?b.selAll.removeClass("partial").addClass("selected"):0===c?b.selAll.removeClass("selected partial"):b.selAll.addClass("partial")}},showOpts:function showOpts(){var b=this;if(!b.E.attr("disabled")){if(b.E.trigger("sumo:opening",b),b.is_opened=!0,b.select.addClass("open").attr("aria-expanded","true"),b.E.trigger("sumo:opened",b),b.ftxt?b.ftxt.focus():b.select.focus(),a(document).on("click.sumo",function(a){if(!b.select.is(a.target)// if the target of the click isn't the container...
|
58 |
+
&&0===b.select.has(a.target).length){// ... nor a descendant of the container
|
59 |
+
if(!b.is_opened)return;b.hideOpts(),f.okCancelInMulti&&(f.isClickAwayOk?b._okbtn():b._cnbtn())}}),b.is_floating){var c=b.optDiv.children("ul").outerHeight()+2;// +2 is clear fix
|
60 |
+
b.is_multi&&(c+=+b.optDiv.css("padding-bottom")),b.optDiv.css("height",c),a("body").addClass("sumoStopScroll")}b.setPstate()}// if select is disabled then retrun
|
61 |
+
},//maintain state when ok/cancel buttons are available storing the indexes.
|
62 |
+
setPstate:function setPstate(){var a=this;a.is_multi&&(a.is_floating||f.okCancelInMulti)&&(a.Pstate=[],a.E.find("option").each(function(b,c){c.selected&&a.Pstate.push(b)}))},callChange:function callChange(){this.E.get().forEach(function(a){a.dispatchEvent(new Event("change")),a.dispatchEvent(new Event("click"))})},hideOpts:function hideOpts(){var b=this;b.is_opened&&(b.E.trigger("sumo:closing",b),b.is_opened=!1,b.select.removeClass("open").attr("aria-expanded","false").find("ul li.sel").removeClass("sel"),b.E.trigger("sumo:closed",b),a(document).off("click.sumo"),a("body").removeClass("sumoStopScroll"),f.search&&(b.ftxt.val(""),b.ftxt.trigger("keyup.sumo")))},setOnOpen:function setOnOpen(){var a=this,b=a.optDiv.find("li.opt:not(.hidden)").eq(f.search?0:a.E[0].selectedIndex);b.hasClass("disabled")&&(b=b.next(":not(disabled)"),!b.length)||(a.optDiv.find("li.sel").removeClass("sel"),b.addClass("sel"),a.showOpts())},nav:function nav(a){var b=this,d=null,e=b.ul.find("li.opt.sel:not(.hidden)"),f=b.ul.find("li.opt:not(.disabled):not(.hidden)"),g=f.index(e);if(b.is_opened&&e.length){if(a&&0<g)d=f.eq(g-1);else if(!a&&g<f.length-1&&-1<g)d=f.eq(g+1);else return;// if no items before or after
|
63 |
+
e.removeClass("sel"),e=d.addClass("sel");// setting sel item to visible view.
|
64 |
+
var h=b.ul,i=h.scrollTop(),j=e.position().top+i;j>=i+h.height()-e.outerHeight()&&h.scrollTop(j-h.height()+e.outerHeight()),j<i&&h.scrollTop(j)}else b.setOnOpen()},basicEvents:function basicEvents(){var b=this;b.CaptionCont.click(function(a){b.E.trigger("click"),b.is_opened?b.hideOpts():b.showOpts(),a.stopPropagation()}),b.select.on("keydown.sumo",function(a){switch(a.which){case 38:b.nav(!0);break;case 40:b.nav(!1);break;case 65:// shortcut ctrl + a to select all and ctrl + shift + a to unselect all.
|
65 |
+
if(b.is_multi&&!f.max&&a.ctrlKey){b.toggSelAll(!a.shiftKey,1);break}else return;case 32:// space
|
66 |
+
if(f.search&&b.ftxt.is(a.target))return;break;case 13:b.is_opened?b.optDiv.find("ul li.sel").trigger("click"):b.setOnOpen();break;case 9:return void(f.okCancelInMulti||b.hideOpts());case 27:return f.okCancelInMulti&&b._cnbtn(),void b.hideOpts();default:return;// exit this handler for other keys
|
67 |
+
}a.preventDefault()}),a(window).on("resize.sumo",function(){b.floatingList()})},onOptClick:function onOptClick(b){var c=this;b.click(function(){var b=a(this);b.hasClass("disabled")||(c.is_multi?(b.toggleClass("selected"),b.data("opt")[0].selected=b.hasClass("selected"),!1===b.data("opt")[0].selected?(c.lastUnselected=b.data("opt")[0].textContent,c.selectedCount--):c.selectedCount++,f.max&&c._handleMax(),c.selAllState()):(b.parent().find("li.selected").removeClass("selected"),b.toggleClass("selected"),b.data("opt")[0].selected=!0,c.selectedCount=1),!(c.is_multi&&f.triggerChangeCombined&&(c.is_floating||f.okCancelInMulti))&&(c.setText(),c.callChange()),!c.is_multi&&c.hideOpts())})},// fixed some variables that were not explicitly typed (michc)
|
68 |
+
setText:function setText(){var a=this;if(a.placeholder="",a.is_multi){var d=a.E.find(":checked").not(":disabled");//selected options.
|
69 |
+
a.placeholder=f.csvDispCount&&d.length>f.csvDispCount?d.length===a.E.find("option").length&&f.captionFormatAllSelected?f.captionFormatAllSelected.replace(/\{0\}/g,d.length):f.captionFormat.replace(/\{0\}/g,d.length):d.toArray().map(function(a){return a.innerText}).join(", ")}else a.placeholder=a.E.find(":checked").not(":disabled").text();var b=!1;a.placeholder||(b=!0,a.placeholder=a.E.attr("placeholder"),!a.placeholder&&(//if placeholder is there then set it
|
70 |
+
a.placeholder=a.E.find("option:disabled:checked").text())),a.placeholder=a.placeholder?"".concat(f.prefix," ").concat(a.placeholder):f.placeholder,a.caption.text(a.placeholder),f.showTitle&&a.CaptionCont.attr("title",a.placeholder);//set the hidden field if post as csv is true.
|
71 |
+
var c=a.select.find("input.HEMANT123");return c.length&&c.val(a.getSelStr()),b?a.caption.addClass("placeholder"):a.caption.removeClass("placeholder"),a.placeholder},isMobile:function isMobile(){// Adapted from http://www.detectmobilebrowsers.com
|
72 |
+
// Checks for iOs, Android, Blackberry, Opera Mini, and Windows mobile devices
|
73 |
+
for(var a=navigator.userAgent||navigator.vendor||window.opera,b=0;b<f.nativeOnDevice.length;b++)if(0<a.toString().toLowerCase().indexOf(f.nativeOnDevice[b].toLowerCase()))return f.nativeOnDevice[b];return!1},setNativeMobile:function setNativeMobile(){var a=this;a.E.addClass("SelectClass"),a.mob=!0,a.E.change(function(){a.setText()})},floatingList:function floatingList(){var b=this;//called on init and also on resize.
|
74 |
+
//O.is_floating = true if window width is < specified float width
|
75 |
+
b.is_floating=a(window).width()<=f.floatWidth,b.optDiv.toggleClass("isFloating",b.is_floating),b.is_floating||b.optDiv.css("height",""),b.optDiv.toggleClass("okCancelInMulti",f.okCancelInMulti&&!b.is_floating)},//HELPERS FOR OUTSIDERS
|
76 |
+
// validates range of given item operations
|
77 |
+
vRange:function vRange(a){var b=this,c=b.E.find("option");if(c.length<=a||0>a)throw new Error("index out of bounds");return b},//toggles selection on c as boolean.
|
78 |
+
toggSel:function toggSel(b,c){var d=this,e=null;"number"==typeof c?(d.vRange(c),e=d.E.find("option")[c]):e=d.E.find("option[value=\"".concat(c,"\"]"))[0]||0,!e||e.disabled||e.selected!==b&&(f.max&&!e.selected&&d.selectedCount<f.max||e.selected||!f.max&&!e.selected)&&(e.selected=b,!d.mob&&a(e).data("li").toggleClass("selected",b),d.callChange(),d.setPstate(),d.setText(),d.selAllState())},//toggles disabled on c as boolean.
|
79 |
+
toggDis:function toggDis(a,b){var c=this.vRange(b);c.E.find("option")[b].disabled=a,a&&(c.E.find("option")[b].selected=!1),c.mob||c.optDiv.find("ul.options li.opt").eq(b).toggleClass("disabled",a).removeClass("selected"),c.setText()},// toggle disable/enable on complete select control
|
80 |
+
toggSumo:function toggSumo(a){var b=this;return b.enabled=a,b.select.toggleClass("disabled",a),a?(b.E.attr("disabled","disabled"),b.select.removeAttr("tabindex")):(b.E.removeAttr("disabled"),b.select.attr("tabindex","0")),b},// toggles all option on c as boolean.
|
81 |
+
// set direct=false/0 bypasses okCancelInMulti behaviour.
|
82 |
+
toggSelAll:function toggSelAll(b,c){var d=this,e=a.extend(!0,{},a._data(d.E.get(0),"events"));d.E.off(),d.is_multi?b?d.E.find("option:not(:checked):not(:disabled):not(:hidden)").toArray().forEach(function(b){a(b).data("li").hasClass("hidden")||(b.selected=!0,a(b).data("li").toggleClass("selected",!0))}):d.E.find("option:checked:not(:disabled):not(:hidden)").toArray().forEach(function(b){a(b).data("li").hasClass("hidden")||(b.selected=!1,a(b).data("li").toggleClass("selected",!1))}):b?console.warn("You called `SelectAll` on a non-multiple select"):d.E[0].selectedIndex=-1,a.each(e,function(b,c){a.each(c,function(a,b){d.E.on(b.type,b.handler)})}),d.callChange(),c||(!d.mob&&d.selAll&&d.selAll.removeClass("partial").toggleClass("selected",!!b),d.setText(),d.setPstate())},/* outside accessibility options
|
83 |
+
which can be accessed from the element instance.
|
84 |
+
*/reload:function reload(){var b=this.unload();return a(b).SumoSelect(f)},unload:function unload(){var a=this;return a.select.before(a.E),a.E.show(),a.E[0].classList.remove("SumoUnder"),f.outputAsCSV&&a.is_multi&&a.select.find("input.HEMANT123").length&&a.E.attr("name",a.select.find("input.HEMANT123").attr("name")),a.select.remove(),delete d.sumo,a.E.trigger("sumo:unloaded",a),d},//## add a new option to select at a given index.
|
85 |
+
add:function add(b,c,e,f){if("undefined"==typeof b)throw new Error("No value to add");var g=this,h=g.E.find("option"),i=c,j=e;"number"==typ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|