Version Description
- Preparing for Inbound Pro
Download this release
Release Info
Developer | adbox |
Plugin | WordPress Landing Pages |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.5 to 2.1.0
- .gitignore +58 -0
- Gruntfile.js +19 -0
- assets/css/admin/landing-page-edit-style.css +3 -88
- assets/lang/_get-translations.bat +0 -11
- assets/lang/tx.exe +0 -0
- assets/libraries/class-tgm-plugin-activation.php +7 -7
- assets/tests/build/php.conf +4 -0
- assets/tests/build/php.load +1 -0
- assets/tests/build/travis-ci-apache +23 -0
- assets/tests/codeception/_bootstrap.php +14 -0
- assets/tests/codeception/_data/dump.sql +1 -0
- assets/tests/codeception/_support/AcceptanceHelper.php +10 -0
- assets/tests/codeception/_support/FunctionalHelper.php +10 -0
- assets/tests/codeception/_support/UnitHelper.php +10 -0
- assets/tests/codeception/acceptance/AcceptanceTester.php +1918 -0
- assets/tests/codeception/acceptance/LoginCept.php +48 -0
- assets/tests/codeception/acceptance/StatisticsCept.php +55 -0
- assets/tests/codeception/acceptance/WelcomeCept.php +7 -0
- assets/tests/codeception/acceptance/_bootstrap.php +2 -0
- assets/tests/codeception/functional/FunctionalTester.php +360 -0
- assets/tests/codeception/functional/_bootstrap.php +2 -0
- assets/tests/codeception/unit/UnitTester.php +300 -0
- assets/tests/codeception/unit/_bootstrap.php +2 -0
- assets/tests/phpunit/bootstrap.php +15 -0
- assets/tests/phpunit/test.activations.php +50 -0
- assets/tests/travis-ci/test.statistics.php +68 -0
- classes/class.acf-integration.php +44 -4
- classes/class.admin-menus.php +5 -4
- classes/class.inbound-statistics.php +1 -0
- classes/class.install.php +0 -79
- classes/class.landing-pages.php +16 -16
- classes/class.metaboxes.php +3 -3
- classes/class.post-type.landing-page.php +1 -1
- classes/class.settings.php +2 -26
- classes/class.sidebars.php +1 -1
- classes/class.variations.php +20 -8
- classes/class.wp-list-table.templates.php +2 -0
- composer.json +51 -0
- composer.lock +0 -2137
- landing-pages.php +2 -2
- modules/module.redirect-ab-testing.php +17 -0
- package.json +47 -0
- readme.txt +7 -4
- shared/assets/css/admin/select2-spinner.gif +0 -0
- shared/assets/css/admin/select2.css +0 -680
- shared/assets/css/admin/select2.png +0 -0
- shared/assets/css/admin/select2x2.png +0 -0
- shared/assets/css/iframe-preview.css +5 -5
- shared/assets/fonts/fontawesome/css/font-awesome.css +0 -1566
- shared/assets/fonts/fontawesome/css/font-awesome.min.css +3 -2
- shared/assets/{css → fonts/fontawesome}/fontawesome.min.css +0 -0
- shared/assets/js/admin/select2.js +0 -3137
- shared/assets/js/admin/select2.min.js +0 -22
- shared/assets/js/frontend/analytics/inboundAnalytics.js +9 -9
- shared/assets/js/frontend/analytics/inboundAnalytics.min.js +2 -2
- shared/assets/plugins/acf-field-date-time-picker/acf-date_time_picker.php +81 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_222222_256x240.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_2e83ff_256x240.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_454545_256x240.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_888888_256x240.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/input.css +0 -0
- shared/assets/plugins/acf-field-date-time-picker/css/jquery-ui-timepicker-addon.css +11 -0
- shared/assets/plugins/acf-field-date-time-picker/css/jquery-ui.css +489 -0
- shared/assets/plugins/acf-field-date-time-picker/css/timepicker.css +7 -0
- shared/assets/plugins/acf-field-date-time-picker/date_time_picker-v3.php +503 -0
- shared/assets/plugins/acf-field-date-time-picker/date_time_picker-v4.php +477 -0
- shared/assets/plugins/acf-field-date-time-picker/date_time_picker-v5.php +411 -0
- shared/assets/plugins/acf-field-date-time-picker/js/input.js +32 -0
- shared/assets/plugins/acf-field-date-time-picker/js/jquery-ui-sliderAccess.js +89 -0
- shared/assets/plugins/acf-field-date-time-picker/js/jquery-ui-timepicker-addon.js +2128 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-af.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-bg.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ca.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-cs.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-da.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-de.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-el.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-es.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-et.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-eu.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-fi.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-fr.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-gl.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-he.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-hr.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-hu.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-id.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-it.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ja.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ko.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-lt.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-nl.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-no.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-pl.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-pt-BR.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-pt.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ro.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ru.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-sk.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-sv.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-th.js +18 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-tr.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-uk.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-vi.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-zh-CN.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-zh-TW.js +21 -0
- shared/assets/plugins/acf-field-date-time-picker/js/timepicker-localization.js +22 -0
- shared/assets/plugins/acf-field-date-time-picker/js/timepicker.js +153 -0
- shared/classes/class.acf-bootstrap.php +1 -0
- shared/classes/class.events.php +87 -42
- shared/classes/class.form.php +16 -2
- shared/classes/class.inbound-api.php +6 -1
- shared/classes/class.lead-storage.php +5 -0
- shared/classes/class.licensing.php +10 -23
- shared/classes/class.load-shared.php +2 -2
- shared/classes/class.master-license.php +2 -2
- shared/classes/class.menus.adminbar.php +11 -0
- shared/classes/class.promote.php +206 -0
- shared/docs/analytics.events.md +352 -352
- shared/docs/css/blur.jpg +0 -0
- shared/docs/css/style.css +0 -0
- shared/docs/css/theme.css +0 -0
- shared/docs/index.html +0 -0
- shared/docs/js/flatdoc.js +0 -0
- shared/docs/js/jquery.js +0 -0
- shared/docs/js/legacy.js +0 -0
- shared/docs/js/script.js +0 -0
- shared/docs/js/theme.js +0 -0
- shared/docs/main.md +0 -0
- shared/docs/shortcodes.md +0 -0
- templates/countdown-lander/config.php +1 -1
- templates/do-NOT-install-templates-here.txt +0 -0
- templates/dropcap/assets/css/style.css +156 -101
- templates/dropcap/index.php +117 -86
- templates/simple-solid-lite/config.php +0 -0
- templates/simple-solid-lite/css/inbound-compiled-style.css +0 -0
- templates/simple-solid-lite/css/main.css +0 -0
- templates/simple-solid-lite/images/inbound-logo.png +0 -0
- templates/simple-solid-lite/index.php +0 -0
- templates/simple-solid-lite/js/jquery.min.js +0 -0
- templates/simple-solid-lite/js/scripts.js +0 -0
- templates/simple-solid-lite/js/selectivizr-min.js +0 -0
- templates/simple-solid-lite/thumbnail.png +0 -0
- templates/tubelar/assets/js/jquery.tubular.1.0.js +5 -2
.gitignore
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.DS_Store
|
2 |
+
/shared/_DelSyncFiles/
|
3 |
+
|
4 |
+
shared/languages/landing-pages/.tx/CONFIG
|
5 |
+
shared/languages/landing-pages/get-translations.bat
|
6 |
+
shared/languages/leads/_get-translations.bat
|
7 |
+
shared/languages/calls-to-action/_get-translations.bat
|
8 |
+
|
9 |
+
#filetypes
|
10 |
+
|
11 |
+
|
12 |
+
# OS generated files #
|
13 |
+
######################
|
14 |
+
*~
|
15 |
+
.SyncIgnore
|
16 |
+
.svn
|
17 |
+
.cvs
|
18 |
+
.DS_Store
|
19 |
+
.DS_Store?
|
20 |
+
._*
|
21 |
+
.Spotlight-V100
|
22 |
+
.Trashes
|
23 |
+
Icon?
|
24 |
+
ehthumbs.db
|
25 |
+
Thumbs.db
|
26 |
+
.cache
|
27 |
+
.project
|
28 |
+
.settings
|
29 |
+
.tmproj
|
30 |
+
*.esproj
|
31 |
+
nbproject
|
32 |
+
*.sublime-project
|
33 |
+
*.sublime-workspace
|
34 |
+
*.exe
|
35 |
+
*.bat
|
36 |
+
*.sh
|
37 |
+
|
38 |
+
# Grunt
|
39 |
+
node_modules
|
40 |
+
Desktop.ini
|
41 |
+
|
42 |
+
#codeception
|
43 |
+
tests/codeception/_output
|
44 |
+
tests/codeception/_support
|
45 |
+
tests/codeception/_data
|
46 |
+
|
47 |
+
#composer
|
48 |
+
composer.lock
|
49 |
+
vendor
|
50 |
+
bin
|
51 |
+
|
52 |
+
#phpstorm
|
53 |
+
.idea
|
54 |
+
/shared/assets/plugins/advanced-custom-fields/**.png
|
55 |
+
/shared/assets/plugins/advanced-custom-fields/images/add-ons/**.jpg
|
56 |
+
/shared/assets/plugins/advanced-custom-fields/lang/**.pot
|
57 |
+
/shared/assets/plugins/advanced-custom-fields/lang/**.po
|
58 |
+
/shared/assets/plugins/advanced-custom-fields/lang/**.mo
|
Gruntfile.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* for main build processes we use gulp see gulpfile.js */
|
2 |
+
module.exports = function(grunt) {
|
3 |
+
|
4 |
+
grunt.initConfig({
|
5 |
+
pkg: grunt.file.readJSON('package.json'),
|
6 |
+
wp_readme_to_markdown: {
|
7 |
+
cta: {
|
8 |
+
files: {
|
9 |
+
'readme.md': 'readme.txt'
|
10 |
+
},
|
11 |
+
},
|
12 |
+
},
|
13 |
+
});
|
14 |
+
|
15 |
+
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
|
16 |
+
|
17 |
+
grunt.registerTask('default', ['wp_readme_to_markdown']);
|
18 |
+
|
19 |
+
};
|
assets/css/admin/landing-page-edit-style.css
CHANGED
@@ -13,28 +13,16 @@
|
|
13 |
margin-top:30px;
|
14 |
z-index:999999;
|
15 |
}
|
16 |
-
|
17 |
-
text-decoration: none;
|
18 |
-
}
|
19 |
|
20 |
tr#leads {
|
21 |
display: table-row !important;
|
22 |
}
|
23 |
-
|
24 |
-
margin-top: 5px;
|
25 |
-
}
|
26 |
-
#setting-error-tgmpa em {
|
27 |
-
display: block;
|
28 |
-
}
|
29 |
#add-landing-page.hide-if-js {
|
30 |
display: block !important;
|
31 |
}
|
32 |
-
#setting-error-tgmpa {
|
33 |
-
padding-bottom: 5px;
|
34 |
-
padding-top: 5px;
|
35 |
-
padding-left: 10px;
|
36 |
|
37 |
-
}
|
38 |
#menu-posts-landing-page .wp-submenu.wp-submenu-wrap {
|
39 |
z-index: 99999;
|
40 |
}
|
@@ -61,62 +49,15 @@ display: none;
|
|
61 |
.branch-3-7 #adminmenu .menu-icon-landing-page div.wp-menu-image img {
|
62 |
display: block;
|
63 |
}
|
64 |
-
|
65 |
-
text-decoration: bold;
|
66 |
-
}
|
67 |
.appearance_page_install-inbound-plugins .inbound-install-notice {
|
68 |
display: none;
|
69 |
}
|
70 |
-
#setting-error-tgmpa p:nth-last-child(2), #setting-error-tgmpa a, #setting-error-tgmpa strong {
|
71 |
-
text-decoration: normal;
|
72 |
-
}
|
73 |
-
#setting-error-tgmpa em:last-of-type {
|
74 |
-
display: inline-block;
|
75 |
-
}
|
76 |
.inbound-and {
|
77 |
display: block;
|
78 |
margin-top: 10px;
|
79 |
font-size: 15px;
|
80 |
}
|
81 |
-
#setting-error-tgmpa p:nth-last-child(2) a:first-child{
|
82 |
-
padding-left: 0px;
|
83 |
-
text-decoration: none;
|
84 |
-
}
|
85 |
-
#setting-error-tgmpa p:nth-last-child(2) a {
|
86 |
-
padding-right: 10px;
|
87 |
-
padding-left: 10px;
|
88 |
-
font-size: 13px;
|
89 |
-
margin-top: 10px;
|
90 |
-
display: inline-block;
|
91 |
-
}
|
92 |
-
#setting-error-tgmpa a.thickbox {
|
93 |
-
font-size: 16px;
|
94 |
-
padding-top: 5px;
|
95 |
-
display: inline-block;
|
96 |
-
padding-bottom: 5px;
|
97 |
-
}
|
98 |
-
#setting-error-tgmpa.updated p {
|
99 |
-
width: 99%;
|
100 |
-
margin: 0px;
|
101 |
-
}
|
102 |
-
#setting-error-tgmpa a span {
|
103 |
-
color: #000 !important;
|
104 |
-
text-decoration: none;
|
105 |
-
font-size: 14px !important;
|
106 |
-
font-style: normal !important;
|
107 |
-
font-weight: normal !important;
|
108 |
-
}
|
109 |
-
#template-box, .thumbnail-lander img {
|
110 |
-
background: #FCFDFE;
|
111 |
-
padding: 3%;
|
112 |
-
margin-right: 10px;
|
113 |
-
border: 1px solid #E0E0E0;
|
114 |
-
-moz-border-radius: 7px;
|
115 |
-
border-radius: 7px;
|
116 |
-
position: relative;
|
117 |
-
overflow: hidden;
|
118 |
-
display: block;
|
119 |
-
}
|
120 |
#postexcerpt p {
|
121 |
display: none;
|
122 |
}
|
@@ -125,8 +66,6 @@ font-weight: normal !important;
|
|
125 |
border: none;
|
126 |
}
|
127 |
|
128 |
-
|
129 |
-
|
130 |
#lp_templates_wrapper_inside { padding-left: 15px; width: 945px; margin: 0; }
|
131 |
|
132 |
.lp_template_wrapper ul li { float: left; position: relative; list-style: none; }
|
@@ -465,28 +404,4 @@ div.capty-caption a {
|
|
465 |
text-decoration: none;
|
466 |
text-shadow: none;
|
467 |
}
|
468 |
-
#setting-error-tgmpa a {
|
469 |
-
font-style: normal;
|
470 |
-
}
|
471 |
-
#setting-error-tgmpa .inbound-install-notice {
|
472 |
|
473 |
-
}
|
474 |
-
#TB_ajaxWindowTitle .inbound-install-notice {
|
475 |
-
display: none;
|
476 |
-
}
|
477 |
-
#setting-error-tgmpa .inbound-install-notice-links {
|
478 |
-
display: block;
|
479 |
-
margin-bottom: 5px;
|
480 |
-
}
|
481 |
-
#setting-error-tgmpa a.dismiss-notice{
|
482 |
-
color: grey;
|
483 |
-
}
|
484 |
-
#setting-error-tgmpa .thickbox {
|
485 |
-
display: inline-block;
|
486 |
-
margin-top: 5px;
|
487 |
-
font-weight: bold;
|
488 |
-
}
|
489 |
-
|
490 |
-
#setting-error-tgmpa em {
|
491 |
-
font-weight: normal;
|
492 |
-
}
|
13 |
margin-top:30px;
|
14 |
z-index:999999;
|
15 |
}
|
16 |
+
|
|
|
|
|
17 |
|
18 |
tr#leads {
|
19 |
display: table-row !important;
|
20 |
}
|
21 |
+
|
|
|
|
|
|
|
|
|
|
|
22 |
#add-landing-page.hide-if-js {
|
23 |
display: block !important;
|
24 |
}
|
|
|
|
|
|
|
|
|
25 |
|
|
|
26 |
#menu-posts-landing-page .wp-submenu.wp-submenu-wrap {
|
27 |
z-index: 99999;
|
28 |
}
|
49 |
.branch-3-7 #adminmenu .menu-icon-landing-page div.wp-menu-image img {
|
50 |
display: block;
|
51 |
}
|
52 |
+
|
|
|
|
|
53 |
.appearance_page_install-inbound-plugins .inbound-install-notice {
|
54 |
display: none;
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
.inbound-and {
|
57 |
display: block;
|
58 |
margin-top: 10px;
|
59 |
font-size: 15px;
|
60 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
#postexcerpt p {
|
62 |
display: none;
|
63 |
}
|
66 |
border: none;
|
67 |
}
|
68 |
|
|
|
|
|
69 |
#lp_templates_wrapper_inside { padding-left: 15px; width: 945px; margin: 0; }
|
70 |
|
71 |
.lp_template_wrapper ul li { float: left; position: relative; list-style: none; }
|
404 |
text-decoration: none;
|
405 |
text-shadow: none;
|
406 |
}
|
|
|
|
|
|
|
|
|
407 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/lang/_get-translations.bat
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
tx.exe pull -a --skip
|
2 |
-
|
3 |
-
|
4 |
-
for %%a in (*.po) do (
|
5 |
-
if /i not "%%~na"=="landing-pages" (
|
6 |
-
msgfmt -cv -o "landing-pages-%%~na.mo" "%%a"
|
7 |
-
del "%%a"
|
8 |
-
)
|
9 |
-
)
|
10 |
-
|
11 |
-
PAUSE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/lang/tx.exe
DELETED
Binary file
|
assets/libraries/class-tgm-plugin-activation.php
CHANGED
@@ -1865,21 +1865,21 @@ if ( ! class_exists( 'INBOUND_Plugin_Activation' ) ) {
|
|
1865 |
|
1866 |
return self::$instance;
|
1867 |
}
|
1868 |
-
}
|
1869 |
|
1870 |
-
if ( ! function_exists( 'load_tgm_plugin_activation' ) ) {
|
1871 |
/**
|
1872 |
* Ensure only one instance of the class is ever invoked.
|
1873 |
*/
|
1874 |
-
function load_tgm_plugin_activation() {
|
1875 |
-
$GLOBALS['tgmpa']
|
|
|
|
|
1876 |
}
|
1877 |
}
|
1878 |
|
1879 |
-
if ( did_action( '
|
1880 |
-
load_tgm_plugin_activation();
|
1881 |
} else {
|
1882 |
-
add_action( '
|
1883 |
}
|
1884 |
}
|
1885 |
|
1865 |
|
1866 |
return self::$instance;
|
1867 |
}
|
|
|
1868 |
|
|
|
1869 |
/**
|
1870 |
* Ensure only one instance of the class is ever invoked.
|
1871 |
*/
|
1872 |
+
public static function load_tgm_plugin_activation() {
|
1873 |
+
if (!isset($GLOBALS['tgmpa'] )) {
|
1874 |
+
$GLOBALS['tgmpa'] = INBOUND_Plugin_Activation::get_instance();
|
1875 |
+
}
|
1876 |
}
|
1877 |
}
|
1878 |
|
1879 |
+
if ( did_action( 'after_setup_theme' ) ) {
|
1880 |
+
INBOUND_Plugin_Activation::load_tgm_plugin_activation();
|
1881 |
} else {
|
1882 |
+
add_action( 'after_setup_theme', array( 'INBOUND_Plugin_Activation', 'load_tgm_plugin_activation' ) );
|
1883 |
}
|
1884 |
}
|
1885 |
|
assets/tests/build/php.conf
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<IfModule mod_php5.c>
|
2 |
+
AddType application/x-httpd-php .php .phtml .php5
|
3 |
+
AddType application/x-httpd-php-source .phps
|
4 |
+
</IfModule>
|
assets/tests/build/php.load
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
|
assets/tests/build/travis-ci-apache
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<VirtualHost *:80>
|
2 |
+
ServerAdmin tests@inboundnow.com
|
3 |
+
DocumentRoot /var/www/inboundtesting.dev/
|
4 |
+
ServerName inboundtesting.dev
|
5 |
+
ErrorLog ${APACHE_LOG_DIR}/error.log
|
6 |
+
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
7 |
+
|
8 |
+
# Wire up Apache to use Travis CI's php-fpm.
|
9 |
+
<IfModule mod_fastcgi.c>
|
10 |
+
AddHandler php5-fcgi .php
|
11 |
+
Action php5-fcgi /php5-fcgi
|
12 |
+
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
13 |
+
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
|
14 |
+
</IfModule>
|
15 |
+
|
16 |
+
<Directory "/var/www/inboundtesting.dev/">
|
17 |
+
Options FollowSymLinks MultiViews ExecCGI
|
18 |
+
AllowOverride All
|
19 |
+
Order deny,allow
|
20 |
+
Allow from all
|
21 |
+
</Directory>
|
22 |
+
</VirtualHost>
|
23 |
+
|
assets/tests/codeception/_bootstrap.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/* load wp */
|
5 |
+
require '../../../wp-load.php';
|
6 |
+
require '../../../wp-admin/includes/plugin.php';
|
7 |
+
|
8 |
+
/* load coception addons */
|
9 |
+
require LANDINGPAGES_PATH . 'vendor/lucatume/wp-browser/src/Codeception/Module/WPBrowserMethods.php';
|
10 |
+
require LANDINGPAGES_PATH . 'vendor/lucatume/wp-browser/src/Codeception/Module/WPBrowser.php';
|
11 |
+
|
12 |
+
/* Set current users */
|
13 |
+
wp_set_current_user( 1 );
|
14 |
+
global $wpdb;
|
assets/tests/codeception/_data/dump.sql
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/* Replace this file with actual dump of your database */
|
assets/tests/codeception/_support/AcceptanceHelper.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Codeception\Module;
|
3 |
+
|
4 |
+
// here you can define custom actions
|
5 |
+
// all public methods declared in helper class will be available in $I
|
6 |
+
|
7 |
+
class AcceptanceHelper extends \Codeception\Module
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
assets/tests/codeception/_support/FunctionalHelper.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Codeception\Module;
|
3 |
+
|
4 |
+
// here you can define custom actions
|
5 |
+
// all public methods declared in helper class will be available in $I
|
6 |
+
|
7 |
+
class FunctionalHelper extends \Codeception\Module
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
assets/tests/codeception/_support/UnitHelper.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Codeception\Module;
|
3 |
+
|
4 |
+
// here you can define custom actions
|
5 |
+
// all public methods declared in helper class will be available in $I
|
6 |
+
|
7 |
+
class UnitHelper extends \Codeception\Module
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
assets/tests/codeception/acceptance/AcceptanceTester.php
ADDED
@@ -0,0 +1,1918 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //[STAMP] 2d5aa64986f8f94bc0f812d88aa9dee6
|
2 |
+
|
3 |
+
// This class was automatically generated by build task
|
4 |
+
// You should not change it manually as it will be overwritten on next build
|
5 |
+
// @codingStandardsIgnoreFile
|
6 |
+
|
7 |
+
|
8 |
+
use Codeception\Module\PhpBrowser;
|
9 |
+
use Codeception\Module\AcceptanceHelper;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Inherited Methods
|
13 |
+
* @method void wantToTest($text)
|
14 |
+
* @method void wantTo($text)
|
15 |
+
* @method void execute($callable)
|
16 |
+
* @method void expectTo($prediction)
|
17 |
+
* @method void expect($prediction)
|
18 |
+
* @method void amGoingTo($argumentation)
|
19 |
+
* @method void am($role)
|
20 |
+
* @method void lookForwardTo($achieveValue)
|
21 |
+
* @method void comment($description)
|
22 |
+
* @method void haveFriend($name, $actorClass = null)
|
23 |
+
*
|
24 |
+
* @SuppressWarnings(PHPMD)
|
25 |
+
*/
|
26 |
+
class AcceptanceTester extends \Codeception\Actor
|
27 |
+
{
|
28 |
+
|
29 |
+
/**
|
30 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
31 |
+
*
|
32 |
+
* Sets the HTTP header to the passed value - which is used on
|
33 |
+
* subsequent HTTP requests through PhpBrowser.
|
34 |
+
*
|
35 |
+
* Example:
|
36 |
+
* ```php
|
37 |
+
* <?php
|
38 |
+
* $I->setHeader('X-Requested-With', 'Codeception');
|
39 |
+
* $I->amOnPage('test-headers.php');
|
40 |
+
* ?>
|
41 |
+
* ```
|
42 |
+
*
|
43 |
+
* @param string $name the name of the request header
|
44 |
+
* @param string $value the value to set it to for subsequent
|
45 |
+
* requests
|
46 |
+
* @see \Codeception\Module\PhpBrowser::setHeader()
|
47 |
+
*/
|
48 |
+
public function setHeader($name, $value) {
|
49 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('setHeader', func_get_args()));
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
/**
|
54 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
55 |
+
*
|
56 |
+
* Deletes the header with the passed name. Subsequent requests
|
57 |
+
* will not have the deleted header in its request.
|
58 |
+
*
|
59 |
+
* Example:
|
60 |
+
* ```php
|
61 |
+
* <?php
|
62 |
+
* $I->setHeader('X-Requested-With', 'Codeception');
|
63 |
+
* $I->amOnPage('test-headers.php');
|
64 |
+
* // ...
|
65 |
+
* $I->deleteHeader('X-Requested-With');
|
66 |
+
* $I->amOnPage('some-other-page.php');
|
67 |
+
* ?>
|
68 |
+
* ```
|
69 |
+
*
|
70 |
+
* @param string $name the name of the header to delete.
|
71 |
+
* @see \Codeception\Module\PhpBrowser::deleteHeader()
|
72 |
+
*/
|
73 |
+
public function deleteHeader($name) {
|
74 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args()));
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
80 |
+
*
|
81 |
+
* Authenticates user for HTTP_AUTH
|
82 |
+
*
|
83 |
+
* @param $username
|
84 |
+
* @param $password
|
85 |
+
* @see \Codeception\Module\PhpBrowser::amHttpAuthenticated()
|
86 |
+
*/
|
87 |
+
public function amHttpAuthenticated($username, $password) {
|
88 |
+
return $this->scenario->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
/**
|
93 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
94 |
+
*
|
95 |
+
* Opens the page for the given relative URI.
|
96 |
+
*
|
97 |
+
* ``` php
|
98 |
+
* <?php
|
99 |
+
* // opens front page
|
100 |
+
* $I->amOnPage('/');
|
101 |
+
* // opens /register page
|
102 |
+
* $I->amOnPage('/register');
|
103 |
+
* ?>
|
104 |
+
* ```
|
105 |
+
*
|
106 |
+
* @param $page
|
107 |
+
* @see \Codeception\Module\PhpBrowser::amOnPage()
|
108 |
+
*/
|
109 |
+
public function amOnPage($page) {
|
110 |
+
return $this->scenario->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
/**
|
115 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
116 |
+
*
|
117 |
+
* Open web page at the given absolute URL and sets its hostname as the base host.
|
118 |
+
*
|
119 |
+
* ``` php
|
120 |
+
* <?php
|
121 |
+
* $I->amOnUrl('http://codeception.com');
|
122 |
+
* $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart
|
123 |
+
* ?>
|
124 |
+
* ```
|
125 |
+
* @see \Codeception\Module\PhpBrowser::amOnUrl()
|
126 |
+
*/
|
127 |
+
public function amOnUrl($url) {
|
128 |
+
return $this->scenario->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args()));
|
129 |
+
}
|
130 |
+
|
131 |
+
|
132 |
+
/**
|
133 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
134 |
+
*
|
135 |
+
* Changes the subdomain for the 'url' configuration parameter.
|
136 |
+
* Does not open a page; use `amOnPage` for that.
|
137 |
+
*
|
138 |
+
* ``` php
|
139 |
+
* <?php
|
140 |
+
* // If config is: 'http://mysite.com'
|
141 |
+
* // or config is: 'http://www.mysite.com'
|
142 |
+
* // or config is: 'http://company.mysite.com'
|
143 |
+
*
|
144 |
+
* $I->amOnSubdomain('user');
|
145 |
+
* $I->amOnPage('/');
|
146 |
+
* // moves to http://user.mysite.com/
|
147 |
+
* ?>
|
148 |
+
* ```
|
149 |
+
*
|
150 |
+
* @param $subdomain
|
151 |
+
*
|
152 |
+
* @return mixed
|
153 |
+
* @see \Codeception\Module\PhpBrowser::amOnSubdomain()
|
154 |
+
*/
|
155 |
+
public function amOnSubdomain($subdomain) {
|
156 |
+
return $this->scenario->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args()));
|
157 |
+
}
|
158 |
+
|
159 |
+
|
160 |
+
/**
|
161 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
162 |
+
*
|
163 |
+
* Low-level API method.
|
164 |
+
* If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly
|
165 |
+
*
|
166 |
+
* Example:
|
167 |
+
*
|
168 |
+
* ``` php
|
169 |
+
* <?php
|
170 |
+
* $I->executeInGuzzle(function (\GuzzleHttp\Client $client) {
|
171 |
+
* $client->get('/get', ['query' => ['foo' => 'bar']]);
|
172 |
+
* });
|
173 |
+
* ?>
|
174 |
+
* ```
|
175 |
+
*
|
176 |
+
* It is not recommended to use this command on a regular basis.
|
177 |
+
* If Codeception lacks important Guzzle Client methods, implement them and submit patches.
|
178 |
+
*
|
179 |
+
* @param callable $function
|
180 |
+
* @see \Codeception\Module\PhpBrowser::executeInGuzzle()
|
181 |
+
*/
|
182 |
+
public function executeInGuzzle($function) {
|
183 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args()));
|
184 |
+
}
|
185 |
+
|
186 |
+
|
187 |
+
/**
|
188 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
189 |
+
*
|
190 |
+
* Perform a click on a link or a button, given by a locator.
|
191 |
+
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
192 |
+
* For buttons, the "value" attribute, "name" attribute, and inner text are searched.
|
193 |
+
* For links, the link text is searched.
|
194 |
+
* For images, the "alt" attribute and inner text of any parent links are searched.
|
195 |
+
*
|
196 |
+
* The second parameter is a context (CSS or XPath locator) to narrow the search.
|
197 |
+
*
|
198 |
+
* Note that if the locator matches a button of type `submit`, the form will be submitted.
|
199 |
+
*
|
200 |
+
* ``` php
|
201 |
+
* <?php
|
202 |
+
* // simple link
|
203 |
+
* $I->click('Logout');
|
204 |
+
* // button of form
|
205 |
+
* $I->click('Submit');
|
206 |
+
* // CSS button
|
207 |
+
* $I->click('#form input[type=submit]');
|
208 |
+
* // XPath
|
209 |
+
* $I->click('//form/*[@type=submit]');
|
210 |
+
* // link in context
|
211 |
+
* $I->click('Logout', '#nav');
|
212 |
+
* // using strict locator
|
213 |
+
* $I->click(['link' => 'Login']);
|
214 |
+
* ?>
|
215 |
+
* ```
|
216 |
+
*
|
217 |
+
* @param $link
|
218 |
+
* @param $context
|
219 |
+
* @see \Codeception\Lib\InnerBrowser::click()
|
220 |
+
*/
|
221 |
+
public function click($link, $context = null) {
|
222 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('click', func_get_args()));
|
223 |
+
}
|
224 |
+
|
225 |
+
|
226 |
+
/**
|
227 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
228 |
+
*
|
229 |
+
* Checks that the current page contains the given string.
|
230 |
+
* Specify a locator as the second parameter to match a specific region.
|
231 |
+
*
|
232 |
+
* ``` php
|
233 |
+
* <?php
|
234 |
+
* $I->see('Logout'); // I can suppose user is logged in
|
235 |
+
* $I->see('Sign Up','h1'); // I can suppose it's a signup page
|
236 |
+
* $I->see('Sign Up','//body/h1'); // with XPath
|
237 |
+
* ?>
|
238 |
+
* ```
|
239 |
+
*
|
240 |
+
* @param $text
|
241 |
+
* @param null $selector
|
242 |
+
* Conditional Assertion: Test won't be stopped on fail
|
243 |
+
* @see \Codeception\Lib\InnerBrowser::see()
|
244 |
+
*/
|
245 |
+
public function canSee($text, $selector = null) {
|
246 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
|
247 |
+
}
|
248 |
+
/**
|
249 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
250 |
+
*
|
251 |
+
* Checks that the current page contains the given string.
|
252 |
+
* Specify a locator as the second parameter to match a specific region.
|
253 |
+
*
|
254 |
+
* ``` php
|
255 |
+
* <?php
|
256 |
+
* $I->see('Logout'); // I can suppose user is logged in
|
257 |
+
* $I->see('Sign Up','h1'); // I can suppose it's a signup page
|
258 |
+
* $I->see('Sign Up','//body/h1'); // with XPath
|
259 |
+
* ?>
|
260 |
+
* ```
|
261 |
+
*
|
262 |
+
* @param $text
|
263 |
+
* @param null $selector
|
264 |
+
* @see \Codeception\Lib\InnerBrowser::see()
|
265 |
+
*/
|
266 |
+
public function see($text, $selector = null) {
|
267 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('see', func_get_args()));
|
268 |
+
}
|
269 |
+
|
270 |
+
|
271 |
+
/**
|
272 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
273 |
+
*
|
274 |
+
* Checks that the current page doesn't contain the text specified.
|
275 |
+
* Give a locator as the second parameter to match a specific region.
|
276 |
+
*
|
277 |
+
* ```php
|
278 |
+
* <?php
|
279 |
+
* $I->dontSee('Login'); // I can suppose user is already logged in
|
280 |
+
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
281 |
+
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
282 |
+
* ?>
|
283 |
+
* ```
|
284 |
+
*
|
285 |
+
* @param $text
|
286 |
+
* @param null $selector
|
287 |
+
* Conditional Assertion: Test won't be stopped on fail
|
288 |
+
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
289 |
+
*/
|
290 |
+
public function cantSee($text, $selector = null) {
|
291 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
|
292 |
+
}
|
293 |
+
/**
|
294 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
295 |
+
*
|
296 |
+
* Checks that the current page doesn't contain the text specified.
|
297 |
+
* Give a locator as the second parameter to match a specific region.
|
298 |
+
*
|
299 |
+
* ```php
|
300 |
+
* <?php
|
301 |
+
* $I->dontSee('Login'); // I can suppose user is already logged in
|
302 |
+
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
303 |
+
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
304 |
+
* ?>
|
305 |
+
* ```
|
306 |
+
*
|
307 |
+
* @param $text
|
308 |
+
* @param null $selector
|
309 |
+
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
310 |
+
*/
|
311 |
+
public function dontSee($text, $selector = null) {
|
312 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
|
313 |
+
}
|
314 |
+
|
315 |
+
|
316 |
+
/**
|
317 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
318 |
+
*
|
319 |
+
* Checks that there's a link with the specified text.
|
320 |
+
* Give a full URL as the second parameter to match links with that exact URL.
|
321 |
+
*
|
322 |
+
* ``` php
|
323 |
+
* <?php
|
324 |
+
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
325 |
+
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
326 |
+
* ?>
|
327 |
+
* ```
|
328 |
+
*
|
329 |
+
* @param $text
|
330 |
+
* @param null $url
|
331 |
+
* Conditional Assertion: Test won't be stopped on fail
|
332 |
+
* @see \Codeception\Lib\InnerBrowser::seeLink()
|
333 |
+
*/
|
334 |
+
public function canSeeLink($text, $url = null) {
|
335 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
|
336 |
+
}
|
337 |
+
/**
|
338 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
339 |
+
*
|
340 |
+
* Checks that there's a link with the specified text.
|
341 |
+
* Give a full URL as the second parameter to match links with that exact URL.
|
342 |
+
*
|
343 |
+
* ``` php
|
344 |
+
* <?php
|
345 |
+
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
346 |
+
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
347 |
+
* ?>
|
348 |
+
* ```
|
349 |
+
*
|
350 |
+
* @param $text
|
351 |
+
* @param null $url
|
352 |
+
* @see \Codeception\Lib\InnerBrowser::seeLink()
|
353 |
+
*/
|
354 |
+
public function seeLink($text, $url = null) {
|
355 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
|
356 |
+
}
|
357 |
+
|
358 |
+
|
359 |
+
/**
|
360 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
361 |
+
*
|
362 |
+
* Checks that the page doesn't contain a link with the given string.
|
363 |
+
* If the second parameter is given, only links with a matching "href" attribute will be checked.
|
364 |
+
*
|
365 |
+
* ``` php
|
366 |
+
* <?php
|
367 |
+
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
368 |
+
* $I->dontSeeLink('Checkout now', '/store/cart.php');
|
369 |
+
* ?>
|
370 |
+
* ```
|
371 |
+
*
|
372 |
+
* @param $text
|
373 |
+
* @param null $url
|
374 |
+
* Conditional Assertion: Test won't be stopped on fail
|
375 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeLink()
|
376 |
+
*/
|
377 |
+
public function cantSeeLink($text, $url = null) {
|
378 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
|
379 |
+
}
|
380 |
+
/**
|
381 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
382 |
+
*
|
383 |
+
* Checks that the page doesn't contain a link with the given string.
|
384 |
+
* If the second parameter is given, only links with a matching "href" attribute will be checked.
|
385 |
+
*
|
386 |
+
* ``` php
|
387 |
+
* <?php
|
388 |
+
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
389 |
+
* $I->dontSeeLink('Checkout now', '/store/cart.php');
|
390 |
+
* ?>
|
391 |
+
* ```
|
392 |
+
*
|
393 |
+
* @param $text
|
394 |
+
* @param null $url
|
395 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeLink()
|
396 |
+
*/
|
397 |
+
public function dontSeeLink($text, $url = null) {
|
398 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
|
399 |
+
}
|
400 |
+
|
401 |
+
|
402 |
+
/**
|
403 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
404 |
+
*
|
405 |
+
* Checks that current URI contains the given string.
|
406 |
+
*
|
407 |
+
* ``` php
|
408 |
+
* <?php
|
409 |
+
* // to match: /home/dashboard
|
410 |
+
* $I->seeInCurrentUrl('home');
|
411 |
+
* // to match: /users/1
|
412 |
+
* $I->seeInCurrentUrl('/users/');
|
413 |
+
* ?>
|
414 |
+
* ```
|
415 |
+
*
|
416 |
+
* @param $uri
|
417 |
+
* Conditional Assertion: Test won't be stopped on fail
|
418 |
+
* @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
|
419 |
+
*/
|
420 |
+
public function canSeeInCurrentUrl($uri) {
|
421 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
|
422 |
+
}
|
423 |
+
/**
|
424 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
425 |
+
*
|
426 |
+
* Checks that current URI contains the given string.
|
427 |
+
*
|
428 |
+
* ``` php
|
429 |
+
* <?php
|
430 |
+
* // to match: /home/dashboard
|
431 |
+
* $I->seeInCurrentUrl('home');
|
432 |
+
* // to match: /users/1
|
433 |
+
* $I->seeInCurrentUrl('/users/');
|
434 |
+
* ?>
|
435 |
+
* ```
|
436 |
+
*
|
437 |
+
* @param $uri
|
438 |
+
* @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
|
439 |
+
*/
|
440 |
+
public function seeInCurrentUrl($uri) {
|
441 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
|
442 |
+
}
|
443 |
+
|
444 |
+
|
445 |
+
/**
|
446 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
447 |
+
*
|
448 |
+
* Checks that the current URI doesn't contain the given string.
|
449 |
+
*
|
450 |
+
* ``` php
|
451 |
+
* <?php
|
452 |
+
* $I->dontSeeInCurrentUrl('/users/');
|
453 |
+
* ?>
|
454 |
+
* ```
|
455 |
+
*
|
456 |
+
* @param $uri
|
457 |
+
* Conditional Assertion: Test won't be stopped on fail
|
458 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
|
459 |
+
*/
|
460 |
+
public function cantSeeInCurrentUrl($uri) {
|
461 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
|
462 |
+
}
|
463 |
+
/**
|
464 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
465 |
+
*
|
466 |
+
* Checks that the current URI doesn't contain the given string.
|
467 |
+
*
|
468 |
+
* ``` php
|
469 |
+
* <?php
|
470 |
+
* $I->dontSeeInCurrentUrl('/users/');
|
471 |
+
* ?>
|
472 |
+
* ```
|
473 |
+
*
|
474 |
+
* @param $uri
|
475 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
|
476 |
+
*/
|
477 |
+
public function dontSeeInCurrentUrl($uri) {
|
478 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
|
479 |
+
}
|
480 |
+
|
481 |
+
|
482 |
+
/**
|
483 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
484 |
+
*
|
485 |
+
* Checks that the current URL is equal to the given string.
|
486 |
+
* Unlike `seeInCurrentUrl`, this only matches the full URL.
|
487 |
+
*
|
488 |
+
* ``` php
|
489 |
+
* <?php
|
490 |
+
* // to match root url
|
491 |
+
* $I->seeCurrentUrlEquals('/');
|
492 |
+
* ?>
|
493 |
+
* ```
|
494 |
+
*
|
495 |
+
* @param $uri
|
496 |
+
* Conditional Assertion: Test won't be stopped on fail
|
497 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
|
498 |
+
*/
|
499 |
+
public function canSeeCurrentUrlEquals($uri) {
|
500 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
|
501 |
+
}
|
502 |
+
/**
|
503 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
504 |
+
*
|
505 |
+
* Checks that the current URL is equal to the given string.
|
506 |
+
* Unlike `seeInCurrentUrl`, this only matches the full URL.
|
507 |
+
*
|
508 |
+
* ``` php
|
509 |
+
* <?php
|
510 |
+
* // to match root url
|
511 |
+
* $I->seeCurrentUrlEquals('/');
|
512 |
+
* ?>
|
513 |
+
* ```
|
514 |
+
*
|
515 |
+
* @param $uri
|
516 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
|
517 |
+
*/
|
518 |
+
public function seeCurrentUrlEquals($uri) {
|
519 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
|
520 |
+
}
|
521 |
+
|
522 |
+
|
523 |
+
/**
|
524 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
525 |
+
*
|
526 |
+
* Checks that the current URL doesn't equal the given string.
|
527 |
+
* Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
|
528 |
+
*
|
529 |
+
* ``` php
|
530 |
+
* <?php
|
531 |
+
* // current url is not root
|
532 |
+
* $I->dontSeeCurrentUrlEquals('/');
|
533 |
+
* ?>
|
534 |
+
* ```
|
535 |
+
*
|
536 |
+
* @param $uri
|
537 |
+
* Conditional Assertion: Test won't be stopped on fail
|
538 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
|
539 |
+
*/
|
540 |
+
public function cantSeeCurrentUrlEquals($uri) {
|
541 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
|
542 |
+
}
|
543 |
+
/**
|
544 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
545 |
+
*
|
546 |
+
* Checks that the current URL doesn't equal the given string.
|
547 |
+
* Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
|
548 |
+
*
|
549 |
+
* ``` php
|
550 |
+
* <?php
|
551 |
+
* // current url is not root
|
552 |
+
* $I->dontSeeCurrentUrlEquals('/');
|
553 |
+
* ?>
|
554 |
+
* ```
|
555 |
+
*
|
556 |
+
* @param $uri
|
557 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
|
558 |
+
*/
|
559 |
+
public function dontSeeCurrentUrlEquals($uri) {
|
560 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
|
561 |
+
}
|
562 |
+
|
563 |
+
|
564 |
+
/**
|
565 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
566 |
+
*
|
567 |
+
* Checks that the current URL matches the given regular expression.
|
568 |
+
*
|
569 |
+
* ``` php
|
570 |
+
* <?php
|
571 |
+
* // to match root url
|
572 |
+
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
573 |
+
* ?>
|
574 |
+
* ```
|
575 |
+
*
|
576 |
+
* @param $uri
|
577 |
+
* Conditional Assertion: Test won't be stopped on fail
|
578 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
|
579 |
+
*/
|
580 |
+
public function canSeeCurrentUrlMatches($uri) {
|
581 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
|
582 |
+
}
|
583 |
+
/**
|
584 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
585 |
+
*
|
586 |
+
* Checks that the current URL matches the given regular expression.
|
587 |
+
*
|
588 |
+
* ``` php
|
589 |
+
* <?php
|
590 |
+
* // to match root url
|
591 |
+
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
592 |
+
* ?>
|
593 |
+
* ```
|
594 |
+
*
|
595 |
+
* @param $uri
|
596 |
+
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
|
597 |
+
*/
|
598 |
+
public function seeCurrentUrlMatches($uri) {
|
599 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
|
600 |
+
}
|
601 |
+
|
602 |
+
|
603 |
+
/**
|
604 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
605 |
+
*
|
606 |
+
* Checks that current url doesn't match the given regular expression.
|
607 |
+
*
|
608 |
+
* ``` php
|
609 |
+
* <?php
|
610 |
+
* // to match root url
|
611 |
+
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
612 |
+
* ?>
|
613 |
+
* ```
|
614 |
+
*
|
615 |
+
* @param $uri
|
616 |
+
* Conditional Assertion: Test won't be stopped on fail
|
617 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
|
618 |
+
*/
|
619 |
+
public function cantSeeCurrentUrlMatches($uri) {
|
620 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
|
621 |
+
}
|
622 |
+
/**
|
623 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
624 |
+
*
|
625 |
+
* Checks that current url doesn't match the given regular expression.
|
626 |
+
*
|
627 |
+
* ``` php
|
628 |
+
* <?php
|
629 |
+
* // to match root url
|
630 |
+
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
631 |
+
* ?>
|
632 |
+
* ```
|
633 |
+
*
|
634 |
+
* @param $uri
|
635 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
|
636 |
+
*/
|
637 |
+
public function dontSeeCurrentUrlMatches($uri) {
|
638 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
|
639 |
+
}
|
640 |
+
|
641 |
+
|
642 |
+
/**
|
643 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
644 |
+
*
|
645 |
+
* Executes the given regular expression against the current URI and returns the first match.
|
646 |
+
* If no parameters are provided, the full URI is returned.
|
647 |
+
*
|
648 |
+
* ``` php
|
649 |
+
* <?php
|
650 |
+
* $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');
|
651 |
+
* $uri = $I->grabFromCurrentUrl();
|
652 |
+
* ?>
|
653 |
+
* ```
|
654 |
+
*
|
655 |
+
* @param null $uri
|
656 |
+
*
|
657 |
+
* @internal param $url
|
658 |
+
* @return mixed
|
659 |
+
* @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl()
|
660 |
+
*/
|
661 |
+
public function grabFromCurrentUrl($uri = null) {
|
662 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
|
663 |
+
}
|
664 |
+
|
665 |
+
|
666 |
+
/**
|
667 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
668 |
+
*
|
669 |
+
* Checks that the specified checkbox is checked.
|
670 |
+
*
|
671 |
+
* ``` php
|
672 |
+
* <?php
|
673 |
+
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
674 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
675 |
+
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
676 |
+
* ?>
|
677 |
+
* ```
|
678 |
+
*
|
679 |
+
* @param $checkbox
|
680 |
+
* Conditional Assertion: Test won't be stopped on fail
|
681 |
+
* @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
|
682 |
+
*/
|
683 |
+
public function canSeeCheckboxIsChecked($checkbox) {
|
684 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
|
685 |
+
}
|
686 |
+
/**
|
687 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
688 |
+
*
|
689 |
+
* Checks that the specified checkbox is checked.
|
690 |
+
*
|
691 |
+
* ``` php
|
692 |
+
* <?php
|
693 |
+
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
694 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
695 |
+
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
696 |
+
* ?>
|
697 |
+
* ```
|
698 |
+
*
|
699 |
+
* @param $checkbox
|
700 |
+
* @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
|
701 |
+
*/
|
702 |
+
public function seeCheckboxIsChecked($checkbox) {
|
703 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
|
704 |
+
}
|
705 |
+
|
706 |
+
|
707 |
+
/**
|
708 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
709 |
+
*
|
710 |
+
* Check that the specified checkbox is unchecked.
|
711 |
+
*
|
712 |
+
* ``` php
|
713 |
+
* <?php
|
714 |
+
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
715 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
716 |
+
* ?>
|
717 |
+
* ```
|
718 |
+
*
|
719 |
+
* @param $checkbox
|
720 |
+
* Conditional Assertion: Test won't be stopped on fail
|
721 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
|
722 |
+
*/
|
723 |
+
public function cantSeeCheckboxIsChecked($checkbox) {
|
724 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
|
725 |
+
}
|
726 |
+
/**
|
727 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
728 |
+
*
|
729 |
+
* Check that the specified checkbox is unchecked.
|
730 |
+
*
|
731 |
+
* ``` php
|
732 |
+
* <?php
|
733 |
+
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
734 |
+
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
735 |
+
* ?>
|
736 |
+
* ```
|
737 |
+
*
|
738 |
+
* @param $checkbox
|
739 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
|
740 |
+
*/
|
741 |
+
public function dontSeeCheckboxIsChecked($checkbox) {
|
742 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
|
743 |
+
}
|
744 |
+
|
745 |
+
|
746 |
+
/**
|
747 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
748 |
+
*
|
749 |
+
* Checks that the given input field or textarea contains the given value.
|
750 |
+
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
751 |
+
*
|
752 |
+
* ``` php
|
753 |
+
* <?php
|
754 |
+
* $I->seeInField('Body','Type your comment here');
|
755 |
+
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
756 |
+
* $I->seeInField('form input[type=hidden]','hidden_value');
|
757 |
+
* $I->seeInField('#searchform input','Search');
|
758 |
+
* $I->seeInField('//form/*[@name=search]','Search');
|
759 |
+
* $I->seeInField(['name' => 'search'], 'Search');
|
760 |
+
* ?>
|
761 |
+
* ```
|
762 |
+
*
|
763 |
+
* @param $field
|
764 |
+
* @param $value
|
765 |
+
* Conditional Assertion: Test won't be stopped on fail
|
766 |
+
* @see \Codeception\Lib\InnerBrowser::seeInField()
|
767 |
+
*/
|
768 |
+
public function canSeeInField($field, $value) {
|
769 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
|
770 |
+
}
|
771 |
+
/**
|
772 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
773 |
+
*
|
774 |
+
* Checks that the given input field or textarea contains the given value.
|
775 |
+
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
776 |
+
*
|
777 |
+
* ``` php
|
778 |
+
* <?php
|
779 |
+
* $I->seeInField('Body','Type your comment here');
|
780 |
+
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
781 |
+
* $I->seeInField('form input[type=hidden]','hidden_value');
|
782 |
+
* $I->seeInField('#searchform input','Search');
|
783 |
+
* $I->seeInField('//form/*[@name=search]','Search');
|
784 |
+
* $I->seeInField(['name' => 'search'], 'Search');
|
785 |
+
* ?>
|
786 |
+
* ```
|
787 |
+
*
|
788 |
+
* @param $field
|
789 |
+
* @param $value
|
790 |
+
* @see \Codeception\Lib\InnerBrowser::seeInField()
|
791 |
+
*/
|
792 |
+
public function seeInField($field, $value) {
|
793 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
|
794 |
+
}
|
795 |
+
|
796 |
+
|
797 |
+
/**
|
798 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
799 |
+
*
|
800 |
+
* Checks that an input field or textarea doesn't contain the given value.
|
801 |
+
* For fuzzy locators, the field is matched by label text, CSS and XPath.
|
802 |
+
*
|
803 |
+
* ``` php
|
804 |
+
* <?php
|
805 |
+
* $I->dontSeeInField('Body','Type your comment here');
|
806 |
+
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
807 |
+
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
808 |
+
* $I->dontSeeInField('#searchform input','Search');
|
809 |
+
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
810 |
+
* $I->dontSeeInField(['name' => 'search'], 'Search');
|
811 |
+
* ?>
|
812 |
+
* ```
|
813 |
+
*
|
814 |
+
* @param $field
|
815 |
+
* @param $value
|
816 |
+
* Conditional Assertion: Test won't be stopped on fail
|
817 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInField()
|
818 |
+
*/
|
819 |
+
public function cantSeeInField($field, $value) {
|
820 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
|
821 |
+
}
|
822 |
+
/**
|
823 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
824 |
+
*
|
825 |
+
* Checks that an input field or textarea doesn't contain the given value.
|
826 |
+
* For fuzzy locators, the field is matched by label text, CSS and XPath.
|
827 |
+
*
|
828 |
+
* ``` php
|
829 |
+
* <?php
|
830 |
+
* $I->dontSeeInField('Body','Type your comment here');
|
831 |
+
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
832 |
+
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
833 |
+
* $I->dontSeeInField('#searchform input','Search');
|
834 |
+
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
835 |
+
* $I->dontSeeInField(['name' => 'search'], 'Search');
|
836 |
+
* ?>
|
837 |
+
* ```
|
838 |
+
*
|
839 |
+
* @param $field
|
840 |
+
* @param $value
|
841 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInField()
|
842 |
+
*/
|
843 |
+
public function dontSeeInField($field, $value) {
|
844 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
|
845 |
+
}
|
846 |
+
|
847 |
+
|
848 |
+
/**
|
849 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
850 |
+
*
|
851 |
+
* Checks if the array of form parameters (name => value) are set on the form matched with the
|
852 |
+
* passed selector.
|
853 |
+
*
|
854 |
+
* ``` php
|
855 |
+
* <?php
|
856 |
+
* $I->seeInFormFields('form[name=myform]', [
|
857 |
+
* 'input1' => 'value',
|
858 |
+
* 'input2' => 'other value',
|
859 |
+
* ]);
|
860 |
+
* ?>
|
861 |
+
* ```
|
862 |
+
*
|
863 |
+
* For multi-select elements, or to check values of multiple elements with the same name, an
|
864 |
+
* array may be passed:
|
865 |
+
*
|
866 |
+
* ``` php
|
867 |
+
* <?php
|
868 |
+
* $I->seeInFormFields('.form-class', [
|
869 |
+
* 'multiselect' => [
|
870 |
+
* 'value1',
|
871 |
+
* 'value2',
|
872 |
+
* ],
|
873 |
+
* 'checkbox[]' => [
|
874 |
+
* 'a checked value',
|
875 |
+
* 'another checked value',
|
876 |
+
* ],
|
877 |
+
* ]);
|
878 |
+
* ?>
|
879 |
+
* ```
|
880 |
+
*
|
881 |
+
* Additionally, checkbox values can be checked with a boolean.
|
882 |
+
*
|
883 |
+
* ``` php
|
884 |
+
* <?php
|
885 |
+
* $I->seeInFormFields('#form-id', [
|
886 |
+
* 'checkbox1' => true, // passes if checked
|
887 |
+
* 'checkbox2' => false, // passes if unchecked
|
888 |
+
* ]);
|
889 |
+
* ?>
|
890 |
+
* ```
|
891 |
+
*
|
892 |
+
* Pair this with submitForm for quick testing magic.
|
893 |
+
*
|
894 |
+
* ``` php
|
895 |
+
* <?php
|
896 |
+
* $form = [
|
897 |
+
* 'field1' => 'value',
|
898 |
+
* 'field2' => 'another value',
|
899 |
+
* 'checkbox1' => true,
|
900 |
+
* // ...
|
901 |
+
* ];
|
902 |
+
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
903 |
+
* // $I->amOnPage('/path/to/form-page') may be needed
|
904 |
+
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
905 |
+
* ?>
|
906 |
+
* ```
|
907 |
+
*
|
908 |
+
* @param $formSelector
|
909 |
+
* @param $params
|
910 |
+
* Conditional Assertion: Test won't be stopped on fail
|
911 |
+
* @see \Codeception\Lib\InnerBrowser::seeInFormFields()
|
912 |
+
*/
|
913 |
+
public function canSeeInFormFields($formSelector, $params) {
|
914 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args()));
|
915 |
+
}
|
916 |
+
/**
|
917 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
918 |
+
*
|
919 |
+
* Checks if the array of form parameters (name => value) are set on the form matched with the
|
920 |
+
* passed selector.
|
921 |
+
*
|
922 |
+
* ``` php
|
923 |
+
* <?php
|
924 |
+
* $I->seeInFormFields('form[name=myform]', [
|
925 |
+
* 'input1' => 'value',
|
926 |
+
* 'input2' => 'other value',
|
927 |
+
* ]);
|
928 |
+
* ?>
|
929 |
+
* ```
|
930 |
+
*
|
931 |
+
* For multi-select elements, or to check values of multiple elements with the same name, an
|
932 |
+
* array may be passed:
|
933 |
+
*
|
934 |
+
* ``` php
|
935 |
+
* <?php
|
936 |
+
* $I->seeInFormFields('.form-class', [
|
937 |
+
* 'multiselect' => [
|
938 |
+
* 'value1',
|
939 |
+
* 'value2',
|
940 |
+
* ],
|
941 |
+
* 'checkbox[]' => [
|
942 |
+
* 'a checked value',
|
943 |
+
* 'another checked value',
|
944 |
+
* ],
|
945 |
+
* ]);
|
946 |
+
* ?>
|
947 |
+
* ```
|
948 |
+
*
|
949 |
+
* Additionally, checkbox values can be checked with a boolean.
|
950 |
+
*
|
951 |
+
* ``` php
|
952 |
+
* <?php
|
953 |
+
* $I->seeInFormFields('#form-id', [
|
954 |
+
* 'checkbox1' => true, // passes if checked
|
955 |
+
* 'checkbox2' => false, // passes if unchecked
|
956 |
+
* ]);
|
957 |
+
* ?>
|
958 |
+
* ```
|
959 |
+
*
|
960 |
+
* Pair this with submitForm for quick testing magic.
|
961 |
+
*
|
962 |
+
* ``` php
|
963 |
+
* <?php
|
964 |
+
* $form = [
|
965 |
+
* 'field1' => 'value',
|
966 |
+
* 'field2' => 'another value',
|
967 |
+
* 'checkbox1' => true,
|
968 |
+
* // ...
|
969 |
+
* ];
|
970 |
+
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
971 |
+
* // $I->amOnPage('/path/to/form-page') may be needed
|
972 |
+
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
973 |
+
* ?>
|
974 |
+
* ```
|
975 |
+
*
|
976 |
+
* @param $formSelector
|
977 |
+
* @param $params
|
978 |
+
* @see \Codeception\Lib\InnerBrowser::seeInFormFields()
|
979 |
+
*/
|
980 |
+
public function seeInFormFields($formSelector, $params) {
|
981 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
|
982 |
+
}
|
983 |
+
|
984 |
+
|
985 |
+
/**
|
986 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
987 |
+
*
|
988 |
+
* Checks if the array of form parameters (name => value) are not set on the form matched with
|
989 |
+
* the passed selector.
|
990 |
+
*
|
991 |
+
* ``` php
|
992 |
+
* <?php
|
993 |
+
* $I->dontSeeInFormFields('form[name=myform]', [
|
994 |
+
* 'input1' => 'non-existent value',
|
995 |
+
* 'input2' => 'other non-existent value',
|
996 |
+
* ]);
|
997 |
+
* ?>
|
998 |
+
* ```
|
999 |
+
*
|
1000 |
+
* To check that an element hasn't been assigned any one of many values, an array can be passed
|
1001 |
+
* as the value:
|
1002 |
+
*
|
1003 |
+
* ``` php
|
1004 |
+
* <?php
|
1005 |
+
* $I->dontSeeInFormFields('.form-class', [
|
1006 |
+
* 'fieldName' => [
|
1007 |
+
* 'This value shouldn\'t be set',
|
1008 |
+
* 'And this value shouldn\'t be set',
|
1009 |
+
* ],
|
1010 |
+
* ]);
|
1011 |
+
* ?>
|
1012 |
+
* ```
|
1013 |
+
*
|
1014 |
+
* Additionally, checkbox values can be checked with a boolean.
|
1015 |
+
*
|
1016 |
+
* ``` php
|
1017 |
+
* <?php
|
1018 |
+
* $I->dontSeeInFormFields('#form-id', [
|
1019 |
+
* 'checkbox1' => true, // fails if checked
|
1020 |
+
* 'checkbox2' => false, // fails if unchecked
|
1021 |
+
* ]);
|
1022 |
+
* ?>
|
1023 |
+
* ```
|
1024 |
+
*
|
1025 |
+
* @param $formSelector
|
1026 |
+
* @param $params
|
1027 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1028 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
|
1029 |
+
*/
|
1030 |
+
public function cantSeeInFormFields($formSelector, $params) {
|
1031 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args()));
|
1032 |
+
}
|
1033 |
+
/**
|
1034 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1035 |
+
*
|
1036 |
+
* Checks if the array of form parameters (name => value) are not set on the form matched with
|
1037 |
+
* the passed selector.
|
1038 |
+
*
|
1039 |
+
* ``` php
|
1040 |
+
* <?php
|
1041 |
+
* $I->dontSeeInFormFields('form[name=myform]', [
|
1042 |
+
* 'input1' => 'non-existent value',
|
1043 |
+
* 'input2' => 'other non-existent value',
|
1044 |
+
* ]);
|
1045 |
+
* ?>
|
1046 |
+
* ```
|
1047 |
+
*
|
1048 |
+
* To check that an element hasn't been assigned any one of many values, an array can be passed
|
1049 |
+
* as the value:
|
1050 |
+
*
|
1051 |
+
* ``` php
|
1052 |
+
* <?php
|
1053 |
+
* $I->dontSeeInFormFields('.form-class', [
|
1054 |
+
* 'fieldName' => [
|
1055 |
+
* 'This value shouldn\'t be set',
|
1056 |
+
* 'And this value shouldn\'t be set',
|
1057 |
+
* ],
|
1058 |
+
* ]);
|
1059 |
+
* ?>
|
1060 |
+
* ```
|
1061 |
+
*
|
1062 |
+
* Additionally, checkbox values can be checked with a boolean.
|
1063 |
+
*
|
1064 |
+
* ``` php
|
1065 |
+
* <?php
|
1066 |
+
* $I->dontSeeInFormFields('#form-id', [
|
1067 |
+
* 'checkbox1' => true, // fails if checked
|
1068 |
+
* 'checkbox2' => false, // fails if unchecked
|
1069 |
+
* ]);
|
1070 |
+
* ?>
|
1071 |
+
* ```
|
1072 |
+
*
|
1073 |
+
* @param $formSelector
|
1074 |
+
* @param $params
|
1075 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
|
1076 |
+
*/
|
1077 |
+
public function dontSeeInFormFields($formSelector, $params) {
|
1078 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args()));
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
|
1082 |
+
/**
|
1083 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1084 |
+
*
|
1085 |
+
* Submits the given form on the page, optionally with the given form values.
|
1086 |
+
* Give the form fields values as an array.
|
1087 |
+
*
|
1088 |
+
* Skipped fields will be filled by their values from the page.
|
1089 |
+
* You don't need to click the 'Submit' button afterwards.
|
1090 |
+
* This command itself triggers the request to form's action.
|
1091 |
+
*
|
1092 |
+
* You can optionally specify what button's value to include
|
1093 |
+
* in the request with the last parameter as an alternative to
|
1094 |
+
* explicitly setting its value in the second parameter, as
|
1095 |
+
* button values are not otherwise included in the request.
|
1096 |
+
*
|
1097 |
+
* Examples:
|
1098 |
+
*
|
1099 |
+
* ``` php
|
1100 |
+
* <?php
|
1101 |
+
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
|
1102 |
+
* // or
|
1103 |
+
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'), 'submitButtonName');
|
1104 |
+
*
|
1105 |
+
* ```
|
1106 |
+
*
|
1107 |
+
* For example, given this sample "Sign Up" form:
|
1108 |
+
*
|
1109 |
+
* ``` html
|
1110 |
+
* <form action="/sign_up">
|
1111 |
+
* Login: <input type="text" name="user[login]" /><br/>
|
1112 |
+
* Password: <input type="password" name="user[password]" /><br/>
|
1113 |
+
* Do you agree to out terms? <input type="checkbox" name="user[agree]" /><br/>
|
1114 |
+
* Select pricing plan <select name="plan"><option value="1">Free</option><option value="2" selected="selected">Paid</option></select>
|
1115 |
+
* <input type="submit" name="submitButton" value="Submit" />
|
1116 |
+
* </form>
|
1117 |
+
* ```
|
1118 |
+
*
|
1119 |
+
* You could write the following to submit it:
|
1120 |
+
*
|
1121 |
+
* ``` php
|
1122 |
+
* <?php
|
1123 |
+
* $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)), 'submitButton');
|
1124 |
+
*
|
1125 |
+
* ```
|
1126 |
+
* Note that "2" will be the submitted value for the "plan" field, as it is the selected option.
|
1127 |
+
*
|
1128 |
+
* You can also emulate a JavaScript submission by not specifying any buttons in the third parameter to submitForm.
|
1129 |
+
*
|
1130 |
+
* ```php
|
1131 |
+
* <?php
|
1132 |
+
* $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
|
1133 |
+
*
|
1134 |
+
* ```
|
1135 |
+
*
|
1136 |
+
* Pair this with seeInFormFields for quick testing magic.
|
1137 |
+
*
|
1138 |
+
* ``` php
|
1139 |
+
* <?php
|
1140 |
+
* $form = [
|
1141 |
+
* 'field1' => 'value',
|
1142 |
+
* 'field2' => 'another value',
|
1143 |
+
* 'checkbox1' => true,
|
1144 |
+
* // ...
|
1145 |
+
* ];
|
1146 |
+
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
1147 |
+
* // $I->amOnPage('/path/to/form-page') may be needed
|
1148 |
+
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
1149 |
+
* ?>
|
1150 |
+
* ```
|
1151 |
+
*
|
1152 |
+
* Parameter values can be set to arrays for multiple input fields
|
1153 |
+
* of the same name, or multi-select combo boxes. For checkboxes,
|
1154 |
+
* either the string value can be used, or boolean values which will
|
1155 |
+
* be replaced by the checkbox's value in the DOM.
|
1156 |
+
*
|
1157 |
+
* ``` php
|
1158 |
+
* <?php
|
1159 |
+
* $I->submitForm('#my-form', [
|
1160 |
+
* 'field1' => 'value',
|
1161 |
+
* 'checkbox' => [
|
1162 |
+
* 'value of first checkbox',
|
1163 |
+
* 'value of second checkbox,
|
1164 |
+
* ],
|
1165 |
+
* 'otherCheckboxes' => [
|
1166 |
+
* true,
|
1167 |
+
* false,
|
1168 |
+
* false
|
1169 |
+
* ],
|
1170 |
+
* 'multiselect' => [
|
1171 |
+
* 'first option value',
|
1172 |
+
* 'second option value'
|
1173 |
+
* ]
|
1174 |
+
* ]);
|
1175 |
+
* ?>
|
1176 |
+
* ```
|
1177 |
+
*
|
1178 |
+
* Mixing string and boolean values for a checkbox's value is not
|
1179 |
+
* supported and may produce unexpected results.
|
1180 |
+
*
|
1181 |
+
* @param $selector
|
1182 |
+
* @param $params
|
1183 |
+
* @param $button
|
1184 |
+
* @see \Codeception\Lib\InnerBrowser::submitForm()
|
1185 |
+
*/
|
1186 |
+
public function submitForm($selector, $params, $button = null) {
|
1187 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
|
1191 |
+
/**
|
1192 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1193 |
+
*
|
1194 |
+
* Fills a text field or textarea with the given string.
|
1195 |
+
*
|
1196 |
+
* ``` php
|
1197 |
+
* <?php
|
1198 |
+
* $I->fillField("//input[@type='text']", "Hello World!");
|
1199 |
+
* $I->fillField(['name' => 'email'], 'jon@mail.com');
|
1200 |
+
* ?>
|
1201 |
+
* ```
|
1202 |
+
*
|
1203 |
+
* @param $field
|
1204 |
+
* @param $value
|
1205 |
+
* @see \Codeception\Lib\InnerBrowser::fillField()
|
1206 |
+
*/
|
1207 |
+
public function fillField($field, $value) {
|
1208 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('fillField', func_get_args()));
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
|
1212 |
+
/**
|
1213 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1214 |
+
*
|
1215 |
+
* Selects an option in a select tag or in radio button group.
|
1216 |
+
*
|
1217 |
+
* ``` php
|
1218 |
+
* <?php
|
1219 |
+
* $I->selectOption('form select[name=account]', 'Premium');
|
1220 |
+
* $I->selectOption('form input[name=payment]', 'Monthly');
|
1221 |
+
* $I->selectOption('//form/select[@name=account]', 'Monthly');
|
1222 |
+
* ?>
|
1223 |
+
* ```
|
1224 |
+
*
|
1225 |
+
* Provide an array for the second argument to select multiple options:
|
1226 |
+
*
|
1227 |
+
* ``` php
|
1228 |
+
* <?php
|
1229 |
+
* $I->selectOption('Which OS do you use?', array('Windows','Linux'));
|
1230 |
+
* ?>
|
1231 |
+
* ```
|
1232 |
+
*
|
1233 |
+
* @param $select
|
1234 |
+
* @param $option
|
1235 |
+
* @see \Codeception\Lib\InnerBrowser::selectOption()
|
1236 |
+
*/
|
1237 |
+
public function selectOption($select, $option) {
|
1238 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
|
1242 |
+
/**
|
1243 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1244 |
+
*
|
1245 |
+
* Ticks a checkbox. For radio buttons, use the `selectOption` method instead.
|
1246 |
+
*
|
1247 |
+
* ``` php
|
1248 |
+
* <?php
|
1249 |
+
* $I->checkOption('#agree');
|
1250 |
+
* ?>
|
1251 |
+
* ```
|
1252 |
+
*
|
1253 |
+
* @param $option
|
1254 |
+
* @see \Codeception\Lib\InnerBrowser::checkOption()
|
1255 |
+
*/
|
1256 |
+
public function checkOption($option) {
|
1257 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
|
1261 |
+
/**
|
1262 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1263 |
+
*
|
1264 |
+
* Unticks a checkbox.
|
1265 |
+
*
|
1266 |
+
* ``` php
|
1267 |
+
* <?php
|
1268 |
+
* $I->uncheckOption('#notify');
|
1269 |
+
* ?>
|
1270 |
+
* ```
|
1271 |
+
*
|
1272 |
+
* @param $option
|
1273 |
+
* @see \Codeception\Lib\InnerBrowser::uncheckOption()
|
1274 |
+
*/
|
1275 |
+
public function uncheckOption($option) {
|
1276 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
|
1280 |
+
/**
|
1281 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1282 |
+
*
|
1283 |
+
* Attaches a file relative to the Codeception data directory to the given file upload field.
|
1284 |
+
*
|
1285 |
+
* ``` php
|
1286 |
+
* <?php
|
1287 |
+
* // file is stored in 'tests/_data/prices.xls'
|
1288 |
+
* $I->attachFile('input[@type="file"]', 'prices.xls');
|
1289 |
+
* ?>
|
1290 |
+
* ```
|
1291 |
+
*
|
1292 |
+
* @param $field
|
1293 |
+
* @param $filename
|
1294 |
+
* @see \Codeception\Lib\InnerBrowser::attachFile()
|
1295 |
+
*/
|
1296 |
+
public function attachFile($field, $filename) {
|
1297 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));
|
1298 |
+
}
|
1299 |
+
|
1300 |
+
|
1301 |
+
/**
|
1302 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1303 |
+
*
|
1304 |
+
* If your page triggers an ajax request, you can perform it manually.
|
1305 |
+
* This action sends a GET ajax request with specified params.
|
1306 |
+
*
|
1307 |
+
* See ->sendAjaxPostRequest for examples.
|
1308 |
+
*
|
1309 |
+
* @param $uri
|
1310 |
+
* @param $params
|
1311 |
+
* @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
|
1312 |
+
*/
|
1313 |
+
public function sendAjaxGetRequest($uri, $params = null) {
|
1314 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
|
1318 |
+
/**
|
1319 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1320 |
+
*
|
1321 |
+
* If your page triggers an ajax request, you can perform it manually.
|
1322 |
+
* This action sends a POST ajax request with specified params.
|
1323 |
+
* Additional params can be passed as array.
|
1324 |
+
*
|
1325 |
+
* Example:
|
1326 |
+
*
|
1327 |
+
* Imagine that by clicking checkbox you trigger ajax request which updates user settings.
|
1328 |
+
* We emulate that click by running this ajax request manually.
|
1329 |
+
*
|
1330 |
+
* ``` php
|
1331 |
+
* <?php
|
1332 |
+
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
|
1333 |
+
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
|
1334 |
+
*
|
1335 |
+
* ```
|
1336 |
+
*
|
1337 |
+
* @param $uri
|
1338 |
+
* @param $params
|
1339 |
+
* @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
|
1340 |
+
*/
|
1341 |
+
public function sendAjaxPostRequest($uri, $params = null) {
|
1342 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
|
1346 |
+
/**
|
1347 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1348 |
+
*
|
1349 |
+
* If your page triggers an ajax request, you can perform it manually.
|
1350 |
+
* This action sends an ajax request with specified method and params.
|
1351 |
+
*
|
1352 |
+
* Example:
|
1353 |
+
*
|
1354 |
+
* You need to perform an ajax request specifying the HTTP method.
|
1355 |
+
*
|
1356 |
+
* ``` php
|
1357 |
+
* <?php
|
1358 |
+
* $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
|
1359 |
+
*
|
1360 |
+
* ```
|
1361 |
+
*
|
1362 |
+
* @param $method
|
1363 |
+
* @param $uri
|
1364 |
+
* @param $params
|
1365 |
+
* @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()
|
1366 |
+
*/
|
1367 |
+
public function sendAjaxRequest($method, $uri, $params = null) {
|
1368 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
|
1372 |
+
/**
|
1373 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1374 |
+
*
|
1375 |
+
* Finds and returns the text contents of the given element.
|
1376 |
+
* If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression.
|
1377 |
+
*
|
1378 |
+
* ``` php
|
1379 |
+
* <?php
|
1380 |
+
* $heading = $I->grabTextFrom('h1');
|
1381 |
+
* $heading = $I->grabTextFrom('descendant-or-self::h1');
|
1382 |
+
* $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
|
1383 |
+
* ?>
|
1384 |
+
* ```
|
1385 |
+
*
|
1386 |
+
* @param $cssOrXPathOrRegex
|
1387 |
+
*
|
1388 |
+
* @return mixed
|
1389 |
+
* @see \Codeception\Lib\InnerBrowser::grabTextFrom()
|
1390 |
+
*/
|
1391 |
+
public function grabTextFrom($cssOrXPathOrRegex) {
|
1392 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
|
1393 |
+
}
|
1394 |
+
|
1395 |
+
|
1396 |
+
/**
|
1397 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1398 |
+
*
|
1399 |
+
* Grabs the value of the given attribute value from the given element.
|
1400 |
+
* Fails if element is not found.
|
1401 |
+
*
|
1402 |
+
* ``` php
|
1403 |
+
* <?php
|
1404 |
+
* $I->grabAttributeFrom('#tooltip', 'title');
|
1405 |
+
* ?>
|
1406 |
+
* ```
|
1407 |
+
*
|
1408 |
+
*
|
1409 |
+
* @param $cssOrXpath
|
1410 |
+
* @param $attribute
|
1411 |
+
* @internal param $element
|
1412 |
+
* @return mixed
|
1413 |
+
* @see \Codeception\Lib\InnerBrowser::grabAttributeFrom()
|
1414 |
+
*/
|
1415 |
+
public function grabAttributeFrom($cssOrXpath, $attribute) {
|
1416 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
|
1420 |
+
/**
|
1421 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1422 |
+
*
|
1423 |
+
* @param $field
|
1424 |
+
*
|
1425 |
+
* @return array|mixed|null|string
|
1426 |
+
* @see \Codeception\Lib\InnerBrowser::grabValueFrom()
|
1427 |
+
*/
|
1428 |
+
public function grabValueFrom($field) {
|
1429 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
|
1433 |
+
/**
|
1434 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1435 |
+
*
|
1436 |
+
* Sets a cookie with the given name and value.
|
1437 |
+
* You can set additional cookie params like `domain`, `path`, `expire`, `secure` in array passed as last argument.
|
1438 |
+
*
|
1439 |
+
* ``` php
|
1440 |
+
* <?php
|
1441 |
+
* $I->setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3');
|
1442 |
+
* ?>
|
1443 |
+
* ```
|
1444 |
+
*
|
1445 |
+
* @param $name
|
1446 |
+
* @param $val
|
1447 |
+
* @param array $params
|
1448 |
+
* @internal param $cookie
|
1449 |
+
* @internal param $value
|
1450 |
+
*
|
1451 |
+
* @return mixed
|
1452 |
+
* @see \Codeception\Lib\InnerBrowser::setCookie()
|
1453 |
+
*/
|
1454 |
+
public function setCookie($name, $val, $params = null) {
|
1455 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
|
1459 |
+
/**
|
1460 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1461 |
+
*
|
1462 |
+
* Grabs a cookie value.
|
1463 |
+
* You can set additional cookie params like `domain`, `path` in array passed as last argument.
|
1464 |
+
*
|
1465 |
+
* @param $cookie
|
1466 |
+
*
|
1467 |
+
* @param array $params
|
1468 |
+
* @return mixed
|
1469 |
+
* @see \Codeception\Lib\InnerBrowser::grabCookie()
|
1470 |
+
*/
|
1471 |
+
public function grabCookie($name, $params = null) {
|
1472 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
|
1476 |
+
/**
|
1477 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1478 |
+
*
|
1479 |
+
* Checks that a cookie with the given name is set.
|
1480 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1481 |
+
*
|
1482 |
+
* ``` php
|
1483 |
+
* <?php
|
1484 |
+
* $I->seeCookie('PHPSESSID');
|
1485 |
+
* ?>
|
1486 |
+
* ```
|
1487 |
+
*
|
1488 |
+
* @param $cookie
|
1489 |
+
* @param array $params
|
1490 |
+
* @return mixed
|
1491 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1492 |
+
* @see \Codeception\Lib\InnerBrowser::seeCookie()
|
1493 |
+
*/
|
1494 |
+
public function canSeeCookie($name, $params = null) {
|
1495 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
|
1496 |
+
}
|
1497 |
+
/**
|
1498 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1499 |
+
*
|
1500 |
+
* Checks that a cookie with the given name is set.
|
1501 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1502 |
+
*
|
1503 |
+
* ``` php
|
1504 |
+
* <?php
|
1505 |
+
* $I->seeCookie('PHPSESSID');
|
1506 |
+
* ?>
|
1507 |
+
* ```
|
1508 |
+
*
|
1509 |
+
* @param $cookie
|
1510 |
+
* @param array $params
|
1511 |
+
* @return mixed
|
1512 |
+
* @see \Codeception\Lib\InnerBrowser::seeCookie()
|
1513 |
+
*/
|
1514 |
+
public function seeCookie($name, $params = null) {
|
1515 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
|
1516 |
+
}
|
1517 |
+
|
1518 |
+
|
1519 |
+
/**
|
1520 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1521 |
+
*
|
1522 |
+
* Checks that there isn't a cookie with the given name.
|
1523 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1524 |
+
*
|
1525 |
+
* @param $cookie
|
1526 |
+
*
|
1527 |
+
* @param array $params
|
1528 |
+
* @return mixed
|
1529 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1530 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
|
1531 |
+
*/
|
1532 |
+
public function cantSeeCookie($name, $params = null) {
|
1533 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
|
1534 |
+
}
|
1535 |
+
/**
|
1536 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1537 |
+
*
|
1538 |
+
* Checks that there isn't a cookie with the given name.
|
1539 |
+
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1540 |
+
*
|
1541 |
+
* @param $cookie
|
1542 |
+
*
|
1543 |
+
* @param array $params
|
1544 |
+
* @return mixed
|
1545 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
|
1546 |
+
*/
|
1547 |
+
public function dontSeeCookie($name, $params = null) {
|
1548 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
|
1549 |
+
}
|
1550 |
+
|
1551 |
+
|
1552 |
+
/**
|
1553 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1554 |
+
*
|
1555 |
+
* Unsets cookie with the given name.
|
1556 |
+
* You can set additional cookie params like `domain`, `path` in array passed as last argument.
|
1557 |
+
*
|
1558 |
+
* @param $cookie
|
1559 |
+
*
|
1560 |
+
* @param array $params
|
1561 |
+
* @return mixed
|
1562 |
+
* @see \Codeception\Lib\InnerBrowser::resetCookie()
|
1563 |
+
*/
|
1564 |
+
public function resetCookie($name, $params = null) {
|
1565 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
|
1566 |
+
}
|
1567 |
+
|
1568 |
+
|
1569 |
+
/**
|
1570 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1571 |
+
*
|
1572 |
+
* Checks that the given element exists on the page and is visible.
|
1573 |
+
* You can also specify expected attributes of this element.
|
1574 |
+
*
|
1575 |
+
* ``` php
|
1576 |
+
* <?php
|
1577 |
+
* $I->seeElement('.error');
|
1578 |
+
* $I->seeElement('//form/input[1]');
|
1579 |
+
* $I->seeElement('input', ['name' => 'login']);
|
1580 |
+
* $I->seeElement('input', ['value' => '123456']);
|
1581 |
+
*
|
1582 |
+
* // strict locator in first arg, attributes in second
|
1583 |
+
* $I->seeElement(['css' => 'form input'], ['name' => 'login']);
|
1584 |
+
* ?>
|
1585 |
+
* ```
|
1586 |
+
*
|
1587 |
+
* @param $selector
|
1588 |
+
* @param array $attributes
|
1589 |
+
* @return
|
1590 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1591 |
+
* @see \Codeception\Lib\InnerBrowser::seeElement()
|
1592 |
+
*/
|
1593 |
+
public function canSeeElement($selector, $attributes = null) {
|
1594 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
|
1595 |
+
}
|
1596 |
+
/**
|
1597 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1598 |
+
*
|
1599 |
+
* Checks that the given element exists on the page and is visible.
|
1600 |
+
* You can also specify expected attributes of this element.
|
1601 |
+
*
|
1602 |
+
* ``` php
|
1603 |
+
* <?php
|
1604 |
+
* $I->seeElement('.error');
|
1605 |
+
* $I->seeElement('//form/input[1]');
|
1606 |
+
* $I->seeElement('input', ['name' => 'login']);
|
1607 |
+
* $I->seeElement('input', ['value' => '123456']);
|
1608 |
+
*
|
1609 |
+
* // strict locator in first arg, attributes in second
|
1610 |
+
* $I->seeElement(['css' => 'form input'], ['name' => 'login']);
|
1611 |
+
* ?>
|
1612 |
+
* ```
|
1613 |
+
*
|
1614 |
+
* @param $selector
|
1615 |
+
* @param array $attributes
|
1616 |
+
* @return
|
1617 |
+
* @see \Codeception\Lib\InnerBrowser::seeElement()
|
1618 |
+
*/
|
1619 |
+
public function seeElement($selector, $attributes = null) {
|
1620 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
|
1621 |
+
}
|
1622 |
+
|
1623 |
+
|
1624 |
+
/**
|
1625 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1626 |
+
*
|
1627 |
+
* Checks that the given element is invisible or not present on the page.
|
1628 |
+
* You can also specify expected attributes of this element.
|
1629 |
+
*
|
1630 |
+
* ``` php
|
1631 |
+
* <?php
|
1632 |
+
* $I->dontSeeElement('.error');
|
1633 |
+
* $I->dontSeeElement('//form/input[1]');
|
1634 |
+
* $I->dontSeeElement('input', ['name' => 'login']);
|
1635 |
+
* $I->dontSeeElement('input', ['value' => '123456']);
|
1636 |
+
* ?>
|
1637 |
+
* ```
|
1638 |
+
*
|
1639 |
+
* @param $selector
|
1640 |
+
* @param array $attributes
|
1641 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1642 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeElement()
|
1643 |
+
*/
|
1644 |
+
public function cantSeeElement($selector, $attributes = null) {
|
1645 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
|
1646 |
+
}
|
1647 |
+
/**
|
1648 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1649 |
+
*
|
1650 |
+
* Checks that the given element is invisible or not present on the page.
|
1651 |
+
* You can also specify expected attributes of this element.
|
1652 |
+
*
|
1653 |
+
* ``` php
|
1654 |
+
* <?php
|
1655 |
+
* $I->dontSeeElement('.error');
|
1656 |
+
* $I->dontSeeElement('//form/input[1]');
|
1657 |
+
* $I->dontSeeElement('input', ['name' => 'login']);
|
1658 |
+
* $I->dontSeeElement('input', ['value' => '123456']);
|
1659 |
+
* ?>
|
1660 |
+
* ```
|
1661 |
+
*
|
1662 |
+
* @param $selector
|
1663 |
+
* @param array $attributes
|
1664 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeElement()
|
1665 |
+
*/
|
1666 |
+
public function dontSeeElement($selector, $attributes = null) {
|
1667 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
|
1668 |
+
}
|
1669 |
+
|
1670 |
+
|
1671 |
+
/**
|
1672 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1673 |
+
*
|
1674 |
+
* Checks that there are a certain number of elements matched by the given locator on the page.
|
1675 |
+
*
|
1676 |
+
* ``` php
|
1677 |
+
* <?php
|
1678 |
+
* $I->seeNumberOfElements('tr', 10);
|
1679 |
+
* $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
|
1680 |
+
* ?>
|
1681 |
+
* ```
|
1682 |
+
* @param $selector
|
1683 |
+
* @param mixed $expected:
|
1684 |
+
* - string: strict number
|
1685 |
+
* - array: range of numbers [0,10]
|
1686 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1687 |
+
* @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
|
1688 |
+
*/
|
1689 |
+
public function canSeeNumberOfElements($selector, $expected) {
|
1690 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));
|
1691 |
+
}
|
1692 |
+
/**
|
1693 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1694 |
+
*
|
1695 |
+
* Checks that there are a certain number of elements matched by the given locator on the page.
|
1696 |
+
*
|
1697 |
+
* ``` php
|
1698 |
+
* <?php
|
1699 |
+
* $I->seeNumberOfElements('tr', 10);
|
1700 |
+
* $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
|
1701 |
+
* ?>
|
1702 |
+
* ```
|
1703 |
+
* @param $selector
|
1704 |
+
* @param mixed $expected:
|
1705 |
+
* - string: strict number
|
1706 |
+
* - array: range of numbers [0,10]
|
1707 |
+
* @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
|
1708 |
+
*/
|
1709 |
+
public function seeNumberOfElements($selector, $expected) {
|
1710 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));
|
1711 |
+
}
|
1712 |
+
|
1713 |
+
|
1714 |
+
/**
|
1715 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1716 |
+
*
|
1717 |
+
* Checks that the given option is selected.
|
1718 |
+
*
|
1719 |
+
* ``` php
|
1720 |
+
* <?php
|
1721 |
+
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1722 |
+
* ?>
|
1723 |
+
* ```
|
1724 |
+
*
|
1725 |
+
* @param $selector
|
1726 |
+
* @param $optionText
|
1727 |
+
*
|
1728 |
+
* @return mixed
|
1729 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1730 |
+
* @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
|
1731 |
+
*/
|
1732 |
+
public function canSeeOptionIsSelected($select, $optionText) {
|
1733 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
|
1734 |
+
}
|
1735 |
+
/**
|
1736 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1737 |
+
*
|
1738 |
+
* Checks that the given option is selected.
|
1739 |
+
*
|
1740 |
+
* ``` php
|
1741 |
+
* <?php
|
1742 |
+
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1743 |
+
* ?>
|
1744 |
+
* ```
|
1745 |
+
*
|
1746 |
+
* @param $selector
|
1747 |
+
* @param $optionText
|
1748 |
+
*
|
1749 |
+
* @return mixed
|
1750 |
+
* @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
|
1751 |
+
*/
|
1752 |
+
public function seeOptionIsSelected($select, $optionText) {
|
1753 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
|
1757 |
+
/**
|
1758 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1759 |
+
*
|
1760 |
+
* Checks that the given option is not selected.
|
1761 |
+
*
|
1762 |
+
* ``` php
|
1763 |
+
* <?php
|
1764 |
+
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1765 |
+
* ?>
|
1766 |
+
* ```
|
1767 |
+
*
|
1768 |
+
* @param $selector
|
1769 |
+
* @param $optionText
|
1770 |
+
*
|
1771 |
+
* @return mixed
|
1772 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1773 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
|
1774 |
+
*/
|
1775 |
+
public function cantSeeOptionIsSelected($select, $optionText) {
|
1776 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
|
1777 |
+
}
|
1778 |
+
/**
|
1779 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1780 |
+
*
|
1781 |
+
* Checks that the given option is not selected.
|
1782 |
+
*
|
1783 |
+
* ``` php
|
1784 |
+
* <?php
|
1785 |
+
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1786 |
+
* ?>
|
1787 |
+
* ```
|
1788 |
+
*
|
1789 |
+
* @param $selector
|
1790 |
+
* @param $optionText
|
1791 |
+
*
|
1792 |
+
* @return mixed
|
1793 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
|
1794 |
+
*/
|
1795 |
+
public function dontSeeOptionIsSelected($select, $optionText) {
|
1796 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
|
1800 |
+
/**
|
1801 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1802 |
+
*
|
1803 |
+
* Asserts that current page has 404 response status code.
|
1804 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1805 |
+
* @see \Codeception\Lib\InnerBrowser::seePageNotFound()
|
1806 |
+
*/
|
1807 |
+
public function canSeePageNotFound() {
|
1808 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));
|
1809 |
+
}
|
1810 |
+
/**
|
1811 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1812 |
+
*
|
1813 |
+
* Asserts that current page has 404 response status code.
|
1814 |
+
* @see \Codeception\Lib\InnerBrowser::seePageNotFound()
|
1815 |
+
*/
|
1816 |
+
public function seePageNotFound() {
|
1817 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));
|
1818 |
+
}
|
1819 |
+
|
1820 |
+
|
1821 |
+
/**
|
1822 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1823 |
+
*
|
1824 |
+
* Checks that response code is equal to value provided.
|
1825 |
+
*
|
1826 |
+
* @param $code
|
1827 |
+
*
|
1828 |
+
* @return mixed
|
1829 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1830 |
+
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
|
1831 |
+
*/
|
1832 |
+
public function canSeeResponseCodeIs($code) {
|
1833 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));
|
1834 |
+
}
|
1835 |
+
/**
|
1836 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1837 |
+
*
|
1838 |
+
* Checks that response code is equal to value provided.
|
1839 |
+
*
|
1840 |
+
* @param $code
|
1841 |
+
*
|
1842 |
+
* @return mixed
|
1843 |
+
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
|
1844 |
+
*/
|
1845 |
+
public function seeResponseCodeIs($code) {
|
1846 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));
|
1847 |
+
}
|
1848 |
+
|
1849 |
+
|
1850 |
+
/**
|
1851 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1852 |
+
*
|
1853 |
+
* Checks that the page title contains the given string.
|
1854 |
+
*
|
1855 |
+
* ``` php
|
1856 |
+
* <?php
|
1857 |
+
* $I->seeInTitle('Blog - Post #1');
|
1858 |
+
* ?>
|
1859 |
+
* ```
|
1860 |
+
*
|
1861 |
+
* @param $title
|
1862 |
+
*
|
1863 |
+
* @return mixed
|
1864 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1865 |
+
* @see \Codeception\Lib\InnerBrowser::seeInTitle()
|
1866 |
+
*/
|
1867 |
+
public function canSeeInTitle($title) {
|
1868 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
|
1869 |
+
}
|
1870 |
+
/**
|
1871 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1872 |
+
*
|
1873 |
+
* Checks that the page title contains the given string.
|
1874 |
+
*
|
1875 |
+
* ``` php
|
1876 |
+
* <?php
|
1877 |
+
* $I->seeInTitle('Blog - Post #1');
|
1878 |
+
* ?>
|
1879 |
+
* ```
|
1880 |
+
*
|
1881 |
+
* @param $title
|
1882 |
+
*
|
1883 |
+
* @return mixed
|
1884 |
+
* @see \Codeception\Lib\InnerBrowser::seeInTitle()
|
1885 |
+
*/
|
1886 |
+
public function seeInTitle($title) {
|
1887 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
|
1888 |
+
}
|
1889 |
+
|
1890 |
+
|
1891 |
+
/**
|
1892 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1893 |
+
*
|
1894 |
+
* Checks that the page title does not contain the given string.
|
1895 |
+
*
|
1896 |
+
* @param $title
|
1897 |
+
*
|
1898 |
+
* @return mixed
|
1899 |
+
* Conditional Assertion: Test won't be stopped on fail
|
1900 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
|
1901 |
+
*/
|
1902 |
+
public function cantSeeInTitle($title) {
|
1903 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
|
1904 |
+
}
|
1905 |
+
/**
|
1906 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
1907 |
+
*
|
1908 |
+
* Checks that the page title does not contain the given string.
|
1909 |
+
*
|
1910 |
+
* @param $title
|
1911 |
+
*
|
1912 |
+
* @return mixed
|
1913 |
+
* @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
|
1914 |
+
*/
|
1915 |
+
public function dontSeeInTitle($title) {
|
1916 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
|
1917 |
+
}
|
1918 |
+
}
|
assets/tests/codeception/acceptance/LoginCept.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* - login
|
4 |
+
* - navigate to plugins
|
5 |
+
* - verify landing pages is installed
|
6 |
+
* - deactivate landing pages
|
7 |
+
* - activate landing pages
|
8 |
+
* - confirm welcome page shows
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
$I = new AcceptanceTester($scenario);
|
14 |
+
|
15 |
+
|
16 |
+
$I->wantTo('login to wp-admin');
|
17 |
+
$I->amOnPage( site_url().'/wp-login.php' );
|
18 |
+
$I->fillField('Username', 'admin');
|
19 |
+
$I->fillField('Password','admin');
|
20 |
+
$I->click('Log In');
|
21 |
+
$I->see('Dashboard');
|
22 |
+
|
23 |
+
|
24 |
+
$I->wantTo('Navigate to plugins');
|
25 |
+
$I->click( [ 'link' => 'Installed Plugins']);
|
26 |
+
$I->see('Plugins');
|
27 |
+
$I->see('Landing Pages');
|
28 |
+
$I->see('Calls to Action');
|
29 |
+
$I->see('Leads');
|
30 |
+
|
31 |
+
$I->wantTo('Verify landing pages is installed');
|
32 |
+
|
33 |
+
$I->click( '.active a');
|
34 |
+
$I->see('Landing Pages');
|
35 |
+
$I->seePluginActivated('landing-pages');
|
36 |
+
$I->seePluginActivated('calls-to-action');
|
37 |
+
$I->seePluginActivated('leads');
|
38 |
+
|
39 |
+
$I->wantTo('Deactivate Landing Pages');
|
40 |
+
$I->deactivatePlugin( 'landing-pages');
|
41 |
+
$I->seePluginDeactivated('landing-pages');
|
42 |
+
|
43 |
+
$I->wantTo('Reactivate Landing Pages');
|
44 |
+
$I->activatePlugin( 'landing-pages');
|
45 |
+
|
46 |
+
$I->wantTo('Confirm welcome page');
|
47 |
+
$I->see('Welcome to WordPress Landing Pages ');
|
48 |
+
|
assets/tests/codeception/acceptance/StatisticsCept.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This test is desnged to test the impressions/conversions systems of landing pages.
|
4 |
+
* Systems tested:
|
5 |
+
* [x] Login to WordPress
|
6 |
+
* [x] Navigate to Landing Pages
|
7 |
+
* [x] Open example landing page
|
8 |
+
* [x] Check if impression/conversion UI display on landing page edit screen
|
9 |
+
* [ ] Reset impressions/conversions and refresh page
|
10 |
+
* [ ] Make sure stats read 0
|
11 |
+
* [ ] Open landing page and make sure it does not 404
|
12 |
+
* [ ] Refresh landing page and make sure variation 2 loads
|
13 |
+
* [ ] Submit test conversion on variation 2
|
14 |
+
* [ ] Navigate back to edit page and make sure stats read correctly
|
15 |
+
*/
|
16 |
+
|
17 |
+
$I = new AcceptanceTester($scenario);
|
18 |
+
|
19 |
+
$I->wantTo('login to wp-admin');
|
20 |
+
$I->amOnPage( site_url().'/wp-login.php' );
|
21 |
+
$I->fillField('Username', 'admin');
|
22 |
+
$I->fillField('Password','admin');
|
23 |
+
$I->click('Log In');
|
24 |
+
$I->see('Dashboard');
|
25 |
+
|
26 |
+
$I->wantTo('Navigate to landing pages list');
|
27 |
+
$I->click('Landing Pages');
|
28 |
+
$I->amOnPage( admin_url( 'edit.php?post_type=landing-page') );
|
29 |
+
$I->see( 'Landing Pages');
|
30 |
+
|
31 |
+
$I->wantTo('Open example landing page');
|
32 |
+
$I->click( [ 'link' => 'A/B Testing Landing Page Example']);
|
33 |
+
$I->wantTo('check if impressions are correct for variation a');
|
34 |
+
$imp = $I->grabTextFrom('#lp-variation-A .bab-stat-span-impressions');
|
35 |
+
$I->assertContains( '30' , $imp );
|
36 |
+
|
37 |
+
$I->wantTo('check check impressions for variation b');
|
38 |
+
$imp = $I->grabTextFrom('#lp-variation-B .bab-stat-span-impressions');
|
39 |
+
$I->assertContains( '35' , $imp , '' );
|
40 |
+
|
41 |
+
$I->wantTo('check conversions for variation a');
|
42 |
+
$con = $I->grabTextFrom('#lp-variation-A .bab-stat-span-conversions');
|
43 |
+
$I->assertContains( '10' , $con , '' );
|
44 |
+
|
45 |
+
$I->wantTo('check conversions for variation b');
|
46 |
+
$con = $I->grabTextFrom('#lp-variation-B .bab-stat-span-conversions');
|
47 |
+
$I->assertContains( '15' , $con );
|
48 |
+
|
49 |
+
$I->wantTo('check the conversion rate of variation a');
|
50 |
+
$per = $I->grabTextFrom('#lp-variation-A .bab-stat-span-conversion_rate');
|
51 |
+
$I->assertContains( '33' , $per );
|
52 |
+
|
53 |
+
$I->wantTo('check the conversion rate of variation b');
|
54 |
+
$per = $I->grabTextFrom('#lp-variation-B .bab-stat-span-conversion_rate');
|
55 |
+
$I->assertContains( '42.86' , $per );
|
assets/tests/codeception/acceptance/WelcomeCept.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$I = new AcceptanceTester($scenario);
|
4 |
+
$I->wantTo('Make sure the default WordPress homepage loads.');
|
5 |
+
$I->amOnPage( site_url() );
|
6 |
+
$I->see('Hello world!');
|
7 |
+
|
assets/tests/codeception/acceptance/_bootstrap.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Here you can initialize variables that will be available to your tests
|
assets/tests/codeception/functional/FunctionalTester.php
ADDED
@@ -0,0 +1,360 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //[STAMP] fa259e6277a310881c0cdeb89563ce4c
|
2 |
+
|
3 |
+
// This class was automatically generated by build task
|
4 |
+
// You should not change it manually as it will be overwritten on next build
|
5 |
+
// @codingStandardsIgnoreFile
|
6 |
+
|
7 |
+
|
8 |
+
use Codeception\Module\Filesystem;
|
9 |
+
use Codeception\Module\FunctionalHelper;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Inherited Methods
|
13 |
+
* @method void wantToTest($text)
|
14 |
+
* @method void wantTo($text)
|
15 |
+
* @method void execute($callable)
|
16 |
+
* @method void expectTo($prediction)
|
17 |
+
* @method void expect($prediction)
|
18 |
+
* @method void amGoingTo($argumentation)
|
19 |
+
* @method void am($role)
|
20 |
+
* @method void lookForwardTo($achieveValue)
|
21 |
+
* @method void comment($description)
|
22 |
+
* @method void haveFriend($name, $actorClass = null)
|
23 |
+
*
|
24 |
+
* @SuppressWarnings(PHPMD)
|
25 |
+
*/
|
26 |
+
class FunctionalTester extends \Codeception\Actor
|
27 |
+
{
|
28 |
+
|
29 |
+
/**
|
30 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
31 |
+
*
|
32 |
+
* Enters a directory In local filesystem.
|
33 |
+
* Project root directory is used by default
|
34 |
+
*
|
35 |
+
* @param $path
|
36 |
+
* @see \Codeception\Module\Filesystem::amInPath()
|
37 |
+
*/
|
38 |
+
public function amInPath($path) {
|
39 |
+
return $this->scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
45 |
+
*
|
46 |
+
* Opens a file and stores it's content.
|
47 |
+
*
|
48 |
+
* Usage:
|
49 |
+
*
|
50 |
+
* ``` php
|
51 |
+
* <?php
|
52 |
+
* $I->openFile('composer.json');
|
53 |
+
* $I->seeInThisFile('codeception/codeception');
|
54 |
+
* ?>
|
55 |
+
* ```
|
56 |
+
*
|
57 |
+
* @param $filename
|
58 |
+
* @see \Codeception\Module\Filesystem::openFile()
|
59 |
+
*/
|
60 |
+
public function openFile($filename) {
|
61 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args()));
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
67 |
+
*
|
68 |
+
* Deletes a file
|
69 |
+
*
|
70 |
+
* ``` php
|
71 |
+
* <?php
|
72 |
+
* $I->deleteFile('composer.lock');
|
73 |
+
* ?>
|
74 |
+
* ```
|
75 |
+
*
|
76 |
+
* @param $filename
|
77 |
+
* @see \Codeception\Module\Filesystem::deleteFile()
|
78 |
+
*/
|
79 |
+
public function deleteFile($filename) {
|
80 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
86 |
+
*
|
87 |
+
* Deletes directory with all subdirectories
|
88 |
+
*
|
89 |
+
* ``` php
|
90 |
+
* <?php
|
91 |
+
* $I->deleteDir('vendor');
|
92 |
+
* ?>
|
93 |
+
* ```
|
94 |
+
*
|
95 |
+
* @param $dirname
|
96 |
+
* @see \Codeception\Module\Filesystem::deleteDir()
|
97 |
+
*/
|
98 |
+
public function deleteDir($dirname) {
|
99 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
/**
|
104 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
105 |
+
*
|
106 |
+
* Copies directory with all contents
|
107 |
+
*
|
108 |
+
* ``` php
|
109 |
+
* <?php
|
110 |
+
* $I->copyDir('vendor','old_vendor');
|
111 |
+
* ?>
|
112 |
+
* ```
|
113 |
+
*
|
114 |
+
* @param $src
|
115 |
+
* @param $dst
|
116 |
+
* @see \Codeception\Module\Filesystem::copyDir()
|
117 |
+
*/
|
118 |
+
public function copyDir($src, $dst) {
|
119 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
+
/**
|
124 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
125 |
+
*
|
126 |
+
* Checks If opened file has `text` in it.
|
127 |
+
*
|
128 |
+
* Usage:
|
129 |
+
*
|
130 |
+
* ``` php
|
131 |
+
* <?php
|
132 |
+
* $I->openFile('composer.json');
|
133 |
+
* $I->seeInThisFile('codeception/codeception');
|
134 |
+
* ?>
|
135 |
+
* ```
|
136 |
+
*
|
137 |
+
* @param $text
|
138 |
+
* Conditional Assertion: Test won't be stopped on fail
|
139 |
+
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
140 |
+
*/
|
141 |
+
public function canSeeInThisFile($text) {
|
142 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));
|
143 |
+
}
|
144 |
+
/**
|
145 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
146 |
+
*
|
147 |
+
* Checks If opened file has `text` in it.
|
148 |
+
*
|
149 |
+
* Usage:
|
150 |
+
*
|
151 |
+
* ``` php
|
152 |
+
* <?php
|
153 |
+
* $I->openFile('composer.json');
|
154 |
+
* $I->seeInThisFile('codeception/codeception');
|
155 |
+
* ?>
|
156 |
+
* ```
|
157 |
+
*
|
158 |
+
* @param $text
|
159 |
+
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
160 |
+
*/
|
161 |
+
public function seeInThisFile($text) {
|
162 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));
|
163 |
+
}
|
164 |
+
|
165 |
+
|
166 |
+
/**
|
167 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
168 |
+
*
|
169 |
+
* Checks the strict matching of file contents.
|
170 |
+
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
171 |
+
* Better to use with HEREDOC strings.
|
172 |
+
* Matching is done after removing "\r" chars from file content.
|
173 |
+
*
|
174 |
+
* ``` php
|
175 |
+
* <?php
|
176 |
+
* $I->openFile('process.pid');
|
177 |
+
* $I->seeFileContentsEqual('3192');
|
178 |
+
* ?>
|
179 |
+
* ```
|
180 |
+
*
|
181 |
+
* @param $text
|
182 |
+
* Conditional Assertion: Test won't be stopped on fail
|
183 |
+
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
184 |
+
*/
|
185 |
+
public function canSeeFileContentsEqual($text) {
|
186 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));
|
187 |
+
}
|
188 |
+
/**
|
189 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
190 |
+
*
|
191 |
+
* Checks the strict matching of file contents.
|
192 |
+
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
193 |
+
* Better to use with HEREDOC strings.
|
194 |
+
* Matching is done after removing "\r" chars from file content.
|
195 |
+
*
|
196 |
+
* ``` php
|
197 |
+
* <?php
|
198 |
+
* $I->openFile('process.pid');
|
199 |
+
* $I->seeFileContentsEqual('3192');
|
200 |
+
* ?>
|
201 |
+
* ```
|
202 |
+
*
|
203 |
+
* @param $text
|
204 |
+
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
205 |
+
*/
|
206 |
+
public function seeFileContentsEqual($text) {
|
207 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
/**
|
212 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
213 |
+
*
|
214 |
+
* Checks If opened file doesn't contain `text` in it
|
215 |
+
*
|
216 |
+
* ``` php
|
217 |
+
* <?php
|
218 |
+
* $I->openFile('composer.json');
|
219 |
+
* $I->dontSeeInThisFile('codeception/codeception');
|
220 |
+
* ?>
|
221 |
+
* ```
|
222 |
+
*
|
223 |
+
* @param $text
|
224 |
+
* Conditional Assertion: Test won't be stopped on fail
|
225 |
+
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
226 |
+
*/
|
227 |
+
public function cantSeeInThisFile($text) {
|
228 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));
|
229 |
+
}
|
230 |
+
/**
|
231 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
232 |
+
*
|
233 |
+
* Checks If opened file doesn't contain `text` in it
|
234 |
+
*
|
235 |
+
* ``` php
|
236 |
+
* <?php
|
237 |
+
* $I->openFile('composer.json');
|
238 |
+
* $I->dontSeeInThisFile('codeception/codeception');
|
239 |
+
* ?>
|
240 |
+
* ```
|
241 |
+
*
|
242 |
+
* @param $text
|
243 |
+
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
244 |
+
*/
|
245 |
+
public function dontSeeInThisFile($text) {
|
246 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));
|
247 |
+
}
|
248 |
+
|
249 |
+
|
250 |
+
/**
|
251 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
252 |
+
*
|
253 |
+
* Deletes a file
|
254 |
+
* @see \Codeception\Module\Filesystem::deleteThisFile()
|
255 |
+
*/
|
256 |
+
public function deleteThisFile() {
|
257 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));
|
258 |
+
}
|
259 |
+
|
260 |
+
|
261 |
+
/**
|
262 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
263 |
+
*
|
264 |
+
* Checks if file exists in path.
|
265 |
+
* Opens a file when it's exists
|
266 |
+
*
|
267 |
+
* ``` php
|
268 |
+
* <?php
|
269 |
+
* $I->seeFileFound('UserModel.php','app/models');
|
270 |
+
* ?>
|
271 |
+
* ```
|
272 |
+
*
|
273 |
+
* @param $filename
|
274 |
+
* @param string $path
|
275 |
+
* Conditional Assertion: Test won't be stopped on fail
|
276 |
+
* @see \Codeception\Module\Filesystem::seeFileFound()
|
277 |
+
*/
|
278 |
+
public function canSeeFileFound($filename, $path = null) {
|
279 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
|
280 |
+
}
|
281 |
+
/**
|
282 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
283 |
+
*
|
284 |
+
* Checks if file exists in path.
|
285 |
+
* Opens a file when it's exists
|
286 |
+
*
|
287 |
+
* ``` php
|
288 |
+
* <?php
|
289 |
+
* $I->seeFileFound('UserModel.php','app/models');
|
290 |
+
* ?>
|
291 |
+
* ```
|
292 |
+
*
|
293 |
+
* @param $filename
|
294 |
+
* @param string $path
|
295 |
+
* @see \Codeception\Module\Filesystem::seeFileFound()
|
296 |
+
*/
|
297 |
+
public function seeFileFound($filename, $path = null) {
|
298 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
|
299 |
+
}
|
300 |
+
|
301 |
+
|
302 |
+
/**
|
303 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
304 |
+
*
|
305 |
+
* Checks if file does not exists in path
|
306 |
+
*
|
307 |
+
* @param $filename
|
308 |
+
* @param string $path
|
309 |
+
* Conditional Assertion: Test won't be stopped on fail
|
310 |
+
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
311 |
+
*/
|
312 |
+
public function cantSeeFileFound($filename, $path = null) {
|
313 |
+
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
|
314 |
+
}
|
315 |
+
/**
|
316 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
317 |
+
*
|
318 |
+
* Checks if file does not exists in path
|
319 |
+
*
|
320 |
+
* @param $filename
|
321 |
+
* @param string $path
|
322 |
+
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
323 |
+
*/
|
324 |
+
public function dontSeeFileFound($filename, $path = null) {
|
325 |
+
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
|
326 |
+
}
|
327 |
+
|
328 |
+
|
329 |
+
/**
|
330 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
331 |
+
*
|
332 |
+
* Erases directory contents
|
333 |
+
*
|
334 |
+
* ``` php
|
335 |
+
* <?php
|
336 |
+
* $I->cleanDir('logs');
|
337 |
+
* ?>
|
338 |
+
* ```
|
339 |
+
*
|
340 |
+
* @param $dirname
|
341 |
+
* @see \Codeception\Module\Filesystem::cleanDir()
|
342 |
+
*/
|
343 |
+
public function cleanDir($dirname) {
|
344 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));
|
345 |
+
}
|
346 |
+
|
347 |
+
|
348 |
+
/**
|
349 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
350 |
+
*
|
351 |
+
* Saves contents to file
|
352 |
+
*
|
353 |
+
* @param $filename
|
354 |
+
* @param $contents
|
355 |
+
* @see \Codeception\Module\Filesystem::writeToFile()
|
356 |
+
*/
|
357 |
+
public function writeToFile($filename, $contents) {
|
358 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));
|
359 |
+
}
|
360 |
+
}
|
assets/tests/codeception/functional/_bootstrap.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Here you can initialize variables that will be available to your tests
|
assets/tests/codeception/unit/UnitTester.php
ADDED
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //[STAMP] c8568e8eab4a240544c36ae031f88bd8
|
2 |
+
|
3 |
+
// This class was automatically generated by build task
|
4 |
+
// You should not change it manually as it will be overwritten on next build
|
5 |
+
// @codingStandardsIgnoreFile
|
6 |
+
|
7 |
+
|
8 |
+
use Codeception\Module\Asserts;
|
9 |
+
use Codeception\Module\UnitHelper;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Inherited Methods
|
13 |
+
* @method void wantToTest($text)
|
14 |
+
* @method void wantTo($text)
|
15 |
+
* @method void execute($callable)
|
16 |
+
* @method void expectTo($prediction)
|
17 |
+
* @method void expect($prediction)
|
18 |
+
* @method void amGoingTo($argumentation)
|
19 |
+
* @method void am($role)
|
20 |
+
* @method void lookForwardTo($achieveValue)
|
21 |
+
* @method void comment($description)
|
22 |
+
* @method void haveFriend($name, $actorClass = null)
|
23 |
+
*
|
24 |
+
* @SuppressWarnings(PHPMD)
|
25 |
+
*/
|
26 |
+
class UnitTester extends \Codeception\Actor
|
27 |
+
{
|
28 |
+
|
29 |
+
/**
|
30 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
31 |
+
*
|
32 |
+
* Checks that two variables are equal.
|
33 |
+
*
|
34 |
+
* @param $expected
|
35 |
+
* @param $actual
|
36 |
+
* @param string $message
|
37 |
+
*
|
38 |
+
* @return mixed
|
39 |
+
* @see \Codeception\Module\Asserts::assertEquals()
|
40 |
+
*/
|
41 |
+
public function assertEquals($expected, $actual, $message = null) {
|
42 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
48 |
+
*
|
49 |
+
* Checks that two variables are not equal
|
50 |
+
*
|
51 |
+
* @param $expected
|
52 |
+
* @param $actual
|
53 |
+
* @param string $message
|
54 |
+
* @see \Codeception\Module\Asserts::assertNotEquals()
|
55 |
+
*/
|
56 |
+
public function assertNotEquals($expected, $actual, $message = null) {
|
57 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
/**
|
62 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
63 |
+
*
|
64 |
+
* Checks that two variables are same
|
65 |
+
*
|
66 |
+
* @param $expected
|
67 |
+
* @param $actual
|
68 |
+
* @param string $message
|
69 |
+
*
|
70 |
+
* @return mixed
|
71 |
+
* @see \Codeception\Module\Asserts::assertSame()
|
72 |
+
*/
|
73 |
+
public function assertSame($expected, $actual, $message = null) {
|
74 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
80 |
+
*
|
81 |
+
* Checks that two variables are not same
|
82 |
+
*
|
83 |
+
* @param $expected
|
84 |
+
* @param $actual
|
85 |
+
* @param string $message
|
86 |
+
* @see \Codeception\Module\Asserts::assertNotSame()
|
87 |
+
*/
|
88 |
+
public function assertNotSame($expected, $actual, $message = null) {
|
89 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
/**
|
94 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
95 |
+
*
|
96 |
+
* Checks that expected is greater than actual
|
97 |
+
*
|
98 |
+
* @param $expected
|
99 |
+
* @param $actual
|
100 |
+
* @param string $message
|
101 |
+
* @see \Codeception\Module\Asserts::assertGreaterThan()
|
102 |
+
*/
|
103 |
+
public function assertGreaterThan($expected, $actual, $message = null) {
|
104 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
+
/**
|
109 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
110 |
+
*
|
111 |
+
* @deprecated
|
112 |
+
* @see \Codeception\Module\Asserts::assertGreaterThen()
|
113 |
+
*/
|
114 |
+
public function assertGreaterThen($expected, $actual, $message = null) {
|
115 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args()));
|
116 |
+
}
|
117 |
+
|
118 |
+
|
119 |
+
/**
|
120 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
121 |
+
*
|
122 |
+
* Checks that expected is greater or equal than actual
|
123 |
+
*
|
124 |
+
* @param $expected
|
125 |
+
* @param $actual
|
126 |
+
* @param string $message
|
127 |
+
* @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
|
128 |
+
*/
|
129 |
+
public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
|
130 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
/**
|
135 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
136 |
+
*
|
137 |
+
* @deprecated
|
138 |
+
* @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()
|
139 |
+
*/
|
140 |
+
public function assertGreaterThenOrEqual($expected, $actual, $message = null) {
|
141 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args()));
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
/**
|
146 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
147 |
+
*
|
148 |
+
* Checks that expected is less than actual
|
149 |
+
*
|
150 |
+
* @param $expected
|
151 |
+
* @param $actual
|
152 |
+
* @param string $message
|
153 |
+
* @see \Codeception\Module\Asserts::assertLessThan()
|
154 |
+
*/
|
155 |
+
public function assertLessThan($expected, $actual, $message = null) {
|
156 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
|
157 |
+
}
|
158 |
+
|
159 |
+
|
160 |
+
/**
|
161 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
162 |
+
*
|
163 |
+
* Checks that expected is less or equal than actual
|
164 |
+
*
|
165 |
+
* @param $expected
|
166 |
+
* @param $actual
|
167 |
+
* @param string $message
|
168 |
+
* @see \Codeception\Module\Asserts::assertLessThanOrEqual()
|
169 |
+
*/
|
170 |
+
public function assertLessThanOrEqual($expected, $actual, $message = null) {
|
171 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
|
172 |
+
}
|
173 |
+
|
174 |
+
|
175 |
+
/**
|
176 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
177 |
+
*
|
178 |
+
* Checks that haystack contains needle
|
179 |
+
*
|
180 |
+
* @param $needle
|
181 |
+
* @param $haystack
|
182 |
+
* @param string $message
|
183 |
+
* @see \Codeception\Module\Asserts::assertContains()
|
184 |
+
*/
|
185 |
+
public function assertContains($needle, $haystack, $message = null) {
|
186 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
|
187 |
+
}
|
188 |
+
|
189 |
+
|
190 |
+
/**
|
191 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
192 |
+
*
|
193 |
+
* Checks that haystack doesn't contain needle.
|
194 |
+
*
|
195 |
+
* @param $needle
|
196 |
+
* @param $haystack
|
197 |
+
* @param string $message
|
198 |
+
* @see \Codeception\Module\Asserts::assertNotContains()
|
199 |
+
*/
|
200 |
+
public function assertNotContains($needle, $haystack, $message = null) {
|
201 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
|
202 |
+
}
|
203 |
+
|
204 |
+
|
205 |
+
/**
|
206 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
207 |
+
*
|
208 |
+
* Checks that variable is empty.
|
209 |
+
*
|
210 |
+
* @param $actual
|
211 |
+
* @param string $message
|
212 |
+
* @see \Codeception\Module\Asserts::assertEmpty()
|
213 |
+
*/
|
214 |
+
public function assertEmpty($actual, $message = null) {
|
215 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
|
216 |
+
}
|
217 |
+
|
218 |
+
|
219 |
+
/**
|
220 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
221 |
+
*
|
222 |
+
* Checks that variable is not empty.
|
223 |
+
*
|
224 |
+
* @param $actual
|
225 |
+
* @param string $message
|
226 |
+
* @see \Codeception\Module\Asserts::assertNotEmpty()
|
227 |
+
*/
|
228 |
+
public function assertNotEmpty($actual, $message = null) {
|
229 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
/**
|
234 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
235 |
+
*
|
236 |
+
* Checks that variable is NULL
|
237 |
+
*
|
238 |
+
* @param $actual
|
239 |
+
* @param string $message
|
240 |
+
* @see \Codeception\Module\Asserts::assertNull()
|
241 |
+
*/
|
242 |
+
public function assertNull($actual, $message = null) {
|
243 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
/**
|
248 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
249 |
+
*
|
250 |
+
* Checks that variable is not NULL
|
251 |
+
*
|
252 |
+
* @param $actual
|
253 |
+
* @param string $message
|
254 |
+
* @see \Codeception\Module\Asserts::assertNotNull()
|
255 |
+
*/
|
256 |
+
public function assertNotNull($actual, $message = null) {
|
257 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
|
258 |
+
}
|
259 |
+
|
260 |
+
|
261 |
+
/**
|
262 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
263 |
+
*
|
264 |
+
* Checks that condition is positive.
|
265 |
+
*
|
266 |
+
* @param $condition
|
267 |
+
* @param string $message
|
268 |
+
* @see \Codeception\Module\Asserts::assertTrue()
|
269 |
+
*/
|
270 |
+
public function assertTrue($condition, $message = null) {
|
271 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
|
272 |
+
}
|
273 |
+
|
274 |
+
|
275 |
+
/**
|
276 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
277 |
+
*
|
278 |
+
* Checks that condition is negative.
|
279 |
+
*
|
280 |
+
* @param $condition
|
281 |
+
* @param string $message
|
282 |
+
* @see \Codeception\Module\Asserts::assertFalse()
|
283 |
+
*/
|
284 |
+
public function assertFalse($condition, $message = null) {
|
285 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
|
286 |
+
}
|
287 |
+
|
288 |
+
|
289 |
+
/**
|
290 |
+
* [!] Method is generated. Documentation taken from corresponding module.
|
291 |
+
*
|
292 |
+
* Fails the test with message.
|
293 |
+
*
|
294 |
+
* @param $message
|
295 |
+
* @see \Codeception\Module\Asserts::fail()
|
296 |
+
*/
|
297 |
+
public function fail($message) {
|
298 |
+
return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args()));
|
299 |
+
}
|
300 |
+
}
|
assets/tests/codeception/unit/_bootstrap.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Here you can initialize variables that will be available to your tests
|
assets/tests/phpunit/bootstrap.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Bootstrap the plugin unit testing environment.
|
4 |
+
*
|
5 |
+
* @package wordpress-plugin-tests
|
6 |
+
*/
|
7 |
+
|
8 |
+
/* load wp environemnt */
|
9 |
+
require '../../../wp-load.php';
|
10 |
+
|
11 |
+
/* load plugins */
|
12 |
+
require '../../../wp-admin/includes/plugin.php';
|
13 |
+
|
14 |
+
|
15 |
+
|
assets/tests/phpunit/test.activations.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Tests to test that that testing framework is testing tests. Meta, huh?
|
5 |
+
*
|
6 |
+
* @package wordpress-plugins-tests
|
7 |
+
*/
|
8 |
+
class Tests_Activation extends PHPUnit_Framework_TestCase {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Run a simple test to ensure that the tests are running
|
12 |
+
*/
|
13 |
+
function test_tests() {
|
14 |
+
$this->assertTrue( true );
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Ensure landing pages is active
|
19 |
+
*/
|
20 |
+
function test_lading_pages_activated() {
|
21 |
+
$this->assertTrue( is_plugin_active( 'landing-pages/landing-pages.php' ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Ensure that the Leads has been installed and activated.
|
26 |
+
*/
|
27 |
+
function test_leads_activated() {
|
28 |
+
$this->assertTrue( is_plugin_active( 'leads/leads.php' ) );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Ensure that the Calls to Action has been installed and activated.
|
33 |
+
*/
|
34 |
+
function test_cta_activated() {
|
35 |
+
$this->assertTrue( is_plugin_active( 'cta/calls-to-action.php' ) );
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Run upgrade routines and check option to see if complete
|
40 |
+
*/
|
41 |
+
function test_run_upgrade_routines() {
|
42 |
+
include_once LANDINGPAGES_PATH . 'classes/class.activation.php';
|
43 |
+
include_once LANDINGPAGES_PATH . 'classes/class.activation.upgrade-routines.php';
|
44 |
+
Landing_Pages_Activation::run_updates();
|
45 |
+
$this->assertTrue( true );
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
?>
|
assets/tests/travis-ci/test.statistics.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Tests to test that that testing framework is testing tests. Meta, huh?
|
5 |
+
*
|
6 |
+
* @package wordpress-plugins-tests
|
7 |
+
*/
|
8 |
+
class Tests_Statistics extends WP_UnitTestCase {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Test to see if get_post works.
|
12 |
+
*
|
13 |
+
* Compares a post ID ($org_post_id) with post ID
|
14 |
+
* taken out of get_post ($new_post_id).
|
15 |
+
* If they don't match, get_post() doesn't work, and it will
|
16 |
+
* return an error.
|
17 |
+
*/
|
18 |
+
function test_get_post() {
|
19 |
+
//Create new post using method provided by WP
|
20 |
+
$org_post_id = $this->factory->post->create();
|
21 |
+
|
22 |
+
//get post object using the new post's ID
|
23 |
+
$post_obj = get_post( $org_post_id );
|
24 |
+
|
25 |
+
//Get the post ID as given to us by get_post
|
26 |
+
$new_post_id = $post_obj->ID;
|
27 |
+
|
28 |
+
//Use pre-defined method to test if the two ID's match
|
29 |
+
$this->assertEquals( $org_post_id, $new_post_id );
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* creates a dummy landing page for testing
|
35 |
+
*/
|
36 |
+
function test_create_demo_lander() {
|
37 |
+
/* load the class used to create the dummy landing page */
|
38 |
+
include_once LANDINGPAGES_PATH . 'modules/module.install.php';
|
39 |
+
$lp_id = inbound_create_default_post_type();
|
40 |
+
$this->assertEquals( $lp_id , 4 );
|
41 |
+
echo 1;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Check if landing-page post type exists
|
48 |
+
*/
|
49 |
+
function test_check_if_landing_page_post_type_exist() {
|
50 |
+
$this->assertTrue( post_type_exists( 'landing-page' ) );
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Set landing page stats to zero for testing
|
57 |
+
*/
|
58 |
+
function test_reset_landing_page_stats() {
|
59 |
+
echo 2;
|
60 |
+
print_r( get_option( 'lp_settings_general' ) );
|
61 |
+
$landing_page = get_post( 4 );
|
62 |
+
var_dump($landing_page);
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
|
classes/class.acf-integration.php
CHANGED
@@ -32,9 +32,44 @@ if (!class_exists('Landing_Pages_ACF')) {
|
|
32 |
/* make sure fields are placed in the correct location */
|
33 |
add_action( 'admin_print_footer_scripts', array( __CLASS__ , 'reposition_acf_fields' ) );
|
34 |
|
35 |
-
/* add
|
36 |
-
add_filter(
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
/**
|
@@ -134,13 +169,17 @@ if (!class_exists('Landing_Pages_ACF')) {
|
|
134 |
/* sometimes value is an array count when new_value believes it should be an array in this case get new count */
|
135 |
if (!is_array($value) && is_array($new_value)) {
|
136 |
$value = count($new_value);
|
137 |
-
} else if(
|
|
|
|
|
|
|
138 |
$value = $new_value;
|
139 |
}
|
140 |
|
141 |
/* acf lite isn't processing return values correctly - ignore repeater subfields */
|
142 |
if ( !is_admin() && defined('ACF_FREE') ) {
|
143 |
$value = self::acf_free_value_formatting( $value , $field );
|
|
|
144 |
}
|
145 |
|
146 |
if ( !is_admin() && is_string($value) ) {
|
@@ -228,6 +267,7 @@ if (!class_exists('Landing_Pages_ACF')) {
|
|
228 |
|
229 |
|
230 |
if ($key === $needle && !is_array($value) ) {
|
|
|
231 |
return $value;
|
232 |
}
|
233 |
|
32 |
/* make sure fields are placed in the correct location */
|
33 |
add_action( 'admin_print_footer_scripts', array( __CLASS__ , 'reposition_acf_fields' ) );
|
34 |
|
35 |
+
/* add new location rule to ACF Field UI */
|
36 |
+
add_filter('acf/location/rule_types', array( __CLASS__ , 'define_location_rule_types' ) );
|
37 |
+
|
38 |
+
/* add new location rule values to ACF Field UI */
|
39 |
+
add_filter('acf/location/rule_values/template_id', array( __CLASS__ , 'define_location_rule_values' ) );
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @param $choices
|
45 |
+
* @return mixed
|
46 |
+
*/
|
47 |
+
public static function define_location_rule_types( $choices ) {
|
48 |
+
|
49 |
+
if (!isset($choices['Basic']['template_id'])) {
|
50 |
+
$choices['Basic']['template_id'] = __('Template ID', 'landing-page');
|
51 |
+
}
|
52 |
+
|
53 |
+
return $choices;
|
54 |
+
}
|
55 |
+
|
56 |
+
public static function define_location_rule_values( $choices ) {
|
57 |
+
$template_ids = Landing_Pages_Load_Extensions::get_uploaded_template_ids();
|
58 |
+
|
59 |
+
if (!isset($choices['default'])) {
|
60 |
+
$choices[ 'default' ] = 'default';
|
61 |
+
}
|
62 |
+
|
63 |
+
if( $template_ids ) {
|
64 |
+
foreach( $template_ids as $template_id ) {
|
65 |
+
|
66 |
+
/* template ID by template name here */
|
67 |
+
$choices[ $template_id ] = $template_id;
|
68 |
+
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
return $choices;
|
73 |
}
|
74 |
|
75 |
/**
|
169 |
/* sometimes value is an array count when new_value believes it should be an array in this case get new count */
|
170 |
if (!is_array($value) && is_array($new_value)) {
|
171 |
$value = count($new_value);
|
172 |
+
} else if($new_value) {
|
173 |
+
if ($new_value =='_empty') {
|
174 |
+
$new_value = '';
|
175 |
+
}
|
176 |
$value = $new_value;
|
177 |
}
|
178 |
|
179 |
/* acf lite isn't processing return values correctly - ignore repeater subfields */
|
180 |
if ( !is_admin() && defined('ACF_FREE') ) {
|
181 |
$value = self::acf_free_value_formatting( $value , $field );
|
182 |
+
|
183 |
}
|
184 |
|
185 |
if ( !is_admin() && is_string($value) ) {
|
267 |
|
268 |
|
269 |
if ($key === $needle && !is_array($value) ) {
|
270 |
+
$value = ($value) ? $value : '_empty' ;
|
271 |
return $value;
|
272 |
}
|
273 |
|
classes/class.admin-menus.php
CHANGED
@@ -26,17 +26,18 @@ class Landing_Pages_Admin_Menus {
|
|
26 |
public static function add_sub_menus() {
|
27 |
|
28 |
if (!current_user_can('manage_options')) {
|
|
|
29 |
return;
|
30 |
}
|
31 |
|
32 |
-
add_submenu_page('edit.php?post_type=landing-page', __('Forms', 'landing-pages'), __('
|
33 |
|
34 |
/* Mebership holders can use Inbound Pro to manage templates */
|
35 |
-
if ( !class_exists('Inbound_Pro_Plugin') || Inbound_Pro_Plugin::get_customer_status() < 1 ) {
|
36 |
-
|
37 |
-
}
|
38 |
|
39 |
add_submenu_page('edit.php?post_type=landing-page', __('Settings', 'landing-pages'), __('Settings', 'landing-pages'), 'manage_options', 'lp_global_settings', array('Landing_Pages_Settings' , 'display_settings'));
|
|
|
40 |
|
41 |
}
|
42 |
}
|
26 |
public static function add_sub_menus() {
|
27 |
|
28 |
if (!current_user_can('manage_options')) {
|
29 |
+
remove_menu_page( 'edit.php?post_type=landing-page' );
|
30 |
return;
|
31 |
}
|
32 |
|
33 |
+
add_submenu_page('edit.php?post_type=landing-page', __('Forms', 'landing-pages'), __('Forms', 'landing-pages'), 'manage_options', 'inbound-forms-redirect', 100);
|
34 |
|
35 |
/* Mebership holders can use Inbound Pro to manage templates */
|
36 |
+
//if ( !class_exists('Inbound_Pro_Plugin') || Inbound_Pro_Plugin::get_customer_status() < 1 ) {
|
37 |
+
//}
|
|
|
38 |
|
39 |
add_submenu_page('edit.php?post_type=landing-page', __('Settings', 'landing-pages'), __('Settings', 'landing-pages'), 'manage_options', 'lp_global_settings', array('Landing_Pages_Settings' , 'display_settings'));
|
40 |
+
add_submenu_page('edit.php?post_type=landing-page', __('Upload', 'landing-pages'), __('Upload', 'landing-pages'), 'manage_options', 'lp_manage_templates', 'lp_manage_templates', 100);
|
41 |
|
42 |
}
|
43 |
}
|
classes/class.inbound-statistics.php
CHANGED
@@ -85,6 +85,7 @@ if (!class_exists('Inbound_Content_Statistics')) {
|
|
85 |
$exclude[] = 'inbound-log';
|
86 |
$exclude[] = 'landing-page';
|
87 |
$exclude[] = 'acf-field-group';
|
|
|
88 |
|
89 |
if ( $pagenow === 'post.php' && !in_array($post_type,$exclude) ) {
|
90 |
add_meta_box( 'inbound-content-statistics', __( 'Inbound Statistics' , 'landing-pages' ) , array( __CLASS__ , 'display_statistics' ) , $post_type, 'side', 'high');
|
85 |
$exclude[] = 'inbound-log';
|
86 |
$exclude[] = 'landing-page';
|
87 |
$exclude[] = 'acf-field-group';
|
88 |
+
$exclude[] = 'download';
|
89 |
|
90 |
if ( $pagenow === 'post.php' && !in_array($post_type,$exclude) ) {
|
91 |
add_meta_box( 'inbound-content-statistics', __( 'Inbound Statistics' , 'landing-pages' ) , array( __CLASS__ , 'display_statistics' ) , $post_type, 'side', 'high');
|
classes/class.install.php
CHANGED
@@ -18,10 +18,6 @@ class Landing_Pages_Install {
|
|
18 |
/* load styles and scripts */
|
19 |
add_action('admin_enqueue_scripts', array( __CLASS__ , 'enqueue_scripts' ) );
|
20 |
|
21 |
-
if(!defined('INBOUND_PRO_PATH')) {
|
22 |
-
require_once(LANDINGPAGES_PATH."/assets/libraries/class-tgm-plugin-activation.php");
|
23 |
-
add_action( 'tgmpa_register', array( __CLASS__ , 'install_recommended_plugins' ) );
|
24 |
-
}
|
25 |
}
|
26 |
|
27 |
/**
|
@@ -121,81 +117,6 @@ class Landing_Pages_Install {
|
|
121 |
}
|
122 |
|
123 |
|
124 |
-
/**
|
125 |
-
* Register the required plugins for this theme.
|
126 |
-
*
|
127 |
-
* In this example, we register two plugins - one included with the TGMPA library
|
128 |
-
* and one from the .org repo.
|
129 |
-
*
|
130 |
-
* The variable passed to tgmpa_register_plugins() should be an array of plugin
|
131 |
-
* arrays.
|
132 |
-
*
|
133 |
-
* This function is hooked into tgmpa_init, which is fired within the
|
134 |
-
* TGM_Plugin_Activation class constructor.
|
135 |
-
*/
|
136 |
-
public static function install_recommended_plugins() {
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Array of plugin arrays. Required keys are name, slug and required.
|
140 |
-
* If the source is NOT from the .org repo, then source is also required.
|
141 |
-
*/
|
142 |
-
$plugins = array(
|
143 |
-
|
144 |
-
/* This is an example of how to include a plugin from the WordPress Plugin Repository */
|
145 |
-
array(
|
146 |
-
'name' => __('WordPress Leads' , 'landing-pages') .' <span class=\'inbound-install-notice\'> - '. __('This <b>free</b> landing page addon will give you the ability to track and manage incoming web leads. Gather advanced Lead Intelligence and close more deals.', 'landing-pages') .'</span>',
|
147 |
-
'slug' => 'leads',
|
148 |
-
'required' => false,
|
149 |
-
),
|
150 |
-
array(
|
151 |
-
'name' => __('WordPress Calls to Action' , 'landing-pages') .' <span class=\'inbound-install-notice\'> - '. __('This <b>free</b> landing page addon will drive more traffic into your Landing Pages with Targeted Calls to Action in your sites sidebars & content. Create popups to capture visitor attention and convert more leads.' , 'landing-pages') .'</span>',
|
152 |
-
'slug' => 'cta',
|
153 |
-
'required' => false,
|
154 |
-
),
|
155 |
-
|
156 |
-
);
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Array of configuration settings. Amend each line as needed.
|
160 |
-
* If you want the default strings to be available under your own theme domain,
|
161 |
-
* leave the strings uncommented.
|
162 |
-
* Some of the strings are added into a sprintf, so see the comments at the
|
163 |
-
* end of each line for what each argument will be.
|
164 |
-
*/
|
165 |
-
$config = array(
|
166 |
-
'domain' => 'landing-pages', /* Text domain - likely want to be the same as your theme. */
|
167 |
-
'default_path' => '', /* Default absolute path to pre-packaged plugins */
|
168 |
-
'parent_menu_slug' => 'themes.php', /* Default parent menu slug */
|
169 |
-
'parent_url_slug' => 'themes.php', /* Default parent URL slug */
|
170 |
-
'menu' => 'install-inbound-plugins', /* Menu slug */
|
171 |
-
'has_notices' => true, /* Show admin notices or not */
|
172 |
-
'is_automatic' => false, /* Automatically activate plugins after installation or not */
|
173 |
-
'message' => '', /* Message to output right before the plugins table */
|
174 |
-
'strings' => array(
|
175 |
-
'page_title' => __( 'Install Required Plugins', 'landing-pages' ),
|
176 |
-
'menu_title' => __( 'Install Plugins', 'landing-pages' ),
|
177 |
-
'installing' => __( 'Installing Plugin: %s', 'landing-pages' ), /* %1$s = plugin name */
|
178 |
-
'oops' => __( 'Something went wrong with the plugin API.', 'landing-pages' ),
|
179 |
-
'notice_can_install_required' => _n_noop( 'WordPress Landing Pages requires the following plugin: %1$s', 'WordPress Landing Pages highly requires the following plugins: %1$s.' ), /* %1$s = plugin name(s) */
|
180 |
-
'notice_can_install_recommended' => _n_noop( 'WordPress Landing Pages highly recommends the following complimentary plugin: %1$s', 'WordPress Landing Pages highly recommends the following complimentary plugins: %1$s.' ), /* %1$s = plugin name(s) */
|
181 |
-
'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), /* %1$s = plugin name(s) */
|
182 |
-
'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s', 'The following required plugins are currently inactive: %1$s' ), /* %1$s = plugin name(s) */
|
183 |
-
'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s', 'The following recommended plugins are currently inactive: %1$s' ), /* %1$s = plugin name(s) */
|
184 |
-
'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), /* %1$s = plugin name(s) */
|
185 |
-
'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s' ), /* %1$s = plugin name(s) */
|
186 |
-
'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), /* %1$s = plugin name(s) */
|
187 |
-
'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
|
188 |
-
'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ),
|
189 |
-
'return' => __( 'Return to Required Plugins Installer', 'landing-pages' ),
|
190 |
-
'plugin_activated' => __( 'Plugin activated successfully.', 'landing-pages' ),
|
191 |
-
'complete' => __( 'All plugins installed and activated successfully. %s', 'landing-pages' )
|
192 |
-
)
|
193 |
-
);
|
194 |
-
|
195 |
-
/* located in /assets/libraries/class-tgm-plugin-activation.php */
|
196 |
-
inbound_activate( $plugins, $config );
|
197 |
-
|
198 |
-
}
|
199 |
}
|
200 |
|
201 |
|
18 |
/* load styles and scripts */
|
19 |
add_action('admin_enqueue_scripts', array( __CLASS__ , 'enqueue_scripts' ) );
|
20 |
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
117 |
}
|
118 |
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
|
122 |
|
classes/class.landing-pages.php
CHANGED
@@ -32,7 +32,7 @@ class Landing_Pages_Template_Switcher {
|
|
32 |
add_filter('get_the_content', array( __CLASS__ , 'display_conversion_area' ), 20);
|
33 |
|
34 |
/* Switch to correct landing page template */
|
35 |
-
add_filter('
|
36 |
|
37 |
/* Load custom CSS and load custom JS */
|
38 |
add_action('wp_head', array( __CLASS__ , 'load_custom_js_css' ) );
|
@@ -131,44 +131,44 @@ class Landing_Pages_Template_Switcher {
|
|
131 |
/**
|
132 |
* Detects if landing page & issues the correct template
|
133 |
*/
|
134 |
-
public static function switch_template( $
|
135 |
global $wp_query, $post, $query_string;
|
136 |
|
137 |
if ($post->post_type != "landing-page") {
|
138 |
-
return $
|
139 |
}
|
140 |
|
141 |
/* nextgen gallery support */
|
142 |
if (!defined('NGG_DISABLE_FILTER_THE_CONTENT')) {
|
143 |
define( 'NGG_DISABLE_FILTER_THE_CONTENT' , true );
|
144 |
-
}
|
145 |
|
146 |
-
$
|
147 |
|
148 |
-
if (!isset($
|
149 |
-
return $
|
150 |
}
|
151 |
|
152 |
/* check if inactive theme */
|
153 |
-
$my_theme = wp_get_theme( $
|
154 |
if ($my_theme->exists()) {
|
155 |
-
return $
|
156 |
}
|
157 |
|
158 |
/* check if core template first */
|
159 |
-
if (file_exists(LANDINGPAGES_PATH . 'templates/' . $
|
160 |
-
return LANDINGPAGES_PATH . 'templates/' . $
|
161 |
}
|
162 |
/* next check if it is an uploaded template */
|
163 |
-
else if (file_exists(LANDINGPAGES_UPLOADS_PATH . $
|
164 |
-
return LANDINGPAGES_UPLOADS_PATH . $
|
165 |
}
|
166 |
/* next check if it is included with a WordPress theme */
|
167 |
-
else if (file_exists(LANDINGPAGES_THEME_TEMPLATES_PATH . $
|
168 |
-
return LANDINGPAGES_THEME_TEMPLATES_PATH . $
|
169 |
}
|
170 |
|
171 |
-
return $
|
172 |
}
|
173 |
|
174 |
/**
|
32 |
add_filter('get_the_content', array( __CLASS__ , 'display_conversion_area' ), 20);
|
33 |
|
34 |
/* Switch to correct landing page template */
|
35 |
+
add_filter('template_include', array( __CLASS__ , 'switch_template' ), 13);
|
36 |
|
37 |
/* Load custom CSS and load custom JS */
|
38 |
add_action('wp_head', array( __CLASS__ , 'load_custom_js_css' ) );
|
131 |
/**
|
132 |
* Detects if landing page & issues the correct template
|
133 |
*/
|
134 |
+
public static function switch_template( $template ) {
|
135 |
global $wp_query, $post, $query_string;
|
136 |
|
137 |
if ($post->post_type != "landing-page") {
|
138 |
+
return $template;
|
139 |
}
|
140 |
|
141 |
/* nextgen gallery support */
|
142 |
if (!defined('NGG_DISABLE_FILTER_THE_CONTENT')) {
|
143 |
define( 'NGG_DISABLE_FILTER_THE_CONTENT' , true );
|
144 |
+
}
|
145 |
|
146 |
+
$selected_template = Landing_Pages_Variations::get_current_template( $post->ID );
|
147 |
|
148 |
+
if (!isset($selected_template) || $selected_template === 'default' ) {
|
149 |
+
return $template;
|
150 |
}
|
151 |
|
152 |
/* check if inactive theme */
|
153 |
+
$my_theme = wp_get_theme( $selected_template );
|
154 |
if ($my_theme->exists()) {
|
155 |
+
return $template;
|
156 |
}
|
157 |
|
158 |
/* check if core template first */
|
159 |
+
if (file_exists(LANDINGPAGES_PATH . 'templates/' . $selected_template . '/index.php')) {
|
160 |
+
return LANDINGPAGES_PATH . 'templates/' . $selected_template . '/index.php';
|
161 |
}
|
162 |
/* next check if it is an uploaded template */
|
163 |
+
else if (file_exists(LANDINGPAGES_UPLOADS_PATH . $selected_template . '/index.php')) {
|
164 |
+
return LANDINGPAGES_UPLOADS_PATH . $selected_template . '/index.php';
|
165 |
}
|
166 |
/* next check if it is included with a WordPress theme */
|
167 |
+
else if (file_exists(LANDINGPAGES_THEME_TEMPLATES_PATH . $selected_template . '/index.php')) {
|
168 |
+
return LANDINGPAGES_THEME_TEMPLATES_PATH . $selected_template . '/index.php';
|
169 |
}
|
170 |
|
171 |
+
return $template;
|
172 |
}
|
173 |
|
174 |
/**
|
classes/class.metaboxes.php
CHANGED
@@ -275,7 +275,7 @@ class Landing_Pages_Metaboxes {
|
|
275 |
wp_enqueue_style('admin-post-edit-css', LANDINGPAGES_URLPATH . 'assets/css/admin-post-edit.css');
|
276 |
|
277 |
/* Load FontAwesome */
|
278 |
-
wp_register_style('font-awesome', INBOUNDNOW_SHARED_URLPATH.'assets/css/
|
279 |
wp_enqueue_style('font-awesome');
|
280 |
|
281 |
/* Load Sweet Alert */
|
@@ -464,14 +464,14 @@ class Landing_Pages_Metaboxes {
|
|
464 |
global $post;
|
465 |
$variations = Landing_Pages_Variations::get_variations($post->ID);
|
466 |
|
467 |
-
$variations = array_filter($variations,'is_numeric');
|
468 |
-
|
469 |
?>
|
470 |
<div>
|
|
|
471 |
<style type="text/css">
|
472 |
|
473 |
</style>
|
474 |
<div class="inside" id="a-b-testing">
|
|
|
475 |
<div id="bab-stat-box">
|
476 |
<?php
|
477 |
|
275 |
wp_enqueue_style('admin-post-edit-css', LANDINGPAGES_URLPATH . 'assets/css/admin-post-edit.css');
|
276 |
|
277 |
/* Load FontAwesome */
|
278 |
+
wp_register_style('font-awesome', INBOUNDNOW_SHARED_URLPATH.'assets/fonts/fontawesome/css/font-awesome.min.css');
|
279 |
wp_enqueue_style('font-awesome');
|
280 |
|
281 |
/* Load Sweet Alert */
|
464 |
global $post;
|
465 |
$variations = Landing_Pages_Variations::get_variations($post->ID);
|
466 |
|
|
|
|
|
467 |
?>
|
468 |
<div>
|
469 |
+
|
470 |
<style type="text/css">
|
471 |
|
472 |
</style>
|
473 |
<div class="inside" id="a-b-testing">
|
474 |
+
|
475 |
<div id="bab-stat-box">
|
476 |
<?php
|
477 |
|
classes/class.post-type.landing-page.php
CHANGED
@@ -92,7 +92,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
|
|
92 |
'capability_type' => 'post',
|
93 |
'hierarchical' => false,
|
94 |
'menu_position' => 32,
|
95 |
-
'supports' => array('title','custom-fields','editor',
|
96 |
);
|
97 |
|
98 |
register_post_type( 'landing-page' , $args );
|
92 |
'capability_type' => 'post',
|
93 |
'hierarchical' => false,
|
94 |
'menu_position' => 32,
|
95 |
+
'supports' => array('title','custom-fields','editor', 'excerpt')
|
96 |
);
|
97 |
|
98 |
register_post_type( 'landing-page' , $args );
|
classes/class.settings.php
CHANGED
@@ -17,15 +17,6 @@ class Landing_Pages_Settings {
|
|
17 |
/* load settings scripts and styles */
|
18 |
add_action('admin_enqueue_scripts', array( __CLASS__ , 'enqueue_settings_scripts' ) );
|
19 |
|
20 |
-
/* add quick link to access settings in plugins list table */
|
21 |
-
add_filter( 'plugin_action_links_landing-pages/landing-pages.php', array( __CLASS__ , 'extend_plugin_quicklinks' ) );
|
22 |
-
|
23 |
-
/* add hooks only available if pro not activated */
|
24 |
-
if (!defined('INBOUND_PRO_PATH')) {
|
25 |
-
/* cta to upgrade to pro */
|
26 |
-
add_filter( 'plugin_row_meta', array( __CLASS__ , 'extend_plugin_quicklinks_cta' ), 10, 2 );
|
27 |
-
}
|
28 |
-
|
29 |
/* display system info */
|
30 |
add_action('admin_footer', array( __CLASS__ , 'display_system_info' ) );
|
31 |
|
@@ -156,21 +147,6 @@ class Landing_Pages_Settings {
|
|
156 |
);
|
157 |
}
|
158 |
|
159 |
-
/**
|
160 |
-
* displays pro upgrade cta for non pro users
|
161 |
-
*/
|
162 |
-
public static function extend_plugin_quicklinks_cta( $links, $file ) {
|
163 |
-
|
164 |
-
$plugin = 'landing-pages/landing-pages.php';
|
165 |
-
|
166 |
-
if ( $file == $plugin ) {
|
167 |
-
return array_merge(
|
168 |
-
$links,
|
169 |
-
array( '<a href="http://www.inboundnow.com/membership-packages/">Upgrade to Pro</a>' )
|
170 |
-
);
|
171 |
-
}
|
172 |
-
return $links;
|
173 |
-
}
|
174 |
|
175 |
/**
|
176 |
* Displays global settings container
|
@@ -565,14 +541,14 @@ class Landing_Pages_Settings {
|
|
565 |
/* error_log(print_r($field, true)); */
|
566 |
$slug = (isset($field['remote_download_slug'])) ? $field['remote_download_slug'] : $field['slug'];
|
567 |
$api_params = array(
|
568 |
-
'edd_action' => '
|
569 |
'license' => $_POST['inboundnow_master_license_key'],
|
570 |
'item_name' => $slug
|
571 |
);
|
572 |
/* error_log(print_r($api_params, true)); */
|
573 |
|
574 |
/* Call the edd API */
|
575 |
-
$response = wp_remote_get(add_query_arg($api_params,
|
576 |
/* error_log(print_r($response, true)); */
|
577 |
|
578 |
/* make sure the response came back okay */
|
17 |
/* load settings scripts and styles */
|
18 |
add_action('admin_enqueue_scripts', array( __CLASS__ , 'enqueue_settings_scripts' ) );
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/* display system info */
|
21 |
add_action('admin_footer', array( __CLASS__ , 'display_system_info' ) );
|
22 |
|
147 |
);
|
148 |
}
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
/**
|
152 |
* Displays global settings container
|
541 |
/* error_log(print_r($field, true)); */
|
542 |
$slug = (isset($field['remote_download_slug'])) ? $field['remote_download_slug'] : $field['slug'];
|
543 |
$api_params = array(
|
544 |
+
'edd_action' => 'inbound_check_license',
|
545 |
'license' => $_POST['inboundnow_master_license_key'],
|
546 |
'item_name' => $slug
|
547 |
);
|
548 |
/* error_log(print_r($api_params, true)); */
|
549 |
|
550 |
/* Call the edd API */
|
551 |
+
$response = wp_remote_get(add_query_arg($api_params, INBOUNDNOW_STORE_URL ), array('timeout' => 30, 'sslverify' => false));
|
552 |
/* error_log(print_r($response, true)); */
|
553 |
|
554 |
/* make sure the response came back okay */
|
classes/class.sidebars.php
CHANGED
@@ -15,7 +15,7 @@ class Landing_Pages_Sidebars {
|
|
15 |
* load hooks and filters
|
16 |
*/
|
17 |
public static function add_hooks() {
|
18 |
-
add_action('init', array( __CLASS__ , 'register_sidebars' ) );
|
19 |
add_action('wp_head', array( __CLASS__ , 'replace_sidebars' ) );
|
20 |
}
|
21 |
|
15 |
* load hooks and filters
|
16 |
*/
|
17 |
public static function add_hooks() {
|
18 |
+
add_action('init', array( __CLASS__ , 'register_sidebars' ) , 100 );
|
19 |
add_action('wp_head', array( __CLASS__ , 'replace_sidebars' ) );
|
20 |
}
|
21 |
|
classes/class.variations.php
CHANGED
@@ -236,16 +236,14 @@ if (!class_exists('Landing_Pages_Variations')) {
|
|
236 |
|
237 |
$variations = get_post_meta($landing_page_id, 'lp-ab-variations', true);
|
238 |
|
239 |
-
if (!is_array($variations) ) {
|
240 |
$variations = explode( ',' , $variations);
|
241 |
}
|
242 |
|
243 |
-
if (!is_array($variations)) {
|
244 |
-
$variations = array( 0 => 0 );
|
245 |
}
|
246 |
|
247 |
-
$variations = array_filter($variations, 'is_numeric');
|
248 |
-
|
249 |
return $variations;
|
250 |
}
|
251 |
|
@@ -364,12 +362,17 @@ if (!class_exists('Landing_Pages_Variations')) {
|
|
364 |
* @returns INT of variation id
|
365 |
*/
|
366 |
public static function get_current_variation_id() {
|
367 |
-
global $post;
|
368 |
|
369 |
-
if (isset($_GET['ab-action']) && is_admin()) {
|
370 |
return $_SESSION['lp_ab_test_open_variation'];
|
371 |
}
|
372 |
|
|
|
|
|
|
|
|
|
|
|
373 |
if (isset($_REQUEST['lp-variation-id'])) {
|
374 |
$_SESSION['lp_ab_test_open_variation'] = $_REQUEST['lp-variation-id'];
|
375 |
$current_variation_id = $_REQUEST['lp-variation-id'];
|
@@ -389,9 +392,18 @@ if (!class_exists('Landing_Pages_Variations')) {
|
|
389 |
}
|
390 |
|
391 |
if (!isset($current_variation_id)) {
|
392 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
394 |
|
|
|
|
|
395 |
return $current_variation_id;
|
396 |
}
|
397 |
|
236 |
|
237 |
$variations = get_post_meta($landing_page_id, 'lp-ab-variations', true);
|
238 |
|
239 |
+
if (!is_array($variations) && $variations ) {
|
240 |
$variations = explode( ',' , $variations);
|
241 |
}
|
242 |
|
243 |
+
if (!is_array($variations) || !$variations ) {
|
244 |
+
$variations = array( 0 => "0" );
|
245 |
}
|
246 |
|
|
|
|
|
247 |
return $variations;
|
248 |
}
|
249 |
|
362 |
* @returns INT of variation id
|
363 |
*/
|
364 |
public static function get_current_variation_id() {
|
365 |
+
global $post, $current_variation_id;
|
366 |
|
367 |
+
if (isset($_SESSION['lp_ab_test_open_variation']) && isset($_GET['ab-action']) && is_admin()) {
|
368 |
return $_SESSION['lp_ab_test_open_variation'];
|
369 |
}
|
370 |
|
371 |
+
/* check to see if this has already been set during the instance */
|
372 |
+
if (is_numeric($current_variation_id)) {
|
373 |
+
return $current_variation_id;
|
374 |
+
}
|
375 |
+
|
376 |
if (isset($_REQUEST['lp-variation-id'])) {
|
377 |
$_SESSION['lp_ab_test_open_variation'] = $_REQUEST['lp-variation-id'];
|
378 |
$current_variation_id = $_REQUEST['lp-variation-id'];
|
392 |
}
|
393 |
|
394 |
if (!isset($current_variation_id)) {
|
395 |
+
if (!isset($post) && isset($_GET['post'])) {
|
396 |
+
$post_id = $_GET['post'];
|
397 |
+
} else if (isset($post)) {
|
398 |
+
$post_id = $post->ID;
|
399 |
+
}
|
400 |
+
$variations = self::get_variations($post_id);
|
401 |
+
$id = array_values($variations);
|
402 |
+
$current_variation_id = array_shift($id);
|
403 |
}
|
404 |
|
405 |
+
$GLOBALS['current_variation_id'] = $current_variation_id;
|
406 |
+
|
407 |
return $current_variation_id;
|
408 |
}
|
409 |
|
classes/class.wp-list-table.templates.php
CHANGED
@@ -136,6 +136,8 @@ class Landing_Pages_Templates_List_Table extends WP_List_Table {
|
|
136 |
|
137 |
|
138 |
$this->items = $this->found_data;
|
|
|
|
|
139 |
}
|
140 |
|
141 |
function column_default($item, $column_name) {
|
136 |
|
137 |
|
138 |
$this->items = $this->found_data;
|
139 |
+
$this->_screen = get_current_screen();
|
140 |
+
$this->screen = get_current_screen();
|
141 |
}
|
142 |
|
143 |
function column_default($item, $column_name) {
|
composer.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name":"inboundnow/landing-page",
|
3 |
+
"description":"Landing Page Framework for WordPress",
|
4 |
+
"keywords":["landing pages", "inbound now", "inbound marketing", "splt testing", "lp"],
|
5 |
+
"homepage":"http://inboundnow.com.com/",
|
6 |
+
"type":"library",
|
7 |
+
"license":"GPL",
|
8 |
+
"authors":[
|
9 |
+
{
|
10 |
+
"name":"Hudson Atwell",
|
11 |
+
"email":"hudson@inboundnow.com",
|
12 |
+
"homepage":"http://www.twitter.com/atwellpub/"
|
13 |
+
}
|
14 |
+
],
|
15 |
+
"minimum-stability": "stable",
|
16 |
+
|
17 |
+
"require": {
|
18 |
+
"php": ">=5.4.0",
|
19 |
+
"ext-json": "*",
|
20 |
+
"ext-mbstring": "*",
|
21 |
+
"phpunit/phpunit": "~4.7.0"
|
22 |
+
},
|
23 |
+
"config": {
|
24 |
+
"bin-dir": "tests/bin"
|
25 |
+
},
|
26 |
+
"require-dev": {
|
27 |
+
"badcow/lorem-ipsum": "*",
|
28 |
+
"codeception/codeception": "*",
|
29 |
+
"codeception/specify": "~0.3",
|
30 |
+
"lucatume/wp-browser": "master@dev",
|
31 |
+
"wp-cli/wp-cli": "*"
|
32 |
+
},
|
33 |
+
"suggest": {
|
34 |
+
"codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests",
|
35 |
+
"codeception/specify": "BDD-style code blocks",
|
36 |
+
"codeception/verify": "BDD-style assertions",
|
37 |
+
"phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module."
|
38 |
+
},
|
39 |
+
"autoload":{
|
40 |
+
"psr-0":{
|
41 |
+
"Codeception":"src",
|
42 |
+
"WPBrowser":"src"
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"extra": {
|
46 |
+
"branch-alias": {
|
47 |
+
"dev-master": "2.1-dev"
|
48 |
+
}
|
49 |
+
},
|
50 |
+
"bin":["codecept"]
|
51 |
+
}
|
composer.lock
DELETED
@@ -1,2137 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_readme": [
|
3 |
-
"This file locks the dependencies of your project to a known state",
|
4 |
-
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"hash": "0f94b4c19ef2789530259c153c138a0d",
|
8 |
-
"packages": [
|
9 |
-
{
|
10 |
-
"name": "doctrine/instantiator",
|
11 |
-
"version": "1.0.5",
|
12 |
-
"source": {
|
13 |
-
"type": "git",
|
14 |
-
"url": "https://github.com/doctrine/instantiator.git",
|
15 |
-
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
|
16 |
-
},
|
17 |
-
"dist": {
|
18 |
-
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
|
20 |
-
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
|
21 |
-
"shasum": ""
|
22 |
-
},
|
23 |
-
"require": {
|
24 |
-
"php": ">=5.3,<8.0-DEV"
|
25 |
-
},
|
26 |
-
"require-dev": {
|
27 |
-
"athletic/athletic": "~0.1.8",
|
28 |
-
"ext-pdo": "*",
|
29 |
-
"ext-phar": "*",
|
30 |
-
"phpunit/phpunit": "~4.0",
|
31 |
-
"squizlabs/php_codesniffer": "~2.0"
|
32 |
-
},
|
33 |
-
"type": "library",
|
34 |
-
"extra": {
|
35 |
-
"branch-alias": {
|
36 |
-
"dev-master": "1.0.x-dev"
|
37 |
-
}
|
38 |
-
},
|
39 |
-
"autoload": {
|
40 |
-
"psr-4": {
|
41 |
-
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
42 |
-
}
|
43 |
-
},
|
44 |
-
"notification-url": "https://packagist.org/downloads/",
|
45 |
-
"license": [
|
46 |
-
"MIT"
|
47 |
-
],
|
48 |
-
"authors": [
|
49 |
-
{
|
50 |
-
"name": "Marco Pivetta",
|
51 |
-
"email": "ocramius@gmail.com",
|
52 |
-
"homepage": "http://ocramius.github.com/"
|
53 |
-
}
|
54 |
-
],
|
55 |
-
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
56 |
-
"homepage": "https://github.com/doctrine/instantiator",
|
57 |
-
"keywords": [
|
58 |
-
"constructor",
|
59 |
-
"instantiate"
|
60 |
-
],
|
61 |
-
"time": "2015-06-14 21:17:01"
|
62 |
-
},
|
63 |
-
{
|
64 |
-
"name": "phpdocumentor/reflection-docblock",
|
65 |
-
"version": "2.0.4",
|
66 |
-
"source": {
|
67 |
-
"type": "git",
|
68 |
-
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
69 |
-
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
|
70 |
-
},
|
71 |
-
"dist": {
|
72 |
-
"type": "zip",
|
73 |
-
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
74 |
-
"reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
|
75 |
-
"shasum": ""
|
76 |
-
},
|
77 |
-
"require": {
|
78 |
-
"php": ">=5.3.3"
|
79 |
-
},
|
80 |
-
"require-dev": {
|
81 |
-
"phpunit/phpunit": "~4.0"
|
82 |
-
},
|
83 |
-
"suggest": {
|
84 |
-
"dflydev/markdown": "~1.0",
|
85 |
-
"erusev/parsedown": "~1.0"
|
86 |
-
},
|
87 |
-
"type": "library",
|
88 |
-
"extra": {
|
89 |
-
"branch-alias": {
|
90 |
-
"dev-master": "2.0.x-dev"
|
91 |
-
}
|
92 |
-
},
|
93 |
-
"autoload": {
|
94 |
-
"psr-0": {
|
95 |
-
"phpDocumentor": [
|
96 |
-
"src/"
|
97 |
-
]
|
98 |
-
}
|
99 |
-
},
|
100 |
-
"notification-url": "https://packagist.org/downloads/",
|
101 |
-
"license": [
|
102 |
-
"MIT"
|
103 |
-
],
|
104 |
-
"authors": [
|
105 |
-
{
|
106 |
-
"name": "Mike van Riel",
|
107 |
-
"email": "mike.vanriel@naenius.com"
|
108 |
-
}
|
109 |
-
],
|
110 |
-
"time": "2015-02-03 12:10:50"
|
111 |
-
},
|
112 |
-
{
|
113 |
-
"name": "phpspec/prophecy",
|
114 |
-
"version": "v1.4.1",
|
115 |
-
"source": {
|
116 |
-
"type": "git",
|
117 |
-
"url": "https://github.com/phpspec/prophecy.git",
|
118 |
-
"reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373"
|
119 |
-
},
|
120 |
-
"dist": {
|
121 |
-
"type": "zip",
|
122 |
-
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373",
|
123 |
-
"reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373",
|
124 |
-
"shasum": ""
|
125 |
-
},
|
126 |
-
"require": {
|
127 |
-
"doctrine/instantiator": "^1.0.2",
|
128 |
-
"phpdocumentor/reflection-docblock": "~2.0",
|
129 |
-
"sebastian/comparator": "~1.1"
|
130 |
-
},
|
131 |
-
"require-dev": {
|
132 |
-
"phpspec/phpspec": "~2.0"
|
133 |
-
},
|
134 |
-
"type": "library",
|
135 |
-
"extra": {
|
136 |
-
"branch-alias": {
|
137 |
-
"dev-master": "1.4.x-dev"
|
138 |
-
}
|
139 |
-
},
|
140 |
-
"autoload": {
|
141 |
-
"psr-0": {
|
142 |
-
"Prophecy\\": "src/"
|
143 |
-
}
|
144 |
-
},
|
145 |
-
"notification-url": "https://packagist.org/downloads/",
|
146 |
-
"license": [
|
147 |
-
"MIT"
|
148 |
-
],
|
149 |
-
"authors": [
|
150 |
-
{
|
151 |
-
"name": "Konstantin Kudryashov",
|
152 |
-
"email": "ever.zet@gmail.com",
|
153 |
-
"homepage": "http://everzet.com"
|
154 |
-
},
|
155 |
-
{
|
156 |
-
"name": "Marcello Duarte",
|
157 |
-
"email": "marcello.duarte@gmail.com"
|
158 |
-
}
|
159 |
-
],
|
160 |
-
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
161 |
-
"homepage": "https://github.com/phpspec/prophecy",
|
162 |
-
"keywords": [
|
163 |
-
"Double",
|
164 |
-
"Dummy",
|
165 |
-
"fake",
|
166 |
-
"mock",
|
167 |
-
"spy",
|
168 |
-
"stub"
|
169 |
-
],
|
170 |
-
"time": "2015-04-27 22:15:08"
|
171 |
-
},
|
172 |
-
{
|
173 |
-
"name": "phpunit/php-code-coverage",
|
174 |
-
"version": "2.1.7",
|
175 |
-
"source": {
|
176 |
-
"type": "git",
|
177 |
-
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
178 |
-
"reference": "07e27765596d72c378a6103e80da5d84e802f1e4"
|
179 |
-
},
|
180 |
-
"dist": {
|
181 |
-
"type": "zip",
|
182 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/07e27765596d72c378a6103e80da5d84e802f1e4",
|
183 |
-
"reference": "07e27765596d72c378a6103e80da5d84e802f1e4",
|
184 |
-
"shasum": ""
|
185 |
-
},
|
186 |
-
"require": {
|
187 |
-
"php": ">=5.3.3",
|
188 |
-
"phpunit/php-file-iterator": "~1.3",
|
189 |
-
"phpunit/php-text-template": "~1.2",
|
190 |
-
"phpunit/php-token-stream": "~1.3",
|
191 |
-
"sebastian/environment": "~1.0",
|
192 |
-
"sebastian/version": "~1.0"
|
193 |
-
},
|
194 |
-
"require-dev": {
|
195 |
-
"ext-xdebug": ">=2.1.4",
|
196 |
-
"phpunit/phpunit": "~4"
|
197 |
-
},
|
198 |
-
"suggest": {
|
199 |
-
"ext-dom": "*",
|
200 |
-
"ext-xdebug": ">=2.2.1",
|
201 |
-
"ext-xmlwriter": "*"
|
202 |
-
},
|
203 |
-
"type": "library",
|
204 |
-
"extra": {
|
205 |
-
"branch-alias": {
|
206 |
-
"dev-master": "2.1.x-dev"
|
207 |
-
}
|
208 |
-
},
|
209 |
-
"autoload": {
|
210 |
-
"classmap": [
|
211 |
-
"src/"
|
212 |
-
]
|
213 |
-
},
|
214 |
-
"notification-url": "https://packagist.org/downloads/",
|
215 |
-
"license": [
|
216 |
-
"BSD-3-Clause"
|
217 |
-
],
|
218 |
-
"authors": [
|
219 |
-
{
|
220 |
-
"name": "Sebastian Bergmann",
|
221 |
-
"email": "sb@sebastian-bergmann.de",
|
222 |
-
"role": "lead"
|
223 |
-
}
|
224 |
-
],
|
225 |
-
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
226 |
-
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
227 |
-
"keywords": [
|
228 |
-
"coverage",
|
229 |
-
"testing",
|
230 |
-
"xunit"
|
231 |
-
],
|
232 |
-
"time": "2015-06-30 06:52:35"
|
233 |
-
},
|
234 |
-
{
|
235 |
-
"name": "phpunit/php-file-iterator",
|
236 |
-
"version": "1.4.0",
|
237 |
-
"source": {
|
238 |
-
"type": "git",
|
239 |
-
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
240 |
-
"reference": "a923bb15680d0089e2316f7a4af8f437046e96bb"
|
241 |
-
},
|
242 |
-
"dist": {
|
243 |
-
"type": "zip",
|
244 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb",
|
245 |
-
"reference": "a923bb15680d0089e2316f7a4af8f437046e96bb",
|
246 |
-
"shasum": ""
|
247 |
-
},
|
248 |
-
"require": {
|
249 |
-
"php": ">=5.3.3"
|
250 |
-
},
|
251 |
-
"type": "library",
|
252 |
-
"extra": {
|
253 |
-
"branch-alias": {
|
254 |
-
"dev-master": "1.4.x-dev"
|
255 |
-
}
|
256 |
-
},
|
257 |
-
"autoload": {
|
258 |
-
"classmap": [
|
259 |
-
"src/"
|
260 |
-
]
|
261 |
-
},
|
262 |
-
"notification-url": "https://packagist.org/downloads/",
|
263 |
-
"license": [
|
264 |
-
"BSD-3-Clause"
|
265 |
-
],
|
266 |
-
"authors": [
|
267 |
-
{
|
268 |
-
"name": "Sebastian Bergmann",
|
269 |
-
"email": "sb@sebastian-bergmann.de",
|
270 |
-
"role": "lead"
|
271 |
-
}
|
272 |
-
],
|
273 |
-
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
274 |
-
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
275 |
-
"keywords": [
|
276 |
-
"filesystem",
|
277 |
-
"iterator"
|
278 |
-
],
|
279 |
-
"time": "2015-04-02 05:19:05"
|
280 |
-
},
|
281 |
-
{
|
282 |
-
"name": "phpunit/php-text-template",
|
283 |
-
"version": "1.2.1",
|
284 |
-
"source": {
|
285 |
-
"type": "git",
|
286 |
-
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
287 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
|
288 |
-
},
|
289 |
-
"dist": {
|
290 |
-
"type": "zip",
|
291 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
292 |
-
"reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
|
293 |
-
"shasum": ""
|
294 |
-
},
|
295 |
-
"require": {
|
296 |
-
"php": ">=5.3.3"
|
297 |
-
},
|
298 |
-
"type": "library",
|
299 |
-
"autoload": {
|
300 |
-
"classmap": [
|
301 |
-
"src/"
|
302 |
-
]
|
303 |
-
},
|
304 |
-
"notification-url": "https://packagist.org/downloads/",
|
305 |
-
"license": [
|
306 |
-
"BSD-3-Clause"
|
307 |
-
],
|
308 |
-
"authors": [
|
309 |
-
{
|
310 |
-
"name": "Sebastian Bergmann",
|
311 |
-
"email": "sebastian@phpunit.de",
|
312 |
-
"role": "lead"
|
313 |
-
}
|
314 |
-
],
|
315 |
-
"description": "Simple template engine.",
|
316 |
-
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
317 |
-
"keywords": [
|
318 |
-
"template"
|
319 |
-
],
|
320 |
-
"time": "2015-06-21 13:50:34"
|
321 |
-
},
|
322 |
-
{
|
323 |
-
"name": "phpunit/php-timer",
|
324 |
-
"version": "1.0.6",
|
325 |
-
"source": {
|
326 |
-
"type": "git",
|
327 |
-
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
328 |
-
"reference": "83fe1bdc5d47658b727595c14da140da92b3d66d"
|
329 |
-
},
|
330 |
-
"dist": {
|
331 |
-
"type": "zip",
|
332 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/83fe1bdc5d47658b727595c14da140da92b3d66d",
|
333 |
-
"reference": "83fe1bdc5d47658b727595c14da140da92b3d66d",
|
334 |
-
"shasum": ""
|
335 |
-
},
|
336 |
-
"require": {
|
337 |
-
"php": ">=5.3.3"
|
338 |
-
},
|
339 |
-
"type": "library",
|
340 |
-
"autoload": {
|
341 |
-
"classmap": [
|
342 |
-
"src/"
|
343 |
-
]
|
344 |
-
},
|
345 |
-
"notification-url": "https://packagist.org/downloads/",
|
346 |
-
"license": [
|
347 |
-
"BSD-3-Clause"
|
348 |
-
],
|
349 |
-
"authors": [
|
350 |
-
{
|
351 |
-
"name": "Sebastian Bergmann",
|
352 |
-
"email": "sb@sebastian-bergmann.de",
|
353 |
-
"role": "lead"
|
354 |
-
}
|
355 |
-
],
|
356 |
-
"description": "Utility class for timing",
|
357 |
-
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
358 |
-
"keywords": [
|
359 |
-
"timer"
|
360 |
-
],
|
361 |
-
"time": "2015-06-13 07:35:30"
|
362 |
-
},
|
363 |
-
{
|
364 |
-
"name": "phpunit/php-token-stream",
|
365 |
-
"version": "1.4.3",
|
366 |
-
"source": {
|
367 |
-
"type": "git",
|
368 |
-
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
369 |
-
"reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9"
|
370 |
-
},
|
371 |
-
"dist": {
|
372 |
-
"type": "zip",
|
373 |
-
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/7a9b0969488c3c54fd62b4d504b3ec758fd005d9",
|
374 |
-
"reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9",
|
375 |
-
"shasum": ""
|
376 |
-
},
|
377 |
-
"require": {
|
378 |
-
"ext-tokenizer": "*",
|
379 |
-
"php": ">=5.3.3"
|
380 |
-
},
|
381 |
-
"require-dev": {
|
382 |
-
"phpunit/phpunit": "~4.2"
|
383 |
-
},
|
384 |
-
"type": "library",
|
385 |
-
"extra": {
|
386 |
-
"branch-alias": {
|
387 |
-
"dev-master": "1.4-dev"
|
388 |
-
}
|
389 |
-
},
|
390 |
-
"autoload": {
|
391 |
-
"classmap": [
|
392 |
-
"src/"
|
393 |
-
]
|
394 |
-
},
|
395 |
-
"notification-url": "https://packagist.org/downloads/",
|
396 |
-
"license": [
|
397 |
-
"BSD-3-Clause"
|
398 |
-
],
|
399 |
-
"authors": [
|
400 |
-
{
|
401 |
-
"name": "Sebastian Bergmann",
|
402 |
-
"email": "sebastian@phpunit.de"
|
403 |
-
}
|
404 |
-
],
|
405 |
-
"description": "Wrapper around PHP's tokenizer extension.",
|
406 |
-
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
407 |
-
"keywords": [
|
408 |
-
"tokenizer"
|
409 |
-
],
|
410 |
-
"time": "2015-06-19 03:43:16"
|
411 |
-
},
|
412 |
-
{
|
413 |
-
"name": "phpunit/phpunit",
|
414 |
-
"version": "4.6.6",
|
415 |
-
"source": {
|
416 |
-
"type": "git",
|
417 |
-
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
418 |
-
"reference": "3afe303d873a4d64c62ef84de491b97b006fbdac"
|
419 |
-
},
|
420 |
-
"dist": {
|
421 |
-
"type": "zip",
|
422 |
-
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3afe303d873a4d64c62ef84de491b97b006fbdac",
|
423 |
-
"reference": "3afe303d873a4d64c62ef84de491b97b006fbdac",
|
424 |
-
"shasum": ""
|
425 |
-
},
|
426 |
-
"require": {
|
427 |
-
"ext-dom": "*",
|
428 |
-
"ext-json": "*",
|
429 |
-
"ext-pcre": "*",
|
430 |
-
"ext-reflection": "*",
|
431 |
-
"ext-spl": "*",
|
432 |
-
"php": ">=5.3.3",
|
433 |
-
"phpspec/prophecy": "~1.3,>=1.3.1",
|
434 |
-
"phpunit/php-code-coverage": "~2.0,>=2.0.11",
|
435 |
-
"phpunit/php-file-iterator": "~1.4",
|
436 |
-
"phpunit/php-text-template": "~1.2",
|
437 |
-
"phpunit/php-timer": "~1.0",
|
438 |
-
"phpunit/phpunit-mock-objects": "~2.3",
|
439 |
-
"sebastian/comparator": "~1.1",
|
440 |
-
"sebastian/diff": "~1.2",
|
441 |
-
"sebastian/environment": "~1.2",
|
442 |
-
"sebastian/exporter": "~1.2",
|
443 |
-
"sebastian/global-state": "~1.0",
|
444 |
-
"sebastian/version": "~1.0",
|
445 |
-
"symfony/yaml": "~2.1|~3.0"
|
446 |
-
},
|
447 |
-
"suggest": {
|
448 |
-
"phpunit/php-invoker": "~1.1"
|
449 |
-
},
|
450 |
-
"bin": [
|
451 |
-
"phpunit"
|
452 |
-
],
|
453 |
-
"type": "library",
|
454 |
-
"extra": {
|
455 |
-
"branch-alias": {
|
456 |
-
"dev-master": "4.6.x-dev"
|
457 |
-
}
|
458 |
-
},
|
459 |
-
"autoload": {
|
460 |
-
"classmap": [
|
461 |
-
"src/"
|
462 |
-
]
|
463 |
-
},
|
464 |
-
"notification-url": "https://packagist.org/downloads/",
|
465 |
-
"license": [
|
466 |
-
"BSD-3-Clause"
|
467 |
-
],
|
468 |
-
"authors": [
|
469 |
-
{
|
470 |
-
"name": "Sebastian Bergmann",
|
471 |
-
"email": "sebastian@phpunit.de",
|
472 |
-
"role": "lead"
|
473 |
-
}
|
474 |
-
],
|
475 |
-
"description": "The PHP Unit Testing framework.",
|
476 |
-
"homepage": "https://phpunit.de/",
|
477 |
-
"keywords": [
|
478 |
-
"phpunit",
|
479 |
-
"testing",
|
480 |
-
"xunit"
|
481 |
-
],
|
482 |
-
"time": "2015-04-29 15:18:52"
|
483 |
-
},
|
484 |
-
{
|
485 |
-
"name": "phpunit/phpunit-mock-objects",
|
486 |
-
"version": "2.3.5",
|
487 |
-
"source": {
|
488 |
-
"type": "git",
|
489 |
-
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
490 |
-
"reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c"
|
491 |
-
},
|
492 |
-
"dist": {
|
493 |
-
"type": "zip",
|
494 |
-
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/1c330b1b6e1ea8fd15f2fbea46770576e366855c",
|
495 |
-
"reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c",
|
496 |
-
"shasum": ""
|
497 |
-
},
|
498 |
-
"require": {
|
499 |
-
"doctrine/instantiator": "~1.0,>=1.0.2",
|
500 |
-
"php": ">=5.3.3",
|
501 |
-
"phpunit/php-text-template": "~1.2"
|
502 |
-
},
|
503 |
-
"require-dev": {
|
504 |
-
"phpunit/phpunit": "~4.4"
|
505 |
-
},
|
506 |
-
"suggest": {
|
507 |
-
"ext-soap": "*"
|
508 |
-
},
|
509 |
-
"type": "library",
|
510 |
-
"extra": {
|
511 |
-
"branch-alias": {
|
512 |
-
"dev-master": "2.3.x-dev"
|
513 |
-
}
|
514 |
-
},
|
515 |
-
"autoload": {
|
516 |
-
"classmap": [
|
517 |
-
"src/"
|
518 |
-
]
|
519 |
-
},
|
520 |
-
"notification-url": "https://packagist.org/downloads/",
|
521 |
-
"license": [
|
522 |
-
"BSD-3-Clause"
|
523 |
-
],
|
524 |
-
"authors": [
|
525 |
-
{
|
526 |
-
"name": "Sebastian Bergmann",
|
527 |
-
"email": "sb@sebastian-bergmann.de",
|
528 |
-
"role": "lead"
|
529 |
-
}
|
530 |
-
],
|
531 |
-
"description": "Mock Object library for PHPUnit",
|
532 |
-
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
|
533 |
-
"keywords": [
|
534 |
-
"mock",
|
535 |
-
"xunit"
|
536 |
-
],
|
537 |
-
"time": "2015-07-04 05:41:32"
|
538 |
-
},
|
539 |
-
{
|
540 |
-
"name": "sebastian/comparator",
|
541 |
-
"version": "1.1.1",
|
542 |
-
"source": {
|
543 |
-
"type": "git",
|
544 |
-
"url": "https://github.com/sebastianbergmann/comparator.git",
|
545 |
-
"reference": "1dd8869519a225f7f2b9eb663e225298fade819e"
|
546 |
-
},
|
547 |
-
"dist": {
|
548 |
-
"type": "zip",
|
549 |
-
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e",
|
550 |
-
"reference": "1dd8869519a225f7f2b9eb663e225298fade819e",
|
551 |
-
"shasum": ""
|
552 |
-
},
|
553 |
-
"require": {
|
554 |
-
"php": ">=5.3.3",
|
555 |
-
"sebastian/diff": "~1.2",
|
556 |
-
"sebastian/exporter": "~1.2"
|
557 |
-
},
|
558 |
-
"require-dev": {
|
559 |
-
"phpunit/phpunit": "~4.4"
|
560 |
-
},
|
561 |
-
"type": "library",
|
562 |
-
"extra": {
|
563 |
-
"branch-alias": {
|
564 |
-
"dev-master": "1.1.x-dev"
|
565 |
-
}
|
566 |
-
},
|
567 |
-
"autoload": {
|
568 |
-
"classmap": [
|
569 |
-
"src/"
|
570 |
-
]
|
571 |
-
},
|
572 |
-
"notification-url": "https://packagist.org/downloads/",
|
573 |
-
"license": [
|
574 |
-
"BSD-3-Clause"
|
575 |
-
],
|
576 |
-
"authors": [
|
577 |
-
{
|
578 |
-
"name": "Jeff Welch",
|
579 |
-
"email": "whatthejeff@gmail.com"
|
580 |
-
},
|
581 |
-
{
|
582 |
-
"name": "Volker Dusch",
|
583 |
-
"email": "github@wallbash.com"
|
584 |
-
},
|
585 |
-
{
|
586 |
-
"name": "Bernhard Schussek",
|
587 |
-
"email": "bschussek@2bepublished.at"
|
588 |
-
},
|
589 |
-
{
|
590 |
-
"name": "Sebastian Bergmann",
|
591 |
-
"email": "sebastian@phpunit.de"
|
592 |
-
}
|
593 |
-
],
|
594 |
-
"description": "Provides the functionality to compare PHP values for equality",
|
595 |
-
"homepage": "http://www.github.com/sebastianbergmann/comparator",
|
596 |
-
"keywords": [
|
597 |
-
"comparator",
|
598 |
-
"compare",
|
599 |
-
"equality"
|
600 |
-
],
|
601 |
-
"time": "2015-01-29 16:28:08"
|
602 |
-
},
|
603 |
-
{
|
604 |
-
"name": "sebastian/diff",
|
605 |
-
"version": "1.3.0",
|
606 |
-
"source": {
|
607 |
-
"type": "git",
|
608 |
-
"url": "https://github.com/sebastianbergmann/diff.git",
|
609 |
-
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
|
610 |
-
},
|
611 |
-
"dist": {
|
612 |
-
"type": "zip",
|
613 |
-
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
|
614 |
-
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
|
615 |
-
"shasum": ""
|
616 |
-
},
|
617 |
-
"require": {
|
618 |
-
"php": ">=5.3.3"
|
619 |
-
},
|
620 |
-
"require-dev": {
|
621 |
-
"phpunit/phpunit": "~4.2"
|
622 |
-
},
|
623 |
-
"type": "library",
|
624 |
-
"extra": {
|
625 |
-
"branch-alias": {
|
626 |
-
"dev-master": "1.3-dev"
|
627 |
-
}
|
628 |
-
},
|
629 |
-
"autoload": {
|
630 |
-
"classmap": [
|
631 |
-
"src/"
|
632 |
-
]
|
633 |
-
},
|
634 |
-
"notification-url": "https://packagist.org/downloads/",
|
635 |
-
"license": [
|
636 |
-
"BSD-3-Clause"
|
637 |
-
],
|
638 |
-
"authors": [
|
639 |
-
{
|
640 |
-
"name": "Kore Nordmann",
|
641 |
-
"email": "mail@kore-nordmann.de"
|
642 |
-
},
|
643 |
-
{
|
644 |
-
"name": "Sebastian Bergmann",
|
645 |
-
"email": "sebastian@phpunit.de"
|
646 |
-
}
|
647 |
-
],
|
648 |
-
"description": "Diff implementation",
|
649 |
-
"homepage": "http://www.github.com/sebastianbergmann/diff",
|
650 |
-
"keywords": [
|
651 |
-
"diff"
|
652 |
-
],
|
653 |
-
"time": "2015-02-22 15:13:53"
|
654 |
-
},
|
655 |
-
{
|
656 |
-
"name": "sebastian/environment",
|
657 |
-
"version": "1.2.2",
|
658 |
-
"source": {
|
659 |
-
"type": "git",
|
660 |
-
"url": "https://github.com/sebastianbergmann/environment.git",
|
661 |
-
"reference": "5a8c7d31914337b69923db26c4221b81ff5a196e"
|
662 |
-
},
|
663 |
-
"dist": {
|
664 |
-
"type": "zip",
|
665 |
-
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e",
|
666 |
-
"reference": "5a8c7d31914337b69923db26c4221b81ff5a196e",
|
667 |
-
"shasum": ""
|
668 |
-
},
|
669 |
-
"require": {
|
670 |
-
"php": ">=5.3.3"
|
671 |
-
},
|
672 |
-
"require-dev": {
|
673 |
-
"phpunit/phpunit": "~4.4"
|
674 |
-
},
|
675 |
-
"type": "library",
|
676 |
-
"extra": {
|
677 |
-
"branch-alias": {
|
678 |
-
"dev-master": "1.3.x-dev"
|
679 |
-
}
|
680 |
-
},
|
681 |
-
"autoload": {
|
682 |
-
"classmap": [
|
683 |
-
"src/"
|
684 |
-
]
|
685 |
-
},
|
686 |
-
"notification-url": "https://packagist.org/downloads/",
|
687 |
-
"license": [
|
688 |
-
"BSD-3-Clause"
|
689 |
-
],
|
690 |
-
"authors": [
|
691 |
-
{
|
692 |
-
"name": "Sebastian Bergmann",
|
693 |
-
"email": "sebastian@phpunit.de"
|
694 |
-
}
|
695 |
-
],
|
696 |
-
"description": "Provides functionality to handle HHVM/PHP environments",
|
697 |
-
"homepage": "http://www.github.com/sebastianbergmann/environment",
|
698 |
-
"keywords": [
|
699 |
-
"Xdebug",
|
700 |
-
"environment",
|
701 |
-
"hhvm"
|
702 |
-
],
|
703 |
-
"time": "2015-01-01 10:01:08"
|
704 |
-
},
|
705 |
-
{
|
706 |
-
"name": "sebastian/exporter",
|
707 |
-
"version": "1.2.0",
|
708 |
-
"source": {
|
709 |
-
"type": "git",
|
710 |
-
"url": "https://github.com/sebastianbergmann/exporter.git",
|
711 |
-
"reference": "84839970d05254c73cde183a721c7af13aede943"
|
712 |
-
},
|
713 |
-
"dist": {
|
714 |
-
"type": "zip",
|
715 |
-
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943",
|
716 |
-
"reference": "84839970d05254c73cde183a721c7af13aede943",
|
717 |
-
"shasum": ""
|
718 |
-
},
|
719 |
-
"require": {
|
720 |
-
"php": ">=5.3.3",
|
721 |
-
"sebastian/recursion-context": "~1.0"
|
722 |
-
},
|
723 |
-
"require-dev": {
|
724 |
-
"phpunit/phpunit": "~4.4"
|
725 |
-
},
|
726 |
-
"type": "library",
|
727 |
-
"extra": {
|
728 |
-
"branch-alias": {
|
729 |
-
"dev-master": "1.2.x-dev"
|
730 |
-
}
|
731 |
-
},
|
732 |
-
"autoload": {
|
733 |
-
"classmap": [
|
734 |
-
"src/"
|
735 |
-
]
|
736 |
-
},
|
737 |
-
"notification-url": "https://packagist.org/downloads/",
|
738 |
-
"license": [
|
739 |
-
"BSD-3-Clause"
|
740 |
-
],
|
741 |
-
"authors": [
|
742 |
-
{
|
743 |
-
"name": "Jeff Welch",
|
744 |
-
"email": "whatthejeff@gmail.com"
|
745 |
-
},
|
746 |
-
{
|
747 |
-
"name": "Volker Dusch",
|
748 |
-
"email": "github@wallbash.com"
|
749 |
-
},
|
750 |
-
{
|
751 |
-
"name": "Bernhard Schussek",
|
752 |
-
"email": "bschussek@2bepublished.at"
|
753 |
-
},
|
754 |
-
{
|
755 |
-
"name": "Sebastian Bergmann",
|
756 |
-
"email": "sebastian@phpunit.de"
|
757 |
-
},
|
758 |
-
{
|
759 |
-
"name": "Adam Harvey",
|
760 |
-
"email": "aharvey@php.net"
|
761 |
-
}
|
762 |
-
],
|
763 |
-
"description": "Provides the functionality to export PHP variables for visualization",
|
764 |
-
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
765 |
-
"keywords": [
|
766 |
-
"export",
|
767 |
-
"exporter"
|
768 |
-
],
|
769 |
-
"time": "2015-01-27 07:23:06"
|
770 |
-
},
|
771 |
-
{
|
772 |
-
"name": "sebastian/global-state",
|
773 |
-
"version": "1.0.0",
|
774 |
-
"source": {
|
775 |
-
"type": "git",
|
776 |
-
"url": "https://github.com/sebastianbergmann/global-state.git",
|
777 |
-
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01"
|
778 |
-
},
|
779 |
-
"dist": {
|
780 |
-
"type": "zip",
|
781 |
-
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
|
782 |
-
"reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
|
783 |
-
"shasum": ""
|
784 |
-
},
|
785 |
-
"require": {
|
786 |
-
"php": ">=5.3.3"
|
787 |
-
},
|
788 |
-
"require-dev": {
|
789 |
-
"phpunit/phpunit": "~4.2"
|
790 |
-
},
|
791 |
-
"suggest": {
|
792 |
-
"ext-uopz": "*"
|
793 |
-
},
|
794 |
-
"type": "library",
|
795 |
-
"extra": {
|
796 |
-
"branch-alias": {
|
797 |
-
"dev-master": "1.0-dev"
|
798 |
-
}
|
799 |
-
},
|
800 |
-
"autoload": {
|
801 |
-
"classmap": [
|
802 |
-
"src/"
|
803 |
-
]
|
804 |
-
},
|
805 |
-
"notification-url": "https://packagist.org/downloads/",
|
806 |
-
"license": [
|
807 |
-
"BSD-3-Clause"
|
808 |
-
],
|
809 |
-
"authors": [
|
810 |
-
{
|
811 |
-
"name": "Sebastian Bergmann",
|
812 |
-
"email": "sebastian@phpunit.de"
|
813 |
-
}
|
814 |
-
],
|
815 |
-
"description": "Snapshotting of global state",
|
816 |
-
"homepage": "http://www.github.com/sebastianbergmann/global-state",
|
817 |
-
"keywords": [
|
818 |
-
"global state"
|
819 |
-
],
|
820 |
-
"time": "2014-10-06 09:23:50"
|
821 |
-
},
|
822 |
-
{
|
823 |
-
"name": "sebastian/recursion-context",
|
824 |
-
"version": "1.0.0",
|
825 |
-
"source": {
|
826 |
-
"type": "git",
|
827 |
-
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
828 |
-
"reference": "3989662bbb30a29d20d9faa04a846af79b276252"
|
829 |
-
},
|
830 |
-
"dist": {
|
831 |
-
"type": "zip",
|
832 |
-
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252",
|
833 |
-
"reference": "3989662bbb30a29d20d9faa04a846af79b276252",
|
834 |
-
"shasum": ""
|
835 |
-
},
|
836 |
-
"require": {
|
837 |
-
"php": ">=5.3.3"
|
838 |
-
},
|
839 |
-
"require-dev": {
|
840 |
-
"phpunit/phpunit": "~4.4"
|
841 |
-
},
|
842 |
-
"type": "library",
|
843 |
-
"extra": {
|
844 |
-
"branch-alias": {
|
845 |
-
"dev-master": "1.0.x-dev"
|
846 |
-
}
|
847 |
-
},
|
848 |
-
"autoload": {
|
849 |
-
"classmap": [
|
850 |
-
"src/"
|
851 |
-
]
|
852 |
-
},
|
853 |
-
"notification-url": "https://packagist.org/downloads/",
|
854 |
-
"license": [
|
855 |
-
"BSD-3-Clause"
|
856 |
-
],
|
857 |
-
"authors": [
|
858 |
-
{
|
859 |
-
"name": "Jeff Welch",
|
860 |
-
"email": "whatthejeff@gmail.com"
|
861 |
-
},
|
862 |
-
{
|
863 |
-
"name": "Sebastian Bergmann",
|
864 |
-
"email": "sebastian@phpunit.de"
|
865 |
-
},
|
866 |
-
{
|
867 |
-
"name": "Adam Harvey",
|
868 |
-
"email": "aharvey@php.net"
|
869 |
-
}
|
870 |
-
],
|
871 |
-
"description": "Provides functionality to recursively process PHP variables",
|
872 |
-
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
873 |
-
"time": "2015-01-24 09:48:32"
|
874 |
-
},
|
875 |
-
{
|
876 |
-
"name": "sebastian/version",
|
877 |
-
"version": "1.0.6",
|
878 |
-
"source": {
|
879 |
-
"type": "git",
|
880 |
-
"url": "https://github.com/sebastianbergmann/version.git",
|
881 |
-
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
|
882 |
-
},
|
883 |
-
"dist": {
|
884 |
-
"type": "zip",
|
885 |
-
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
886 |
-
"reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
|
887 |
-
"shasum": ""
|
888 |
-
},
|
889 |
-
"type": "library",
|
890 |
-
"autoload": {
|
891 |
-
"classmap": [
|
892 |
-
"src/"
|
893 |
-
]
|
894 |
-
},
|
895 |
-
"notification-url": "https://packagist.org/downloads/",
|
896 |
-
"license": [
|
897 |
-
"BSD-3-Clause"
|
898 |
-
],
|
899 |
-
"authors": [
|
900 |
-
{
|
901 |
-
"name": "Sebastian Bergmann",
|
902 |
-
"email": "sebastian@phpunit.de",
|
903 |
-
"role": "lead"
|
904 |
-
}
|
905 |
-
],
|
906 |
-
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
907 |
-
"homepage": "https://github.com/sebastianbergmann/version",
|
908 |
-
"time": "2015-06-21 13:59:46"
|
909 |
-
},
|
910 |
-
{
|
911 |
-
"name": "symfony/yaml",
|
912 |
-
"version": "v2.7.1",
|
913 |
-
"source": {
|
914 |
-
"type": "git",
|
915 |
-
"url": "https://github.com/symfony/Yaml.git",
|
916 |
-
"reference": "9808e75c609a14f6db02f70fccf4ca4aab53c160"
|
917 |
-
},
|
918 |
-
"dist": {
|
919 |
-
"type": "zip",
|
920 |
-
"url": "https://api.github.com/repos/symfony/Yaml/zipball/9808e75c609a14f6db02f70fccf4ca4aab53c160",
|
921 |
-
"reference": "9808e75c609a14f6db02f70fccf4ca4aab53c160",
|
922 |
-
"shasum": ""
|
923 |
-
},
|
924 |
-
"require": {
|
925 |
-
"php": ">=5.3.9"
|
926 |
-
},
|
927 |
-
"require-dev": {
|
928 |
-
"symfony/phpunit-bridge": "~2.7"
|
929 |
-
},
|
930 |
-
"type": "library",
|
931 |
-
"extra": {
|
932 |
-
"branch-alias": {
|
933 |
-
"dev-master": "2.7-dev"
|
934 |
-
}
|
935 |
-
},
|
936 |
-
"autoload": {
|
937 |
-
"psr-4": {
|
938 |
-
"Symfony\\Component\\Yaml\\": ""
|
939 |
-
}
|
940 |
-
},
|
941 |
-
"notification-url": "https://packagist.org/downloads/",
|
942 |
-
"license": [
|
943 |
-
"MIT"
|
944 |
-
],
|
945 |
-
"authors": [
|
946 |
-
{
|
947 |
-
"name": "Fabien Potencier",
|
948 |
-
"email": "fabien@symfony.com"
|
949 |
-
},
|
950 |
-
{
|
951 |
-
"name": "Symfony Community",
|
952 |
-
"homepage": "https://symfony.com/contributors"
|
953 |
-
}
|
954 |
-
],
|
955 |
-
"description": "Symfony Yaml Component",
|
956 |
-
"homepage": "https://symfony.com",
|
957 |
-
"time": "2015-06-10 15:30:22"
|
958 |
-
}
|
959 |
-
],
|
960 |
-
"packages-dev": [
|
961 |
-
{
|
962 |
-
"name": "bacon/bacon-string-utils",
|
963 |
-
"version": "1.0.3",
|
964 |
-
"source": {
|
965 |
-
"type": "git",
|
966 |
-
"url": "https://github.com/Bacon/BaconStringUtils.git",
|
967 |
-
"reference": "3810c78cdfe895cca9d6a2eea7712cb643186d05"
|
968 |
-
},
|
969 |
-
"dist": {
|
970 |
-
"type": "zip",
|
971 |
-
"url": "https://api.github.com/repos/Bacon/BaconStringUtils/zipball/3810c78cdfe895cca9d6a2eea7712cb643186d05",
|
972 |
-
"reference": "3810c78cdfe895cca9d6a2eea7712cb643186d05",
|
973 |
-
"shasum": ""
|
974 |
-
},
|
975 |
-
"require": {
|
976 |
-
"php": ">=5.3.3"
|
977 |
-
},
|
978 |
-
"suggest": {
|
979 |
-
"zendframework/zend-filter": "To use the Slugifier as a Zend\\Filter instance"
|
980 |
-
},
|
981 |
-
"type": "library",
|
982 |
-
"autoload": {
|
983 |
-
"psr-0": {
|
984 |
-
"BaconStringUtils": "src/"
|
985 |
-
},
|
986 |
-
"classmap": [
|
987 |
-
"./Module.php"
|
988 |
-
]
|
989 |
-
},
|
990 |
-
"notification-url": "https://packagist.org/downloads/",
|
991 |
-
"license": [
|
992 |
-
"BSD-2-Clause"
|
993 |
-
],
|
994 |
-
"authors": [
|
995 |
-
{
|
996 |
-
"name": "Ben Scholzen 'DASPRiD'",
|
997 |
-
"email": "mail@dasprids.de",
|
998 |
-
"homepage": "http://www.dasprids.de",
|
999 |
-
"role": "Developer"
|
1000 |
-
}
|
1001 |
-
],
|
1002 |
-
"description": "BaconStringUtils contain utitilies to work with strings.",
|
1003 |
-
"homepage": "https://github.com/Bacon/BaconStringUtils",
|
1004 |
-
"time": "2013-10-11 13:59:45"
|
1005 |
-
},
|
1006 |
-
{
|
1007 |
-
"name": "badcow/lorem-ipsum",
|
1008 |
-
"version": "v1.1.1",
|
1009 |
-
"source": {
|
1010 |
-
"type": "git",
|
1011 |
-
"url": "https://github.com/Badcow/LoremIpsum.git",
|
1012 |
-
"reference": "7e685497e92d71d0ebbd067d51892f3308cc72e1"
|
1013 |
-
},
|
1014 |
-
"dist": {
|
1015 |
-
"type": "zip",
|
1016 |
-
"url": "https://api.github.com/repos/Badcow/LoremIpsum/zipball/7e685497e92d71d0ebbd067d51892f3308cc72e1",
|
1017 |
-
"reference": "7e685497e92d71d0ebbd067d51892f3308cc72e1",
|
1018 |
-
"shasum": ""
|
1019 |
-
},
|
1020 |
-
"require": {
|
1021 |
-
"php": ">=5.3.9"
|
1022 |
-
},
|
1023 |
-
"suggest": {
|
1024 |
-
"twig/twig": "Twig is a template language for PHP, released under the new BSD license (code and documentation)."
|
1025 |
-
},
|
1026 |
-
"type": "library",
|
1027 |
-
"autoload": {
|
1028 |
-
"psr-4": {
|
1029 |
-
"Badcow\\LoremIpsum\\": "lib/"
|
1030 |
-
}
|
1031 |
-
},
|
1032 |
-
"notification-url": "https://packagist.org/downloads/",
|
1033 |
-
"license": [
|
1034 |
-
"MIT"
|
1035 |
-
],
|
1036 |
-
"authors": [
|
1037 |
-
{
|
1038 |
-
"name": "Sam Williams",
|
1039 |
-
"email": "sam@badcow.co"
|
1040 |
-
},
|
1041 |
-
{
|
1042 |
-
"name": "Mathew Tinsley",
|
1043 |
-
"email": "tinsley@tinsology.net"
|
1044 |
-
}
|
1045 |
-
],
|
1046 |
-
"description": "Lorem ipsum generator.",
|
1047 |
-
"time": "2015-04-10 00:15:43"
|
1048 |
-
},
|
1049 |
-
{
|
1050 |
-
"name": "codeception/codeception",
|
1051 |
-
"version": "2.0.13",
|
1052 |
-
"source": {
|
1053 |
-
"type": "git",
|
1054 |
-
"url": "https://github.com/Codeception/Codeception.git",
|
1055 |
-
"reference": "2a7aed27b78e90699a8ef43182eede6cfa0f5a5b"
|
1056 |
-
},
|
1057 |
-
"dist": {
|
1058 |
-
"type": "zip",
|
1059 |
-
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/2a7aed27b78e90699a8ef43182eede6cfa0f5a5b",
|
1060 |
-
"reference": "2a7aed27b78e90699a8ef43182eede6cfa0f5a5b",
|
1061 |
-
"shasum": ""
|
1062 |
-
},
|
1063 |
-
"require": {
|
1064 |
-
"ext-json": "*",
|
1065 |
-
"ext-mbstring": "*",
|
1066 |
-
"facebook/webdriver": "~0.4|~0.5",
|
1067 |
-
"guzzlehttp/guzzle": "~4.0|~5.0",
|
1068 |
-
"php": ">=5.4.0",
|
1069 |
-
"phpunit/phpunit": "~4.6.0",
|
1070 |
-
"symfony/browser-kit": "~2.4",
|
1071 |
-
"symfony/console": "~2.4",
|
1072 |
-
"symfony/css-selector": "~2.4",
|
1073 |
-
"symfony/dom-crawler": "~2.4,!=2.4.5",
|
1074 |
-
"symfony/event-dispatcher": "~2.4",
|
1075 |
-
"symfony/finder": "~2.4",
|
1076 |
-
"symfony/yaml": "~2.4"
|
1077 |
-
},
|
1078 |
-
"require-dev": {
|
1079 |
-
"codeception/specify": "~0.3",
|
1080 |
-
"facebook/php-sdk": "~3.2",
|
1081 |
-
"flow/jsonpath": "~0.2",
|
1082 |
-
"monolog/monolog": "~1.8",
|
1083 |
-
"pda/pheanstalk": "~2.0",
|
1084 |
-
"videlalvaro/php-amqplib": "~2.4"
|
1085 |
-
},
|
1086 |
-
"suggest": {
|
1087 |
-
"codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests",
|
1088 |
-
"codeception/specify": "BDD-style code blocks",
|
1089 |
-
"codeception/verify": "BDD-style assertions",
|
1090 |
-
"monolog/monolog": "Log test steps",
|
1091 |
-
"phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module."
|
1092 |
-
},
|
1093 |
-
"bin": [
|
1094 |
-
"codecept"
|
1095 |
-
],
|
1096 |
-
"type": "library",
|
1097 |
-
"extra": {
|
1098 |
-
"branch-alias": {
|
1099 |
-
"dev-master": "2.1-dev"
|
1100 |
-
}
|
1101 |
-
},
|
1102 |
-
"autoload": {
|
1103 |
-
"psr-0": {
|
1104 |
-
"Codeception": "src"
|
1105 |
-
}
|
1106 |
-
},
|
1107 |
-
"notification-url": "https://packagist.org/downloads/",
|
1108 |
-
"license": [
|
1109 |
-
"MIT"
|
1110 |
-
],
|
1111 |
-
"authors": [
|
1112 |
-
{
|
1113 |
-
"name": "Michael Bodnarchuk",
|
1114 |
-
"email": "davert@mail.ua",
|
1115 |
-
"homepage": "http://codegyre.com"
|
1116 |
-
}
|
1117 |
-
],
|
1118 |
-
"description": "BDD-style testing framework",
|
1119 |
-
"homepage": "http://codeception.com/",
|
1120 |
-
"keywords": [
|
1121 |
-
"BDD",
|
1122 |
-
"TDD",
|
1123 |
-
"acceptance testing",
|
1124 |
-
"functional testing",
|
1125 |
-
"unit testing"
|
1126 |
-
],
|
1127 |
-
"time": "2015-04-24 23:54:03"
|
1128 |
-
},
|
1129 |
-
{
|
1130 |
-
"name": "codeception/specify",
|
1131 |
-
"version": "0.4.1",
|
1132 |
-
"source": {
|
1133 |
-
"type": "git",
|
1134 |
-
"url": "https://github.com/Codeception/Specify.git",
|
1135 |
-
"reference": "0c0ae07adfc231115b3b72ade22f44c23c199ded"
|
1136 |
-
},
|
1137 |
-
"dist": {
|
1138 |
-
"type": "zip",
|
1139 |
-
"url": "https://api.github.com/repos/Codeception/Specify/zipball/0c0ae07adfc231115b3b72ade22f44c23c199ded",
|
1140 |
-
"reference": "0c0ae07adfc231115b3b72ade22f44c23c199ded",
|
1141 |
-
"shasum": ""
|
1142 |
-
},
|
1143 |
-
"require": {
|
1144 |
-
"myclabs/deep-copy": "~1.1",
|
1145 |
-
"php": ">=5.4.0"
|
1146 |
-
},
|
1147 |
-
"require-dev": {
|
1148 |
-
"phpunit/phpunit": "~4.0"
|
1149 |
-
},
|
1150 |
-
"type": "library",
|
1151 |
-
"autoload": {
|
1152 |
-
"psr-0": {
|
1153 |
-
"Codeception\\": "src/"
|
1154 |
-
}
|
1155 |
-
},
|
1156 |
-
"notification-url": "https://packagist.org/downloads/",
|
1157 |
-
"authors": [
|
1158 |
-
{
|
1159 |
-
"name": "Michael Bodnarchuk",
|
1160 |
-
"email": "davert.php@mailican.com"
|
1161 |
-
}
|
1162 |
-
],
|
1163 |
-
"description": "BDD code blocks for PHPUnit and Codeception",
|
1164 |
-
"time": "2014-10-17 00:06:51"
|
1165 |
-
},
|
1166 |
-
{
|
1167 |
-
"name": "facebook/webdriver",
|
1168 |
-
"version": "v0.6.0",
|
1169 |
-
"source": {
|
1170 |
-
"type": "git",
|
1171 |
-
"url": "https://github.com/facebook/php-webdriver.git",
|
1172 |
-
"reference": "2c5b305ea91b00ebbc433ad1663b7f16c1b31ec5"
|
1173 |
-
},
|
1174 |
-
"dist": {
|
1175 |
-
"type": "zip",
|
1176 |
-
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/2c5b305ea91b00ebbc433ad1663b7f16c1b31ec5",
|
1177 |
-
"reference": "2c5b305ea91b00ebbc433ad1663b7f16c1b31ec5",
|
1178 |
-
"shasum": ""
|
1179 |
-
},
|
1180 |
-
"require": {
|
1181 |
-
"php": ">=5.3.19"
|
1182 |
-
},
|
1183 |
-
"require-dev": {
|
1184 |
-
"phpdocumentor/phpdocumentor": "2.*",
|
1185 |
-
"phpunit/phpunit": "3.7.*"
|
1186 |
-
},
|
1187 |
-
"type": "library",
|
1188 |
-
"autoload": {
|
1189 |
-
"classmap": [
|
1190 |
-
"lib/"
|
1191 |
-
]
|
1192 |
-
},
|
1193 |
-
"notification-url": "https://packagist.org/downloads/",
|
1194 |
-
"license": [
|
1195 |
-
"Apache-2.0"
|
1196 |
-
],
|
1197 |
-
"description": "A php client for WebDriver",
|
1198 |
-
"homepage": "https://github.com/facebook/php-webdriver",
|
1199 |
-
"keywords": [
|
1200 |
-
"facebook",
|
1201 |
-
"php",
|
1202 |
-
"selenium",
|
1203 |
-
"webdriver"
|
1204 |
-
],
|
1205 |
-
"time": "2015-02-09 19:39:34"
|
1206 |
-
},
|
1207 |
-
{
|
1208 |
-
"name": "guzzlehttp/guzzle",
|
1209 |
-
"version": "5.3.0",
|
1210 |
-
"source": {
|
1211 |
-
"type": "git",
|
1212 |
-
"url": "https://github.com/guzzle/guzzle.git",
|
1213 |
-
"reference": "f3c8c22471cb55475105c14769644a49c3262b93"
|
1214 |
-
},
|
1215 |
-
"dist": {
|
1216 |
-
"type": "zip",
|
1217 |
-
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93",
|
1218 |
-
"reference": "f3c8c22471cb55475105c14769644a49c3262b93",
|
1219 |
-
"shasum": ""
|
1220 |
-
},
|
1221 |
-
"require": {
|
1222 |
-
"guzzlehttp/ringphp": "^1.1",
|
1223 |
-
"php": ">=5.4.0"
|
1224 |
-
},
|
1225 |
-
"require-dev": {
|
1226 |
-
"ext-curl": "*",
|
1227 |
-
"phpunit/phpunit": "^4.0",
|
1228 |
-
"psr/log": "^1.0"
|
1229 |
-
},
|
1230 |
-
"type": "library",
|
1231 |
-
"extra": {
|
1232 |
-
"branch-alias": {
|
1233 |
-
"dev-master": "5.0-dev"
|
1234 |
-
}
|
1235 |
-
},
|
1236 |
-
"autoload": {
|
1237 |
-
"psr-4": {
|
1238 |
-
"GuzzleHttp\\": "src/"
|
1239 |
-
}
|
1240 |
-
},
|
1241 |
-
"notification-url": "https://packagist.org/downloads/",
|
1242 |
-
"license": [
|
1243 |
-
"MIT"
|
1244 |
-
],
|
1245 |
-
"authors": [
|
1246 |
-
{
|
1247 |
-
"name": "Michael Dowling",
|
1248 |
-
"email": "mtdowling@gmail.com",
|
1249 |
-
"homepage": "https://github.com/mtdowling"
|
1250 |
-
}
|
1251 |
-
],
|
1252 |
-
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
|
1253 |
-
"homepage": "http://guzzlephp.org/",
|
1254 |
-
"keywords": [
|
1255 |
-
"client",
|
1256 |
-
"curl",
|
1257 |
-
"framework",
|
1258 |
-
"http",
|
1259 |
-
"http client",
|
1260 |
-
"rest",
|
1261 |
-
"web service"
|
1262 |
-
],
|
1263 |
-
"time": "2015-05-20 03:47:55"
|
1264 |
-
},
|
1265 |
-
{
|
1266 |
-
"name": "guzzlehttp/ringphp",
|
1267 |
-
"version": "1.1.0",
|
1268 |
-
"source": {
|
1269 |
-
"type": "git",
|
1270 |
-
"url": "https://github.com/guzzle/RingPHP.git",
|
1271 |
-
"reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b"
|
1272 |
-
},
|
1273 |
-
"dist": {
|
1274 |
-
"type": "zip",
|
1275 |
-
"url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b",
|
1276 |
-
"reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b",
|
1277 |
-
"shasum": ""
|
1278 |
-
},
|
1279 |
-
"require": {
|
1280 |
-
"guzzlehttp/streams": "~3.0",
|
1281 |
-
"php": ">=5.4.0",
|
1282 |
-
"react/promise": "~2.0"
|
1283 |
-
},
|
1284 |
-
"require-dev": {
|
1285 |
-
"ext-curl": "*",
|
1286 |
-
"phpunit/phpunit": "~4.0"
|
1287 |
-
},
|
1288 |
-
"suggest": {
|
1289 |
-
"ext-curl": "Guzzle will use specific adapters if cURL is present"
|
1290 |
-
},
|
1291 |
-
"type": "library",
|
1292 |
-
"extra": {
|
1293 |
-
"branch-alias": {
|
1294 |
-
"dev-master": "1.1-dev"
|
1295 |
-
}
|
1296 |
-
},
|
1297 |
-
"autoload": {
|
1298 |
-
"psr-4": {
|
1299 |
-
"GuzzleHttp\\Ring\\": "src/"
|
1300 |
-
}
|
1301 |
-
},
|
1302 |
-
"notification-url": "https://packagist.org/downloads/",
|
1303 |
-
"license": [
|
1304 |
-
"MIT"
|
1305 |
-
],
|
1306 |
-
"authors": [
|
1307 |
-
{
|
1308 |
-
"name": "Michael Dowling",
|
1309 |
-
"email": "mtdowling@gmail.com",
|
1310 |
-
"homepage": "https://github.com/mtdowling"
|
1311 |
-
}
|
1312 |
-
],
|
1313 |
-
"description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
|
1314 |
-
"time": "2015-05-20 03:37:09"
|
1315 |
-
},
|
1316 |
-
{
|
1317 |
-
"name": "guzzlehttp/streams",
|
1318 |
-
"version": "3.0.0",
|
1319 |
-
"source": {
|
1320 |
-
"type": "git",
|
1321 |
-
"url": "https://github.com/guzzle/streams.git",
|
1322 |
-
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5"
|
1323 |
-
},
|
1324 |
-
"dist": {
|
1325 |
-
"type": "zip",
|
1326 |
-
"url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
|
1327 |
-
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
|
1328 |
-
"shasum": ""
|
1329 |
-
},
|
1330 |
-
"require": {
|
1331 |
-
"php": ">=5.4.0"
|
1332 |
-
},
|
1333 |
-
"require-dev": {
|
1334 |
-
"phpunit/phpunit": "~4.0"
|
1335 |
-
},
|
1336 |
-
"type": "library",
|
1337 |
-
"extra": {
|
1338 |
-
"branch-alias": {
|
1339 |
-
"dev-master": "3.0-dev"
|
1340 |
-
}
|
1341 |
-
},
|
1342 |
-
"autoload": {
|
1343 |
-
"psr-4": {
|
1344 |
-
"GuzzleHttp\\Stream\\": "src/"
|
1345 |
-
}
|
1346 |
-
},
|
1347 |
-
"notification-url": "https://packagist.org/downloads/",
|
1348 |
-
"license": [
|
1349 |
-
"MIT"
|
1350 |
-
],
|
1351 |
-
"authors": [
|
1352 |
-
{
|
1353 |
-
"name": "Michael Dowling",
|
1354 |
-
"email": "mtdowling@gmail.com",
|
1355 |
-
"homepage": "https://github.com/mtdowling"
|
1356 |
-
}
|
1357 |
-
],
|
1358 |
-
"description": "Provides a simple abstraction over streams of data",
|
1359 |
-
"homepage": "http://guzzlephp.org/",
|
1360 |
-
"keywords": [
|
1361 |
-
"Guzzle",
|
1362 |
-
"stream"
|
1363 |
-
],
|
1364 |
-
"time": "2014-10-12 19:18:40"
|
1365 |
-
},
|
1366 |
-
{
|
1367 |
-
"name": "lucatume/wp-browser",
|
1368 |
-
"version": "dev-master",
|
1369 |
-
"source": {
|
1370 |
-
"type": "git",
|
1371 |
-
"url": "https://github.com/lucatume/wp-browser.git",
|
1372 |
-
"reference": "b40a52b387dd169a2e873c27bd0b54c239b9c80c"
|
1373 |
-
},
|
1374 |
-
"dist": {
|
1375 |
-
"type": "zip",
|
1376 |
-
"url": "https://api.github.com/repos/lucatume/wp-browser/zipball/b40a52b387dd169a2e873c27bd0b54c239b9c80c",
|
1377 |
-
"reference": "b40a52b387dd169a2e873c27bd0b54c239b9c80c",
|
1378 |
-
"shasum": ""
|
1379 |
-
},
|
1380 |
-
"require": {
|
1381 |
-
"bacon/bacon-string-utils": "~1.0",
|
1382 |
-
"badcow/lorem-ipsum": "~1.0",
|
1383 |
-
"codeception/codeception": "~2.0",
|
1384 |
-
"php": ">=5.4.0"
|
1385 |
-
},
|
1386 |
-
"require-dev": {
|
1387 |
-
"codeception/codeception": "*"
|
1388 |
-
},
|
1389 |
-
"bin": [
|
1390 |
-
"wpcept"
|
1391 |
-
],
|
1392 |
-
"type": "library",
|
1393 |
-
"autoload": {
|
1394 |
-
"psr-4": {
|
1395 |
-
"Codeception\\Module\\": "src/",
|
1396 |
-
"Codeception\\Lib\\Driver\\": "src/",
|
1397 |
-
"Codeception\\Command\\": "src/",
|
1398 |
-
"Codeception\\Lib\\Generator\\": "src/",
|
1399 |
-
"tad\\wordpress\\maker\\": "src/",
|
1400 |
-
"tad\\wordpress\\loader\\": "src/"
|
1401 |
-
}
|
1402 |
-
},
|
1403 |
-
"notification-url": "https://packagist.org/downloads/",
|
1404 |
-
"license": [
|
1405 |
-
"MIT"
|
1406 |
-
],
|
1407 |
-
"authors": [
|
1408 |
-
{
|
1409 |
-
"name": "theAverageDev (Luca Tumedei)",
|
1410 |
-
"email": "luca@theaveragedev.com",
|
1411 |
-
"homepage": "http://theaveragedev.com",
|
1412 |
-
"role": "Developer"
|
1413 |
-
}
|
1414 |
-
],
|
1415 |
-
"description": "WordPress extension of the PhpBrowser class.",
|
1416 |
-
"homepage": "http://github.com/lucatume/wp-browser",
|
1417 |
-
"keywords": [
|
1418 |
-
"codeception",
|
1419 |
-
"wordpress"
|
1420 |
-
],
|
1421 |
-
"time": "2015-07-09 14:41:10"
|
1422 |
-
},
|
1423 |
-
{
|
1424 |
-
"name": "mustache/mustache",
|
1425 |
-
"version": "v2.8.0",
|
1426 |
-
"source": {
|
1427 |
-
"type": "git",
|
1428 |
-
"url": "https://github.com/bobthecow/mustache.php.git",
|
1429 |
-
"reference": "64c28cc73e01d5edcef7de8cb2b16782615f648a"
|
1430 |
-
},
|
1431 |
-
"dist": {
|
1432 |
-
"type": "zip",
|
1433 |
-
"url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/64c28cc73e01d5edcef7de8cb2b16782615f648a",
|
1434 |
-
"reference": "64c28cc73e01d5edcef7de8cb2b16782615f648a",
|
1435 |
-
"shasum": ""
|
1436 |
-
},
|
1437 |
-
"require": {
|
1438 |
-
"php": ">=5.2.4"
|
1439 |
-
},
|
1440 |
-
"require-dev": {
|
1441 |
-
"fabpot/php-cs-fixer": "~1.6",
|
1442 |
-
"phpunit/phpunit": "~3.7|~4.0"
|
1443 |
-
},
|
1444 |
-
"type": "library",
|
1445 |
-
"autoload": {
|
1446 |
-
"psr-0": {
|
1447 |
-
"Mustache": "src/"
|
1448 |
-
}
|
1449 |
-
},
|
1450 |
-
"notification-url": "https://packagist.org/downloads/",
|
1451 |
-
"license": [
|
1452 |
-
"MIT"
|
1453 |
-
],
|
1454 |
-
"authors": [
|
1455 |
-
{
|
1456 |
-
"name": "Justin Hileman",
|
1457 |
-
"email": "justin@justinhileman.info",
|
1458 |
-
"homepage": "http://justinhileman.com"
|
1459 |
-
}
|
1460 |
-
],
|
1461 |
-
"description": "A Mustache implementation in PHP.",
|
1462 |
-
"homepage": "https://github.com/bobthecow/mustache.php",
|
1463 |
-
"keywords": [
|
1464 |
-
"mustache",
|
1465 |
-
"templating"
|
1466 |
-
],
|
1467 |
-
"time": "2015-04-01 06:37:33"
|
1468 |
-
},
|
1469 |
-
{
|
1470 |
-
"name": "myclabs/deep-copy",
|
1471 |
-
"version": "1.3.0",
|
1472 |
-
"source": {
|
1473 |
-
"type": "git",
|
1474 |
-
"url": "https://github.com/myclabs/DeepCopy.git",
|
1475 |
-
"reference": "96fbdc07635989c35c5a1912379f4c4b2ab15fd5"
|
1476 |
-
},
|
1477 |
-
"dist": {
|
1478 |
-
"type": "zip",
|
1479 |
-
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/96fbdc07635989c35c5a1912379f4c4b2ab15fd5",
|
1480 |
-
"reference": "96fbdc07635989c35c5a1912379f4c4b2ab15fd5",
|
1481 |
-
"shasum": ""
|
1482 |
-
},
|
1483 |
-
"require": {
|
1484 |
-
"php": ">=5.4.0"
|
1485 |
-
},
|
1486 |
-
"require-dev": {
|
1487 |
-
"doctrine/collections": "1.*",
|
1488 |
-
"phpunit/phpunit": "~4.1"
|
1489 |
-
},
|
1490 |
-
"type": "library",
|
1491 |
-
"autoload": {
|
1492 |
-
"psr-4": {
|
1493 |
-
"DeepCopy\\": "src/DeepCopy/"
|
1494 |
-
}
|
1495 |
-
},
|
1496 |
-
"notification-url": "https://packagist.org/downloads/",
|
1497 |
-
"license": [
|
1498 |
-
"MIT"
|
1499 |
-
],
|
1500 |
-
"description": "Create deep copies (clones) of your objects",
|
1501 |
-
"homepage": "https://github.com/myclabs/DeepCopy",
|
1502 |
-
"keywords": [
|
1503 |
-
"clone",
|
1504 |
-
"copy",
|
1505 |
-
"duplicate",
|
1506 |
-
"object",
|
1507 |
-
"object graph"
|
1508 |
-
],
|
1509 |
-
"time": "2015-03-21 22:40:23"
|
1510 |
-
},
|
1511 |
-
{
|
1512 |
-
"name": "nb/oxymel",
|
1513 |
-
"version": "v0.1.0",
|
1514 |
-
"source": {
|
1515 |
-
"type": "git",
|
1516 |
-
"url": "https://github.com/nb/oxymel.git",
|
1517 |
-
"reference": "cbe626ef55d5c4cc9b5e6e3904b395861ea76e3c"
|
1518 |
-
},
|
1519 |
-
"dist": {
|
1520 |
-
"type": "zip",
|
1521 |
-
"url": "https://api.github.com/repos/nb/oxymel/zipball/cbe626ef55d5c4cc9b5e6e3904b395861ea76e3c",
|
1522 |
-
"reference": "cbe626ef55d5c4cc9b5e6e3904b395861ea76e3c",
|
1523 |
-
"shasum": ""
|
1524 |
-
},
|
1525 |
-
"require": {
|
1526 |
-
"php": ">=5.2.4"
|
1527 |
-
},
|
1528 |
-
"type": "library",
|
1529 |
-
"autoload": {
|
1530 |
-
"psr-0": {
|
1531 |
-
"Oxymel": ""
|
1532 |
-
}
|
1533 |
-
},
|
1534 |
-
"notification-url": "https://packagist.org/downloads/",
|
1535 |
-
"license": [
|
1536 |
-
"MIT"
|
1537 |
-
],
|
1538 |
-
"authors": [
|
1539 |
-
{
|
1540 |
-
"name": "Nikolay Bachiyski",
|
1541 |
-
"email": "nb@nikolay.bg",
|
1542 |
-
"homepage": "http://extrapolate.me/"
|
1543 |
-
}
|
1544 |
-
],
|
1545 |
-
"description": "A sweet XML builder",
|
1546 |
-
"homepage": "https://github.com/nb/oxymel",
|
1547 |
-
"keywords": [
|
1548 |
-
"xml"
|
1549 |
-
],
|
1550 |
-
"time": "2013-02-24 15:01:54"
|
1551 |
-
},
|
1552 |
-
{
|
1553 |
-
"name": "ramsey/array_column",
|
1554 |
-
"version": "1.1.3",
|
1555 |
-
"source": {
|
1556 |
-
"type": "git",
|
1557 |
-
"url": "https://github.com/ramsey/array_column.git",
|
1558 |
-
"reference": "f8e52eb28e67eb50e613b451dd916abcf783c1db"
|
1559 |
-
},
|
1560 |
-
"dist": {
|
1561 |
-
"type": "zip",
|
1562 |
-
"url": "https://api.github.com/repos/ramsey/array_column/zipball/f8e52eb28e67eb50e613b451dd916abcf783c1db",
|
1563 |
-
"reference": "f8e52eb28e67eb50e613b451dd916abcf783c1db",
|
1564 |
-
"shasum": ""
|
1565 |
-
},
|
1566 |
-
"require-dev": {
|
1567 |
-
"jakub-onderka/php-parallel-lint": "0.8.*",
|
1568 |
-
"phpunit/phpunit": "~4.5",
|
1569 |
-
"satooshi/php-coveralls": "0.6.*",
|
1570 |
-
"squizlabs/php_codesniffer": "~2.2"
|
1571 |
-
},
|
1572 |
-
"type": "library",
|
1573 |
-
"autoload": {
|
1574 |
-
"files": [
|
1575 |
-
"src/array_column.php"
|
1576 |
-
]
|
1577 |
-
},
|
1578 |
-
"notification-url": "https://packagist.org/downloads/",
|
1579 |
-
"license": [
|
1580 |
-
"MIT"
|
1581 |
-
],
|
1582 |
-
"authors": [
|
1583 |
-
{
|
1584 |
-
"name": "Ben Ramsey",
|
1585 |
-
"homepage": "http://benramsey.com"
|
1586 |
-
}
|
1587 |
-
],
|
1588 |
-
"description": "Provides functionality for array_column() to projects using PHP earlier than version 5.5.",
|
1589 |
-
"homepage": "https://github.com/ramsey/array_column",
|
1590 |
-
"keywords": [
|
1591 |
-
"array",
|
1592 |
-
"array_column",
|
1593 |
-
"column"
|
1594 |
-
],
|
1595 |
-
"time": "2015-03-20 22:07:39"
|
1596 |
-
},
|
1597 |
-
{
|
1598 |
-
"name": "react/promise",
|
1599 |
-
"version": "v2.2.1",
|
1600 |
-
"source": {
|
1601 |
-
"type": "git",
|
1602 |
-
"url": "https://github.com/reactphp/promise.git",
|
1603 |
-
"reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627"
|
1604 |
-
},
|
1605 |
-
"dist": {
|
1606 |
-
"type": "zip",
|
1607 |
-
"url": "https://api.github.com/repos/reactphp/promise/zipball/3b6fca09c7d56321057fa8867c8dbe1abf648627",
|
1608 |
-
"reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627",
|
1609 |
-
"shasum": ""
|
1610 |
-
},
|
1611 |
-
"require": {
|
1612 |
-
"php": ">=5.4.0"
|
1613 |
-
},
|
1614 |
-
"type": "library",
|
1615 |
-
"extra": {
|
1616 |
-
"branch-alias": {
|
1617 |
-
"dev-master": "2.0-dev"
|
1618 |
-
}
|
1619 |
-
},
|
1620 |
-
"autoload": {
|
1621 |
-
"psr-4": {
|
1622 |
-
"React\\Promise\\": "src/"
|
1623 |
-
},
|
1624 |
-
"files": [
|
1625 |
-
"src/functions_include.php"
|
1626 |
-
]
|
1627 |
-
},
|
1628 |
-
"notification-url": "https://packagist.org/downloads/",
|
1629 |
-
"license": [
|
1630 |
-
"MIT"
|
1631 |
-
],
|
1632 |
-
"authors": [
|
1633 |
-
{
|
1634 |
-
"name": "Jan Sorgalla",
|
1635 |
-
"email": "jsorgalla@gmail.com"
|
1636 |
-
}
|
1637 |
-
],
|
1638 |
-
"description": "A lightweight implementation of CommonJS Promises/A for PHP",
|
1639 |
-
"time": "2015-07-03 13:48:55"
|
1640 |
-
},
|
1641 |
-
{
|
1642 |
-
"name": "rmccue/requests",
|
1643 |
-
"version": "v1.6.1",
|
1644 |
-
"source": {
|
1645 |
-
"type": "git",
|
1646 |
-
"url": "https://github.com/rmccue/Requests.git",
|
1647 |
-
"reference": "6aac485666c2955077d77b796bbdd25f0013a4ea"
|
1648 |
-
},
|
1649 |
-
"dist": {
|
1650 |
-
"type": "zip",
|
1651 |
-
"url": "https://api.github.com/repos/rmccue/Requests/zipball/6aac485666c2955077d77b796bbdd25f0013a4ea",
|
1652 |
-
"reference": "6aac485666c2955077d77b796bbdd25f0013a4ea",
|
1653 |
-
"shasum": ""
|
1654 |
-
},
|
1655 |
-
"require": {
|
1656 |
-
"php": ">=5.2"
|
1657 |
-
},
|
1658 |
-
"require-dev": {
|
1659 |
-
"satooshi/php-coveralls": "dev-master"
|
1660 |
-
},
|
1661 |
-
"type": "library",
|
1662 |
-
"autoload": {
|
1663 |
-
"psr-0": {
|
1664 |
-
"Requests": "library/"
|
1665 |
-
}
|
1666 |
-
},
|
1667 |
-
"notification-url": "https://packagist.org/downloads/",
|
1668 |
-
"license": [
|
1669 |
-
"ISC"
|
1670 |
-
],
|
1671 |
-
"authors": [
|
1672 |
-
{
|
1673 |
-
"name": "Ryan McCue",
|
1674 |
-
"homepage": "http://ryanmccue.info"
|
1675 |
-
}
|
1676 |
-
],
|
1677 |
-
"description": "A HTTP library written in PHP, for human beings.",
|
1678 |
-
"homepage": "http://github.com/rmccue/Requests",
|
1679 |
-
"keywords": [
|
1680 |
-
"curl",
|
1681 |
-
"fsockopen",
|
1682 |
-
"http",
|
1683 |
-
"idna",
|
1684 |
-
"ipv6",
|
1685 |
-
"iri",
|
1686 |
-
"sockets"
|
1687 |
-
],
|
1688 |
-
"time": "2014-05-18 04:59:02"
|
1689 |
-
},
|
1690 |
-
{
|
1691 |
-
"name": "symfony/browser-kit",
|
1692 |
-
"version": "v2.7.1",
|
1693 |
-
"source": {
|
1694 |
-
"type": "git",
|
1695 |
-
"url": "https://github.com/symfony/BrowserKit.git",
|
1696 |
-
"reference": "d0a144a1a96d5dc90bed2814b2096a1322761672"
|
1697 |
-
},
|
1698 |
-
"dist": {
|
1699 |
-
"type": "zip",
|
1700 |
-
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/d0a144a1a96d5dc90bed2814b2096a1322761672",
|
1701 |
-
"reference": "d0a144a1a96d5dc90bed2814b2096a1322761672",
|
1702 |
-
"shasum": ""
|
1703 |
-
},
|
1704 |
-
"require": {
|
1705 |
-
"php": ">=5.3.9",
|
1706 |
-
"symfony/dom-crawler": "~2.0,>=2.0.5"
|
1707 |
-
},
|
1708 |
-
"require-dev": {
|
1709 |
-
"symfony/css-selector": "~2.0,>=2.0.5",
|
1710 |
-
"symfony/phpunit-bridge": "~2.7",
|
1711 |
-
"symfony/process": "~2.0,>=2.0.5"
|
1712 |
-
},
|
1713 |
-
"suggest": {
|
1714 |
-
"symfony/process": ""
|
1715 |
-
},
|
1716 |
-
"type": "library",
|
1717 |
-
"extra": {
|
1718 |
-
"branch-alias": {
|
1719 |
-
"dev-master": "2.7-dev"
|
1720 |
-
}
|
1721 |
-
},
|
1722 |
-
"autoload": {
|
1723 |
-
"psr-4": {
|
1724 |
-
"Symfony\\Component\\BrowserKit\\": ""
|
1725 |
-
}
|
1726 |
-
},
|
1727 |
-
"notification-url": "https://packagist.org/downloads/",
|
1728 |
-
"license": [
|
1729 |
-
"MIT"
|
1730 |
-
],
|
1731 |
-
"authors": [
|
1732 |
-
{
|
1733 |
-
"name": "Fabien Potencier",
|
1734 |
-
"email": "fabien@symfony.com"
|
1735 |
-
},
|
1736 |
-
{
|
1737 |
-
"name": "Symfony Community",
|
1738 |
-
"homepage": "https://symfony.com/contributors"
|
1739 |
-
}
|
1740 |
-
],
|
1741 |
-
"description": "Symfony BrowserKit Component",
|
1742 |
-
"homepage": "https://symfony.com",
|
1743 |
-
"time": "2015-06-04 20:11:48"
|
1744 |
-
},
|
1745 |
-
{
|
1746 |
-
"name": "symfony/console",
|
1747 |
-
"version": "v2.7.1",
|
1748 |
-
"source": {
|
1749 |
-
"type": "git",
|
1750 |
-
"url": "https://github.com/symfony/Console.git",
|
1751 |
-
"reference": "564398bc1f33faf92fc2ec86859983d30eb81806"
|
1752 |
-
},
|
1753 |
-
"dist": {
|
1754 |
-
"type": "zip",
|
1755 |
-
"url": "https://api.github.com/repos/symfony/Console/zipball/564398bc1f33faf92fc2ec86859983d30eb81806",
|
1756 |
-
"reference": "564398bc1f33faf92fc2ec86859983d30eb81806",
|
1757 |
-
"shasum": ""
|
1758 |
-
},
|
1759 |
-
"require": {
|
1760 |
-
"php": ">=5.3.9"
|
1761 |
-
},
|
1762 |
-
"require-dev": {
|
1763 |
-
"psr/log": "~1.0",
|
1764 |
-
"symfony/event-dispatcher": "~2.1",
|
1765 |
-
"symfony/phpunit-bridge": "~2.7",
|
1766 |
-
"symfony/process": "~2.1"
|
1767 |
-
},
|
1768 |
-
"suggest": {
|
1769 |
-
"psr/log": "For using the console logger",
|
1770 |
-
"symfony/event-dispatcher": "",
|
1771 |
-
"symfony/process": ""
|
1772 |
-
},
|
1773 |
-
"type": "library",
|
1774 |
-
"extra": {
|
1775 |
-
"branch-alias": {
|
1776 |
-
"dev-master": "2.7-dev"
|
1777 |
-
}
|
1778 |
-
},
|
1779 |
-
"autoload": {
|
1780 |
-
"psr-4": {
|
1781 |
-
"Symfony\\Component\\Console\\": ""
|
1782 |
-
}
|
1783 |
-
},
|
1784 |
-
"notification-url": "https://packagist.org/downloads/",
|
1785 |
-
"license": [
|
1786 |
-
"MIT"
|
1787 |
-
],
|
1788 |
-
"authors": [
|
1789 |
-
{
|
1790 |
-
"name": "Fabien Potencier",
|
1791 |
-
"email": "fabien@symfony.com"
|
1792 |
-
},
|
1793 |
-
{
|
1794 |
-
"name": "Symfony Community",
|
1795 |
-
"homepage": "https://symfony.com/contributors"
|
1796 |
-
}
|
1797 |
-
],
|
1798 |
-
"description": "Symfony Console Component",
|
1799 |
-
"homepage": "https://symfony.com",
|
1800 |
-
"time": "2015-06-10 15:30:22"
|
1801 |
-
},
|
1802 |
-
{
|
1803 |
-
"name": "symfony/css-selector",
|
1804 |
-
"version": "v2.7.1",
|
1805 |
-
"source": {
|
1806 |
-
"type": "git",
|
1807 |
-
"url": "https://github.com/symfony/CssSelector.git",
|
1808 |
-
"reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092"
|
1809 |
-
},
|
1810 |
-
"dist": {
|
1811 |
-
"type": "zip",
|
1812 |
-
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/0b5c07b516226b7dd32afbbc82fe547a469c5092",
|
1813 |
-
"reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092",
|
1814 |
-
"shasum": ""
|
1815 |
-
},
|
1816 |
-
"require": {
|
1817 |
-
"php": ">=5.3.9"
|
1818 |
-
},
|
1819 |
-
"require-dev": {
|
1820 |
-
"symfony/phpunit-bridge": "~2.7"
|
1821 |
-
},
|
1822 |
-
"type": "library",
|
1823 |
-
"extra": {
|
1824 |
-
"branch-alias": {
|
1825 |
-
"dev-master": "2.7-dev"
|
1826 |
-
}
|
1827 |
-
},
|
1828 |
-
"autoload": {
|
1829 |
-
"psr-4": {
|
1830 |
-
"Symfony\\Component\\CssSelector\\": ""
|
1831 |
-
}
|
1832 |
-
},
|
1833 |
-
"notification-url": "https://packagist.org/downloads/",
|
1834 |
-
"license": [
|
1835 |
-
"MIT"
|
1836 |
-
],
|
1837 |
-
"authors": [
|
1838 |
-
{
|
1839 |
-
"name": "Jean-François Simon",
|
1840 |
-
"email": "jeanfrancois.simon@sensiolabs.com"
|
1841 |
-
},
|
1842 |
-
{
|
1843 |
-
"name": "Fabien Potencier",
|
1844 |
-
"email": "fabien@symfony.com"
|
1845 |
-
},
|
1846 |
-
{
|
1847 |
-
"name": "Symfony Community",
|
1848 |
-
"homepage": "https://symfony.com/contributors"
|
1849 |
-
}
|
1850 |
-
],
|
1851 |
-
"description": "Symfony CssSelector Component",
|
1852 |
-
"homepage": "https://symfony.com",
|
1853 |
-
"time": "2015-05-15 13:33:16"
|
1854 |
-
},
|
1855 |
-
{
|
1856 |
-
"name": "symfony/dom-crawler",
|
1857 |
-
"version": "v2.7.1",
|
1858 |
-
"source": {
|
1859 |
-
"type": "git",
|
1860 |
-
"url": "https://github.com/symfony/DomCrawler.git",
|
1861 |
-
"reference": "11d8eb8ccc1533f4c2d89a025f674894fda520b3"
|
1862 |
-
},
|
1863 |
-
"dist": {
|
1864 |
-
"type": "zip",
|
1865 |
-
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/11d8eb8ccc1533f4c2d89a025f674894fda520b3",
|
1866 |
-
"reference": "11d8eb8ccc1533f4c2d89a025f674894fda520b3",
|
1867 |
-
"shasum": ""
|
1868 |
-
},
|
1869 |
-
"require": {
|
1870 |
-
"php": ">=5.3.9"
|
1871 |
-
},
|
1872 |
-
"require-dev": {
|
1873 |
-
"symfony/css-selector": "~2.3",
|
1874 |
-
"symfony/phpunit-bridge": "~2.7"
|
1875 |
-
},
|
1876 |
-
"suggest": {
|
1877 |
-
"symfony/css-selector": ""
|
1878 |
-
},
|
1879 |
-
"type": "library",
|
1880 |
-
"extra": {
|
1881 |
-
"branch-alias": {
|
1882 |
-
"dev-master": "2.7-dev"
|
1883 |
-
}
|
1884 |
-
},
|
1885 |
-
"autoload": {
|
1886 |
-
"psr-4": {
|
1887 |
-
"Symfony\\Component\\DomCrawler\\": ""
|
1888 |
-
}
|
1889 |
-
},
|
1890 |
-
"notification-url": "https://packagist.org/downloads/",
|
1891 |
-
"license": [
|
1892 |
-
"MIT"
|
1893 |
-
],
|
1894 |
-
"authors": [
|
1895 |
-
{
|
1896 |
-
"name": "Fabien Potencier",
|
1897 |
-
"email": "fabien@symfony.com"
|
1898 |
-
},
|
1899 |
-
{
|
1900 |
-
"name": "Symfony Community",
|
1901 |
-
"homepage": "https://symfony.com/contributors"
|
1902 |
-
}
|
1903 |
-
],
|
1904 |
-
"description": "Symfony DomCrawler Component",
|
1905 |
-
"homepage": "https://symfony.com",
|
1906 |
-
"time": "2015-05-22 14:54:25"
|
1907 |
-
},
|
1908 |
-
{
|
1909 |
-
"name": "symfony/event-dispatcher",
|
1910 |
-
"version": "v2.7.1",
|
1911 |
-
"source": {
|
1912 |
-
"type": "git",
|
1913 |
-
"url": "https://github.com/symfony/EventDispatcher.git",
|
1914 |
-
"reference": "be3c5ff8d503c46768aeb78ce6333051aa6f26d9"
|
1915 |
-
},
|
1916 |
-
"dist": {
|
1917 |
-
"type": "zip",
|
1918 |
-
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/be3c5ff8d503c46768aeb78ce6333051aa6f26d9",
|
1919 |
-
"reference": "be3c5ff8d503c46768aeb78ce6333051aa6f26d9",
|
1920 |
-
"shasum": ""
|
1921 |
-
},
|
1922 |
-
"require": {
|
1923 |
-
"php": ">=5.3.9"
|
1924 |
-
},
|
1925 |
-
"require-dev": {
|
1926 |
-
"psr/log": "~1.0",
|
1927 |
-
"symfony/config": "~2.0,>=2.0.5",
|
1928 |
-
"symfony/dependency-injection": "~2.6",
|
1929 |
-
"symfony/expression-language": "~2.6",
|
1930 |
-
"symfony/phpunit-bridge": "~2.7",
|
1931 |
-
"symfony/stopwatch": "~2.3"
|
1932 |
-
},
|
1933 |
-
"suggest": {
|
1934 |
-
"symfony/dependency-injection": "",
|
1935 |
-
"symfony/http-kernel": ""
|
1936 |
-
},
|
1937 |
-
"type": "library",
|
1938 |
-
"extra": {
|
1939 |
-
"branch-alias": {
|
1940 |
-
"dev-master": "2.7-dev"
|
1941 |
-
}
|
1942 |
-
},
|
1943 |
-
"autoload": {
|
1944 |
-
"psr-4": {
|
1945 |
-
"Symfony\\Component\\EventDispatcher\\": ""
|
1946 |
-
}
|
1947 |
-
},
|
1948 |
-
"notification-url": "https://packagist.org/downloads/",
|
1949 |
-
"license": [
|
1950 |
-
"MIT"
|
1951 |
-
],
|
1952 |
-
"authors": [
|
1953 |
-
{
|
1954 |
-
"name": "Fabien Potencier",
|
1955 |
-
"email": "fabien@symfony.com"
|
1956 |
-
},
|
1957 |
-
{
|
1958 |
-
"name": "Symfony Community",
|
1959 |
-
"homepage": "https://symfony.com/contributors"
|
1960 |
-
}
|
1961 |
-
],
|
1962 |
-
"description": "Symfony EventDispatcher Component",
|
1963 |
-
"homepage": "https://symfony.com",
|
1964 |
-
"time": "2015-06-08 09:37:21"
|
1965 |
-
},
|
1966 |
-
{
|
1967 |
-
"name": "symfony/finder",
|
1968 |
-
"version": "v2.7.1",
|
1969 |
-
"source": {
|
1970 |
-
"type": "git",
|
1971 |
-
"url": "https://github.com/symfony/Finder.git",
|
1972 |
-
"reference": "c13a40d638aeede1e8400f8c956c7f9246c05f75"
|
1973 |
-
},
|
1974 |
-
"dist": {
|
1975 |
-
"type": "zip",
|
1976 |
-
"url": "https://api.github.com/repos/symfony/Finder/zipball/c13a40d638aeede1e8400f8c956c7f9246c05f75",
|
1977 |
-
"reference": "c13a40d638aeede1e8400f8c956c7f9246c05f75",
|
1978 |
-
"shasum": ""
|
1979 |
-
},
|
1980 |
-
"require": {
|
1981 |
-
"php": ">=5.3.9"
|
1982 |
-
},
|
1983 |
-
"require-dev": {
|
1984 |
-
"symfony/phpunit-bridge": "~2.7"
|
1985 |
-
},
|
1986 |
-
"type": "library",
|
1987 |
-
"extra": {
|
1988 |
-
"branch-alias": {
|
1989 |
-
"dev-master": "2.7-dev"
|
1990 |
-
}
|
1991 |
-
},
|
1992 |
-
"autoload": {
|
1993 |
-
"psr-4": {
|
1994 |
-
"Symfony\\Component\\Finder\\": ""
|
1995 |
-
}
|
1996 |
-
},
|
1997 |
-
"notification-url": "https://packagist.org/downloads/",
|
1998 |
-
"license": [
|
1999 |
-
"MIT"
|
2000 |
-
],
|
2001 |
-
"authors": [
|
2002 |
-
{
|
2003 |
-
"name": "Fabien Potencier",
|
2004 |
-
"email": "fabien@symfony.com"
|
2005 |
-
},
|
2006 |
-
{
|
2007 |
-
"name": "Symfony Community",
|
2008 |
-
"homepage": "https://symfony.com/contributors"
|
2009 |
-
}
|
2010 |
-
],
|
2011 |
-
"description": "Symfony Finder Component",
|
2012 |
-
"homepage": "https://symfony.com",
|
2013 |
-
"time": "2015-06-04 20:11:48"
|
2014 |
-
},
|
2015 |
-
{
|
2016 |
-
"name": "wp-cli/php-cli-tools",
|
2017 |
-
"version": "v0.10.4",
|
2018 |
-
"source": {
|
2019 |
-
"type": "git",
|
2020 |
-
"url": "https://github.com/wp-cli/php-cli-tools.git",
|
2021 |
-
"reference": "228e8c1300675313e519b4195783aaa1a1a020bf"
|
2022 |
-
},
|
2023 |
-
"dist": {
|
2024 |
-
"type": "zip",
|
2025 |
-
"url": "https://api.github.com/repos/wp-cli/php-cli-tools/zipball/228e8c1300675313e519b4195783aaa1a1a020bf",
|
2026 |
-
"reference": "228e8c1300675313e519b4195783aaa1a1a020bf",
|
2027 |
-
"shasum": ""
|
2028 |
-
},
|
2029 |
-
"require": {
|
2030 |
-
"php": ">= 5.3.0"
|
2031 |
-
},
|
2032 |
-
"type": "library",
|
2033 |
-
"autoload": {
|
2034 |
-
"psr-0": {
|
2035 |
-
"cli": "lib/"
|
2036 |
-
},
|
2037 |
-
"files": [
|
2038 |
-
"lib/cli/cli.php"
|
2039 |
-
]
|
2040 |
-
},
|
2041 |
-
"notification-url": "https://packagist.org/downloads/",
|
2042 |
-
"license": [
|
2043 |
-
"MIT"
|
2044 |
-
],
|
2045 |
-
"authors": [
|
2046 |
-
{
|
2047 |
-
"name": "James Logsdon",
|
2048 |
-
"email": "jlogsdon@php.net",
|
2049 |
-
"role": "Developer"
|
2050 |
-
},
|
2051 |
-
{
|
2052 |
-
"name": "Daniel Bachhuber",
|
2053 |
-
"email": "daniel@handbuilt.co",
|
2054 |
-
"role": "Maintainer"
|
2055 |
-
}
|
2056 |
-
],
|
2057 |
-
"description": "Console utilities for PHP",
|
2058 |
-
"homepage": "http://github.com/wp-cli/php-cli-tools",
|
2059 |
-
"keywords": [
|
2060 |
-
"cli",
|
2061 |
-
"console"
|
2062 |
-
],
|
2063 |
-
"time": "2015-02-27 22:11:29"
|
2064 |
-
},
|
2065 |
-
{
|
2066 |
-
"name": "wp-cli/wp-cli",
|
2067 |
-
"version": "v0.19.1",
|
2068 |
-
"source": {
|
2069 |
-
"type": "git",
|
2070 |
-
"url": "https://github.com/wp-cli/wp-cli.git",
|
2071 |
-
"reference": "4734fc5c068af4c7de66e6710f118aa15463556e"
|
2072 |
-
},
|
2073 |
-
"dist": {
|
2074 |
-
"type": "zip",
|
2075 |
-
"url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/4734fc5c068af4c7de66e6710f118aa15463556e",
|
2076 |
-
"reference": "4734fc5c068af4c7de66e6710f118aa15463556e",
|
2077 |
-
"shasum": ""
|
2078 |
-
},
|
2079 |
-
"require": {
|
2080 |
-
"mustache/mustache": "~2.4",
|
2081 |
-
"nb/oxymel": "0.1.0",
|
2082 |
-
"php": ">=5.3.2",
|
2083 |
-
"ramsey/array_column": "~1.1",
|
2084 |
-
"rmccue/requests": "~1.6",
|
2085 |
-
"symfony/finder": "~2.3",
|
2086 |
-
"wp-cli/php-cli-tools": "0.10.4"
|
2087 |
-
},
|
2088 |
-
"require-dev": {
|
2089 |
-
"behat/behat": "2.5.*",
|
2090 |
-
"phpunit/phpunit": "3.7.*"
|
2091 |
-
},
|
2092 |
-
"suggest": {
|
2093 |
-
"psy/psysh": "Enhanced `wp shell` functionality"
|
2094 |
-
},
|
2095 |
-
"bin": [
|
2096 |
-
"bin/wp.bat",
|
2097 |
-
"bin/wp"
|
2098 |
-
],
|
2099 |
-
"type": "library",
|
2100 |
-
"autoload": {
|
2101 |
-
"psr-0": {
|
2102 |
-
"WP_CLI": "php"
|
2103 |
-
},
|
2104 |
-
"files": [
|
2105 |
-
"php/Spyc.php"
|
2106 |
-
],
|
2107 |
-
"classmap": [
|
2108 |
-
"php/export"
|
2109 |
-
]
|
2110 |
-
},
|
2111 |
-
"notification-url": "https://packagist.org/downloads/",
|
2112 |
-
"license": [
|
2113 |
-
"MIT"
|
2114 |
-
],
|
2115 |
-
"description": "A command line interface for WordPress",
|
2116 |
-
"homepage": "http://wp-cli.org",
|
2117 |
-
"keywords": [
|
2118 |
-
"cli",
|
2119 |
-
"wordpress"
|
2120 |
-
],
|
2121 |
-
"time": "2015-05-13 19:24:38"
|
2122 |
-
}
|
2123 |
-
],
|
2124 |
-
"aliases": [],
|
2125 |
-
"minimum-stability": "stable",
|
2126 |
-
"stability-flags": {
|
2127 |
-
"lucatume/wp-browser": 20
|
2128 |
-
},
|
2129 |
-
"prefer-stable": false,
|
2130 |
-
"prefer-lowest": false,
|
2131 |
-
"platform": {
|
2132 |
-
"php": ">=5.4.0",
|
2133 |
-
"ext-json": "*",
|
2134 |
-
"ext-mbstring": "*"
|
2135 |
-
},
|
2136 |
-
"platform-dev": []
|
2137 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
landing-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: The first true all-in-one Landing Page solution for WordPress, including ongoing conversion metrics, a/b split testing, unlimited design options and so much more!
|
6 |
-
Version: 2.0
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
Text Domain: landing-pages
|
@@ -38,7 +38,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
|
|
38 |
*/
|
39 |
private static function load_constants() {
|
40 |
|
41 |
-
define('LANDINGPAGES_CURRENT_VERSION', '2.0
|
42 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
43 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
44 |
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: The first true all-in-one Landing Page solution for WordPress, including ongoing conversion metrics, a/b split testing, unlimited design options and so much more!
|
6 |
+
Version: 2.1.0
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
Text Domain: landing-pages
|
38 |
*/
|
39 |
private static function load_constants() {
|
40 |
|
41 |
+
define('LANDINGPAGES_CURRENT_VERSION', '2.1.0' );
|
42 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
43 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
44 |
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
|
modules/module.redirect-ab-testing.php
CHANGED
@@ -56,7 +56,24 @@ class LP_Variation_Rotation {
|
|
56 |
self::$last_loaded_variation = ( isset( $_COOKIE['lp-loaded-variation-'.self::$permalink_name] ) ) ? $_COOKIE['lp-loaded-variation-'.self::$permalink_name] : null;
|
57 |
|
58 |
if ( self::$sticky_variations && self::$last_loaded_variation ) {
|
|
|
59 |
self::$destination_url = self::$last_loaded_variation;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
} else {
|
61 |
self::$variations = self::load_variations();
|
62 |
self::$marker = self::load_marker();
|
56 |
self::$last_loaded_variation = ( isset( $_COOKIE['lp-loaded-variation-'.self::$permalink_name] ) ) ? $_COOKIE['lp-loaded-variation-'.self::$permalink_name] : null;
|
57 |
|
58 |
if ( self::$sticky_variations && self::$last_loaded_variation ) {
|
59 |
+
|
60 |
self::$destination_url = self::$last_loaded_variation;
|
61 |
+
|
62 |
+
if (!isset($_GET)) {
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
|
66 |
+
$begin = (strstr(self::$destination_url, '?')) ? '' : '?';
|
67 |
+
|
68 |
+
/* Keep GET Params */
|
69 |
+
foreach ($_GET as $key=>$value) {
|
70 |
+
if ($key != "permalink_name"){
|
71 |
+
$old_params .= "&$key=" . $value;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
self::$destination_url = self::$destination_url.$begin.$old_params;
|
76 |
+
|
77 |
} else {
|
78 |
self::$variations = self::load_variations();
|
79 |
self::$marker = self::load_marker();
|
package.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "landing-pages",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"description": "Landing page plugin",
|
5 |
+
"main": "gulpfile.js",
|
6 |
+
"scripts": {
|
7 |
+
"test": "test",
|
8 |
+
"clean-tests": "rm -fr assets/tests",
|
9 |
+
"deploy": "npm run clean-tests && sh ./deploy.sh"
|
10 |
+
},
|
11 |
+
"repository": {
|
12 |
+
"type": "git",
|
13 |
+
"url": "https://davidwells@github.com/inboundnow/landing-pages.git"
|
14 |
+
},
|
15 |
+
"keywords": [
|
16 |
+
"cta",
|
17 |
+
"calls",
|
18 |
+
"to",
|
19 |
+
"action"
|
20 |
+
],
|
21 |
+
"author": "Inbound Now",
|
22 |
+
"license": "GPL",
|
23 |
+
"bugs": {
|
24 |
+
"url": "https://github.com/inboundnow/landing-pages/issues"
|
25 |
+
},
|
26 |
+
"homepage": "https://github.com/inboundnow/landing-pages",
|
27 |
+
"dependencies": {},
|
28 |
+
"devDependencies": {
|
29 |
+
"grunt-wp-readme-to-markdown": "^0.8.0",
|
30 |
+
"gulp": "^3.8.5",
|
31 |
+
"gulp-clean": "^0.2.4",
|
32 |
+
"gulp-concat": "~2.1.7",
|
33 |
+
"gulp-header": "^1.0.2",
|
34 |
+
"gulp-jshint": "^1.6.1",
|
35 |
+
"gulp-karma": "0.0.4",
|
36 |
+
"gulp-markdox": "^0.1.0",
|
37 |
+
"gulp-plumber": "~0.6.2",
|
38 |
+
"gulp-rename": "~1.1.0",
|
39 |
+
"gulp-uglify": "~0.3.0",
|
40 |
+
"jshint-stylish": "^0.2.0",
|
41 |
+
"karma": "^0.12.16",
|
42 |
+
"karma-chrome-launcher": "^0.1.5",
|
43 |
+
"karma-jasmine": "~0.2.0",
|
44 |
+
"karma-phantomjs-launcher": "^0.1.4",
|
45 |
+
"karma-spec-reporter": "0.0.13"
|
46 |
+
}
|
47 |
+
}
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== WordPress Landing Pages ===
|
2 |
|
3 |
-
Contributors: David Wells,
|
4 |
-
Donate link: mailto:
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
-
Tested up to: 4.2
|
10 |
-
Stable Tag: 2.0
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
@@ -73,6 +73,9 @@ The plugin is also fully extendable and has a number of actions, filters, and ho
|
|
73 |
|
74 |
== Changelog ==
|
75 |
|
|
|
|
|
|
|
76 |
= 2.0.5 =
|
77 |
* fix issue with pausing variation A and misbehaving statistics when A is deleted.
|
78 |
* fix issue with dropcap conversion area not displaying
|
1 |
=== WordPress Landing Pages ===
|
2 |
|
3 |
+
Contributors: Hudson Atwell, David Wells, Giulio Dapreala
|
4 |
+
Donate link: mailto:hudson@inboundnow.com
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
+
Tested up to: 4.4.2
|
10 |
+
Stable Tag: 2.1.0
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 2.1.0 =
|
77 |
+
* Preparing for Inbound Pro
|
78 |
+
|
79 |
= 2.0.5 =
|
80 |
* fix issue with pausing variation A and misbehaving statistics when A is deleted.
|
81 |
* fix issue with dropcap conversion area not displaying
|
shared/assets/css/admin/select2-spinner.gif
DELETED
Binary file
|
shared/assets/css/admin/select2.css
DELETED
@@ -1,680 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
3 |
-
*/
|
4 |
-
.select2-container {
|
5 |
-
margin: 0;
|
6 |
-
position: relative;
|
7 |
-
display: inline-block;
|
8 |
-
/* inline-block for ie7 */
|
9 |
-
zoom: 1;
|
10 |
-
*display: inline;
|
11 |
-
vertical-align: middle;
|
12 |
-
}
|
13 |
-
|
14 |
-
.select2-container,
|
15 |
-
.select2-drop,
|
16 |
-
.select2-search,
|
17 |
-
.select2-search input{
|
18 |
-
/**
|
19 |
-
Force border-box so that % widths fit the parent
|
20 |
-
container without overlap because of margin/padding.
|
21 |
-
|
22 |
-
More Info : http://www.quirksmode.org/css/box.html
|
23 |
-
*/
|
24 |
-
-webkit-box-sizing: border-box; /* webkit */
|
25 |
-
-khtml-box-sizing: border-box; /* konqueror */
|
26 |
-
-moz-box-sizing: border-box; /* firefox */
|
27 |
-
-ms-box-sizing: border-box; /* ie */
|
28 |
-
box-sizing: border-box; /* css3 */
|
29 |
-
}
|
30 |
-
|
31 |
-
.select2-container .select2-choice {
|
32 |
-
display: block;
|
33 |
-
height: 26px;
|
34 |
-
padding: 0 0 0 8px;
|
35 |
-
overflow: hidden;
|
36 |
-
position: relative;
|
37 |
-
|
38 |
-
border: 1px solid #aaa;
|
39 |
-
white-space: nowrap;
|
40 |
-
line-height: 26px;
|
41 |
-
color: #444;
|
42 |
-
text-decoration: none;
|
43 |
-
|
44 |
-
-webkit-border-radius: 4px;
|
45 |
-
-moz-border-radius: 4px;
|
46 |
-
border-radius: 4px;
|
47 |
-
|
48 |
-
-webkit-background-clip: padding-box;
|
49 |
-
-moz-background-clip: padding;
|
50 |
-
background-clip: padding-box;
|
51 |
-
|
52 |
-
-webkit-touch-callout: none;
|
53 |
-
-webkit-user-select: none;
|
54 |
-
-khtml-user-select: none;
|
55 |
-
-moz-user-select: none;
|
56 |
-
-ms-user-select: none;
|
57 |
-
user-select: none;
|
58 |
-
|
59 |
-
background-color: #fff;
|
60 |
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
|
61 |
-
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
|
62 |
-
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
|
63 |
-
background-image: -o-linear-gradient(bottom, #eeeeee 0%, #ffffff 50%);
|
64 |
-
background-image: -ms-linear-gradient(top, #ffffff 0%, #eeeeee 50%);
|
65 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
|
66 |
-
background-image: linear-gradient(top, #ffffff 0%, #eeeeee 50%);
|
67 |
-
}
|
68 |
-
|
69 |
-
.select2-container.select2-drop-above .select2-choice {
|
70 |
-
border-bottom-color: #aaa;
|
71 |
-
|
72 |
-
-webkit-border-radius:0 0 4px 4px;
|
73 |
-
-moz-border-radius:0 0 4px 4px;
|
74 |
-
border-radius:0 0 4px 4px;
|
75 |
-
|
76 |
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.9, white));
|
77 |
-
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%);
|
78 |
-
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%);
|
79 |
-
background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%);
|
80 |
-
background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 90%);
|
81 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
|
82 |
-
background-image: linear-gradient(top, #eeeeee 0%,#ffffff 90%);
|
83 |
-
}
|
84 |
-
|
85 |
-
.select2-container.select2-allowclear .select2-choice .select2-chosen {
|
86 |
-
margin-right: 42px;
|
87 |
-
}
|
88 |
-
|
89 |
-
.select2-container .select2-choice > .select2-chosen {
|
90 |
-
margin-right: 26px;
|
91 |
-
display: block;
|
92 |
-
overflow: hidden;
|
93 |
-
|
94 |
-
white-space: nowrap;
|
95 |
-
|
96 |
-
-ms-text-overflow: ellipsis;
|
97 |
-
-o-text-overflow: ellipsis;
|
98 |
-
text-overflow: ellipsis;
|
99 |
-
}
|
100 |
-
|
101 |
-
.select2-container .select2-choice abbr {
|
102 |
-
display: none;
|
103 |
-
width: 12px;
|
104 |
-
height: 12px;
|
105 |
-
position: absolute;
|
106 |
-
right: 24px;
|
107 |
-
top: 8px;
|
108 |
-
|
109 |
-
font-size: 1px;
|
110 |
-
text-decoration: none;
|
111 |
-
|
112 |
-
border: 0;
|
113 |
-
background: url('select2.png') right top no-repeat;
|
114 |
-
cursor: pointer;
|
115 |
-
outline: 0;
|
116 |
-
}
|
117 |
-
|
118 |
-
.select2-container.select2-allowclear .select2-choice abbr {
|
119 |
-
display: inline-block;
|
120 |
-
}
|
121 |
-
|
122 |
-
.select2-container .select2-choice abbr:hover {
|
123 |
-
background-position: right -11px;
|
124 |
-
cursor: pointer;
|
125 |
-
}
|
126 |
-
|
127 |
-
.select2-drop-undermask {
|
128 |
-
border: 0;
|
129 |
-
margin: 0;
|
130 |
-
padding: 0;
|
131 |
-
position: absolute;
|
132 |
-
left: 0;
|
133 |
-
top: 0;
|
134 |
-
z-index: 9998;
|
135 |
-
background-color: transparent;
|
136 |
-
filter: alpha(opacity=0);
|
137 |
-
}
|
138 |
-
|
139 |
-
.select2-drop-mask {
|
140 |
-
border: 0;
|
141 |
-
margin: 0;
|
142 |
-
padding: 0;
|
143 |
-
position: absolute;
|
144 |
-
left: 0;
|
145 |
-
top: 0;
|
146 |
-
z-index: 9998;
|
147 |
-
/* styles required for IE to work */
|
148 |
-
background-color: #fff;
|
149 |
-
opacity: 0;
|
150 |
-
filter: alpha(opacity=0);
|
151 |
-
}
|
152 |
-
|
153 |
-
.select2-drop {
|
154 |
-
width: 100%;
|
155 |
-
margin-top: -1px;
|
156 |
-
position: absolute;
|
157 |
-
z-index: 9999;
|
158 |
-
top: 100%;
|
159 |
-
|
160 |
-
background: #fff;
|
161 |
-
color: #000;
|
162 |
-
border: 1px solid #aaa;
|
163 |
-
border-top: 0;
|
164 |
-
|
165 |
-
-webkit-border-radius: 0 0 4px 4px;
|
166 |
-
-moz-border-radius: 0 0 4px 4px;
|
167 |
-
border-radius: 0 0 4px 4px;
|
168 |
-
|
169 |
-
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
170 |
-
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
171 |
-
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
172 |
-
}
|
173 |
-
|
174 |
-
.select2-drop-auto-width {
|
175 |
-
border-top: 1px solid #aaa;
|
176 |
-
width: auto;
|
177 |
-
}
|
178 |
-
|
179 |
-
.select2-drop-auto-width .select2-search {
|
180 |
-
padding-top: 4px;
|
181 |
-
}
|
182 |
-
|
183 |
-
.select2-drop.select2-drop-above {
|
184 |
-
margin-top: 1px;
|
185 |
-
border-top: 1px solid #aaa;
|
186 |
-
border-bottom: 0;
|
187 |
-
|
188 |
-
-webkit-border-radius: 4px 4px 0 0;
|
189 |
-
-moz-border-radius: 4px 4px 0 0;
|
190 |
-
border-radius: 4px 4px 0 0;
|
191 |
-
|
192 |
-
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
193 |
-
-moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
194 |
-
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
195 |
-
}
|
196 |
-
|
197 |
-
.select2-drop-active {
|
198 |
-
border: 1px solid #5897fb;
|
199 |
-
border-top: none;
|
200 |
-
}
|
201 |
-
|
202 |
-
.select2-drop.select2-drop-above.select2-drop-active {
|
203 |
-
border-top: 1px solid #5897fb;
|
204 |
-
}
|
205 |
-
|
206 |
-
.select2-container .select2-choice .select2-arrow {
|
207 |
-
display: inline-block;
|
208 |
-
width: 18px;
|
209 |
-
height: 100%;
|
210 |
-
position: absolute;
|
211 |
-
right: 0;
|
212 |
-
top: 0;
|
213 |
-
|
214 |
-
border-left: 1px solid #aaa;
|
215 |
-
-webkit-border-radius: 0 4px 4px 0;
|
216 |
-
-moz-border-radius: 0 4px 4px 0;
|
217 |
-
border-radius: 0 4px 4px 0;
|
218 |
-
|
219 |
-
-webkit-background-clip: padding-box;
|
220 |
-
-moz-background-clip: padding;
|
221 |
-
background-clip: padding-box;
|
222 |
-
|
223 |
-
background: #ccc;
|
224 |
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
|
225 |
-
background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
226 |
-
background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
227 |
-
background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
|
228 |
-
background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
|
229 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
|
230 |
-
background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
|
231 |
-
}
|
232 |
-
|
233 |
-
.select2-container .select2-choice .select2-arrow b {
|
234 |
-
display: block;
|
235 |
-
width: 100%;
|
236 |
-
height: 100%;
|
237 |
-
background: url('select2.png') no-repeat 0 1px;
|
238 |
-
}
|
239 |
-
|
240 |
-
.select2-search {
|
241 |
-
display: inline-block;
|
242 |
-
width: 100%;
|
243 |
-
min-height: 26px;
|
244 |
-
margin: 0;
|
245 |
-
padding-left: 4px;
|
246 |
-
padding-right: 4px;
|
247 |
-
|
248 |
-
position: relative;
|
249 |
-
z-index: 10000;
|
250 |
-
|
251 |
-
white-space: nowrap;
|
252 |
-
}
|
253 |
-
|
254 |
-
.select2-search input {
|
255 |
-
width: 100%;
|
256 |
-
height: auto !important;
|
257 |
-
min-height: 26px;
|
258 |
-
padding: 4px 20px 4px 5px;
|
259 |
-
margin: 0;
|
260 |
-
|
261 |
-
outline: 0;
|
262 |
-
font-family: sans-serif;
|
263 |
-
font-size: 1em;
|
264 |
-
|
265 |
-
border: 1px solid #aaa;
|
266 |
-
-webkit-border-radius: 0;
|
267 |
-
-moz-border-radius: 0;
|
268 |
-
border-radius: 0;
|
269 |
-
|
270 |
-
-webkit-box-shadow: none;
|
271 |
-
-moz-box-shadow: none;
|
272 |
-
box-shadow: none;
|
273 |
-
|
274 |
-
background: #fff url('select2.png') no-repeat 100% -22px;
|
275 |
-
background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
276 |
-
background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
277 |
-
background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
278 |
-
background: url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
279 |
-
background: url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
280 |
-
background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
281 |
-
}
|
282 |
-
|
283 |
-
.select2-drop.select2-drop-above .select2-search input {
|
284 |
-
margin-top: 4px;
|
285 |
-
}
|
286 |
-
|
287 |
-
.select2-search input.select2-active {
|
288 |
-
background: #fff url('select2-spinner.gif') no-repeat 100%;
|
289 |
-
background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
290 |
-
background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
291 |
-
background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
292 |
-
background: url('select2-spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
293 |
-
background: url('select2-spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
294 |
-
background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
295 |
-
}
|
296 |
-
|
297 |
-
.select2-container-active .select2-choice,
|
298 |
-
.select2-container-active .select2-choices {
|
299 |
-
border: 1px solid #5897fb;
|
300 |
-
outline: none;
|
301 |
-
|
302 |
-
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
303 |
-
-moz-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
304 |
-
box-shadow: 0 0 5px rgba(0,0,0,.3);
|
305 |
-
}
|
306 |
-
|
307 |
-
.select2-dropdown-open .select2-choice {
|
308 |
-
border-bottom-color: transparent;
|
309 |
-
-webkit-box-shadow: 0 1px 0 #fff inset;
|
310 |
-
-moz-box-shadow: 0 1px 0 #fff inset;
|
311 |
-
box-shadow: 0 1px 0 #fff inset;
|
312 |
-
|
313 |
-
-webkit-border-bottom-left-radius: 0;
|
314 |
-
-moz-border-radius-bottomleft: 0;
|
315 |
-
border-bottom-left-radius: 0;
|
316 |
-
|
317 |
-
-webkit-border-bottom-right-radius: 0;
|
318 |
-
-moz-border-radius-bottomright: 0;
|
319 |
-
border-bottom-right-radius: 0;
|
320 |
-
|
321 |
-
background-color: #eee;
|
322 |
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
|
323 |
-
background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
324 |
-
background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
325 |
-
background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
|
326 |
-
background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
327 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
|
328 |
-
background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
329 |
-
}
|
330 |
-
|
331 |
-
.select2-dropdown-open.select2-drop-above .select2-choice,
|
332 |
-
.select2-dropdown-open.select2-drop-above .select2-choices {
|
333 |
-
border: 1px solid #5897fb;
|
334 |
-
border-top-color: transparent;
|
335 |
-
|
336 |
-
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, white), color-stop(0.5, #eeeeee));
|
337 |
-
background-image: -webkit-linear-gradient(center top, white 0%, #eeeeee 50%);
|
338 |
-
background-image: -moz-linear-gradient(center top, white 0%, #eeeeee 50%);
|
339 |
-
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
340 |
-
background-image: -ms-linear-gradient(bottom, #ffffff 0%,#eeeeee 50%);
|
341 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
|
342 |
-
background-image: linear-gradient(bottom, #ffffff 0%,#eeeeee 50%);
|
343 |
-
}
|
344 |
-
|
345 |
-
.select2-dropdown-open .select2-choice .select2-arrow {
|
346 |
-
background: transparent;
|
347 |
-
border-left: none;
|
348 |
-
filter: none;
|
349 |
-
}
|
350 |
-
.select2-dropdown-open .select2-choice .select2-arrow b {
|
351 |
-
background-position: -18px 1px;
|
352 |
-
}
|
353 |
-
|
354 |
-
/* results */
|
355 |
-
.select2-results {
|
356 |
-
max-height: 200px;
|
357 |
-
padding: 0 0 0 4px;
|
358 |
-
margin: 4px 4px 4px 0;
|
359 |
-
position: relative;
|
360 |
-
overflow-x: hidden;
|
361 |
-
overflow-y: auto;
|
362 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
363 |
-
}
|
364 |
-
|
365 |
-
.select2-results ul.select2-result-sub {
|
366 |
-
margin: 0;
|
367 |
-
padding-left: 0;
|
368 |
-
}
|
369 |
-
|
370 |
-
.select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
|
371 |
-
.select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
|
372 |
-
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
|
373 |
-
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
|
374 |
-
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
|
375 |
-
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
|
376 |
-
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
|
377 |
-
|
378 |
-
.select2-results li {
|
379 |
-
list-style: none;
|
380 |
-
display: list-item;
|
381 |
-
background-image: none;
|
382 |
-
}
|
383 |
-
|
384 |
-
.select2-results li.select2-result-with-children > .select2-result-label {
|
385 |
-
font-weight: bold;
|
386 |
-
}
|
387 |
-
|
388 |
-
.select2-results .select2-result-label {
|
389 |
-
padding: 3px 7px 4px;
|
390 |
-
margin: 0;
|
391 |
-
cursor: pointer;
|
392 |
-
|
393 |
-
min-height: 1em;
|
394 |
-
|
395 |
-
-webkit-touch-callout: none;
|
396 |
-
-webkit-user-select: none;
|
397 |
-
-khtml-user-select: none;
|
398 |
-
-moz-user-select: none;
|
399 |
-
-ms-user-select: none;
|
400 |
-
user-select: none;
|
401 |
-
}
|
402 |
-
|
403 |
-
.select2-results .select2-highlighted {
|
404 |
-
background: #3875d7;
|
405 |
-
color: #fff;
|
406 |
-
}
|
407 |
-
|
408 |
-
.select2-results li em {
|
409 |
-
background: #feffde;
|
410 |
-
font-style: normal;
|
411 |
-
}
|
412 |
-
|
413 |
-
.select2-results .select2-highlighted em {
|
414 |
-
background: transparent;
|
415 |
-
}
|
416 |
-
|
417 |
-
.select2-results .select2-highlighted ul {
|
418 |
-
background: white;
|
419 |
-
color: #000;
|
420 |
-
}
|
421 |
-
|
422 |
-
|
423 |
-
.select2-results .select2-no-results,
|
424 |
-
.select2-results .select2-searching,
|
425 |
-
.select2-results .select2-selection-limit {
|
426 |
-
background: #f4f4f4;
|
427 |
-
display: list-item;
|
428 |
-
}
|
429 |
-
|
430 |
-
/**
|
431 |
-
disabled look for disabled choices in the results dropdown
|
432 |
-
*/
|
433 |
-
.select2-results .select2-disabled.select2-highlighted {
|
434 |
-
color: #666;
|
435 |
-
background: #f4f4f4;
|
436 |
-
display: list-item;
|
437 |
-
cursor: default;
|
438 |
-
}
|
439 |
-
.select2-results .select2-disabled {
|
440 |
-
background: #f4f4f4;
|
441 |
-
display: list-item;
|
442 |
-
cursor: default;
|
443 |
-
}
|
444 |
-
|
445 |
-
.select2-results .select2-selected {
|
446 |
-
display: none;
|
447 |
-
}
|
448 |
-
|
449 |
-
.select2-more-results.select2-active {
|
450 |
-
background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
|
451 |
-
}
|
452 |
-
|
453 |
-
.select2-more-results {
|
454 |
-
background: #f4f4f4;
|
455 |
-
display: list-item;
|
456 |
-
}
|
457 |
-
|
458 |
-
/* disabled styles */
|
459 |
-
|
460 |
-
.select2-container.select2-container-disabled .select2-choice {
|
461 |
-
background-color: #f4f4f4;
|
462 |
-
background-image: none;
|
463 |
-
border: 1px solid #ddd;
|
464 |
-
cursor: default;
|
465 |
-
}
|
466 |
-
|
467 |
-
.select2-container.select2-container-disabled .select2-choice .select2-arrow {
|
468 |
-
background-color: #f4f4f4;
|
469 |
-
background-image: none;
|
470 |
-
border-left: 0;
|
471 |
-
}
|
472 |
-
|
473 |
-
.select2-container.select2-container-disabled .select2-choice abbr {
|
474 |
-
display: none;
|
475 |
-
}
|
476 |
-
|
477 |
-
|
478 |
-
/* multiselect */
|
479 |
-
|
480 |
-
.select2-container-multi .select2-choices {
|
481 |
-
height: auto !important;
|
482 |
-
height: 1%;
|
483 |
-
margin: 0;
|
484 |
-
padding: 0;
|
485 |
-
position: relative;
|
486 |
-
|
487 |
-
border: 1px solid #aaa;
|
488 |
-
cursor: text;
|
489 |
-
overflow: hidden;
|
490 |
-
|
491 |
-
background-color: #fff;
|
492 |
-
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
493 |
-
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
494 |
-
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
495 |
-
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
496 |
-
background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
497 |
-
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
498 |
-
}
|
499 |
-
|
500 |
-
.select2-locked {
|
501 |
-
padding: 3px 5px 3px 5px !important;
|
502 |
-
}
|
503 |
-
|
504 |
-
.select2-container-multi .select2-choices {
|
505 |
-
min-height: 26px;
|
506 |
-
}
|
507 |
-
|
508 |
-
.select2-container-multi.select2-container-active .select2-choices {
|
509 |
-
border: 1px solid #5897fb;
|
510 |
-
outline: none;
|
511 |
-
|
512 |
-
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
513 |
-
-moz-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
514 |
-
box-shadow: 0 0 5px rgba(0,0,0,.3);
|
515 |
-
}
|
516 |
-
.select2-container-multi .select2-choices li {
|
517 |
-
float: left;
|
518 |
-
list-style: none;
|
519 |
-
}
|
520 |
-
.select2-container-multi .select2-choices .select2-search-field {
|
521 |
-
margin: 0;
|
522 |
-
padding: 0;
|
523 |
-
white-space: nowrap;
|
524 |
-
}
|
525 |
-
|
526 |
-
.select2-container-multi .select2-choices .select2-search-field input {
|
527 |
-
padding: 5px;
|
528 |
-
margin: 1px 0;
|
529 |
-
|
530 |
-
font-family: sans-serif;
|
531 |
-
font-size: 100%;
|
532 |
-
color: #666;
|
533 |
-
outline: 0;
|
534 |
-
border: 0;
|
535 |
-
-webkit-box-shadow: none;
|
536 |
-
-moz-box-shadow: none;
|
537 |
-
box-shadow: none;
|
538 |
-
background: transparent !important;
|
539 |
-
}
|
540 |
-
|
541 |
-
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
542 |
-
background: #fff url('select2-spinner.gif') no-repeat 100% !important;
|
543 |
-
}
|
544 |
-
|
545 |
-
.select2-default {
|
546 |
-
color: #999 !important;
|
547 |
-
}
|
548 |
-
|
549 |
-
.select2-container-multi .select2-choices .select2-search-choice {
|
550 |
-
padding: 6px 5px 6px 18px;
|
551 |
-
margin: 3px 0 3px 5px;
|
552 |
-
position: relative;
|
553 |
-
|
554 |
-
line-height: 13px;
|
555 |
-
color: #333;
|
556 |
-
cursor: default;
|
557 |
-
border: 1px solid #aaaaaa;
|
558 |
-
|
559 |
-
-webkit-border-radius: 3px;
|
560 |
-
-moz-border-radius: 3px;
|
561 |
-
border-radius: 3px;
|
562 |
-
|
563 |
-
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
564 |
-
-moz-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
565 |
-
box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
566 |
-
|
567 |
-
-webkit-background-clip: padding-box;
|
568 |
-
-moz-background-clip: padding;
|
569 |
-
background-clip: padding-box;
|
570 |
-
|
571 |
-
-webkit-touch-callout: none;
|
572 |
-
-webkit-user-select: none;
|
573 |
-
-khtml-user-select: none;
|
574 |
-
-moz-user-select: none;
|
575 |
-
-ms-user-select: none;
|
576 |
-
user-select: none;
|
577 |
-
|
578 |
-
background-color: #e4e4e4;
|
579 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0 );
|
580 |
-
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
581 |
-
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
582 |
-
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
583 |
-
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
584 |
-
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
585 |
-
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
586 |
-
}
|
587 |
-
.select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
|
588 |
-
cursor: default;
|
589 |
-
}
|
590 |
-
.select2-container-multi .select2-choices .select2-search-choice-focus {
|
591 |
-
background: #d4d4d4;
|
592 |
-
}
|
593 |
-
|
594 |
-
.select2-search-choice-close {
|
595 |
-
display: block;
|
596 |
-
width: 12px;
|
597 |
-
height: 13px;
|
598 |
-
position: absolute;
|
599 |
-
right: 3px;
|
600 |
-
top: 6px;
|
601 |
-
|
602 |
-
font-size: 1px;
|
603 |
-
outline: none;
|
604 |
-
background: url('select2.png') right top no-repeat;
|
605 |
-
}
|
606 |
-
|
607 |
-
.select2-container-multi .select2-search-choice-close {
|
608 |
-
left: 3px;
|
609 |
-
}
|
610 |
-
|
611 |
-
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
|
612 |
-
background-position: right -11px;
|
613 |
-
}
|
614 |
-
.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
|
615 |
-
background-position: right -11px;
|
616 |
-
}
|
617 |
-
|
618 |
-
/* disabled styles */
|
619 |
-
.select2-container-multi.select2-container-disabled .select2-choices{
|
620 |
-
background-color: #f4f4f4;
|
621 |
-
background-image: none;
|
622 |
-
border: 1px solid #ddd;
|
623 |
-
cursor: default;
|
624 |
-
}
|
625 |
-
|
626 |
-
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
|
627 |
-
padding: 3px 5px 3px 5px;
|
628 |
-
border: 1px solid #ddd;
|
629 |
-
background-image: none;
|
630 |
-
background-color: #f4f4f4;
|
631 |
-
}
|
632 |
-
|
633 |
-
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
|
634 |
-
background:none;
|
635 |
-
}
|
636 |
-
/* end multiselect */
|
637 |
-
|
638 |
-
|
639 |
-
.select2-result-selectable .select2-match,
|
640 |
-
.select2-result-unselectable .select2-match {
|
641 |
-
text-decoration: underline;
|
642 |
-
}
|
643 |
-
|
644 |
-
.select2-offscreen, .select2-offscreen:focus {
|
645 |
-
clip: rect(0 0 0 0);
|
646 |
-
width: 1px;
|
647 |
-
height: 1px;
|
648 |
-
border: 0;
|
649 |
-
margin: 0;
|
650 |
-
padding: 0;
|
651 |
-
overflow: hidden;
|
652 |
-
position: absolute;
|
653 |
-
outline: 0;
|
654 |
-
left: 0px;
|
655 |
-
}
|
656 |
-
|
657 |
-
.select2-display-none {
|
658 |
-
display: none;
|
659 |
-
}
|
660 |
-
|
661 |
-
.select2-measure-scrollbar {
|
662 |
-
position: absolute;
|
663 |
-
top: -10000px;
|
664 |
-
left: -10000px;
|
665 |
-
width: 100px;
|
666 |
-
height: 100px;
|
667 |
-
overflow: scroll;
|
668 |
-
}
|
669 |
-
/* Retina-ize icons */
|
670 |
-
|
671 |
-
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
|
672 |
-
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
|
673 |
-
background-image: url('select2.png') !important;
|
674 |
-
background-repeat: no-repeat !important;
|
675 |
-
background-size: 60px 40px !important;
|
676 |
-
}
|
677 |
-
.select2-search input {
|
678 |
-
background-position: 100% -21px !important;
|
679 |
-
}
|
680 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shared/assets/css/admin/select2.png
DELETED
Binary file
|
shared/assets/css/admin/select2x2.png
DELETED
Binary file
|
shared/assets/css/iframe-preview.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
/**
|
2 |
-
* This CSS is compiled from the THIS_FILE_NAME.post.css version of this file
|
3 |
-
* Any edits you make in this file will not be saved
|
4 |
-
*/
|
5 |
-
|
1 |
+
/**
|
2 |
+
* This CSS is compiled from the THIS_FILE_NAME.post.css version of this file
|
3 |
+
* Any edits you make in this file will not be saved
|
4 |
+
*/
|
5 |
+
|
shared/assets/fonts/fontawesome/css/font-awesome.css
DELETED
@@ -1,1566 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
|
3 |
-
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
4 |
-
*/
|
5 |
-
/* FONT PATH
|
6 |
-
* -------------------------- */
|
7 |
-
@font-face {
|
8 |
-
font-family: 'FontAwesome';
|
9 |
-
src: url('../fonts/fontawesome-webfont.eot?v=4.1.0');
|
10 |
-
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
|
11 |
-
font-weight: normal;
|
12 |
-
font-style: normal;
|
13 |
-
}
|
14 |
-
.fa {
|
15 |
-
display: inline-block;
|
16 |
-
font-family: FontAwesome;
|
17 |
-
font-style: normal;
|
18 |
-
font-weight: normal;
|
19 |
-
line-height: 1;
|
20 |
-
-webkit-font-smoothing: antialiased;
|
21 |
-
-moz-osx-font-smoothing: grayscale;
|
22 |
-
}
|
23 |
-
/* makes the font 33% larger relative to the icon container */
|
24 |
-
.fa-lg {
|
25 |
-
font-size: 1.33333333em;
|
26 |
-
line-height: 0.75em;
|
27 |
-
vertical-align: -15%;
|
28 |
-
}
|
29 |
-
.fa-2x {
|
30 |
-
font-size: 2em;
|
31 |
-
}
|
32 |
-
.fa-3x {
|
33 |
-
font-size: 3em;
|
34 |
-
}
|
35 |
-
.fa-4x {
|
36 |
-
font-size: 4em;
|
37 |
-
}
|
38 |
-
.fa-5x {
|
39 |
-
font-size: 5em;
|
40 |
-
}
|
41 |
-
.fa-fw {
|
42 |
-
width: 1.28571429em;
|
43 |
-
text-align: center;
|
44 |
-
}
|
45 |
-
.fa-ul {
|
46 |
-
padding-left: 0;
|
47 |
-
margin-left: 2.14285714em;
|
48 |
-
list-style-type: none;
|
49 |
-
}
|
50 |
-
.fa-ul > li {
|
51 |
-
position: relative;
|
52 |
-
}
|
53 |
-
.fa-li {
|
54 |
-
position: absolute;
|
55 |
-
left: -2.14285714em;
|
56 |
-
width: 2.14285714em;
|
57 |
-
top: 0.14285714em;
|
58 |
-
text-align: center;
|
59 |
-
}
|
60 |
-
.fa-li.fa-lg {
|
61 |
-
left: -1.85714286em;
|
62 |
-
}
|
63 |
-
.fa-border {
|
64 |
-
padding: .2em .25em .15em;
|
65 |
-
border: solid 0.08em #eeeeee;
|
66 |
-
border-radius: .1em;
|
67 |
-
}
|
68 |
-
.pull-right {
|
69 |
-
float: right;
|
70 |
-
}
|
71 |
-
.pull-left {
|
72 |
-
float: left;
|
73 |
-
}
|
74 |
-
.fa.pull-left {
|
75 |
-
margin-right: .3em;
|
76 |
-
}
|
77 |
-
.fa.pull-right {
|
78 |
-
margin-left: .3em;
|
79 |
-
}
|
80 |
-
.fa-spin {
|
81 |
-
-webkit-animation: spin 2s infinite linear;
|
82 |
-
-moz-animation: spin 2s infinite linear;
|
83 |
-
-o-animation: spin 2s infinite linear;
|
84 |
-
animation: spin 2s infinite linear;
|
85 |
-
}
|
86 |
-
@-moz-keyframes spin {
|
87 |
-
0% {
|
88 |
-
-moz-transform: rotate(0deg);
|
89 |
-
}
|
90 |
-
100% {
|
91 |
-
-moz-transform: rotate(359deg);
|
92 |
-
}
|
93 |
-
}
|
94 |
-
@-webkit-keyframes spin {
|
95 |
-
0% {
|
96 |
-
-webkit-transform: rotate(0deg);
|
97 |
-
}
|
98 |
-
100% {
|
99 |
-
-webkit-transform: rotate(359deg);
|
100 |
-
}
|
101 |
-
}
|
102 |
-
@-o-keyframes spin {
|
103 |
-
0% {
|
104 |
-
-o-transform: rotate(0deg);
|
105 |
-
}
|
106 |
-
100% {
|
107 |
-
-o-transform: rotate(359deg);
|
108 |
-
}
|
109 |
-
}
|
110 |
-
@keyframes spin {
|
111 |
-
0% {
|
112 |
-
-webkit-transform: rotate(0deg);
|
113 |
-
transform: rotate(0deg);
|
114 |
-
}
|
115 |
-
100% {
|
116 |
-
-webkit-transform: rotate(359deg);
|
117 |
-
transform: rotate(359deg);
|
118 |
-
}
|
119 |
-
}
|
120 |
-
.fa-rotate-90 {
|
121 |
-
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
122 |
-
-webkit-transform: rotate(90deg);
|
123 |
-
-moz-transform: rotate(90deg);
|
124 |
-
-ms-transform: rotate(90deg);
|
125 |
-
-o-transform: rotate(90deg);
|
126 |
-
transform: rotate(90deg);
|
127 |
-
}
|
128 |
-
.fa-rotate-180 {
|
129 |
-
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
|
130 |
-
-webkit-transform: rotate(180deg);
|
131 |
-
-moz-transform: rotate(180deg);
|
132 |
-
-ms-transform: rotate(180deg);
|
133 |
-
-o-transform: rotate(180deg);
|
134 |
-
transform: rotate(180deg);
|
135 |
-
}
|
136 |
-
.fa-rotate-270 {
|
137 |
-
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
138 |
-
-webkit-transform: rotate(270deg);
|
139 |
-
-moz-transform: rotate(270deg);
|
140 |
-
-ms-transform: rotate(270deg);
|
141 |
-
-o-transform: rotate(270deg);
|
142 |
-
transform: rotate(270deg);
|
143 |
-
}
|
144 |
-
.fa-flip-horizontal {
|
145 |
-
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
|
146 |
-
-webkit-transform: scale(-1, 1);
|
147 |
-
-moz-transform: scale(-1, 1);
|
148 |
-
-ms-transform: scale(-1, 1);
|
149 |
-
-o-transform: scale(-1, 1);
|
150 |
-
transform: scale(-1, 1);
|
151 |
-
}
|
152 |
-
.fa-flip-vertical {
|
153 |
-
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
|
154 |
-
-webkit-transform: scale(1, -1);
|
155 |
-
-moz-transform: scale(1, -1);
|
156 |
-
-ms-transform: scale(1, -1);
|
157 |
-
-o-transform: scale(1, -1);
|
158 |
-
transform: scale(1, -1);
|
159 |
-
}
|
160 |
-
.fa-stack {
|
161 |
-
position: relative;
|
162 |
-
display: inline-block;
|
163 |
-
width: 2em;
|
164 |
-
height: 2em;
|
165 |
-
line-height: 2em;
|
166 |
-
vertical-align: middle;
|
167 |
-
}
|
168 |
-
.fa-stack-1x,
|
169 |
-
.fa-stack-2x {
|
170 |
-
position: absolute;
|
171 |
-
left: 0;
|
172 |
-
width: 100%;
|
173 |
-
text-align: center;
|
174 |
-
}
|
175 |
-
.fa-stack-1x {
|
176 |
-
line-height: inherit;
|
177 |
-
}
|
178 |
-
.fa-stack-2x {
|
179 |
-
font-size: 2em;
|
180 |
-
}
|
181 |
-
.fa-inverse {
|
182 |
-
color: #ffffff;
|
183 |
-
}
|
184 |
-
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
185 |
-
readers do not read off random characters that represent icons */
|
186 |
-
.fa-glass:before {
|
187 |
-
content: "\f000";
|
188 |
-
}
|
189 |
-
.fa-music:before {
|
190 |
-
content: "\f001";
|
191 |
-
}
|
192 |
-
.fa-search:before {
|
193 |
-
content: "\f002";
|
194 |
-
}
|
195 |
-
.fa-envelope-o:before {
|
196 |
-
content: "\f003";
|
197 |
-
}
|
198 |
-
.fa-heart:before {
|
199 |
-
content: "\f004";
|
200 |
-
}
|
201 |
-
.fa-star:before {
|
202 |
-
content: "\f005";
|
203 |
-
}
|
204 |
-
.fa-star-o:before {
|
205 |
-
content: "\f006";
|
206 |
-
}
|
207 |
-
.fa-user:before {
|
208 |
-
content: "\f007";
|
209 |
-
}
|
210 |
-
.fa-film:before {
|
211 |
-
content: "\f008";
|
212 |
-
}
|
213 |
-
.fa-th-large:before {
|
214 |
-
content: "\f009";
|
215 |
-
}
|
216 |
-
.fa-th:before {
|
217 |
-
content: "\f00a";
|
218 |
-
}
|
219 |
-
.fa-th-list:before {
|
220 |
-
content: "\f00b";
|
221 |
-
}
|
222 |
-
.fa-check:before {
|
223 |
-
content: "\f00c";
|
224 |
-
}
|
225 |
-
.fa-times:before {
|
226 |
-
content: "\f00d";
|
227 |
-
}
|
228 |
-
.fa-search-plus:before {
|
229 |
-
content: "\f00e";
|
230 |
-
}
|
231 |
-
.fa-search-minus:before {
|
232 |
-
content: "\f010";
|
233 |
-
}
|
234 |
-
.fa-power-off:before {
|
235 |
-
content: "\f011";
|
236 |
-
}
|
237 |
-
.fa-signal:before {
|
238 |
-
content: "\f012";
|
239 |
-
}
|
240 |
-
.fa-gear:before,
|
241 |
-
.fa-cog:before {
|
242 |
-
content: "\f013";
|
243 |
-
}
|
244 |
-
.fa-trash-o:before {
|
245 |
-
content: "\f014";
|
246 |
-
}
|
247 |
-
.fa-home:before {
|
248 |
-
content: "\f015";
|
249 |
-
}
|
250 |
-
.fa-file-o:before {
|
251 |
-
content: "\f016";
|
252 |
-
}
|
253 |
-
.fa-clock-o:before {
|
254 |
-
content: "\f017";
|
255 |
-
}
|
256 |
-
.fa-road:before {
|
257 |
-
content: "\f018";
|
258 |
-
}
|
259 |
-
.fa-download:before {
|
260 |
-
content: "\f019";
|
261 |
-
}
|
262 |
-
.fa-arrow-circle-o-down:before {
|
263 |
-
content: "\f01a";
|
264 |
-
}
|
265 |
-
.fa-arrow-circle-o-up:before {
|
266 |
-
content: "\f01b";
|
267 |
-
}
|
268 |
-
.fa-inbox:before {
|
269 |
-
content: "\f01c";
|
270 |
-
}
|
271 |
-
.fa-play-circle-o:before {
|
272 |
-
content: "\f01d";
|
273 |
-
}
|
274 |
-
.fa-rotate-right:before,
|
275 |
-
.fa-repeat:before {
|
276 |
-
content: "\f01e";
|
277 |
-
}
|
278 |
-
.fa-refresh:before {
|
279 |
-
content: "\f021";
|
280 |
-
}
|
281 |
-
.fa-list-alt:before {
|
282 |
-
content: "\f022";
|
283 |
-
}
|
284 |
-
.fa-lock:before {
|
285 |
-
content: "\f023";
|
286 |
-
}
|
287 |
-
.fa-flag:before {
|
288 |
-
content: "\f024";
|
289 |
-
}
|
290 |
-
.fa-headphones:before {
|
291 |
-
content: "\f025";
|
292 |
-
}
|
293 |
-
.fa-volume-off:before {
|
294 |
-
content: "\f026";
|
295 |
-
}
|
296 |
-
.fa-volume-down:before {
|
297 |
-
content: "\f027";
|
298 |
-
}
|
299 |
-
.fa-volume-up:before {
|
300 |
-
content: "\f028";
|
301 |
-
}
|
302 |
-
.fa-qrcode:before {
|
303 |
-
content: "\f029";
|
304 |
-
}
|
305 |
-
.fa-barcode:before {
|
306 |
-
content: "\f02a";
|
307 |
-
}
|
308 |
-
.fa-tag:before {
|
309 |
-
content: "\f02b";
|
310 |
-
}
|
311 |
-
.fa-tags:before {
|
312 |
-
content: "\f02c";
|
313 |
-
}
|
314 |
-
.fa-book:before {
|
315 |
-
content: "\f02d";
|
316 |
-
}
|
317 |
-
.fa-bookmark:before {
|
318 |
-
content: "\f02e";
|
319 |
-
}
|
320 |
-
.fa-print:before {
|
321 |
-
content: "\f02f";
|
322 |
-
}
|
323 |
-
.fa-camera:before {
|
324 |
-
content: "\f030";
|
325 |
-
}
|
326 |
-
.fa-font:before {
|
327 |
-
content: "\f031";
|
328 |
-
}
|
329 |
-
.fa-bold:before {
|
330 |
-
content: "\f032";
|
331 |
-
}
|
332 |
-
.fa-italic:before {
|
333 |
-
content: "\f033";
|
334 |
-
}
|
335 |
-
.fa-text-height:before {
|
336 |
-
content: "\f034";
|
337 |
-
}
|
338 |
-
.fa-text-width:before {
|
339 |
-
content: "\f035";
|
340 |
-
}
|
341 |
-
.fa-align-left:before {
|
342 |
-
content: "\f036";
|
343 |
-
}
|
344 |
-
.fa-align-center:before {
|
345 |
-
content: "\f037";
|
346 |
-
}
|
347 |
-
.fa-align-right:before {
|
348 |
-
content: "\f038";
|
349 |
-
}
|
350 |
-
.fa-align-justify:before {
|
351 |
-
content: "\f039";
|
352 |
-
}
|
353 |
-
.fa-list:before {
|
354 |
-
content: "\f03a";
|
355 |
-
}
|
356 |
-
.fa-dedent:before,
|
357 |
-
.fa-outdent:before {
|
358 |
-
content: "\f03b";
|
359 |
-
}
|
360 |
-
.fa-indent:before {
|
361 |
-
content: "\f03c";
|
362 |
-
}
|
363 |
-
.fa-video-camera:before {
|
364 |
-
content: "\f03d";
|
365 |
-
}
|
366 |
-
.fa-photo:before,
|
367 |
-
.fa-image:before,
|
368 |
-
.fa-picture-o:before {
|
369 |
-
content: "\f03e";
|
370 |
-
}
|
371 |
-
.fa-pencil:before {
|
372 |
-
content: "\f040";
|
373 |
-
}
|
374 |
-
.fa-map-marker:before {
|
375 |
-
content: "\f041";
|
376 |
-
}
|
377 |
-
.fa-adjust:before {
|
378 |
-
content: "\f042";
|
379 |
-
}
|
380 |
-
.fa-tint:before {
|
381 |
-
content: "\f043";
|
382 |
-
}
|
383 |
-
.fa-edit:before,
|
384 |
-
.fa-pencil-square-o:before {
|
385 |
-
content: "\f044";
|
386 |
-
}
|
387 |
-
.fa-share-square-o:before {
|
388 |
-
content: "\f045";
|
389 |
-
}
|
390 |
-
.fa-check-square-o:before {
|
391 |
-
content: "\f046";
|
392 |
-
}
|
393 |
-
.fa-arrows:before {
|
394 |
-
content: "\f047";
|
395 |
-
}
|
396 |
-
.fa-step-backward:before {
|
397 |
-
content: "\f048";
|
398 |
-
}
|
399 |
-
.fa-fast-backward:before {
|
400 |
-
content: "\f049";
|
401 |
-
}
|
402 |
-
.fa-backward:before {
|
403 |
-
content: "\f04a";
|
404 |
-
}
|
405 |
-
.fa-play:before {
|
406 |
-
content: "\f04b";
|
407 |
-
}
|
408 |
-
.fa-pause:before {
|
409 |
-
content: "\f04c";
|
410 |
-
}
|
411 |
-
.fa-stop:before {
|
412 |
-
content: "\f04d";
|
413 |
-
}
|
414 |
-
.fa-forward:before {
|
415 |
-
content: "\f04e";
|
416 |
-
}
|
417 |
-
.fa-fast-forward:before {
|
418 |
-
content: "\f050";
|
419 |
-
}
|
420 |
-
.fa-step-forward:before {
|
421 |
-
content: "\f051";
|
422 |
-
}
|
423 |
-
.fa-eject:before {
|
424 |
-
content: "\f052";
|
425 |
-
}
|
426 |
-
.fa-chevron-left:before {
|
427 |
-
content: "\f053";
|
428 |
-
}
|
429 |
-
.fa-chevron-right:before {
|
430 |
-
content: "\f054";
|
431 |
-
}
|
432 |
-
.fa-plus-circle:before {
|
433 |
-
content: "\f055";
|
434 |
-
}
|
435 |
-
.fa-minus-circle:before {
|
436 |
-
content: "\f056";
|
437 |
-
}
|
438 |
-
.fa-times-circle:before {
|
439 |
-
content: "\f057";
|
440 |
-
}
|
441 |
-
.fa-check-circle:before {
|
442 |
-
content: "\f058";
|
443 |
-
}
|
444 |
-
.fa-question-circle:before {
|
445 |
-
content: "\f059";
|
446 |
-
}
|
447 |
-
.fa-info-circle:before {
|
448 |
-
content: "\f05a";
|
449 |
-
}
|
450 |
-
.fa-crosshairs:before {
|
451 |
-
content: "\f05b";
|
452 |
-
}
|
453 |
-
.fa-times-circle-o:before {
|
454 |
-
content: "\f05c";
|
455 |
-
}
|
456 |
-
.fa-check-circle-o:before {
|
457 |
-
content: "\f05d";
|
458 |
-
}
|
459 |
-
.fa-ban:before {
|
460 |
-
content: "\f05e";
|
461 |
-
}
|
462 |
-
.fa-arrow-left:before {
|
463 |
-
content: "\f060";
|
464 |
-
}
|
465 |
-
.fa-arrow-right:before {
|
466 |
-
content: "\f061";
|
467 |
-
}
|
468 |
-
.fa-arrow-up:before {
|
469 |
-
content: "\f062";
|
470 |
-
}
|
471 |
-
.fa-arrow-down:before {
|
472 |
-
content: "\f063";
|
473 |
-
}
|
474 |
-
.fa-mail-forward:before,
|
475 |
-
.fa-share:before {
|
476 |
-
content: "\f064";
|
477 |
-
}
|
478 |
-
.fa-expand:before {
|
479 |
-
content: "\f065";
|
480 |
-
}
|
481 |
-
.fa-compress:before {
|
482 |
-
content: "\f066";
|
483 |
-
}
|
484 |
-
.fa-plus:before {
|
485 |
-
content: "\f067";
|
486 |
-
}
|
487 |
-
.fa-minus:before {
|
488 |
-
content: "\f068";
|
489 |
-
}
|
490 |
-
.fa-asterisk:before {
|
491 |
-
content: "\f069";
|
492 |
-
}
|
493 |
-
.fa-exclamation-circle:before {
|
494 |
-
content: "\f06a";
|
495 |
-
}
|
496 |
-
.fa-gift:before {
|
497 |
-
content: "\f06b";
|
498 |
-
}
|
499 |
-
.fa-leaf:before {
|
500 |
-
content: "\f06c";
|
501 |
-
}
|
502 |
-
.fa-fire:before {
|
503 |
-
content: "\f06d";
|
504 |
-
}
|
505 |
-
.fa-eye:before {
|
506 |
-
content: "\f06e";
|
507 |
-
}
|
508 |
-
.fa-eye-slash:before {
|
509 |
-
content: "\f070";
|
510 |
-
}
|
511 |
-
.fa-warning:before,
|
512 |
-
.fa-exclamation-triangle:before {
|
513 |
-
content: "\f071";
|
514 |
-
}
|
515 |
-
.fa-plane:before {
|
516 |
-
content: "\f072";
|
517 |
-
}
|
518 |
-
.fa-calendar:before {
|
519 |
-
content: "\f073";
|
520 |
-
}
|
521 |
-
.fa-random:before {
|
522 |
-
content: "\f074";
|
523 |
-
}
|
524 |
-
.fa-comment:before {
|
525 |
-
content: "\f075";
|
526 |
-
}
|
527 |
-
.fa-magnet:before {
|
528 |
-
content: "\f076";
|
529 |
-
}
|
530 |
-
.fa-chevron-up:before {
|
531 |
-
content: "\f077";
|
532 |
-
}
|
533 |
-
.fa-chevron-down:before {
|
534 |
-
content: "\f078";
|
535 |
-
}
|
536 |
-
.fa-retweet:before {
|
537 |
-
content: "\f079";
|
538 |
-
}
|
539 |
-
.fa-shopping-cart:before {
|
540 |
-
content: "\f07a";
|
541 |
-
}
|
542 |
-
.fa-folder:before {
|
543 |
-
content: "\f07b";
|
544 |
-
}
|
545 |
-
.fa-folder-open:before {
|
546 |
-
content: "\f07c";
|
547 |
-
}
|
548 |
-
.fa-arrows-v:before {
|
549 |
-
content: "\f07d";
|
550 |
-
}
|
551 |
-
.fa-arrows-h:before {
|
552 |
-
content: "\f07e";
|
553 |
-
}
|
554 |
-
.fa-bar-chart-o:before {
|
555 |
-
content: "\f080";
|
556 |
-
}
|
557 |
-
.fa-twitter-square:before {
|
558 |
-
content: "\f081";
|
559 |
-
}
|
560 |
-
.fa-facebook-square:before {
|
561 |
-
content: "\f082";
|
562 |
-
}
|
563 |
-
.fa-camera-retro:before {
|
564 |
-
content: "\f083";
|
565 |
-
}
|
566 |
-
.fa-key:before {
|
567 |
-
content: "\f084";
|
568 |
-
}
|
569 |
-
.fa-gears:before,
|
570 |
-
.fa-cogs:before {
|
571 |
-
content: "\f085";
|
572 |
-
}
|
573 |
-
.fa-comments:before {
|
574 |
-
content: "\f086";
|
575 |
-
}
|
576 |
-
.fa-thumbs-o-up:before {
|
577 |
-
content: "\f087";
|
578 |
-
}
|
579 |
-
.fa-thumbs-o-down:before {
|
580 |
-
content: "\f088";
|
581 |
-
}
|
582 |
-
.fa-star-half:before {
|
583 |
-
content: "\f089";
|
584 |
-
}
|
585 |
-
.fa-heart-o:before {
|
586 |
-
content: "\f08a";
|
587 |
-
}
|
588 |
-
.fa-sign-out:before {
|
589 |
-
content: "\f08b";
|
590 |
-
}
|
591 |
-
.fa-linkedin-square:before {
|
592 |
-
content: "\f08c";
|
593 |
-
}
|
594 |
-
.fa-thumb-tack:before {
|
595 |
-
content: "\f08d";
|
596 |
-
}
|
597 |
-
.fa-external-link:before {
|
598 |
-
content: "\f08e";
|
599 |
-
}
|
600 |
-
.fa-sign-in:before {
|
601 |
-
content: "\f090";
|
602 |
-
}
|
603 |
-
.fa-trophy:before {
|
604 |
-
content: "\f091";
|
605 |
-
}
|
606 |
-
.fa-github-square:before {
|
607 |
-
content: "\f092";
|
608 |
-
}
|
609 |
-
.fa-upload:before {
|
610 |
-
content: "\f093";
|
611 |
-
}
|
612 |
-
.fa-lemon-o:before {
|
613 |
-
content: "\f094";
|
614 |
-
}
|
615 |
-
.fa-phone:before {
|
616 |
-
content: "\f095";
|
617 |
-
}
|
618 |
-
.fa-square-o:before {
|
619 |
-
content: "\f096";
|
620 |
-
}
|
621 |
-
.fa-bookmark-o:before {
|
622 |
-
content: "\f097";
|
623 |
-
}
|
624 |
-
.fa-phone-square:before {
|
625 |
-
content: "\f098";
|
626 |
-
}
|
627 |
-
.fa-twitter:before {
|
628 |
-
content: "\f099";
|
629 |
-
}
|
630 |
-
.fa-facebook:before {
|
631 |
-
content: "\f09a";
|
632 |
-
}
|
633 |
-
.fa-github:before {
|
634 |
-
content: "\f09b";
|
635 |
-
}
|
636 |
-
.fa-unlock:before {
|
637 |
-
content: "\f09c";
|
638 |
-
}
|
639 |
-
.fa-credit-card:before {
|
640 |
-
content: "\f09d";
|
641 |
-
}
|
642 |
-
.fa-rss:before {
|
643 |
-
content: "\f09e";
|
644 |
-
}
|
645 |
-
.fa-hdd-o:before {
|
646 |
-
content: "\f0a0";
|
647 |
-
}
|
648 |
-
.fa-bullhorn:before {
|
649 |
-
content: "\f0a1";
|
650 |
-
}
|
651 |
-
.fa-bell:before {
|
652 |
-
content: "\f0f3";
|
653 |
-
}
|
654 |
-
.fa-certificate:before {
|
655 |
-
content: "\f0a3";
|
656 |
-
}
|
657 |
-
.fa-hand-o-right:before {
|
658 |
-
content: "\f0a4";
|
659 |
-
}
|
660 |
-
.fa-hand-o-left:before {
|
661 |
-
content: "\f0a5";
|
662 |
-
}
|
663 |
-
.fa-hand-o-up:before {
|
664 |
-
content: "\f0a6";
|
665 |
-
}
|
666 |
-
.fa-hand-o-down:before {
|
667 |
-
content: "\f0a7";
|
668 |
-
}
|
669 |
-
.fa-arrow-circle-left:before {
|
670 |
-
content: "\f0a8";
|
671 |
-
}
|
672 |
-
.fa-arrow-circle-right:before {
|
673 |
-
content: "\f0a9";
|
674 |
-
}
|
675 |
-
.fa-arrow-circle-up:before {
|
676 |
-
content: "\f0aa";
|
677 |
-
}
|
678 |
-
.fa-arrow-circle-down:before {
|
679 |
-
content: "\f0ab";
|
680 |
-
}
|
681 |
-
.fa-globe:before {
|
682 |
-
content: "\f0ac";
|
683 |
-
}
|
684 |
-
.fa-wrench:before {
|
685 |
-
content: "\f0ad";
|
686 |
-
}
|
687 |
-
.fa-tasks:before {
|
688 |
-
content: "\f0ae";
|
689 |
-
}
|
690 |
-
.fa-filter:before {
|
691 |
-
content: "\f0b0";
|
692 |
-
}
|
693 |
-
.fa-briefcase:before {
|
694 |
-
content: "\f0b1";
|
695 |
-
}
|
696 |
-
.fa-arrows-alt:before {
|
697 |
-
content: "\f0b2";
|
698 |
-
}
|
699 |
-
.fa-group:before,
|
700 |
-
.fa-users:before {
|
701 |
-
content: "\f0c0";
|
702 |
-
}
|
703 |
-
.fa-chain:before,
|
704 |
-
.fa-link:before {
|
705 |
-
content: "\f0c1";
|
706 |
-
}
|
707 |
-
.fa-cloud:before {
|
708 |
-
content: "\f0c2";
|
709 |
-
}
|
710 |
-
.fa-flask:before {
|
711 |
-
content: "\f0c3";
|
712 |
-
}
|
713 |
-
.fa-cut:before,
|
714 |
-
.fa-scissors:before {
|
715 |
-
content: "\f0c4";
|
716 |
-
}
|
717 |
-
.fa-copy:before,
|
718 |
-
.fa-files-o:before {
|
719 |
-
content: "\f0c5";
|
720 |
-
}
|
721 |
-
.fa-paperclip:before {
|
722 |
-
content: "\f0c6";
|
723 |
-
}
|
724 |
-
.fa-save:before,
|
725 |
-
.fa-floppy-o:before {
|
726 |
-
content: "\f0c7";
|
727 |
-
}
|
728 |
-
.fa-square:before {
|
729 |
-
content: "\f0c8";
|
730 |
-
}
|
731 |
-
.fa-navicon:before,
|
732 |
-
.fa-reorder:before,
|
733 |
-
.fa-bars:before {
|
734 |
-
content: "\f0c9";
|
735 |
-
}
|
736 |
-
.fa-list-ul:before {
|
737 |
-
content: "\f0ca";
|
738 |
-
}
|
739 |
-
.fa-list-ol:before {
|
740 |
-
content: "\f0cb";
|
741 |
-
}
|
742 |
-
.fa-strikethrough:before {
|
743 |
-
content: "\f0cc";
|
744 |
-
}
|
745 |
-
.fa-underline:before {
|
746 |
-
content: "\f0cd";
|
747 |
-
}
|
748 |
-
.fa-table:before {
|
749 |
-
content: "\f0ce";
|
750 |
-
}
|
751 |
-
.fa-magic:before {
|
752 |
-
content: "\f0d0";
|
753 |
-
}
|
754 |
-
.fa-truck:before {
|
755 |
-
content: "\f0d1";
|
756 |
-
}
|
757 |
-
.fa-pinterest:before {
|
758 |
-
content: "\f0d2";
|
759 |
-
}
|
760 |
-
.fa-pinterest-square:before {
|
761 |
-
content: "\f0d3";
|
762 |
-
}
|
763 |
-
.fa-google-plus-square:before {
|
764 |
-
content: "\f0d4";
|
765 |
-
}
|
766 |
-
.fa-google-plus:before {
|
767 |
-
content: "\f0d5";
|
768 |
-
}
|
769 |
-
.fa-money:before {
|
770 |
-
content: "\f0d6";
|
771 |
-
}
|
772 |
-
.fa-caret-down:before {
|
773 |
-
content: "\f0d7";
|
774 |
-
}
|
775 |
-
.fa-caret-up:before {
|
776 |
-
content: "\f0d8";
|
777 |
-
}
|
778 |
-
.fa-caret-left:before {
|
779 |
-
content: "\f0d9";
|
780 |
-
}
|
781 |
-
.fa-caret-right:before {
|
782 |
-
content: "\f0da";
|
783 |
-
}
|
784 |
-
.fa-columns:before {
|
785 |
-
content: "\f0db";
|
786 |
-
}
|
787 |
-
.fa-unsorted:before,
|
788 |
-
.fa-sort:before {
|
789 |
-
content: "\f0dc";
|
790 |
-
}
|
791 |
-
.fa-sort-down:before,
|
792 |
-
.fa-sort-desc:before {
|
793 |
-
content: "\f0dd";
|
794 |
-
}
|
795 |
-
.fa-sort-up:before,
|
796 |
-
.fa-sort-asc:before {
|
797 |
-
content: "\f0de";
|
798 |
-
}
|
799 |
-
.fa-envelope:before {
|
800 |
-
content: "\f0e0";
|
801 |
-
}
|
802 |
-
.fa-linkedin:before {
|
803 |
-
content: "\f0e1";
|
804 |
-
}
|
805 |
-
.fa-rotate-left:before,
|
806 |
-
.fa-undo:before {
|
807 |
-
content: "\f0e2";
|
808 |
-
}
|
809 |
-
.fa-legal:before,
|
810 |
-
.fa-gavel:before {
|
811 |
-
content: "\f0e3";
|
812 |
-
}
|
813 |
-
.fa-dashboard:before,
|
814 |
-
.fa-tachometer:before {
|
815 |
-
content: "\f0e4";
|
816 |
-
}
|
817 |
-
.fa-comment-o:before {
|
818 |
-
content: "\f0e5";
|
819 |
-
}
|
820 |
-
.fa-comments-o:before {
|
821 |
-
content: "\f0e6";
|
822 |
-
}
|
823 |
-
.fa-flash:before,
|
824 |
-
.fa-bolt:before {
|
825 |
-
content: "\f0e7";
|
826 |
-
}
|
827 |
-
.fa-sitemap:before {
|
828 |
-
content: "\f0e8";
|
829 |
-
}
|
830 |
-
.fa-umbrella:before {
|
831 |
-
content: "\f0e9";
|
832 |
-
}
|
833 |
-
.fa-paste:before,
|
834 |
-
.fa-clipboard:before {
|
835 |
-
content: "\f0ea";
|
836 |
-
}
|
837 |
-
.fa-lightbulb-o:before {
|
838 |
-
content: "\f0eb";
|
839 |
-
}
|
840 |
-
.fa-exchange:before {
|
841 |
-
content: "\f0ec";
|
842 |
-
}
|
843 |
-
.fa-cloud-download:before {
|
844 |
-
content: "\f0ed";
|
845 |
-
}
|
846 |
-
.fa-cloud-upload:before {
|
847 |
-
content: "\f0ee";
|
848 |
-
}
|
849 |
-
.fa-user-md:before {
|
850 |
-
content: "\f0f0";
|
851 |
-
}
|
852 |
-
.fa-stethoscope:before {
|
853 |
-
content: "\f0f1";
|
854 |
-
}
|
855 |
-
.fa-suitcase:before {
|
856 |
-
content: "\f0f2";
|
857 |
-
}
|
858 |
-
.fa-bell-o:before {
|
859 |
-
content: "\f0a2";
|
860 |
-
}
|
861 |
-
.fa-coffee:before {
|
862 |
-
content: "\f0f4";
|
863 |
-
}
|
864 |
-
.fa-cutlery:before {
|
865 |
-
content: "\f0f5";
|
866 |
-
}
|
867 |
-
.fa-file-text-o:before {
|
868 |
-
content: "\f0f6";
|
869 |
-
}
|
870 |
-
.fa-building-o:before {
|
871 |
-
content: "\f0f7";
|
872 |
-
}
|
873 |
-
.fa-hospital-o:before {
|
874 |
-
content: "\f0f8";
|
875 |
-
}
|
876 |
-
.fa-ambulance:before {
|
877 |
-
content: "\f0f9";
|
878 |
-
}
|
879 |
-
.fa-medkit:before {
|
880 |
-
content: "\f0fa";
|
881 |
-
}
|
882 |
-
.fa-fighter-jet:before {
|
883 |
-
content: "\f0fb";
|
884 |
-
}
|
885 |
-
.fa-beer:before {
|
886 |
-
content: "\f0fc";
|
887 |
-
}
|
888 |
-
.fa-h-square:before {
|
889 |
-
content: "\f0fd";
|
890 |
-
}
|
891 |
-
.fa-plus-square:before {
|
892 |
-
content: "\f0fe";
|
893 |
-
}
|
894 |
-
.fa-angle-double-left:before {
|
895 |
-
content: "\f100";
|
896 |
-
}
|
897 |
-
.fa-angle-double-right:before {
|
898 |
-
content: "\f101";
|
899 |
-
}
|
900 |
-
.fa-angle-double-up:before {
|
901 |
-
content: "\f102";
|
902 |
-
}
|
903 |
-
.fa-angle-double-down:before {
|
904 |
-
content: "\f103";
|
905 |
-
}
|
906 |
-
.fa-angle-left:before {
|
907 |
-
content: "\f104";
|
908 |
-
}
|
909 |
-
.fa-angle-right:before {
|
910 |
-
content: "\f105";
|
911 |
-
}
|
912 |
-
.fa-angle-up:before {
|
913 |
-
content: "\f106";
|
914 |
-
}
|
915 |
-
.fa-angle-down:before {
|
916 |
-
content: "\f107";
|
917 |
-
}
|
918 |
-
.fa-desktop:before {
|
919 |
-
content: "\f108";
|
920 |
-
}
|
921 |
-
.fa-laptop:before {
|
922 |
-
content: "\f109";
|
923 |
-
}
|
924 |
-
.fa-tablet:before {
|
925 |
-
content: "\f10a";
|
926 |
-
}
|
927 |
-
.fa-mobile-phone:before,
|
928 |
-
.fa-mobile:before {
|
929 |
-
content: "\f10b";
|
930 |
-
}
|
931 |
-
.fa-circle-o:before {
|
932 |
-
content: "\f10c";
|
933 |
-
}
|
934 |
-
.fa-quote-left:before {
|
935 |
-
content: "\f10d";
|
936 |
-
}
|
937 |
-
.fa-quote-right:before {
|
938 |
-
content: "\f10e";
|
939 |
-
}
|
940 |
-
.fa-spinner:before {
|
941 |
-
content: "\f110";
|
942 |
-
}
|
943 |
-
.fa-circle:before {
|
944 |
-
content: "\f111";
|
945 |
-
}
|
946 |
-
.fa-mail-reply:before,
|
947 |
-
.fa-reply:before {
|
948 |
-
content: "\f112";
|
949 |
-
}
|
950 |
-
.fa-github-alt:before {
|
951 |
-
content: "\f113";
|
952 |
-
}
|
953 |
-
.fa-folder-o:before {
|
954 |
-
content: "\f114";
|
955 |
-
}
|
956 |
-
.fa-folder-open-o:before {
|
957 |
-
content: "\f115";
|
958 |
-
}
|
959 |
-
.fa-smile-o:before {
|
960 |
-
content: "\f118";
|
961 |
-
}
|
962 |
-
.fa-frown-o:before {
|
963 |
-
content: "\f119";
|
964 |
-
}
|
965 |
-
.fa-meh-o:before {
|
966 |
-
content: "\f11a";
|
967 |
-
}
|
968 |
-
.fa-gamepad:before {
|
969 |
-
content: "\f11b";
|
970 |
-
}
|
971 |
-
.fa-keyboard-o:before {
|
972 |
-
content: "\f11c";
|
973 |
-
}
|
974 |
-
.fa-flag-o:before {
|
975 |
-
content: "\f11d";
|
976 |
-
}
|
977 |
-
.fa-flag-checkered:before {
|
978 |
-
content: "\f11e";
|
979 |
-
}
|
980 |
-
.fa-terminal:before {
|
981 |
-
content: "\f120";
|
982 |
-
}
|
983 |
-
.fa-code:before {
|
984 |
-
content: "\f121";
|
985 |
-
}
|
986 |
-
.fa-mail-reply-all:before,
|
987 |
-
.fa-reply-all:before {
|
988 |
-
content: "\f122";
|
989 |
-
}
|
990 |
-
.fa-star-half-empty:before,
|
991 |
-
.fa-star-half-full:before,
|
992 |
-
.fa-star-half-o:before {
|
993 |
-
content: "\f123";
|
994 |
-
}
|
995 |
-
.fa-location-arrow:before {
|
996 |
-
content: "\f124";
|
997 |
-
}
|
998 |
-
.fa-crop:before {
|
999 |
-
content: "\f125";
|
1000 |
-
}
|
1001 |
-
.fa-code-fork:before {
|
1002 |
-
content: "\f126";
|
1003 |
-
}
|
1004 |
-
.fa-unlink:before,
|
1005 |
-
.fa-chain-broken:before {
|
1006 |
-
content: "\f127";
|
1007 |
-
}
|
1008 |
-
.fa-question:before {
|
1009 |
-
content: "\f128";
|
1010 |
-
}
|
1011 |
-
.fa-info:before {
|
1012 |
-
content: "\f129";
|
1013 |
-
}
|
1014 |
-
.fa-exclamation:before {
|
1015 |
-
content: "\f12a";
|
1016 |
-
}
|
1017 |
-
.fa-superscript:before {
|
1018 |
-
content: "\f12b";
|
1019 |
-
}
|
1020 |
-
.fa-subscript:before {
|
1021 |
-
content: "\f12c";
|
1022 |
-
}
|
1023 |
-
.fa-eraser:before {
|
1024 |
-
content: "\f12d";
|
1025 |
-
}
|
1026 |
-
.fa-puzzle-piece:before {
|
1027 |
-
content: "\f12e";
|
1028 |
-
}
|
1029 |
-
.fa-microphone:before {
|
1030 |
-
content: "\f130";
|
1031 |
-
}
|
1032 |
-
.fa-microphone-slash:before {
|
1033 |
-
content: "\f131";
|
1034 |
-
}
|
1035 |
-
.fa-shield:before {
|
1036 |
-
content: "\f132";
|
1037 |
-
}
|
1038 |
-
.fa-calendar-o:before {
|
1039 |
-
content: "\f133";
|
1040 |
-
}
|
1041 |
-
.fa-fire-extinguisher:before {
|
1042 |
-
content: "\f134";
|
1043 |
-
}
|
1044 |
-
.fa-rocket:before {
|
1045 |
-
content: "\f135";
|
1046 |
-
}
|
1047 |
-
.fa-maxcdn:before {
|
1048 |
-
content: "\f136";
|
1049 |
-
}
|
1050 |
-
.fa-chevron-circle-left:before {
|
1051 |
-
content: "\f137";
|
1052 |
-
}
|
1053 |
-
.fa-chevron-circle-right:before {
|
1054 |
-
content: "\f138";
|
1055 |
-
}
|
1056 |
-
.fa-chevron-circle-up:before {
|
1057 |
-
content: "\f139";
|
1058 |
-
}
|
1059 |
-
.fa-chevron-circle-down:before {
|
1060 |
-
content: "\f13a";
|
1061 |
-
}
|
1062 |
-
.fa-html5:before {
|
1063 |
-
content: "\f13b";
|
1064 |
-
}
|
1065 |
-
.fa-css3:before {
|
1066 |
-
content: "\f13c";
|
1067 |
-
}
|
1068 |
-
.fa-anchor:before {
|
1069 |
-
content: "\f13d";
|
1070 |
-
}
|
1071 |
-
.fa-unlock-alt:before {
|
1072 |
-
content: "\f13e";
|
1073 |
-
}
|
1074 |
-
.fa-bullseye:before {
|
1075 |
-
content: "\f140";
|
1076 |
-
}
|
1077 |
-
.fa-ellipsis-h:before {
|
1078 |
-
content: "\f141";
|
1079 |
-
}
|
1080 |
-
.fa-ellipsis-v:before {
|
1081 |
-
content: "\f142";
|
1082 |
-
}
|
1083 |
-
.fa-rss-square:before {
|
1084 |
-
content: "\f143";
|
1085 |
-
}
|
1086 |
-
.fa-play-circle:before {
|
1087 |
-
content: "\f144";
|
1088 |
-
}
|
1089 |
-
.fa-ticket:before {
|
1090 |
-
content: "\f145";
|
1091 |
-
}
|
1092 |
-
.fa-minus-square:before {
|
1093 |
-
content: "\f146";
|
1094 |
-
}
|
1095 |
-
.fa-minus-square-o:before {
|
1096 |
-
content: "\f147";
|
1097 |
-
}
|
1098 |
-
.fa-level-up:before {
|
1099 |
-
content: "\f148";
|
1100 |
-
}
|
1101 |
-
.fa-level-down:before {
|
1102 |
-
content: "\f149";
|
1103 |
-
}
|
1104 |
-
.fa-check-square:before {
|
1105 |
-
content: "\f14a";
|
1106 |
-
}
|
1107 |
-
.fa-pencil-square:before {
|
1108 |
-
content: "\f14b";
|
1109 |
-
}
|
1110 |
-
.fa-external-link-square:before {
|
1111 |
-
content: "\f14c";
|
1112 |
-
}
|
1113 |
-
.fa-share-square:before {
|
1114 |
-
content: "\f14d";
|
1115 |
-
}
|
1116 |
-
.fa-compass:before {
|
1117 |
-
content: "\f14e";
|
1118 |
-
}
|
1119 |
-
.fa-toggle-down:before,
|
1120 |
-
.fa-caret-square-o-down:before {
|
1121 |
-
content: "\f150";
|
1122 |
-
}
|
1123 |
-
.fa-toggle-up:before,
|
1124 |
-
.fa-caret-square-o-up:before {
|
1125 |
-
content: "\f151";
|
1126 |
-
}
|
1127 |
-
.fa-toggle-right:before,
|
1128 |
-
.fa-caret-square-o-right:before {
|
1129 |
-
content: "\f152";
|
1130 |
-
}
|
1131 |
-
.fa-euro:before,
|
1132 |
-
.fa-eur:before {
|
1133 |
-
content: "\f153";
|
1134 |
-
}
|
1135 |
-
.fa-gbp:before {
|
1136 |
-
content: "\f154";
|
1137 |
-
}
|
1138 |
-
.fa-dollar:before,
|
1139 |
-
.fa-usd:before {
|
1140 |
-
content: "\f155";
|
1141 |
-
}
|
1142 |
-
.fa-rupee:before,
|
1143 |
-
.fa-inr:before {
|
1144 |
-
content: "\f156";
|
1145 |
-
}
|
1146 |
-
.fa-cny:before,
|
1147 |
-
.fa-rmb:before,
|
1148 |
-
.fa-yen:before,
|
1149 |
-
.fa-jpy:before {
|
1150 |
-
content: "\f157";
|
1151 |
-
}
|
1152 |
-
.fa-ruble:before,
|
1153 |
-
.fa-rouble:before,
|
1154 |
-
.fa-rub:before {
|
1155 |
-
content: "\f158";
|
1156 |
-
}
|
1157 |
-
.fa-won:before,
|
1158 |
-
.fa-krw:before {
|
1159 |
-
content: "\f159";
|
1160 |
-
}
|
1161 |
-
.fa-bitcoin:before,
|
1162 |
-
.fa-btc:before {
|
1163 |
-
content: "\f15a";
|
1164 |
-
}
|
1165 |
-
.fa-file:before {
|
1166 |
-
content: "\f15b";
|
1167 |
-
}
|
1168 |
-
.fa-file-text:before {
|
1169 |
-
content: "\f15c";
|
1170 |
-
}
|
1171 |
-
.fa-sort-alpha-asc:before {
|
1172 |
-
content: "\f15d";
|
1173 |
-
}
|
1174 |
-
.fa-sort-alpha-desc:before {
|
1175 |
-
content: "\f15e";
|
1176 |
-
}
|
1177 |
-
.fa-sort-amount-asc:before {
|
1178 |
-
content: "\f160";
|
1179 |
-
}
|
1180 |
-
.fa-sort-amount-desc:before {
|
1181 |
-
content: "\f161";
|
1182 |
-
}
|
1183 |
-
.fa-sort-numeric-asc:before {
|
1184 |
-
content: "\f162";
|
1185 |
-
}
|
1186 |
-
.fa-sort-numeric-desc:before {
|
1187 |
-
content: "\f163";
|
1188 |
-
}
|
1189 |
-
.fa-thumbs-up:before {
|
1190 |
-
content: "\f164";
|
1191 |
-
}
|
1192 |
-
.fa-thumbs-down:before {
|
1193 |
-
content: "\f165";
|
1194 |
-
}
|
1195 |
-
.fa-youtube-square:before {
|
1196 |
-
content: "\f166";
|
1197 |
-
}
|
1198 |
-
.fa-youtube:before {
|
1199 |
-
content: "\f167";
|
1200 |
-
}
|
1201 |
-
.fa-xing:before {
|
1202 |
-
content: "\f168";
|
1203 |
-
}
|
1204 |
-
.fa-xing-square:before {
|
1205 |
-
content: "\f169";
|
1206 |
-
}
|
1207 |
-
.fa-youtube-play:before {
|
1208 |
-
content: "\f16a";
|
1209 |
-
}
|
1210 |
-
.fa-dropbox:before {
|
1211 |
-
content: "\f16b";
|
1212 |
-
}
|
1213 |
-
.fa-stack-overflow:before {
|
1214 |
-
content: "\f16c";
|
1215 |
-
}
|
1216 |
-
.fa-instagram:before {
|
1217 |
-
content: "\f16d";
|
1218 |
-
}
|
1219 |
-
.fa-flickr:before {
|
1220 |
-
content: "\f16e";
|
1221 |
-
}
|
1222 |
-
.fa-adn:before {
|
1223 |
-
content: "\f170";
|
1224 |
-
}
|
1225 |
-
.fa-bitbucket:before {
|
1226 |
-
content: "\f171";
|
1227 |
-
}
|
1228 |
-
.fa-bitbucket-square:before {
|
1229 |
-
content: "\f172";
|
1230 |
-
}
|
1231 |
-
.fa-tumblr:before {
|
1232 |
-
content: "\f173";
|
1233 |
-
}
|
1234 |
-
.fa-tumblr-square:before {
|
1235 |
-
content: "\f174";
|
1236 |
-
}
|
1237 |
-
.fa-long-arrow-down:before {
|
1238 |
-
content: "\f175";
|
1239 |
-
}
|
1240 |
-
.fa-long-arrow-up:before {
|
1241 |
-
content: "\f176";
|
1242 |
-
}
|
1243 |
-
.fa-long-arrow-left:before {
|
1244 |
-
content: "\f177";
|
1245 |
-
}
|
1246 |
-
.fa-long-arrow-right:before {
|
1247 |
-
content: "\f178";
|
1248 |
-
}
|
1249 |
-
.fa-apple:before {
|
1250 |
-
content: "\f179";
|
1251 |
-
}
|
1252 |
-
.fa-windows:before {
|
1253 |
-
content: "\f17a";
|
1254 |
-
}
|
1255 |
-
.fa-android:before {
|
1256 |
-
content: "\f17b";
|
1257 |
-
}
|
1258 |
-
.fa-linux:before {
|
1259 |
-
content: "\f17c";
|
1260 |
-
}
|
1261 |
-
.fa-dribbble:before {
|
1262 |
-
content: "\f17d";
|
1263 |
-
}
|
1264 |
-
.fa-skype:before {
|
1265 |
-
content: "\f17e";
|
1266 |
-
}
|
1267 |
-
.fa-foursquare:before {
|
1268 |
-
content: "\f180";
|
1269 |
-
}
|
1270 |
-
.fa-trello:before {
|
1271 |
-
content: "\f181";
|
1272 |
-
}
|
1273 |
-
.fa-female:before {
|
1274 |
-
content: "\f182";
|
1275 |
-
}
|
1276 |
-
.fa-male:before {
|
1277 |
-
content: "\f183";
|
1278 |
-
}
|
1279 |
-
.fa-gittip:before {
|
1280 |
-
content: "\f184";
|
1281 |
-
}
|
1282 |
-
.fa-sun-o:before {
|
1283 |
-
content: "\f185";
|
1284 |
-
}
|
1285 |
-
.fa-moon-o:before {
|
1286 |
-
content: "\f186";
|
1287 |
-
}
|
1288 |
-
.fa-archive:before {
|
1289 |
-
content: "\f187";
|
1290 |
-
}
|
1291 |
-
.fa-bug:before {
|
1292 |
-
content: "\f188";
|
1293 |
-
}
|
1294 |
-
.fa-vk:before {
|
1295 |
-
content: "\f189";
|
1296 |
-
}
|
1297 |
-
.fa-weibo:before {
|
1298 |
-
content: "\f18a";
|
1299 |
-
}
|
1300 |
-
.fa-renren:before {
|
1301 |
-
content: "\f18b";
|
1302 |
-
}
|
1303 |
-
.fa-pagelines:before {
|
1304 |
-
content: "\f18c";
|
1305 |
-
}
|
1306 |
-
.fa-stack-exchange:before {
|
1307 |
-
content: "\f18d";
|
1308 |
-
}
|
1309 |
-
.fa-arrow-circle-o-right:before {
|
1310 |
-
content: "\f18e";
|
1311 |
-
}
|
1312 |
-
.fa-arrow-circle-o-left:before {
|
1313 |
-
content: "\f190";
|
1314 |
-
}
|
1315 |
-
.fa-toggle-left:before,
|
1316 |
-
.fa-caret-square-o-left:before {
|
1317 |
-
content: "\f191";
|
1318 |
-
}
|
1319 |
-
.fa-dot-circle-o:before {
|
1320 |
-
content: "\f192";
|
1321 |
-
}
|
1322 |
-
.fa-wheelchair:before {
|
1323 |
-
content: "\f193";
|
1324 |
-
}
|
1325 |
-
.fa-vimeo-square:before {
|
1326 |
-
content: "\f194";
|
1327 |
-
}
|
1328 |
-
.fa-turkish-lira:before,
|
1329 |
-
.fa-try:before {
|
1330 |
-
content: "\f195";
|
1331 |
-
}
|
1332 |
-
.fa-plus-square-o:before {
|
1333 |
-
content: "\f196";
|
1334 |
-
}
|
1335 |
-
.fa-space-shuttle:before {
|
1336 |
-
content: "\f197";
|
1337 |
-
}
|
1338 |
-
.fa-slack:before {
|
1339 |
-
content: "\f198";
|
1340 |
-
}
|
1341 |
-
.fa-envelope-square:before {
|
1342 |
-
content: "\f199";
|
1343 |
-
}
|
1344 |
-
.fa-wordpress:before {
|
1345 |
-
content: "\f19a";
|
1346 |
-
}
|
1347 |
-
.fa-openid:before {
|
1348 |
-
content: "\f19b";
|
1349 |
-
}
|
1350 |
-
.fa-institution:before,
|
1351 |
-
.fa-bank:before,
|
1352 |
-
.fa-university:before {
|
1353 |
-
content: "\f19c";
|
1354 |
-
}
|
1355 |
-
.fa-mortar-board:before,
|
1356 |
-
.fa-graduation-cap:before {
|
1357 |
-
content: "\f19d";
|
1358 |
-
}
|
1359 |
-
.fa-yahoo:before {
|
1360 |
-
content: "\f19e";
|
1361 |
-
}
|
1362 |
-
.fa-google:before {
|
1363 |
-
content: "\f1a0";
|
1364 |
-
}
|
1365 |
-
.fa-reddit:before {
|
1366 |
-
content: "\f1a1";
|
1367 |
-
}
|
1368 |
-
.fa-reddit-square:before {
|
1369 |
-
content: "\f1a2";
|
1370 |
-
}
|
1371 |
-
.fa-stumbleupon-circle:before {
|
1372 |
-
content: "\f1a3";
|
1373 |
-
}
|
1374 |
-
.fa-stumbleupon:before {
|
1375 |
-
content: "\f1a4";
|
1376 |
-
}
|
1377 |
-
.fa-delicious:before {
|
1378 |
-
content: "\f1a5";
|
1379 |
-
}
|
1380 |
-
.fa-digg:before {
|
1381 |
-
content: "\f1a6";
|
1382 |
-
}
|
1383 |
-
.fa-pied-piper-square:before,
|
1384 |
-
.fa-pied-piper:before {
|
1385 |
-
content: "\f1a7";
|
1386 |
-
}
|
1387 |
-
.fa-pied-piper-alt:before {
|
1388 |
-
content: "\f1a8";
|
1389 |
-
}
|
1390 |
-
.fa-drupal:before {
|
1391 |
-
content: "\f1a9";
|
1392 |
-
}
|
1393 |
-
.fa-joomla:before {
|
1394 |
-
content: "\f1aa";
|
1395 |
-
}
|
1396 |
-
.fa-language:before {
|
1397 |
-
content: "\f1ab";
|
1398 |
-
}
|
1399 |
-
.fa-fax:before {
|
1400 |
-
content: "\f1ac";
|
1401 |
-
}
|
1402 |
-
.fa-building:before {
|
1403 |
-
content: "\f1ad";
|
1404 |
-
}
|
1405 |
-
.fa-child:before {
|
1406 |
-
content: "\f1ae";
|
1407 |
-
}
|
1408 |
-
.fa-paw:before {
|
1409 |
-
content: "\f1b0";
|
1410 |
-
}
|
1411 |
-
.fa-spoon:before {
|
1412 |
-
content: "\f1b1";
|
1413 |
-
}
|
1414 |
-
.fa-cube:before {
|
1415 |
-
content: "\f1b2";
|
1416 |
-
}
|
1417 |
-
.fa-cubes:before {
|
1418 |
-
content: "\f1b3";
|
1419 |
-
}
|
1420 |
-
.fa-behance:before {
|
1421 |
-
content: "\f1b4";
|
1422 |
-
}
|
1423 |
-
.fa-behance-square:before {
|
1424 |
-
content: "\f1b5";
|
1425 |
-
}
|
1426 |
-
.fa-steam:before {
|
1427 |
-
content: "\f1b6";
|
1428 |
-
}
|
1429 |
-
.fa-steam-square:before {
|
1430 |
-
content: "\f1b7";
|
1431 |
-
}
|
1432 |
-
.fa-recycle:before {
|
1433 |
-
content: "\f1b8";
|
1434 |
-
}
|
1435 |
-
.fa-automobile:before,
|
1436 |
-
.fa-car:before {
|
1437 |
-
content: "\f1b9";
|
1438 |
-
}
|
1439 |
-
.fa-cab:before,
|
1440 |
-
.fa-taxi:before {
|
1441 |
-
content: "\f1ba";
|
1442 |
-
}
|
1443 |
-
.fa-tree:before {
|
1444 |
-
content: "\f1bb";
|
1445 |
-
}
|
1446 |
-
.fa-spotify:before {
|
1447 |
-
content: "\f1bc";
|
1448 |
-
}
|
1449 |
-
.fa-deviantart:before {
|
1450 |
-
content: "\f1bd";
|
1451 |
-
}
|
1452 |
-
.fa-soundcloud:before {
|
1453 |
-
content: "\f1be";
|
1454 |
-
}
|
1455 |
-
.fa-database:before {
|
1456 |
-
content: "\f1c0";
|
1457 |
-
}
|
1458 |
-
.fa-file-pdf-o:before {
|
1459 |
-
content: "\f1c1";
|
1460 |
-
}
|
1461 |
-
.fa-file-word-o:before {
|
1462 |
-
content: "\f1c2";
|
1463 |
-
}
|
1464 |
-
.fa-file-excel-o:before {
|
1465 |
-
content: "\f1c3";
|
1466 |
-
}
|
1467 |
-
.fa-file-powerpoint-o:before {
|
1468 |
-
content: "\f1c4";
|
1469 |
-
}
|
1470 |
-
.fa-file-photo-o:before,
|
1471 |
-
.fa-file-picture-o:before,
|
1472 |
-
.fa-file-image-o:before {
|
1473 |
-
content: "\f1c5";
|
1474 |
-
}
|
1475 |
-
.fa-file-zip-o:before,
|
1476 |
-
.fa-file-archive-o:before {
|
1477 |
-
content: "\f1c6";
|
1478 |
-
}
|
1479 |
-
.fa-file-sound-o:before,
|
1480 |
-
.fa-file-audio-o:before {
|
1481 |
-
content: "\f1c7";
|
1482 |
-
}
|
1483 |
-
.fa-file-movie-o:before,
|
1484 |
-
.fa-file-video-o:before {
|
1485 |
-
content: "\f1c8";
|
1486 |
-
}
|
1487 |
-
.fa-file-code-o:before {
|
1488 |
-
content: "\f1c9";
|
1489 |
-
}
|
1490 |
-
.fa-vine:before {
|
1491 |
-
content: "\f1ca";
|
1492 |
-
}
|
1493 |
-
.fa-codepen:before {
|
1494 |
-
content: "\f1cb";
|
1495 |
-
}
|
1496 |
-
.fa-jsfiddle:before {
|
1497 |
-
content: "\f1cc";
|
1498 |
-
}
|
1499 |
-
.fa-life-bouy:before,
|
1500 |
-
.fa-life-saver:before,
|
1501 |
-
.fa-support:before,
|
1502 |
-
.fa-life-ring:before {
|
1503 |
-
content: "\f1cd";
|
1504 |
-
}
|
1505 |
-
.fa-circle-o-notch:before {
|
1506 |
-
content: "\f1ce";
|
1507 |
-
}
|
1508 |
-
.fa-ra:before,
|
1509 |
-
.fa-rebel:before {
|
1510 |
-
content: "\f1d0";
|
1511 |
-
}
|
1512 |
-
.fa-ge:before,
|
1513 |
-
.fa-empire:before {
|
1514 |
-
content: "\f1d1";
|
1515 |
-
}
|
1516 |
-
.fa-git-square:before {
|
1517 |
-
content: "\f1d2";
|
1518 |
-
}
|
1519 |
-
.fa-git:before {
|
1520 |
-
content: "\f1d3";
|
1521 |
-
}
|
1522 |
-
.fa-hacker-news:before {
|
1523 |
-
content: "\f1d4";
|
1524 |
-
}
|
1525 |
-
.fa-tencent-weibo:before {
|
1526 |
-
content: "\f1d5";
|
1527 |
-
}
|
1528 |
-
.fa-qq:before {
|
1529 |
-
content: "\f1d6";
|
1530 |
-
}
|
1531 |
-
.fa-wechat:before,
|
1532 |
-
.fa-weixin:before {
|
1533 |
-
content: "\f1d7";
|
1534 |
-
}
|
1535 |
-
.fa-send:before,
|
1536 |
-
.fa-paper-plane:before {
|
1537 |
-
content: "\f1d8";
|
1538 |
-
}
|
1539 |
-
.fa-send-o:before,
|
1540 |
-
.fa-paper-plane-o:before {
|
1541 |
-
content: "\f1d9";
|
1542 |
-
}
|
1543 |
-
.fa-history:before {
|
1544 |
-
content: "\f1da";
|
1545 |
-
}
|
1546 |
-
.fa-circle-thin:before {
|
1547 |
-
content: "\f1db";
|
1548 |
-
}
|
1549 |
-
.fa-header:before {
|
1550 |
-
content: "\f1dc";
|
1551 |
-
}
|
1552 |
-
.fa-paragraph:before {
|
1553 |
-
content: "\f1dd";
|
1554 |
-
}
|
1555 |
-
.fa-sliders:before {
|
1556 |
-
content: "\f1de";
|
1557 |
-
}
|
1558 |
-
.fa-share-alt:before {
|
1559 |
-
content: "\f1e0";
|
1560 |
-
}
|
1561 |
-
.fa-share-alt-square:before {
|
1562 |
-
content: "\f1e1";
|
1563 |
-
}
|
1564 |
-
.fa-bomb:before {
|
1565 |
-
content: "\f1e2";
|
1566 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shared/assets/fonts/fontawesome/css/font-awesome.min.css
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
/*!
|
2 |
-
* Font Awesome 4.
|
3 |
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
4 |
-
*/@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.1.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
|
|
1 |
/*!
|
2 |
+
* Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
|
3 |
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
4 |
+
*/
|
5 |
+
.fa{display:inline-block;font-family:'FontAwesome' !important;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}
|
shared/assets/{css → fonts/fontawesome}/fontawesome.min.css
RENAMED
File without changes
|
shared/assets/js/admin/select2.js
DELETED
@@ -1,3137 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Copyright 2012 Igor Vaynberg
|
3 |
-
|
4 |
-
Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
5 |
-
|
6 |
-
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7 |
-
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
8 |
-
use of this software only upon the condition that you accept all of the terms of either the Apache
|
9 |
-
License or the GPL License.
|
10 |
-
|
11 |
-
You may obtain a copy of the Apache License and the GPL License at:
|
12 |
-
|
13 |
-
http://www.apache.org/licenses/LICENSE-2.0
|
14 |
-
http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
-
|
16 |
-
Unless required by applicable law or agreed to in writing, software distributed under the
|
17 |
-
Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
18 |
-
CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
|
19 |
-
the specific language governing permissions and limitations under the Apache License and the GPL License.
|
20 |
-
*/
|
21 |
-
(function ($) {
|
22 |
-
if(typeof $.fn.each2 == "undefined") {
|
23 |
-
$.fn.extend({
|
24 |
-
/*
|
25 |
-
* 4-10 times faster .each replacement
|
26 |
-
* use it carefully, as it overrides jQuery context of element on each iteration
|
27 |
-
*/
|
28 |
-
each2 : function (c) {
|
29 |
-
var j = $([0]), i = -1, l = this.length;
|
30 |
-
while (
|
31 |
-
++i < l
|
32 |
-
&& (j.context = j[0] = this[i])
|
33 |
-
&& c.call(j[0], i, j) !== false //"this"=DOM, i=index, j=jQuery object
|
34 |
-
);
|
35 |
-
return this;
|
36 |
-
}
|
37 |
-
});
|
38 |
-
}
|
39 |
-
})(jQuery);
|
40 |
-
|
41 |
-
(function ($, undefined) {
|
42 |
-
"use strict";
|
43 |
-
/*global document, window, jQuery, console */
|
44 |
-
|
45 |
-
if (window.Select2 !== undefined) {
|
46 |
-
return;
|
47 |
-
}
|
48 |
-
|
49 |
-
var KEY, AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,
|
50 |
-
lastMousePosition={x:0,y:0}, $document, scrollBarDimensions,
|
51 |
-
|
52 |
-
KEY = {
|
53 |
-
TAB: 9,
|
54 |
-
ENTER: 13,
|
55 |
-
ESC: 27,
|
56 |
-
SPACE: 32,
|
57 |
-
LEFT: 37,
|
58 |
-
UP: 38,
|
59 |
-
RIGHT: 39,
|
60 |
-
DOWN: 40,
|
61 |
-
SHIFT: 16,
|
62 |
-
CTRL: 17,
|
63 |
-
ALT: 18,
|
64 |
-
PAGE_UP: 33,
|
65 |
-
PAGE_DOWN: 34,
|
66 |
-
HOME: 36,
|
67 |
-
END: 35,
|
68 |
-
BACKSPACE: 8,
|
69 |
-
DELETE: 46,
|
70 |
-
isArrow: function (k) {
|
71 |
-
k = k.which ? k.which : k;
|
72 |
-
switch (k) {
|
73 |
-
case KEY.LEFT:
|
74 |
-
case KEY.RIGHT:
|
75 |
-
case KEY.UP:
|
76 |
-
case KEY.DOWN:
|
77 |
-
return true;
|
78 |
-
}
|
79 |
-
return false;
|
80 |
-
},
|
81 |
-
isControl: function (e) {
|
82 |
-
var k = e.which;
|
83 |
-
switch (k) {
|
84 |
-
case KEY.SHIFT:
|
85 |
-
case KEY.CTRL:
|
86 |
-
case KEY.ALT:
|
87 |
-
return true;
|
88 |
-
}
|
89 |
-
|
90 |
-
if (e.metaKey) return true;
|
91 |
-
|
92 |
-
return false;
|
93 |
-
},
|
94 |
-
isFunctionKey: function (k) {
|
95 |
-
k = k.which ? k.which : k;
|
96 |
-
return k >= 112 && k <= 123;
|
97 |
-
}
|
98 |
-
},
|
99 |
-
MEASURE_SCROLLBAR_TEMPLATE = "<div class='select2-measure-scrollbar'></div>";
|
100 |
-
|
101 |
-
$document = $(document);
|
102 |
-
|
103 |
-
nextUid=(function() { var counter=1; return function() { return counter++; }; }());
|
104 |
-
|
105 |
-
function indexOf(value, array) {
|
106 |
-
var i = 0, l = array.length;
|
107 |
-
for (; i < l; i = i + 1) {
|
108 |
-
if (equal(value, array[i])) return i;
|
109 |
-
}
|
110 |
-
return -1;
|
111 |
-
}
|
112 |
-
|
113 |
-
function measureScrollbar () {
|
114 |
-
var $template = $( MEASURE_SCROLLBAR_TEMPLATE );
|
115 |
-
$template.appendTo('body');
|
116 |
-
|
117 |
-
var dim = {
|
118 |
-
width: $template.width() - $template[0].clientWidth,
|
119 |
-
height: $template.height() - $template[0].clientHeight
|
120 |
-
};
|
121 |
-
$template.remove();
|
122 |
-
|
123 |
-
return dim;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Compares equality of a and b
|
128 |
-
* @param a
|
129 |
-
* @param b
|
130 |
-
*/
|
131 |
-
function equal(a, b) {
|
132 |
-
if (a === b) return true;
|
133 |
-
if (a === undefined || b === undefined) return false;
|
134 |
-
if (a === null || b === null) return false;
|
135 |
-
// Check whether 'a' or 'b' is a string (primitive or object).
|
136 |
-
// The concatenation of an empty string (+'') converts its argument to a string's primitive.
|
137 |
-
if (a.constructor === String) return a+'' === b+''; // a+'' - in case 'a' is a String object
|
138 |
-
if (b.constructor === String) return b+'' === a+''; // b+'' - in case 'b' is a String object
|
139 |
-
return false;
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* Splits the string into an array of values, trimming each value. An empty array is returned for nulls or empty
|
144 |
-
* strings
|
145 |
-
* @param string
|
146 |
-
* @param separator
|
147 |
-
*/
|
148 |
-
function splitVal(string, separator) {
|
149 |
-
var val, i, l;
|
150 |
-
if (string === null || string.length < 1) return [];
|
151 |
-
val = string.split(separator);
|
152 |
-
for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);
|
153 |
-
return val;
|
154 |
-
}
|
155 |
-
|
156 |
-
function getSideBorderPadding(element) {
|
157 |
-
return element.outerWidth(false) - element.width();
|
158 |
-
}
|
159 |
-
|
160 |
-
function installKeyUpChangeEvent(element) {
|
161 |
-
var key="keyup-change-value";
|
162 |
-
element.on("keydown", function () {
|
163 |
-
if ($.data(element, key) === undefined) {
|
164 |
-
$.data(element, key, element.val());
|
165 |
-
}
|
166 |
-
});
|
167 |
-
element.on("keyup", function () {
|
168 |
-
var val= $.data(element, key);
|
169 |
-
if (val !== undefined && element.val() !== val) {
|
170 |
-
$.removeData(element, key);
|
171 |
-
element.trigger("keyup-change");
|
172 |
-
}
|
173 |
-
});
|
174 |
-
}
|
175 |
-
|
176 |
-
$document.on("mousemove", function (e) {
|
177 |
-
lastMousePosition.x = e.pageX;
|
178 |
-
lastMousePosition.y = e.pageY;
|
179 |
-
});
|
180 |
-
|
181 |
-
/**
|
182 |
-
* filters mouse events so an event is fired only if the mouse moved.
|
183 |
-
*
|
184 |
-
* filters out mouse events that occur when mouse is stationary but
|
185 |
-
* the elements under the pointer are scrolled.
|
186 |
-
*/
|
187 |
-
function installFilteredMouseMove(element) {
|
188 |
-
element.on("mousemove", function (e) {
|
189 |
-
var lastpos = lastMousePosition;
|
190 |
-
if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
|
191 |
-
$(e.target).trigger("mousemove-filtered", e);
|
192 |
-
}
|
193 |
-
});
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Debounces a function. Returns a function that calls the original fn function only if no invocations have been made
|
198 |
-
* within the last quietMillis milliseconds.
|
199 |
-
*
|
200 |
-
* @param quietMillis number of milliseconds to wait before invoking fn
|
201 |
-
* @param fn function to be debounced
|
202 |
-
* @param ctx object to be used as this reference within fn
|
203 |
-
* @return debounced version of fn
|
204 |
-
*/
|
205 |
-
function debounce(quietMillis, fn, ctx) {
|
206 |
-
ctx = ctx || undefined;
|
207 |
-
var timeout;
|
208 |
-
return function () {
|
209 |
-
var args = arguments;
|
210 |
-
window.clearTimeout(timeout);
|
211 |
-
timeout = window.setTimeout(function() {
|
212 |
-
fn.apply(ctx, args);
|
213 |
-
}, quietMillis);
|
214 |
-
};
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* A simple implementation of a thunk
|
219 |
-
* @param formula function used to lazily initialize the thunk
|
220 |
-
* @return {Function}
|
221 |
-
*/
|
222 |
-
function thunk(formula) {
|
223 |
-
var evaluated = false,
|
224 |
-
value;
|
225 |
-
return function() {
|
226 |
-
if (evaluated === false) { value = formula(); evaluated = true; }
|
227 |
-
return value;
|
228 |
-
};
|
229 |
-
};
|
230 |
-
|
231 |
-
function installDebouncedScroll(threshold, element) {
|
232 |
-
var notify = debounce(threshold, function (e) { element.trigger("scroll-debounced", e);});
|
233 |
-
element.on("scroll", function (e) {
|
234 |
-
if (indexOf(e.target, element.get()) >= 0) notify(e);
|
235 |
-
});
|
236 |
-
}
|
237 |
-
|
238 |
-
function focus($el) {
|
239 |
-
if ($el[0] === document.activeElement) return;
|
240 |
-
|
241 |
-
/* set the focus in a 0 timeout - that way the focus is set after the processing
|
242 |
-
of the current event has finished - which seems like the only reliable way
|
243 |
-
to set focus */
|
244 |
-
window.setTimeout(function() {
|
245 |
-
var el=$el[0], pos=$el.val().length, range;
|
246 |
-
|
247 |
-
$el.focus();
|
248 |
-
|
249 |
-
/* make sure el received focus so we do not error out when trying to manipulate the caret.
|
250 |
-
sometimes modals or others listeners may steal it after its set */
|
251 |
-
if ($el.is(":visible") && el === document.activeElement) {
|
252 |
-
|
253 |
-
/* after the focus is set move the caret to the end, necessary when we val()
|
254 |
-
just before setting focus */
|
255 |
-
if(el.setSelectionRange)
|
256 |
-
{
|
257 |
-
el.setSelectionRange(pos, pos);
|
258 |
-
}
|
259 |
-
else if (el.createTextRange) {
|
260 |
-
range = el.createTextRange();
|
261 |
-
range.collapse(false);
|
262 |
-
range.select();
|
263 |
-
}
|
264 |
-
}
|
265 |
-
}, 0);
|
266 |
-
}
|
267 |
-
|
268 |
-
function getCursorInfo(el) {
|
269 |
-
el = $(el)[0];
|
270 |
-
var offset = 0;
|
271 |
-
var length = 0;
|
272 |
-
if ('selectionStart' in el) {
|
273 |
-
offset = el.selectionStart;
|
274 |
-
length = el.selectionEnd - offset;
|
275 |
-
} else if ('selection' in document) {
|
276 |
-
el.focus();
|
277 |
-
var sel = document.selection.createRange();
|
278 |
-
length = document.selection.createRange().text.length;
|
279 |
-
sel.moveStart('character', -el.value.length);
|
280 |
-
offset = sel.text.length - length;
|
281 |
-
}
|
282 |
-
return { offset: offset, length: length };
|
283 |
-
}
|
284 |
-
|
285 |
-
function killEvent(event) {
|
286 |
-
event.preventDefault();
|
287 |
-
event.stopPropagation();
|
288 |
-
}
|
289 |
-
function killEventImmediately(event) {
|
290 |
-
event.preventDefault();
|
291 |
-
event.stopImmediatePropagation();
|
292 |
-
}
|
293 |
-
|
294 |
-
function measureTextWidth(e) {
|
295 |
-
if (!sizer){
|
296 |
-
var style = e[0].currentStyle || window.getComputedStyle(e[0], null);
|
297 |
-
sizer = $(document.createElement("div")).css({
|
298 |
-
position: "absolute",
|
299 |
-
left: "-10000px",
|
300 |
-
top: "-10000px",
|
301 |
-
display: "none",
|
302 |
-
fontSize: style.fontSize,
|
303 |
-
fontFamily: style.fontFamily,
|
304 |
-
fontStyle: style.fontStyle,
|
305 |
-
fontWeight: style.fontWeight,
|
306 |
-
letterSpacing: style.letterSpacing,
|
307 |
-
textTransform: style.textTransform,
|
308 |
-
whiteSpace: "nowrap"
|
309 |
-
});
|
310 |
-
sizer.attr("class","select2-sizer");
|
311 |
-
$("body").append(sizer);
|
312 |
-
}
|
313 |
-
sizer.text(e.val());
|
314 |
-
return sizer.width();
|
315 |
-
}
|
316 |
-
|
317 |
-
function syncCssClasses(dest, src, adapter) {
|
318 |
-
var classes, replacements = [], adapted;
|
319 |
-
|
320 |
-
classes = dest.attr("class");
|
321 |
-
if (classes) {
|
322 |
-
classes = '' + classes; // for IE which returns object
|
323 |
-
$(classes.split(" ")).each2(function() {
|
324 |
-
if (this.indexOf("select2-") === 0) {
|
325 |
-
replacements.push(this);
|
326 |
-
}
|
327 |
-
});
|
328 |
-
}
|
329 |
-
classes = src.attr("class");
|
330 |
-
if (classes) {
|
331 |
-
classes = '' + classes; // for IE which returns object
|
332 |
-
$(classes.split(" ")).each2(function() {
|
333 |
-
if (this.indexOf("select2-") !== 0) {
|
334 |
-
adapted = adapter(this);
|
335 |
-
if (adapted) {
|
336 |
-
replacements.push(this);
|
337 |
-
}
|
338 |
-
}
|
339 |
-
});
|
340 |
-
}
|
341 |
-
dest.attr("class", replacements.join(" "));
|
342 |
-
}
|
343 |
-
|
344 |
-
|
345 |
-
function markMatch(text, term, markup, escapeMarkup) {
|
346 |
-
var match=text.toUpperCase().indexOf(term.toUpperCase()),
|
347 |
-
tl=term.length;
|
348 |
-
|
349 |
-
if (match<0) {
|
350 |
-
markup.push(escapeMarkup(text));
|
351 |
-
return;
|
352 |
-
}
|
353 |
-
|
354 |
-
markup.push(escapeMarkup(text.substring(0, match)));
|
355 |
-
markup.push("<span class='select2-match'>");
|
356 |
-
markup.push(escapeMarkup(text.substring(match, match + tl)));
|
357 |
-
markup.push("</span>");
|
358 |
-
markup.push(escapeMarkup(text.substring(match + tl, text.length)));
|
359 |
-
}
|
360 |
-
|
361 |
-
function defaultEscapeMarkup(markup) {
|
362 |
-
var replace_map = {
|
363 |
-
'\\': '\',
|
364 |
-
'&': '&',
|
365 |
-
'<': '<',
|
366 |
-
'>': '>',
|
367 |
-
'"': '"',
|
368 |
-
"'": ''',
|
369 |
-
"/": '/'
|
370 |
-
};
|
371 |
-
|
372 |
-
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
373 |
-
return replace_map[match];
|
374 |
-
});
|
375 |
-
}
|
376 |
-
|
377 |
-
/**
|
378 |
-
* Produces an ajax-based query function
|
379 |
-
*
|
380 |
-
* @param options object containing configuration paramters
|
381 |
-
* @param options.params parameter map for the transport ajax call, can contain such options as cache, jsonpCallback, etc. see $.ajax
|
382 |
-
* @param options.transport function that will be used to execute the ajax request. must be compatible with parameters supported by $.ajax
|
383 |
-
* @param options.url url for the data
|
384 |
-
* @param options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.
|
385 |
-
* @param options.dataType request data type: ajax, jsonp, other datatatypes supported by jQuery's $.ajax function or the transport function if specified
|
386 |
-
* @param options.quietMillis (optional) milliseconds to wait before making the ajaxRequest, helps debounce the ajax function if invoked too often
|
387 |
-
* @param options.results a function(remoteData, pageNumber) that converts data returned form the remote request to the format expected by Select2.
|
388 |
-
* The expected format is an object containing the following keys:
|
389 |
-
* results array of objects that will be used as choices
|
390 |
-
* more (optional) boolean indicating whether there are more results available
|
391 |
-
* Example: {results:[{id:1, text:'Red'},{id:2, text:'Blue'}], more:true}
|
392 |
-
*/
|
393 |
-
function ajax(options) {
|
394 |
-
var timeout, // current scheduled but not yet executed request
|
395 |
-
requestSequence = 0, // sequence used to drop out-of-order responses
|
396 |
-
handler = null,
|
397 |
-
quietMillis = options.quietMillis || 100,
|
398 |
-
ajaxUrl = options.url,
|
399 |
-
self = this;
|
400 |
-
|
401 |
-
return function (query) {
|
402 |
-
window.clearTimeout(timeout);
|
403 |
-
timeout = window.setTimeout(function () {
|
404 |
-
requestSequence += 1; // increment the sequence
|
405 |
-
var requestNumber = requestSequence, // this request's sequence number
|
406 |
-
data = options.data, // ajax data function
|
407 |
-
url = ajaxUrl, // ajax url string or function
|
408 |
-
transport = options.transport || $.fn.select2.ajaxDefaults.transport,
|
409 |
-
// deprecated - to be removed in 4.0 - use params instead
|
410 |
-
deprecated = {
|
411 |
-
type: options.type || 'GET', // set type of request (GET or POST)
|
412 |
-
cache: options.cache || false,
|
413 |
-
jsonpCallback: options.jsonpCallback||undefined,
|
414 |
-
dataType: options.dataType||"json"
|
415 |
-
},
|
416 |
-
params = $.extend({}, $.fn.select2.ajaxDefaults.params, deprecated);
|
417 |
-
|
418 |
-
data = data ? data.call(self, query.term, query.page, query.context) : null;
|
419 |
-
url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
|
420 |
-
|
421 |
-
if (handler) { handler.abort(); }
|
422 |
-
|
423 |
-
if (options.params) {
|
424 |
-
if ($.isFunction(options.params)) {
|
425 |
-
$.extend(params, options.params.call(self));
|
426 |
-
} else {
|
427 |
-
$.extend(params, options.params);
|
428 |
-
}
|
429 |
-
}
|
430 |
-
|
431 |
-
$.extend(params, {
|
432 |
-
url: url,
|
433 |
-
dataType: options.dataType,
|
434 |
-
data: data,
|
435 |
-
success: function (data) {
|
436 |
-
if (requestNumber < requestSequence) {
|
437 |
-
return;
|
438 |
-
}
|
439 |
-
// TODO - replace query.page with query so users have access to term, page, etc.
|
440 |
-
var results = options.results(data, query.page);
|
441 |
-
query.callback(results);
|
442 |
-
}
|
443 |
-
});
|
444 |
-
handler = transport.call(self, params);
|
445 |
-
}, quietMillis);
|
446 |
-
};
|
447 |
-
}
|
448 |
-
|
449 |
-
/**
|
450 |
-
* Produces a query function that works with a local array
|
451 |
-
*
|
452 |
-
* @param options object containing configuration parameters. The options parameter can either be an array or an
|
453 |
-
* object.
|
454 |
-
*
|
455 |
-
* If the array form is used it is assumed that it contains objects with 'id' and 'text' keys.
|
456 |
-
*
|
457 |
-
* If the object form is used ti is assumed that it contains 'data' and 'text' keys. The 'data' key should contain
|
458 |
-
* an array of objects that will be used as choices. These objects must contain at least an 'id' key. The 'text'
|
459 |
-
* key can either be a String in which case it is expected that each element in the 'data' array has a key with the
|
460 |
-
* value of 'text' which will be used to match choices. Alternatively, text can be a function(item) that can extract
|
461 |
-
* the text.
|
462 |
-
*/
|
463 |
-
function local(options) {
|
464 |
-
var data = options, // data elements
|
465 |
-
dataText,
|
466 |
-
tmp,
|
467 |
-
text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
|
468 |
-
|
469 |
-
if ($.isArray(data)) {
|
470 |
-
tmp = data;
|
471 |
-
data = { results: tmp };
|
472 |
-
}
|
473 |
-
|
474 |
-
if ($.isFunction(data) === false) {
|
475 |
-
tmp = data;
|
476 |
-
data = function() { return tmp; };
|
477 |
-
}
|
478 |
-
|
479 |
-
var dataItem = data();
|
480 |
-
if (dataItem.text) {
|
481 |
-
text = dataItem.text;
|
482 |
-
// if text is not a function we assume it to be a key name
|
483 |
-
if (!$.isFunction(text)) {
|
484 |
-
dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
|
485 |
-
text = function (item) { return item[dataText]; };
|
486 |
-
}
|
487 |
-
}
|
488 |
-
|
489 |
-
return function (query) {
|
490 |
-
var t = query.term, filtered = { results: [] }, process;
|
491 |
-
if (t === "") {
|
492 |
-
query.callback(data());
|
493 |
-
return;
|
494 |
-
}
|
495 |
-
|
496 |
-
process = function(datum, collection) {
|
497 |
-
var group, attr;
|
498 |
-
datum = datum[0];
|
499 |
-
if (datum.children) {
|
500 |
-
group = {};
|
501 |
-
for (attr in datum) {
|
502 |
-
if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];
|
503 |
-
}
|
504 |
-
group.children=[];
|
505 |
-
$(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });
|
506 |
-
if (group.children.length || query.matcher(t, text(group), datum)) {
|
507 |
-
collection.push(group);
|
508 |
-
}
|
509 |
-
} else {
|
510 |
-
if (query.matcher(t, text(datum), datum)) {
|
511 |
-
collection.push(datum);
|
512 |
-
}
|
513 |
-
}
|
514 |
-
};
|
515 |
-
|
516 |
-
$(data().results).each2(function(i, datum) { process(datum, filtered.results); });
|
517 |
-
query.callback(filtered);
|
518 |
-
};
|
519 |
-
}
|
520 |
-
|
521 |
-
// TODO javadoc
|
522 |
-
function tags(data) {
|
523 |
-
var isFunc = $.isFunction(data);
|
524 |
-
return function (query) {
|
525 |
-
var t = query.term, filtered = {results: []};
|
526 |
-
$(isFunc ? data() : data).each(function () {
|
527 |
-
var isObject = this.text !== undefined,
|
528 |
-
text = isObject ? this.text : this;
|
529 |
-
if (t === "" || query.matcher(t, text)) {
|
530 |
-
filtered.results.push(isObject ? this : {id: this, text: this});
|
531 |
-
}
|
532 |
-
});
|
533 |
-
query.callback(filtered);
|
534 |
-
};
|
535 |
-
}
|
536 |
-
|
537 |
-
/**
|
538 |
-
* Checks if the formatter function should be used.
|
539 |
-
*
|
540 |
-
* Throws an error if it is not a function. Returns true if it should be used,
|
541 |
-
* false if no formatting should be performed.
|
542 |
-
*
|
543 |
-
* @param formatter
|
544 |
-
*/
|
545 |
-
function checkFormatter(formatter, formatterName) {
|
546 |
-
if ($.isFunction(formatter)) return true;
|
547 |
-
if (!formatter) return false;
|
548 |
-
throw new Error(formatterName +" must be a function or a falsy value");
|
549 |
-
}
|
550 |
-
|
551 |
-
function evaluate(val) {
|
552 |
-
return $.isFunction(val) ? val() : val;
|
553 |
-
}
|
554 |
-
|
555 |
-
function countResults(results) {
|
556 |
-
var count = 0;
|
557 |
-
$.each(results, function(i, item) {
|
558 |
-
if (item.children) {
|
559 |
-
count += countResults(item.children);
|
560 |
-
} else {
|
561 |
-
count++;
|
562 |
-
}
|
563 |
-
});
|
564 |
-
return count;
|
565 |
-
}
|
566 |
-
|
567 |
-
/**
|
568 |
-
* Default tokenizer. This function uses breaks the input on substring match of any string from the
|
569 |
-
* opts.tokenSeparators array and uses opts.createSearchChoice to create the choice object. Both of those
|
570 |
-
* two options have to be defined in order for the tokenizer to work.
|
571 |
-
*
|
572 |
-
* @param input text user has typed so far or pasted into the search field
|
573 |
-
* @param selection currently selected choices
|
574 |
-
* @param selectCallback function(choice) callback tho add the choice to selection
|
575 |
-
* @param opts select2's opts
|
576 |
-
* @return undefined/null to leave the current input unchanged, or a string to change the input to the returned value
|
577 |
-
*/
|
578 |
-
function defaultTokenizer(input, selection, selectCallback, opts) {
|
579 |
-
var original = input, // store the original so we can compare and know if we need to tell the search to update its text
|
580 |
-
dupe = false, // check for whether a token we extracted represents a duplicate selected choice
|
581 |
-
token, // token
|
582 |
-
index, // position at which the separator was found
|
583 |
-
i, l, // looping variables
|
584 |
-
separator; // the matched separator
|
585 |
-
|
586 |
-
if (!opts.createSearchChoice || !opts.tokenSeparators || opts.tokenSeparators.length < 1) return undefined;
|
587 |
-
|
588 |
-
while (true) {
|
589 |
-
index = -1;
|
590 |
-
|
591 |
-
for (i = 0, l = opts.tokenSeparators.length; i < l; i++) {
|
592 |
-
separator = opts.tokenSeparators[i];
|
593 |
-
index = input.indexOf(separator);
|
594 |
-
if (index >= 0) break;
|
595 |
-
}
|
596 |
-
|
597 |
-
if (index < 0) break; // did not find any token separator in the input string, bail
|
598 |
-
|
599 |
-
token = input.substring(0, index);
|
600 |
-
input = input.substring(index + separator.length);
|
601 |
-
|
602 |
-
if (token.length > 0) {
|
603 |
-
token = opts.createSearchChoice.call(this, token, selection);
|
604 |
-
if (token !== undefined && token !== null && opts.id(token) !== undefined && opts.id(token) !== null) {
|
605 |
-
dupe = false;
|
606 |
-
for (i = 0, l = selection.length; i < l; i++) {
|
607 |
-
if (equal(opts.id(token), opts.id(selection[i]))) {
|
608 |
-
dupe = true; break;
|
609 |
-
}
|
610 |
-
}
|
611 |
-
|
612 |
-
if (!dupe) selectCallback(token);
|
613 |
-
}
|
614 |
-
}
|
615 |
-
}
|
616 |
-
|
617 |
-
if (original!==input) return input;
|
618 |
-
}
|
619 |
-
|
620 |
-
/**
|
621 |
-
* Creates a new class
|
622 |
-
*
|
623 |
-
* @param superClass
|
624 |
-
* @param methods
|
625 |
-
*/
|
626 |
-
function clazz(SuperClass, methods) {
|
627 |
-
var constructor = function () {};
|
628 |
-
constructor.prototype = new SuperClass;
|
629 |
-
constructor.prototype.constructor = constructor;
|
630 |
-
constructor.prototype.parent = SuperClass.prototype;
|
631 |
-
constructor.prototype = $.extend(constructor.prototype, methods);
|
632 |
-
return constructor;
|
633 |
-
}
|
634 |
-
|
635 |
-
AbstractSelect2 = clazz(Object, {
|
636 |
-
|
637 |
-
// abstract
|
638 |
-
bind: function (func) {
|
639 |
-
var self = this;
|
640 |
-
return function () {
|
641 |
-
func.apply(self, arguments);
|
642 |
-
};
|
643 |
-
},
|
644 |
-
|
645 |
-
// abstract
|
646 |
-
init: function (opts) {
|
647 |
-
var results, search, resultsSelector = ".select2-results", disabled, readonly;
|
648 |
-
|
649 |
-
// prepare options
|
650 |
-
this.opts = opts = this.prepareOpts(opts);
|
651 |
-
|
652 |
-
this.id=opts.id;
|
653 |
-
|
654 |
-
// destroy if called on an existing component
|
655 |
-
if (opts.element.data("select2") !== undefined &&
|
656 |
-
opts.element.data("select2") !== null) {
|
657 |
-
opts.element.data("select2").destroy();
|
658 |
-
}
|
659 |
-
|
660 |
-
this.container = this.createContainer();
|
661 |
-
|
662 |
-
this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
|
663 |
-
this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
|
664 |
-
this.container.attr("id", this.containerId);
|
665 |
-
|
666 |
-
// cache the body so future lookups are cheap
|
667 |
-
this.body = thunk(function() { return opts.element.closest("body"); });
|
668 |
-
|
669 |
-
syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
|
670 |
-
|
671 |
-
this.container.css(evaluate(opts.containerCss));
|
672 |
-
this.container.addClass(evaluate(opts.containerCssClass));
|
673 |
-
|
674 |
-
this.elementTabIndex = this.opts.element.attr("tabindex");
|
675 |
-
|
676 |
-
// swap container for the element
|
677 |
-
this.opts.element
|
678 |
-
.data("select2", this)
|
679 |
-
.attr("tabindex", "-1")
|
680 |
-
.before(this.container);
|
681 |
-
this.container.data("select2", this);
|
682 |
-
|
683 |
-
this.dropdown = this.container.find(".select2-drop");
|
684 |
-
this.dropdown.addClass(evaluate(opts.dropdownCssClass));
|
685 |
-
this.dropdown.data("select2", this);
|
686 |
-
|
687 |
-
this.results = results = this.container.find(resultsSelector);
|
688 |
-
this.search = search = this.container.find("input.select2-input");
|
689 |
-
|
690 |
-
this.resultsPage = 0;
|
691 |
-
this.context = null;
|
692 |
-
|
693 |
-
// initialize the container
|
694 |
-
this.initContainer();
|
695 |
-
|
696 |
-
installFilteredMouseMove(this.results);
|
697 |
-
this.dropdown.on("mousemove-filtered touchstart touchmove touchend", resultsSelector, this.bind(this.highlightUnderEvent));
|
698 |
-
|
699 |
-
installDebouncedScroll(80, this.results);
|
700 |
-
this.dropdown.on("scroll-debounced", resultsSelector, this.bind(this.loadMoreIfNeeded));
|
701 |
-
|
702 |
-
// do not propagate change event from the search field out of the component
|
703 |
-
$(this.container).on("change", ".select2-input", function(e) {e.stopPropagation();});
|
704 |
-
$(this.dropdown).on("change", ".select2-input", function(e) {e.stopPropagation();});
|
705 |
-
|
706 |
-
// if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel
|
707 |
-
if ($.fn.mousewheel) {
|
708 |
-
results.mousewheel(function (e, delta, deltaX, deltaY) {
|
709 |
-
var top = results.scrollTop(), height;
|
710 |
-
if (deltaY > 0 && top - deltaY <= 0) {
|
711 |
-
results.scrollTop(0);
|
712 |
-
killEvent(e);
|
713 |
-
} else if (deltaY < 0 && results.get(0).scrollHeight - results.scrollTop() + deltaY <= results.height()) {
|
714 |
-
results.scrollTop(results.get(0).scrollHeight - results.height());
|
715 |
-
killEvent(e);
|
716 |
-
}
|
717 |
-
});
|
718 |
-
}
|
719 |
-
|
720 |
-
installKeyUpChangeEvent(search);
|
721 |
-
search.on("keyup-change input paste", this.bind(this.updateResults));
|
722 |
-
search.on("focus", function () { search.addClass("select2-focused"); });
|
723 |
-
search.on("blur", function () { search.removeClass("select2-focused");});
|
724 |
-
|
725 |
-
this.dropdown.on("mouseup", resultsSelector, this.bind(function (e) {
|
726 |
-
if ($(e.target).closest(".select2-result-selectable").length > 0) {
|
727 |
-
this.highlightUnderEvent(e);
|
728 |
-
this.selectHighlighted(e);
|
729 |
-
}
|
730 |
-
}));
|
731 |
-
|
732 |
-
// trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening
|
733 |
-
// for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's
|
734 |
-
// dom it will trigger the popup close, which is not what we want
|
735 |
-
this.dropdown.on("click mouseup mousedown", function (e) { e.stopPropagation(); });
|
736 |
-
|
737 |
-
if ($.isFunction(this.opts.initSelection)) {
|
738 |
-
// initialize selection based on the current value of the source element
|
739 |
-
this.initSelection();
|
740 |
-
|
741 |
-
// if the user has provided a function that can set selection based on the value of the source element
|
742 |
-
// we monitor the change event on the element and trigger it, allowing for two way synchronization
|
743 |
-
this.monitorSource();
|
744 |
-
}
|
745 |
-
|
746 |
-
if (opts.maximumInputLength !== null) {
|
747 |
-
this.search.attr("maxlength", opts.maximumInputLength);
|
748 |
-
}
|
749 |
-
|
750 |
-
var disabled = opts.element.prop("disabled");
|
751 |
-
if (disabled === undefined) disabled = false;
|
752 |
-
this.enable(!disabled);
|
753 |
-
|
754 |
-
var readonly = opts.element.prop("readonly");
|
755 |
-
if (readonly === undefined) readonly = false;
|
756 |
-
this.readonly(readonly);
|
757 |
-
|
758 |
-
// Calculate size of scrollbar
|
759 |
-
scrollBarDimensions = scrollBarDimensions || measureScrollbar();
|
760 |
-
|
761 |
-
this.autofocus = opts.element.prop("autofocus")
|
762 |
-
opts.element.prop("autofocus", false);
|
763 |
-
if (this.autofocus) this.focus();
|
764 |
-
},
|
765 |
-
|
766 |
-
// abstract
|
767 |
-
destroy: function () {
|
768 |
-
var element=this.opts.element, select2 = element.data("select2");
|
769 |
-
|
770 |
-
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
|
771 |
-
|
772 |
-
if (select2 !== undefined) {
|
773 |
-
select2.container.remove();
|
774 |
-
select2.dropdown.remove();
|
775 |
-
element
|
776 |
-
.removeClass("select2-offscreen")
|
777 |
-
.removeData("select2")
|
778 |
-
.off(".select2")
|
779 |
-
.prop("autofocus", this.autofocus || false);
|
780 |
-
if (this.elementTabIndex) {
|
781 |
-
element.attr({tabindex: this.elementTabIndex});
|
782 |
-
} else {
|
783 |
-
element.removeAttr("tabindex");
|
784 |
-
}
|
785 |
-
element.show();
|
786 |
-
}
|
787 |
-
},
|
788 |
-
|
789 |
-
// abstract
|
790 |
-
optionToData: function(element) {
|
791 |
-
if (element.is("option")) {
|
792 |
-
return {
|
793 |
-
id:element.prop("value"),
|
794 |
-
text:element.text(),
|
795 |
-
element: element.get(),
|
796 |
-
css: element.attr("class"),
|
797 |
-
disabled: element.prop("disabled"),
|
798 |
-
locked: equal(element.attr("locked"), "locked") || equal(element.data("locked"), true)
|
799 |
-
};
|
800 |
-
} else if (element.is("optgroup")) {
|
801 |
-
return {
|
802 |
-
text:element.attr("label"),
|
803 |
-
children:[],
|
804 |
-
element: element.get(),
|
805 |
-
css: element.attr("class")
|
806 |
-
};
|
807 |
-
}
|
808 |
-
},
|
809 |
-
|
810 |
-
// abstract
|
811 |
-
prepareOpts: function (opts) {
|
812 |
-
var element, select, idKey, ajaxUrl, self = this;
|
813 |
-
|
814 |
-
element = opts.element;
|
815 |
-
|
816 |
-
if (element.get(0).tagName.toLowerCase() === "select") {
|
817 |
-
this.select = select = opts.element;
|
818 |
-
}
|
819 |
-
|
820 |
-
if (select) {
|
821 |
-
// these options are not allowed when attached to a select because they are picked up off the element itself
|
822 |
-
$.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () {
|
823 |
-
if (this in opts) {
|
824 |
-
throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element.");
|
825 |
-
}
|
826 |
-
});
|
827 |
-
}
|
828 |
-
|
829 |
-
opts = $.extend({}, {
|
830 |
-
populateResults: function(container, results, query) {
|
831 |
-
var populate, data, result, children, id=this.opts.id;
|
832 |
-
|
833 |
-
populate=function(results, container, depth) {
|
834 |
-
|
835 |
-
var i, l, result, selectable, disabled, compound, node, label, innerContainer, formatted;
|
836 |
-
|
837 |
-
results = opts.sortResults(results, container, query);
|
838 |
-
|
839 |
-
for (i = 0, l = results.length; i < l; i = i + 1) {
|
840 |
-
|
841 |
-
result=results[i];
|
842 |
-
|
843 |
-
disabled = (result.disabled === true);
|
844 |
-
selectable = (!disabled) && (id(result) !== undefined);
|
845 |
-
|
846 |
-
compound=result.children && result.children.length > 0;
|
847 |
-
|
848 |
-
node=$("<li></li>");
|
849 |
-
node.addClass("select2-results-dept-"+depth);
|
850 |
-
node.addClass("select2-result");
|
851 |
-
node.addClass(selectable ? "select2-result-selectable" : "select2-result-unselectable");
|
852 |
-
if (disabled) { node.addClass("select2-disabled"); }
|
853 |
-
if (compound) { node.addClass("select2-result-with-children"); }
|
854 |
-
node.addClass(self.opts.formatResultCssClass(result));
|
855 |
-
|
856 |
-
label=$(document.createElement("div"));
|
857 |
-
label.addClass("select2-result-label");
|
858 |
-
|
859 |
-
formatted=opts.formatResult(result, label, query, self.opts.escapeMarkup);
|
860 |
-
if (formatted!==undefined) {
|
861 |
-
label.html(formatted);
|
862 |
-
}
|
863 |
-
|
864 |
-
node.append(label);
|
865 |
-
|
866 |
-
if (compound) {
|
867 |
-
|
868 |
-
innerContainer=$("<ul></ul>");
|
869 |
-
innerContainer.addClass("select2-result-sub");
|
870 |
-
populate(result.children, innerContainer, depth+1);
|
871 |
-
node.append(innerContainer);
|
872 |
-
}
|
873 |
-
|
874 |
-
node.data("select2-data", result);
|
875 |
-
container.append(node);
|
876 |
-
}
|
877 |
-
};
|
878 |
-
|
879 |
-
populate(results, container, 0);
|
880 |
-
}
|
881 |
-
}, $.fn.select2.defaults, opts);
|
882 |
-
|
883 |
-
if (typeof(opts.id) !== "function") {
|
884 |
-
idKey = opts.id;
|
885 |
-
opts.id = function (e) { return e[idKey]; };
|
886 |
-
}
|
887 |
-
|
888 |
-
if ($.isArray(opts.element.data("select2Tags"))) {
|
889 |
-
if ("tags" in opts) {
|
890 |
-
throw "tags specified as both an attribute 'data-select2-tags' and in options of Select2 " + opts.element.attr("id");
|
891 |
-
}
|
892 |
-
opts.tags=opts.element.data("select2Tags");
|
893 |
-
}
|
894 |
-
|
895 |
-
if (select) {
|
896 |
-
opts.query = this.bind(function (query) {
|
897 |
-
var data = { results: [], more: false },
|
898 |
-
term = query.term,
|
899 |
-
children, placeholderOption, process;
|
900 |
-
|
901 |
-
process=function(element, collection) {
|
902 |
-
var group;
|
903 |
-
if (element.is("option")) {
|
904 |
-
if (query.matcher(term, element.text(), element)) {
|
905 |
-
collection.push(self.optionToData(element));
|
906 |
-
}
|
907 |
-
} else if (element.is("optgroup")) {
|
908 |
-
group=self.optionToData(element);
|
909 |
-
element.children().each2(function(i, elm) { process(elm, group.children); });
|
910 |
-
if (group.children.length>0) {
|
911 |
-
collection.push(group);
|
912 |
-
}
|
913 |
-
}
|
914 |
-
};
|
915 |
-
|
916 |
-
children=element.children();
|
917 |
-
|
918 |
-
// ignore the placeholder option if there is one
|
919 |
-
if (this.getPlaceholder() !== undefined && children.length > 0) {
|
920 |
-
placeholderOption = this.getPlaceholderOption();
|
921 |
-
if (placeholderOption) {
|
922 |
-
children=children.not(placeholderOption);
|
923 |
-
}
|
924 |
-
}
|
925 |
-
|
926 |
-
children.each2(function(i, elm) { process(elm, data.results); });
|
927 |
-
|
928 |
-
query.callback(data);
|
929 |
-
});
|
930 |
-
// this is needed because inside val() we construct choices from options and there id is hardcoded
|
931 |
-
opts.id=function(e) { return e.id; };
|
932 |
-
opts.formatResultCssClass = function(data) { return data.css; };
|
933 |
-
} else {
|
934 |
-
if (!("query" in opts)) {
|
935 |
-
|
936 |
-
if ("ajax" in opts) {
|
937 |
-
ajaxUrl = opts.element.data("ajax-url");
|
938 |
-
if (ajaxUrl && ajaxUrl.length > 0) {
|
939 |
-
opts.ajax.url = ajaxUrl;
|
940 |
-
}
|
941 |
-
opts.query = ajax.call(opts.element, opts.ajax);
|
942 |
-
} else if ("data" in opts) {
|
943 |
-
opts.query = local(opts.data);
|
944 |
-
} else if ("tags" in opts) {
|
945 |
-
opts.query = tags(opts.tags);
|
946 |
-
if (opts.createSearchChoice === undefined) {
|
947 |
-
opts.createSearchChoice = function (term) { return {id: term, text: term}; };
|
948 |
-
}
|
949 |
-
if (opts.initSelection === undefined) {
|
950 |
-
opts.initSelection = function (element, callback) {
|
951 |
-
var data = [];
|
952 |
-
$(splitVal(element.val(), opts.separator)).each(function () {
|
953 |
-
var id = this, text = this, tags=opts.tags;
|
954 |
-
if ($.isFunction(tags)) tags=tags();
|
955 |
-
$(tags).each(function() { if (equal(this.id, id)) { text = this.text; return false; } });
|
956 |
-
data.push({id: id, text: text});
|
957 |
-
});
|
958 |
-
|
959 |
-
callback(data);
|
960 |
-
};
|
961 |
-
}
|
962 |
-
}
|
963 |
-
}
|
964 |
-
}
|
965 |
-
if (typeof(opts.query) !== "function") {
|
966 |
-
throw "query function not defined for Select2 " + opts.element.attr("id");
|
967 |
-
}
|
968 |
-
|
969 |
-
return opts;
|
970 |
-
},
|
971 |
-
|
972 |
-
/**
|
973 |
-
* Monitor the original element for changes and update select2 accordingly
|
974 |
-
*/
|
975 |
-
// abstract
|
976 |
-
monitorSource: function () {
|
977 |
-
var el = this.opts.element, sync;
|
978 |
-
|
979 |
-
el.on("change.select2", this.bind(function (e) {
|
980 |
-
if (this.opts.element.data("select2-change-triggered") !== true) {
|
981 |
-
this.initSelection();
|
982 |
-
}
|
983 |
-
}));
|
984 |
-
|
985 |
-
sync = this.bind(function () {
|
986 |
-
|
987 |
-
var enabled, readonly, self = this;
|
988 |
-
|
989 |
-
// sync enabled state
|
990 |
-
var disabled = el.prop("disabled");
|
991 |
-
if (disabled === undefined) disabled = false;
|
992 |
-
this.enable(!disabled);
|
993 |
-
|
994 |
-
var readonly = el.prop("readonly");
|
995 |
-
if (readonly === undefined) readonly = false;
|
996 |
-
this.readonly(readonly);
|
997 |
-
|
998 |
-
syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
|
999 |
-
this.container.addClass(evaluate(this.opts.containerCssClass));
|
1000 |
-
|
1001 |
-
syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
|
1002 |
-
this.dropdown.addClass(evaluate(this.opts.dropdownCssClass));
|
1003 |
-
|
1004 |
-
});
|
1005 |
-
|
1006 |
-
// mozilla and IE
|
1007 |
-
el.on("propertychange.select2 DOMAttrModified.select2", sync);
|
1008 |
-
|
1009 |
-
|
1010 |
-
// hold onto a reference of the callback to work around a chromium bug
|
1011 |
-
if (this.mutationCallback === undefined) {
|
1012 |
-
this.mutationCallback = function (mutations) {
|
1013 |
-
mutations.forEach(sync);
|
1014 |
-
}
|
1015 |
-
}
|
1016 |
-
|
1017 |
-
// safari and chrome
|
1018 |
-
if (typeof WebKitMutationObserver !== "undefined") {
|
1019 |
-
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
|
1020 |
-
this.propertyObserver = new WebKitMutationObserver(this.mutationCallback);
|
1021 |
-
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
|
1022 |
-
}
|
1023 |
-
},
|
1024 |
-
|
1025 |
-
// abstract
|
1026 |
-
triggerSelect: function(data) {
|
1027 |
-
var evt = $.Event("select2-selecting", { val: this.id(data), object: data });
|
1028 |
-
this.opts.element.trigger(evt);
|
1029 |
-
return !evt.isDefaultPrevented();
|
1030 |
-
},
|
1031 |
-
|
1032 |
-
/**
|
1033 |
-
* Triggers the change event on the source element
|
1034 |
-
*/
|
1035 |
-
// abstract
|
1036 |
-
triggerChange: function (details) {
|
1037 |
-
|
1038 |
-
details = details || {};
|
1039 |
-
details= $.extend({}, details, { type: "change", val: this.val() });
|
1040 |
-
// prevents recursive triggering
|
1041 |
-
this.opts.element.data("select2-change-triggered", true);
|
1042 |
-
this.opts.element.trigger(details);
|
1043 |
-
this.opts.element.data("select2-change-triggered", false);
|
1044 |
-
|
1045 |
-
// some validation frameworks ignore the change event and listen instead to keyup, click for selects
|
1046 |
-
// so here we trigger the click event manually
|
1047 |
-
this.opts.element.click();
|
1048 |
-
|
1049 |
-
// ValidationEngine ignorea the change event and listens instead to blur
|
1050 |
-
// so here we trigger the blur event manually if so desired
|
1051 |
-
if (this.opts.blurOnChange)
|
1052 |
-
this.opts.element.blur();
|
1053 |
-
},
|
1054 |
-
|
1055 |
-
//abstract
|
1056 |
-
isInterfaceEnabled: function()
|
1057 |
-
{
|
1058 |
-
return this.enabledInterface === true;
|
1059 |
-
},
|
1060 |
-
|
1061 |
-
// abstract
|
1062 |
-
enableInterface: function() {
|
1063 |
-
var enabled = this._enabled && !this._readonly,
|
1064 |
-
disabled = !enabled;
|
1065 |
-
|
1066 |
-
if (enabled === this.enabledInterface) return false;
|
1067 |
-
|
1068 |
-
this.container.toggleClass("select2-container-disabled", disabled);
|
1069 |
-
this.close();
|
1070 |
-
this.enabledInterface = enabled;
|
1071 |
-
|
1072 |
-
return true;
|
1073 |
-
},
|
1074 |
-
|
1075 |
-
// abstract
|
1076 |
-
enable: function(enabled) {
|
1077 |
-
if (enabled === undefined) enabled = true;
|
1078 |
-
if (this._enabled === enabled) return false;
|
1079 |
-
this._enabled = enabled;
|
1080 |
-
|
1081 |
-
this.opts.element.prop("disabled", !enabled);
|
1082 |
-
this.enableInterface();
|
1083 |
-
return true;
|
1084 |
-
},
|
1085 |
-
|
1086 |
-
// abstract
|
1087 |
-
readonly: function(enabled) {
|
1088 |
-
if (enabled === undefined) enabled = false;
|
1089 |
-
if (this._readonly === enabled) return false;
|
1090 |
-
this._readonly = enabled;
|
1091 |
-
|
1092 |
-
this.opts.element.prop("readonly", enabled);
|
1093 |
-
this.enableInterface();
|
1094 |
-
return true;
|
1095 |
-
},
|
1096 |
-
|
1097 |
-
// abstract
|
1098 |
-
opened: function () {
|
1099 |
-
return this.container.hasClass("select2-dropdown-open");
|
1100 |
-
},
|
1101 |
-
|
1102 |
-
// abstract
|
1103 |
-
positionDropdown: function() {
|
1104 |
-
var $dropdown = this.dropdown,
|
1105 |
-
offset = this.container.offset(),
|
1106 |
-
height = this.container.outerHeight(false),
|
1107 |
-
width = this.container.outerWidth(false),
|
1108 |
-
dropHeight = $dropdown.outerHeight(false),
|
1109 |
-
viewPortRight = $(window).scrollLeft() + $(window).width(),
|
1110 |
-
viewportBottom = $(window).scrollTop() + $(window).height(),
|
1111 |
-
dropTop = offset.top + height,
|
1112 |
-
dropLeft = offset.left,
|
1113 |
-
enoughRoomBelow = dropTop + dropHeight <= viewportBottom,
|
1114 |
-
enoughRoomAbove = (offset.top - dropHeight) >= this.body().scrollTop(),
|
1115 |
-
dropWidth = $dropdown.outerWidth(false),
|
1116 |
-
enoughRoomOnRight = dropLeft + dropWidth <= viewPortRight,
|
1117 |
-
aboveNow = $dropdown.hasClass("select2-drop-above"),
|
1118 |
-
bodyOffset,
|
1119 |
-
above,
|
1120 |
-
css,
|
1121 |
-
resultsListNode;
|
1122 |
-
|
1123 |
-
if (this.opts.dropdownAutoWidth) {
|
1124 |
-
resultsListNode = $('.select2-results', $dropdown)[0];
|
1125 |
-
$dropdown.addClass('select2-drop-auto-width');
|
1126 |
-
$dropdown.css('width', '');
|
1127 |
-
// Add scrollbar width to dropdown if vertical scrollbar is present
|
1128 |
-
dropWidth = $dropdown.outerWidth(false) + (resultsListNode.scrollHeight === resultsListNode.clientHeight ? 0 : scrollBarDimensions.width);
|
1129 |
-
dropWidth > width ? width = dropWidth : dropWidth = width;
|
1130 |
-
enoughRoomOnRight = dropLeft + dropWidth <= viewPortRight;
|
1131 |
-
}
|
1132 |
-
else {
|
1133 |
-
this.container.removeClass('select2-drop-auto-width');
|
1134 |
-
}
|
1135 |
-
|
1136 |
-
//console.log("below/ droptop:", dropTop, "dropHeight", dropHeight, "sum", (dropTop+dropHeight)+" viewport bottom", viewportBottom, "enough?", enoughRoomBelow);
|
1137 |
-
//console.log("above/ offset.top", offset.top, "dropHeight", dropHeight, "top", (offset.top-dropHeight), "scrollTop", this.body().scrollTop(), "enough?", enoughRoomAbove);
|
1138 |
-
|
1139 |
-
// fix positioning when body has an offset and is not position: static
|
1140 |
-
if (this.body().css('position') !== 'static') {
|
1141 |
-
bodyOffset = this.body().offset();
|
1142 |
-
dropTop -= bodyOffset.top;
|
1143 |
-
dropLeft -= bodyOffset.left;
|
1144 |
-
}
|
1145 |
-
|
1146 |
-
// always prefer the current above/below alignment, unless there is not enough room
|
1147 |
-
if (aboveNow) {
|
1148 |
-
above = true;
|
1149 |
-
if (!enoughRoomAbove && enoughRoomBelow) above = false;
|
1150 |
-
} else {
|
1151 |
-
above = false;
|
1152 |
-
if (!enoughRoomBelow && enoughRoomAbove) above = true;
|
1153 |
-
}
|
1154 |
-
|
1155 |
-
if (!enoughRoomOnRight) {
|
1156 |
-
dropLeft = offset.left + width - dropWidth;
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
if (above) {
|
1160 |
-
dropTop = offset.top - dropHeight;
|
1161 |
-
this.container.addClass("select2-drop-above");
|
1162 |
-
$dropdown.addClass("select2-drop-above");
|
1163 |
-
}
|
1164 |
-
else {
|
1165 |
-
this.container.removeClass("select2-drop-above");
|
1166 |
-
$dropdown.removeClass("select2-drop-above");
|
1167 |
-
}
|
1168 |
-
|
1169 |
-
css = $.extend({
|
1170 |
-
top: dropTop,
|
1171 |
-
left: dropLeft,
|
1172 |
-
width: width
|
1173 |
-
}, evaluate(this.opts.dropdownCss));
|
1174 |
-
|
1175 |
-
$dropdown.css(css);
|
1176 |
-
},
|
1177 |
-
|
1178 |
-
// abstract
|
1179 |
-
shouldOpen: function() {
|
1180 |
-
var event;
|
1181 |
-
|
1182 |
-
if (this.opened()) return false;
|
1183 |
-
|
1184 |
-
if (this._enabled === false || this._readonly === true) return false;
|
1185 |
-
|
1186 |
-
event = $.Event("select2-opening");
|
1187 |
-
this.opts.element.trigger(event);
|
1188 |
-
return !event.isDefaultPrevented();
|
1189 |
-
},
|
1190 |
-
|
1191 |
-
// abstract
|
1192 |
-
clearDropdownAlignmentPreference: function() {
|
1193 |
-
// clear the classes used to figure out the preference of where the dropdown should be opened
|
1194 |
-
this.container.removeClass("select2-drop-above");
|
1195 |
-
this.dropdown.removeClass("select2-drop-above");
|
1196 |
-
},
|
1197 |
-
|
1198 |
-
/**
|
1199 |
-
* Opens the dropdown
|
1200 |
-
*
|
1201 |
-
* @return {Boolean} whether or not dropdown was opened. This method will return false if, for example,
|
1202 |
-
* the dropdown is already open, or if the 'open' event listener on the element called preventDefault().
|
1203 |
-
*/
|
1204 |
-
// abstract
|
1205 |
-
open: function () {
|
1206 |
-
|
1207 |
-
if (!this.shouldOpen()) return false;
|
1208 |
-
|
1209 |
-
this.opening();
|
1210 |
-
|
1211 |
-
return true;
|
1212 |
-
},
|
1213 |
-
|
1214 |
-
/**
|
1215 |
-
* Performs the opening of the dropdown
|
1216 |
-
*/
|
1217 |
-
// abstract
|
1218 |
-
opening: function() {
|
1219 |
-
var cid = this.containerId,
|
1220 |
-
scroll = "scroll." + cid,
|
1221 |
-
resize = "resize."+cid,
|
1222 |
-
orient = "orientationchange."+cid,
|
1223 |
-
mask, maskCss;
|
1224 |
-
|
1225 |
-
this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
|
1226 |
-
|
1227 |
-
this.clearDropdownAlignmentPreference();
|
1228 |
-
|
1229 |
-
if(this.dropdown[0] !== this.body().children().last()[0]) {
|
1230 |
-
this.dropdown.detach().appendTo(this.body());
|
1231 |
-
}
|
1232 |
-
|
1233 |
-
// create the dropdown mask if doesnt already exist
|
1234 |
-
mask = $("#select2-drop-mask");
|
1235 |
-
if (mask.length == 0) {
|
1236 |
-
mask = $(document.createElement("div"));
|
1237 |
-
mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask");
|
1238 |
-
mask.hide();
|
1239 |
-
mask.appendTo(this.body());
|
1240 |
-
mask.on("mousedown touchstart click", function (e) {
|
1241 |
-
var dropdown = $("#select2-drop"), self;
|
1242 |
-
if (dropdown.length > 0) {
|
1243 |
-
self=dropdown.data("select2");
|
1244 |
-
if (self.opts.selectOnBlur) {
|
1245 |
-
self.selectHighlighted({noFocus: true});
|
1246 |
-
}
|
1247 |
-
self.close();
|
1248 |
-
e.preventDefault();
|
1249 |
-
e.stopPropagation();
|
1250 |
-
}
|
1251 |
-
});
|
1252 |
-
}
|
1253 |
-
|
1254 |
-
// ensure the mask is always right before the dropdown
|
1255 |
-
if (this.dropdown.prev()[0] !== mask[0]) {
|
1256 |
-
this.dropdown.before(mask);
|
1257 |
-
}
|
1258 |
-
|
1259 |
-
// move the global id to the correct dropdown
|
1260 |
-
$("#select2-drop").removeAttr("id");
|
1261 |
-
this.dropdown.attr("id", "select2-drop");
|
1262 |
-
|
1263 |
-
// show the elements
|
1264 |
-
maskCss=_makeMaskCss();
|
1265 |
-
|
1266 |
-
mask.css(maskCss).show();
|
1267 |
-
|
1268 |
-
this.dropdown.show();
|
1269 |
-
this.positionDropdown();
|
1270 |
-
|
1271 |
-
this.dropdown.addClass("select2-drop-active");
|
1272 |
-
|
1273 |
-
// attach listeners to events that can change the position of the container and thus require
|
1274 |
-
// the position of the dropdown to be updated as well so it does not come unglued from the container
|
1275 |
-
var that = this;
|
1276 |
-
this.container.parents().add(window).each(function () {
|
1277 |
-
$(this).on(resize+" "+scroll+" "+orient, function (e) {
|
1278 |
-
var maskCss=_makeMaskCss();
|
1279 |
-
$("#select2-drop-mask").css(maskCss);
|
1280 |
-
that.positionDropdown();
|
1281 |
-
});
|
1282 |
-
});
|
1283 |
-
|
1284 |
-
function _makeMaskCss() {
|
1285 |
-
return {
|
1286 |
-
width : Math.max(document.documentElement.scrollWidth, $(window).width()),
|
1287 |
-
height : Math.max(document.documentElement.scrollHeight, $(window).height())
|
1288 |
-
}
|
1289 |
-
}
|
1290 |
-
},
|
1291 |
-
|
1292 |
-
// abstract
|
1293 |
-
close: function () {
|
1294 |
-
if (!this.opened()) return;
|
1295 |
-
|
1296 |
-
var cid = this.containerId,
|
1297 |
-
scroll = "scroll." + cid,
|
1298 |
-
resize = "resize."+cid,
|
1299 |
-
orient = "orientationchange."+cid;
|
1300 |
-
|
1301 |
-
// unbind event listeners
|
1302 |
-
this.container.parents().add(window).each(function () { $(this).off(scroll).off(resize).off(orient); });
|
1303 |
-
|
1304 |
-
this.clearDropdownAlignmentPreference();
|
1305 |
-
|
1306 |
-
$("#select2-drop-mask").hide();
|
1307 |
-
this.dropdown.removeAttr("id"); // only the active dropdown has the select2-drop id
|
1308 |
-
this.dropdown.hide();
|
1309 |
-
this.container.removeClass("select2-dropdown-open");
|
1310 |
-
this.results.empty();
|
1311 |
-
|
1312 |
-
|
1313 |
-
this.clearSearch();
|
1314 |
-
this.search.removeClass("select2-active");
|
1315 |
-
this.opts.element.trigger($.Event("select2-close"));
|
1316 |
-
},
|
1317 |
-
|
1318 |
-
/**
|
1319 |
-
* Opens control, sets input value, and updates results.
|
1320 |
-
*/
|
1321 |
-
// abstract
|
1322 |
-
externalSearch: function (term) {
|
1323 |
-
this.open();
|
1324 |
-
this.search.val(term);
|
1325 |
-
this.updateResults(false);
|
1326 |
-
},
|
1327 |
-
|
1328 |
-
// abstract
|
1329 |
-
clearSearch: function () {
|
1330 |
-
|
1331 |
-
},
|
1332 |
-
|
1333 |
-
//abstract
|
1334 |
-
getMaximumSelectionSize: function() {
|
1335 |
-
return evaluate(this.opts.maximumSelectionSize);
|
1336 |
-
},
|
1337 |
-
|
1338 |
-
// abstract
|
1339 |
-
ensureHighlightVisible: function () {
|
1340 |
-
var results = this.results, children, index, child, hb, rb, y, more;
|
1341 |
-
|
1342 |
-
index = this.highlight();
|
1343 |
-
|
1344 |
-
if (index < 0) return;
|
1345 |
-
|
1346 |
-
if (index == 0) {
|
1347 |
-
|
1348 |
-
// if the first element is highlighted scroll all the way to the top,
|
1349 |
-
// that way any unselectable headers above it will also be scrolled
|
1350 |
-
// into view
|
1351 |
-
|
1352 |
-
results.scrollTop(0);
|
1353 |
-
return;
|
1354 |
-
}
|
1355 |
-
|
1356 |
-
children = this.findHighlightableChoices().find('.select2-result-label');
|
1357 |
-
|
1358 |
-
child = $(children[index]);
|
1359 |
-
|
1360 |
-
hb = child.offset().top + child.outerHeight(true);
|
1361 |
-
|
1362 |
-
// if this is the last child lets also make sure select2-more-results is visible
|
1363 |
-
if (index === children.length - 1) {
|
1364 |
-
more = results.find("li.select2-more-results");
|
1365 |
-
if (more.length > 0) {
|
1366 |
-
hb = more.offset().top + more.outerHeight(true);
|
1367 |
-
}
|
1368 |
-
}
|
1369 |
-
|
1370 |
-
rb = results.offset().top + results.outerHeight(true);
|
1371 |
-
if (hb > rb) {
|
1372 |
-
results.scrollTop(results.scrollTop() + (hb - rb));
|
1373 |
-
}
|
1374 |
-
y = child.offset().top - results.offset().top;
|
1375 |
-
|
1376 |
-
// make sure the top of the element is visible
|
1377 |
-
if (y < 0 && child.css('display') != 'none' ) {
|
1378 |
-
results.scrollTop(results.scrollTop() + y); // y is negative
|
1379 |
-
}
|
1380 |
-
},
|
1381 |
-
|
1382 |
-
// abstract
|
1383 |
-
findHighlightableChoices: function() {
|
1384 |
-
return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");
|
1385 |
-
},
|
1386 |
-
|
1387 |
-
// abstract
|
1388 |
-
moveHighlight: function (delta) {
|
1389 |
-
var choices = this.findHighlightableChoices(),
|
1390 |
-
index = this.highlight();
|
1391 |
-
|
1392 |
-
while (index > -1 && index < choices.length) {
|
1393 |
-
index += delta;
|
1394 |
-
var choice = $(choices[index]);
|
1395 |
-
if (choice.hasClass("select2-result-selectable") && !choice.hasClass("select2-disabled") && !choice.hasClass("select2-selected")) {
|
1396 |
-
this.highlight(index);
|
1397 |
-
break;
|
1398 |
-
}
|
1399 |
-
}
|
1400 |
-
},
|
1401 |
-
|
1402 |
-
// abstract
|
1403 |
-
highlight: function (index) {
|
1404 |
-
var choices = this.findHighlightableChoices(),
|
1405 |
-
choice,
|
1406 |
-
data;
|
1407 |
-
|
1408 |
-
if (arguments.length === 0) {
|
1409 |
-
return indexOf(choices.filter(".select2-highlighted")[0], choices.get());
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
if (index >= choices.length) index = choices.length - 1;
|
1413 |
-
if (index < 0) index = 0;
|
1414 |
-
|
1415 |
-
this.results.find(".select2-highlighted").removeClass("select2-highlighted");
|
1416 |
-
|
1417 |
-
choice = $(choices[index]);
|
1418 |
-
choice.addClass("select2-highlighted");
|
1419 |
-
|
1420 |
-
this.ensureHighlightVisible();
|
1421 |
-
|
1422 |
-
data = choice.data("select2-data");
|
1423 |
-
if (data) {
|
1424 |
-
this.opts.element.trigger({ type: "select2-highlight", val: this.id(data), choice: data });
|
1425 |
-
}
|
1426 |
-
},
|
1427 |
-
|
1428 |
-
// abstract
|
1429 |
-
countSelectableResults: function() {
|
1430 |
-
return this.findHighlightableChoices().length;
|
1431 |
-
},
|
1432 |
-
|
1433 |
-
// abstract
|
1434 |
-
highlightUnderEvent: function (event) {
|
1435 |
-
var el = $(event.target).closest(".select2-result-selectable");
|
1436 |
-
if (el.length > 0 && !el.is(".select2-highlighted")) {
|
1437 |
-
var choices = this.findHighlightableChoices();
|
1438 |
-
this.highlight(choices.index(el));
|
1439 |
-
} else if (el.length == 0) {
|
1440 |
-
// if we are over an unselectable item remove al highlights
|
1441 |
-
this.results.find(".select2-highlighted").removeClass("select2-highlighted");
|
1442 |
-
}
|
1443 |
-
},
|
1444 |
-
|
1445 |
-
// abstract
|
1446 |
-
loadMoreIfNeeded: function () {
|
1447 |
-
var results = this.results,
|
1448 |
-
more = results.find("li.select2-more-results"),
|
1449 |
-
below, // pixels the element is below the scroll fold, below==0 is when the element is starting to be visible
|
1450 |
-
offset = -1, // index of first element without data
|
1451 |
-
page = this.resultsPage + 1,
|
1452 |
-
self=this,
|
1453 |
-
term=this.search.val(),
|
1454 |
-
context=this.context;
|
1455 |
-
|
1456 |
-
if (more.length === 0) return;
|
1457 |
-
below = more.offset().top - results.offset().top - results.height();
|
1458 |
-
|
1459 |
-
if (below <= this.opts.loadMorePadding) {
|
1460 |
-
more.addClass("select2-active");
|
1461 |
-
this.opts.query({
|
1462 |
-
element: this.opts.element,
|
1463 |
-
term: term,
|
1464 |
-
page: page,
|
1465 |
-
context: context,
|
1466 |
-
matcher: this.opts.matcher,
|
1467 |
-
callback: this.bind(function (data) {
|
1468 |
-
|
1469 |
-
// ignore a response if the select2 has been closed before it was received
|
1470 |
-
if (!self.opened()) return;
|
1471 |
-
|
1472 |
-
|
1473 |
-
self.opts.populateResults.call(this, results, data.results, {term: term, page: page, context:context});
|
1474 |
-
self.postprocessResults(data, false, false);
|
1475 |
-
|
1476 |
-
if (data.more===true) {
|
1477 |
-
more.detach().appendTo(results).text(self.opts.formatLoadMore(page+1));
|
1478 |
-
window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
|
1479 |
-
} else {
|
1480 |
-
more.remove();
|
1481 |
-
}
|
1482 |
-
self.positionDropdown();
|
1483 |
-
self.resultsPage = page;
|
1484 |
-
self.context = data.context;
|
1485 |
-
})});
|
1486 |
-
}
|
1487 |
-
},
|
1488 |
-
|
1489 |
-
/**
|
1490 |
-
* Default tokenizer function which does nothing
|
1491 |
-
*/
|
1492 |
-
tokenize: function() {
|
1493 |
-
|
1494 |
-
},
|
1495 |
-
|
1496 |
-
/**
|
1497 |
-
* @param initial whether or not this is the call to this method right after the dropdown has been opened
|
1498 |
-
*/
|
1499 |
-
// abstract
|
1500 |
-
updateResults: function (initial) {
|
1501 |
-
var search = this.search,
|
1502 |
-
results = this.results,
|
1503 |
-
opts = this.opts,
|
1504 |
-
data,
|
1505 |
-
self = this,
|
1506 |
-
input,
|
1507 |
-
term = search.val(),
|
1508 |
-
lastTerm=$.data(this.container, "select2-last-term");
|
1509 |
-
|
1510 |
-
// prevent duplicate queries against the same term
|
1511 |
-
if (initial !== true && lastTerm && equal(term, lastTerm)) return;
|
1512 |
-
|
1513 |
-
$.data(this.container, "select2-last-term", term);
|
1514 |
-
|
1515 |
-
// if the search is currently hidden we do not alter the results
|
1516 |
-
if (initial !== true && (this.showSearchInput === false || !this.opened())) {
|
1517 |
-
return;
|
1518 |
-
}
|
1519 |
-
|
1520 |
-
function postRender() {
|
1521 |
-
search.removeClass("select2-active");
|
1522 |
-
self.positionDropdown();
|
1523 |
-
}
|
1524 |
-
|
1525 |
-
function render(html) {
|
1526 |
-
results.html(html);
|
1527 |
-
postRender();
|
1528 |
-
}
|
1529 |
-
|
1530 |
-
var maxSelSize = this.getMaximumSelectionSize();
|
1531 |
-
if (maxSelSize >=1) {
|
1532 |
-
data = this.data();
|
1533 |
-
if ($.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
|
1534 |
-
render("<li class='select2-selection-limit'>" + opts.formatSelectionTooBig(maxSelSize) + "</li>");
|
1535 |
-
return;
|
1536 |
-
}
|
1537 |
-
}
|
1538 |
-
|
1539 |
-
if (search.val().length < opts.minimumInputLength) {
|
1540 |
-
if (checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
|
1541 |
-
render("<li class='select2-no-results'>" + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "</li>");
|
1542 |
-
} else {
|
1543 |
-
render("");
|
1544 |
-
}
|
1545 |
-
if (initial && this.showSearch) this.showSearch(true);
|
1546 |
-
return;
|
1547 |
-
}
|
1548 |
-
|
1549 |
-
if (opts.maximumInputLength && search.val().length > opts.maximumInputLength) {
|
1550 |
-
if (checkFormatter(opts.formatInputTooLong, "formatInputTooLong")) {
|
1551 |
-
render("<li class='select2-no-results'>" + opts.formatInputTooLong(search.val(), opts.maximumInputLength) + "</li>");
|
1552 |
-
} else {
|
1553 |
-
render("");
|
1554 |
-
}
|
1555 |
-
return;
|
1556 |
-
}
|
1557 |
-
|
1558 |
-
if (opts.formatSearching && this.findHighlightableChoices().length === 0) {
|
1559 |
-
render("<li class='select2-searching'>" + opts.formatSearching() + "</li>");
|
1560 |
-
}
|
1561 |
-
|
1562 |
-
search.addClass("select2-active");
|
1563 |
-
|
1564 |
-
// give the tokenizer a chance to pre-process the input
|
1565 |
-
input = this.tokenize();
|
1566 |
-
if (input != undefined && input != null) {
|
1567 |
-
search.val(input);
|
1568 |
-
}
|
1569 |
-
|
1570 |
-
this.resultsPage = 1;
|
1571 |
-
|
1572 |
-
opts.query({
|
1573 |
-
element: opts.element,
|
1574 |
-
term: search.val(),
|
1575 |
-
page: this.resultsPage,
|
1576 |
-
context: null,
|
1577 |
-
matcher: opts.matcher,
|
1578 |
-
callback: this.bind(function (data) {
|
1579 |
-
var def; // default choice
|
1580 |
-
|
1581 |
-
// ignore a response if the select2 has been closed before it was received
|
1582 |
-
if (!this.opened()) {
|
1583 |
-
this.search.removeClass("select2-active");
|
1584 |
-
return;
|
1585 |
-
}
|
1586 |
-
|
1587 |
-
// save context, if any
|
1588 |
-
this.context = (data.context===undefined) ? null : data.context;
|
1589 |
-
// create a default choice and prepend it to the list
|
1590 |
-
if (this.opts.createSearchChoice && search.val() !== "") {
|
1591 |
-
def = this.opts.createSearchChoice.call(self, search.val(), data.results);
|
1592 |
-
if (def !== undefined && def !== null && self.id(def) !== undefined && self.id(def) !== null) {
|
1593 |
-
if ($(data.results).filter(
|
1594 |
-
function () {
|
1595 |
-
return equal(self.id(this), self.id(def));
|
1596 |
-
}).length === 0) {
|
1597 |
-
data.results.unshift(def);
|
1598 |
-
}
|
1599 |
-
}
|
1600 |
-
}
|
1601 |
-
|
1602 |
-
if (data.results.length === 0 && checkFormatter(opts.formatNoMatches, "formatNoMatches")) {
|
1603 |
-
render("<li class='select2-no-results'>" + opts.formatNoMatches(search.val()) + "</li>");
|
1604 |
-
return;
|
1605 |
-
}
|
1606 |
-
|
1607 |
-
results.empty();
|
1608 |
-
self.opts.populateResults.call(this, results, data.results, {term: search.val(), page: this.resultsPage, context:null});
|
1609 |
-
|
1610 |
-
if (data.more === true && checkFormatter(opts.formatLoadMore, "formatLoadMore")) {
|
1611 |
-
results.append("<li class='select2-more-results'>" + self.opts.escapeMarkup(opts.formatLoadMore(this.resultsPage)) + "</li>");
|
1612 |
-
window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
|
1613 |
-
}
|
1614 |
-
|
1615 |
-
this.postprocessResults(data, initial);
|
1616 |
-
|
1617 |
-
postRender();
|
1618 |
-
|
1619 |
-
this.opts.element.trigger({ type: "select2-loaded", items: data });
|
1620 |
-
})});
|
1621 |
-
},
|
1622 |
-
|
1623 |
-
// abstract
|
1624 |
-
cancel: function () {
|
1625 |
-
this.close();
|
1626 |
-
},
|
1627 |
-
|
1628 |
-
// abstract
|
1629 |
-
blur: function () {
|
1630 |
-
// if selectOnBlur == true, select the currently highlighted option
|
1631 |
-
if (this.opts.selectOnBlur)
|
1632 |
-
this.selectHighlighted({noFocus: true});
|
1633 |
-
|
1634 |
-
this.close();
|
1635 |
-
this.container.removeClass("select2-container-active");
|
1636 |
-
// synonymous to .is(':focus'), which is available in jquery >= 1.6
|
1637 |
-
if (this.search[0] === document.activeElement) { this.search.blur(); }
|
1638 |
-
this.clearSearch();
|
1639 |
-
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
|
1640 |
-
},
|
1641 |
-
|
1642 |
-
// abstract
|
1643 |
-
focusSearch: function () {
|
1644 |
-
focus(this.search);
|
1645 |
-
},
|
1646 |
-
|
1647 |
-
// abstract
|
1648 |
-
selectHighlighted: function (options) {
|
1649 |
-
var index=this.highlight(),
|
1650 |
-
highlighted=this.results.find(".select2-highlighted"),
|
1651 |
-
data = highlighted.closest('.select2-result').data("select2-data");
|
1652 |
-
|
1653 |
-
if (data) {
|
1654 |
-
this.highlight(index);
|
1655 |
-
this.onSelect(data, options);
|
1656 |
-
} else if (options && options.noFocus) {
|
1657 |
-
this.close();
|
1658 |
-
}
|
1659 |
-
},
|
1660 |
-
|
1661 |
-
// abstract
|
1662 |
-
getPlaceholder: function () {
|
1663 |
-
var placeholderOption;
|
1664 |
-
return this.opts.element.attr("placeholder") ||
|
1665 |
-
this.opts.element.attr("data-placeholder") || // jquery 1.4 compat
|
1666 |
-
this.opts.element.data("placeholder") ||
|
1667 |
-
this.opts.placeholder ||
|
1668 |
-
((placeholderOption = this.getPlaceholderOption()) !== undefined ? placeholderOption.text() : undefined);
|
1669 |
-
},
|
1670 |
-
|
1671 |
-
// abstract
|
1672 |
-
getPlaceholderOption: function() {
|
1673 |
-
if (this.select) {
|
1674 |
-
var firstOption = this.select.children().first();
|
1675 |
-
if (this.opts.placeholderOption !== undefined ) {
|
1676 |
-
//Determine the placeholder option based on the specified placeholderOption setting
|
1677 |
-
return (this.opts.placeholderOption === "first" && firstOption) ||
|
1678 |
-
(typeof this.opts.placeholderOption === "function" && this.opts.placeholderOption(this.select));
|
1679 |
-
} else if (firstOption.text() === "" && firstOption.val() === "") {
|
1680 |
-
//No explicit placeholder option specified, use the first if it's blank
|
1681 |
-
return firstOption;
|
1682 |
-
}
|
1683 |
-
}
|
1684 |
-
},
|
1685 |
-
|
1686 |
-
/**
|
1687 |
-
* Get the desired width for the container element. This is
|
1688 |
-
* derived first from option `width` passed to select2, then
|
1689 |
-
* the inline 'style' on the original element, and finally
|
1690 |
-
* falls back to the jQuery calculated element width.
|
1691 |
-
*/
|
1692 |
-
// abstract
|
1693 |
-
initContainerWidth: function () {
|
1694 |
-
function resolveContainerWidth() {
|
1695 |
-
var style, attrs, matches, i, l;
|
1696 |
-
|
1697 |
-
if (this.opts.width === "off") {
|
1698 |
-
return null;
|
1699 |
-
} else if (this.opts.width === "element"){
|
1700 |
-
return this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px';
|
1701 |
-
} else if (this.opts.width === "copy" || this.opts.width === "resolve") {
|
1702 |
-
// check if there is inline style on the element that contains width
|
1703 |
-
style = this.opts.element.attr('style');
|
1704 |
-
if (style !== undefined) {
|
1705 |
-
attrs = style.split(';');
|
1706 |
-
for (i = 0, l = attrs.length; i < l; i = i + 1) {
|
1707 |
-
matches = attrs[i].replace(/\s/g, '')
|
1708 |
-
.match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
|
1709 |
-
if (matches !== null && matches.length >= 1)
|
1710 |
-
return matches[1];
|
1711 |
-
}
|
1712 |
-
}
|
1713 |
-
|
1714 |
-
if (this.opts.width === "resolve") {
|
1715 |
-
// next check if css('width') can resolve a width that is percent based, this is sometimes possible
|
1716 |
-
// when attached to input type=hidden or elements hidden via css
|
1717 |
-
style = this.opts.element.css('width');
|
1718 |
-
if (style.indexOf("%") > 0) return style;
|
1719 |
-
|
1720 |
-
// finally, fallback on the calculated width of the element
|
1721 |
-
return (this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px');
|
1722 |
-
}
|
1723 |
-
|
1724 |
-
return null;
|
1725 |
-
} else if ($.isFunction(this.opts.width)) {
|
1726 |
-
return this.opts.width();
|
1727 |
-
} else {
|
1728 |
-
return this.opts.width;
|
1729 |
-
}
|
1730 |
-
};
|
1731 |
-
|
1732 |
-
var width = resolveContainerWidth.call(this);
|
1733 |
-
if (width !== null) {
|
1734 |
-
this.container.css("width", width);
|
1735 |
-
}
|
1736 |
-
}
|
1737 |
-
});
|
1738 |
-
|
1739 |
-
SingleSelect2 = clazz(AbstractSelect2, {
|
1740 |
-
|
1741 |
-
// single
|
1742 |
-
|
1743 |
-
createContainer: function () {
|
1744 |
-
var container = $(document.createElement("div")).attr({
|
1745 |
-
"class": "select2-container"
|
1746 |
-
}).html([
|
1747 |
-
"<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>",
|
1748 |
-
" <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>",
|
1749 |
-
" <span class='select2-arrow'><b></b></span>",
|
1750 |
-
"</a>",
|
1751 |
-
"<input class='select2-focusser select2-offscreen' type='text'/>",
|
1752 |
-
"<div class='select2-drop select2-display-none'>",
|
1753 |
-
" <div class='select2-search'>",
|
1754 |
-
" <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>",
|
1755 |
-
" </div>",
|
1756 |
-
" <ul class='select2-results'>",
|
1757 |
-
" </ul>",
|
1758 |
-
"</div>"].join(""));
|
1759 |
-
return container;
|
1760 |
-
},
|
1761 |
-
|
1762 |
-
// single
|
1763 |
-
enableInterface: function() {
|
1764 |
-
if (this.parent.enableInterface.apply(this, arguments)) {
|
1765 |
-
this.focusser.prop("disabled", !this.isInterfaceEnabled());
|
1766 |
-
}
|
1767 |
-
},
|
1768 |
-
|
1769 |
-
// single
|
1770 |
-
opening: function () {
|
1771 |
-
var el, range, len;
|
1772 |
-
|
1773 |
-
if (this.opts.minimumResultsForSearch >= 0) {
|
1774 |
-
this.showSearch(true);
|
1775 |
-
}
|
1776 |
-
|
1777 |
-
this.parent.opening.apply(this, arguments);
|
1778 |
-
|
1779 |
-
if (this.showSearchInput !== false) {
|
1780 |
-
// IE appends focusser.val() at the end of field :/ so we manually insert it at the beginning using a range
|
1781 |
-
// all other browsers handle this just fine
|
1782 |
-
|
1783 |
-
this.search.val(this.focusser.val());
|
1784 |
-
}
|
1785 |
-
this.search.focus();
|
1786 |
-
// move the cursor to the end after focussing, otherwise it will be at the beginning and
|
1787 |
-
// new text will appear *before* focusser.val()
|
1788 |
-
el = this.search.get(0);
|
1789 |
-
if (el.createTextRange) {
|
1790 |
-
range = el.createTextRange();
|
1791 |
-
range.collapse(false);
|
1792 |
-
range.select();
|
1793 |
-
} else if (el.setSelectionRange) {
|
1794 |
-
len = this.search.val().length;
|
1795 |
-
el.setSelectionRange(len, len);
|
1796 |
-
}
|
1797 |
-
|
1798 |
-
this.focusser.prop("disabled", true).val("");
|
1799 |
-
this.updateResults(true);
|
1800 |
-
this.opts.element.trigger($.Event("select2-open"));
|
1801 |
-
},
|
1802 |
-
|
1803 |
-
// single
|
1804 |
-
close: function () {
|
1805 |
-
if (!this.opened()) return;
|
1806 |
-
this.parent.close.apply(this, arguments);
|
1807 |
-
this.focusser.removeAttr("disabled");
|
1808 |
-
this.focusser.focus();
|
1809 |
-
},
|
1810 |
-
|
1811 |
-
// single
|
1812 |
-
focus: function () {
|
1813 |
-
if (this.opened()) {
|
1814 |
-
this.close();
|
1815 |
-
} else {
|
1816 |
-
this.focusser.removeAttr("disabled");
|
1817 |
-
this.focusser.focus();
|
1818 |
-
}
|
1819 |
-
},
|
1820 |
-
|
1821 |
-
// single
|
1822 |
-
isFocused: function () {
|
1823 |
-
return this.container.hasClass("select2-container-active");
|
1824 |
-
},
|
1825 |
-
|
1826 |
-
// single
|
1827 |
-
cancel: function () {
|
1828 |
-
this.parent.cancel.apply(this, arguments);
|
1829 |
-
this.focusser.removeAttr("disabled");
|
1830 |
-
this.focusser.focus();
|
1831 |
-
},
|
1832 |
-
|
1833 |
-
// single
|
1834 |
-
initContainer: function () {
|
1835 |
-
|
1836 |
-
var selection,
|
1837 |
-
container = this.container,
|
1838 |
-
dropdown = this.dropdown;
|
1839 |
-
|
1840 |
-
if (this.opts.minimumResultsForSearch < 0) {
|
1841 |
-
this.showSearch(false);
|
1842 |
-
} else {
|
1843 |
-
this.showSearch(true);
|
1844 |
-
}
|
1845 |
-
|
1846 |
-
this.selection = selection = container.find(".select2-choice");
|
1847 |
-
|
1848 |
-
this.focusser = container.find(".select2-focusser");
|
1849 |
-
|
1850 |
-
// rewrite labels from original element to focusser
|
1851 |
-
this.focusser.attr("id", "s2id_autogen"+nextUid());
|
1852 |
-
|
1853 |
-
$("label[for='" + this.opts.element.attr("id") + "']")
|
1854 |
-
.attr('for', this.focusser.attr('id'));
|
1855 |
-
|
1856 |
-
this.focusser.attr("tabindex", this.elementTabIndex);
|
1857 |
-
|
1858 |
-
this.search.on("keydown", this.bind(function (e) {
|
1859 |
-
if (!this.isInterfaceEnabled()) return;
|
1860 |
-
|
1861 |
-
if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
|
1862 |
-
// prevent the page from scrolling
|
1863 |
-
killEvent(e);
|
1864 |
-
return;
|
1865 |
-
}
|
1866 |
-
|
1867 |
-
switch (e.which) {
|
1868 |
-
case KEY.UP:
|
1869 |
-
case KEY.DOWN:
|
1870 |
-
this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
|
1871 |
-
killEvent(e);
|
1872 |
-
return;
|
1873 |
-
case KEY.ENTER:
|
1874 |
-
this.selectHighlighted();
|
1875 |
-
killEvent(e);
|
1876 |
-
return;
|
1877 |
-
case KEY.TAB:
|
1878 |
-
this.selectHighlighted({noFocus: true});
|
1879 |
-
return;
|
1880 |
-
case KEY.ESC:
|
1881 |
-
this.cancel(e);
|
1882 |
-
killEvent(e);
|
1883 |
-
return;
|
1884 |
-
}
|
1885 |
-
}));
|
1886 |
-
|
1887 |
-
this.search.on("blur", this.bind(function(e) {
|
1888 |
-
// a workaround for chrome to keep the search field focussed when the scroll bar is used to scroll the dropdown.
|
1889 |
-
// without this the search field loses focus which is annoying
|
1890 |
-
if (document.activeElement === this.body().get(0)) {
|
1891 |
-
window.setTimeout(this.bind(function() {
|
1892 |
-
this.search.focus();
|
1893 |
-
}), 0);
|
1894 |
-
}
|
1895 |
-
}));
|
1896 |
-
|
1897 |
-
this.focusser.on("keydown", this.bind(function (e) {
|
1898 |
-
if (!this.isInterfaceEnabled()) return;
|
1899 |
-
|
1900 |
-
if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) {
|
1901 |
-
return;
|
1902 |
-
}
|
1903 |
-
|
1904 |
-
if (this.opts.openOnEnter === false && e.which === KEY.ENTER) {
|
1905 |
-
killEvent(e);
|
1906 |
-
return;
|
1907 |
-
}
|
1908 |
-
|
1909 |
-
if (e.which == KEY.DOWN || e.which == KEY.UP
|
1910 |
-
|| (e.which == KEY.ENTER && this.opts.openOnEnter)) {
|
1911 |
-
|
1912 |
-
if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) return;
|
1913 |
-
|
1914 |
-
this.open();
|
1915 |
-
killEvent(e);
|
1916 |
-
return;
|
1917 |
-
}
|
1918 |
-
|
1919 |
-
if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {
|
1920 |
-
if (this.opts.allowClear) {
|
1921 |
-
this.clear();
|
1922 |
-
}
|
1923 |
-
killEvent(e);
|
1924 |
-
return;
|
1925 |
-
}
|
1926 |
-
}));
|
1927 |
-
|
1928 |
-
|
1929 |
-
installKeyUpChangeEvent(this.focusser);
|
1930 |
-
this.focusser.on("keyup-change input", this.bind(function(e) {
|
1931 |
-
if (this.opts.minimumResultsForSearch >= 0) {
|
1932 |
-
e.stopPropagation();
|
1933 |
-
if (this.opened()) return;
|
1934 |
-
this.open();
|
1935 |
-
}
|
1936 |
-
}));
|
1937 |
-
|
1938 |
-
selection.on("mousedown", "abbr", this.bind(function (e) {
|
1939 |
-
if (!this.isInterfaceEnabled()) return;
|
1940 |
-
this.clear();
|
1941 |
-
killEventImmediately(e);
|
1942 |
-
this.close();
|
1943 |
-
this.selection.focus();
|
1944 |
-
}));
|
1945 |
-
|
1946 |
-
selection.on("mousedown", this.bind(function (e) {
|
1947 |
-
|
1948 |
-
if (!this.container.hasClass("select2-container-active")) {
|
1949 |
-
this.opts.element.trigger($.Event("select2-focus"));
|
1950 |
-
}
|
1951 |
-
|
1952 |
-
if (this.opened()) {
|
1953 |
-
this.close();
|
1954 |
-
} else if (this.isInterfaceEnabled()) {
|
1955 |
-
this.open();
|
1956 |
-
}
|
1957 |
-
|
1958 |
-
killEvent(e);
|
1959 |
-
}));
|
1960 |
-
|
1961 |
-
dropdown.on("mousedown", this.bind(function() { this.search.focus(); }));
|
1962 |
-
|
1963 |
-
selection.on("focus", this.bind(function(e) {
|
1964 |
-
killEvent(e);
|
1965 |
-
}));
|
1966 |
-
|
1967 |
-
this.focusser.on("focus", this.bind(function(){
|
1968 |
-
if (!this.container.hasClass("select2-container-active")) {
|
1969 |
-
this.opts.element.trigger($.Event("select2-focus"));
|
1970 |
-
}
|
1971 |
-
this.container.addClass("select2-container-active");
|
1972 |
-
})).on("blur", this.bind(function() {
|
1973 |
-
if (!this.opened()) {
|
1974 |
-
this.container.removeClass("select2-container-active");
|
1975 |
-
this.opts.element.trigger($.Event("select2-blur"));
|
1976 |
-
}
|
1977 |
-
}));
|
1978 |
-
this.search.on("focus", this.bind(function(){
|
1979 |
-
if (!this.container.hasClass("select2-container-active")) {
|
1980 |
-
this.opts.element.trigger($.Event("select2-focus"));
|
1981 |
-
}
|
1982 |
-
this.container.addClass("select2-container-active");
|
1983 |
-
}));
|
1984 |
-
|
1985 |
-
this.initContainerWidth();
|
1986 |
-
this.opts.element.addClass("select2-offscreen");
|
1987 |
-
this.setPlaceholder();
|
1988 |
-
|
1989 |
-
},
|
1990 |
-
|
1991 |
-
// single
|
1992 |
-
clear: function(triggerChange) {
|
1993 |
-
var data=this.selection.data("select2-data");
|
1994 |
-
if (data) { // guard against queued quick consecutive clicks
|
1995 |
-
var placeholderOption = this.getPlaceholderOption();
|
1996 |
-
this.opts.element.val(placeholderOption ? placeholderOption.val() : "");
|
1997 |
-
this.selection.find(".select2-chosen").empty();
|
1998 |
-
this.selection.removeData("select2-data");
|
1999 |
-
this.setPlaceholder();
|
2000 |
-
|
2001 |
-
if (triggerChange !== false){
|
2002 |
-
this.opts.element.trigger({ type: "select2-removed", val: this.id(data), choice: data });
|
2003 |
-
this.triggerChange({removed:data});
|
2004 |
-
}
|
2005 |
-
}
|
2006 |
-
},
|
2007 |
-
|
2008 |
-
/**
|
2009 |
-
* Sets selection based on source element's value
|
2010 |
-
*/
|
2011 |
-
// single
|
2012 |
-
initSelection: function () {
|
2013 |
-
var selected;
|
2014 |
-
if (this.isPlaceholderOptionSelected()) {
|
2015 |
-
this.updateSelection([]);
|
2016 |
-
this.close();
|
2017 |
-
this.setPlaceholder();
|
2018 |
-
} else {
|
2019 |
-
var self = this;
|
2020 |
-
this.opts.initSelection.call(null, this.opts.element, function(selected){
|
2021 |
-
if (selected !== undefined && selected !== null) {
|
2022 |
-
self.updateSelection(selected);
|
2023 |
-
self.close();
|
2024 |
-
self.setPlaceholder();
|
2025 |
-
}
|
2026 |
-
});
|
2027 |
-
}
|
2028 |
-
},
|
2029 |
-
|
2030 |
-
isPlaceholderOptionSelected: function() {
|
2031 |
-
var placeholderOption;
|
2032 |
-
return ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.is(':selected')) ||
|
2033 |
-
(this.opts.element.val() === "") ||
|
2034 |
-
(this.opts.element.val() === undefined) ||
|
2035 |
-
(this.opts.element.val() === null);
|
2036 |
-
},
|
2037 |
-
|
2038 |
-
// single
|
2039 |
-
prepareOpts: function () {
|
2040 |
-
var opts = this.parent.prepareOpts.apply(this, arguments),
|
2041 |
-
self=this;
|
2042 |
-
|
2043 |
-
if (opts.element.get(0).tagName.toLowerCase() === "select") {
|
2044 |
-
// install the selection initializer
|
2045 |
-
opts.initSelection = function (element, callback) {
|
2046 |
-
var selected = element.find(":selected");
|
2047 |
-
// a single select box always has a value, no need to null check 'selected'
|
2048 |
-
callback(self.optionToData(selected));
|
2049 |
-
};
|
2050 |
-
} else if ("data" in opts) {
|
2051 |
-
// install default initSelection when applied to hidden input and data is local
|
2052 |
-
opts.initSelection = opts.initSelection || function (element, callback) {
|
2053 |
-
var id = element.val();
|
2054 |
-
//search in data by id, storing the actual matching item
|
2055 |
-
var match = null;
|
2056 |
-
opts.query({
|
2057 |
-
matcher: function(term, text, el){
|
2058 |
-
var is_match = equal(id, opts.id(el));
|
2059 |
-
if (is_match) {
|
2060 |
-
match = el;
|
2061 |
-
}
|
2062 |
-
return is_match;
|
2063 |
-
},
|
2064 |
-
callback: !$.isFunction(callback) ? $.noop : function() {
|
2065 |
-
callback(match);
|
2066 |
-
}
|
2067 |
-
});
|
2068 |
-
};
|
2069 |
-
}
|
2070 |
-
|
2071 |
-
return opts;
|
2072 |
-
},
|
2073 |
-
|
2074 |
-
// single
|
2075 |
-
getPlaceholder: function() {
|
2076 |
-
// if a placeholder is specified on a single select without a valid placeholder option ignore it
|
2077 |
-
if (this.select) {
|
2078 |
-
if (this.getPlaceholderOption() === undefined) {
|
2079 |
-
return undefined;
|
2080 |
-
}
|
2081 |
-
}
|
2082 |
-
|
2083 |
-
return this.parent.getPlaceholder.apply(this, arguments);
|
2084 |
-
},
|
2085 |
-
|
2086 |
-
// single
|
2087 |
-
setPlaceholder: function () {
|
2088 |
-
var placeholder = this.getPlaceholder();
|
2089 |
-
|
2090 |
-
if (this.isPlaceholderOptionSelected() && placeholder !== undefined) {
|
2091 |
-
|
2092 |
-
// check for a placeholder option if attached to a select
|
2093 |
-
if (this.select && this.getPlaceholderOption() === undefined) return;
|
2094 |
-
|
2095 |
-
this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(placeholder));
|
2096 |
-
|
2097 |
-
this.selection.addClass("select2-default");
|
2098 |
-
|
2099 |
-
this.container.removeClass("select2-allowclear");
|
2100 |
-
}
|
2101 |
-
},
|
2102 |
-
|
2103 |
-
// single
|
2104 |
-
postprocessResults: function (data, initial, noHighlightUpdate) {
|
2105 |
-
var selected = 0, self = this, showSearchInput = true;
|
2106 |
-
|
2107 |
-
// find the selected element in the result list
|
2108 |
-
|
2109 |
-
this.findHighlightableChoices().each2(function (i, elm) {
|
2110 |
-
if (equal(self.id(elm.data("select2-data")), self.opts.element.val())) {
|
2111 |
-
selected = i;
|
2112 |
-
return false;
|
2113 |
-
}
|
2114 |
-
});
|
2115 |
-
|
2116 |
-
// and highlight it
|
2117 |
-
if (noHighlightUpdate !== false) {
|
2118 |
-
if (initial === true && selected >= 0) {
|
2119 |
-
this.highlight(selected);
|
2120 |
-
} else {
|
2121 |
-
this.highlight(0);
|
2122 |
-
}
|
2123 |
-
}
|
2124 |
-
|
2125 |
-
// hide the search box if this is the first we got the results and there are enough of them for search
|
2126 |
-
|
2127 |
-
if (initial === true) {
|
2128 |
-
var min = this.opts.minimumResultsForSearch;
|
2129 |
-
if (min >= 0) {
|
2130 |
-
this.showSearch(countResults(data.results) >= min);
|
2131 |
-
}
|
2132 |
-
}
|
2133 |
-
},
|
2134 |
-
|
2135 |
-
// single
|
2136 |
-
showSearch: function(showSearchInput) {
|
2137 |
-
if (this.showSearchInput === showSearchInput) return;
|
2138 |
-
|
2139 |
-
this.showSearchInput = showSearchInput;
|
2140 |
-
|
2141 |
-
this.dropdown.find(".select2-search").toggleClass("select2-search-hidden", !showSearchInput);
|
2142 |
-
this.dropdown.find(".select2-search").toggleClass("select2-offscreen", !showSearchInput);
|
2143 |
-
//add "select2-with-searchbox" to the container if search box is shown
|
2144 |
-
$(this.dropdown, this.container).toggleClass("select2-with-searchbox", showSearchInput);
|
2145 |
-
},
|
2146 |
-
|
2147 |
-
// single
|
2148 |
-
onSelect: function (data, options) {
|
2149 |
-
|
2150 |
-
if (!this.triggerSelect(data)) { return; }
|
2151 |
-
|
2152 |
-
var old = this.opts.element.val(),
|
2153 |
-
oldData = this.data();
|
2154 |
-
|
2155 |
-
this.opts.element.val(this.id(data));
|
2156 |
-
this.updateSelection(data);
|
2157 |
-
|
2158 |
-
this.opts.element.trigger({ type: "select2-selected", val: this.id(data), choice: data });
|
2159 |
-
|
2160 |
-
this.close();
|
2161 |
-
|
2162 |
-
if (!options || !options.noFocus)
|
2163 |
-
this.selection.focus();
|
2164 |
-
|
2165 |
-
if (!equal(old, this.id(data))) { this.triggerChange({added:data,removed:oldData}); }
|
2166 |
-
},
|
2167 |
-
|
2168 |
-
// single
|
2169 |
-
updateSelection: function (data) {
|
2170 |
-
|
2171 |
-
var container=this.selection.find(".select2-chosen"), formatted, cssClass;
|
2172 |
-
|
2173 |
-
this.selection.data("select2-data", data);
|
2174 |
-
|
2175 |
-
container.empty();
|
2176 |
-
formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);
|
2177 |
-
if (formatted !== undefined) {
|
2178 |
-
container.append(formatted);
|
2179 |
-
}
|
2180 |
-
cssClass=this.opts.formatSelectionCssClass(data, container);
|
2181 |
-
if (cssClass !== undefined) {
|
2182 |
-
container.addClass(cssClass);
|
2183 |
-
}
|
2184 |
-
|
2185 |
-
this.selection.removeClass("select2-default");
|
2186 |
-
|
2187 |
-
if (this.opts.allowClear && this.getPlaceholder() !== undefined) {
|
2188 |
-
this.container.addClass("select2-allowclear");
|
2189 |
-
}
|
2190 |
-
},
|
2191 |
-
|
2192 |
-
// single
|
2193 |
-
val: function () {
|
2194 |
-
var val,
|
2195 |
-
triggerChange = false,
|
2196 |
-
data = null,
|
2197 |
-
self = this,
|
2198 |
-
oldData = this.data();
|
2199 |
-
|
2200 |
-
if (arguments.length === 0) {
|
2201 |
-
return this.opts.element.val();
|
2202 |
-
}
|
2203 |
-
|
2204 |
-
val = arguments[0];
|
2205 |
-
|
2206 |
-
if (arguments.length > 1) {
|
2207 |
-
triggerChange = arguments[1];
|
2208 |
-
}
|
2209 |
-
|
2210 |
-
if (this.select) {
|
2211 |
-
this.select
|
2212 |
-
.val(val)
|
2213 |
-
.find(":selected").each2(function (i, elm) {
|
2214 |
-
data = self.optionToData(elm);
|
2215 |
-
return false;
|
2216 |
-
});
|
2217 |
-
this.updateSelection(data);
|
2218 |
-
this.setPlaceholder();
|
2219 |
-
if (triggerChange) {
|
2220 |
-
this.triggerChange({added: data, removed:oldData});
|
2221 |
-
}
|
2222 |
-
} else {
|
2223 |
-
// val is an id. !val is true for [undefined,null,'',0] - 0 is legal
|
2224 |
-
if (!val && val !== 0) {
|
2225 |
-
this.clear(triggerChange);
|
2226 |
-
return;
|
2227 |
-
}
|
2228 |
-
if (this.opts.initSelection === undefined) {
|
2229 |
-
throw new Error("cannot call val() if initSelection() is not defined");
|
2230 |
-
}
|
2231 |
-
this.opts.element.val(val);
|
2232 |
-
this.opts.initSelection(this.opts.element, function(data){
|
2233 |
-
self.opts.element.val(!data ? "" : self.id(data));
|
2234 |
-
self.updateSelection(data);
|
2235 |
-
self.setPlaceholder();
|
2236 |
-
if (triggerChange) {
|
2237 |
-
self.triggerChange({added: data, removed:oldData});
|
2238 |
-
}
|
2239 |
-
});
|
2240 |
-
}
|
2241 |
-
},
|
2242 |
-
|
2243 |
-
// single
|
2244 |
-
clearSearch: function () {
|
2245 |
-
this.search.val("");
|
2246 |
-
this.focusser.val("");
|
2247 |
-
},
|
2248 |
-
|
2249 |
-
// single
|
2250 |
-
data: function(value, triggerChange) {
|
2251 |
-
var data;
|
2252 |
-
|
2253 |
-
if (arguments.length === 0) {
|
2254 |
-
data = this.selection.data("select2-data");
|
2255 |
-
if (data == undefined) data = null;
|
2256 |
-
return data;
|
2257 |
-
} else {
|
2258 |
-
if (!value || value === "") {
|
2259 |
-
this.clear(triggerChange);
|
2260 |
-
} else {
|
2261 |
-
data = this.data();
|
2262 |
-
this.opts.element.val(!value ? "" : this.id(value));
|
2263 |
-
this.updateSelection(value);
|
2264 |
-
if (triggerChange) {
|
2265 |
-
this.triggerChange({added: value, removed:data});
|
2266 |
-
}
|
2267 |
-
}
|
2268 |
-
}
|
2269 |
-
}
|
2270 |
-
});
|
2271 |
-
|
2272 |
-
MultiSelect2 = clazz(AbstractSelect2, {
|
2273 |
-
|
2274 |
-
// multi
|
2275 |
-
createContainer: function () {
|
2276 |
-
var container = $(document.createElement("div")).attr({
|
2277 |
-
"class": "select2-container select2-container-multi"
|
2278 |
-
}).html([
|
2279 |
-
"<ul class='select2-choices'>",
|
2280 |
-
" <li class='select2-search-field'>",
|
2281 |
-
" <input type='text' autocomplete='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'>",
|
2282 |
-
" </li>",
|
2283 |
-
"</ul>",
|
2284 |
-
"<div class='select2-drop select2-drop-multi select2-display-none'>",
|
2285 |
-
" <ul class='select2-results'>",
|
2286 |
-
" </ul>",
|
2287 |
-
"</div>"].join(""));
|
2288 |
-
return container;
|
2289 |
-
},
|
2290 |
-
|
2291 |
-
// multi
|
2292 |
-
prepareOpts: function () {
|
2293 |
-
var opts = this.parent.prepareOpts.apply(this, arguments),
|
2294 |
-
self=this;
|
2295 |
-
|
2296 |
-
// TODO validate placeholder is a string if specified
|
2297 |
-
|
2298 |
-
if (opts.element.get(0).tagName.toLowerCase() === "select") {
|
2299 |
-
// install sthe selection initializer
|
2300 |
-
opts.initSelection = function (element, callback) {
|
2301 |
-
|
2302 |
-
var data = [];
|
2303 |
-
|
2304 |
-
element.find(":selected").each2(function (i, elm) {
|
2305 |
-
data.push(self.optionToData(elm));
|
2306 |
-
});
|
2307 |
-
callback(data);
|
2308 |
-
};
|
2309 |
-
} else if ("data" in opts) {
|
2310 |
-
// install default initSelection when applied to hidden input and data is local
|
2311 |
-
opts.initSelection = opts.initSelection || function (element, callback) {
|
2312 |
-
var ids = splitVal(element.val(), opts.separator);
|
2313 |
-
//search in data by array of ids, storing matching items in a list
|
2314 |
-
var matches = [];
|
2315 |
-
opts.query({
|
2316 |
-
matcher: function(term, text, el){
|
2317 |
-
var is_match = $.grep(ids, function(id) {
|
2318 |
-
return equal(id, opts.id(el));
|
2319 |
-
}).length;
|
2320 |
-
if (is_match) {
|
2321 |
-
matches.push(el);
|
2322 |
-
}
|
2323 |
-
return is_match;
|
2324 |
-
},
|
2325 |
-
callback: !$.isFunction(callback) ? $.noop : function() {
|
2326 |
-
// reorder matches based on the order they appear in the ids array because right now
|
2327 |
-
// they are in the order in which they appear in data array
|
2328 |
-
var ordered = [];
|
2329 |
-
for (var i = 0; i < ids.length; i++) {
|
2330 |
-
var id = ids[i];
|
2331 |
-
for (var j = 0; j < matches.length; j++) {
|
2332 |
-
var match = matches[j];
|
2333 |
-
if (equal(id, opts.id(match))) {
|
2334 |
-
ordered.push(match);
|
2335 |
-
matches.splice(j, 1);
|
2336 |
-
break;
|
2337 |
-
}
|
2338 |
-
}
|
2339 |
-
}
|
2340 |
-
callback(ordered);
|
2341 |
-
}
|
2342 |
-
});
|
2343 |
-
};
|
2344 |
-
}
|
2345 |
-
|
2346 |
-
return opts;
|
2347 |
-
},
|
2348 |
-
|
2349 |
-
selectChoice: function (choice) {
|
2350 |
-
|
2351 |
-
var selected = this.container.find(".select2-search-choice-focus");
|
2352 |
-
if (selected.length && choice && choice[0] == selected[0]) {
|
2353 |
-
|
2354 |
-
} else {
|
2355 |
-
if (selected.length) {
|
2356 |
-
this.opts.element.trigger("choice-deselected", selected);
|
2357 |
-
}
|
2358 |
-
selected.removeClass("select2-search-choice-focus");
|
2359 |
-
if (choice && choice.length) {
|
2360 |
-
this.close();
|
2361 |
-
choice.addClass("select2-search-choice-focus");
|
2362 |
-
this.opts.element.trigger("choice-selected", choice);
|
2363 |
-
}
|
2364 |
-
}
|
2365 |
-
},
|
2366 |
-
|
2367 |
-
// multi
|
2368 |
-
initContainer: function () {
|
2369 |
-
|
2370 |
-
var selector = ".select2-choices", selection;
|
2371 |
-
|
2372 |
-
this.searchContainer = this.container.find(".select2-search-field");
|
2373 |
-
this.selection = selection = this.container.find(selector);
|
2374 |
-
|
2375 |
-
var _this = this;
|
2376 |
-
this.selection.on("mousedown", ".select2-search-choice", function (e) {
|
2377 |
-
//killEvent(e);
|
2378 |
-
_this.search[0].focus();
|
2379 |
-
_this.selectChoice($(this));
|
2380 |
-
})
|
2381 |
-
|
2382 |
-
// rewrite labels from original element to focusser
|
2383 |
-
this.search.attr("id", "s2id_autogen"+nextUid());
|
2384 |
-
$("label[for='" + this.opts.element.attr("id") + "']")
|
2385 |
-
.attr('for', this.search.attr('id'));
|
2386 |
-
|
2387 |
-
this.search.on("input paste", this.bind(function() {
|
2388 |
-
if (!this.isInterfaceEnabled()) return;
|
2389 |
-
if (!this.opened()) {
|
2390 |
-
this.open();
|
2391 |
-
}
|
2392 |
-
}));
|
2393 |
-
|
2394 |
-
this.search.attr("tabindex", this.elementTabIndex);
|
2395 |
-
|
2396 |
-
this.keydowns = 0;
|
2397 |
-
this.search.on("keydown", this.bind(function (e) {
|
2398 |
-
if (!this.isInterfaceEnabled()) return;
|
2399 |
-
|
2400 |
-
++this.keydowns;
|
2401 |
-
var selected = selection.find(".select2-search-choice-focus");
|
2402 |
-
var prev = selected.prev(".select2-search-choice:not(.select2-locked)");
|
2403 |
-
var next = selected.next(".select2-search-choice:not(.select2-locked)");
|
2404 |
-
var pos = getCursorInfo(this.search);
|
2405 |
-
|
2406 |
-
if (selected.length &&
|
2407 |
-
(e.which == KEY.LEFT || e.which == KEY.RIGHT || e.which == KEY.BACKSPACE || e.which == KEY.DELETE || e.which == KEY.ENTER)) {
|
2408 |
-
var selectedChoice = selected;
|
2409 |
-
if (e.which == KEY.LEFT && prev.length) {
|
2410 |
-
selectedChoice = prev;
|
2411 |
-
}
|
2412 |
-
else if (e.which == KEY.RIGHT) {
|
2413 |
-
selectedChoice = next.length ? next : null;
|
2414 |
-
}
|
2415 |
-
else if (e.which === KEY.BACKSPACE) {
|
2416 |
-
this.unselect(selected.first());
|
2417 |
-
this.search.width(10);
|
2418 |
-
selectedChoice = prev.length ? prev : next;
|
2419 |
-
} else if (e.which == KEY.DELETE) {
|
2420 |
-
this.unselect(selected.first());
|
2421 |
-
this.search.width(10);
|
2422 |
-
selectedChoice = next.length ? next : null;
|
2423 |
-
} else if (e.which == KEY.ENTER) {
|
2424 |
-
selectedChoice = null;
|
2425 |
-
}
|
2426 |
-
|
2427 |
-
this.selectChoice(selectedChoice);
|
2428 |
-
killEvent(e);
|
2429 |
-
if (!selectedChoice || !selectedChoice.length) {
|
2430 |
-
this.open();
|
2431 |
-
}
|
2432 |
-
return;
|
2433 |
-
} else if (((e.which === KEY.BACKSPACE && this.keydowns == 1)
|
2434 |
-
|| e.which == KEY.LEFT) && (pos.offset == 0 && !pos.length)) {
|
2435 |
-
|
2436 |
-
this.selectChoice(selection.find(".select2-search-choice:not(.select2-locked)").last());
|
2437 |
-
killEvent(e);
|
2438 |
-
return;
|
2439 |
-
} else {
|
2440 |
-
this.selectChoice(null);
|
2441 |
-
}
|
2442 |
-
|
2443 |
-
if (this.opened()) {
|
2444 |
-
switch (e.which) {
|
2445 |
-
case KEY.UP:
|
2446 |
-
case KEY.DOWN:
|
2447 |
-
this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
|
2448 |
-
killEvent(e);
|
2449 |
-
return;
|
2450 |
-
case KEY.ENTER:
|
2451 |
-
this.selectHighlighted();
|
2452 |
-
killEvent(e);
|
2453 |
-
return;
|
2454 |
-
case KEY.TAB:
|
2455 |
-
this.selectHighlighted({noFocus:true});
|
2456 |
-
this.close();
|
2457 |
-
return;
|
2458 |
-
case KEY.ESC:
|
2459 |
-
this.cancel(e);
|
2460 |
-
killEvent(e);
|
2461 |
-
return;
|
2462 |
-
}
|
2463 |
-
}
|
2464 |
-
|
2465 |
-
if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e)
|
2466 |
-
|| e.which === KEY.BACKSPACE || e.which === KEY.ESC) {
|
2467 |
-
return;
|
2468 |
-
}
|
2469 |
-
|
2470 |
-
if (e.which === KEY.ENTER) {
|
2471 |
-
if (this.opts.openOnEnter === false) {
|
2472 |
-
return;
|
2473 |
-
} else if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
|
2474 |
-
return;
|
2475 |
-
}
|
2476 |
-
}
|
2477 |
-
|
2478 |
-
this.open();
|
2479 |
-
|
2480 |
-
if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
|
2481 |
-
// prevent the page from scrolling
|
2482 |
-
killEvent(e);
|
2483 |
-
}
|
2484 |
-
|
2485 |
-
if (e.which === KEY.ENTER) {
|
2486 |
-
// prevent form from being submitted
|
2487 |
-
killEvent(e);
|
2488 |
-
}
|
2489 |
-
|
2490 |
-
}));
|
2491 |
-
|
2492 |
-
this.search.on("keyup", this.bind(function (e) {
|
2493 |
-
this.keydowns = 0;
|
2494 |
-
this.resizeSearch();
|
2495 |
-
})
|
2496 |
-
);
|
2497 |
-
|
2498 |
-
this.search.on("blur", this.bind(function(e) {
|
2499 |
-
this.container.removeClass("select2-container-active");
|
2500 |
-
this.search.removeClass("select2-focused");
|
2501 |
-
this.selectChoice(null);
|
2502 |
-
if (!this.opened()) this.clearSearch();
|
2503 |
-
e.stopImmediatePropagation();
|
2504 |
-
this.opts.element.trigger($.Event("select2-blur"));
|
2505 |
-
}));
|
2506 |
-
|
2507 |
-
this.container.on("click", selector, this.bind(function (e) {
|
2508 |
-
if (!this.isInterfaceEnabled()) return;
|
2509 |
-
if ($(e.target).closest(".select2-search-choice").length > 0) {
|
2510 |
-
// clicked inside a select2 search choice, do not open
|
2511 |
-
return;
|
2512 |
-
}
|
2513 |
-
this.selectChoice(null);
|
2514 |
-
this.clearPlaceholder();
|
2515 |
-
if (!this.container.hasClass("select2-container-active")) {
|
2516 |
-
this.opts.element.trigger($.Event("select2-focus"));
|
2517 |
-
}
|
2518 |
-
this.open();
|
2519 |
-
this.focusSearch();
|
2520 |
-
e.preventDefault();
|
2521 |
-
}));
|
2522 |
-
|
2523 |
-
this.container.on("focus", selector, this.bind(function () {
|
2524 |
-
if (!this.isInterfaceEnabled()) return;
|
2525 |
-
if (!this.container.hasClass("select2-container-active")) {
|
2526 |
-
this.opts.element.trigger($.Event("select2-focus"));
|
2527 |
-
}
|
2528 |
-
this.container.addClass("select2-container-active");
|
2529 |
-
this.dropdown.addClass("select2-drop-active");
|
2530 |
-
this.clearPlaceholder();
|
2531 |
-
}));
|
2532 |
-
|
2533 |
-
this.initContainerWidth();
|
2534 |
-
this.opts.element.addClass("select2-offscreen");
|
2535 |
-
|
2536 |
-
// set the placeholder if necessary
|
2537 |
-
this.clearSearch();
|
2538 |
-
},
|
2539 |
-
|
2540 |
-
// multi
|
2541 |
-
enableInterface: function() {
|
2542 |
-
if (this.parent.enableInterface.apply(this, arguments)) {
|
2543 |
-
this.search.prop("disabled", !this.isInterfaceEnabled());
|
2544 |
-
}
|
2545 |
-
},
|
2546 |
-
|
2547 |
-
// multi
|
2548 |
-
initSelection: function () {
|
2549 |
-
var data;
|
2550 |
-
if (this.opts.element.val() === "" && this.opts.element.text() === "") {
|
2551 |
-
this.updateSelection([]);
|
2552 |
-
this.close();
|
2553 |
-
// set the placeholder if necessary
|
2554 |
-
this.clearSearch();
|
2555 |
-
}
|
2556 |
-
if (this.select || this.opts.element.val() !== "") {
|
2557 |
-
var self = this;
|
2558 |
-
this.opts.initSelection.call(null, this.opts.element, function(data){
|
2559 |
-
if (data !== undefined && data !== null) {
|
2560 |
-
self.updateSelection(data);
|
2561 |
-
self.close();
|
2562 |
-
// set the placeholder if necessary
|
2563 |
-
self.clearSearch();
|
2564 |
-
}
|
2565 |
-
});
|
2566 |
-
}
|
2567 |
-
},
|
2568 |
-
|
2569 |
-
// multi
|
2570 |
-
clearSearch: function () {
|
2571 |
-
var placeholder = this.getPlaceholder(),
|
2572 |
-
maxWidth = this.getMaxSearchWidth();
|
2573 |
-
|
2574 |
-
if (placeholder !== undefined && this.getVal().length === 0 && this.search.hasClass("select2-focused") === false) {
|
2575 |
-
this.search.val(placeholder).addClass("select2-default");
|
2576 |
-
// stretch the search box to full width of the container so as much of the placeholder is visible as possible
|
2577 |
-
// we could call this.resizeSearch(), but we do not because that requires a sizer and we do not want to create one so early because of a firefox bug, see #944
|
2578 |
-
this.search.width(maxWidth > 0 ? maxWidth : this.container.css("width"));
|
2579 |
-
} else {
|
2580 |
-
this.search.val("").width(10);
|
2581 |
-
}
|
2582 |
-
},
|
2583 |
-
|
2584 |
-
// multi
|
2585 |
-
clearPlaceholder: function () {
|
2586 |
-
if (this.search.hasClass("select2-default")) {
|
2587 |
-
this.search.val("").removeClass("select2-default");
|
2588 |
-
}
|
2589 |
-
},
|
2590 |
-
|
2591 |
-
// multi
|
2592 |
-
opening: function () {
|
2593 |
-
this.clearPlaceholder(); // should be done before super so placeholder is not used to search
|
2594 |
-
this.resizeSearch();
|
2595 |
-
|
2596 |
-
this.parent.opening.apply(this, arguments);
|
2597 |
-
|
2598 |
-
this.focusSearch();
|
2599 |
-
|
2600 |
-
this.updateResults(true);
|
2601 |
-
this.search.focus();
|
2602 |
-
this.opts.element.trigger($.Event("select2-open"));
|
2603 |
-
},
|
2604 |
-
|
2605 |
-
// multi
|
2606 |
-
close: function () {
|
2607 |
-
if (!this.opened()) return;
|
2608 |
-
this.parent.close.apply(this, arguments);
|
2609 |
-
},
|
2610 |
-
|
2611 |
-
// multi
|
2612 |
-
focus: function () {
|
2613 |
-
this.close();
|
2614 |
-
this.search.focus();
|
2615 |
-
},
|
2616 |
-
|
2617 |
-
// multi
|
2618 |
-
isFocused: function () {
|
2619 |
-
return this.search.hasClass("select2-focused");
|
2620 |
-
},
|
2621 |
-
|
2622 |
-
// multi
|
2623 |
-
updateSelection: function (data) {
|
2624 |
-
var ids = [], filtered = [], self = this;
|
2625 |
-
|
2626 |
-
// filter out duplicates
|
2627 |
-
$(data).each(function () {
|
2628 |
-
if (indexOf(self.id(this), ids) < 0) {
|
2629 |
-
ids.push(self.id(this));
|
2630 |
-
filtered.push(this);
|
2631 |
-
}
|
2632 |
-
});
|
2633 |
-
data = filtered;
|
2634 |
-
|
2635 |
-
this.selection.find(".select2-search-choice").remove();
|
2636 |
-
$(data).each(function () {
|
2637 |
-
self.addSelectedChoice(this);
|
2638 |
-
});
|
2639 |
-
self.postprocessResults();
|
2640 |
-
},
|
2641 |
-
|
2642 |
-
// multi
|
2643 |
-
tokenize: function() {
|
2644 |
-
var input = this.search.val();
|
2645 |
-
input = this.opts.tokenizer.call(this, input, this.data(), this.bind(this.onSelect), this.opts);
|
2646 |
-
if (input != null && input != undefined) {
|
2647 |
-
this.search.val(input);
|
2648 |
-
if (input.length > 0) {
|
2649 |
-
this.open();
|
2650 |
-
}
|
2651 |
-
}
|
2652 |
-
|
2653 |
-
},
|
2654 |
-
|
2655 |
-
// multi
|
2656 |
-
onSelect: function (data, options) {
|
2657 |
-
|
2658 |
-
if (!this.triggerSelect(data)) { return; }
|
2659 |
-
|
2660 |
-
this.addSelectedChoice(data);
|
2661 |
-
|
2662 |
-
this.opts.element.trigger({ type: "selected", val: this.id(data), choice: data });
|
2663 |
-
|
2664 |
-
if (this.select || !this.opts.closeOnSelect) this.postprocessResults();
|
2665 |
-
|
2666 |
-
if (this.opts.closeOnSelect) {
|
2667 |
-
this.close();
|
2668 |
-
this.search.width(10);
|
2669 |
-
} else {
|
2670 |
-
if (this.countSelectableResults()>0) {
|
2671 |
-
this.search.width(10);
|
2672 |
-
this.resizeSearch();
|
2673 |
-
if (this.getMaximumSelectionSize() > 0 && this.val().length >= this.getMaximumSelectionSize()) {
|
2674 |
-
// if we reached max selection size repaint the results so choices
|
2675 |
-
// are replaced with the max selection reached message
|
2676 |
-
this.updateResults(true);
|
2677 |
-
}
|
2678 |
-
this.positionDropdown();
|
2679 |
-
} else {
|
2680 |
-
// if nothing left to select close
|
2681 |
-
this.close();
|
2682 |
-
this.search.width(10);
|
2683 |
-
}
|
2684 |
-
}
|
2685 |
-
|
2686 |
-
// since its not possible to select an element that has already been
|
2687 |
-
// added we do not need to check if this is a new element before firing change
|
2688 |
-
this.triggerChange({ added: data });
|
2689 |
-
|
2690 |
-
if (!options || !options.noFocus)
|
2691 |
-
this.focusSearch();
|
2692 |
-
},
|
2693 |
-
|
2694 |
-
// multi
|
2695 |
-
cancel: function () {
|
2696 |
-
this.close();
|
2697 |
-
this.focusSearch();
|
2698 |
-
},
|
2699 |
-
|
2700 |
-
addSelectedChoice: function (data) {
|
2701 |
-
var enableChoice = !data.locked,
|
2702 |
-
enabledItem = $(
|
2703 |
-
"<li class='select2-search-choice'>" +
|
2704 |
-
" <div></div>" +
|
2705 |
-
" <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a>" +
|
2706 |
-
"</li>"),
|
2707 |
-
disabledItem = $(
|
2708 |
-
"<li class='select2-search-choice select2-locked'>" +
|
2709 |
-
"<div></div>" +
|
2710 |
-
"</li>");
|
2711 |
-
var choice = enableChoice ? enabledItem : disabledItem,
|
2712 |
-
id = this.id(data),
|
2713 |
-
val = this.getVal(),
|
2714 |
-
formatted,
|
2715 |
-
cssClass;
|
2716 |
-
|
2717 |
-
formatted=this.opts.formatSelection(data, choice.find("div"), this.opts.escapeMarkup);
|
2718 |
-
if (formatted != undefined) {
|
2719 |
-
choice.find("div").replaceWith("<div>"+formatted+"</div>");
|
2720 |
-
}
|
2721 |
-
cssClass=this.opts.formatSelectionCssClass(data, choice.find("div"));
|
2722 |
-
if (cssClass != undefined) {
|
2723 |
-
choice.addClass(cssClass);
|
2724 |
-
}
|
2725 |
-
|
2726 |
-
if(enableChoice){
|
2727 |
-
choice.find(".select2-search-choice-close")
|
2728 |
-
.on("mousedown", killEvent)
|
2729 |
-
.on("click dblclick", this.bind(function (e) {
|
2730 |
-
if (!this.isInterfaceEnabled()) return;
|
2731 |
-
|
2732 |
-
$(e.target).closest(".select2-search-choice").fadeOut('fast', this.bind(function(){
|
2733 |
-
this.unselect($(e.target));
|
2734 |
-
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
|
2735 |
-
this.close();
|
2736 |
-
this.focusSearch();
|
2737 |
-
})).dequeue();
|
2738 |
-
killEvent(e);
|
2739 |
-
})).on("focus", this.bind(function () {
|
2740 |
-
if (!this.isInterfaceEnabled()) return;
|
2741 |
-
this.container.addClass("select2-container-active");
|
2742 |
-
this.dropdown.addClass("select2-drop-active");
|
2743 |
-
}));
|
2744 |
-
}
|
2745 |
-
|
2746 |
-
choice.data("select2-data", data);
|
2747 |
-
choice.insertBefore(this.searchContainer);
|
2748 |
-
|
2749 |
-
val.push(id);
|
2750 |
-
this.setVal(val);
|
2751 |
-
},
|
2752 |
-
|
2753 |
-
// multi
|
2754 |
-
unselect: function (selected) {
|
2755 |
-
var val = this.getVal(),
|
2756 |
-
data,
|
2757 |
-
index;
|
2758 |
-
|
2759 |
-
selected = selected.closest(".select2-search-choice");
|
2760 |
-
|
2761 |
-
if (selected.length === 0) {
|
2762 |
-
throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
|
2763 |
-
}
|
2764 |
-
|
2765 |
-
data = selected.data("select2-data");
|
2766 |
-
|
2767 |
-
if (!data) {
|
2768 |
-
// prevent a race condition when the 'x' is clicked really fast repeatedly the event can be queued
|
2769 |
-
// and invoked on an element already removed
|
2770 |
-
return;
|
2771 |
-
}
|
2772 |
-
|
2773 |
-
index = indexOf(this.id(data), val);
|
2774 |
-
|
2775 |
-
if (index >= 0) {
|
2776 |
-
val.splice(index, 1);
|
2777 |
-
this.setVal(val);
|
2778 |
-
if (this.select) this.postprocessResults();
|
2779 |
-
}
|
2780 |
-
selected.remove();
|
2781 |
-
|
2782 |
-
this.opts.element.trigger({ type: "removed", val: this.id(data), choice: data });
|
2783 |
-
this.triggerChange({ removed: data });
|
2784 |
-
},
|
2785 |
-
|
2786 |
-
// multi
|
2787 |
-
postprocessResults: function (data, initial, noHighlightUpdate) {
|
2788 |
-
var val = this.getVal(),
|
2789 |
-
choices = this.results.find(".select2-result"),
|
2790 |
-
compound = this.results.find(".select2-result-with-children"),
|
2791 |
-
self = this;
|
2792 |
-
|
2793 |
-
choices.each2(function (i, choice) {
|
2794 |
-
var id = self.id(choice.data("select2-data"));
|
2795 |
-
if (indexOf(id, val) >= 0) {
|
2796 |
-
choice.addClass("select2-selected");
|
2797 |
-
// mark all children of the selected parent as selected
|
2798 |
-
choice.find(".select2-result-selectable").addClass("select2-selected");
|
2799 |
-
}
|
2800 |
-
});
|
2801 |
-
|
2802 |
-
compound.each2(function(i, choice) {
|
2803 |
-
// hide an optgroup if it doesnt have any selectable children
|
2804 |
-
if (!choice.is('.select2-result-selectable')
|
2805 |
-
&& choice.find(".select2-result-selectable:not(.select2-selected)").length === 0) {
|
2806 |
-
choice.addClass("select2-selected");
|
2807 |
-
}
|
2808 |
-
});
|
2809 |
-
|
2810 |
-
if (this.highlight() == -1 && noHighlightUpdate !== false){
|
2811 |
-
self.highlight(0);
|
2812 |
-
}
|
2813 |
-
|
2814 |
-
//If all results are chosen render formatNoMAtches
|
2815 |
-
if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){
|
2816 |
-
if(!data || data && !data.more && this.results.find(".select2-no-results").length === 0) {
|
2817 |
-
if (checkFormatter(self.opts.formatNoMatches, "formatNoMatches")) {
|
2818 |
-
this.results.append("<li class='select2-no-results'>" + self.opts.formatNoMatches(self.search.val()) + "</li>");
|
2819 |
-
}
|
2820 |
-
}
|
2821 |
-
}
|
2822 |
-
|
2823 |
-
},
|
2824 |
-
|
2825 |
-
// multi
|
2826 |
-
getMaxSearchWidth: function() {
|
2827 |
-
return this.selection.width() - getSideBorderPadding(this.search);
|
2828 |
-
},
|
2829 |
-
|
2830 |
-
// multi
|
2831 |
-
resizeSearch: function () {
|
2832 |
-
var minimumWidth, left, maxWidth, containerLeft, searchWidth,
|
2833 |
-
sideBorderPadding = getSideBorderPadding(this.search);
|
2834 |
-
|
2835 |
-
minimumWidth = measureTextWidth(this.search) + 10;
|
2836 |
-
|
2837 |
-
left = this.search.offset().left;
|
2838 |
-
|
2839 |
-
maxWidth = this.selection.width();
|
2840 |
-
containerLeft = this.selection.offset().left;
|
2841 |
-
|
2842 |
-
searchWidth = maxWidth - (left - containerLeft) - sideBorderPadding;
|
2843 |
-
|
2844 |
-
if (searchWidth < minimumWidth) {
|
2845 |
-
searchWidth = maxWidth - sideBorderPadding;
|
2846 |
-
}
|
2847 |
-
|
2848 |
-
if (searchWidth < 40) {
|
2849 |
-
searchWidth = maxWidth - sideBorderPadding;
|
2850 |
-
}
|
2851 |
-
|
2852 |
-
if (searchWidth <= 0) {
|
2853 |
-
searchWidth = minimumWidth;
|
2854 |
-
}
|
2855 |
-
|
2856 |
-
this.search.width(searchWidth);
|
2857 |
-
},
|
2858 |
-
|
2859 |
-
// multi
|
2860 |
-
getVal: function () {
|
2861 |
-
var val;
|
2862 |
-
if (this.select) {
|
2863 |
-
val = this.select.val();
|
2864 |
-
return val === null ? [] : val;
|
2865 |
-
} else {
|
2866 |
-
val = this.opts.element.val();
|
2867 |
-
return splitVal(val, this.opts.separator);
|
2868 |
-
}
|
2869 |
-
},
|
2870 |
-
|
2871 |
-
// multi
|
2872 |
-
setVal: function (val) {
|
2873 |
-
var unique;
|
2874 |
-
if (this.select) {
|
2875 |
-
this.select.val(val);
|
2876 |
-
} else {
|
2877 |
-
unique = [];
|
2878 |
-
// filter out duplicates
|
2879 |
-
$(val).each(function () {
|
2880 |
-
if (indexOf(this, unique) < 0) unique.push(this);
|
2881 |
-
});
|
2882 |
-
this.opts.element.val(unique.length === 0 ? "" : unique.join(this.opts.separator));
|
2883 |
-
}
|
2884 |
-
},
|
2885 |
-
|
2886 |
-
// multi
|
2887 |
-
buildChangeDetails: function (old, current) {
|
2888 |
-
var current = current.slice(0),
|
2889 |
-
old = old.slice(0);
|
2890 |
-
|
2891 |
-
// remove intersection from each array
|
2892 |
-
for (var i = 0; i < current.length; i++) {
|
2893 |
-
for (var j = 0; j < old.length; j++) {
|
2894 |
-
if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {
|
2895 |
-
current.splice(i, 1);
|
2896 |
-
i--;
|
2897 |
-
old.splice(j, 1);
|
2898 |
-
j--;
|
2899 |
-
}
|
2900 |
-
}
|
2901 |
-
}
|
2902 |
-
|
2903 |
-
return {added: current, removed: old};
|
2904 |
-
},
|
2905 |
-
|
2906 |
-
|
2907 |
-
// multi
|
2908 |
-
val: function (val, triggerChange) {
|
2909 |
-
var oldData, self=this, changeDetails;
|
2910 |
-
|
2911 |
-
if (arguments.length === 0) {
|
2912 |
-
return this.getVal();
|
2913 |
-
}
|
2914 |
-
|
2915 |
-
oldData=this.data();
|
2916 |
-
if (!oldData.length) oldData=[];
|
2917 |
-
|
2918 |
-
// val is an id. !val is true for [undefined,null,'',0] - 0 is legal
|
2919 |
-
if (!val && val !== 0) {
|
2920 |
-
this.opts.element.val("");
|
2921 |
-
this.updateSelection([]);
|
2922 |
-
this.clearSearch();
|
2923 |
-
if (triggerChange) {
|
2924 |
-
this.triggerChange({added: this.data(), removed: oldData});
|
2925 |
-
}
|
2926 |
-
return;
|
2927 |
-
}
|
2928 |
-
|
2929 |
-
// val is a list of ids
|
2930 |
-
this.setVal(val);
|
2931 |
-
|
2932 |
-
if (this.select) {
|
2933 |
-
this.opts.initSelection(this.select, this.bind(this.updateSelection));
|
2934 |
-
if (triggerChange) {
|
2935 |
-
this.triggerChange(this.buildChangeDetails(oldData, this.data()));
|
2936 |
-
}
|
2937 |
-
} else {
|
2938 |
-
if (this.opts.initSelection === undefined) {
|
2939 |
-
throw new Error("val() cannot be called if initSelection() is not defined");
|
2940 |
-
}
|
2941 |
-
|
2942 |
-
this.opts.initSelection(this.opts.element, function(data){
|
2943 |
-
var ids=$.map(data, self.id);
|
2944 |
-
self.setVal(ids);
|
2945 |
-
self.updateSelection(data);
|
2946 |
-
self.clearSearch();
|
2947 |
-
if (triggerChange) {
|
2948 |
-
self.triggerChange(this.buildChangeDetails(oldData, this.data()));
|
2949 |
-
}
|
2950 |
-
});
|
2951 |
-
}
|
2952 |
-
this.clearSearch();
|
2953 |
-
},
|
2954 |
-
|
2955 |
-
// multi
|
2956 |
-
onSortStart: function() {
|
2957 |
-
if (this.select) {
|
2958 |
-
throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");
|
2959 |
-
}
|
2960 |
-
|
2961 |
-
// collapse search field into 0 width so its container can be collapsed as well
|
2962 |
-
this.search.width(0);
|
2963 |
-
// hide the container
|
2964 |
-
this.searchContainer.hide();
|
2965 |
-
},
|
2966 |
-
|
2967 |
-
// multi
|
2968 |
-
onSortEnd:function() {
|
2969 |
-
|
2970 |
-
var val=[], self=this;
|
2971 |
-
|
2972 |
-
// show search and move it to the end of the list
|
2973 |
-
this.searchContainer.show();
|
2974 |
-
// make sure the search container is the last item in the list
|
2975 |
-
this.searchContainer.appendTo(this.searchContainer.parent());
|
2976 |
-
// since we collapsed the width in dragStarted, we resize it here
|
2977 |
-
this.resizeSearch();
|
2978 |
-
|
2979 |
-
// update selection
|
2980 |
-
this.selection.find(".select2-search-choice").each(function() {
|
2981 |
-
val.push(self.opts.id($(this).data("select2-data")));
|
2982 |
-
});
|
2983 |
-
this.setVal(val);
|
2984 |
-
this.triggerChange();
|
2985 |
-
},
|
2986 |
-
|
2987 |
-
// multi
|
2988 |
-
data: function(values, triggerChange) {
|
2989 |
-
var self=this, ids, old;
|
2990 |
-
if (arguments.length === 0) {
|
2991 |
-
return this.selection
|
2992 |
-
.find(".select2-search-choice")
|
2993 |
-
.map(function() { return $(this).data("select2-data"); })
|
2994 |
-
.get();
|
2995 |
-
} else {
|
2996 |
-
old = this.data();
|
2997 |
-
if (!values) { values = []; }
|
2998 |
-
ids = $.map(values, function(e) { return self.opts.id(e); });
|
2999 |
-
this.setVal(ids);
|
3000 |
-
this.updateSelection(values);
|
3001 |
-
this.clearSearch();
|
3002 |
-
if (triggerChange) {
|
3003 |
-
this.triggerChange(this.buildChangeDetails(old, this.data()));
|
3004 |
-
}
|
3005 |
-
}
|
3006 |
-
}
|
3007 |
-
});
|
3008 |
-
|
3009 |
-
$.fn.select2 = function () {
|
3010 |
-
|
3011 |
-
var args = Array.prototype.slice.call(arguments, 0),
|
3012 |
-
opts,
|
3013 |
-
select2,
|
3014 |
-
method, value, multiple,
|
3015 |
-
allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "readonly", "positionDropdown", "data", "search"],
|
3016 |
-
valueMethods = ["val", "opened", "isFocused", "container", "data"],
|
3017 |
-
methodsMap = { search: "externalSearch" };
|
3018 |
-
|
3019 |
-
this.each(function () {
|
3020 |
-
if (args.length === 0 || typeof(args[0]) === "object") {
|
3021 |
-
opts = args.length === 0 ? {} : $.extend({}, args[0]);
|
3022 |
-
opts.element = $(this);
|
3023 |
-
|
3024 |
-
if (opts.element.get(0).tagName.toLowerCase() === "select") {
|
3025 |
-
multiple = opts.element.prop("multiple");
|
3026 |
-
} else {
|
3027 |
-
multiple = opts.multiple || false;
|
3028 |
-
if ("tags" in opts) {opts.multiple = multiple = true;}
|
3029 |
-
}
|
3030 |
-
|
3031 |
-
select2 = multiple ? new MultiSelect2() : new SingleSelect2();
|
3032 |
-
select2.init(opts);
|
3033 |
-
} else if (typeof(args[0]) === "string") {
|
3034 |
-
|
3035 |
-
if (indexOf(args[0], allowedMethods) < 0) {
|
3036 |
-
throw "Unknown method: " + args[0];
|
3037 |
-
}
|
3038 |
-
|
3039 |
-
value = undefined;
|
3040 |
-
select2 = $(this).data("select2");
|
3041 |
-
if (select2 === undefined) return;
|
3042 |
-
|
3043 |
-
method=args[0];
|
3044 |
-
|
3045 |
-
if (method === "container") {
|
3046 |
-
value = select2.container;
|
3047 |
-
} else if (method === "dropdown") {
|
3048 |
-
value = select2.dropdown;
|
3049 |
-
} else {
|
3050 |
-
if (methodsMap[method]) method = methodsMap[method];
|
3051 |
-
|
3052 |
-
value = select2[method].apply(select2, args.slice(1));
|
3053 |
-
}
|
3054 |
-
if (indexOf(args[0], valueMethods) >= 0) {
|
3055 |
-
return false;
|
3056 |
-
}
|
3057 |
-
} else {
|
3058 |
-
throw "Invalid arguments to select2 plugin: " + args;
|
3059 |
-
}
|
3060 |
-
});
|
3061 |
-
return (value === undefined) ? this : value;
|
3062 |
-
};
|
3063 |
-
|
3064 |
-
// plugin defaults, accessible to users
|
3065 |
-
$.fn.select2.defaults = {
|
3066 |
-
width: "copy",
|
3067 |
-
loadMorePadding: 0,
|
3068 |
-
closeOnSelect: true,
|
3069 |
-
openOnEnter: true,
|
3070 |
-
containerCss: {},
|
3071 |
-
dropdownCss: {},
|
3072 |
-
containerCssClass: "",
|
3073 |
-
dropdownCssClass: "",
|
3074 |
-
formatResult: function(result, container, query, escapeMarkup) {
|
3075 |
-
var markup=[];
|
3076 |
-
markMatch(result.text, query.term, markup, escapeMarkup);
|
3077 |
-
return markup.join("");
|
3078 |
-
},
|
3079 |
-
formatSelection: function (data, container, escapeMarkup) {
|
3080 |
-
return data ? escapeMarkup(data.text) : undefined;
|
3081 |
-
},
|
3082 |
-
sortResults: function (results, container, query) {
|
3083 |
-
return results;
|
3084 |
-
},
|
3085 |
-
formatResultCssClass: function(data) {return undefined;},
|
3086 |
-
formatSelectionCssClass: function(data, container) {return undefined;},
|
3087 |
-
formatNoMatches: function () { return "No matches found"; },
|
3088 |
-
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1? "" : "s"); },
|
3089 |
-
formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1? "" : "s"); },
|
3090 |
-
formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
|
3091 |
-
formatLoadMore: function (pageNumber) { return "Loading more results..."; },
|
3092 |
-
formatSearching: function () { return "Searching..."; },
|
3093 |
-
minimumResultsForSearch: 0,
|
3094 |
-
minimumInputLength: 0,
|
3095 |
-
maximumInputLength: null,
|
3096 |
-
maximumSelectionSize: 0,
|
3097 |
-
id: function (e) { return e.id; },
|
3098 |
-
matcher: function(term, text) {
|
3099 |
-
return (''+text).toUpperCase().indexOf((''+term).toUpperCase()) >= 0;
|
3100 |
-
},
|
3101 |
-
separator: ",",
|
3102 |
-
tokenSeparators: [],
|
3103 |
-
tokenizer: defaultTokenizer,
|
3104 |
-
escapeMarkup: defaultEscapeMarkup,
|
3105 |
-
blurOnChange: false,
|
3106 |
-
selectOnBlur: false,
|
3107 |
-
adaptContainerCssClass: function(c) { return c; },
|
3108 |
-
adaptDropdownCssClass: function(c) { return null; }
|
3109 |
-
};
|
3110 |
-
|
3111 |
-
$.fn.select2.ajaxDefaults = {
|
3112 |
-
transport: $.ajax,
|
3113 |
-
params: {
|
3114 |
-
type: "GET",
|
3115 |
-
cache: false,
|
3116 |
-
dataType: "json"
|
3117 |
-
}
|
3118 |
-
};
|
3119 |
-
|
3120 |
-
// exports
|
3121 |
-
window.Select2 = {
|
3122 |
-
query: {
|
3123 |
-
ajax: ajax,
|
3124 |
-
local: local,
|
3125 |
-
tags: tags
|
3126 |
-
}, util: {
|
3127 |
-
debounce: debounce,
|
3128 |
-
markMatch: markMatch,
|
3129 |
-
escapeMarkup: defaultEscapeMarkup
|
3130 |
-
}, "class": {
|
3131 |
-
"abstract": AbstractSelect2,
|
3132 |
-
"single": SingleSelect2,
|
3133 |
-
"multi": MultiSelect2
|
3134 |
-
}
|
3135 |
-
};
|
3136 |
-
|
3137 |
-
}(jQuery));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shared/assets/js/admin/select2.min.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Copyright 2012 Igor Vaynberg
|
3 |
-
|
4 |
-
Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
5 |
-
|
6 |
-
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7 |
-
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
8 |
-
use of this software only upon the condition that you accept all of the terms of either the Apache
|
9 |
-
License or the GPL License.
|
10 |
-
|
11 |
-
You may obtain a copy of the Apache License and the GPL License at:
|
12 |
-
|
13 |
-
http://www.apache.org/licenses/LICENSE-2.0
|
14 |
-
http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
-
|
16 |
-
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
|
17 |
-
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
18 |
-
either express or implied. See the Apache License and the GPL License for the specific language governing
|
19 |
-
permissions and limitations under the Apache License and the GPL License.
|
20 |
-
*/
|
21 |
-
(function(a){a.fn.each2===void 0&&a.fn.extend({each2:function(b){for(var c=a([0]),d=-1,e=this.length;e>++d&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})})(jQuery),function(a,b){"use strict";function m(a,b){for(var c=0,d=b.length;d>c;c+=1)if(o(a,b[c]))return c;return-1}function n(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function o(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function p(b,c){var d,e,f;if(null===b||1>b.length)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function q(a){return a.outerWidth(!1)-a.width()}function r(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function s(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function t(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function u(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function v(a,b){var c=t(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){m(a.target,b.get())>=0&&c(a)})}function w(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function x(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function y(a){a.preventDefault(),a.stopPropagation()}function z(a){a.preventDefault(),a.stopImmediatePropagation()}function A(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function B(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(this))})),b.attr("class",f.join(" "))}function C(a,c,d,e){var f=a.toUpperCase().indexOf(c.toUpperCase()),g=c.length;return 0>f?(d.push(e(a)),b):(d.push(e(a.substring(0,f))),d.push("<span class='select2-match'>"),d.push(e(a.substring(f,f+g))),d.push("</span>"),d.push(e(a.substring(f+g,a.length))),b)}function D(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return(a+"").replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function E(c){var d,e=0,f=null,g=c.quietMillis||100,h=c.url,i=this;return function(j){window.clearTimeout(d),d=window.setTimeout(function(){e+=1;var d=e,g=c.data,k=h,l=c.transport||a.fn.select2.ajaxDefaults.transport,m={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},n=a.extend({},a.fn.select2.ajaxDefaults.params,m);g=g?g.call(i,j.term,j.page,j.context):null,k="function"==typeof k?k.call(i,j.term,j.page,j.context):k,f&&f.abort(),c.params&&(a.isFunction(c.params)?a.extend(n,c.params.call(i)):a.extend(n,c.params)),a.extend(n,{url:k,dataType:c.dataType,data:g,success:function(a){if(!(e>d)){var b=c.results(a,j.page);j.callback(b)}}}),f=l.call(i,n)},g)}}function F(c){var e,f,d=c,g=function(a){return""+a.text};a.isArray(d)&&(f=d,d={results:f}),a.isFunction(d)===!1&&(f=d,d=function(){return f});var h=d();return h.text&&(g=h.text,a.isFunction(g)||(e=h.text,g=function(a){return a[e]})),function(c){var h,e=c.term,f={results:[]};return""===e?(c.callback(d()),b):(h=function(b,d){var f,i;if(b=b[0],b.children){f={};for(i in b)b.hasOwnProperty(i)&&(f[i]=b[i]);f.children=[],a(b.children).each2(function(a,b){h(b,f.children)}),(f.children.length||c.matcher(e,g(f),b))&&d.push(f)}else c.matcher(e,g(b),b)&&d.push(b)},a(d().results).each2(function(a,b){h(b,f.results)}),c.callback(f),b)}}function G(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function H(b,c){if(a.isFunction(b))return!0;if(!b)return!1;throw Error(c+" must be a function or a falsy value")}function I(b){return a.isFunction(b)?b():b}function J(b){var c=0;return a.each(b,function(a,b){b.children?c+=J(b.children):c++}),c}function K(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||1>e.tokenSeparators.length)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(o(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:b}function L(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,j,k,i={x:0,y:0},c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="<div class='select2-measure-scrollbar'></div>";j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i.x=a.pageX,i.y=a.pageY}),d=L(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,h,i,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=u(function(){return c.element.closest("body")}),B(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(I(c.containerCss)),this.container.addClass(I(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(I(c.dropdownCssClass)),this.dropdown.data("select2",this),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.resultsPage=0,this.context=null,this.initContainer(),s(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",f,this.bind(this.highlightUnderEvent)),v(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),y(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),y(a))}),r(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||n(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus()},destroy:function(){var a=this.opts.element,c=a.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),c!==b&&(c.container.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:o(a.attr("locked"),"locked")||o(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:b},prepareOpts:function(c){var d,e,f,g,h=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,l=this.opts.id;g=function(d,e,i){var j,k,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),j=0,k=d.length;k>j;j+=1)m=d[j],o=m.disabled===!0,n=!o&&l(m)!==b,p=m.children&&m.children.length>0,q=a("<li></li>"),q.addClass("select2-results-dept-"+i),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(h.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,h.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a("<ul></ul>"),s.addClass("select2-result-sub"),g(m.children,s,i+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var f,g,i,c={results:[],more:!1},e=a.term;i=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(h.optionToData(b)):b.is("optgroup")&&(d=h.optionToData(b),b.children().each2(function(a,b){i(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){i(b,c.results)}),a.callback(c)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(g=c.element.data("ajax-url"),g&&g.length>0&&(c.ajax.url=g),c.query=E.call(c.element,c.ajax)):"data"in c?c.query=F(c.data):"tags"in c&&(c.query=G(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(a){return{id:a,text:a}}),c.initSelection===b&&(c.initSelection=function(d,e){var f=[];a(p(d.val(),c.separator)).each(function(){var d=this,e=this,g=c.tags;a.isFunction(g)&&(g=g()),a(g).each(function(){return o(this.id,d)?(e=this.text,!1):b}),f.push({id:d,text:e})}),e(f)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var c,a=this.opts.element;a.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),c=this.bind(function(){var d,f=a.prop("disabled");f===b&&(f=!1),this.enable(!f);var d=a.prop("readonly");d===b&&(d=!1),this.readonly(d),B(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(I(this.opts.containerCssClass)),B(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(I(this.opts.dropdownCssClass))}),a.on("propertychange.select2 DOMAttrModified.select2",c),this.mutationCallback===b&&(this.mutationCallback=function(a){a.forEach(c)}),"undefined"!=typeof WebKitMutationObserver&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(this.mutationCallback),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){return a===b&&(a=!0),this._enabled===a?!1:(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface(),!0)},readonly:function(a){return a===b&&(a=!1),this._readonly===a?!1:(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var q,r,s,t,b=this.dropdown,c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),g=a(window).scrollLeft()+a(window).width(),h=a(window).scrollTop()+a(window).height(),i=c.top+d,j=c.left,l=h>=i+f,m=c.top-f>=this.body().scrollTop(),n=b.outerWidth(!1),o=g>=j+n,p=b.hasClass("select2-drop-above");this.opts.dropdownAutoWidth?(t=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),n=b.outerWidth(!1)+(t.scrollHeight===t.clientHeight?0:k.width),n>e?e=n:n=e,o=g>=j+n):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body().css("position")&&(q=this.body().offset(),i-=q.top,j-=q.left),p?(r=!0,!m&&l&&(r=!1)):(r=!1,!l&&m&&(r=!0)),o||(j=c.left+e-n),r?(i=c.top-f,this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),s=a.extend({top:i,left:j,width:e},I(this.opts.dropdownCss)),b.css(s)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){function i(){return{width:Math.max(document.documentElement.scrollWidth,a(window).width()),height:Math.max(document.documentElement.scrollHeight,a(window).height())}}var f,g,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.on("mousedown touchstart click",function(b){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close(),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),g=i(),f.css(g).show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var h=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){var c=i();a("#select2-drop-mask").css(c),h.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return I(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var d,e,f,g,h,i,j,c=this.results;if(e=this.highlight(),!(0>e)){if(0==e)return c.scrollTop(0),b;d=this.findHighlightableChoices().find(".select2-result-label"),f=a(d[e]),g=f.offset().top+f.outerHeight(!0),e===d.length-1&&(j=c.find("li.select2-more-results"),j.length>0&&(g=j.offset().top+j.outerHeight(!0))),h=c.offset().top+c.outerHeight(!0),g>h&&c.scrollTop(c.scrollTop()+(g-h)),i=f.offset().top-c.offset().top,0>i&&"none"!=f.css("display")&&c.scrollTop(c.scrollTop()+i)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&c.length>d;){d+=b;var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(c){var e,f,d=this.findHighlightableChoices();return 0===arguments.length?m(d.filter(".select2-highlighted")[0],d.get()):(c>=d.length&&(c=d.length-1),0>c&&(c=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),e=a(d[c]),e.addClass("select2-highlighted"),this.ensureHighlightVisible(),f=e.data("select2-data"),f&&this.opts.element.trigger({type:"select2-highlight",val:this.id(f),choice:f}),b)},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),e=this.resultsPage+1,f=this,g=this.search.val(),h=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),this.opts.loadMorePadding>=c&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:g,page:e,context:h,matcher:this.opts.matcher,callback:this.bind(function(c){f.opened()&&(f.opts.populateResults.call(this,a,c.results,{term:g,page:e,context:h}),f.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(f.opts.formatLoadMore(e+1)),window.setTimeout(function(){f.loadMoreIfNeeded()},10)):b.remove(),f.positionDropdown(),f.resultsPage=e,f.context=c.context)})})))},tokenize:function(){},updateResults:function(c){function l(){d.removeClass("select2-active"),h.positionDropdown()}function m(a){e.html(a),l()}var g,i,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!o(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){var n=this.getMaximumSelectionSize();if(n>=1&&(g=this.data(),a.isArray(g)&&g.length>=n&&H(f.formatSelectionTooBig,"formatSelectionTooBig")))return m("<li class='select2-selection-limit'>"+f.formatSelectionTooBig(n)+"</li>"),b;if(d.val().length<f.minimumInputLength)return H(f.formatInputTooShort,"formatInputTooShort")?m("<li class='select2-no-results'>"+f.formatInputTooShort(d.val(),f.minimumInputLength)+"</li>"):m(""),c&&this.showSearch&&this.showSearch(!0),b;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return H(f.formatInputTooLong,"formatInputTooLong")?m("<li class='select2-no-results'>"+f.formatInputTooLong(d.val(),f.maximumInputLength)+"</li>"):m(""),b;f.formatSearching&&0===this.findHighlightableChoices().length&&m("<li class='select2-searching'>"+f.formatSearching()+"</li>"),d.addClass("select2-active"),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;return this.opened()?(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(h,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return o(h.id(this),h.id(i))}).length&&g.results.unshift(i)),0===g.results.length&&H(f.formatNoMatches,"formatNoMatches")?(m("<li class='select2-no-results'>"+f.formatNoMatches(d.val())+"</li>"),b):(e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&H(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+h.opts.escapeMarkup(f.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),l(),this.opts.element.trigger({type:"select2-loaded",items:g}),b)):(this.search.removeClass("select2-active"),b)})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){w(this.search)},selectHighlighted:function(a){var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d?(this.highlight(b),this.onSelect(d,a)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var a=this.select.children().first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&a||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.text()&&""===a.val())return a}},initContainerWidth:function(){function c(){var c,d,e,f,g;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(e=d[f].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),e=L(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow'><b></b></span>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var b,c,d;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.search.focus(),b=this.search.get(0),b.createTextRange?(c=b.createTextRange(),c.collapse(!1),c.select()):b.setSelectionRange&&(d=this.search.val().length,b.setSelectionRange(d,d)),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var d,e=this.container,f=this.dropdown;0>this.opts.minimumResultsForSearch?this.showSearch(!1):this.showSearch(!0),this.selection=d=e.find(".select2-choice"),this.focusser=e.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.focusser.attr("tabindex",this.elementTabIndex),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return y(a),b;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),y(a),b;case c.ENTER:return this.selectHighlighted(),y(a),b;case c.TAB:return this.selectHighlighted({noFocus:!0}),b;case c.ESC:return this.cancel(a),y(a),b}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.ESC){if(this.opts.openOnEnter===!1&&a.which===c.ENTER)return y(a),b;if(a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),y(a),b}return a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),y(a),b):b}})),r(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),d.on("mousedown","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),z(a),this.close(),this.selection.focus())})),d.on("mousedown",this.bind(function(b){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),y(b)})),f.on("mousedown",this.bind(function(){this.search.focus()})),d.on("focus",this.bind(function(a){y(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(a){var b=this.selection.data("select2-data");if(b){var c=this.getPlaceholderOption();this.opts.element.val(c?c.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),a!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(b),choice:b}),this.triggerChange({removed:b}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection([]),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder())})}},isPlaceholderOptionSelected:function(){var a;return(a=this.getPlaceholderOption())!==b&&a.is(":selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val()},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find(":selected");b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=o(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,c,d){var e=0,f=this;if(this.findHighlightableChoices().each2(function(a,c){return o(f.id(c.data("select2-data")),f.opts.element.val())?(e=a,!1):b}),d!==!1&&(c===!0&&e>=0?this.highlight(e):this.highlight(0)),c===!0){var h=this.opts.minimumResultsForSearch;h>=0&&this.showSearch(J(a.results)>=h)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.close(),b&&b.noFocus||this.selection.focus(),o(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),d=this.opts.formatSelection(a,c,this.opts.escapeMarkup),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")
|
22 |
-
},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find(":selected").each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),b;if(this.opts.initSelection===b)throw Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a,c){var d;return 0===arguments.length?(d=this.selection.data("select2-data"),d==b&&(d=null),d):(a&&""!==a?(d=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),c&&this.triggerChange({added:a,removed:d})):this.clear(c),b)}}),f=L(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find(":selected").each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=p(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return o(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;e.length>c;c++)for(var g=e[c],h=0;f.length>h;h++){var i=f[h];if(o(g,b.id(i))){a.push(i),f.splice(h,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},initContainer:function(){var e,d=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(d);var f=this;this.selection.on("mousedown",".select2-search-choice",function(){f.search[0].focus(),f.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var d=e.find(".select2-search-choice-focus"),f=d.prev(".select2-search-choice:not(.select2-locked)"),g=d.next(".select2-search-choice:not(.select2-locked)"),h=x(this.search);if(d.length&&(a.which==c.LEFT||a.which==c.RIGHT||a.which==c.BACKSPACE||a.which==c.DELETE||a.which==c.ENTER)){var i=d;return a.which==c.LEFT&&f.length?i=f:a.which==c.RIGHT?i=g.length?g:null:a.which===c.BACKSPACE?(this.unselect(d.first()),this.search.width(10),i=f.length?f:g):a.which==c.DELETE?(this.unselect(d.first()),this.search.width(10),i=g.length?g:null):a.which==c.ENTER&&(i=null),this.selectChoice(i),y(a),i&&i.length||this.open(),b}if((a.which===c.BACKSPACE&&1==this.keydowns||a.which==c.LEFT)&&0==h.offset&&!h.length)return this.selectChoice(e.find(".select2-search-choice:not(.select2-locked)").last()),y(a),b;if(this.selectChoice(null),this.opened())switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),y(a),b;case c.ENTER:return this.selectHighlighted(),y(a),b;case c.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),b;case c.ESC:return this.cancel(a),y(a),b}if(a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.BACKSPACE&&a.which!==c.ESC){if(a.which===c.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)&&y(a),a.which===c.ENTER&&y(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("click",d,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",d,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.updateResults(!0),this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){0>m(e.id(this),c)&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith("<div>"+j+"</div>"),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",y).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),y(b))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(a){var c,d,b=this.getVal();if(a=a.closest(".select2-search-choice"),0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";c=a.data("select2-data"),c&&(d=m(this.id(c),b),d>=0&&(b.splice(d,1),this.setVal(b),this.select&&this.postprocessResults()),a.remove(),this.opts.element.trigger({type:"removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));m(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&H(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+g.opts.formatNoMatches(g.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-q(this.search)},resizeSearch:function(){var a,b,c,d,e,f=q(this.search);a=A(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(e)},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),p(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){0>m(this,c)&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;b.length>c;c++)for(var d=0;a.length>d;d++)o(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),b;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(this.buildChangeDetails(e,this.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(c,d){var f,g,e=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(g=this.data(),c||(c=[]),f=a.map(c,function(a){return e.opts.id(a)}),this.setVal(f),this.updateSelection(c),this.clearSearch(),d&&this.triggerChange(this.buildChangeDetails(g,this.data())),b)}}),a.fn.select2=function(){var d,g,h,i,j,c=Array.prototype.slice.call(arguments,0),k=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","readonly","positionDropdown","data","search"],l=["val","opened","isFocused","container","data"],n={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?j=d.element.prop("multiple"):(j=d.multiple||!1,"tags"in d&&(d.multiple=j=!0)),g=j?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(0>m(c[0],k))throw"Unknown method: "+c[0];if(i=b,g=a(this).data("select2"),g===b)return;if(h=c[0],"container"===h?i=g.container:"dropdown"===h?i=g.dropdown:(n[h]&&(h=n[h]),i=g[h].apply(g,c.slice(1))),m(c[0],l)>=0)return!1}}),i===b?this:i},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return C(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatSelectionCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return(""+b).toUpperCase().indexOf((""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:K,escapeMarkup:D,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:E,local:F,tags:G},util:{debounce:t,markMatch:C,escapeMarkup:D},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shared/assets/js/frontend/analytics/inboundAnalytics.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Inbound Analyticsv1.0.0 | (c) 2015 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
/**
|
3 |
* # _inbound
|
4 |
*
|
@@ -128,7 +128,7 @@ var _inbound = (function(options) {
|
|
128 |
|
129 |
return Analytics;
|
130 |
|
131 |
-
})(_inboundOptions);
|
132 |
/**
|
133 |
* # Hooks & Filters
|
134 |
*
|
@@ -532,7 +532,7 @@ var _inboundHooks = (function (_inbound) {
|
|
532 |
|
533 |
return _inbound;
|
534 |
|
535 |
-
})(_inbound || {});
|
536 |
/**
|
537 |
* # _inbound UTILS
|
538 |
*
|
@@ -1296,7 +1296,7 @@ var _inboundUtils = (function(_inbound) {
|
|
1296 |
return _inbound;
|
1297 |
|
1298 |
})(_inbound || {});
|
1299 |
-
|
1300 |
/**
|
1301 |
* # Inbound Forms
|
1302 |
*
|
@@ -2306,7 +2306,7 @@ var InboundForms = (function(_inbound) {
|
|
2306 |
|
2307 |
return _inbound;
|
2308 |
|
2309 |
-
})(_inbound || {});
|
2310 |
/**
|
2311 |
* # Analytics Events
|
2312 |
*
|
@@ -2835,7 +2835,7 @@ var _inboundEvents = (function(_inbound) {
|
|
2835 |
|
2836 |
return _inbound;
|
2837 |
|
2838 |
-
})(_inbound || {});
|
2839 |
/* LocalStorage Component */
|
2840 |
var InboundTotalStorage = (function (_inbound){
|
2841 |
|
@@ -2968,7 +2968,7 @@ var InboundTotalStorage = (function (_inbound){
|
|
2968 |
return ret;
|
2969 |
}
|
2970 |
};
|
2971 |
-
})(_inbound || {});
|
2972 |
/**
|
2973 |
* Leads API functions
|
2974 |
* @param Object _inbound - Main JS object
|
@@ -3056,7 +3056,7 @@ var _inboundLeadsAPI = (function(_inbound) {
|
|
3056 |
|
3057 |
return _inbound;
|
3058 |
|
3059 |
-
})(_inbound || {});
|
3060 |
/**
|
3061 |
* # Page View Tracking
|
3062 |
*
|
@@ -3430,7 +3430,7 @@ var _inboundPageTracking = (function(_inbound) {
|
|
3430 |
|
3431 |
return _inbound;
|
3432 |
|
3433 |
-
})(_inbound || {});
|
3434 |
/**
|
3435 |
* # Start
|
3436 |
*
|
1 |
+
/*! Inbound Analyticsv1.0.0 | (c) 2015 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
/**
|
3 |
* # _inbound
|
4 |
*
|
128 |
|
129 |
return Analytics;
|
130 |
|
131 |
+
})(_inboundOptions);
|
132 |
/**
|
133 |
* # Hooks & Filters
|
134 |
*
|
532 |
|
533 |
return _inbound;
|
534 |
|
535 |
+
})(_inbound || {});
|
536 |
/**
|
537 |
* # _inbound UTILS
|
538 |
*
|
1296 |
return _inbound;
|
1297 |
|
1298 |
})(_inbound || {});
|
1299 |
+
|
1300 |
/**
|
1301 |
* # Inbound Forms
|
1302 |
*
|
2306 |
|
2307 |
return _inbound;
|
2308 |
|
2309 |
+
})(_inbound || {});
|
2310 |
/**
|
2311 |
* # Analytics Events
|
2312 |
*
|
2835 |
|
2836 |
return _inbound;
|
2837 |
|
2838 |
+
})(_inbound || {});
|
2839 |
/* LocalStorage Component */
|
2840 |
var InboundTotalStorage = (function (_inbound){
|
2841 |
|
2968 |
return ret;
|
2969 |
}
|
2970 |
};
|
2971 |
+
})(_inbound || {});
|
2972 |
/**
|
2973 |
* Leads API functions
|
2974 |
* @param Object _inbound - Main JS object
|
3056 |
|
3057 |
return _inbound;
|
3058 |
|
3059 |
+
})(_inbound || {});
|
3060 |
/**
|
3061 |
* # Page View Tracking
|
3062 |
*
|
3430 |
|
3431 |
return _inbound;
|
3432 |
|
3433 |
+
})(_inbound || {});
|
3434 |
/**
|
3435 |
* # Start
|
3436 |
*
|
shared/assets/js/frontend/analytics/inboundAnalytics.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Inbound Analyticsv1.0.0 | (c) 2015 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
-
var inbound_data=inbound_data||{},_inboundOptions=_inboundOptions||{},_gaq=_gaq||[],_inbound=function(e){var t={timeout:inbound_settings.is_admin?500:1e4,formAutoTracking:!0,formAutoPopulation:!0},n={init:function(){_inbound.Utils.init(),_inbound.Utils.domReady(window,function(){_inbound.DomLoaded()})},DomLoaded:function(){_inbound.PageTracking.init(),_inbound.Forms.init(),_inbound.Utils.setUrlParams(),_inbound.LeadsAPI.init(),setTimeout(function(){_inbound.Forms.init()},2e3),_inbound.trigger("analytics_ready")},extend:function(e,t){var n,i={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i},debug:function(){},deBugger:function(e,t,n){if(console){var i,o,a,r=document.location.hash?document.location.hash:"",s=r.indexOf("#debug")>-1,t=t||!1;r&&r.match(/debug/)&&(r=r.split("-"),a=r[1]),o="true"===_inbound.Utils.readCookie("inbound_debug")?!0:!1,i="true"===_inbound.Utils.readCookie("inbound_debug_"+e)?!0:!1,(i||s||o)&&(t&&"string"==typeof t&&(o||"all"===a?console.log('logAll "'+e+'" =>',t):i?console.log('log "'+e+'" =>',t):e===a&&console.log('#log "'+e+'" =>',t)),n&&n instanceof Function&&n())}}},i=n.extend(t,e);return n.Settings=i||{},n}(_inboundOptions),_inboundHooks=function(e){var t=function(){function e(e,t,n,i){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("actions",e,t,n,i)),d}function t(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t&&u("actions",t,e),d}function n(e,t){return"string"==typeof e&&r("actions",e,t),d}function i(e,t,n){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("filters",e,t,n)),d}function o(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t?u("filters",t,e):d}function a(e,t){return"string"==typeof e&&r("filters",e,t),d}function r(e,t,n,i){if(c[e][t])if(n){var o,a=c[e][t];if(i)for(o=a.length;o--;){var r=a[o];r.callback===n&&r.context===i&&a.splice(o,1)}else for(o=a.length;o--;)a[o].callback===n&&a.splice(o,1)}else c[e][t]=[]}function s(e,t,n,i,o){var a={callback:n,priority:i,context:o},r=c[e][t];r?(r.push(a),r=l(r)):r=[a],c[e][t]=r}function l(e){for(var t,n,i,o=1,a=e.length;a>o;o++){for(t=e[o],n=o;(i=e[n-1])&&i.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function u(e,t,n){var i=c[e][t];if(!i)return"filters"===e?n[0]:!1;var o=0,a=i.length;if("filters"===e)for(;a>o;o++)n[0]=i[o].callback.apply(i[o].context,n);else for(;a>o;o++)i[o].callback.apply(i[o].context,n);return"filters"===e?n[0]:!0}var d={removeFilter:a,applyFilters:o,addFilter:i,removeAction:n,doAction:t,addAction:e},c={actions:{},filters:{}};return d};return e.hooks=new t,e.add_action=function(){var t=arguments[0].split(" ");for(k in t)arguments[0]="inbound."+t[k],e.hooks.addAction.apply(this,arguments);return this},e.remove_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeAction.apply(this,arguments),this},e.do_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.doAction.apply(this,arguments),this},e.add_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.addFilter.apply(this,arguments),this},e.remove_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeFilter.apply(this,arguments),this},e.apply_filters=function(){return arguments[0]="inbound."+arguments[0],e.hooks.applyFilters.apply(this,arguments)},e}(_inbound||{}),_inboundUtils=function(e){var t,n=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,i=(Object.prototype.toString,("https:"==location.protocol?"https://":"http://")+location.hostname+location.pathname.replace(/\/$/,"")),o={api_host:i,track_pageview:!0,track_links_timeout:300,cookie_name:"_sp",cookie_expiration:365,cookie_domain:(host=location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i))?host[0]:""};return e.Utils={init:function(){this.polyFills(),this.checkLocalStorage(),this.SetUID(),this.storeReferralData()},polyFills:function(){window.console||(window.console={});for(var e=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"],t=0;t<e.length;t++)window.console[e[t]]||(window.console[e[t]]=function(){});Date.prototype.toISOString||!function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();try{new CustomEvent("?")}catch(n){this.CustomEvent=function(e,t){function n(n,o){var a=document.createEvent(e);return null!==n?i.call(a,n,(o||(o=t)).bubbles,o.cancelable,o.detail):a.initCustomEvent=i,a}function i(t,n,i,o){this["init"+e](t,n,i,o),"detail"in this||(this.detail=o)}return n}(this.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),i=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)t=document._qsa.shift(),t.style.removeAttribute("x-qsa"),i.push(t);return document._qsa=null,i}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),!("innerText"in document.createElement("a"))&&"getSelection"in window&&HTMLElement.prototype.__defineGetter__("innerText",function(){for(var e,t=window.getSelection(),n=[],i=0;i<t.rangeCount;i++)n[i]=t.getRangeAt(i);t.removeAllRanges(),t.selectAllChildren(this),e=t.toString(),t.removeAllRanges();for(var i=0;i<n.length;i++)t.addRange(n[i]);return e})},createCookie:function(e,t,n){var i="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=e+"="+t+i+"; path=/"},readCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},eraseCookie:function(e){this.createCookie(e,"",-1)},getAllCookies:function(){var t={};if(document.cookie&&""!==document.cookie)for(var n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i].split("=");o[0]=o[0].replace(/^ /,""),t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e.totalStorage("inbound_cookies",t),t},setUrlParams:function(){var n={};!function(){for(var e,t=function(e){return decodeURIComponent(e).replace(/\+/g," ")},i=window.location.search.substring(1),o=/([^&=]+)=?([^&]*)/g;e=o.exec(i);)if("-1"==e[1].indexOf("["))n[t(e[1])]=t(e[2]);else{var a=e[1].indexOf("["),r=e[1].slice(a+1,e[1].indexOf("]",a)),s=t(e[1].slice(0,a));"object"!=typeof n[s]&&(n[t(s)]={},n[t(s)].length=0),r?n[t(s)][t(r)]=t(e[2]):Array.prototype.push.call(n[t(s)],t(e[2]))}}();for(var i in n)if("object"==typeof n[i])for(var o in n[i])this.createCookie(o,n[i][o],30);else this.createCookie(i,n[i],30);if(t){var a=e.totalStorage("inbound_url_params")||{},r=this.mergeObjs(a,n);e.totalStorage("inbound_url_params",r)}var s={option1:"yo",option2:"woooo"};e.trigger("url_parameters",n,s)},getAllUrlParams:function(){var n={};if(t)var n=e.totalStorage("inbound_url_params");return n},getParameterVal:function(e,t){return(RegExp(e+"=(.+?)(&|$)").exec(t)||[,!1])[1]},checkLocalStorage:function(){if("localStorage"in window)try{ls="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof ls||"undefined"==typeof window.JSON?!1:!0}catch(e){t=!1}return t},showLocalStorageSize:function(){function e(e){return 2*e.length}function t(e){return e/1024/1024}function n(t){return{name:t,size:e(localStorage[t])}}function i(e){return e.size=t(e.size).toFixed(2)+" MB",e}var o=Object.keys(localStorage).map(n).map(i);console.table(o)},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},GetDate:function(){var e=new Date,t=e.getDate(),n=10>t?"0":"",i=e.getFullYear(),o=e.getHours(),a=10>o?"0":"",r=e.getMinutes(),s=10>r?"0":"",l=e.getSeconds(),u=10>l?"0":"",d=e.getMonth()+1,c=10>d?"0":"",m=i+"/"+c+d+"/"+n+t+" "+a+o+":"+s+r+":"+u+l;return m},SetSessionTimeout:function(){var e=(this.readCookie("lead_session_expire"),new Date);e.setTime(e.getTime()+18e5),this.createCookie("lead_session_expire",!0,e)},storeReferralData:function(){var t=new Date,n=document.referrer||"Direct Traffic",i=e.Utils.readCookie("inbound_referral_site"),o=e.totalStorage("inbound_original_referral");t.setTime(t.getTime()+18e5),i||this.createCookie("inbound_referral_site",n,t),o||e.totalStorage("inbound_original_referral",o)},CreateUID:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var i=0;e>i;i++)n+=t[Math.floor(Math.random()*t.length)];return n},generateGUID:function(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,guid)},SetUID:function(e){if(!this.readCookie("wp_lead_uid")){var t=e||this.CreateUID(35);this.createCookie("wp_lead_uid",t)}},countProperties:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&++t;return t},mergeObjs:function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n},hasClass:function(e,t){var n;if("classList"in document.documentElement)var n=t.classList.contains(e);else var n=new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className);return n},addClass:function(e,t){"classList"in document.documentElement?t.classList.add(e):this.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(e,t){"classList"in document.documentElement?t.classList.remove(e):this.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)*"+e+"(\\s|$)*","g"),""))},removeElement:function(e){e.parentNode.removeChild(e)},trim:function(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")},ajaxPolyFill:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;for(var e,t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{e=new ActiveXObject(t[n]);break}catch(i){}return e},ajaxSendData:function(e,t,n,i){var o=this.ajaxPolyFill();setTimeout(function(){o.open(n,e,!0),o.onreadystatechange=function(){4==o.readyState&&t(o.responseText)},"POST"==n&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.send(i)},100)},ajaxGet:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e+"?"+o.join("&"),n,"GET",null,i)},ajaxPost:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e,n,"POST",o.join("&"),i)},sendEvent:function(e,t,i){t=t||{},async=!0;var a=getCookie();if(a){var r;for(r in a)t[r]=a[r]}t.id||(t.id=getId());var s={e:e,t:(new Date).toISOString(),kv:t},l=o.api_host+"/track?data="+encodeURIComponent(JSON.stringify(s));if(n){var u=new XMLHttpRequest;u.open("GET",l,async),u.withCredentials=async,u.send(null)}else{var d=document.createElement("script");d.type="text/javascript",d.async=async,d.defer=async,d.src=l;var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(d,c)}return action(i),self},domReady:function(e,t){var n=!1,i=!0,o=e.document,a=o.documentElement,r=o.addEventListener?"addEventListener":"attachEvent",s=o.addEventListener?"removeEventListener":"detachEvent",l=o.addEventListener?"":"on",u=function(i){("readystatechange"!=i.type||"complete"==o.readyState)&&(("load"==i.type?e:o)[s](l+i.type,u,!1),!n&&(n=!0)&&t.call(e,i.type||i))},d=function(){try{a.doScroll("left")}catch(e){return setTimeout(d,50),void 0}u("poll")};if("complete"==o.readyState)t.call(e,"lazy");else{if(o.createEventObject&&a.doScroll){try{i=!e.frameElement}catch(c){}i&&d()}o[r](l+"DOMContentLoaded",u,!1),o[r](l+"readystatechange",u,!1),e[r](l+"load",u,!1)}},addListener:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},throttle:function(e,t){var n,i,o,a=null,r=0,s=function(){r=new Date,a=null,o=e.apply(n,i)};return function(){var l=new Date;r||(r=l);var u=t-(l-r);return n=this,i=arguments,0>=u?(clearTimeout(a),a=null,r=l,o=e.apply(n,i)):a||(a=setTimeout(s,u)),o}},checkTypeofGA:function(){"function"==typeof ga&&(universalGA=!0),"undefined"!=typeof _gaq&&"function"==typeof _gaq.push&&(classicGA=!0),"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(googleTagManager=!0)}},e}(_inbound||{}),InboundForms=function(e){var t=!1,n=e.Utils,o=[],a=[],r=[],s=e.Settings,l=["first name","last name","name","email","e-mail","phone","website","job title","your favorite food","company","tele","address","comment"];if(e.Forms={init:function(){e.Forms.runFieldMappingFilters(),e.Forms.assignTrackClass(),e.Forms.formTrackInit()},runFieldMappingFilters:function(){l=e.hooks.applyFilters("forms.field_map",l)},debug:function(e,n){if(t&&console){var e=e||!1;e&&"string"==typeof e&&console.log(e),n&&n instanceof Function&&n()}},formTrackInit:function(){for(var e=0;e<window.document.forms.length;e++){var t=!1,n=window.document.forms[e];n.dataset.formProcessed||(n.dataset.formProcessed=!0,t=this.checkTrackStatus(n),t&&(this.attachFormSubmitEvent(n),this.initFormMapping(n)))}},checkTrackStatus:function(t){var n=t.getAttribute("class");return""!==n&&null!==n?n.toLowerCase().indexOf("wpl-track-me")>-1?!0:n.toLowerCase().indexOf("inbound-track")>-1?!0:(cb=function(){console.log(t)},e.deBugger("forms","This form not tracked. Please assign on in settings...",cb),!1):void 0},assignTrackClass:function(){if(window.inbound_settings){if(inbound_settings.inbound_track_include){var t=inbound_settings.inbound_track_include.split(","),n="add selectors "+inbound_settings.inbound_track_include;e.deBugger("forms",n),this.loopClassSelectors(t,"add")}if(inbound_settings.inbound_track_exclude){var t=inbound_settings.inbound_track_exclude.split(","),n="remove selectors "+inbound_settings.inbound_track_exclude;e.deBugger("forms",n),this.loopClassSelectors(t,"remove")}}},loopClassSelectors:function(t,i){for(var o=t.length-1;o>=0;o--){var a=n.trim(t[o]);-1===a.indexOf("#")&&-1===a.indexOf(".")&&(a="#"+a),a=document.querySelector(a),a&&("add"===i?(e.Utils.addClass("wpl-track-me",a),e.Utils.addClass("inbound-track",a)):(e.Utils.removeClass("wpl-track-me",a),e.Utils.removeClass("inbound-track",a)))}},initFormMapping:function(t){for(var n=[],i=0;i<t.elements.length;i++)formInput=t.elements[i],"hidden"!==formInput.type?(this.mapField(formInput),this.rememberInputValues(formInput),s.formAutoPopulation&&!e.Utils.hasClass("nopopulate",t)&&this.fillInputValues(formInput)):n.push(formInput);for(var o=n.length-1;o>=0;o--)formInput=n[o],this.mapField(formInput)},mapField:function(t){var a=t.id||!1,r=t.name||!1,s=this.getInputLabel(t);if(s){var u=this.ignoreFieldByLabel(s[0].innerText);if(u)return t.dataset.ignoreFormField=!0,!1}for(i=0;i<l.length;i++){var d=!1,c=l[i],m=n.trim(c),f=m.replace(/ /g,"_");r&&r.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching name attribute for -> "+m)):a&&a.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching ID attribute for ->"+m)):s?s[0].innerText.toLowerCase().indexOf(m)>-1&&(d=!0,e.deBugger("forms","Found matching sibling label for -> "+m)):o.push(m),d&&(this.addDataAttr(t,f),this.removeArrayItem(l,m),i--)}return inbound_data},formListener:function(t){t.preventDefault(),e.Forms.saveFormData(t.target),document.body.style.cursor="wait"},attachFormSubmitEvent:function(e){n.addListener(e,"submit",this.formListener);document.querySelector(".inbound-email")},ignoreFieldByLabel:function(t){var n=!1;return t?((-1!=t.toLowerCase().indexOf("credit card")||-1!=t.toLowerCase().indexOf("card number"))&&(n=!0),(-1!=t.toLowerCase().indexOf("expiration")||-1!=t.toLowerCase().indexOf("expiry"))&&(n=!0),("month"==t.toLowerCase()||"mm"==t.toLowerCase()||"yy"==t.toLowerCase()||"yyyy"==t.toLowerCase()||"year"==t.toLowerCase())&&(n=!0),(-1!=t.toLowerCase().indexOf("cvv")||-1!=t.toLowerCase().indexOf("cvc")||-1!=t.toLowerCase().indexOf("secure code")||-1!=t.toLowerCase().indexOf("security code"))&&(n=!0),n&&e.deBugger("forms","ignore "+t),n):!1},ignoreFieldByValue:function(e){var t=!1;if(!e)return!1;("visa"==e.toLowerCase()||"mastercard"==e.toLowerCase()||"american express"==e.toLowerCase()||"amex"==e.toLowerCase()||"discover"==e.toLowerCase())&&(t=!0);var n=new RegExp("/^[0-9]+$/");if(n.test(e)){var i=e.replace(" ","");this.isInt(i)&&i.length>=16&&(t=!0)}return t},isInt:function(e){return"number"==typeof e&&isFinite(e)&&e%1===0},releaseFormSubmit:function(e){document.body.style.cursor="default",n.removeClass("wpl-track-me",e),n.removeListener(e,"submit",this.formListener);var t=e.getAttribute("class");return""!==t&&null!==t&&-1!=t.toLowerCase().indexOf("wpcf7-form")?(setTimeout(function(){document.body.style.cursor="default"},300),!0):(e.submit(),setTimeout(function(){for(var t=0;t<e.elements.length;t++)formInput=e.elements[t],type=formInput.type||!1,"submit"===type&&"submit"===formInput.name&&e.elements[t].click()},2e3),void 0)},saveFormData:function(t){for(var i=i||{},o=0;o<t.elements.length;o++)if(formInput=t.elements[o],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("forms","ignore "+formInput.name);continue}switch(inputName=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),i[inputName]||(i[inputName]={}),formInput.type&&(i[inputName].type=formInput.type),i[inputName].name||(i[inputName].name=formInput.name),formInput.dataset.mapFormField&&(i[inputName].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(l=this.getInputValue(formInput),l===!1)continue;break;case"TEXTAREA":l=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var s=0;s<formInput.length;s++)formInput[s].selected&&values.push(encodeURIComponent(formInput[s].value))}else l=formInput.value}if(e.deBugger("forms","Input Value = "+l),l){i[inputName].value||(i[inputName].value=[]),i[inputName].value.push(multiple?values.join(","):encodeURIComponent(l));var l=multiple?values.join(","):encodeURIComponent(l)}}e.deBugger("forms",i);for(var u in i){var d=i[u].value,c=i[u].map;if("undefined"!=typeof d&&null!=d&&""!=d&&a.push(u+"="+i[u].value.join(",")),"undefined"!=typeof c&&null!=c&&i[u].value&&(r.push(c+"="+i[u].value.join(",")),"email"===u))var m=i[u].value.join(",")}var f=a.join("&");e.deBugger("forms","Stringified Raw Form PARAMS: "+f);var g=r.join("&");e.deBugger("forms","Stringified Mapped PARAMS"+g);var m=n.getParameterVal("email",g)||n.readCookie("wp_lead_email");m||(m=n.getParameterVal("wpleads_email_address",g));var p=n.getParameterVal("name",g),v=n.getParameterVal("first_name",g),h=n.getParameterVal("last_name",g);if(!h&&v){var _=decodeURI(v).split(" ");_.length>0&&(v=_[0],h=_[1])}if(p&&!h&&!v){var _=decodeURI(p).split(" ");_.length>0&&(v=_[0],h=_[1])}p=v&&h?v+" "+h:p,v||(v=""),h||(h=""),e.deBugger("forms","fName = "+v),e.deBugger("forms","lName = "+h),e.deBugger("forms","fullName = "+p);var b=e.totalStorage("page_views")||{},y=e.totalStorage("inbound_url_params")||{};if("undefined"!=typeof landing_path_info)var w=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)var w=cta_path_info.variation;else var w=inbound_settings.variation_id;var k=inbound_settings.post_type||"page",C=inbound_settings.post_id||0;search_data={},formData={action:"inbound_lead_store",email:m,full_name:p,first_name:v,last_name:h,raw_params:f,mapped_params:g,url_params:JSON.stringify(y),search_data:"test",page_views:JSON.stringify(b),post_type:k,page_id:C,variation:w,source:n.readCookie("inbound_referral_site")},callback=function(i){e.deBugger("forms","Lead Created with ID: "+i),i=parseInt(i,10),formData.leadID=i,i&&(n.createCookie("wp_lead_id",i),e.totalStorage.deleteItem("page_views"),e.totalStorage.deleteItem("tracking_events")),e.trigger("form_after_submission",formData),e.Forms.releaseFormSubmit(t)},e.trigger("form_before_submission",formData),n.ajaxPost(inbound_settings.admin_url,formData,callback)},rememberInputValues:function(t){var i=(t.name?"inbound_"+t.name:"",t.type?t.type:"text");return"submit"===i||"hidden"===i||"file"===i||"password"===i||t.dataset.ignoreFormField?!1:(n.addListener(t,"change",function(t){if(t.target.name){if("checkbox"!==i)var o=t.target.value;else for(var a=[],r=document.querySelectorAll('input[name="'+t.target.name+'"]'),s=0;s<r.length;s++){var l=r[s].checked;l&&a.push(r[s].value),o=a.join(",")}inputData={name:t.target.name,node:t.target.nodeName.toLowerCase(),type:i,value:o,mapping:t.target.dataset.mapFormField},e.trigger("form_input_change",inputData),n.createCookie("inbound_"+t.target.name,encodeURIComponent(o))}}),void 0)},fillInputValues:function(e){var t=e.name?"inbound_"+e.name:"",i=e.type?e.type:"text";if("submit"===i||"hidden"===i||"file"===i||"password"===i)return!1;if(n.readCookie(t)&&"comment"!=t)if(value=decodeURIComponent(n.readCookie(t)),"checkbox"===i||"radio"===i)for(var o=value.split(","),a=0;a<o.length;a++)e.value.indexOf(o[a])>-1&&(e.checked=!0);else"undefined"!==value&&(e.value=value)},getInputLabel:function(e){var t;return(t=this.siblingsIsLabel(e))?t:(t=this.CheckParentForLabel(e))?t:!1},getInputValue:function(e){var t=!1;switch(e.type){case"radio":case"checkbox":e.checked&&(t=e.value);break;case"text":case"hidden":default:t=e.value}return t},addDataAttr:function(e,t){for(var n=document.getElementsByName(e.name),i=n.length-1;i>=0;i--)e.dataset.mapFormField||(n[i].dataset.mapFormField=t)},removeArrayItem:function(e,t){if(e.indexOf)index=e.indexOf(t);else for(index=e.length-1;index>=0&&e[index]!==t;--index);index>=0&&e.splice(index,1)},siblingsIsLabel:function(e){for(var t=this.getSiblings(e),n=[],i=t.length-1;i>=0;i--)"label"===t[i].nodeName.toLowerCase()&&n.push(t[i]);return n.length>0&&n.length<2?n:!1},getChildren:function(e,t){for(var n=[];e;e=e.nextSibling)1==e.nodeType&&e!=t&&n.push(e);return n},getSiblings:function(e){return this.getChildren(e.parentNode.firstChild,e)},CheckParentForLabel:function(e){if("FORM"===e.nodeName)return null;do{var t=e.getElementsByTagName("label");if(t.length>0&&t.length<2)return e.getElementsByTagName("label")}while(e=e.parentNode);return null},mailCheck:function(){var e=document.querySelector(".inbound-email");e&&(n.addListener(e,"blur",this.mailCheck),u.run({email:document.querySelector(".inbound-email").value,suggested:function(t){var i=document.querySelector(".email_suggestion");i&&n.removeElement(i);var o=document.createElement("span");o.innerHTML="<span class=\"email_suggestion\">Did youu mean <b><i id='email_correction' style='cursor: pointer;' title=\"click to update\">"+t.full+"</b></i>?</span>",e.parentNode.insertBefore(o,e.nextSibling);var a=document.getElementById("email_correction");n.addListener(a,"click",function(){e.value=a.innerHTML,a.parentNode.parentNode.innerHTML="Fixed!"})},empty:function(){}}))}},"undefined"==typeof u)var u={domainThreshold:1,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca","de"],run:function(e){e.domains=e.domains||u.defaultDomains,e.topLevelDomains=e.topLevelDomains||u.defaultTopLevelDomains,e.distanceFunction=e.distanceFunction||u.sift3Distance;var t=function(e){return e},n=e.suggested||t,i=e.empty||t,o=u.suggest(u.encodeEmail(e.email),e.domains,e.topLevelDomains,e.distanceFunction);return o?n(o):i()},suggest:function(e,t,n,i){e=e.toLowerCase();var o=this.splitEmail(e),a=this.findClosestDomain(o.domain,t,i,this.domainThreshold);if(a){if(a!=o.domain)return{address:o.address,domain:a,full:o.address+"@"+a}}else{var r=this.findClosestDomain(o.topLevelDomain,n,i,this.topLevelThreshold);if(o.domain&&r&&r!=o.topLevelDomain){var s=o.domain;return a=s.substring(0,s.lastIndexOf(o.topLevelDomain))+r,{address:o.address,domain:a,full:o.address+"@"+a}}}return!1},findClosestDomain:function(e,t,n,i){i=i||this.topLevelThreshold;var o,a=99,r=null;if(!e||!t)return!1;n||(n=this.sift3Distance);for(var s=0;s<t.length;s++){if(e===t[s])return e;o=n(e,t[s]),a>o&&(a=o,r=t[s])}return i>=a&&null!==r?r:!1},sift3Distance:function(e,t){if(null===e||0===e.length)return null===t||0===t.length?0:t.length;if(null===t||0===t.length)return e.length;for(var n=0,i=0,o=0,a=0,r=5;n+i<e.length&&n+o<t.length;){if(e.charAt(n+i)==t.charAt(n+o))a++;else{i=0,o=0;for(var s=0;r>s;s++){if(n+s<e.length&&e.charAt(n+s)==t.charAt(n)){i=s;break}if(n+s<t.length&&e.charAt(n)==t.charAt(n+s)){o=s;break}}}n++}return(e.length+t.length)/2-a},splitEmail:function(e){var t=e.trim().split("@");if(t.length<2)return!1;for(var n=0;n<t.length;n++)if(""===t[n])return!1;var i=t.pop(),o=i.split("."),a="";if(0===o.length)return!1;if(1==o.length)a=o[0];else{for(var n=1;n<o.length;n++)a+=o[n]+".";o.length>=2&&(a=a.substring(0,a.length-1))}return{topLevelDomain:a,domain:i,address:t.join("@")}},encodeEmail:function(e){var t=encodeURI(e);return t=t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};return e}(_inbound||{}),_inboundEvents=function(e){function t(t,i,o){var i=i||{};o=o||{},o.bubbles=o.bubbles||!0,o.cancelable=o.cancelable||!0,i=e.apply_filters("filter_"+t,i);!window.ActiveXObject&&"ActiveXObject"in window;if("function"==typeof CustomEvent)var a=new CustomEvent(t,{detail:i,bubbles:o.bubbles,cancelable:o.cancelable});else{var a=document.createEvent("Event");a.initEvent(t,!0,!0)}window.dispatchEvent(a),e.do_action(t,i),n(t,i)}function n(e,t){if(window.jQuery){var t=t||{};jQuery(document).trigger(e,t)}}e.trigger=function(t,n){e.Events[t](n)};return e.Events={analytics_ready:function(){var e={opt1:!0},n={data:"xyxy"};t("analytics_ready",n,e)},url_parameters:function(e){t("url_parameters",e)},session_start:function(){console.log(""),t("session_start")},session_end:function(e){t("session_end",e),console.log("Session End")},session_active:function(){t("session_active")},session_idle:function(e){t("session_idle",e)},session_resume:function(){t("session_resume")},session_heartbeat:function(e){var n={clock:e,leadData:InboundLeadData};t("session_heartbeat",n)},page_visit:function(e){t("page_view",e)},page_first_visit:function(){t("page_first_visit"),e.deBugger("pages","First Ever Page View of this Page")},page_revisit:function(n){t("page_revisit",n);var i=function(){console.log("pageData",n),console.log("Page Revisit viewed "+n+" times")};e.deBugger("pages",status,i)},tab_hidden:function(){e.deBugger("pages","Tab Hidden"),t("tab_hidden")},tab_visible:function(){e.deBugger("pages","Tab Visible"),t("tab_visible")},tab_mouseout:function(){e.deBugger("pages","Tab Mouseout"),t("tab_mouseout")},form_input_change:function(n){var i=function(){console.log(n)};e.deBugger("forms","inputData change. Data=",i),t("form_input_change",n)},form_before_submission:function(e){t("form_before_submission",e)},form_after_submission:function(e){t("form_after_submission",e)},analyticsError:function(e,t,n){var i=new CustomEvent("inbound_analytics_error",{detail:{MLHttpRequest:e,textStatus:t,errorThrown:n}});window.dispatchEvent(i),console.log("Page Save Error")}},e}(_inbound||{}),InboundTotalStorage=function(e){var t,n,i="_inbound";if("localStorage"in window)try{n="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof n||"undefined"==typeof window.JSON?!1:!0,window.localStorage.setItem(i,"1"),window.localStorage.removeItem(i)}catch(o){t=!1}e.totalStorage=function(t,n){return e.totalStorage.impl.init(t,n)},e.totalStorage.setItem=function(t,n){return e.totalStorage.impl.setItem(t,n)},e.totalStorage.getItem=function(t){return e.totalStorage.impl.getItem(t)},e.totalStorage.getAll=function(){return e.totalStorage.impl.getAll()},e.totalStorage.deleteItem=function(t){return e.totalStorage.impl.deleteItem(t)},e.totalStorage.impl={init:function(e,t){return"undefined"!=typeof t?this.setItem(e,t):this.getItem(e)},setItem:function(i,o){if(!t)try{return e.Utils.createCookie(i,o),o}catch(a){console.log("Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie")}var r=JSON.stringify(o);return n.setItem(i,r),this.parseResult(r)},getItem:function(i){if(!t)try{return this.parseResult(e.Utils.readCookie(i))}catch(o){return null}var a=n.getItem(i);return this.parseResult(a)},deleteItem:function(i){if(!t)try{return e.Utils.eraseCookie(i,null),!0}catch(o){return!1}return n.removeItem(i),!0},getAll:function(){var i=[];if(t)for(var o in n)o.length&&i.push({key:o,value:this.parseResult(n.getItem(o))});else try{for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var s=a[r].split("="),l=s[0];i.push({key:l,value:this.parseResult(e.Utils.readCookie(l))})}}catch(u){return null}return i},parseResult:function(e){var t;try{t=JSON.parse(e),"undefined"==typeof t&&(t=e),"true"==t&&(t=!0),"false"==t&&(t=!1),parseFloat(t)==t&&"object"!=typeof t&&(t=parseFloat(t))}catch(n){t=e}return t}}}(_inbound||{}),_inboundLeadsAPI=function(e){return e.LeadsAPI={init:function(){var t=e.Utils,n=(t.readCookie("wp_lead_uid"),t.readCookie("wp_lead_id")),i=t.readCookie("lead_session_expire");i||(e.deBugger("leads","expired vistor. Run Processes"),n&&e.LeadsAPI.getAllLeadData())},setGlobalLeadData:function(e){InboundLeadData=e},getAllLeadData:function(){var t=e.Utils.readCookie("wp_lead_id"),n=e.totalStorage("inbound_lead_data"),i=e.Utils.readCookie("lead_data_expire");data={action:"inbound_get_all_lead_data",wp_lead_id:t},success=function(t){var n=JSON.parse(t);e.LeadsAPI.setGlobalLeadData(n),e.totalStorage("inbound_lead_data",n);var i=new Date;i.setTime(i.getTime()+18e5);var o=e.Utils.addDays(i,3);e.Utils.createCookie("lead_data_expire",!0,o)},n?(e.LeadsAPI.setGlobalLeadData(n),e.deBugger("lead","Set Global Lead Data from Localstorage"),i||(e.Utils.ajaxPost(inbound_settings.admin_url,data,success),e.deBugger("lead","localized data old. Pull new from DB"))):e.Utils.ajaxPost(inbound_settings.admin_url,data,success)},getLeadLists:function(){var t=e.Utils.readCookie("wp_lead_id"),n={action:"wpl_check_lists",wp_lead_id:t},i=function(){e.Utils.createCookie("lead_session_list_check",!0,{path:"/",expires:1}),e.deBugger("lead","Lists checked")};e.Utils.ajaxPost(inbound_settings.admin_url,n,i)}},e}(_inbound||{}),_inboundPageTracking=function(e){var t,n,i=!1,o=!1,a=!1,r=parseInt(e.Utils.readCookie("lead_session"),10)||0,s=0,l=(new Date,null),u=null,d=null,c=e.Utils,m=e.Utils.GetDate(),f="page_views",g=e.totalStorage(f)||{},p=inbound_settings.post_id||window.location.pathname,v=e.Settings.timeout||1e4;return e.PageTracking={init:function(i){return"page_views"!==f?!1:(this.CheckTimeOut(),i=i||{},t=parseInt(i.reportInterval,10)||10,n=parseInt(i.idleTimeout,10)||3,c.addListener(document,"keydown",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(document,"click",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(window,"mousemove",c.throttle(e.PageTracking.pingSession,1e3)),e.PageTracking.checkVisibility(),this.startSession(),void 0)},setIdle:function(t){var t=t||"No Movement",n="Session IDLE. Activity Timeout due to "+t;e.deBugger("pages",n),clearTimeout(e.PageTracking.idleTimer),e.PageTracking.stopClock(),e.trigger("session_idle")
|
3 |
},checkVisibility:function(){var t,n,i;"undefined"!=typeof document.hidden?(t="hidden",i="visibilitychange",n="visibilityState"):"undefined"!=typeof document.mozHidden?(t="mozHidden",i="mozvisibilitychange",n="mozVisibilityState"):"undefined"!=typeof document.msHidden?(t="msHidden",i="msvisibilitychange",n="msVisibilityState"):"undefined"!=typeof document.webkitHidden&&(t="webkitHidden",i="webkitvisibilitychange",n="webkitVisibilityState");var o=document[t];e.Utils.addListener(document,i,function(){o!=document[t]&&(document[t]?(e.trigger("tab_hidden"),e.PageTracking.setIdle("browser tab switch")):(e.trigger("tab_visible"),e.PageTracking.pingSession()),o=document[t])})},clock:function(){r+=1;var n=r/60,i="Total time spent on Page in this Session: "+n.toFixed(2)+" min";if(e.deBugger("pages",i),r>0&&r%t===0){var o=new Date;o.setTime(o.getTime()+18e5),c.createCookie("lead_session",r,o),e.trigger("session_heartbeat",r)}},inactiveClock:function(){s+=1;var t=(1800-s)/60,n="Time until Session Timeout: "+t.toFixed(2)+" min";e.deBugger("pages",n),s>1800&&(e.trigger("session_end",InboundLeadData),e.Utils.eraseCookie("lead_session"),s=0,clearTimeout(u))},stopClock:function(){o=!0,clearTimeout(l),clearTimeout(u),u=setInterval(e.PageTracking.inactiveClock,1e3)},restartClock:function(){o=!1,e.trigger("session_resume"),e.deBugger("pages","Activity resumed. Session Active"),clearTimeout(l),s=0,clearTimeout(u),l=setInterval(e.PageTracking.clock,1e3)},turnOff:function(){e.PageTracking.setIdle(),a=!0},turnOn:function(){a=!1},startSession:function(){new Date;i=!0,l=setInterval(e.PageTracking.clock,1e3);var t=c.readCookie("lead_session");if(t)e.trigger("session_active");else{e.trigger("session_start");var n=new Date;n.setTime(n.getTime()+18e5),e.Utils.createCookie("lead_session",1,n)}this.pingSession()},resetInactiveFunc:function(){s=0,clearTimeout(u)},pingSession:function(t){a||(i||e.PageTracking.startSession(),o&&e.PageTracking.restartClock(),clearTimeout(d),d=setTimeout(e.PageTracking.setIdle,1e3*n+100),"undefined"!=typeof t&&"mousemove"===t.type&&e.PageTracking.mouseEvents(t))},mouseEvents:function(t){t.pageY<=5&&e.trigger("tab_mouseout")},getPageViews:function(){var t=e.Utils.checkLocalStorage();if(t){var n=localStorage.getItem(f),i=JSON.parse(n);return i}},isRevisit:function(e){var t=!1,e=e||{},n=e[p];return"undefined"!=typeof n&&null!==n&&(t=!0),t},triggerPageView:function(t){var n={title:document.title,url:document.location.href,path:document.location.pathname,count:1};t?(g[p].push(m),n.count=g[p].length,e.trigger("page_revisit",n)):(g[p]=[],g[p].push(m),e.trigger("page_first_visit",n)),e.trigger("page_visit",n),e.totalStorage(f,g),this.storePageView()},CheckTimeOut:function(){var t,n,i=this.isRevisit(g);if(i){var o=g[p].length-1,a=g[p][o],r=Math.abs(new Date(a).getTime()-new Date(m).getTime());n=r>v,n?(t="Timeout Happened. Page view fired",this.triggerPageView(i)):(time_left=.001*Math.abs(v-r),t=v/1e3+" sec timeout not done: "+time_left+" seconds left")}else this.triggerPageView(i);e.deBugger("pages",t)},storePageView:function(){if("off"!=inbound_settings.page_tracking){var t=e.Utils.readCookie("wp_lead_id")?e.Utils.readCookie("wp_lead_id"):"",n=e.Utils.readCookie("wp_lead_uid")?e.Utils.readCookie("wp_lead_uid"):"",i={action:"inbound_track_lead",wp_lead_uid:n,wp_lead_id:t,page_id:inbound_settings.post_id,variation_id:inbound_settings.variation_id,post_type:inbound_settings.post_type,current_url:window.location.href,json:"0"},o=function(){};e.Utils.ajaxPost(inbound_settings.admin_url,i,o)}}},e}(_inbound||{});_inbound.init(),InboundLeadData=_inbound.totalStorage("inbound_lead_data")||null;
|
1 |
+
/*! Inbound Analyticsv1.0.0 | (c) 2015 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
+
var inbound_data=inbound_data||{},_inboundOptions=_inboundOptions||{},_gaq=_gaq||[],_inbound=function(e){var t={timeout:inbound_settings.is_admin?500:1e4,formAutoTracking:!0,formAutoPopulation:!0},n={init:function(){_inbound.Utils.init(),_inbound.Utils.domReady(window,function(){_inbound.DomLoaded()})},DomLoaded:function(){_inbound.PageTracking.init(),_inbound.Forms.init(),_inbound.Utils.setUrlParams(),_inbound.LeadsAPI.init(),setTimeout(function(){_inbound.Forms.init()},2e3),_inbound.trigger("analytics_ready")},extend:function(e,t){var n,i={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i},debug:function(){},deBugger:function(e,t,n){if(console){var i,o,a,r=document.location.hash?document.location.hash:"",s=r.indexOf("#debug")>-1,t=t||!1;r&&r.match(/debug/)&&(r=r.split("-"),a=r[1]),o="true"===_inbound.Utils.readCookie("inbound_debug")?!0:!1,i="true"===_inbound.Utils.readCookie("inbound_debug_"+e)?!0:!1,(i||s||o)&&(t&&"string"==typeof t&&(o||"all"===a?console.log('logAll "'+e+'" =>',t):i?console.log('log "'+e+'" =>',t):e===a&&console.log('#log "'+e+'" =>',t)),n&&n instanceof Function&&n())}}},i=n.extend(t,e);return n.Settings=i||{},n}(_inboundOptions),_inboundHooks=function(e){var t=function(){function e(e,t,n,i){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("actions",e,t,n,i)),d}function t(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t&&u("actions",t,e),d}function n(e,t){return"string"==typeof e&&r("actions",e,t),d}function i(e,t,n){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("filters",e,t,n)),d}function o(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t?u("filters",t,e):d}function a(e,t){return"string"==typeof e&&r("filters",e,t),d}function r(e,t,n,i){if(c[e][t])if(n){var o,a=c[e][t];if(i)for(o=a.length;o--;){var r=a[o];r.callback===n&&r.context===i&&a.splice(o,1)}else for(o=a.length;o--;)a[o].callback===n&&a.splice(o,1)}else c[e][t]=[]}function s(e,t,n,i,o){var a={callback:n,priority:i,context:o},r=c[e][t];r?(r.push(a),r=l(r)):r=[a],c[e][t]=r}function l(e){for(var t,n,i,o=1,a=e.length;a>o;o++){for(t=e[o],n=o;(i=e[n-1])&&i.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function u(e,t,n){var i=c[e][t];if(!i)return"filters"===e?n[0]:!1;var o=0,a=i.length;if("filters"===e)for(;a>o;o++)n[0]=i[o].callback.apply(i[o].context,n);else for(;a>o;o++)i[o].callback.apply(i[o].context,n);return"filters"===e?n[0]:!0}var d={removeFilter:a,applyFilters:o,addFilter:i,removeAction:n,doAction:t,addAction:e},c={actions:{},filters:{}};return d};return e.hooks=new t,e.add_action=function(){var t=arguments[0].split(" ");for(k in t)arguments[0]="inbound."+t[k],e.hooks.addAction.apply(this,arguments);return this},e.remove_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeAction.apply(this,arguments),this},e.do_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.doAction.apply(this,arguments),this},e.add_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.addFilter.apply(this,arguments),this},e.remove_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeFilter.apply(this,arguments),this},e.apply_filters=function(){return arguments[0]="inbound."+arguments[0],e.hooks.applyFilters.apply(this,arguments)},e}(_inbound||{}),_inboundUtils=function(e){var t,n=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,i=(Object.prototype.toString,("https:"==location.protocol?"https://":"http://")+location.hostname+location.pathname.replace(/\/$/,"")),o={api_host:i,track_pageview:!0,track_links_timeout:300,cookie_name:"_sp",cookie_expiration:365,cookie_domain:(host=location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i))?host[0]:""};return e.Utils={init:function(){this.polyFills(),this.checkLocalStorage(),this.SetUID(),this.storeReferralData()},polyFills:function(){window.console||(window.console={});for(var e=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"],t=0;t<e.length;t++)window.console[e[t]]||(window.console[e[t]]=function(){});Date.prototype.toISOString||!function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();try{new CustomEvent("?")}catch(n){this.CustomEvent=function(e,t){function n(n,o){var a=document.createEvent(e);return null!==n?i.call(a,n,(o||(o=t)).bubbles,o.cancelable,o.detail):a.initCustomEvent=i,a}function i(t,n,i,o){this["init"+e](t,n,i,o),"detail"in this||(this.detail=o)}return n}(this.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),i=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)t=document._qsa.shift(),t.style.removeAttribute("x-qsa"),i.push(t);return document._qsa=null,i}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),!("innerText"in document.createElement("a"))&&"getSelection"in window&&HTMLElement.prototype.__defineGetter__("innerText",function(){for(var e,t=window.getSelection(),n=[],i=0;i<t.rangeCount;i++)n[i]=t.getRangeAt(i);t.removeAllRanges(),t.selectAllChildren(this),e=t.toString(),t.removeAllRanges();for(var i=0;i<n.length;i++)t.addRange(n[i]);return e})},createCookie:function(e,t,n){var i="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=e+"="+t+i+"; path=/"},readCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},eraseCookie:function(e){this.createCookie(e,"",-1)},getAllCookies:function(){var t={};if(document.cookie&&""!==document.cookie)for(var n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i].split("=");o[0]=o[0].replace(/^ /,""),t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e.totalStorage("inbound_cookies",t),t},setUrlParams:function(){var n={};!function(){for(var e,t=function(e){return decodeURIComponent(e).replace(/\+/g," ")},i=window.location.search.substring(1),o=/([^&=]+)=?([^&]*)/g;e=o.exec(i);)if("-1"==e[1].indexOf("["))n[t(e[1])]=t(e[2]);else{var a=e[1].indexOf("["),r=e[1].slice(a+1,e[1].indexOf("]",a)),s=t(e[1].slice(0,a));"object"!=typeof n[s]&&(n[t(s)]={},n[t(s)].length=0),r?n[t(s)][t(r)]=t(e[2]):Array.prototype.push.call(n[t(s)],t(e[2]))}}();for(var i in n)if("object"==typeof n[i])for(var o in n[i])this.createCookie(o,n[i][o],30);else this.createCookie(i,n[i],30);if(t){var a=e.totalStorage("inbound_url_params")||{},r=this.mergeObjs(a,n);e.totalStorage("inbound_url_params",r)}var s={option1:"yo",option2:"woooo"};e.trigger("url_parameters",n,s)},getAllUrlParams:function(){var n={};if(t)var n=e.totalStorage("inbound_url_params");return n},getParameterVal:function(e,t){return(RegExp(e+"=(.+?)(&|$)").exec(t)||[,!1])[1]},checkLocalStorage:function(){if("localStorage"in window)try{ls="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof ls||"undefined"==typeof window.JSON?!1:!0}catch(e){t=!1}return t},showLocalStorageSize:function(){function e(e){return 2*e.length}function t(e){return e/1024/1024}function n(t){return{name:t,size:e(localStorage[t])}}function i(e){return e.size=t(e.size).toFixed(2)+" MB",e}var o=Object.keys(localStorage).map(n).map(i);console.table(o)},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},GetDate:function(){var e=new Date,t=e.getDate(),n=10>t?"0":"",i=e.getFullYear(),o=e.getHours(),a=10>o?"0":"",r=e.getMinutes(),s=10>r?"0":"",l=e.getSeconds(),u=10>l?"0":"",d=e.getMonth()+1,c=10>d?"0":"",m=i+"/"+c+d+"/"+n+t+" "+a+o+":"+s+r+":"+u+l;return m},SetSessionTimeout:function(){var e=(this.readCookie("lead_session_expire"),new Date);e.setTime(e.getTime()+18e5),this.createCookie("lead_session_expire",!0,e)},storeReferralData:function(){var t=new Date,n=document.referrer||"Direct Traffic",i=e.Utils.readCookie("inbound_referral_site"),o=e.totalStorage("inbound_original_referral");t.setTime(t.getTime()+18e5),i||this.createCookie("inbound_referral_site",n,t),o||e.totalStorage("inbound_original_referral",o)},CreateUID:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var i=0;e>i;i++)n+=t[Math.floor(Math.random()*t.length)];return n},generateGUID:function(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,guid)},SetUID:function(e){if(!this.readCookie("wp_lead_uid")){var t=e||this.CreateUID(35);this.createCookie("wp_lead_uid",t)}},countProperties:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&++t;return t},mergeObjs:function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n},hasClass:function(e,t){var n;if("classList"in document.documentElement)var n=t.classList.contains(e);else var n=new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className);return n},addClass:function(e,t){"classList"in document.documentElement?t.classList.add(e):this.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(e,t){"classList"in document.documentElement?t.classList.remove(e):this.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)*"+e+"(\\s|$)*","g"),""))},removeElement:function(e){e.parentNode.removeChild(e)},trim:function(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")},ajaxPolyFill:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;for(var e,t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{e=new ActiveXObject(t[n]);break}catch(i){}return e},ajaxSendData:function(e,t,n,i){var o=this.ajaxPolyFill();setTimeout(function(){o.open(n,e,!0),o.onreadystatechange=function(){4==o.readyState&&t(o.responseText)},"POST"==n&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.send(i)},100)},ajaxGet:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e+"?"+o.join("&"),n,"GET",null,i)},ajaxPost:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e,n,"POST",o.join("&"),i)},sendEvent:function(e,t,i){t=t||{},async=!0;var a=getCookie();if(a){var r;for(r in a)t[r]=a[r]}t.id||(t.id=getId());var s={e:e,t:(new Date).toISOString(),kv:t},l=o.api_host+"/track?data="+encodeURIComponent(JSON.stringify(s));if(n){var u=new XMLHttpRequest;u.open("GET",l,async),u.withCredentials=async,u.send(null)}else{var d=document.createElement("script");d.type="text/javascript",d.async=async,d.defer=async,d.src=l;var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(d,c)}return action(i),self},domReady:function(e,t){var n=!1,i=!0,o=e.document,a=o.documentElement,r=o.addEventListener?"addEventListener":"attachEvent",s=o.addEventListener?"removeEventListener":"detachEvent",l=o.addEventListener?"":"on",u=function(i){("readystatechange"!=i.type||"complete"==o.readyState)&&(("load"==i.type?e:o)[s](l+i.type,u,!1),!n&&(n=!0)&&t.call(e,i.type||i))},d=function(){try{a.doScroll("left")}catch(e){return setTimeout(d,50),void 0}u("poll")};if("complete"==o.readyState)t.call(e,"lazy");else{if(o.createEventObject&&a.doScroll){try{i=!e.frameElement}catch(c){}i&&d()}o[r](l+"DOMContentLoaded",u,!1),o[r](l+"readystatechange",u,!1),e[r](l+"load",u,!1)}},addListener:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},throttle:function(e,t){var n,i,o,a=null,r=0,s=function(){r=new Date,a=null,o=e.apply(n,i)};return function(){var l=new Date;r||(r=l);var u=t-(l-r);return n=this,i=arguments,0>=u?(clearTimeout(a),a=null,r=l,o=e.apply(n,i)):a||(a=setTimeout(s,u)),o}},checkTypeofGA:function(){"function"==typeof ga&&(universalGA=!0),"undefined"!=typeof _gaq&&"function"==typeof _gaq.push&&(classicGA=!0),"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(googleTagManager=!0)}},e}(_inbound||{}),InboundForms=function(e){var t=!1,n=e.Utils,o=[],a=[],r=[],s=e.Settings,l=["first name","last name","name","email","e-mail","phone","website","job title","your favorite food","company","tele","address","comment"];if(e.Forms={init:function(){e.Forms.runFieldMappingFilters(),e.Forms.assignTrackClass(),e.Forms.formTrackInit()},runFieldMappingFilters:function(){l=e.hooks.applyFilters("forms.field_map",l)},debug:function(e,n){if(t&&console){var e=e||!1;e&&"string"==typeof e&&console.log(e),n&&n instanceof Function&&n()}},formTrackInit:function(){for(var e=0;e<window.document.forms.length;e++){var t=!1,n=window.document.forms[e];n.dataset.formProcessed||(n.dataset.formProcessed=!0,t=this.checkTrackStatus(n),t&&(this.attachFormSubmitEvent(n),this.initFormMapping(n)))}},checkTrackStatus:function(t){var n=t.getAttribute("class");return""!==n&&null!==n?n.toLowerCase().indexOf("wpl-track-me")>-1?!0:n.toLowerCase().indexOf("inbound-track")>-1?!0:(cb=function(){console.log(t)},e.deBugger("forms","This form not tracked. Please assign on in settings...",cb),!1):void 0},assignTrackClass:function(){if(window.inbound_settings){if(inbound_settings.inbound_track_include){var t=inbound_settings.inbound_track_include.split(","),n="add selectors "+inbound_settings.inbound_track_include;e.deBugger("forms",n),this.loopClassSelectors(t,"add")}if(inbound_settings.inbound_track_exclude){var t=inbound_settings.inbound_track_exclude.split(","),n="remove selectors "+inbound_settings.inbound_track_exclude;e.deBugger("forms",n),this.loopClassSelectors(t,"remove")}}},loopClassSelectors:function(t,i){for(var o=t.length-1;o>=0;o--){var a=n.trim(t[o]);-1===a.indexOf("#")&&-1===a.indexOf(".")&&(a="#"+a),a=document.querySelector(a),a&&("add"===i?(e.Utils.addClass("wpl-track-me",a),e.Utils.addClass("inbound-track",a)):(e.Utils.removeClass("wpl-track-me",a),e.Utils.removeClass("inbound-track",a)))}},initFormMapping:function(t){for(var n=[],i=0;i<t.elements.length;i++)formInput=t.elements[i],"hidden"!==formInput.type?(this.mapField(formInput),this.rememberInputValues(formInput),s.formAutoPopulation&&!e.Utils.hasClass("nopopulate",t)&&this.fillInputValues(formInput)):n.push(formInput);for(var o=n.length-1;o>=0;o--)formInput=n[o],this.mapField(formInput)},mapField:function(t){var a=t.id||!1,r=t.name||!1,s=this.getInputLabel(t);if(s){var u=this.ignoreFieldByLabel(s[0].innerText);if(u)return t.dataset.ignoreFormField=!0,!1}for(i=0;i<l.length;i++){var d=!1,c=l[i],m=n.trim(c),f=m.replace(/ /g,"_");r&&r.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching name attribute for -> "+m)):a&&a.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching ID attribute for ->"+m)):s?s[0].innerText.toLowerCase().indexOf(m)>-1&&(d=!0,e.deBugger("forms","Found matching sibling label for -> "+m)):o.push(m),d&&(this.addDataAttr(t,f),this.removeArrayItem(l,m),i--)}return inbound_data},formListener:function(t){t.preventDefault(),e.Forms.saveFormData(t.target),document.body.style.cursor="wait"},attachFormSubmitEvent:function(e){n.addListener(e,"submit",this.formListener);document.querySelector(".inbound-email")},ignoreFieldByLabel:function(t){var n=!1;return t?((-1!=t.toLowerCase().indexOf("credit card")||-1!=t.toLowerCase().indexOf("card number"))&&(n=!0),(-1!=t.toLowerCase().indexOf("expiration")||-1!=t.toLowerCase().indexOf("expiry"))&&(n=!0),("month"==t.toLowerCase()||"mm"==t.toLowerCase()||"yy"==t.toLowerCase()||"yyyy"==t.toLowerCase()||"year"==t.toLowerCase())&&(n=!0),(-1!=t.toLowerCase().indexOf("cvv")||-1!=t.toLowerCase().indexOf("cvc")||-1!=t.toLowerCase().indexOf("secure code")||-1!=t.toLowerCase().indexOf("security code"))&&(n=!0),n&&e.deBugger("forms","ignore "+t),n):!1},ignoreFieldByValue:function(e){var t=!1;if(!e)return!1;("visa"==e.toLowerCase()||"mastercard"==e.toLowerCase()||"american express"==e.toLowerCase()||"amex"==e.toLowerCase()||"discover"==e.toLowerCase())&&(t=!0);var n=new RegExp("/^[0-9]+$/");if(n.test(e)){var i=e.replace(" ","");this.isInt(i)&&i.length>=16&&(t=!0)}return t},isInt:function(e){return"number"==typeof e&&isFinite(e)&&e%1===0},releaseFormSubmit:function(e){document.body.style.cursor="default",n.removeClass("wpl-track-me",e),n.removeListener(e,"submit",this.formListener);var t=e.getAttribute("class");return""!==t&&null!==t&&-1!=t.toLowerCase().indexOf("wpcf7-form")?(setTimeout(function(){document.body.style.cursor="default"},300),!0):(e.submit(),setTimeout(function(){for(var t=0;t<e.elements.length;t++)formInput=e.elements[t],type=formInput.type||!1,"submit"===type&&"submit"===formInput.name&&e.elements[t].click()},2e3),void 0)},saveFormData:function(t){for(var i=i||{},o=0;o<t.elements.length;o++)if(formInput=t.elements[o],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("forms","ignore "+formInput.name);continue}switch(inputName=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),i[inputName]||(i[inputName]={}),formInput.type&&(i[inputName].type=formInput.type),i[inputName].name||(i[inputName].name=formInput.name),formInput.dataset.mapFormField&&(i[inputName].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(l=this.getInputValue(formInput),l===!1)continue;break;case"TEXTAREA":l=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var s=0;s<formInput.length;s++)formInput[s].selected&&values.push(encodeURIComponent(formInput[s].value))}else l=formInput.value}if(e.deBugger("forms","Input Value = "+l),l){i[inputName].value||(i[inputName].value=[]),i[inputName].value.push(multiple?values.join(","):encodeURIComponent(l));var l=multiple?values.join(","):encodeURIComponent(l)}}e.deBugger("forms",i);for(var u in i){var d=i[u].value,c=i[u].map;if("undefined"!=typeof d&&null!=d&&""!=d&&a.push(u+"="+i[u].value.join(",")),"undefined"!=typeof c&&null!=c&&i[u].value&&(r.push(c+"="+i[u].value.join(",")),"email"===u))var m=i[u].value.join(",")}var f=a.join("&");e.deBugger("forms","Stringified Raw Form PARAMS: "+f);var g=r.join("&");e.deBugger("forms","Stringified Mapped PARAMS"+g);var m=n.getParameterVal("email",g)||n.readCookie("wp_lead_email");m||(m=n.getParameterVal("wpleads_email_address",g));var p=n.getParameterVal("name",g),v=n.getParameterVal("first_name",g),h=n.getParameterVal("last_name",g);if(!h&&v){var _=decodeURI(v).split(" ");_.length>0&&(v=_[0],h=_[1])}if(p&&!h&&!v){var _=decodeURI(p).split(" ");_.length>0&&(v=_[0],h=_[1])}p=v&&h?v+" "+h:p,v||(v=""),h||(h=""),e.deBugger("forms","fName = "+v),e.deBugger("forms","lName = "+h),e.deBugger("forms","fullName = "+p);var b=e.totalStorage("page_views")||{},y=e.totalStorage("inbound_url_params")||{};if("undefined"!=typeof landing_path_info)var w=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)var w=cta_path_info.variation;else var w=inbound_settings.variation_id;var k=inbound_settings.post_type||"page",C=inbound_settings.post_id||0;search_data={},formData={action:"inbound_lead_store",email:m,full_name:p,first_name:v,last_name:h,raw_params:f,mapped_params:g,url_params:JSON.stringify(y),search_data:"test",page_views:JSON.stringify(b),post_type:k,page_id:C,variation:w,source:n.readCookie("inbound_referral_site")},callback=function(i){e.deBugger("forms","Lead Created with ID: "+i),i=parseInt(i,10),formData.leadID=i,i&&(n.createCookie("wp_lead_id",i),e.totalStorage.deleteItem("page_views"),e.totalStorage.deleteItem("tracking_events")),e.trigger("form_after_submission",formData),e.Forms.releaseFormSubmit(t)},e.trigger("form_before_submission",formData),n.ajaxPost(inbound_settings.admin_url,formData,callback)},rememberInputValues:function(t){var i=(t.name?"inbound_"+t.name:"",t.type?t.type:"text");return"submit"===i||"hidden"===i||"file"===i||"password"===i||t.dataset.ignoreFormField?!1:(n.addListener(t,"change",function(t){if(t.target.name){if("checkbox"!==i)var o=t.target.value;else for(var a=[],r=document.querySelectorAll('input[name="'+t.target.name+'"]'),s=0;s<r.length;s++){var l=r[s].checked;l&&a.push(r[s].value),o=a.join(",")}inputData={name:t.target.name,node:t.target.nodeName.toLowerCase(),type:i,value:o,mapping:t.target.dataset.mapFormField},e.trigger("form_input_change",inputData),n.createCookie("inbound_"+t.target.name,encodeURIComponent(o))}}),void 0)},fillInputValues:function(e){var t=e.name?"inbound_"+e.name:"",i=e.type?e.type:"text";if("submit"===i||"hidden"===i||"file"===i||"password"===i)return!1;if(n.readCookie(t)&&"comment"!=t)if(value=decodeURIComponent(n.readCookie(t)),"checkbox"===i||"radio"===i)for(var o=value.split(","),a=0;a<o.length;a++)e.value.indexOf(o[a])>-1&&(e.checked=!0);else"undefined"!==value&&(e.value=value)},getInputLabel:function(e){var t;return(t=this.siblingsIsLabel(e))?t:(t=this.CheckParentForLabel(e))?t:!1},getInputValue:function(e){var t=!1;switch(e.type){case"radio":case"checkbox":e.checked&&(t=e.value);break;case"text":case"hidden":default:t=e.value}return t},addDataAttr:function(e,t){for(var n=document.getElementsByName(e.name),i=n.length-1;i>=0;i--)e.dataset.mapFormField||(n[i].dataset.mapFormField=t)},removeArrayItem:function(e,t){if(e.indexOf)index=e.indexOf(t);else for(index=e.length-1;index>=0&&e[index]!==t;--index);index>=0&&e.splice(index,1)},siblingsIsLabel:function(e){for(var t=this.getSiblings(e),n=[],i=t.length-1;i>=0;i--)"label"===t[i].nodeName.toLowerCase()&&n.push(t[i]);return n.length>0&&n.length<2?n:!1},getChildren:function(e,t){for(var n=[];e;e=e.nextSibling)1==e.nodeType&&e!=t&&n.push(e);return n},getSiblings:function(e){return this.getChildren(e.parentNode.firstChild,e)},CheckParentForLabel:function(e){if("FORM"===e.nodeName)return null;do{var t=e.getElementsByTagName("label");if(t.length>0&&t.length<2)return e.getElementsByTagName("label")}while(e=e.parentNode);return null},mailCheck:function(){var e=document.querySelector(".inbound-email");e&&(n.addListener(e,"blur",this.mailCheck),u.run({email:document.querySelector(".inbound-email").value,suggested:function(t){var i=document.querySelector(".email_suggestion");i&&n.removeElement(i);var o=document.createElement("span");o.innerHTML="<span class=\"email_suggestion\">Did youu mean <b><i id='email_correction' style='cursor: pointer;' title=\"click to update\">"+t.full+"</b></i>?</span>",e.parentNode.insertBefore(o,e.nextSibling);var a=document.getElementById("email_correction");n.addListener(a,"click",function(){e.value=a.innerHTML,a.parentNode.parentNode.innerHTML="Fixed!"})},empty:function(){}}))}},"undefined"==typeof u)var u={domainThreshold:1,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca","de"],run:function(e){e.domains=e.domains||u.defaultDomains,e.topLevelDomains=e.topLevelDomains||u.defaultTopLevelDomains,e.distanceFunction=e.distanceFunction||u.sift3Distance;var t=function(e){return e},n=e.suggested||t,i=e.empty||t,o=u.suggest(u.encodeEmail(e.email),e.domains,e.topLevelDomains,e.distanceFunction);return o?n(o):i()},suggest:function(e,t,n,i){e=e.toLowerCase();var o=this.splitEmail(e),a=this.findClosestDomain(o.domain,t,i,this.domainThreshold);if(a){if(a!=o.domain)return{address:o.address,domain:a,full:o.address+"@"+a}}else{var r=this.findClosestDomain(o.topLevelDomain,n,i,this.topLevelThreshold);if(o.domain&&r&&r!=o.topLevelDomain){var s=o.domain;return a=s.substring(0,s.lastIndexOf(o.topLevelDomain))+r,{address:o.address,domain:a,full:o.address+"@"+a}}}return!1},findClosestDomain:function(e,t,n,i){i=i||this.topLevelThreshold;var o,a=99,r=null;if(!e||!t)return!1;n||(n=this.sift3Distance);for(var s=0;s<t.length;s++){if(e===t[s])return e;o=n(e,t[s]),a>o&&(a=o,r=t[s])}return i>=a&&null!==r?r:!1},sift3Distance:function(e,t){if(null===e||0===e.length)return null===t||0===t.length?0:t.length;if(null===t||0===t.length)return e.length;for(var n=0,i=0,o=0,a=0,r=5;n+i<e.length&&n+o<t.length;){if(e.charAt(n+i)==t.charAt(n+o))a++;else{i=0,o=0;for(var s=0;r>s;s++){if(n+s<e.length&&e.charAt(n+s)==t.charAt(n)){i=s;break}if(n+s<t.length&&e.charAt(n)==t.charAt(n+s)){o=s;break}}}n++}return(e.length+t.length)/2-a},splitEmail:function(e){var t=e.trim().split("@");if(t.length<2)return!1;for(var n=0;n<t.length;n++)if(""===t[n])return!1;var i=t.pop(),o=i.split("."),a="";if(0===o.length)return!1;if(1==o.length)a=o[0];else{for(var n=1;n<o.length;n++)a+=o[n]+".";o.length>=2&&(a=a.substring(0,a.length-1))}return{topLevelDomain:a,domain:i,address:t.join("@")}},encodeEmail:function(e){var t=encodeURI(e);return t=t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};return e}(_inbound||{}),_inboundEvents=function(e){function t(t,i,o){var i=i||{};o=o||{},o.bubbles=o.bubbles||!0,o.cancelable=o.cancelable||!0,i=e.apply_filters("filter_"+t,i);!window.ActiveXObject&&"ActiveXObject"in window;if("function"==typeof CustomEvent)var a=new CustomEvent(t,{detail:i,bubbles:o.bubbles,cancelable:o.cancelable});else{var a=document.createEvent("Event");a.initEvent(t,!0,!0)}window.dispatchEvent(a),e.do_action(t,i),n(t,i)}function n(e,t){if(window.jQuery){var t=t||{};jQuery(document).trigger(e,t)}}e.trigger=function(t,n){e.Events[t](n)};return e.Events={analytics_ready:function(){var e={opt1:!0},n={data:"xyxy"};t("analytics_ready",n,e)},url_parameters:function(e){t("url_parameters",e)},session_start:function(){console.log(""),t("session_start")},session_end:function(e){t("session_end",e),console.log("Session End")},session_active:function(){t("session_active")},session_idle:function(e){t("session_idle",e)},session_resume:function(){t("session_resume")},session_heartbeat:function(e){var n={clock:e,leadData:InboundLeadData};t("session_heartbeat",n)},page_visit:function(e){t("page_view",e)},page_first_visit:function(){t("page_first_visit"),e.deBugger("pages","First Ever Page View of this Page")},page_revisit:function(n){t("page_revisit",n);var i=function(){console.log("pageData",n),console.log("Page Revisit viewed "+n+" times")};e.deBugger("pages",status,i)},tab_hidden:function(){e.deBugger("pages","Tab Hidden"),t("tab_hidden")},tab_visible:function(){e.deBugger("pages","Tab Visible"),t("tab_visible")},tab_mouseout:function(){e.deBugger("pages","Tab Mouseout"),t("tab_mouseout")},form_input_change:function(n){var i=function(){console.log(n)};e.deBugger("forms","inputData change. Data=",i),t("form_input_change",n)},form_before_submission:function(e){t("form_before_submission",e)},form_after_submission:function(e){t("form_after_submission",e)},analyticsError:function(e,t,n){var i=new CustomEvent("inbound_analytics_error",{detail:{MLHttpRequest:e,textStatus:t,errorThrown:n}});window.dispatchEvent(i),console.log("Page Save Error")}},e}(_inbound||{}),InboundTotalStorage=function(e){var t,n,i="_inbound";if("localStorage"in window)try{n="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof n||"undefined"==typeof window.JSON?!1:!0,window.localStorage.setItem(i,"1"),window.localStorage.removeItem(i)}catch(o){t=!1}e.totalStorage=function(t,n){return e.totalStorage.impl.init(t,n)},e.totalStorage.setItem=function(t,n){return e.totalStorage.impl.setItem(t,n)},e.totalStorage.getItem=function(t){return e.totalStorage.impl.getItem(t)},e.totalStorage.getAll=function(){return e.totalStorage.impl.getAll()},e.totalStorage.deleteItem=function(t){return e.totalStorage.impl.deleteItem(t)},e.totalStorage.impl={init:function(e,t){return"undefined"!=typeof t?this.setItem(e,t):this.getItem(e)},setItem:function(i,o){if(!t)try{return e.Utils.createCookie(i,o),o}catch(a){console.log("Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie")}var r=JSON.stringify(o);return n.setItem(i,r),this.parseResult(r)},getItem:function(i){if(!t)try{return this.parseResult(e.Utils.readCookie(i))}catch(o){return null}var a=n.getItem(i);return this.parseResult(a)},deleteItem:function(i){if(!t)try{return e.Utils.eraseCookie(i,null),!0}catch(o){return!1}return n.removeItem(i),!0},getAll:function(){var i=[];if(t)for(var o in n)o.length&&i.push({key:o,value:this.parseResult(n.getItem(o))});else try{for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var s=a[r].split("="),l=s[0];i.push({key:l,value:this.parseResult(e.Utils.readCookie(l))})}}catch(u){return null}return i},parseResult:function(e){var t;try{t=JSON.parse(e),"undefined"==typeof t&&(t=e),"true"==t&&(t=!0),"false"==t&&(t=!1),parseFloat(t)==t&&"object"!=typeof t&&(t=parseFloat(t))}catch(n){t=e}return t}}}(_inbound||{}),_inboundLeadsAPI=function(e){return e.LeadsAPI={init:function(){var t=e.Utils,n=(t.readCookie("wp_lead_uid"),t.readCookie("wp_lead_id")),i=t.readCookie("lead_session_expire");i||(e.deBugger("leads","expired vistor. Run Processes"),n&&e.LeadsAPI.getAllLeadData())},setGlobalLeadData:function(e){InboundLeadData=e},getAllLeadData:function(){var t=e.Utils.readCookie("wp_lead_id"),n=e.totalStorage("inbound_lead_data"),i=e.Utils.readCookie("lead_data_expire");data={action:"inbound_get_all_lead_data",wp_lead_id:t},success=function(t){var n=JSON.parse(t);e.LeadsAPI.setGlobalLeadData(n),e.totalStorage("inbound_lead_data",n);var i=new Date;i.setTime(i.getTime()+18e5);var o=e.Utils.addDays(i,3);e.Utils.createCookie("lead_data_expire",!0,o)},n?(e.LeadsAPI.setGlobalLeadData(n),e.deBugger("lead","Set Global Lead Data from Localstorage"),i||(e.Utils.ajaxPost(inbound_settings.admin_url,data,success),e.deBugger("lead","localized data old. Pull new from DB"))):e.Utils.ajaxPost(inbound_settings.admin_url,data,success)},getLeadLists:function(){var t=e.Utils.readCookie("wp_lead_id"),n={action:"wpl_check_lists",wp_lead_id:t},i=function(){e.Utils.createCookie("lead_session_list_check",!0,{path:"/",expires:1}),e.deBugger("lead","Lists checked")};e.Utils.ajaxPost(inbound_settings.admin_url,n,i)}},e}(_inbound||{}),_inboundPageTracking=function(e){var t,n,i=!1,o=!1,a=!1,r=parseInt(e.Utils.readCookie("lead_session"),10)||0,s=0,l=(new Date,null),u=null,d=null,c=e.Utils,m=e.Utils.GetDate(),f="page_views",g=e.totalStorage(f)||{},p=inbound_settings.post_id||window.location.pathname,v=e.Settings.timeout||1e4;return e.PageTracking={init:function(i){return"page_views"!==f?!1:(this.CheckTimeOut(),i=i||{},t=parseInt(i.reportInterval,10)||10,n=parseInt(i.idleTimeout,10)||3,c.addListener(document,"keydown",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(document,"click",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(window,"mousemove",c.throttle(e.PageTracking.pingSession,1e3)),e.PageTracking.checkVisibility(),this.startSession(),void 0)},setIdle:function(t){var t=t||"No Movement",n="Session IDLE. Activity Timeout due to "+t;e.deBugger("pages",n),clearTimeout(e.PageTracking.idleTimer),e.PageTracking.stopClock(),e.trigger("session_idle")
|
3 |
},checkVisibility:function(){var t,n,i;"undefined"!=typeof document.hidden?(t="hidden",i="visibilitychange",n="visibilityState"):"undefined"!=typeof document.mozHidden?(t="mozHidden",i="mozvisibilitychange",n="mozVisibilityState"):"undefined"!=typeof document.msHidden?(t="msHidden",i="msvisibilitychange",n="msVisibilityState"):"undefined"!=typeof document.webkitHidden&&(t="webkitHidden",i="webkitvisibilitychange",n="webkitVisibilityState");var o=document[t];e.Utils.addListener(document,i,function(){o!=document[t]&&(document[t]?(e.trigger("tab_hidden"),e.PageTracking.setIdle("browser tab switch")):(e.trigger("tab_visible"),e.PageTracking.pingSession()),o=document[t])})},clock:function(){r+=1;var n=r/60,i="Total time spent on Page in this Session: "+n.toFixed(2)+" min";if(e.deBugger("pages",i),r>0&&r%t===0){var o=new Date;o.setTime(o.getTime()+18e5),c.createCookie("lead_session",r,o),e.trigger("session_heartbeat",r)}},inactiveClock:function(){s+=1;var t=(1800-s)/60,n="Time until Session Timeout: "+t.toFixed(2)+" min";e.deBugger("pages",n),s>1800&&(e.trigger("session_end",InboundLeadData),e.Utils.eraseCookie("lead_session"),s=0,clearTimeout(u))},stopClock:function(){o=!0,clearTimeout(l),clearTimeout(u),u=setInterval(e.PageTracking.inactiveClock,1e3)},restartClock:function(){o=!1,e.trigger("session_resume"),e.deBugger("pages","Activity resumed. Session Active"),clearTimeout(l),s=0,clearTimeout(u),l=setInterval(e.PageTracking.clock,1e3)},turnOff:function(){e.PageTracking.setIdle(),a=!0},turnOn:function(){a=!1},startSession:function(){new Date;i=!0,l=setInterval(e.PageTracking.clock,1e3);var t=c.readCookie("lead_session");if(t)e.trigger("session_active");else{e.trigger("session_start");var n=new Date;n.setTime(n.getTime()+18e5),e.Utils.createCookie("lead_session",1,n)}this.pingSession()},resetInactiveFunc:function(){s=0,clearTimeout(u)},pingSession:function(t){a||(i||e.PageTracking.startSession(),o&&e.PageTracking.restartClock(),clearTimeout(d),d=setTimeout(e.PageTracking.setIdle,1e3*n+100),"undefined"!=typeof t&&"mousemove"===t.type&&e.PageTracking.mouseEvents(t))},mouseEvents:function(t){t.pageY<=5&&e.trigger("tab_mouseout")},getPageViews:function(){var t=e.Utils.checkLocalStorage();if(t){var n=localStorage.getItem(f),i=JSON.parse(n);return i}},isRevisit:function(e){var t=!1,e=e||{},n=e[p];return"undefined"!=typeof n&&null!==n&&(t=!0),t},triggerPageView:function(t){var n={title:document.title,url:document.location.href,path:document.location.pathname,count:1};t?(g[p].push(m),n.count=g[p].length,e.trigger("page_revisit",n)):(g[p]=[],g[p].push(m),e.trigger("page_first_visit",n)),e.trigger("page_visit",n),e.totalStorage(f,g),this.storePageView()},CheckTimeOut:function(){var t,n,i=this.isRevisit(g);if(i){var o=g[p].length-1,a=g[p][o],r=Math.abs(new Date(a).getTime()-new Date(m).getTime());n=r>v,n?(t="Timeout Happened. Page view fired",this.triggerPageView(i)):(time_left=.001*Math.abs(v-r),t=v/1e3+" sec timeout not done: "+time_left+" seconds left")}else this.triggerPageView(i);e.deBugger("pages",t)},storePageView:function(){if("off"!=inbound_settings.page_tracking){var t=e.Utils.readCookie("wp_lead_id")?e.Utils.readCookie("wp_lead_id"):"",n=e.Utils.readCookie("wp_lead_uid")?e.Utils.readCookie("wp_lead_uid"):"",i={action:"inbound_track_lead",wp_lead_uid:n,wp_lead_id:t,page_id:inbound_settings.post_id,variation_id:inbound_settings.variation_id,post_type:inbound_settings.post_type,current_url:window.location.href,json:"0"},o=function(){};e.Utils.ajaxPost(inbound_settings.admin_url,i,o)}}},e}(_inbound||{});_inbound.init(),InboundLeadData=_inbound.totalStorage("inbound_lead_data")||null;
|
shared/assets/plugins/acf-field-date-time-picker/acf-date_time_picker.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Advanced Custom Fields: Date and Time Picker
|
4 |
+
Plugin URI: https://github.com/soderlind/acf-field-date-time-picker
|
5 |
+
Description: Date and Time Picker field for Advanced Custom Fields
|
6 |
+
Version: 2.0.18.1
|
7 |
+
Author: Per Soderlind
|
8 |
+
Author URI: http://soderlind.no
|
9 |
+
License: GPLv2 or later
|
10 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
Text Domain: acf-field-date-time-picker
|
12 |
+
Domain Path: /languages
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
class acf_field_date_time_picker_plugin
|
17 |
+
{
|
18 |
+
/*
|
19 |
+
* Construct
|
20 |
+
*
|
21 |
+
* @description:
|
22 |
+
* @since: 3.6
|
23 |
+
* @created: 1/04/13
|
24 |
+
*/
|
25 |
+
|
26 |
+
function __construct()
|
27 |
+
{
|
28 |
+
load_plugin_textdomain( 'acf-field-date-time-picker', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
29 |
+
|
30 |
+
// version 5+
|
31 |
+
add_action('acf/include_field_types', array($this, 'include_field_types'));
|
32 |
+
|
33 |
+
// version 4+
|
34 |
+
add_action('acf/register_fields', array($this, 'register_fields'));
|
35 |
+
|
36 |
+
|
37 |
+
// version 3-
|
38 |
+
add_action( 'init', array( $this, 'init' ));
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
/*
|
43 |
+
* Init
|
44 |
+
*
|
45 |
+
* @description:
|
46 |
+
* @since: 3.6
|
47 |
+
* @created: 1/04/13
|
48 |
+
*/
|
49 |
+
|
50 |
+
function init()
|
51 |
+
{
|
52 |
+
if(function_exists('register_field'))
|
53 |
+
{
|
54 |
+
register_field('acf_field_date_time_picker', dirname(__File__) . '/date_time_picker-v3.php');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/*
|
59 |
+
* register_fields
|
60 |
+
*
|
61 |
+
* @description:
|
62 |
+
* @since: 3.6
|
63 |
+
* @created: 1/04/13
|
64 |
+
*/
|
65 |
+
|
66 |
+
function register_fields()
|
67 |
+
{
|
68 |
+
include_once('date_time_picker-v4.php');
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
function include_field_types()
|
73 |
+
{
|
74 |
+
include_once('date_time_picker-v5.php');
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
new acf_field_date_time_picker_plugin();
|
80 |
+
|
81 |
+
?>
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_flat_0_aaaaaa_40x100.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_glass_95_fef1ec_1x400.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_222222_256x240.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_2e83ff_256x240.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_454545_256x240.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_888888_256x240.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/images/ui-icons_cd0a0a_256x240.png
ADDED
Binary file
|
shared/assets/plugins/acf-field-date-time-picker/css/input.css
ADDED
File without changes
|
shared/assets/plugins/acf-field-date-time-picker/css/jquery-ui-timepicker-addon.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
2 |
+
.ui-timepicker-div dl { text-align: left; }
|
3 |
+
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
|
4 |
+
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
|
5 |
+
.ui-timepicker-div td { font-size: 90%; }
|
6 |
+
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
7 |
+
|
8 |
+
.ui-timepicker-rtl{ direction: rtl; }
|
9 |
+
.ui-timepicker-rtl dl { text-align: right; }
|
10 |
+
.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }
|
11 |
+
.acf-ui-datepicker .ui-datepicker { display: none; }
|
shared/assets/plugins/acf-field-date-time-picker/css/jquery-ui.css
ADDED
@@ -0,0 +1,489 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework
|
3 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
4 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
5 |
+
*/
|
6 |
+
|
7 |
+
/* Layout helpers
|
8 |
+
----------------------------------*/
|
9 |
+
.ui-helper-hidden { display: none; }
|
10 |
+
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
11 |
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
12 |
+
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
13 |
+
.ui-helper-clearfix { display: inline-block; }
|
14 |
+
/* required comment for clearfix to work in Opera \*/
|
15 |
+
* html .ui-helper-clearfix { height:1%; }
|
16 |
+
.ui-helper-clearfix { display:block; }
|
17 |
+
/* end clearfix */
|
18 |
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
19 |
+
|
20 |
+
|
21 |
+
/* Interaction Cues
|
22 |
+
----------------------------------*/
|
23 |
+
.ui-state-disabled { cursor: default !important; }
|
24 |
+
|
25 |
+
|
26 |
+
/* Icons
|
27 |
+
----------------------------------*/
|
28 |
+
|
29 |
+
/* states and images */
|
30 |
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
31 |
+
|
32 |
+
|
33 |
+
/* Misc visuals
|
34 |
+
----------------------------------*/
|
35 |
+
|
36 |
+
/* Overlays */
|
37 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
38 |
+
|
39 |
+
|
40 |
+
/*
|
41 |
+
* jQuery UI CSS Framework
|
42 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
43 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
44 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
45 |
+
*/
|
46 |
+
|
47 |
+
|
48 |
+
/* Component containers
|
49 |
+
----------------------------------*/
|
50 |
+
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
51 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
52 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
53 |
+
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
54 |
+
.ui-widget-content a { color: #222222; }
|
55 |
+
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
56 |
+
.ui-widget-header a { color: #222222; }
|
57 |
+
|
58 |
+
/* Interaction states
|
59 |
+
----------------------------------*/
|
60 |
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
61 |
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
62 |
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
63 |
+
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
64 |
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
65 |
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
66 |
+
.ui-widget :active { outline: none; }
|
67 |
+
|
68 |
+
/* Interaction Cues
|
69 |
+
----------------------------------*/
|
70 |
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
71 |
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
72 |
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
73 |
+
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
74 |
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
75 |
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
76 |
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
77 |
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
78 |
+
|
79 |
+
/* Icons
|
80 |
+
----------------------------------*/
|
81 |
+
|
82 |
+
/* states and images */
|
83 |
+
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
84 |
+
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
85 |
+
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
86 |
+
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
|
87 |
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
88 |
+
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
89 |
+
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
|
90 |
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
|
91 |
+
|
92 |
+
/* positioning */
|
93 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
94 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
95 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
96 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
97 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
98 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
99 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
100 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
101 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
102 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
103 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
104 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
105 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
106 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
107 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
108 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
109 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
110 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
111 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
112 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
113 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
114 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
115 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
116 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
117 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
118 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
119 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
120 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
121 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
122 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
123 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
124 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
125 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
126 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
127 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
128 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
129 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
130 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
131 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
132 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
133 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
134 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
135 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
136 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
137 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
138 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
139 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
140 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
141 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
142 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
143 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
144 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
145 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
146 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
147 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
148 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
149 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
150 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
151 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
152 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
153 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
154 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
155 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
156 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
157 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
158 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
159 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
160 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
161 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
162 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
163 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
164 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
165 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
166 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
167 |
+
.ui-icon-document { background-position: -32px -96px; }
|
168 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
169 |
+
.ui-icon-note { background-position: -64px -96px; }
|
170 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
171 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
172 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
173 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
174 |
+
.ui-icon-person { background-position: -144px -96px; }
|
175 |
+
.ui-icon-print { background-position: -160px -96px; }
|
176 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
177 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
178 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
179 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
180 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
181 |
+
.ui-icon-home { background-position: 0 -112px; }
|
182 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
183 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
184 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
185 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
186 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
187 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
188 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
189 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
190 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
191 |
+
.ui-icon-search { background-position: -160px -112px; }
|
192 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
193 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
194 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
195 |
+
.ui-icon-star { background-position: -224px -112px; }
|
196 |
+
.ui-icon-link { background-position: -240px -112px; }
|
197 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
198 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
199 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
200 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
201 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
202 |
+
.ui-icon-close { background-position: -80px -128px; }
|
203 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
204 |
+
.ui-icon-key { background-position: -112px -128px; }
|
205 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
206 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
207 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
208 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
209 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
210 |
+
.ui-icon-image { background-position: -208px -128px; }
|
211 |
+
.ui-icon-video { background-position: -224px -128px; }
|
212 |
+
.ui-icon-script { background-position: -240px -128px; }
|
213 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
214 |
+
.ui-icon-info { background-position: -16px -144px; }
|
215 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
216 |
+
.ui-icon-help { background-position: -48px -144px; }
|
217 |
+
.ui-icon-check { background-position: -64px -144px; }
|
218 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
219 |
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
220 |
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
221 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
222 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
223 |
+
.ui-icon-play { background-position: 0 -160px; }
|
224 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
225 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
226 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
227 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
228 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
229 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
230 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
231 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
232 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
233 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
234 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
235 |
+
.ui-icon-power { background-position: 0 -176px; }
|
236 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
237 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
238 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
239 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
240 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
241 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
242 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
243 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
244 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
245 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
246 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
247 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
248 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
249 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
250 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
251 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
252 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
253 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
254 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
255 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
256 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
257 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
258 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
259 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
260 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
261 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
262 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
263 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
264 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
265 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
266 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
267 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
268 |
+
|
269 |
+
|
270 |
+
/* Misc visuals
|
271 |
+
----------------------------------*/
|
272 |
+
|
273 |
+
/* Corner radius */
|
274 |
+
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
275 |
+
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
276 |
+
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
277 |
+
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
278 |
+
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
279 |
+
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
280 |
+
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
281 |
+
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
282 |
+
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
|
283 |
+
|
284 |
+
/* Overlays */
|
285 |
+
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
286 |
+
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Resizable
|
287 |
+
----------------------------------*/
|
288 |
+
.ui-resizable { position: relative;}
|
289 |
+
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
|
290 |
+
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
291 |
+
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
292 |
+
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
293 |
+
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
294 |
+
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
295 |
+
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
296 |
+
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
297 |
+
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
298 |
+
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Selectable
|
299 |
+
----------------------------------*/
|
300 |
+
.ui-selectable-helper { border:1px dotted black }
|
301 |
+
/* Accordion
|
302 |
+
----------------------------------*/
|
303 |
+
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
304 |
+
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
305 |
+
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
306 |
+
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
307 |
+
/* IE7-/Win - Fix extra vertical space in lists */
|
308 |
+
.ui-accordion a { zoom: 1; }
|
309 |
+
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
310 |
+
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
311 |
+
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
312 |
+
.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete
|
313 |
+
----------------------------------*/
|
314 |
+
.ui-autocomplete { position: absolute; cursor: default; }
|
315 |
+
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
316 |
+
|
317 |
+
/* workarounds */
|
318 |
+
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
319 |
+
|
320 |
+
/* Menu
|
321 |
+
----------------------------------*/
|
322 |
+
.ui-menu {
|
323 |
+
list-style:none;
|
324 |
+
padding: 2px;
|
325 |
+
margin: 0;
|
326 |
+
display:block;
|
327 |
+
}
|
328 |
+
.ui-menu .ui-menu {
|
329 |
+
margin-top: -3px;
|
330 |
+
}
|
331 |
+
.ui-menu .ui-menu-item {
|
332 |
+
margin:0;
|
333 |
+
padding: 0;
|
334 |
+
zoom: 1;
|
335 |
+
float: left;
|
336 |
+
clear: left;
|
337 |
+
width: 100%;
|
338 |
+
}
|
339 |
+
.ui-menu .ui-menu-item a {
|
340 |
+
text-decoration:none;
|
341 |
+
display:block;
|
342 |
+
padding:.2em .4em;
|
343 |
+
line-height:1.5;
|
344 |
+
zoom:1;
|
345 |
+
}
|
346 |
+
.ui-menu .ui-menu-item a.ui-state-hover,
|
347 |
+
.ui-menu .ui-menu-item a.ui-state-active {
|
348 |
+
font-weight: normal;
|
349 |
+
margin: -1px;
|
350 |
+
}
|
351 |
+
/* Button
|
352 |
+
----------------------------------*/
|
353 |
+
|
354 |
+
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
355 |
+
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
356 |
+
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
357 |
+
.ui-button-icons-only { width: 3.4em; }
|
358 |
+
button.ui-button-icons-only { width: 3.7em; }
|
359 |
+
|
360 |
+
/*button text element */
|
361 |
+
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
362 |
+
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
363 |
+
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
364 |
+
.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
365 |
+
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
366 |
+
/* no icon support for input elements, provide padding by default */
|
367 |
+
input.ui-button { padding: .4em 1em; }
|
368 |
+
|
369 |
+
/*button icon element(s) */
|
370 |
+
.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
371 |
+
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
372 |
+
.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
373 |
+
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
374 |
+
|
375 |
+
/*button sets*/
|
376 |
+
.ui-buttonset { margin-right: 7px; }
|
377 |
+
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
378 |
+
|
379 |
+
/* workarounds */
|
380 |
+
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
381 |
+
|
382 |
+
|
383 |
+
|
384 |
+
|
385 |
+
|
386 |
+
/* Dialog
|
387 |
+
----------------------------------*/
|
388 |
+
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
389 |
+
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
|
390 |
+
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
|
391 |
+
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
392 |
+
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
393 |
+
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
394 |
+
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
395 |
+
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
396 |
+
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
|
397 |
+
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
398 |
+
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
399 |
+
/* Slider
|
400 |
+
----------------------------------*/
|
401 |
+
.ui-slider { position: relative; text-align: left; }
|
402 |
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
403 |
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
404 |
+
|
405 |
+
.ui-slider-horizontal { height: .8em; }
|
406 |
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
407 |
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
408 |
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
409 |
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
410 |
+
|
411 |
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
412 |
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
413 |
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
414 |
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
415 |
+
.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
|
416 |
+
----------------------------------*/
|
417 |
+
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
418 |
+
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
419 |
+
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
420 |
+
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
421 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
422 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
423 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
424 |
+
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
425 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
426 |
+
/* Datepicker
|
427 |
+
----------------------------------*/
|
428 |
+
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
|
429 |
+
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
430 |
+
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
431 |
+
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
432 |
+
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
433 |
+
.ui-datepicker .ui-datepicker-next { right:2px; }
|
434 |
+
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
435 |
+
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
436 |
+
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
437 |
+
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
438 |
+
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
439 |
+
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
440 |
+
.ui-datepicker select.ui-datepicker-month,
|
441 |
+
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
442 |
+
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
443 |
+
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
444 |
+
.ui-datepicker td { border: 0; padding: 1px; }
|
445 |
+
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
446 |
+
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
447 |
+
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
448 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
449 |
+
|
450 |
+
/* with multiple calendars */
|
451 |
+
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
452 |
+
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
453 |
+
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
454 |
+
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
455 |
+
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
456 |
+
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
457 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
458 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
459 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
460 |
+
.ui-datepicker-row-break { clear:both; width:100%; }
|
461 |
+
|
462 |
+
/* RTL support */
|
463 |
+
.ui-datepicker-rtl { direction: rtl; }
|
464 |
+
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
465 |
+
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
466 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
467 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
468 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
469 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
470 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
471 |
+
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
472 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
473 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
474 |
+
|
475 |
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
476 |
+
.ui-datepicker-cover {
|
477 |
+
display: none; /*sorry for IE5*/
|
478 |
+
display/**/: block; /*sorry for IE5*/
|
479 |
+
position: absolute; /*must have*/
|
480 |
+
z-index: -1; /*must have*/
|
481 |
+
filter: mask(); /*must have*/
|
482 |
+
top: -4px; /*must have*/
|
483 |
+
left: -4px; /*must have*/
|
484 |
+
width: 200px; /*must have*/
|
485 |
+
height: 200px; /*must have*/
|
486 |
+
}/* Progressbar
|
487 |
+
----------------------------------*/
|
488 |
+
.ui-progressbar { height:2em; text-align: left; }
|
489 |
+
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
shared/assets/plugins/acf-field-date-time-picker/css/timepicker.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* css for timepicker */
|
2 |
+
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
3 |
+
.ui-timepicker-div dl { text-align: left; }
|
4 |
+
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
|
5 |
+
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
|
6 |
+
.ui-timepicker-div td { font-size: 90%; }
|
7 |
+
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
shared/assets/plugins/acf-field-date-time-picker/date_time_picker-v3.php
ADDED
@@ -0,0 +1,503 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class acf_field_date_time_picker extends acf_Field {
|
4 |
+
|
5 |
+
// vars
|
6 |
+
var $settings // will hold info such as dir / path
|
7 |
+
, $defaults // will hold default field options
|
8 |
+
, $domain; // holds the language domain
|
9 |
+
|
10 |
+
|
11 |
+
/*--------------------------------------------------------------------------------------
|
12 |
+
*
|
13 |
+
* Constructor
|
14 |
+
* - This function is called when the field class is initalized on each page.
|
15 |
+
* - Here you can add filters / actions and setup any other functionality for your field
|
16 |
+
*
|
17 |
+
* @author Elliot Condon
|
18 |
+
* @since 2.2.0
|
19 |
+
*
|
20 |
+
*-------------------------------------------------------------------------------------*/
|
21 |
+
|
22 |
+
function __construct( $parent ) {
|
23 |
+
// do not delete!
|
24 |
+
parent::__construct( $parent );
|
25 |
+
|
26 |
+
// set name / title
|
27 |
+
$this->name = 'date_time_picker';
|
28 |
+
$this->title = __( 'Date and Time Picker' );
|
29 |
+
$this->domain = 'acf-field-date-time-picker';
|
30 |
+
$this->defaults = array(
|
31 |
+
'label' => __( 'Choose Time', $this->domain )
|
32 |
+
, 'time_format' => 'hh:mm'
|
33 |
+
, 'show_date' => 'true'
|
34 |
+
, 'date_format' => 'yy-mm-dd'
|
35 |
+
, 'show_week_number' => 'false'
|
36 |
+
, 'picker' => 'slider'
|
37 |
+
, 'save_as_timestamp' => 'true'
|
38 |
+
, 'get_as_timestamp' => 'false'
|
39 |
+
);
|
40 |
+
|
41 |
+
$this->settings = array(
|
42 |
+
'path' => $this->helpers_get_path( __FILE__ )
|
43 |
+
, 'dir' => $this->helpers_get_dir( __FILE__ )
|
44 |
+
, 'version' => '2.0.9'
|
45 |
+
);
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
/*
|
50 |
+
* helpers_get_path
|
51 |
+
*
|
52 |
+
* @description: calculates the path (works for plugin / theme folders)
|
53 |
+
* @since: 3.6
|
54 |
+
* @created: 30/01/13
|
55 |
+
*/
|
56 |
+
|
57 |
+
function helpers_get_path( $file ) {
|
58 |
+
return trailingslashit(dirname($file));
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
/*
|
64 |
+
* helpers_get_dir
|
65 |
+
*
|
66 |
+
* @description: calculates the directory (works for plugin / theme folders)
|
67 |
+
* @since: 3.6
|
68 |
+
* @created: 30/01/13
|
69 |
+
*/
|
70 |
+
|
71 |
+
function helpers_get_dir( $file ) {
|
72 |
+
$dir = trailingslashit(dirname($file));
|
73 |
+
$count = 0;
|
74 |
+
|
75 |
+
|
76 |
+
// sanitize for Win32 installs
|
77 |
+
$dir = str_replace('\\' ,'/', $dir);
|
78 |
+
|
79 |
+
|
80 |
+
// if file is in plugins folder
|
81 |
+
$wp_plugin_dir = str_replace('\\' ,'/', WP_PLUGIN_DIR);
|
82 |
+
$dir = str_replace($wp_plugin_dir, WP_PLUGIN_URL, $dir, $count);
|
83 |
+
|
84 |
+
|
85 |
+
if( $count < 1 )
|
86 |
+
{
|
87 |
+
// if file is in wp-content folder
|
88 |
+
$wp_content_dir = str_replace('\\' ,'/', WP_CONTENT_DIR);
|
89 |
+
$dir = str_replace($wp_content_dir, WP_CONTENT_URL, $dir, $count);
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
if( $count < 1 )
|
94 |
+
{
|
95 |
+
// if file is in ??? folder
|
96 |
+
$wp_dir = str_replace('\\' ,'/', ABSPATH);
|
97 |
+
$dir = str_replace($wp_dir, site_url('/'), $dir);
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
return $dir;
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
|
106 |
+
/*--------------------------------------------------------------------------------------
|
107 |
+
*
|
108 |
+
* create_options
|
109 |
+
* - this function is called from core/field_meta_box.php to create extra options
|
110 |
+
* for your field
|
111 |
+
*
|
112 |
+
* @params
|
113 |
+
* - $key (int) - the $_POST obejct key required to save the options to the field
|
114 |
+
* - $field (array) - the field object
|
115 |
+
*
|
116 |
+
* @author Elliot Condon
|
117 |
+
* @since 2.2.0
|
118 |
+
*
|
119 |
+
*-------------------------------------------------------------------------------------*/
|
120 |
+
|
121 |
+
function create_options( $key, $field ) {
|
122 |
+
|
123 |
+
|
124 |
+
$field = array_merge( $this->defaults, $field );
|
125 |
+
?>
|
126 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_choice">
|
127 |
+
<td class="label">
|
128 |
+
<label for=""><?php _e( "Date and Time Picker?", $this->domain ); ?></label>
|
129 |
+
</td>
|
130 |
+
<td>
|
131 |
+
<?php
|
132 |
+
$this->parent->create_field( array(
|
133 |
+
'type' => 'radio'
|
134 |
+
, 'name' => 'fields['.$key.'][show_date]'
|
135 |
+
, 'value' => $field['show_date']
|
136 |
+
, 'layout' => 'horizontal'
|
137 |
+
, 'choices' => array(
|
138 |
+
'true' => __( 'Date and Time Picker', $this->domain )
|
139 |
+
, 'false' => __( 'Time Picker', $this->domain )
|
140 |
+
)
|
141 |
+
) );
|
142 |
+
?>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_dateformat">
|
146 |
+
<td class="label">
|
147 |
+
<label><?php _e( "Date Format", $this->domain ); ?></label>
|
148 |
+
<p class="description"><?php _e( "eg. mm/dd/yy. read more about", $this->domain ); ?> <a href="http://docs.jquery.com/UI/Datepicker/formatDate">formatDate</a></p>
|
149 |
+
</td>
|
150 |
+
<td>
|
151 |
+
<?php
|
152 |
+
$this->parent->create_field( array(
|
153 |
+
'type' => 'text'
|
154 |
+
, 'name' => 'fields[' . $key . '][date_format]'
|
155 |
+
, 'value' => $field['date_format']
|
156 |
+
) );
|
157 |
+
?>
|
158 |
+
</td>
|
159 |
+
</tr>
|
160 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_timeformat">
|
161 |
+
<td class="label">
|
162 |
+
<label><?php _e( "Time Format", $this->domain );?></label>
|
163 |
+
<p class="description"><?php printf( __( "eg. hh:mm. read more about <a href=\"%s\" target=\"_blank\">formatting time</a>", $this->domain ), "http://trentrichardson.com/examples/timepicker/#tp-formatting" );?></p>
|
164 |
+
</td>
|
165 |
+
<td>
|
166 |
+
<?php
|
167 |
+
$this->parent->create_field( array(
|
168 |
+
'type' => 'text'
|
169 |
+
, 'name' => 'fields[' . $key . '][time_format]'
|
170 |
+
, 'value' => $field['time_format']
|
171 |
+
) );
|
172 |
+
?>
|
173 |
+
</td>
|
174 |
+
</tr>
|
175 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
176 |
+
<td class="label">
|
177 |
+
<label for=""><?php _e( "Display Week Number?", $this->domain ); ?></label>
|
178 |
+
</td>
|
179 |
+
<td>
|
180 |
+
<?php
|
181 |
+
$this->parent->create_field( array(
|
182 |
+
'type' => 'radio'
|
183 |
+
, 'name' => 'fields['.$key.'][show_week_number]'
|
184 |
+
, 'value' => $field['show_week_number']
|
185 |
+
, 'layout' => 'horizontal'
|
186 |
+
, 'choices' => array(
|
187 |
+
'true' => __( 'Yes', $this->domain )
|
188 |
+
, 'false' => __( 'No', $this->domain )
|
189 |
+
)
|
190 |
+
) );
|
191 |
+
?>
|
192 |
+
</td>
|
193 |
+
</tr>
|
194 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
195 |
+
<td class="label">
|
196 |
+
<label for=""><?php _e( "Time Picker Style?", $this->domain ); ?></label>
|
197 |
+
</td>
|
198 |
+
<td>
|
199 |
+
<?php
|
200 |
+
$this->parent->create_field( array(
|
201 |
+
'type' => 'radio'
|
202 |
+
, 'name' => 'fields['.$key.'][picker]'
|
203 |
+
, 'value' => $field['picker']
|
204 |
+
, 'layout' => 'horizontal'
|
205 |
+
, 'choices' => array(
|
206 |
+
'slider' => __( 'Slider', $this->domain )
|
207 |
+
, 'select' => __( 'Dropdown', $this->domain )
|
208 |
+
)
|
209 |
+
) );
|
210 |
+
?>
|
211 |
+
</td>
|
212 |
+
</tr>
|
213 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
214 |
+
<td class="label">
|
215 |
+
<label for=""><?php _e( "Save as timestamp?", $this->domain ); ?></label>
|
216 |
+
<p class="description"><?php printf( __( "Most users should leave this untouched, only set it to \"No\" if you need a date and time format not supported by <a href=\"%s\" target=\"_blank\">strtotime</a>", $this->domain ), "http://php.net/manual/en/function.strtotime.php" );?></p>
|
217 |
+
</td>
|
218 |
+
<td>
|
219 |
+
<?php
|
220 |
+
$this->parent->create_field( array(
|
221 |
+
'type' => 'radio'
|
222 |
+
, 'name' => 'fields['.$key.'][save_as_timestamp]'
|
223 |
+
, 'value' => $field['save_as_timestamp']
|
224 |
+
, 'layout' => 'horizontal'
|
225 |
+
, 'choices' => array(
|
226 |
+
'true' => __( 'Yes', $this->domain )
|
227 |
+
, 'false' => __( 'No', $this->domain )
|
228 |
+
)
|
229 |
+
) );
|
230 |
+
?>
|
231 |
+
</td>
|
232 |
+
</tr>
|
233 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
234 |
+
<td class="label">
|
235 |
+
<label for=""><?php _e( "Get field as a timestamp?", $this->domain ); ?></label>
|
236 |
+
<p class="description"><?php printf( __( "Most users should leave this untouched, only set it to \"Yes\" if you need get the date and time field as a timestamp using <a href=\"%s\" target=\"_blank\">the_field()</a> or <a href=\"%s\" target=\"_blank\">get_field()</a> ", $this->domain ), "http://www.advancedcustomfields.com/resources/functions/the_field/", "http://www.advancedcustomfields.com/resources/functions/get_field/" );?></p>
|
237 |
+
</td>
|
238 |
+
<td>
|
239 |
+
<?php
|
240 |
+
$this->parent->create_field( array(
|
241 |
+
'type' => 'radio'
|
242 |
+
, 'name' => 'fields['.$key.'][get_as_timestamp]'
|
243 |
+
, 'value' => $field['get_as_timestamp']
|
244 |
+
, 'layout' => 'horizontal'
|
245 |
+
, 'choices' => array(
|
246 |
+
'true' => __( 'Yes', $this->domain )
|
247 |
+
, 'false' => __( 'No', $this->domain )
|
248 |
+
)
|
249 |
+
) );
|
250 |
+
?>
|
251 |
+
</td>
|
252 |
+
</tr>
|
253 |
+
<?php
|
254 |
+
|
255 |
+
}
|
256 |
+
|
257 |
+
|
258 |
+
/*--------------------------------------------------------------------------------------
|
259 |
+
*
|
260 |
+
* create_field
|
261 |
+
* - this function is called on edit screens to produce the html for this field
|
262 |
+
*
|
263 |
+
* @author Elliot Condon
|
264 |
+
* @since 2.2.0
|
265 |
+
*
|
266 |
+
*-------------------------------------------------------------------------------------*/
|
267 |
+
|
268 |
+
function create_field( $field ) {
|
269 |
+
$field = array_merge( $this->defaults, $field );
|
270 |
+
|
271 |
+
if ( $field['show_date'] != 'true' ) {
|
272 |
+
echo '<input type="text" value="' . $field['value'] . '" name="' . $field['name'] . '" class="ps_timepicker" value="" data-picker="' . $field['picker'] . '" data-time_format="' . $field['time_format'] . '" title="' . $field['label'] . '" />';
|
273 |
+
} else {
|
274 |
+
echo '<input type="text" value="' . $field['value'] . '" name="' . $field['name'] . '" class="ps_timepicker" value="" data-picker="' . $field['picker'] . '" data-date_format="' . $field['date_format'] . '" data-time_format="' . $field['time_format'] . '" data-show_week_number="' . $field['show_week_number'] . '" title="' . $field['label'] . '" />';
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
|
279 |
+
/*--------------------------------------------------------------------------------------
|
280 |
+
*
|
281 |
+
* update_value
|
282 |
+
* - this function is called when saving a post object that your field is assigned to.
|
283 |
+
* the function will pass through the 3 parameters for you to use.
|
284 |
+
*
|
285 |
+
* @params
|
286 |
+
* - $post_id (int) - usefull if you need to save extra data or manipulate the current
|
287 |
+
* post object
|
288 |
+
* - $field (array) - usefull if you need to manipulate the $value based on a field option
|
289 |
+
* - $value (mixed) - the new value of your field.
|
290 |
+
*
|
291 |
+
* @author Elliot Condon
|
292 |
+
* @since 2.2.0
|
293 |
+
*
|
294 |
+
*-------------------------------------------------------------------------------------*/
|
295 |
+
|
296 |
+
function update_value($post_id, $field, $value) {
|
297 |
+
$field = array_merge($this->defaults, $field);
|
298 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true') {
|
299 |
+
if (preg_match('/^dd?\//',$field['date_format'] )) { //if start with dd/ or d/ (not supported by strtotime())
|
300 |
+
$value = str_replace('/', '-', $value);
|
301 |
+
}
|
302 |
+
$value = strtotime( $value );
|
303 |
+
}
|
304 |
+
|
305 |
+
parent::update_value($post_id, $field, $value);
|
306 |
+
}
|
307 |
+
|
308 |
+
|
309 |
+
/*--------------------------------------------------------------------------------------
|
310 |
+
*
|
311 |
+
* get_value
|
312 |
+
* - called from the edit page to get the value of your field. This function is useful
|
313 |
+
* if your field needs to collect extra data for your create_field() function.
|
314 |
+
*
|
315 |
+
* @params
|
316 |
+
* - $post_id (int) - the post ID which your value is attached to
|
317 |
+
* - $field (array) - the field object.
|
318 |
+
*
|
319 |
+
* @author Elliot Condon
|
320 |
+
* @since 2.2.0
|
321 |
+
*
|
322 |
+
*-------------------------------------------------------------------------------------*/
|
323 |
+
|
324 |
+
function get_value($post_id, $field){
|
325 |
+
$field = array_merge($this->defaults, $field);
|
326 |
+
$value = parent::get_value($post_id, $field);
|
327 |
+
|
328 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true' && $this->isValidTimeStamp($value)) {
|
329 |
+
if ( $field['show_date'] == 'true') {
|
330 |
+
$value = date(sprintf("%s %s",$this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $value);
|
331 |
+
} else {
|
332 |
+
$value = date(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $value);
|
333 |
+
}
|
334 |
+
}
|
335 |
+
|
336 |
+
return $value;
|
337 |
+
}
|
338 |
+
|
339 |
+
function get_value_for_api($post_id, $field){
|
340 |
+
$field = array_merge($this->defaults, $field);
|
341 |
+
$value = parent::get_value($post_id, $field);
|
342 |
+
|
343 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true' && $field['get_as_timestamp'] != 'true' && $this->isValidTimeStamp($value)) {
|
344 |
+
if ( $field['show_date'] == 'true') {
|
345 |
+
$value = date(sprintf("%s %s",$this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $value);
|
346 |
+
} else {
|
347 |
+
$value = date(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $value);
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
return $value;
|
352 |
+
}
|
353 |
+
|
354 |
+
function js_to_php_dateformat($date_format) {
|
355 |
+
$chars = array(
|
356 |
+
// Day
|
357 |
+
'dd' => 'd', 'd' => 'j', 'DD' => 'l', 'D' => 'D', 'o' => 'z',
|
358 |
+
// Month
|
359 |
+
'mm' => 'm', 'm' => 'n', 'MM' => 'F', 'M' => 'M',
|
360 |
+
// Year
|
361 |
+
'yy' => 'Y', 'y' => 'y',
|
362 |
+
);
|
363 |
+
|
364 |
+
return strtr((string)$date_format, $chars);
|
365 |
+
}
|
366 |
+
|
367 |
+
|
368 |
+
function js_to_php_timeformat($time_format) {
|
369 |
+
|
370 |
+
$chars = array(
|
371 |
+
//hour
|
372 |
+
'HH' => 'H', 'H' => 'G', 'hh' => 'h' , 'h' => 'g',
|
373 |
+
//minute
|
374 |
+
'mm' => 'i', 'm' => 'i',
|
375 |
+
//second
|
376 |
+
'ss' => 's', 's' => 's',
|
377 |
+
//am/pm
|
378 |
+
'TT' => 'A', 'T' => 'A', 'tt' => 'a', 't' => 'a'
|
379 |
+
);
|
380 |
+
|
381 |
+
return strtr((string)$time_format, $chars);
|
382 |
+
}
|
383 |
+
|
384 |
+
function isValidTimeStamp($timestamp) {
|
385 |
+
return ((string)(int)$timestamp === (string)$timestamp);
|
386 |
+
}
|
387 |
+
|
388 |
+
/*--------------------------------------------------------------------------------------
|
389 |
+
*
|
390 |
+
* admin_print_scripts / admin_print_styles
|
391 |
+
* - this function is called in the admin_print_scripts / admin_print_styles where
|
392 |
+
* your field is created. Use this function to register css and javascript to assist
|
393 |
+
* your create_field() function.
|
394 |
+
*
|
395 |
+
* @author Elliot Condon
|
396 |
+
* @since 3.0.0
|
397 |
+
*
|
398 |
+
*-------------------------------------------------------------------------------------*/
|
399 |
+
|
400 |
+
function admin_print_scripts() {
|
401 |
+
global $wp_locale;
|
402 |
+
|
403 |
+
$has_locale = false;
|
404 |
+
$js_locale = $this->get_js_locale(get_locale());
|
405 |
+
wp_enqueue_script( 'jquery-ui-timepicker', $this->settings['dir'] . 'js/jquery-ui-timepicker-addon.js', array(
|
406 |
+
'acf-datepicker',
|
407 |
+
'jquery-ui-slider'
|
408 |
+
), $this->settings['version'], true );
|
409 |
+
|
410 |
+
if ( file_exists( dirname( __FILE__ ) . '/js/localization/jquery-ui-timepicker-' . $js_locale . '.js' ) ) {
|
411 |
+
wp_enqueue_script( 'timepicker-localization', $this->settings['dir'] . 'js/localization/jquery-ui-timepicker-' . $js_locale . '.js', array(
|
412 |
+
'jquery-ui-timepicker'
|
413 |
+
), $this->settings['version'], true );
|
414 |
+
wp_enqueue_script( 'timepicker', $this->settings['dir'] . 'js/timepicker.js', array(
|
415 |
+
'timepicker-localization'
|
416 |
+
), $this->settings['version'], true );
|
417 |
+
$has_locale = true;
|
418 |
+
} else {
|
419 |
+
wp_enqueue_script( 'timepicker', $this->settings['dir'] . 'js/timepicker.js', array(
|
420 |
+
'jquery-ui-timepicker'
|
421 |
+
), $this->settings['version'], true );
|
422 |
+
}
|
423 |
+
|
424 |
+
if ( ! $has_locale && $js_locale != 'en' ) {
|
425 |
+
$timepicker_locale = array(
|
426 |
+
'closeText' => __( 'Done', $this->domain )
|
427 |
+
, 'currentText' => __( 'Today', $this->domain )
|
428 |
+
, 'prevText' => __( 'Prev', $this->domain )
|
429 |
+
, 'nextText' => __( 'Next', $this->domain )
|
430 |
+
, 'monthStatus' => __( 'Show a different month', $this->domain )
|
431 |
+
, 'weekHeader' => __( 'Wk', $this->domain )
|
432 |
+
, 'timeText' => __( "Time", $this->domain )
|
433 |
+
, 'hourText' => __( "Hour", $this->domain )
|
434 |
+
, 'minuteText' => __( "Minute", $this->domain )
|
435 |
+
, 'secondText' => __( "Second", $this->domain )
|
436 |
+
, 'millisecText' => __( "Millisecond", $this->domain )
|
437 |
+
, 'timezoneText' => __( "Time Zone", $this->domain )
|
438 |
+
, 'isRTL' => $wp_locale->is_rtl()
|
439 |
+
);
|
440 |
+
}
|
441 |
+
$timepicker_wp_locale = array(
|
442 |
+
'monthNames' => $this->strip_array_indices( $wp_locale->month )
|
443 |
+
, 'monthNamesShort' => $this->strip_array_indices( $wp_locale->month_abbrev )
|
444 |
+
, 'dayNames' => $this->strip_array_indices( $wp_locale->weekday )
|
445 |
+
, 'dayNamesShort' => $this->strip_array_indices( $wp_locale->weekday_abbrev )
|
446 |
+
, 'dayNamesMin' => $this->strip_array_indices( $wp_locale->weekday_initial )
|
447 |
+
, 'showMonthAfterYear' => false
|
448 |
+
, 'showWeek' => false
|
449 |
+
, 'firstDay' => get_option( 'start_of_week' )
|
450 |
+
);
|
451 |
+
|
452 |
+
$l10n = ( isset( $timepicker_locale ) ) ? array_merge( $timepicker_wp_locale, $timepicker_locale ) : $timepicker_wp_locale;
|
453 |
+
wp_localize_script( 'timepicker', 'timepicker_objectL10n', $l10n );
|
454 |
+
|
455 |
+
}
|
456 |
+
|
457 |
+
/**
|
458 |
+
* helper function, see: http://www.renegadetechconsulting.com/tutorials/jquery-datepicker-and-wordpress-i18n
|
459 |
+
* @param array $ArrayToStrip
|
460 |
+
* @return array
|
461 |
+
*/
|
462 |
+
function strip_array_indices( $ArrayToStrip ) {
|
463 |
+
foreach ( $ArrayToStrip as $objArrayItem ) {
|
464 |
+
$NewArray[] = $objArrayItem;
|
465 |
+
}
|
466 |
+
|
467 |
+
return $NewArray;
|
468 |
+
}
|
469 |
+
|
470 |
+
function get_js_locale($locale) {
|
471 |
+
$dir_path = $this->settings['path'] . 'js/localization/';
|
472 |
+
$exclude_list = array(".", "..");
|
473 |
+
$languages = $this->ps_preg_filter("/jquery-ui-timepicker-(.*?)\.js/","$1",array_diff(scandir($dir_path), $exclude_list));
|
474 |
+
|
475 |
+
$locale = strtolower(str_replace("_", "-", $locale));
|
476 |
+
|
477 |
+
if (false !== strpos($locale,'-')) {
|
478 |
+
$l = explode("-",$locale);
|
479 |
+
$pattern = array('/' . $locale . '/','/' . $l[0] . '/', '/' . $l[1] . '/');
|
480 |
+
} else {
|
481 |
+
$pattern = array('/' . $locale . '/');
|
482 |
+
}
|
483 |
+
$res = $this->ps_preg_filter($pattern,"$0",$languages,-1,$count);
|
484 |
+
|
485 |
+
return ($count) ? implode("", $res) : 'en';
|
486 |
+
}
|
487 |
+
|
488 |
+
|
489 |
+
function ps_preg_filter ($pattern, $replace, $subject,$limit = -1, &$count = 0) {
|
490 |
+
if (function_exists('preg_filter'))
|
491 |
+
return preg_filter($pattern, $replace, $subject,$limit,$count);
|
492 |
+
else
|
493 |
+
return array_diff(preg_replace($pattern, $replace, $subject,$limit,$count), $subject);
|
494 |
+
}
|
495 |
+
|
496 |
+
|
497 |
+
function admin_print_styles() {
|
498 |
+
wp_enqueue_style( 'jquery-style', $this->settings['dir'] . 'css/jquery-ui.css' );
|
499 |
+
wp_enqueue_style( 'timepicker', $this->settings['dir'] . 'css/jquery-ui-timepicker-addon.css', array(
|
500 |
+
'jquery-style'
|
501 |
+
), $this->settings['version'] );
|
502 |
+
}
|
503 |
+
}
|
shared/assets/plugins/acf-field-date-time-picker/date_time_picker-v4.php
ADDED
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class acf_field_date_time_picker extends acf_field
|
4 |
+
{
|
5 |
+
// vars
|
6 |
+
var $settings // will hold info such as dir / path
|
7 |
+
, $defaults // will hold default field options
|
8 |
+
, $domain // holds the language domain
|
9 |
+
, $lang;
|
10 |
+
|
11 |
+
/*
|
12 |
+
* __construct
|
13 |
+
*
|
14 |
+
* Set name / label needed for actions / filters
|
15 |
+
*
|
16 |
+
* @since 3.6
|
17 |
+
* @date 23/01/13
|
18 |
+
*/
|
19 |
+
|
20 |
+
function __construct()
|
21 |
+
{
|
22 |
+
// vars
|
23 |
+
$this->name = 'date_time_picker';
|
24 |
+
$this->label = __('Date and Time Picker');
|
25 |
+
$this->category = __("jQuery", $this->domain); // Basic, Content, Choice, etc
|
26 |
+
$this->domain = 'acf-field-date-time-picker';
|
27 |
+
$this->defaults = array(
|
28 |
+
'label' => __( 'Choose Time', $this->domain )
|
29 |
+
, 'time_format' => 'h:mm tt'
|
30 |
+
, 'show_date' => 'true'
|
31 |
+
, 'date_format' => 'm/d/y'
|
32 |
+
, 'show_week_number' => 'false'
|
33 |
+
, 'picker' => 'slider'
|
34 |
+
, 'save_as_timestamp' => 'true'
|
35 |
+
, 'get_as_timestamp' => 'false'
|
36 |
+
);
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
// do not delete!
|
41 |
+
parent::__construct();
|
42 |
+
|
43 |
+
|
44 |
+
// settings
|
45 |
+
$this->settings = array(
|
46 |
+
'path' => apply_filters('acf/helpers/get_path', __FILE__)
|
47 |
+
, 'dir' => apply_filters('acf/helpers/get_dir', __FILE__)
|
48 |
+
, 'version' => '2.0.9'
|
49 |
+
);
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
/*
|
55 |
+
* create_options()
|
56 |
+
*
|
57 |
+
* Create extra options for your field. This is rendered when editing a field.
|
58 |
+
* The value of $field['name'] can be used (like bellow) to save extra data to the $field
|
59 |
+
*
|
60 |
+
* @type action
|
61 |
+
* @since 3.6
|
62 |
+
* @date 23/01/13
|
63 |
+
*
|
64 |
+
* @param $field - an array holding all the field's data
|
65 |
+
*/
|
66 |
+
|
67 |
+
function create_options( $field )
|
68 |
+
{
|
69 |
+
$field = array_merge($this->defaults, $field);
|
70 |
+
$key = $field['name'];
|
71 |
+
?>
|
72 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_choice">
|
73 |
+
<td class="label">
|
74 |
+
<label for=""><?php _e( "Date and Time Picker?", $this->domain ); ?></label>
|
75 |
+
</td>
|
76 |
+
<td>
|
77 |
+
<?php
|
78 |
+
do_action('acf/create_field', array(
|
79 |
+
'type' => 'radio'
|
80 |
+
, 'name' => 'fields['.$key.'][show_date]'
|
81 |
+
, 'value' => $field['show_date']
|
82 |
+
, 'layout' => 'horizontal'
|
83 |
+
, 'choices' => array(
|
84 |
+
'true' => __( 'Date and Time Picker', $this->domain )
|
85 |
+
, 'false' => __( 'Time Picker', $this->domain )
|
86 |
+
)
|
87 |
+
) );
|
88 |
+
?>
|
89 |
+
</td>
|
90 |
+
</tr>
|
91 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_dateformat">
|
92 |
+
<td class="label">
|
93 |
+
<label><?php _e( "Date Format", $this->domain ); ?></label>
|
94 |
+
<p class="description"><?php printf(__("eg. mm/dd/yy. read more about <a href=\"%s\" target=\"_blank\">formatting date</a>", $this->domain ),"http://docs.jquery.com/UI/Datepicker/formatDate");?></p>
|
95 |
+
</td>
|
96 |
+
<td>
|
97 |
+
<?php
|
98 |
+
do_action('acf/create_field', array(
|
99 |
+
'type' => 'text'
|
100 |
+
, 'name' => 'fields[' . $key . '][date_format]'
|
101 |
+
, 'value' => $field['date_format']
|
102 |
+
) );
|
103 |
+
/*
|
104 |
+
do_action('acf/create_field', array(
|
105 |
+
'type' => 'select',
|
106 |
+
'name' => 'fields['.$key.'][date_format]',
|
107 |
+
'value' => $field['date_format'],
|
108 |
+
'choices' => array(
|
109 |
+
'm/d/y' => 'm/d/y (5/27/13)'
|
110 |
+
, 'mm/dd/yy' => 'mm/dd/yy (05/27/2013)'
|
111 |
+
, 'yy/mm/dd' => 'yy/mm/dd (2013/05/27)'
|
112 |
+
, 'yy-mm-dd' => 'yy-mm-dd (2013-05-27)'
|
113 |
+
, 'dd.mm.yy' => 'dd.mm.yy (27.05.2013)'
|
114 |
+
, 'dd-mm-yy' => 'dd-mm-yy (27-05-2013)'
|
115 |
+
, 'yy-M-dd' => 'yy-M-dd (2013-May-27)'
|
116 |
+
)
|
117 |
+
));
|
118 |
+
*/
|
119 |
+
?>
|
120 |
+
</td>
|
121 |
+
</tr>
|
122 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_timeformat">
|
123 |
+
<td class="label">
|
124 |
+
<label><?php _e( "Time Format", $this->domain );?></label>
|
125 |
+
<p class="description"><?php printf(__("eg. hh:mm. read more about <a href=\"%s\" target=\"_blank\">formatting time</a>", $this->domain ),"http://trentrichardson.com/examples/timepicker/#tp-formatting");?></p>
|
126 |
+
</td>
|
127 |
+
<td>
|
128 |
+
<?php
|
129 |
+
do_action('acf/create_field', array(
|
130 |
+
'type' => 'text'
|
131 |
+
, 'name' => 'fields[' . $key . '][time_format]'
|
132 |
+
, 'value' => $field['time_format']
|
133 |
+
) );
|
134 |
+
/*
|
135 |
+
do_action('acf/create_field', array(
|
136 |
+
'type' => 'select',
|
137 |
+
'name' => 'fields['.$key.'][time_format]',
|
138 |
+
'value' => $field['time_format'],
|
139 |
+
'choices' => array(
|
140 |
+
'h:mm tt' => 'h:mm tt (9:59 am)'
|
141 |
+
, 'hh:mm tt' => 'hh:mm tt (09:59 am)'
|
142 |
+
, 'H:mm' => 'H:mm (9:59)'
|
143 |
+
, 'HH:mm' => 'HH:mm (09:59)'
|
144 |
+
)
|
145 |
+
));
|
146 |
+
*/
|
147 |
+
?>
|
148 |
+
</td>
|
149 |
+
</tr>
|
150 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
151 |
+
<td class="label">
|
152 |
+
<label for=""><?php _e( "Display Week Number?", $this->domain ); ?></label>
|
153 |
+
</td>
|
154 |
+
<td>
|
155 |
+
<?php
|
156 |
+
do_action('acf/create_field', array(
|
157 |
+
'type' => 'radio'
|
158 |
+
, 'name' => 'fields['.$key.'][show_week_number]'
|
159 |
+
, 'value' => $field['show_week_number']
|
160 |
+
, 'layout' => 'horizontal'
|
161 |
+
, 'choices' => array(
|
162 |
+
'true' => __( 'Yes', $this->domain )
|
163 |
+
, 'false' => __( 'No', $this->domain )
|
164 |
+
)
|
165 |
+
) );
|
166 |
+
?>
|
167 |
+
</td>
|
168 |
+
</tr>
|
169 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
170 |
+
<td class="label">
|
171 |
+
<label for=""><?php _e( "Time Picker style?", $this->domain ); ?></label>
|
172 |
+
</td>
|
173 |
+
<td>
|
174 |
+
<?php
|
175 |
+
do_action('acf/create_field', array(
|
176 |
+
'type' => 'radio'
|
177 |
+
, 'name' => 'fields['.$key.'][picker]'
|
178 |
+
, 'value' => $field['picker']
|
179 |
+
, 'layout' => 'horizontal'
|
180 |
+
, 'choices' => array(
|
181 |
+
'slider' => __( 'Slider', $this->domain )
|
182 |
+
, 'select' => __( 'Dropdown', $this->domain )
|
183 |
+
)
|
184 |
+
) );
|
185 |
+
?>
|
186 |
+
</td>
|
187 |
+
</tr>
|
188 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
189 |
+
<td class="label">
|
190 |
+
<label for=""><?php _e( "Save as timestamp?", $this->domain ); ?></label>
|
191 |
+
<p class="description"><?php printf( __( "Most users should leave this untouched, only set it to \"No\" if you need a date and time format not supported by <a href=\"%s\" target=\"_blank\">strtotime</a>", $this->domain ), "http://php.net/manual/en/function.strtotime.php" );?></p>
|
192 |
+
</td>
|
193 |
+
<td>
|
194 |
+
<?php
|
195 |
+
do_action('acf/create_field', array(
|
196 |
+
'type' => 'radio'
|
197 |
+
, 'name' => 'fields['.$key.'][save_as_timestamp]'
|
198 |
+
, 'value' => $field['save_as_timestamp']
|
199 |
+
, 'layout' => 'horizontal'
|
200 |
+
, 'choices' => array(
|
201 |
+
'true' => __( 'Yes', $this->domain )
|
202 |
+
, 'false' => __( 'No', $this->domain )
|
203 |
+
)
|
204 |
+
) );
|
205 |
+
?>
|
206 |
+
</td>
|
207 |
+
</tr>
|
208 |
+
<tr class="field_option field_option_<?php echo $this->name; ?> timepicker_week_number">
|
209 |
+
<td class="label">
|
210 |
+
<label for=""><?php _e( "Get field as timestamp?", $this->domain ); ?></label>
|
211 |
+
<p class="description"><?php printf( __( "Most users should leave this untouched, only set it to \"Yes\" if you need get the date and time field as a timestamp using <a href=\"%s\" target=\"_blank\">the_field()</a> or <a href=\"%s\" target=\"_blank\">get_field()</a> ", $this->domain ), "http://www.advancedcustomfields.com/resources/functions/the_field/", "http://www.advancedcustomfields.com/resources/functions/get_field/" );?></p>
|
212 |
+
</td>
|
213 |
+
<td>
|
214 |
+
<?php
|
215 |
+
do_action('acf/create_field', array(
|
216 |
+
'type' => 'radio'
|
217 |
+
, 'name' => 'fields['.$key.'][get_as_timestamp]'
|
218 |
+
, 'value' => $field['get_as_timestamp']
|
219 |
+
, 'layout' => 'horizontal'
|
220 |
+
, 'choices' => array(
|
221 |
+
'true' => __( 'Yes', $this->domain )
|
222 |
+
, 'false' => __( 'No', $this->domain )
|
223 |
+
)
|
224 |
+
) );
|
225 |
+
?>
|
226 |
+
</td>
|
227 |
+
</tr>
|
228 |
+
<?php
|
229 |
+
}
|
230 |
+
|
231 |
+
|
232 |
+
|
233 |
+
/*
|
234 |
+
* create_field()
|
235 |
+
*
|
236 |
+
* Create the HTML interface for your field
|
237 |
+
*
|
238 |
+
* @param $field - an array holding all the field's data
|
239 |
+
*
|
240 |
+
* @type action
|
241 |
+
* @since 3.6
|
242 |
+
* @date 23/01/13
|
243 |
+
*/
|
244 |
+
|
245 |
+
function create_field( $field ) {
|
246 |
+
|
247 |
+
if ( $field['show_date'] !== 'true' ) {
|
248 |
+
echo '<input type="text" value="' . $field['value'] . '" name="' . $field['name'] . '" class="ps_timepicker" value="" data-picker="' . $field['picker'] . '" data-time_format="' . $field['time_format'] . '" title="' . $field['label'] . '" />';
|
249 |
+
} else {
|
250 |
+
echo '<input type="text" value="' . $field['value'] . '" name="' . $field['name'] . '" class="ps_timepicker" value="" data-picker="' . $field['picker'] . '" data-date_format="' . $field['date_format'] . '" data-time_format="' . $field['time_format'] . '" data-show_week_number="' . $field['show_week_number'] . '" title="' . $field['label'] . '" />';
|
251 |
+
}
|
252 |
+
}
|
253 |
+
|
254 |
+
//function load_field_defaults( $field ) { return $field; }
|
255 |
+
|
256 |
+
function format_value($value, $post_id, $field)
|
257 |
+
{
|
258 |
+
$field = array_merge($this->defaults, $field);
|
259 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true' && $this->isValidTimeStamp($value)) {
|
260 |
+
if ( $field['show_date'] == 'true') {
|
261 |
+
$value = date_i18n(sprintf("%s %s",$this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $value);
|
262 |
+
} else {
|
263 |
+
$value = date_i18n(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $value);
|
264 |
+
}
|
265 |
+
}
|
266 |
+
return $value;
|
267 |
+
}
|
268 |
+
|
269 |
+
function format_value_for_api($value, $post_id, $field)
|
270 |
+
{
|
271 |
+
$field = array_merge($this->defaults, $field);
|
272 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true' && $field['get_as_timestamp'] != 'true' && $this->isValidTimeStamp($value)) {
|
273 |
+
if ( $field['show_date'] == 'true') {
|
274 |
+
$value = date_i18n(sprintf("%s %s",$this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $value);
|
275 |
+
} else {
|
276 |
+
$value = date_i18n(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $value);
|
277 |
+
}
|
278 |
+
}
|
279 |
+
return $value;
|
280 |
+
}
|
281 |
+
|
282 |
+
|
283 |
+
function js_to_php_dateformat($date_format) {
|
284 |
+
$chars = array(
|
285 |
+
// Day
|
286 |
+
'dd' => 'd', 'd' => 'j', 'DD' => 'l','D' => 'D', 'o' => 'z',
|
287 |
+
// Month
|
288 |
+
'mm' => 'm', 'm' => 'n', 'MM' => 'F', 'M' => 'M',
|
289 |
+
// Year
|
290 |
+
'yy' => 'Y', 'y' => 'y',
|
291 |
+
);
|
292 |
+
|
293 |
+
return strtr((string)$date_format, $chars);
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
function js_to_php_timeformat($time_format) {
|
298 |
+
|
299 |
+
$chars = array(
|
300 |
+
//hour
|
301 |
+
'HH' => 'H', 'H' => 'G', 'hh' => 'h' , 'h' => 'g',
|
302 |
+
//minute
|
303 |
+
'mm' => 'i', 'm' => 'i',
|
304 |
+
//second
|
305 |
+
'ss' => 's', 's' => 's',
|
306 |
+
//am/pm
|
307 |
+
'TT' => 'A', 'T' => 'A', 'tt' => 'a', 't' => 'a'
|
308 |
+
);
|
309 |
+
|
310 |
+
return strtr((string)$time_format, $chars);
|
311 |
+
}
|
312 |
+
|
313 |
+
|
314 |
+
function isValidTimeStamp($timestamp) {
|
315 |
+
return ((string)(int)$timestamp === (string)$timestamp);
|
316 |
+
}
|
317 |
+
|
318 |
+
/*
|
319 |
+
* update_value()
|
320 |
+
*
|
321 |
+
* This filter is appied to the $value before it is updated in the db
|
322 |
+
*
|
323 |
+
* @type filter
|
324 |
+
* @since 3.6
|
325 |
+
* @date 23/01/13
|
326 |
+
*
|
327 |
+
* @param $value - the value which will be saved in the database
|
328 |
+
* @param $post_id - the $post_id of which the value will be saved
|
329 |
+
* @param $field - the field array holding all the field options
|
330 |
+
*
|
331 |
+
* @return $value - the modified value
|
332 |
+
*/
|
333 |
+
|
334 |
+
// function update_value( $value, $post_id, $field ) {
|
335 |
+
// $field = array_merge($this->defaults, $field);
|
336 |
+
// if ($value != '' && $field['save_as_timestamp'] == 'true') {
|
337 |
+
// $value = strtotime( $value );
|
338 |
+
// }
|
339 |
+
// return $value;
|
340 |
+
// }
|
341 |
+
|
342 |
+
function update_value( $value, $post_id, $field ) {
|
343 |
+
$field = array_merge($this->defaults, $field);
|
344 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true') {
|
345 |
+
if (preg_match('/^dd?\//',$field['date_format'] )) { //if start with dd/ or d/ (not supported by strtotime())
|
346 |
+
$value = str_replace('/', '-', $value);
|
347 |
+
}
|
348 |
+
$value = strtotime( $value );
|
349 |
+
}
|
350 |
+
|
351 |
+
return $value;
|
352 |
+
}
|
353 |
+
|
354 |
+
/*
|
355 |
+
* input_admin_enqueue_scripts()
|
356 |
+
*
|
357 |
+
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is created.
|
358 |
+
* Use this action to add css + javascript to assist your create_field() action.
|
359 |
+
*
|
360 |
+
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
|
361 |
+
* @type action
|
362 |
+
* @since 3.6
|
363 |
+
* @date 23/01/13
|
364 |
+
*/
|
365 |
+
|
366 |
+
function input_admin_enqueue_scripts() {
|
367 |
+
|
368 |
+
global $wp_locale;
|
369 |
+
|
370 |
+
$has_locale = false;
|
371 |
+
$js_locale = $this->get_js_locale(get_locale());
|
372 |
+
|
373 |
+
wp_enqueue_script( 'jquery-ui-timepicker', $this->settings['dir'] . 'js/jquery-ui-timepicker-addon.js', array(
|
374 |
+
'acf-input',
|
375 |
+
'jquery-ui-slider'
|
376 |
+
), $this->settings['version'], true );
|
377 |
+
|
378 |
+
if ( file_exists( $this->settings['path'] . '/js/localization/jquery-ui-timepicker-' . $js_locale . '.js' ) ) {
|
379 |
+
wp_enqueue_script( 'timepicker-localization', $this->settings['dir'] . 'js/localization/jquery-ui-timepicker-' . $js_locale . '.js', array(
|
380 |
+
'jquery-ui-timepicker'
|
381 |
+
), $this->settings['version'], true );
|
382 |
+
wp_enqueue_script( 'timepicker', $this->settings['dir'] . 'js/timepicker.js', array(
|
383 |
+
'timepicker-localization'
|
384 |
+
), $this->settings['version'], true );
|
385 |
+
$has_locale = true;
|
386 |
+
} else {
|
387 |
+
wp_enqueue_script( 'timepicker', $this->settings['dir'] . 'js/timepicker.js', array(
|
388 |
+
'jquery-ui-timepicker'
|
389 |
+
), $this->settings['version'], true );
|
390 |
+
}
|
391 |
+
|
392 |
+
if ( ! $has_locale && $js_locale != 'en' ) {
|
393 |
+
$timepicker_locale = array(
|
394 |
+
'closeText' => __( 'Done', $this->domain )
|
395 |
+
, 'currentText' => __( 'Today', $this->domain )
|
396 |
+
, 'prevText' => __( 'Prev', $this->domain )
|
397 |
+
, 'nextText' => __( 'Next', $this->domain )
|
398 |
+
, 'monthStatus' => __( 'Show a different month', $this->domain )
|
399 |
+
, 'weekHeader' => __( 'Wk', $this->domain )
|
400 |
+
, 'timeText' => __( "Time", $this->domain )
|
401 |
+
, 'hourText' => __( "Hour", $this->domain )
|
402 |
+
, 'minuteText' => __( "Minute", $this->domain )
|
403 |
+
, 'secondText' => __( "Second", $this->domain )
|
404 |
+
, 'millisecText' => __( "Millisecond", $this->domain )
|
405 |
+
, 'timezoneText' => __( "Time Zone", $this->domain )
|
406 |
+
, 'isRTL' => $wp_locale->is_rtl()
|
407 |
+
);
|
408 |
+
}
|
409 |
+
$timepicker_wp_locale = array(
|
410 |
+
'monthNames' => $this->strip_array_indices( $wp_locale->month )
|
411 |
+
, 'monthNamesShort' => $this->strip_array_indices( $wp_locale->month_abbrev )
|
412 |
+
, 'dayNames' => $this->strip_array_indices( $wp_locale->weekday )
|
413 |
+
, 'dayNamesShort' => $this->strip_array_indices( $wp_locale->weekday_abbrev )
|
414 |
+
, 'dayNamesMin' => $this->strip_array_indices( $wp_locale->weekday_initial )
|
415 |
+
, 'showMonthAfterYear' => false
|
416 |
+
, 'showWeek' => false
|
417 |
+
, 'firstDay' => get_option( 'start_of_week' )
|
418 |
+
);
|
419 |
+
|
420 |
+
$l10n = ( isset( $timepicker_locale ) ) ? array_merge( $timepicker_wp_locale, $timepicker_locale ) : $timepicker_wp_locale;
|
421 |
+
wp_localize_script( 'timepicker', 'timepicker_objectL10n', $l10n );
|
422 |
+
|
423 |
+
wp_enqueue_style('jquery-style', $this->settings['dir'] . 'css/jquery-ui.css',array(
|
424 |
+
'acf-datepicker'
|
425 |
+
),$this->settings['version']);
|
426 |
+
wp_enqueue_style('timepicker', $this->settings['dir'] . 'css/jquery-ui-timepicker-addon.css',array(
|
427 |
+
'jquery-style'
|
428 |
+
),$this->settings['version']);
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* helper function, see: http://www.renegadetechconsulting.com/tutorials/jquery-datepicker-and-wordpress-i18n
|
433 |
+
* @param array $ArrayToStrip
|
434 |
+
* @return array
|
435 |
+
*/
|
436 |
+
function strip_array_indices( $ArrayToStrip ) {
|
437 |
+
foreach ( $ArrayToStrip as $objArrayItem ) {
|
438 |
+
$NewArray[] = $objArrayItem;
|
439 |
+
}
|
440 |
+
|
441 |
+
return $NewArray;
|
442 |
+
}
|
443 |
+
|
444 |
+
function get_js_locale($locale) {
|
445 |
+
$dir_path = $this->settings['path'] . 'js/localization/';
|
446 |
+
$exclude_list = array(".", "..");
|
447 |
+
$languages = $this->ps_preg_filter("/jquery-ui-timepicker-(.*?)\.js/","$1",array_diff(scandir($dir_path), $exclude_list));
|
448 |
+
|
449 |
+
$locale = strtolower(str_replace("_", "-", $locale));
|
450 |
+
|
451 |
+
if (false !== strpos($locale,'-')) {
|
452 |
+
$l = explode("-",$locale);
|
453 |
+
$pattern = array('/' . $locale . '/','/' . $l[0] . '/', '/' . $l[1] . '/');
|
454 |
+
} else {
|
455 |
+
$pattern = array('/' . $locale . '/');
|
456 |
+
}
|
457 |
+
$res = $this->ps_preg_filter($pattern,"$0",$languages,-1,$count);
|
458 |
+
|
459 |
+
return ($count) ? implode("", $res) : 'en';
|
460 |
+
}
|
461 |
+
|
462 |
+
|
463 |
+
function ps_preg_filter ($pattern, $replace, $subject,$limit = -1, &$count = 0) {
|
464 |
+
if (function_exists('preg_filter'))
|
465 |
+
return preg_filter($pattern, $replace, $subject,$limit,$count);
|
466 |
+
else
|
467 |
+
return array_diff(preg_replace($pattern, $replace, $subject,$limit,$count), $subject);
|
468 |
+
}
|
469 |
+
|
470 |
+
|
471 |
+
}
|
472 |
+
|
473 |
+
|
474 |
+
// create field
|
475 |
+
new acf_field_date_time_picker();
|
476 |
+
|
477 |
+
?>
|
shared/assets/plugins/acf-field-date-time-picker/date_time_picker-v5.php
ADDED
@@ -0,0 +1,411 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class acf_field_date_time_picker extends acf_field
|
4 |
+
{
|
5 |
+
|
6 |
+
/*
|
7 |
+
* __construct
|
8 |
+
*
|
9 |
+
* Set name / label needed for actions / filters
|
10 |
+
*
|
11 |
+
* @since 3.6
|
12 |
+
* @date 23/01/13
|
13 |
+
*/
|
14 |
+
|
15 |
+
function __construct()
|
16 |
+
{
|
17 |
+
// vars
|
18 |
+
$this->name = 'date_time_picker';
|
19 |
+
$this->label = __('Date and Time Picker');
|
20 |
+
$this->domain = 'acf-field-date-time-picker';
|
21 |
+
$this->category = __("jQuery", $this->domain); // Basic, Content, Choice, etc
|
22 |
+
$this->defaults = array(
|
23 |
+
'label' => __( 'Choose Time', $this->domain )
|
24 |
+
, 'time_format' => 'h:mm tt'
|
25 |
+
, 'show_date' => 'true'
|
26 |
+
, 'date_format' => 'm/d/y'
|
27 |
+
, 'show_week_number' => 'false'
|
28 |
+
, 'picker' => 'slider'
|
29 |
+
, 'save_as_timestamp' => 'true'
|
30 |
+
, 'get_as_timestamp' => 'false'
|
31 |
+
);
|
32 |
+
|
33 |
+
$this->version = '2.0.15';
|
34 |
+
$this->dir = plugin_dir_url( __FILE__ );
|
35 |
+
$this->path = plugin_dir_path(__FILE__);
|
36 |
+
|
37 |
+
// do not delete!
|
38 |
+
parent::__construct();
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
/*
|
43 |
+
* create_options()
|
44 |
+
*
|
45 |
+
* Create extra options for your field. This is rendered when editing a field.
|
46 |
+
* The value of $field['name'] can be used (like bellow) to save extra data to the $field
|
47 |
+
*
|
48 |
+
* @type action
|
49 |
+
* @since 3.6
|
50 |
+
* @date 23/01/13
|
51 |
+
*
|
52 |
+
* @param $field - an array holding all the field's data
|
53 |
+
*/
|
54 |
+
|
55 |
+
function render_field_settings( $field )
|
56 |
+
{
|
57 |
+
$field = array_merge($this->defaults, $field);
|
58 |
+
$key = $field['name'];
|
59 |
+
|
60 |
+
acf_render_field_setting( $field, array(
|
61 |
+
'type' => 'radio'
|
62 |
+
, 'label' => __( "Date and Time Picker?", $this->domain)
|
63 |
+
, 'name' => 'show_date'
|
64 |
+
, 'value' => $field['show_date']
|
65 |
+
, 'layout' => 'horizontal'
|
66 |
+
, 'choices' => array(
|
67 |
+
'true' => __( 'Date and Time Picker', $this->domain )
|
68 |
+
, 'false' => __( 'Time Picker', $this->domain )
|
69 |
+
)
|
70 |
+
) );
|
71 |
+
|
72 |
+
acf_render_field_setting( $field, array(
|
73 |
+
'type' => 'text'
|
74 |
+
, 'label' => __( "Date Format", $this->domain )
|
75 |
+
, 'instructions' => sprintf(__("eg. mm/dd/yy. read more about <a href=\"%s\" target=\"_blank\">formatting date</a>", $this->domain ),"http://docs.jquery.com/UI/Datepicker/formatDate")
|
76 |
+
, 'name' => 'date_format'
|
77 |
+
, 'value' => $field['date_format']
|
78 |
+
) );
|
79 |
+
|
80 |
+
acf_render_field_setting( $field, array(
|
81 |
+
'type' => 'text'
|
82 |
+
, 'label' => __( "Time Format", $this->domain )
|
83 |
+
, 'instructions' => sprintf(__("eg. hh:mm. read more about <a href=\"%s\" target=\"_blank\">formatting time</a>", $this->domain ),"http://trentrichardson.com/examples/timepicker/#tp-formatting")
|
84 |
+
, 'name' => 'time_format'
|
85 |
+
, 'value' => $field['time_format']
|
86 |
+
) );
|
87 |
+
|
88 |
+
acf_render_field_setting( $field, array(
|
89 |
+
'type' => 'radio'
|
90 |
+
, 'label' => __( "Display Week Number?", $this->domain )
|
91 |
+
, 'name' => 'show_week_number'
|
92 |
+
, 'value' => $field['show_week_number']
|
93 |
+
, 'layout' => 'horizontal'
|
94 |
+
, 'choices' => array(
|
95 |
+
'true' => __( 'Yes', $this->domain )
|
96 |
+
, 'false' => __( 'No', $this->domain )
|
97 |
+
)
|
98 |
+
) );
|
99 |
+
|
100 |
+
acf_render_field_setting( $field, array(
|
101 |
+
'type' => 'radio'
|
102 |
+
, 'label' => __( "Time Picker style?", $this->domain )
|
103 |
+
, 'name' => 'picker'
|
104 |
+
, 'value' => $field['picker']
|
105 |
+
, 'layout' => 'horizontal'
|
106 |
+
, 'choices' => array(
|
107 |
+
'slider' => __( 'Slider', $this->domain )
|
108 |
+
, 'select' => __( 'Dropdown', $this->domain )
|
109 |
+
)
|
110 |
+
) );
|
111 |
+
|
112 |
+
acf_render_field_setting( $field, array(
|
113 |
+
'type' => 'radio'
|
114 |
+
, 'label' => __( "Save as timestamp?", $this->domain )
|
115 |
+
, 'instructions' => sprintf( __( "Most users should leave this untouched, only set it to \"No\" if you need a date and time format not supported by <a href=\"%s\" target=\"_blank\">strtotime</a>", $this->domain ), "http://php.net/manual/en/function.strtotime.php" )
|
116 |
+
, 'name' => 'save_as_timestamp'
|
117 |
+
, 'value' => $field['save_as_timestamp']
|
118 |
+
, 'layout' => 'horizontal'
|
119 |
+
, 'choices' => array(
|
120 |
+
'true' => __( 'Yes', $this->domain )
|
121 |
+
, 'false' => __( 'No', $this->domain )
|
122 |
+
)
|
123 |
+
) );
|
124 |
+
|
125 |
+
acf_render_field_setting( $field, array(
|
126 |
+
'type' => 'radio'
|
127 |
+
, 'label' => __( "Get field as timestamp?", $this->domain )
|
128 |
+
, 'instructions' => sprintf( __( "Most users should leave this untouched, only set it to \"Yes\" if you need get the date and time field as a timestamp using <a href=\"%s\" target=\"_blank\">the_field()</a> or <a href=\"%s\" target=\"_blank\">get_field()</a> ", $this->domain ), "http://www.advancedcustomfields.com/resources/functions/the_field/", "http://www.advancedcustomfields.com/resources/functions/get_field/" )
|
129 |
+
, 'name' => 'get_as_timestamp'
|
130 |
+
, 'value' => $field['get_as_timestamp']
|
131 |
+
, 'layout' => 'horizontal'
|
132 |
+
, 'choices' => array(
|
133 |
+
'true' => __( 'Yes', $this->domain )
|
134 |
+
, 'false' => __( 'No', $this->domain )
|
135 |
+
)
|
136 |
+
) );
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
|
141 |
+
/*
|
142 |
+
* create_field()
|
143 |
+
*
|
144 |
+
* Create the HTML interface for your field
|
145 |
+
*
|
146 |
+
* @param $field - an array holding all the field's data
|
147 |
+
*
|
148 |
+
* @type action
|
149 |
+
* @since 3.6
|
150 |
+
* @date 23/01/13
|
151 |
+
*/
|
152 |
+
|
153 |
+
function render_field( $field ) {
|
154 |
+
|
155 |
+
if ( $field['show_date'] !== 'true' ) {
|
156 |
+
$value = $field['save_as_timestamp'] && $this->isValidTimeStamp($field['value']) ? date_i18n(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $field['value']) : $field['value'];
|
157 |
+
echo '<input type="text" value="' . $value . '" name="' . $field['name'] . '" class="ps_timepicker" value="" data-picker="' . $field['picker'] . '" data-time_format="' . $field['time_format'] . '" title="' . $field['label'] . '" />';
|
158 |
+
} else {
|
159 |
+
$value = $field['save_as_timestamp'] && $this->isValidTimeStamp($field['value']) ? $value = date_i18n(sprintf("%s %s", $this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $field['value']) : $field['value'];
|
160 |
+
echo '<input type="text" value="' . $value . '" name="' . $field['name'] . '" class="ps_timepicker" value="" data-picker="' . $field['picker'] . '" data-date_format="' . $field['date_format'] . '" data-time_format="' . $field['time_format'] . '" data-show_week_number="' . $field['show_week_number'] . '" title="' . $field['label'] . '" />';
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
function format_value($value, $post_id, $field)
|
165 |
+
{
|
166 |
+
$field = array_merge($this->defaults, $field);
|
167 |
+
|
168 |
+
/*if ($value != '' && $field['save_as_timestamp'] == 'true' && $this->isValidTimeStamp($value)) {
|
169 |
+
if ( $field['show_date'] == 'true') {
|
170 |
+
$value = date_i18n(sprintf("%s %s",$this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $value);
|
171 |
+
} else {
|
172 |
+
$value = date_i18n(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $value);
|
173 |
+
}
|
174 |
+
}*/
|
175 |
+
|
176 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true' && $field['get_as_timestamp'] != 'true' && $this->isValidTimeStamp($value)) {
|
177 |
+
if ( $field['show_date'] == 'true') {
|
178 |
+
$value = date_i18n(sprintf("%s %s",$this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $value);
|
179 |
+
} else {
|
180 |
+
$value = date_i18n(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $value);
|
181 |
+
}
|
182 |
+
}
|
183 |
+
return $value;
|
184 |
+
}
|
185 |
+
|
186 |
+
|
187 |
+
function js_to_php_dateformat($date_format) {
|
188 |
+
$chars = array(
|
189 |
+
// Day
|
190 |
+
'dd' => 'd', 'd' => 'j', 'DD' => 'l','D' => 'D', 'o' => 'z',
|
191 |
+
// Month
|
192 |
+
'mm' => 'm', 'm' => 'n', 'MM' => 'F', 'M' => 'M',
|
193 |
+
// Year
|
194 |
+
'yy' => 'Y', 'y' => 'y',
|
195 |
+
);
|
196 |
+
|
197 |
+
return strtr((string)$date_format, $chars);
|
198 |
+
}
|
199 |
+
|
200 |
+
|
201 |
+
function js_to_php_timeformat($time_format) {
|
202 |
+
|
203 |
+
$chars = array(
|
204 |
+
//hour
|
205 |
+
'HH' => 'H', 'H' => 'G', 'hh' => 'h' , 'h' => 'g',
|
206 |
+
//minute
|
207 |
+
'mm' => 'i', 'm' => 'i',
|
208 |
+
//second
|
209 |
+
'ss' => 's', 's' => 's',
|
210 |
+
//am/pm
|
211 |
+
'TT' => 'A', 'T' => 'A', 'tt' => 'a', 't' => 'a'
|
212 |
+
);
|
213 |
+
|
214 |
+
return strtr((string)$time_format, $chars);
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
function isValidTimeStamp($timestamp) {
|
219 |
+
return ((string)(int)$timestamp === (string)$timestamp);
|
220 |
+
}
|
221 |
+
|
222 |
+
/*
|
223 |
+
* load_value()
|
224 |
+
*
|
225 |
+
* This filter is applied to the $value after it is loaded from the db
|
226 |
+
*
|
227 |
+
* @type filter
|
228 |
+
* @since 3.6
|
229 |
+
* @date 23/01/13
|
230 |
+
*
|
231 |
+
* @param $value (mixed) the value found in the database
|
232 |
+
* @param $post_id (mixed) the $post_id from which the value was loaded
|
233 |
+
* @param $field (array) the field array holding all the field options
|
234 |
+
* @return $value
|
235 |
+
*/
|
236 |
+
function load_value( $value, $post_id, $field ) {
|
237 |
+
|
238 |
+
$field = array_merge($this->defaults, $field);
|
239 |
+
|
240 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true' && $field['get_as_timestamp'] != 'true' && $this->isValidTimeStamp($value)) {
|
241 |
+
if ( $field['show_date'] == 'true') {
|
242 |
+
$value = date_i18n(sprintf("%s %s",$this->js_to_php_dateformat($field['date_format']),$this->js_to_php_timeformat($field['time_format'])), $value);
|
243 |
+
} else {
|
244 |
+
$value = date_i18n(sprintf("%s",$this->js_to_php_timeformat($field['time_format'])), $value);
|
245 |
+
}
|
246 |
+
}
|
247 |
+
return $value;
|
248 |
+
|
249 |
+
}
|
250 |
+
|
251 |
+
/*
|
252 |
+
* update_value()
|
253 |
+
*
|
254 |
+
* This filter is appied to the $value before it is updated in the db
|
255 |
+
*
|
256 |
+
* @type filter
|
257 |
+
* @since 3.6
|
258 |
+
* @date 23/01/13
|
259 |
+
*
|
260 |
+
* @param $value - the value which will be saved in the database
|
261 |
+
* @param $post_id - the $post_id of which the value will be saved
|
262 |
+
* @param $field - the field array holding all the field options
|
263 |
+
*
|
264 |
+
* @return $value - the modified value
|
265 |
+
*/
|
266 |
+
|
267 |
+
// function update_value( $value, $post_id, $field ) {
|
268 |
+
// $field = array_merge($this->defaults, $field);
|
269 |
+
// if ($value != '' && $field['save_as_timestamp'] == 'true') {
|
270 |
+
// $value = strtotime( $value );
|
271 |
+
// }
|
272 |
+
// return $value;
|
273 |
+
// }
|
274 |
+
|
275 |
+
function update_value( $value, $post_id, $field ) {
|
276 |
+
$field = array_merge($this->defaults, $field);
|
277 |
+
if ($value != '' && $field['save_as_timestamp'] == 'true') {
|
278 |
+
if (preg_match('/^dd?\//',$field['date_format'] )) { //if start with dd/ or d/ (not supported by strtotime())
|
279 |
+
$value = str_replace('/', '-', $value);
|
280 |
+
}
|
281 |
+
$value = strtotime( $value );
|
282 |
+
}
|
283 |
+
|
284 |
+
return $value;
|
285 |
+
}
|
286 |
+
|
287 |
+
/*
|
288 |
+
* input_admin_enqueue_scripts()
|
289 |
+
*
|
290 |
+
* This action is called in the admin_enqueue_scripts action on the edit screen where your field is created.
|
291 |
+
* Use this action to add css + javascript to assist your create_field() action.
|
292 |
+
*
|
293 |
+
* $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
|
294 |
+
* @type action
|
295 |
+
* @since 3.6
|
296 |
+
* @date 23/01/13
|
297 |
+
*/
|
298 |
+
|
299 |
+
function input_admin_enqueue_scripts() {
|
300 |
+
|
301 |
+
global $wp_locale;
|
302 |
+
|
303 |
+
|
304 |
+
$has_locale = false;
|
305 |
+
$js_locale = $this->get_js_locale(get_locale());
|
306 |
+
|
307 |
+
wp_enqueue_script( 'jquery-ui-timepicker', $this->dir . 'js/jquery-ui-timepicker-addon.js', array(
|
308 |
+
'acf-input',
|
309 |
+
'jquery-ui-slider'
|
310 |
+
), $this->version, true );
|
311 |
+
|
312 |
+
if ( file_exists( $this->path . 'js/localization/jquery-ui-timepicker-' . $js_locale . '.js' ) ) {
|
313 |
+
wp_enqueue_script( 'timepicker-localization', $this->dir . 'js/localization/jquery-ui-timepicker-' . $js_locale . '.js', array(
|
314 |
+
'jquery-ui-timepicker'
|
315 |
+
), $this->version, true );
|
316 |
+
wp_enqueue_script( 'timepicker', $this->dir . 'js/timepicker.js', array(
|
317 |
+
'timepicker-localization'
|
318 |
+
), $this->version, true );
|
319 |
+
$has_locale = true;
|
320 |
+
} else {
|
321 |
+
wp_enqueue_script( 'timepicker', $this->dir . 'js/timepicker.js', array(
|
322 |
+
'jquery-ui-timepicker'
|
323 |
+
), $this->version, true );
|
324 |
+
}
|
325 |
+
|
326 |
+
if ( ! $has_locale && $js_locale != 'en' ) {
|
327 |
+
$timepicker_locale = array(
|
328 |
+
'closeText' => __( 'Done', $this->domain )
|
329 |
+
, 'currentText' => __( 'Today', $this->domain )
|
330 |
+
, 'prevText' => __( 'Prev', $this->domain )
|
331 |
+
, 'nextText' => __( 'Next', $this->domain )
|
332 |
+
, 'monthStatus' => __( 'Show a different month', $this->domain )
|
333 |
+
, 'weekHeader' => __( 'Wk', $this->domain )
|
334 |
+
, 'timeText' => __( "Time", $this->domain )
|
335 |
+
, 'hourText' => __( "Hour", $this->domain )
|
336 |
+
, 'minuteText' => __( "Minute", $this->domain )
|
337 |
+
, 'secondText' => __( "Second", $this->domain )
|
338 |
+
, 'millisecText' => __( "Millisecond", $this->domain )
|
339 |
+
, 'timezoneText' => __( "Time Zone", $this->domain )
|
340 |
+
, 'isRTL' => $wp_locale->is_rtl()
|
341 |
+
);
|
342 |
+
}
|
343 |
+
$timepicker_wp_locale = array(
|
344 |
+
'monthNames' => $this->strip_array_indices( $wp_locale->month )
|
345 |
+
, 'monthNamesShort' => $this->strip_array_indices( $wp_locale->month_abbrev )
|
346 |
+
, 'dayNames' => $this->strip_array_indices( $wp_locale->weekday )
|
347 |
+
, 'dayNamesShort' => $this->strip_array_indices( $wp_locale->weekday_abbrev )
|
348 |
+
, 'dayNamesMin' => $this->strip_array_indices( $wp_locale->weekday_initial )
|
349 |
+
, 'showMonthAfterYear' => false
|
350 |
+
, 'showWeek' => false
|
351 |
+
, 'firstDay' => get_option( 'start_of_week' )
|
352 |
+
);
|
353 |
+
|
354 |
+
$l10n = ( isset( $timepicker_locale ) ) ? array_merge( $timepicker_wp_locale, $timepicker_locale ) : $timepicker_wp_locale;
|
355 |
+
wp_localize_script( 'timepicker', 'timepicker_objectL10n', $l10n );
|
356 |
+
|
357 |
+
wp_enqueue_style('jquery-style', $this->dir . 'css/jquery-ui.css',array(
|
358 |
+
'acf-datepicker'
|
359 |
+
),$this->version);
|
360 |
+
wp_enqueue_style('timepicker', $this->dir . 'css/jquery-ui-timepicker-addon.css',array(
|
361 |
+
'jquery-style'
|
362 |
+
),$this->version);
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* helper function, see: http://www.renegadetechconsulting.com/tutorials/jquery-datepicker-and-wordpress-i18n
|
367 |
+
* @param array $ArrayToStrip
|
368 |
+
* @return array
|
369 |
+
*/
|
370 |
+
function strip_array_indices( $ArrayToStrip ) {
|
371 |
+
foreach ( $ArrayToStrip as $objArrayItem ) {
|
372 |
+
$NewArray[] = $objArrayItem;
|
373 |
+
}
|
374 |
+
|
375 |
+
return $NewArray;
|
376 |
+
}
|
377 |
+
|
378 |
+
function get_js_locale($locale) {
|
379 |
+
$dir_path = $this->path . 'js/localization/';
|
380 |
+
$exclude_list = array(".", "..");
|
381 |
+
$languages = $this->ps_preg_filter("/jquery-ui-timepicker-(.*?)\.js/","$1",array_diff(scandir($dir_path), $exclude_list));
|
382 |
+
|
383 |
+
$locale = strtolower(str_replace("_", "-", $locale));
|
384 |
+
|
385 |
+
if (false !== strpos($locale,'-')) {
|
386 |
+
$l = explode("-",$locale);
|
387 |
+
$pattern = array('/' . $locale . '/','/' . $l[0] . '/', '/' . $l[1] . '/');
|
388 |
+
} else {
|
389 |
+
$pattern = array('/' . $locale . '/');
|
390 |
+
}
|
391 |
+
$res = $this->ps_preg_filter($pattern,"$0",$languages,-1,$count);
|
392 |
+
|
393 |
+
return ($count) ? implode("", $res) : 'en';
|
394 |
+
}
|
395 |
+
|
396 |
+
|
397 |
+
function ps_preg_filter ($pattern, $replace, $subject,$limit = -1, &$count = 0) {
|
398 |
+
if (function_exists('preg_filter'))
|
399 |
+
return preg_filter($pattern, $replace, $subject,$limit,$count);
|
400 |
+
else
|
401 |
+
return array_diff(preg_replace($pattern, $replace, $subject,$limit,$count), $subject);
|
402 |
+
}
|
403 |
+
|
404 |
+
|
405 |
+
}
|
406 |
+
|
407 |
+
|
408 |
+
// create field
|
409 |
+
new acf_field_date_time_picker();
|
410 |
+
|
411 |
+
?>
|
shared/assets/plugins/acf-field-date-time-picker/js/input.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
|
3 |
+
|
4 |
+
/*
|
5 |
+
* acf/setup_fields
|
6 |
+
*
|
7 |
+
* This event is triggered when ACF adds any new elements to the DOM.
|
8 |
+
*
|
9 |
+
* @type function
|
10 |
+
* @since 1.0.0
|
11 |
+
* @date 01/01/12
|
12 |
+
*
|
13 |
+
* @param event e: an event object. This can be ignored
|
14 |
+
* @param Element postbox: An element which contains the new HTML
|
15 |
+
*
|
16 |
+
* @return N/A
|
17 |
+
*/
|
18 |
+
|
19 |
+
$(document).live('acf/setup_fields', function(e, postbox){
|
20 |
+
|
21 |
+
alert('test');
|
22 |
+
|
23 |
+
$(postbox).find('.my-field-class').each(function(){
|
24 |
+
|
25 |
+
// initiate JS on my field!
|
26 |
+
// $(this).add_awesome_stuff();
|
27 |
+
|
28 |
+
});
|
29 |
+
|
30 |
+
});
|
31 |
+
|
32 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/jquery-ui-sliderAccess.js
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery UI Slider Access
|
3 |
+
* By: Trent Richardson [http://trentrichardson.com]
|
4 |
+
* Version 0.3
|
5 |
+
* Last Modified: 10/20/2012
|
6 |
+
*
|
7 |
+
* Copyright 2011 Trent Richardson
|
8 |
+
* Dual licensed under the MIT and GPL licenses.
|
9 |
+
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
|
10 |
+
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
|
11 |
+
*
|
12 |
+
*/
|
13 |
+
(function($){
|
14 |
+
|
15 |
+
$.fn.extend({
|
16 |
+
sliderAccess: function(options){
|
17 |
+
options = options || {};
|
18 |
+
options.touchonly = options.touchonly !== undefined? options.touchonly : true; // by default only show it if touch device
|
19 |
+
|
20 |
+
if(options.touchonly === true && !("ontouchend" in document))
|
21 |
+
return $(this);
|
22 |
+
|
23 |
+
return $(this).each(function(i,obj){
|
24 |
+
var $t = $(this),
|
25 |
+
o = $.extend({},{
|
26 |
+
where: 'after',
|
27 |
+
step: $t.slider('option','step'),
|
28 |
+
upIcon: 'ui-icon-plus',
|
29 |
+
downIcon: 'ui-icon-minus',
|
30 |
+
text: false,
|
31 |
+
upText: '+',
|
32 |
+
downText: '-',
|
33 |
+
buttonset: true,
|
34 |
+
buttonsetTag: 'span',
|
35 |
+
isRTL: false
|
36 |
+
}, options),
|
37 |
+
$buttons = $('<'+ o.buttonsetTag +' class="ui-slider-access">'+
|
38 |
+
'<button data-icon="'+ o.downIcon +'" data-step="'+ (o.isRTL? o.step : o.step*-1) +'">'+ o.downText +'</button>'+
|
39 |
+
'<button data-icon="'+ o.upIcon +'" data-step="'+ (o.isRTL? o.step*-1 : o.step) +'">'+ o.upText +'</button>'+
|
40 |
+
'</'+ o.buttonsetTag +'>');
|
41 |
+
|
42 |
+
$buttons.children('button').each(function(j, jobj){
|
43 |
+
var $jt = $(this);
|
44 |
+
$jt.button({
|
45 |
+
text: o.text,
|
46 |
+
icons: { primary: $jt.data('icon') }
|
47 |
+
})
|
48 |
+
.click(function(e){
|
49 |
+
var step = $jt.data('step'),
|
50 |
+
curr = $t.slider('value'),
|
51 |
+
newval = curr += step*1,
|
52 |
+
minval = $t.slider('option','min'),
|
53 |
+
maxval = $t.slider('option','max'),
|
54 |
+
slidee = $t.slider("option", "slide") || function(){},
|
55 |
+
stope = $t.slider("option", "stop") || function(){};
|
56 |
+
|
57 |
+
e.preventDefault();
|
58 |
+
|
59 |
+
if(newval < minval || newval > maxval)
|
60 |
+
return;
|
61 |
+
|
62 |
+
$t.slider('value', newval);
|
63 |
+
|
64 |
+
slidee.call($t, null, { value: newval });
|
65 |
+
stope.call($t, null, { value: newval });
|
66 |
+
});
|
67 |
+
});
|
68 |
+
|
69 |
+
// before or after
|
70 |
+
$t[o.where]($buttons);
|
71 |
+
|
72 |
+
if(o.buttonset){
|
73 |
+
$buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset();
|
74 |
+
$buttons.eq(0).addClass('ui-corner-left');
|
75 |
+
$buttons.eq(1).addClass('ui-corner-right');
|
76 |
+
}
|
77 |
+
|
78 |
+
// adjust the width so we don't break the original layout
|
79 |
+
var bOuterWidth = $buttons.css({
|
80 |
+
marginLeft: ((o.where == 'after' && !o.isRTL) || (o.where == 'before' && o.isRTL)? 10:0),
|
81 |
+
marginRight: ((o.where == 'before' && !o.isRTL) || (o.where == 'after' && o.isRTL)? 10:0)
|
82 |
+
}).outerWidth(true) + 5;
|
83 |
+
var tOuterWidth = $t.outerWidth(true);
|
84 |
+
$t.css('display','inline-block').width(tOuterWidth-bOuterWidth);
|
85 |
+
});
|
86 |
+
}
|
87 |
+
});
|
88 |
+
|
89 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/jquery-ui-timepicker-addon.js
ADDED
@@ -0,0 +1,2128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery timepicker addon
|
3 |
+
* By: Trent Richardson [http://trentrichardson.com]
|
4 |
+
* Version 1.3.1
|
5 |
+
* Last Modified: 07/07/2013
|
6 |
+
*
|
7 |
+
* Copyright 2013 Trent Richardson
|
8 |
+
* You may use this project under MIT or GPL licenses.
|
9 |
+
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
|
10 |
+
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*jslint evil: true, white: false, undef: false, nomen: false */
|
14 |
+
|
15 |
+
(function($) {
|
16 |
+
|
17 |
+
/*
|
18 |
+
* Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded"
|
19 |
+
*/
|
20 |
+
$.ui.timepicker = $.ui.timepicker || {};
|
21 |
+
if ($.ui.timepicker.version) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
/*
|
26 |
+
* Extend jQueryUI, get it started with our version number
|
27 |
+
*/
|
28 |
+
$.extend($.ui, {
|
29 |
+
timepicker: {
|
30 |
+
version: "1.3.1"
|
31 |
+
}
|
32 |
+
});
|
33 |
+
|
34 |
+
/*
|
35 |
+
* Timepicker manager.
|
36 |
+
* Use the singleton instance of this class, $.timepicker, to interact with the time picker.
|
37 |
+
* Settings for (groups of) time pickers are maintained in an instance object,
|
38 |
+
* allowing multiple different settings on the same page.
|
39 |
+
*/
|
40 |
+
var Timepicker = function() {
|
41 |
+
this.regional = []; // Available regional settings, indexed by language code
|
42 |
+
this.regional[''] = { // Default regional settings
|
43 |
+
currentText: 'Now',
|
44 |
+
closeText: 'Done',
|
45 |
+
amNames: ['AM', 'A'],
|
46 |
+
pmNames: ['PM', 'P'],
|
47 |
+
timeFormat: 'HH:mm',
|
48 |
+
timeSuffix: '',
|
49 |
+
timeOnlyTitle: 'Choose Time',
|
50 |
+
timeText: 'Time',
|
51 |
+
hourText: 'Hour',
|
52 |
+
minuteText: 'Minute',
|
53 |
+
secondText: 'Second',
|
54 |
+
millisecText: 'Millisecond',
|
55 |
+
microsecText: 'Microsecond',
|
56 |
+
timezoneText: 'Time Zone',
|
57 |
+
isRTL: false
|
58 |
+
};
|
59 |
+
this._defaults = { // Global defaults for all the datetime picker instances
|
60 |
+
showButtonPanel: true,
|
61 |
+
timeOnly: false,
|
62 |
+
showHour: null,
|
63 |
+
showMinute: null,
|
64 |
+
showSecond: null,
|
65 |
+
showMillisec: null,
|
66 |
+
showMicrosec: null,
|
67 |
+
showTimezone: null,
|
68 |
+
showTime: true,
|
69 |
+
stepHour: 1,
|
70 |
+
stepMinute: 1,
|
71 |
+
stepSecond: 1,
|
72 |
+
stepMillisec: 1,
|
73 |
+
stepMicrosec: 1,
|
74 |
+
hour: 0,
|
75 |
+
minute: 0,
|
76 |
+
second: 0,
|
77 |
+
millisec: 0,
|
78 |
+
microsec: 0,
|
79 |
+
timezone: null,
|
80 |
+
hourMin: 0,
|
81 |
+
minuteMin: 0,
|
82 |
+
secondMin: 0,
|
83 |
+
millisecMin: 0,
|
84 |
+
microsecMin: 0,
|
85 |
+
hourMax: 23,
|
86 |
+
minuteMax: 59,
|
87 |
+
secondMax: 59,
|
88 |
+
millisecMax: 999,
|
89 |
+
microsecMax: 999,
|
90 |
+
minDateTime: null,
|
91 |
+
maxDateTime: null,
|
92 |
+
onSelect: null,
|
93 |
+
hourGrid: 0,
|
94 |
+
minuteGrid: 0,
|
95 |
+
secondGrid: 0,
|
96 |
+
millisecGrid: 0,
|
97 |
+
microsecGrid: 0,
|
98 |
+
alwaysSetTime: true,
|
99 |
+
separator: ' ',
|
100 |
+
altFieldTimeOnly: true,
|
101 |
+
altTimeFormat: null,
|
102 |
+
altSeparator: null,
|
103 |
+
altTimeSuffix: null,
|
104 |
+
pickerTimeFormat: null,
|
105 |
+
pickerTimeSuffix: null,
|
106 |
+
showTimepicker: true,
|
107 |
+
timezoneList: null,
|
108 |
+
addSliderAccess: false,
|
109 |
+
sliderAccessArgs: null,
|
110 |
+
controlType: 'slider',
|
111 |
+
defaultValue: null,
|
112 |
+
parse: 'strict'
|
113 |
+
};
|
114 |
+
$.extend(this._defaults, this.regional['']);
|
115 |
+
};
|
116 |
+
|
117 |
+
$.extend(Timepicker.prototype, {
|
118 |
+
$input: null,
|
119 |
+
$altInput: null,
|
120 |
+
$timeObj: null,
|
121 |
+
inst: null,
|
122 |
+
hour_slider: null,
|
123 |
+
minute_slider: null,
|
124 |
+
second_slider: null,
|
125 |
+
millisec_slider: null,
|
126 |
+
microsec_slider: null,
|
127 |
+
timezone_select: null,
|
128 |
+
hour: 0,
|
129 |
+
minute: 0,
|
130 |
+
second: 0,
|
131 |
+
millisec: 0,
|
132 |
+
microsec: 0,
|
133 |
+
timezone: null,
|
134 |
+
hourMinOriginal: null,
|
135 |
+
minuteMinOriginal: null,
|
136 |
+
secondMinOriginal: null,
|
137 |
+
millisecMinOriginal: null,
|
138 |
+
microsecMinOriginal: null,
|
139 |
+
hourMaxOriginal: null,
|
140 |
+
minuteMaxOriginal: null,
|
141 |
+
secondMaxOriginal: null,
|
142 |
+
millisecMaxOriginal: null,
|
143 |
+
microsecMaxOriginal: null,
|
144 |
+
ampm: '',
|
145 |
+
formattedDate: '',
|
146 |
+
formattedTime: '',
|
147 |
+
formattedDateTime: '',
|
148 |
+
timezoneList: null,
|
149 |
+
units: ['hour','minute','second','millisec', 'microsec'],
|
150 |
+
support: {},
|
151 |
+
control: null,
|
152 |
+
|
153 |
+
/*
|
154 |
+
* Override the default settings for all instances of the time picker.
|
155 |
+
* @param settings object - the new settings to use as defaults (anonymous object)
|
156 |
+
* @return the manager object
|
157 |
+
*/
|
158 |
+
setDefaults: function(settings) {
|
159 |
+
extendRemove(this._defaults, settings || {});
|
160 |
+
return this;
|
161 |
+
},
|
162 |
+
|
163 |
+
/*
|
164 |
+
* Create a new Timepicker instance
|
165 |
+
*/
|
166 |
+
_newInst: function($input, opts) {
|
167 |
+
var tp_inst = new Timepicker(),
|
168 |
+
inlineSettings = {},
|
169 |
+
fns = {},
|
170 |
+
overrides, i;
|
171 |
+
|
172 |
+
for (var attrName in this._defaults) {
|
173 |
+
if(this._defaults.hasOwnProperty(attrName)){
|
174 |
+
var attrValue = $input.attr('time:' + attrName);
|
175 |
+
if (attrValue) {
|
176 |
+
try {
|
177 |
+
inlineSettings[attrName] = eval(attrValue);
|
178 |
+
} catch (err) {
|
179 |
+
inlineSettings[attrName] = attrValue;
|
180 |
+
}
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
overrides = {
|
186 |
+
beforeShow: function (input, dp_inst) {
|
187 |
+
if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {
|
188 |
+
return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst);
|
189 |
+
}
|
190 |
+
},
|
191 |
+
onChangeMonthYear: function (year, month, dp_inst) {
|
192 |
+
// Update the time as well : this prevents the time from disappearing from the $input field.
|
193 |
+
tp_inst._updateDateTime(dp_inst);
|
194 |
+
if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {
|
195 |
+
tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
|
196 |
+
}
|
197 |
+
},
|
198 |
+
onClose: function (dateText, dp_inst) {
|
199 |
+
if (tp_inst.timeDefined === true && $input.val() !== '') {
|
200 |
+
tp_inst._updateDateTime(dp_inst);
|
201 |
+
}
|
202 |
+
if ($.isFunction(tp_inst._defaults.evnts.onClose)) {
|
203 |
+
tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst);
|
204 |
+
}
|
205 |
+
}
|
206 |
+
};
|
207 |
+
for (i in overrides) {
|
208 |
+
if (overrides.hasOwnProperty(i)) {
|
209 |
+
fns[i] = opts[i] || null;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, {
|
214 |
+
evnts:fns,
|
215 |
+
timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
|
216 |
+
});
|
217 |
+
tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) {
|
218 |
+
return val.toUpperCase();
|
219 |
+
});
|
220 |
+
tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) {
|
221 |
+
return val.toUpperCase();
|
222 |
+
});
|
223 |
+
|
224 |
+
// detect which units are supported
|
225 |
+
tp_inst.support = detectSupport(
|
226 |
+
tp_inst._defaults.timeFormat +
|
227 |
+
(tp_inst._defaults.pickerTimeFormat? tp_inst._defaults.pickerTimeFormat:'') +
|
228 |
+
(tp_inst._defaults.altTimeFormat? tp_inst._defaults.altTimeFormat:''));
|
229 |
+
|
230 |
+
// controlType is string - key to our this._controls
|
231 |
+
if(typeof(tp_inst._defaults.controlType) === 'string'){
|
232 |
+
if(tp_inst._defaults.controlType == 'slider' && typeof(jQuery.ui.slider) === 'undefined'){
|
233 |
+
tp_inst._defaults.controlType = 'select';
|
234 |
+
}
|
235 |
+
tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];
|
236 |
+
}
|
237 |
+
// controlType is an object and must implement create, options, value methods
|
238 |
+
else{
|
239 |
+
tp_inst.control = tp_inst._defaults.controlType;
|
240 |
+
}
|
241 |
+
|
242 |
+
// prep the timezone options
|
243 |
+
var timezoneList = [-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,
|
244 |
+
0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];
|
245 |
+
if (tp_inst._defaults.timezoneList !== null) {
|
246 |
+
timezoneList = tp_inst._defaults.timezoneList;
|
247 |
+
}
|
248 |
+
var tzl=timezoneList.length,tzi=0,tzv=null;
|
249 |
+
if (tzl > 0 && typeof timezoneList[0] !== 'object') {
|
250 |
+
for(; tzi<tzl; tzi++){
|
251 |
+
tzv = timezoneList[tzi];
|
252 |
+
timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) };
|
253 |
+
}
|
254 |
+
}
|
255 |
+
tp_inst._defaults.timezoneList = timezoneList;
|
256 |
+
|
257 |
+
// set the default units
|
258 |
+
tp_inst.timezone = tp_inst._defaults.timezone !== null? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) :
|
259 |
+
((new Date()).getTimezoneOffset()*-1);
|
260 |
+
tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin? tp_inst._defaults.hourMin :
|
261 |
+
tp_inst._defaults.hour > tp_inst._defaults.hourMax? tp_inst._defaults.hourMax : tp_inst._defaults.hour;
|
262 |
+
tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin? tp_inst._defaults.minuteMin :
|
263 |
+
tp_inst._defaults.minute > tp_inst._defaults.minuteMax? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
|
264 |
+
tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin? tp_inst._defaults.secondMin :
|
265 |
+
tp_inst._defaults.second > tp_inst._defaults.secondMax? tp_inst._defaults.secondMax : tp_inst._defaults.second;
|
266 |
+
tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin? tp_inst._defaults.millisecMin :
|
267 |
+
tp_inst._defaults.millisec > tp_inst._defaults.millisecMax? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
|
268 |
+
tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin? tp_inst._defaults.microsecMin :
|
269 |
+
tp_inst._defaults.microsec > tp_inst._defaults.microsecMax? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;
|
270 |
+
tp_inst.ampm = '';
|
271 |
+
tp_inst.$input = $input;
|
272 |
+
|
273 |
+
if (tp_inst._defaults.altField) {
|
274 |
+
tp_inst.$altInput = $(tp_inst._defaults.altField).css({
|
275 |
+
cursor: 'pointer'
|
276 |
+
}).focus(function() {
|
277 |
+
$input.trigger("focus");
|
278 |
+
});
|
279 |
+
}
|
280 |
+
|
281 |
+
if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {
|
282 |
+
tp_inst._defaults.minDate = new Date();
|
283 |
+
}
|
284 |
+
if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {
|
285 |
+
tp_inst._defaults.maxDate = new Date();
|
286 |
+
}
|
287 |
+
|
288 |
+
// datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
|
289 |
+
if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) {
|
290 |
+
tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
|
291 |
+
}
|
292 |
+
if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {
|
293 |
+
tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
|
294 |
+
}
|
295 |
+
if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {
|
296 |
+
tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
|
297 |
+
}
|
298 |
+
if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {
|
299 |
+
tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
|
300 |
+
}
|
301 |
+
tp_inst.$input.bind('focus', function() {
|
302 |
+
tp_inst._onFocus();
|
303 |
+
});
|
304 |
+
|
305 |
+
return tp_inst;
|
306 |
+
},
|
307 |
+
|
308 |
+
/*
|
309 |
+
* add our sliders to the calendar
|
310 |
+
*/
|
311 |
+
_addTimePicker: function(dp_inst) {
|
312 |
+
var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val();
|
313 |
+
|
314 |
+
this.timeDefined = this._parseTime(currDT);
|
315 |
+
this._limitMinMaxDateTime(dp_inst, false);
|
316 |
+
this._injectTimePicker();
|
317 |
+
},
|
318 |
+
|
319 |
+
/*
|
320 |
+
* parse the time string from input value or _setTime
|
321 |
+
*/
|
322 |
+
_parseTime: function(timeString, withDate) {
|
323 |
+
if (!this.inst) {
|
324 |
+
this.inst = $.datepicker._getInst(this.$input[0]);
|
325 |
+
}
|
326 |
+
|
327 |
+
if (withDate || !this._defaults.timeOnly) {
|
328 |
+
var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
|
329 |
+
try {
|
330 |
+
var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults);
|
331 |
+
if (!parseRes.timeObj) {
|
332 |
+
return false;
|
333 |
+
}
|
334 |
+
$.extend(this, parseRes.timeObj);
|
335 |
+
} catch (err) {
|
336 |
+
$.timepicker.log("Error parsing the date/time string: " + err +
|
337 |
+
"\ndate/time string = " + timeString +
|
338 |
+
"\ntimeFormat = " + this._defaults.timeFormat +
|
339 |
+
"\ndateFormat = " + dp_dateFormat);
|
340 |
+
return false;
|
341 |
+
}
|
342 |
+
return true;
|
343 |
+
} else {
|
344 |
+
var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults);
|
345 |
+
if (!timeObj) {
|
346 |
+
return false;
|
347 |
+
}
|
348 |
+
$.extend(this, timeObj);
|
349 |
+
return true;
|
350 |
+
}
|
351 |
+
},
|
352 |
+
|
353 |
+
/*
|
354 |
+
* generate and inject html for timepicker into ui datepicker
|
355 |
+
*/
|
356 |
+
_injectTimePicker: function() {
|
357 |
+
var $dp = this.inst.dpDiv,
|
358 |
+
o = this.inst.settings,
|
359 |
+
tp_inst = this,
|
360 |
+
litem = '',
|
361 |
+
uitem = '',
|
362 |
+
show = null,
|
363 |
+
max = {},
|
364 |
+
gridSize = {},
|
365 |
+
size = null,
|
366 |
+
i=0,
|
367 |
+
l=0;
|
368 |
+
|
369 |
+
// Prevent displaying twice
|
370 |
+
if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
|
371 |
+
var noDisplay = ' style="display:none;"',
|
372 |
+
html = '<div class="ui-timepicker-div'+ (o.isRTL? ' ui-timepicker-rtl' : '') +'"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
|
373 |
+
'<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>';
|
374 |
+
|
375 |
+
// Create the markup
|
376 |
+
for(i=0,l=this.units.length; i<l; i++){
|
377 |
+
litem = this.units[i];
|
378 |
+
uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
|
379 |
+
show = o['show'+uitem] !== null? o['show'+uitem] : this.support[litem];
|
380 |
+
|
381 |
+
// Added by Peter Medeiros:
|
382 |
+
// - Figure out what the hour/minute/second max should be based on the step values.
|
383 |
+
// - Example: if stepMinute is 15, then minMax is 45.
|
384 |
+
max[litem] = parseInt((o[litem+'Max'] - ((o[litem+'Max'] - o[litem+'Min']) % o['step'+uitem])), 10);
|
385 |
+
gridSize[litem] = 0;
|
386 |
+
|
387 |
+
html += '<dt class="ui_tpicker_'+ litem +'_label"' + (show ? '' : noDisplay) + '>' + o[litem +'Text'] + '</dt>' +
|
388 |
+
'<dd class="ui_tpicker_'+ litem +'"><div class="ui_tpicker_'+ litem +'_slider"' + (show ? '' : noDisplay) + '></div>';
|
389 |
+
|
390 |
+
if (show && o[litem+'Grid'] > 0) {
|
391 |
+
html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
|
392 |
+
|
393 |
+
if(litem == 'hour'){
|
394 |
+
for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) {
|
395 |
+
gridSize[litem]++;
|
396 |
+
var tmph = $.datepicker.formatTime(this.support.ampm? 'hht':'HH', {hour:h}, o);
|
397 |
+
html += '<td data-for="'+litem+'">' + tmph + '</td>';
|
398 |
+
}
|
399 |
+
}
|
400 |
+
else{
|
401 |
+
for (var m = o[litem+'Min']; m <= max[litem]; m += parseInt(o[litem+'Grid'], 10)) {
|
402 |
+
gridSize[litem]++;
|
403 |
+
html += '<td data-for="'+litem+'">' + ((m < 10) ? '0' : '') + m + '</td>';
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
html += '</tr></table></div>';
|
408 |
+
}
|
409 |
+
html += '</dd>';
|
410 |
+
}
|
411 |
+
|
412 |
+
// Timezone
|
413 |
+
var showTz = o.showTimezone !== null? o.showTimezone : this.support.timezone;
|
414 |
+
html += '<dt class="ui_tpicker_timezone_label"' + (showTz ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
|
415 |
+
html += '<dd class="ui_tpicker_timezone" ' + (showTz ? '' : noDisplay) + '></dd>';
|
416 |
+
|
417 |
+
// Create the elements from string
|
418 |
+
html += '</dl></div>';
|
419 |
+
var $tp = $(html);
|
420 |
+
|
421 |
+
// if we only want time picker...
|
422 |
+
if (o.timeOnly === true) {
|
423 |
+
$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>');
|
424 |
+
$dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
|
425 |
+
}
|
426 |
+
|
427 |
+
// add sliders, adjust grids, add events
|
428 |
+
for(i=0,l=tp_inst.units.length; i<l; i++){
|
429 |
+
litem = tp_inst.units[i];
|
430 |
+
uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
|
431 |
+
show = o['show'+uitem] !== null? o['show'+uitem] : this.support[litem];
|
432 |
+
|
433 |
+
// add the slider
|
434 |
+
tp_inst[litem+'_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_'+litem+'_slider'), litem, tp_inst[litem], o[litem+'Min'], max[litem], o['step'+uitem]);
|
435 |
+
|
436 |
+
// adjust the grid and add click event
|
437 |
+
if (show && o[litem+'Grid'] > 0) {
|
438 |
+
size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']);
|
439 |
+
$tp.find('.ui_tpicker_'+litem+' table').css({
|
440 |
+
width: size + "%",
|
441 |
+
marginLeft: o.isRTL? '0' : ((size / (-2 * gridSize[litem])) + "%"),
|
442 |
+
marginRight: o.isRTL? ((size / (-2 * gridSize[litem])) + "%") : '0',
|
443 |
+
borderCollapse: 'collapse'
|
444 |
+
}).find("td").click(function(e){
|
445 |
+
var $t = $(this),
|
446 |
+
h = $t.html(),
|
447 |
+
n = parseInt(h.replace(/[^0-9]/g),10),
|
448 |
+
ap = h.replace(/[^apm]/ig),
|
449 |
+
f = $t.data('for'); // loses scope, so we use data-for
|
450 |
+
|
451 |
+
if(f == 'hour'){
|
452 |
+
if(ap.indexOf('p') !== -1 && n < 12){
|
453 |
+
n += 12;
|
454 |
+
}
|
455 |
+
else{
|
456 |
+
if(ap.indexOf('a') !== -1 && n === 12){
|
457 |
+
n = 0;
|
458 |
+
}
|
459 |
+
}
|
460 |
+
}
|
461 |
+
|
462 |
+
tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, n);
|
463 |
+
|
464 |
+
tp_inst._onTimeChange();
|
465 |
+
tp_inst._onSelectHandler();
|
466 |
+
}).css({
|
467 |
+
cursor: 'pointer',
|
468 |
+
width: (100 / gridSize[litem]) + '%',
|
469 |
+
textAlign: 'center',
|
470 |
+
overflow: 'hidden'
|
471 |
+
});
|
472 |
+
} // end if grid > 0
|
473 |
+
} // end for loop
|
474 |
+
|
475 |
+
// Add timezone options
|
476 |
+
this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");
|
477 |
+
$.fn.append.apply(this.timezone_select,
|
478 |
+
$.map(o.timezoneList, function(val, idx) {
|
479 |
+
return $("<option />").val(typeof val == "object" ? val.value : val).text(typeof val == "object" ? val.label : val);
|
480 |
+
}));
|
481 |
+
if (typeof(this.timezone) != "undefined" && this.timezone !== null && this.timezone !== "") {
|
482 |
+
var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset()*-1;
|
483 |
+
if (local_timezone == this.timezone) {
|
484 |
+
selectLocalTimezone(tp_inst);
|
485 |
+
} else {
|
486 |
+
this.timezone_select.val(this.timezone);
|
487 |
+
}
|
488 |
+
} else {
|
489 |
+
if (typeof(this.hour) != "undefined" && this.hour !== null && this.hour !== "") {
|
490 |
+
this.timezone_select.val(o.timezone);
|
491 |
+
} else {
|
492 |
+
selectLocalTimezone(tp_inst);
|
493 |
+
}
|
494 |
+
}
|
495 |
+
this.timezone_select.change(function() {
|
496 |
+
tp_inst._onTimeChange();
|
497 |
+
tp_inst._onSelectHandler();
|
498 |
+
});
|
499 |
+
// End timezone options
|
500 |
+
|
501 |
+
// inject timepicker into datepicker
|
502 |
+
var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
|
503 |
+
if ($buttonPanel.length) {
|
504 |
+
$buttonPanel.before($tp);
|
505 |
+
} else {
|
506 |
+
$dp.append($tp);
|
507 |
+
}
|
508 |
+
|
509 |
+
this.$timeObj = $tp.find('.ui_tpicker_time');
|
510 |
+
|
511 |
+
if (this.inst !== null) {
|
512 |
+
var timeDefined = this.timeDefined;
|
513 |
+
this._onTimeChange();
|
514 |
+
this.timeDefined = timeDefined;
|
515 |
+
}
|
516 |
+
|
517 |
+
// slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/
|
518 |
+
if (this._defaults.addSliderAccess) {
|
519 |
+
var sliderAccessArgs = this._defaults.sliderAccessArgs,
|
520 |
+
rtl = this._defaults.isRTL;
|
521 |
+
sliderAccessArgs.isRTL = rtl;
|
522 |
+
|
523 |
+
setTimeout(function() { // fix for inline mode
|
524 |
+
if ($tp.find('.ui-slider-access').length === 0) {
|
525 |
+
$tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
|
526 |
+
|
527 |
+
// fix any grids since sliders are shorter
|
528 |
+
var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
|
529 |
+
if (sliderAccessWidth) {
|
530 |
+
$tp.find('table:visible').each(function() {
|
531 |
+
var $g = $(this),
|
532 |
+
oldWidth = $g.outerWidth(),
|
533 |
+
oldMarginLeft = $g.css(rtl? 'marginRight':'marginLeft').toString().replace('%', ''),
|
534 |
+
newWidth = oldWidth - sliderAccessWidth,
|
535 |
+
newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%',
|
536 |
+
css = { width: newWidth, marginRight: 0, marginLeft: 0 };
|
537 |
+
css[rtl? 'marginRight':'marginLeft'] = newMarginLeft;
|
538 |
+
$g.css(css);
|
539 |
+
});
|
540 |
+
}
|
541 |
+
}
|
542 |
+
}, 10);
|
543 |
+
}
|
544 |
+
// end slideAccess integration
|
545 |
+
|
546 |
+
tp_inst._limitMinMaxDateTime(this.inst, true);
|
547 |
+
}
|
548 |
+
},
|
549 |
+
|
550 |
+
/*
|
551 |
+
* This function tries to limit the ability to go outside the
|
552 |
+
* min/max date range
|
553 |
+
*/
|
554 |
+
_limitMinMaxDateTime: function(dp_inst, adjustSliders) {
|
555 |
+
var o = this._defaults,
|
556 |
+
dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
|
557 |
+
|
558 |
+
if (!this._defaults.showTimepicker) {
|
559 |
+
return;
|
560 |
+
} // No time so nothing to check here
|
561 |
+
|
562 |
+
if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) {
|
563 |
+
var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
|
564 |
+
minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
|
565 |
+
|
566 |
+
if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) {
|
567 |
+
this.hourMinOriginal = o.hourMin;
|
568 |
+
this.minuteMinOriginal = o.minuteMin;
|
569 |
+
this.secondMinOriginal = o.secondMin;
|
570 |
+
this.millisecMinOriginal = o.millisecMin;
|
571 |
+
this.microsecMinOriginal = o.microsecMin;
|
572 |
+
}
|
573 |
+
|
574 |
+
if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) {
|
575 |
+
this._defaults.hourMin = minDateTime.getHours();
|
576 |
+
if (this.hour <= this._defaults.hourMin) {
|
577 |
+
this.hour = this._defaults.hourMin;
|
578 |
+
this._defaults.minuteMin = minDateTime.getMinutes();
|
579 |
+
if (this.minute <= this._defaults.minuteMin) {
|
580 |
+
this.minute = this._defaults.minuteMin;
|
581 |
+
this._defaults.secondMin = minDateTime.getSeconds();
|
582 |
+
if (this.second <= this._defaults.secondMin) {
|
583 |
+
this.second = this._defaults.secondMin;
|
584 |
+
this._defaults.millisecMin = minDateTime.getMilliseconds();
|
585 |
+
if(this.millisec <= this._defaults.millisecMin) {
|
586 |
+
this.millisec = this._defaults.millisecMin;
|
587 |
+
this._defaults.microsecMin = minDateTime.getMicroseconds();
|
588 |
+
} else {
|
589 |
+
if (this.microsec < this._defaults.microsecMin) {
|
590 |
+
this.microsec = this._defaults.microsecMin;
|
591 |
+
}
|
592 |
+
this._defaults.microsecMin = this.microsecMinOriginal;
|
593 |
+
}
|
594 |
+
} else {
|
595 |
+
this._defaults.millisecMin = this.millisecMinOriginal;
|
596 |
+
this._defaults.microsecMin = this.microsecMinOriginal;
|
597 |
+
}
|
598 |
+
} else {
|
599 |
+
this._defaults.secondMin = this.secondMinOriginal;
|
600 |
+
this._defaults.millisecMin = this.millisecMinOriginal;
|
601 |
+
this._defaults.microsecMin = this.microsecMinOriginal;
|
602 |
+
}
|
603 |
+
} else {
|
604 |
+
this._defaults.minuteMin = this.minuteMinOriginal;
|
605 |
+
this._defaults.secondMin = this.secondMinOriginal;
|
606 |
+
this._defaults.millisecMin = this.millisecMinOriginal;
|
607 |
+
this._defaults.microsecMin = this.microsecMinOriginal;
|
608 |
+
}
|
609 |
+
} else {
|
610 |
+
this._defaults.hourMin = this.hourMinOriginal;
|
611 |
+
this._defaults.minuteMin = this.minuteMinOriginal;
|
612 |
+
this._defaults.secondMin = this.secondMinOriginal;
|
613 |
+
this._defaults.millisecMin = this.millisecMinOriginal;
|
614 |
+
this._defaults.microsecMin = this.microsecMinOriginal;
|
615 |
+
}
|
616 |
+
}
|
617 |
+
|
618 |
+
if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) {
|
619 |
+
var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
|
620 |
+
maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
|
621 |
+
|
622 |
+
if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {
|
623 |
+
this.hourMaxOriginal = o.hourMax;
|
624 |
+
this.minuteMaxOriginal = o.minuteMax;
|
625 |
+
this.secondMaxOriginal = o.secondMax;
|
626 |
+
this.millisecMaxOriginal = o.millisecMax;
|
627 |
+
this.microsecMaxOriginal = o.microsecMax;
|
628 |
+
}
|
629 |
+
|
630 |
+
if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()) {
|
631 |
+
this._defaults.hourMax = maxDateTime.getHours();
|
632 |
+
if (this.hour >= this._defaults.hourMax) {
|
633 |
+
this.hour = this._defaults.hourMax;
|
634 |
+
this._defaults.minuteMax = maxDateTime.getMinutes();
|
635 |
+
if (this.minute >= this._defaults.minuteMax) {
|
636 |
+
this.minute = this._defaults.minuteMax;
|
637 |
+
this._defaults.secondMax = maxDateTime.getSeconds();
|
638 |
+
if (this.second >= this._defaults.secondMax) {
|
639 |
+
this.second = this._defaults.secondMax;
|
640 |
+
this._defaults.millisecMax = maxDateTime.getMilliseconds();
|
641 |
+
if (this.millisec >= this._defaults.millisecMax) {
|
642 |
+
this.millisec = this._defaults.millisecMax;
|
643 |
+
this._defaults.microsecMax = maxDateTime.getMicroseconds();
|
644 |
+
} else {
|
645 |
+
if (this.microsec > this._defaults.microsecMax) {
|
646 |
+
this.microsec = this._defaults.microsecMax;
|
647 |
+
}
|
648 |
+
this._defaults.microsecMax = this.microsecMaxOriginal;
|
649 |
+
}
|
650 |
+
} else {
|
651 |
+
this._defaults.millisecMax = this.millisecMaxOriginal;
|
652 |
+
this._defaults.microsecMax = this.microsecMaxOriginal;
|
653 |
+
}
|
654 |
+
} else {
|
655 |
+
this._defaults.secondMax = this.secondMaxOriginal;
|
656 |
+
this._defaults.millisecMax = this.millisecMaxOriginal;
|
657 |
+
this._defaults.microsecMax = this.microsecMaxOriginal;
|
658 |
+
}
|
659 |
+
} else {
|
660 |
+
this._defaults.minuteMax = this.minuteMaxOriginal;
|
661 |
+
this._defaults.secondMax = this.secondMaxOriginal;
|
662 |
+
this._defaults.millisecMax = this.millisecMaxOriginal;
|
663 |
+
this._defaults.microsecMax = this.microsecMaxOriginal;
|
664 |
+
}
|
665 |
+
} else {
|
666 |
+
this._defaults.hourMax = this.hourMaxOriginal;
|
667 |
+
this._defaults.minuteMax = this.minuteMaxOriginal;
|
668 |
+
this._defaults.secondMax = this.secondMaxOriginal;
|
669 |
+
this._defaults.millisecMax = this.millisecMaxOriginal;
|
670 |
+
this._defaults.microsecMax = this.microsecMaxOriginal;
|
671 |
+
}
|
672 |
+
}
|
673 |
+
|
674 |
+
if (adjustSliders !== undefined && adjustSliders === true) {
|
675 |
+
var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
|
676 |
+
minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
|
677 |
+
secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),
|
678 |
+
millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10);
|
679 |
+
microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10);
|
680 |
+
|
681 |
+
if (this.hour_slider) {
|
682 |
+
this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax });
|
683 |
+
this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));
|
684 |
+
}
|
685 |
+
if (this.minute_slider) {
|
686 |
+
this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax });
|
687 |
+
this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));
|
688 |
+
}
|
689 |
+
if (this.second_slider) {
|
690 |
+
this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax });
|
691 |
+
this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));
|
692 |
+
}
|
693 |
+
if (this.millisec_slider) {
|
694 |
+
this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax });
|
695 |
+
this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));
|
696 |
+
}
|
697 |
+
if (this.microsec_slider) {
|
698 |
+
this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax });
|
699 |
+
this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec));
|
700 |
+
}
|
701 |
+
}
|
702 |
+
|
703 |
+
},
|
704 |
+
|
705 |
+
/*
|
706 |
+
* when a slider moves, set the internal time...
|
707 |
+
* on time change is also called when the time is updated in the text field
|
708 |
+
*/
|
709 |
+
_onTimeChange: function() {
|
710 |
+
var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
|
711 |
+
minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,
|
712 |
+
second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,
|
713 |
+
millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false,
|
714 |
+
microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false,
|
715 |
+
timezone = (this.timezone_select) ? this.timezone_select.val() : false,
|
716 |
+
o = this._defaults,
|
717 |
+
pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,
|
718 |
+
pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;
|
719 |
+
|
720 |
+
if (typeof(hour) == 'object') {
|
721 |
+
hour = false;
|
722 |
+
}
|
723 |
+
if (typeof(minute) == 'object') {
|
724 |
+
minute = false;
|
725 |
+
}
|
726 |
+
if (typeof(second) == 'object') {
|
727 |
+
second = false;
|
728 |
+
}
|
729 |
+
if (typeof(millisec) == 'object') {
|
730 |
+
millisec = false;
|
731 |
+
}
|
732 |
+
if (typeof(microsec) == 'object') {
|
733 |
+
microsec = false;
|
734 |
+
}
|
735 |
+
if (typeof(timezone) == 'object') {
|
736 |
+
timezone = false;
|
737 |
+
}
|
738 |
+
|
739 |
+
if (hour !== false) {
|
740 |
+
hour = parseInt(hour, 10);
|
741 |
+
}
|
742 |
+
if (minute !== false) {
|
743 |
+
minute = parseInt(minute, 10);
|
744 |
+
}
|
745 |
+
if (second !== false) {
|
746 |
+
second = parseInt(second, 10);
|
747 |
+
}
|
748 |
+
if (millisec !== false) {
|
749 |
+
millisec = parseInt(millisec, 10);
|
750 |
+
}
|
751 |
+
if (microsec !== false) {
|
752 |
+
microsec = parseInt(microsec, 10);
|
753 |
+
}
|
754 |
+
|
755 |
+
var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
|
756 |
+
|
757 |
+
// If the update was done in the input field, the input field should not be updated.
|
758 |
+
// If the update was done using the sliders, update the input field.
|
759 |
+
var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec || microsec != this.microsec
|
760 |
+
|| (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))
|
761 |
+
|| (this.timezone !== null && timezone != this.timezone));
|
762 |
+
|
763 |
+
if (hasChanged) {
|
764 |
+
|
765 |
+
if (hour !== false) {
|
766 |
+
this.hour = hour;
|
767 |
+
}
|
768 |
+
if (minute !== false) {
|
769 |
+
this.minute = minute;
|
770 |
+
}
|
771 |
+
if (second !== false) {
|
772 |
+
this.second = second;
|
773 |
+
}
|
774 |
+
if (millisec !== false) {
|
775 |
+
this.millisec = millisec;
|
776 |
+
}
|
777 |
+
if (microsec !== false) {
|
778 |
+
this.microsec = microsec;
|
779 |
+
}
|
780 |
+
if (timezone !== false) {
|
781 |
+
this.timezone = timezone;
|
782 |
+
}
|
783 |
+
|
784 |
+
if (!this.inst) {
|
785 |
+
this.inst = $.datepicker._getInst(this.$input[0]);
|
786 |
+
}
|
787 |
+
|
788 |
+
this._limitMinMaxDateTime(this.inst, true);
|
789 |
+
}
|
790 |
+
if (this.support.ampm) {
|
791 |
+
this.ampm = ampm;
|
792 |
+
}
|
793 |
+
|
794 |
+
// Updates the time within the timepicker
|
795 |
+
this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
|
796 |
+
if (this.$timeObj) {
|
797 |
+
if(pickerTimeFormat === o.timeFormat){
|
798 |
+
this.$timeObj.text(this.formattedTime + pickerTimeSuffix);
|
799 |
+
}
|
800 |
+
else{
|
801 |
+
this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);
|
802 |
+
}
|
803 |
+
}
|
804 |
+
|
805 |
+
this.timeDefined = true;
|
806 |
+
if (hasChanged) {
|
807 |
+
this._updateDateTime();
|
808 |
+
}
|
809 |
+
},
|
810 |
+
|
811 |
+
/*
|
812 |
+
* call custom onSelect.
|
813 |
+
* bind to sliders slidestop, and grid click.
|
814 |
+
*/
|
815 |
+
_onSelectHandler: function() {
|
816 |
+
var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;
|
817 |
+
var inputEl = this.$input ? this.$input[0] : null;
|
818 |
+
if (onSelect && inputEl) {
|
819 |
+
onSelect.apply(inputEl, [this.formattedDateTime, this]);
|
820 |
+
}
|
821 |
+
},
|
822 |
+
|
823 |
+
/*
|
824 |
+
* update our input with the new date time..
|
825 |
+
*/
|
826 |
+
_updateDateTime: function(dp_inst) {
|
827 |
+
dp_inst = this.inst || dp_inst;
|
828 |
+
//var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
|
829 |
+
var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay)),
|
830 |
+
dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
|
831 |
+
formatCfg = $.datepicker._getFormatConfig(dp_inst),
|
832 |
+
timeAvailable = dt !== null && this.timeDefined;
|
833 |
+
this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
|
834 |
+
var formattedDateTime = this.formattedDate;
|
835 |
+
|
836 |
+
// if a slider was changed but datepicker doesn't have a value yet, set it
|
837 |
+
if(dp_inst.lastVal===""){
|
838 |
+
dp_inst.currentYear=dp_inst.selectedYear;
|
839 |
+
dp_inst.currentMonth=dp_inst.selectedMonth;
|
840 |
+
dp_inst.currentDay=dp_inst.selectedDay;
|
841 |
+
}
|
842 |
+
|
843 |
+
/*
|
844 |
+
* remove following lines to force every changes in date picker to change the input value
|
845 |
+
* Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.
|
846 |
+
* If the user manually empty the value in the input field, the date picker will never change selected value.
|
847 |
+
*/
|
848 |
+
//if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {
|
849 |
+
// return;
|
850 |
+
//}
|
851 |
+
|
852 |
+
if (this._defaults.timeOnly === true) {
|
853 |
+
formattedDateTime = this.formattedTime;
|
854 |
+
} else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
|
855 |
+
formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;
|
856 |
+
}
|
857 |
+
|
858 |
+
this.formattedDateTime = formattedDateTime;
|
859 |
+
|
860 |
+
if (!this._defaults.showTimepicker) {
|
861 |
+
this.$input.val(this.formattedDate);
|
862 |
+
} else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) {
|
863 |
+
this.$altInput.val(this.formattedTime);
|
864 |
+
this.$input.val(this.formattedDate);
|
865 |
+
} else if (this.$altInput) {
|
866 |
+
this.$input.val(formattedDateTime);
|
867 |
+
var altFormattedDateTime = '',
|
868 |
+
altSeparator = this._defaults.altSeparator ? this._defaults.altSeparator : this._defaults.separator,
|
869 |
+
altTimeSuffix = this._defaults.altTimeSuffix ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
|
870 |
+
|
871 |
+
if(!this._defaults.timeOnly){
|
872 |
+
if (this._defaults.altFormat){
|
873 |
+
altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);
|
874 |
+
}
|
875 |
+
else{
|
876 |
+
altFormattedDateTime = this.formattedDate;
|
877 |
+
}
|
878 |
+
|
879 |
+
if (altFormattedDateTime){
|
880 |
+
altFormattedDateTime += altSeparator;
|
881 |
+
}
|
882 |
+
}
|
883 |
+
|
884 |
+
if(this._defaults.altTimeFormat){
|
885 |
+
altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;
|
886 |
+
}
|
887 |
+
else{
|
888 |
+
altFormattedDateTime += this.formattedTime + altTimeSuffix;
|
889 |
+
}
|
890 |
+
this.$altInput.val(altFormattedDateTime);
|
891 |
+
} else {
|
892 |
+
this.$input.val(formattedDateTime);
|
893 |
+
}
|
894 |
+
|
895 |
+
this.$input.trigger("change");
|
896 |
+
},
|
897 |
+
|
898 |
+
_onFocus: function() {
|
899 |
+
if (!this.$input.val() && this._defaults.defaultValue) {
|
900 |
+
this.$input.val(this._defaults.defaultValue);
|
901 |
+
var inst = $.datepicker._getInst(this.$input.get(0)),
|
902 |
+
tp_inst = $.datepicker._get(inst, 'timepicker');
|
903 |
+
if (tp_inst) {
|
904 |
+
if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
|
905 |
+
try {
|
906 |
+
$.datepicker._updateDatepicker(inst);
|
907 |
+
} catch (err) {
|
908 |
+
$.timepicker.log(err);
|
909 |
+
}
|
910 |
+
}
|
911 |
+
}
|
912 |
+
}
|
913 |
+
},
|
914 |
+
|
915 |
+
/*
|
916 |
+
* Small abstraction to control types
|
917 |
+
* We can add more, just be sure to follow the pattern: create, options, value
|
918 |
+
*/
|
919 |
+
_controls: {
|
920 |
+
// slider methods
|
921 |
+
slider: {
|
922 |
+
create: function(tp_inst, obj, unit, val, min, max, step){
|
923 |
+
var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60
|
924 |
+
return obj.prop('slide', null).slider({
|
925 |
+
orientation: "horizontal",
|
926 |
+
value: rtl? val*-1 : val,
|
927 |
+
min: rtl? max*-1 : min,
|
928 |
+
max: rtl? min*-1 : max,
|
929 |
+
step: step,
|
930 |
+
slide: function(event, ui) {
|
931 |
+
tp_inst.control.value(tp_inst, $(this), unit, rtl? ui.value*-1:ui.value);
|
932 |
+
tp_inst._onTimeChange();
|
933 |
+
},
|
934 |
+
stop: function(event, ui) {
|
935 |
+
tp_inst._onSelectHandler();
|
936 |
+
}
|
937 |
+
});
|
938 |
+
},
|
939 |
+
options: function(tp_inst, obj, unit, opts, val){
|
940 |
+
if(tp_inst._defaults.isRTL){
|
941 |
+
if(typeof(opts) == 'string'){
|
942 |
+
if(opts == 'min' || opts == 'max'){
|
943 |
+
if(val !== undefined){
|
944 |
+
return obj.slider(opts, val*-1);
|
945 |
+
}
|
946 |
+
return Math.abs(obj.slider(opts));
|
947 |
+
}
|
948 |
+
return obj.slider(opts);
|
949 |
+
}
|
950 |
+
var min = opts.min,
|
951 |
+
max = opts.max;
|
952 |
+
opts.min = opts.max = null;
|
953 |
+
if(min !== undefined){
|
954 |
+
opts.max = min * -1;
|
955 |
+
}
|
956 |
+
if(max !== undefined){
|
957 |
+
opts.min = max * -1;
|
958 |
+
}
|
959 |
+
return obj.slider(opts);
|
960 |
+
}
|
961 |
+
if(typeof(opts) == 'string' && val !== undefined){
|
962 |
+
return obj.slider(opts, val);
|
963 |
+
}
|
964 |
+
return obj.slider(opts);
|
965 |
+
},
|
966 |
+
value: function(tp_inst, obj, unit, val){
|
967 |
+
if(tp_inst._defaults.isRTL){
|
968 |
+
if(val !== undefined){
|
969 |
+
return obj.slider('value', val*-1);
|
970 |
+
}
|
971 |
+
return Math.abs(obj.slider('value'));
|
972 |
+
}
|
973 |
+
if(val !== undefined){
|
974 |
+
return obj.slider('value', val);
|
975 |
+
}
|
976 |
+
return obj.slider('value');
|
977 |
+
}
|
978 |
+
},
|
979 |
+
// select methods
|
980 |
+
select: {
|
981 |
+
create: function(tp_inst, obj, unit, val, min, max, step){
|
982 |
+
var sel = '<select class="ui-timepicker-select" data-unit="'+ unit +'" data-min="'+ min +'" data-max="'+ max +'" data-step="'+ step +'">',
|
983 |
+
format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat;
|
984 |
+
|
985 |
+
for(var i=min; i<=max; i+=step){
|
986 |
+
sel += '<option value="'+ i +'"'+ (i==val? ' selected':'') +'>';
|
987 |
+
if(unit == 'hour'){
|
988 |
+
sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig,'')), {hour:i}, tp_inst._defaults);
|
989 |
+
}
|
990 |
+
else if(unit == 'millisec' || unit == 'microsec' || i >= 10){ sel += i; }
|
991 |
+
else {sel += '0'+ i.toString(); }
|
992 |
+
sel += '</option>';
|
993 |
+
}
|
994 |
+
sel += '</select>';
|
995 |
+
|
996 |
+
obj.children('select').remove();
|
997 |
+
|
998 |
+
$(sel).appendTo(obj).change(function(e){
|
999 |
+
tp_inst._onTimeChange();
|
1000 |
+
tp_inst._onSelectHandler();
|
1001 |
+
});
|
1002 |
+
|
1003 |
+
return obj;
|
1004 |
+
},
|
1005 |
+
options: function(tp_inst, obj, unit, opts, val){
|
1006 |
+
var o = {},
|
1007 |
+
$t = obj.children('select');
|
1008 |
+
if(typeof(opts) == 'string'){
|
1009 |
+
if(val === undefined){
|
1010 |
+
return $t.data(opts);
|
1011 |
+
}
|
1012 |
+
o[opts] = val;
|
1013 |
+
}
|
1014 |
+
else{ o = opts; }
|
1015 |
+
return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
|
1016 |
+
},
|
1017 |
+
value: function(tp_inst, obj, unit, val){
|
1018 |
+
var $t = obj.children('select');
|
1019 |
+
if(val !== undefined){
|
1020 |
+
return $t.val(val);
|
1021 |
+
}
|
1022 |
+
return $t.val();
|
1023 |
+
}
|
1024 |
+
}
|
1025 |
+
} // end _controls
|
1026 |
+
|
1027 |
+
});
|
1028 |
+
|
1029 |
+
$.fn.extend({
|
1030 |
+
/*
|
1031 |
+
* shorthand just to use timepicker..
|
1032 |
+
*/
|
1033 |
+
timepicker: function(o) {
|
1034 |
+
o = o || {};
|
1035 |
+
var tmp_args = Array.prototype.slice.call(arguments);
|
1036 |
+
|
1037 |
+
if (typeof o == 'object') {
|
1038 |
+
tmp_args[0] = $.extend(o, {
|
1039 |
+
timeOnly: true
|
1040 |
+
});
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
return $(this).each(function() {
|
1044 |
+
$.fn.datetimepicker.apply($(this), tmp_args);
|
1045 |
+
});
|
1046 |
+
},
|
1047 |
+
|
1048 |
+
/*
|
1049 |
+
* extend timepicker to datepicker
|
1050 |
+
*/
|
1051 |
+
datetimepicker: function(o) {
|
1052 |
+
o = o || {};
|
1053 |
+
var tmp_args = arguments;
|
1054 |
+
|
1055 |
+
if (typeof(o) == 'string') {
|
1056 |
+
if (o == 'getDate') {
|
1057 |
+
return $.fn.datepicker.apply($(this[0]), tmp_args);
|
1058 |
+
} else {
|
1059 |
+
return this.each(function() {
|
1060 |
+
var $t = $(this);
|
1061 |
+
$t.datepicker.apply($t, tmp_args);
|
1062 |
+
});
|
1063 |
+
}
|
1064 |
+
} else {
|
1065 |
+
return this.each(function() {
|
1066 |
+
var $t = $(this);
|
1067 |
+
$t.datepicker($.timepicker._newInst($t, o)._defaults);
|
1068 |
+
});
|
1069 |
+
}
|
1070 |
+
}
|
1071 |
+
});
|
1072 |
+
|
1073 |
+
/*
|
1074 |
+
* Public Utility to parse date and time
|
1075 |
+
*/
|
1076 |
+
$.datepicker.parseDateTime = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
|
1077 |
+
var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);
|
1078 |
+
if (parseRes.timeObj) {
|
1079 |
+
var t = parseRes.timeObj;
|
1080 |
+
parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);
|
1081 |
+
parseRes.date.setMicroseconds(t.microsec);
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
return parseRes.date;
|
1085 |
+
};
|
1086 |
+
|
1087 |
+
/*
|
1088 |
+
* Public utility to parse time
|
1089 |
+
*/
|
1090 |
+
$.datepicker.parseTime = function(timeFormat, timeString, options) {
|
1091 |
+
var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}),
|
1092 |
+
iso8601 = (timeFormat.replace(/\'.*?\'/g,'').indexOf('Z') !== -1);
|
1093 |
+
|
1094 |
+
// Strict parse requires the timeString to match the timeFormat exactly
|
1095 |
+
var strictParse = function(f, s, o){
|
1096 |
+
|
1097 |
+
// pattern for standard and localized AM/PM markers
|
1098 |
+
var getPatternAmpm = function(amNames, pmNames) {
|
1099 |
+
var markers = [];
|
1100 |
+
if (amNames) {
|
1101 |
+
$.merge(markers, amNames);
|
1102 |
+
}
|
1103 |
+
if (pmNames) {
|
1104 |
+
$.merge(markers, pmNames);
|
1105 |
+
}
|
1106 |
+
markers = $.map(markers, function(val) {
|
1107 |
+
return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&');
|
1108 |
+
});
|
1109 |
+
return '(' + markers.join('|') + ')?';
|
1110 |
+
};
|
1111 |
+
|
1112 |
+
// figure out position of time elements.. cause js cant do named captures
|
1113 |
+
var getFormatPositions = function(timeFormat) {
|
1114 |
+
var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),
|
1115 |
+
orders = {
|
1116 |
+
h: -1,
|
1117 |
+
m: -1,
|
1118 |
+
s: -1,
|
1119 |
+
l: -1,
|
1120 |
+
c: -1,
|
1121 |
+
t: -1,
|
1122 |
+
z: -1
|
1123 |
+
};
|
1124 |
+
|
1125 |
+
if (finds) {
|
1126 |
+
for (var i = 0; i < finds.length; i++) {
|
1127 |
+
if (orders[finds[i].toString().charAt(0)] == -1) {
|
1128 |
+
orders[finds[i].toString().charAt(0)] = i + 1;
|
1129 |
+
}
|
1130 |
+
}
|
1131 |
+
}
|
1132 |
+
return orders;
|
1133 |
+
};
|
1134 |
+
|
1135 |
+
var regstr = '^' + f.toString()
|
1136 |
+
.replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {
|
1137 |
+
var ml = match.length;
|
1138 |
+
switch (match.charAt(0).toLowerCase()) {
|
1139 |
+
case 'h': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
|
1140 |
+
case 'm': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
|
1141 |
+
case 's': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
|
1142 |
+
case 'l': return '(\\d?\\d?\\d)';
|
1143 |
+
case 'c': return '(\\d?\\d?\\d)';
|
1144 |
+
case 'z': return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';
|
1145 |
+
case 't': return getPatternAmpm(o.amNames, o.pmNames);
|
1146 |
+
default: // literal escaped in quotes
|
1147 |
+
return '(' + match.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function (m) { return "\\" + m; }) + ')?';
|
1148 |
+
}
|
1149 |
+
})
|
1150 |
+
.replace(/\s/g, '\\s?') +
|
1151 |
+
o.timeSuffix + '$',
|
1152 |
+
order = getFormatPositions(f),
|
1153 |
+
ampm = '',
|
1154 |
+
treg;
|
1155 |
+
|
1156 |
+
treg = s.match(new RegExp(regstr, 'i'));
|
1157 |
+
|
1158 |
+
var resTime = {
|
1159 |
+
hour: 0,
|
1160 |
+
minute: 0,
|
1161 |
+
second: 0,
|
1162 |
+
millisec: 0,
|
1163 |
+
microsec: 0
|
1164 |
+
};
|
1165 |
+
|
1166 |
+
if (treg) {
|
1167 |
+
if (order.t !== -1) {
|
1168 |
+
if (treg[order.t] === undefined || treg[order.t].length === 0) {
|
1169 |
+
ampm = '';
|
1170 |
+
resTime.ampm = '';
|
1171 |
+
} else {
|
1172 |
+
ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ? 'AM' : 'PM';
|
1173 |
+
resTime.ampm = o[ampm == 'AM' ? 'amNames' : 'pmNames'][0];
|
1174 |
+
}
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
if (order.h !== -1) {
|
1178 |
+
if (ampm == 'AM' && treg[order.h] == '12') {
|
1179 |
+
resTime.hour = 0; // 12am = 0 hour
|
1180 |
+
} else {
|
1181 |
+
if (ampm == 'PM' && treg[order.h] != '12') {
|
1182 |
+
resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12
|
1183 |
+
} else {
|
1184 |
+
resTime.hour = Number(treg[order.h]);
|
1185 |
+
}
|
1186 |
+
}
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
if (order.m !== -1) {
|
1190 |
+
resTime.minute = Number(treg[order.m]);
|
1191 |
+
}
|
1192 |
+
if (order.s !== -1) {
|
1193 |
+
resTime.second = Number(treg[order.s]);
|
1194 |
+
}
|
1195 |
+
if (order.l !== -1) {
|
1196 |
+
resTime.millisec = Number(treg[order.l]);
|
1197 |
+
}
|
1198 |
+
if (order.c !== -1) {
|
1199 |
+
resTime.microsec = Number(treg[order.c]);
|
1200 |
+
}
|
1201 |
+
if (order.z !== -1 && treg[order.z] !== undefined) {
|
1202 |
+
resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]);
|
1203 |
+
}
|
1204 |
+
|
1205 |
+
|
1206 |
+
return resTime;
|
1207 |
+
}
|
1208 |
+
return false;
|
1209 |
+
};// end strictParse
|
1210 |
+
|
1211 |
+
// First try JS Date, if that fails, use strictParse
|
1212 |
+
var looseParse = function(f,s,o){
|
1213 |
+
try{
|
1214 |
+
var d = new Date('2012-01-01 '+ s);
|
1215 |
+
if(isNaN(d.getTime())){
|
1216 |
+
d = new Date('2012-01-01T'+ s);
|
1217 |
+
if(isNaN(d.getTime())){
|
1218 |
+
d = new Date('01/01/2012 '+ s);
|
1219 |
+
if(isNaN(d.getTime())){
|
1220 |
+
throw "Unable to parse time with native Date: "+ s;
|
1221 |
+
}
|
1222 |
+
}
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
return {
|
1226 |
+
hour: d.getHours(),
|
1227 |
+
minute: d.getMinutes(),
|
1228 |
+
second: d.getSeconds(),
|
1229 |
+
millisec: d.getMilliseconds(),
|
1230 |
+
microsec: d.getMicroseconds(),
|
1231 |
+
timezone: d.getTimezoneOffset()*-1
|
1232 |
+
};
|
1233 |
+
}
|
1234 |
+
catch(err){
|
1235 |
+
try{
|
1236 |
+
return strictParse(f,s,o);
|
1237 |
+
}
|
1238 |
+
catch(err2){
|
1239 |
+
$.timepicker.log("Unable to parse \ntimeString: "+ s +"\ntimeFormat: "+ f);
|
1240 |
+
}
|
1241 |
+
}
|
1242 |
+
return false;
|
1243 |
+
}; // end looseParse
|
1244 |
+
|
1245 |
+
if(typeof o.parse === "function"){
|
1246 |
+
return o.parse(timeFormat, timeString, o);
|
1247 |
+
}
|
1248 |
+
if(o.parse === 'loose'){
|
1249 |
+
return looseParse(timeFormat, timeString, o);
|
1250 |
+
}
|
1251 |
+
return strictParse(timeFormat, timeString, o);
|
1252 |
+
};
|
1253 |
+
|
1254 |
+
/*
|
1255 |
+
* Public utility to format the time
|
1256 |
+
* format = string format of the time
|
1257 |
+
* time = a {}, not a Date() for timezones
|
1258 |
+
* options = essentially the regional[].. amNames, pmNames, ampm
|
1259 |
+
*/
|
1260 |
+
$.datepicker.formatTime = function(format, time, options) {
|
1261 |
+
options = options || {};
|
1262 |
+
options = $.extend({}, $.timepicker._defaults, options);
|
1263 |
+
time = $.extend({
|
1264 |
+
hour: 0,
|
1265 |
+
minute: 0,
|
1266 |
+
second: 0,
|
1267 |
+
millisec: 0,
|
1268 |
+
timezone: 0
|
1269 |
+
}, time);
|
1270 |
+
|
1271 |
+
var tmptime = format,
|
1272 |
+
ampmName = options.amNames[0],
|
1273 |
+
hour = parseInt(time.hour, 10);
|
1274 |
+
|
1275 |
+
if (hour > 11) {
|
1276 |
+
ampmName = options.pmNames[0];
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|('.*?'|".*?"))/g, function(match) {
|
1280 |
+
switch (match) {
|
1281 |
+
case 'HH':
|
1282 |
+
return ('0' + hour).slice(-2);
|
1283 |
+
case 'H':
|
1284 |
+
return hour;
|
1285 |
+
case 'hh':
|
1286 |
+
return ('0' + convert24to12(hour)).slice(-2);
|
1287 |
+
case 'h':
|
1288 |
+
return convert24to12(hour);
|
1289 |
+
case 'mm':
|
1290 |
+
return ('0' + time.minute).slice(-2);
|
1291 |
+
case 'm':
|
1292 |
+
return time.minute;
|
1293 |
+
case 'ss':
|
1294 |
+
return ('0' + time.second).slice(-2);
|
1295 |
+
case 's':
|
1296 |
+
return time.second;
|
1297 |
+
case 'l':
|
1298 |
+
return ('00' + time.millisec).slice(-3);
|
1299 |
+
case 'c':
|
1300 |
+
return ('00' + time.microsec).slice(-3);
|
1301 |
+
case 'z':
|
1302 |
+
return $.timepicker.timezoneOffsetString(time.timezone === null? options.timezone : time.timezone, false);
|
1303 |
+
case 'Z':
|
1304 |
+
return $.timepicker.timezoneOffsetString(time.timezone === null? options.timezone : time.timezone, true);
|
1305 |
+
case 'T':
|
1306 |
+
return ampmName.charAt(0).toUpperCase();
|
1307 |
+
case 'TT':
|
1308 |
+
return ampmName.toUpperCase();
|
1309 |
+
case 't':
|
1310 |
+
return ampmName.charAt(0).toLowerCase();
|
1311 |
+
case 'tt':
|
1312 |
+
return ampmName.toLowerCase();
|
1313 |
+
default:
|
1314 |
+
return match.replace(/\'/g, "") || "'";
|
1315 |
+
}
|
1316 |
+
});
|
1317 |
+
|
1318 |
+
tmptime = $.trim(tmptime);
|
1319 |
+
return tmptime;
|
1320 |
+
};
|
1321 |
+
|
1322 |
+
/*
|
1323 |
+
* the bad hack :/ override datepicker so it doesnt close on select
|
1324 |
+
// inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
|
1325 |
+
*/
|
1326 |
+
$.datepicker._base_selectDate = $.datepicker._selectDate;
|
1327 |
+
$.datepicker._selectDate = function(id, dateStr) {
|
1328 |
+
var inst = this._getInst($(id)[0]),
|
1329 |
+
tp_inst = this._get(inst, 'timepicker');
|
1330 |
+
|
1331 |
+
if (tp_inst) {
|
1332 |
+
tp_inst._limitMinMaxDateTime(inst, true);
|
1333 |
+
inst.inline = inst.stay_open = true;
|
1334 |
+
//This way the onSelect handler called from calendarpicker get the full dateTime
|
1335 |
+
this._base_selectDate(id, dateStr);
|
1336 |
+
inst.inline = inst.stay_open = false;
|
1337 |
+
this._notifyChange(inst);
|
1338 |
+
this._updateDatepicker(inst);
|
1339 |
+
} else {
|
1340 |
+
this._base_selectDate(id, dateStr);
|
1341 |
+
}
|
1342 |
+
};
|
1343 |
+
|
1344 |
+
/*
|
1345 |
+
* second bad hack :/ override datepicker so it triggers an event when changing the input field
|
1346 |
+
* and does not redraw the datepicker on every selectDate event
|
1347 |
+
*/
|
1348 |
+
$.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;
|
1349 |
+
$.datepicker._updateDatepicker = function(inst) {
|
1350 |
+
|
1351 |
+
// don't popup the datepicker if there is another instance already opened
|
1352 |
+
var input = inst.input[0];
|
1353 |
+
if ($.datepicker._curInst && $.datepicker._curInst != inst && $.datepicker._datepickerShowing && $.datepicker._lastInput != input) {
|
1354 |
+
return;
|
1355 |
+
}
|
1356 |
+
|
1357 |
+
if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {
|
1358 |
+
|
1359 |
+
this._base_updateDatepicker(inst);
|
1360 |
+
|
1361 |
+
// Reload the time control when changing something in the input text field.
|
1362 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1363 |
+
if (tp_inst) {
|
1364 |
+
tp_inst._addTimePicker(inst);
|
1365 |
+
}
|
1366 |
+
}
|
1367 |
+
};
|
1368 |
+
|
1369 |
+
/*
|
1370 |
+
* third bad hack :/ override datepicker so it allows spaces and colon in the input field
|
1371 |
+
*/
|
1372 |
+
$.datepicker._base_doKeyPress = $.datepicker._doKeyPress;
|
1373 |
+
$.datepicker._doKeyPress = function(event) {
|
1374 |
+
var inst = $.datepicker._getInst(event.target),
|
1375 |
+
tp_inst = $.datepicker._get(inst, 'timepicker');
|
1376 |
+
|
1377 |
+
if (tp_inst) {
|
1378 |
+
if ($.datepicker._get(inst, 'constrainInput')) {
|
1379 |
+
var ampm = tp_inst.support.ampm,
|
1380 |
+
tz = tp_inst._defaults.showTimezone !== null? tp_inst._defaults.showTimezone : tp_inst.support.timezone,
|
1381 |
+
dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
|
1382 |
+
datetimeChars = tp_inst._defaults.timeFormat.toString()
|
1383 |
+
.replace(/[hms]/g, '')
|
1384 |
+
.replace(/TT/g, ampm ? 'APM' : '')
|
1385 |
+
.replace(/Tt/g, ampm ? 'AaPpMm' : '')
|
1386 |
+
.replace(/tT/g, ampm ? 'AaPpMm' : '')
|
1387 |
+
.replace(/T/g, ampm ? 'AP' : '')
|
1388 |
+
.replace(/tt/g, ampm ? 'apm' : '')
|
1389 |
+
.replace(/t/g, ampm ? 'ap' : '') +
|
1390 |
+
" " + tp_inst._defaults.separator +
|
1391 |
+
tp_inst._defaults.timeSuffix +
|
1392 |
+
(tz ? tp_inst._defaults.timezoneList.join('') : '') +
|
1393 |
+
(tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
|
1394 |
+
dateChars,
|
1395 |
+
chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
|
1396 |
+
return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
|
1397 |
+
}
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
return $.datepicker._base_doKeyPress(event);
|
1401 |
+
};
|
1402 |
+
|
1403 |
+
/*
|
1404 |
+
* Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField
|
1405 |
+
*/
|
1406 |
+
$.datepicker._base_updateAlternate = $.datepicker._updateAlternate;
|
1407 |
+
/* Update any alternate field to synchronise with the main field. */
|
1408 |
+
$.datepicker._updateAlternate = function(inst) {
|
1409 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1410 |
+
if(tp_inst){
|
1411 |
+
var altField = tp_inst._defaults.altField;
|
1412 |
+
if (altField) { // update alternate field too
|
1413 |
+
var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,
|
1414 |
+
date = this._getDate(inst),
|
1415 |
+
formatCfg = $.datepicker._getFormatConfig(inst),
|
1416 |
+
altFormattedDateTime = '',
|
1417 |
+
altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
|
1418 |
+
altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,
|
1419 |
+
altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;
|
1420 |
+
|
1421 |
+
altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;
|
1422 |
+
if(!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null){
|
1423 |
+
if(tp_inst._defaults.altFormat){
|
1424 |
+
altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime;
|
1425 |
+
}
|
1426 |
+
else{
|
1427 |
+
altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime;
|
1428 |
+
}
|
1429 |
+
}
|
1430 |
+
$(altField).val(altFormattedDateTime);
|
1431 |
+
}
|
1432 |
+
}
|
1433 |
+
else{
|
1434 |
+
$.datepicker._base_updateAlternate(inst);
|
1435 |
+
}
|
1436 |
+
};
|
1437 |
+
|
1438 |
+
/*
|
1439 |
+
* Override key up event to sync manual input changes.
|
1440 |
+
*/
|
1441 |
+
$.datepicker._base_doKeyUp = $.datepicker._doKeyUp;
|
1442 |
+
$.datepicker._doKeyUp = function(event) {
|
1443 |
+
var inst = $.datepicker._getInst(event.target),
|
1444 |
+
tp_inst = $.datepicker._get(inst, 'timepicker');
|
1445 |
+
|
1446 |
+
if (tp_inst) {
|
1447 |
+
if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
|
1448 |
+
try {
|
1449 |
+
$.datepicker._updateDatepicker(inst);
|
1450 |
+
} catch (err) {
|
1451 |
+
$.timepicker.log(err);
|
1452 |
+
}
|
1453 |
+
}
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
return $.datepicker._base_doKeyUp(event);
|
1457 |
+
};
|
1458 |
+
|
1459 |
+
/*
|
1460 |
+
* override "Today" button to also grab the time.
|
1461 |
+
*/
|
1462 |
+
$.datepicker._base_gotoToday = $.datepicker._gotoToday;
|
1463 |
+
$.datepicker._gotoToday = function(id) {
|
1464 |
+
var inst = this._getInst($(id)[0]),
|
1465 |
+
$dp = inst.dpDiv;
|
1466 |
+
this._base_gotoToday(id);
|
1467 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1468 |
+
selectLocalTimezone(tp_inst);
|
1469 |
+
var now = new Date();
|
1470 |
+
this._setTime(inst, now);
|
1471 |
+
$('.ui-datepicker-today', $dp).click();
|
1472 |
+
};
|
1473 |
+
|
1474 |
+
/*
|
1475 |
+
* Disable & enable the Time in the datetimepicker
|
1476 |
+
*/
|
1477 |
+
$.datepicker._disableTimepickerDatepicker = function(target) {
|
1478 |
+
var inst = this._getInst(target);
|
1479 |
+
if (!inst) {
|
1480 |
+
return;
|
1481 |
+
}
|
1482 |
+
|
1483 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1484 |
+
$(target).datepicker('getDate'); // Init selected[Year|Month|Day]
|
1485 |
+
if (tp_inst) {
|
1486 |
+
tp_inst._defaults.showTimepicker = false;
|
1487 |
+
tp_inst._updateDateTime(inst);
|
1488 |
+
}
|
1489 |
+
};
|
1490 |
+
|
1491 |
+
$.datepicker._enableTimepickerDatepicker = function(target) {
|
1492 |
+
var inst = this._getInst(target);
|
1493 |
+
if (!inst) {
|
1494 |
+
return;
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1498 |
+
$(target).datepicker('getDate'); // Init selected[Year|Month|Day]
|
1499 |
+
if (tp_inst) {
|
1500 |
+
tp_inst._defaults.showTimepicker = true;
|
1501 |
+
tp_inst._addTimePicker(inst); // Could be disabled on page load
|
1502 |
+
tp_inst._updateDateTime(inst);
|
1503 |
+
}
|
1504 |
+
};
|
1505 |
+
|
1506 |
+
/*
|
1507 |
+
* Create our own set time function
|
1508 |
+
*/
|
1509 |
+
$.datepicker._setTime = function(inst, date) {
|
1510 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1511 |
+
if (tp_inst) {
|
1512 |
+
var defaults = tp_inst._defaults;
|
1513 |
+
|
1514 |
+
// calling _setTime with no date sets time to defaults
|
1515 |
+
tp_inst.hour = date ? date.getHours() : defaults.hour;
|
1516 |
+
tp_inst.minute = date ? date.getMinutes() : defaults.minute;
|
1517 |
+
tp_inst.second = date ? date.getSeconds() : defaults.second;
|
1518 |
+
tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
|
1519 |
+
tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;
|
1520 |
+
|
1521 |
+
//check if within min/max times..
|
1522 |
+
tp_inst._limitMinMaxDateTime(inst, true);
|
1523 |
+
|
1524 |
+
tp_inst._onTimeChange();
|
1525 |
+
tp_inst._updateDateTime(inst);
|
1526 |
+
}
|
1527 |
+
};
|
1528 |
+
|
1529 |
+
/*
|
1530 |
+
* Create new public method to set only time, callable as $().datepicker('setTime', date)
|
1531 |
+
*/
|
1532 |
+
$.datepicker._setTimeDatepicker = function(target, date, withDate) {
|
1533 |
+
var inst = this._getInst(target);
|
1534 |
+
if (!inst) {
|
1535 |
+
return;
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1539 |
+
|
1540 |
+
if (tp_inst) {
|
1541 |
+
this._setDateFromField(inst);
|
1542 |
+
var tp_date;
|
1543 |
+
if (date) {
|
1544 |
+
if (typeof date == "string") {
|
1545 |
+
tp_inst._parseTime(date, withDate);
|
1546 |
+
tp_date = new Date();
|
1547 |
+
tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
|
1548 |
+
tp_date.setMicroseconds(tp_inst.microsec);
|
1549 |
+
} else {
|
1550 |
+
tp_date = new Date(date.getTime());
|
1551 |
+
tp_date.setMicroseconds(date.getMicroseconds());
|
1552 |
+
}
|
1553 |
+
if (tp_date.toString() == 'Invalid Date') {
|
1554 |
+
tp_date = undefined;
|
1555 |
+
}
|
1556 |
+
this._setTime(inst, tp_date);
|
1557 |
+
}
|
1558 |
+
}
|
1559 |
+
|
1560 |
+
};
|
1561 |
+
|
1562 |
+
/*
|
1563 |
+
* override setDate() to allow setting time too within Date object
|
1564 |
+
*/
|
1565 |
+
$.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;
|
1566 |
+
$.datepicker._setDateDatepicker = function(target, date) {
|
1567 |
+
var inst = this._getInst(target);
|
1568 |
+
if (!inst) {
|
1569 |
+
return;
|
1570 |
+
}
|
1571 |
+
|
1572 |
+
if(typeof(date) === 'string'){
|
1573 |
+
date = new Date(date);
|
1574 |
+
if(!date.getTime()){
|
1575 |
+
$.timepicker.log("Error creating Date object from string.");
|
1576 |
+
}
|
1577 |
+
}
|
1578 |
+
|
1579 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1580 |
+
var tp_date;
|
1581 |
+
if (date instanceof Date) {
|
1582 |
+
tp_date = new Date(date.getTime());
|
1583 |
+
tp_date.setMicroseconds(date.getMicroseconds());
|
1584 |
+
} else {
|
1585 |
+
tp_date = date;
|
1586 |
+
}
|
1587 |
+
|
1588 |
+
// This is important if you are using the timezone option, javascript's Date
|
1589 |
+
// object will only return the timezone offset for the current locale, so we
|
1590 |
+
// adjust it accordingly. If not using timezone option this won't matter..
|
1591 |
+
// If a timezone is different in tp, keep the timezone as is
|
1592 |
+
if(tp_inst){
|
1593 |
+
// look out for DST if tz wasn't specified
|
1594 |
+
if(!tp_inst.support.timezone && tp_inst._defaults.timezone === null){
|
1595 |
+
tp_inst.timezone = tp_date.getTimezoneOffset()*-1;
|
1596 |
+
}
|
1597 |
+
date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
|
1598 |
+
tp_date = $.timepicker.timezoneAdjust(tp_date, tp_inst.timezone);
|
1599 |
+
}
|
1600 |
+
|
1601 |
+
this._updateDatepicker(inst);
|
1602 |
+
this._base_setDateDatepicker.apply(this, arguments);
|
1603 |
+
this._setTimeDatepicker(target, tp_date, true);
|
1604 |
+
};
|
1605 |
+
|
1606 |
+
/*
|
1607 |
+
* override getDate() to allow getting time too within Date object
|
1608 |
+
*/
|
1609 |
+
$.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
|
1610 |
+
$.datepicker._getDateDatepicker = function(target, noDefault) {
|
1611 |
+
var inst = this._getInst(target);
|
1612 |
+
if (!inst) {
|
1613 |
+
return;
|
1614 |
+
}
|
1615 |
+
|
1616 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1617 |
+
|
1618 |
+
if (tp_inst) {
|
1619 |
+
// if it hasn't yet been defined, grab from field
|
1620 |
+
if(inst.lastVal === undefined){
|
1621 |
+
this._setDateFromField(inst, noDefault);
|
1622 |
+
}
|
1623 |
+
|
1624 |
+
var date = this._getDate(inst);
|
1625 |
+
if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) {
|
1626 |
+
date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
|
1627 |
+
date.setMicroseconds(tp_inst.microsec);
|
1628 |
+
|
1629 |
+
// This is important if you are using the timezone option, javascript's Date
|
1630 |
+
// object will only return the timezone offset for the current locale, so we
|
1631 |
+
// adjust it accordingly. If not using timezone option this won't matter..
|
1632 |
+
if(tp_inst.timezone != null){
|
1633 |
+
// look out for DST if tz wasn't specified
|
1634 |
+
if(!tp_inst.support.timezone && tp_inst._defaults.timezone === null){
|
1635 |
+
tp_inst.timezone = date.getTimezoneOffset()*-1;
|
1636 |
+
}
|
1637 |
+
date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
|
1638 |
+
}
|
1639 |
+
}
|
1640 |
+
return date;
|
1641 |
+
}
|
1642 |
+
return this._base_getDateDatepicker(target, noDefault);
|
1643 |
+
};
|
1644 |
+
|
1645 |
+
/*
|
1646 |
+
* override parseDate() because UI 1.8.14 throws an error about "Extra characters"
|
1647 |
+
* An option in datapicker to ignore extra format characters would be nicer.
|
1648 |
+
*/
|
1649 |
+
$.datepicker._base_parseDate = $.datepicker.parseDate;
|
1650 |
+
$.datepicker.parseDate = function(format, value, settings) {
|
1651 |
+
var date;
|
1652 |
+
try {
|
1653 |
+
date = this._base_parseDate(format, value, settings);
|
1654 |
+
} catch (err) {
|
1655 |
+
// Hack! The error message ends with a colon, a space, and
|
1656 |
+
// the "extra" characters. We rely on that instead of
|
1657 |
+
// attempting to perfectly reproduce the parsing algorithm.
|
1658 |
+
if (err.indexOf(":") >= 0) {
|
1659 |
+
date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings);
|
1660 |
+
$.timepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format);
|
1661 |
+
} else {
|
1662 |
+
throw err;
|
1663 |
+
}
|
1664 |
+
}
|
1665 |
+
return date;
|
1666 |
+
};
|
1667 |
+
|
1668 |
+
/*
|
1669 |
+
* override formatDate to set date with time to the input
|
1670 |
+
*/
|
1671 |
+
$.datepicker._base_formatDate = $.datepicker._formatDate;
|
1672 |
+
$.datepicker._formatDate = function(inst, day, month, year) {
|
1673 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1674 |
+
if (tp_inst) {
|
1675 |
+
tp_inst._updateDateTime(inst);
|
1676 |
+
return tp_inst.$input.val();
|
1677 |
+
}
|
1678 |
+
return this._base_formatDate(inst);
|
1679 |
+
};
|
1680 |
+
|
1681 |
+
/*
|
1682 |
+
* override options setter to add time to maxDate(Time) and minDate(Time). MaxDate
|
1683 |
+
*/
|
1684 |
+
$.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;
|
1685 |
+
$.datepicker._optionDatepicker = function(target, name, value) {
|
1686 |
+
var inst = this._getInst(target),
|
1687 |
+
name_clone;
|
1688 |
+
if (!inst) {
|
1689 |
+
return null;
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
var tp_inst = this._get(inst, 'timepicker');
|
1693 |
+
if (tp_inst) {
|
1694 |
+
var min = null,
|
1695 |
+
max = null,
|
1696 |
+
onselect = null,
|
1697 |
+
overrides = tp_inst._defaults.evnts,
|
1698 |
+
fns = {},
|
1699 |
+
prop;
|
1700 |
+
if (typeof name == 'string') { // if min/max was set with the string
|
1701 |
+
if (name === 'minDate' || name === 'minDateTime') {
|
1702 |
+
min = value;
|
1703 |
+
} else if (name === 'maxDate' || name === 'maxDateTime') {
|
1704 |
+
max = value;
|
1705 |
+
} else if (name === 'onSelect') {
|
1706 |
+
onselect = value;
|
1707 |
+
} else if (overrides.hasOwnProperty(name)) {
|
1708 |
+
if (typeof (value) === 'undefined') {
|
1709 |
+
return overrides[name];
|
1710 |
+
}
|
1711 |
+
fns[name] = value;
|
1712 |
+
name_clone = {}; //empty results in exiting function after overrides updated
|
1713 |
+
}
|
1714 |
+
} else if (typeof name == 'object') { //if min/max was set with the JSON
|
1715 |
+
if (name.minDate) {
|
1716 |
+
min = name.minDate;
|
1717 |
+
} else if (name.minDateTime) {
|
1718 |
+
min = name.minDateTime;
|
1719 |
+
} else if (name.maxDate) {
|
1720 |
+
max = name.maxDate;
|
1721 |
+
} else if (name.maxDateTime) {
|
1722 |
+
max = name.maxDateTime;
|
1723 |
+
}
|
1724 |
+
for (prop in overrides) {
|
1725 |
+
if (overrides.hasOwnProperty(prop) && name[prop]) {
|
1726 |
+
fns[prop] = name[prop];
|
1727 |
+
}
|
1728 |
+
}
|
1729 |
+
}
|
1730 |
+
for (prop in fns) {
|
1731 |
+
if (fns.hasOwnProperty(prop)) {
|
1732 |
+
overrides[prop] = fns[prop];
|
1733 |
+
if (!name_clone) { name_clone = $.extend({}, name);}
|
1734 |
+
delete name_clone[prop];
|
1735 |
+
}
|
1736 |
+
}
|
1737 |
+
if (name_clone && isEmptyObject(name_clone)) { return; }
|
1738 |
+
if (min) { //if min was set
|
1739 |
+
if (min === 0) {
|
1740 |
+
min = new Date();
|
1741 |
+
} else {
|
1742 |
+
min = new Date(min);
|
1743 |
+
}
|
1744 |
+
tp_inst._defaults.minDate = min;
|
1745 |
+
tp_inst._defaults.minDateTime = min;
|
1746 |
+
} else if (max) { //if max was set
|
1747 |
+
if (max === 0) {
|
1748 |
+
max = new Date();
|
1749 |
+
} else {
|
1750 |
+
max = new Date(max);
|
1751 |
+
}
|
1752 |
+
tp_inst._defaults.maxDate = max;
|
1753 |
+
tp_inst._defaults.maxDateTime = max;
|
1754 |
+
} else if (onselect) {
|
1755 |
+
tp_inst._defaults.onSelect = onselect;
|
1756 |
+
}
|
1757 |
+
}
|
1758 |
+
if (value === undefined) {
|
1759 |
+
return this._base_optionDatepicker.call($.datepicker, target, name);
|
1760 |
+
}
|
1761 |
+
return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);
|
1762 |
+
};
|
1763 |
+
|
1764 |
+
/*
|
1765 |
+
* jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype,
|
1766 |
+
* it will return false for all objects
|
1767 |
+
*/
|
1768 |
+
var isEmptyObject = function(obj) {
|
1769 |
+
var prop;
|
1770 |
+
for (prop in obj) {
|
1771 |
+
if (obj.hasOwnProperty(obj)) {
|
1772 |
+
return false;
|
1773 |
+
}
|
1774 |
+
}
|
1775 |
+
return true;
|
1776 |
+
};
|
1777 |
+
|
1778 |
+
/*
|
1779 |
+
* jQuery extend now ignores nulls!
|
1780 |
+
*/
|
1781 |
+
var extendRemove = function(target, props) {
|
1782 |
+
$.extend(target, props);
|
1783 |
+
for (var name in props) {
|
1784 |
+
if (props[name] === null || props[name] === undefined) {
|
1785 |
+
target[name] = props[name];
|
1786 |
+
}
|
1787 |
+
}
|
1788 |
+
return target;
|
1789 |
+
};
|
1790 |
+
|
1791 |
+
/*
|
1792 |
+
* Determine by the time format which units are supported
|
1793 |
+
* Returns an object of booleans for each unit
|
1794 |
+
*/
|
1795 |
+
var detectSupport = function(timeFormat){
|
1796 |
+
var tf = timeFormat.replace(/\'.*?\'/g,'').toLowerCase(), // removes literals
|
1797 |
+
isIn = function(f, t){ // does the format contain the token?
|
1798 |
+
return f.indexOf(t) !== -1? true:false;
|
1799 |
+
};
|
1800 |
+
return {
|
1801 |
+
hour: isIn(tf,'h'),
|
1802 |
+
minute: isIn(tf,'m'),
|
1803 |
+
second: isIn(tf,'s'),
|
1804 |
+
millisec: isIn(tf,'l'),
|
1805 |
+
microsec: isIn(tf,'c'),
|
1806 |
+
timezone: isIn(tf,'z'),
|
1807 |
+
ampm: isIn(tf,'t') && isIn(timeFormat,'h'),
|
1808 |
+
iso8601: isIn(timeFormat, 'Z')
|
1809 |
+
};
|
1810 |
+
};
|
1811 |
+
|
1812 |
+
/*
|
1813 |
+
* Converts 24 hour format into 12 hour
|
1814 |
+
* Returns 12 hour without leading 0
|
1815 |
+
*/
|
1816 |
+
var convert24to12 = function(hour) {
|
1817 |
+
if (hour > 12) {
|
1818 |
+
hour = hour - 12;
|
1819 |
+
}
|
1820 |
+
|
1821 |
+
if (hour === 0) {
|
1822 |
+
hour = 12;
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
return String(hour);
|
1826 |
+
};
|
1827 |
+
|
1828 |
+
/*
|
1829 |
+
* Splits datetime string into date ans time substrings.
|
1830 |
+
* Throws exception when date can't be parsed
|
1831 |
+
* Returns [dateString, timeString]
|
1832 |
+
*/
|
1833 |
+
var splitDateTime = function(dateFormat, dateTimeString, dateSettings, timeSettings) {
|
1834 |
+
try {
|
1835 |
+
// The idea is to get the number separator occurances in datetime and the time format requested (since time has
|
1836 |
+
// fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.
|
1837 |
+
var separator = timeSettings && timeSettings.separator ? timeSettings.separator : $.timepicker._defaults.separator,
|
1838 |
+
format = timeSettings && timeSettings.timeFormat ? timeSettings.timeFormat : $.timepicker._defaults.timeFormat,
|
1839 |
+
timeParts = format.split(separator), // how many occurances of separator may be in our format?
|
1840 |
+
timePartsLen = timeParts.length,
|
1841 |
+
allParts = dateTimeString.split(separator),
|
1842 |
+
allPartsLen = allParts.length;
|
1843 |
+
|
1844 |
+
if (allPartsLen > 1) {
|
1845 |
+
return [
|
1846 |
+
allParts.splice(0,allPartsLen-timePartsLen).join(separator),
|
1847 |
+
allParts.splice(0,timePartsLen).join(separator)
|
1848 |
+
];
|
1849 |
+
}
|
1850 |
+
|
1851 |
+
} catch (err) {
|
1852 |
+
$.timepicker.log('Could not split the date from the time. Please check the following datetimepicker options' +
|
1853 |
+
"\nthrown error: " + err +
|
1854 |
+
"\ndateTimeString" + dateTimeString +
|
1855 |
+
"\ndateFormat = " + dateFormat +
|
1856 |
+
"\nseparator = " + timeSettings.separator +
|
1857 |
+
"\ntimeFormat = " + timeSettings.timeFormat);
|
1858 |
+
|
1859 |
+
if (err.indexOf(":") >= 0) {
|
1860 |
+
// Hack! The error message ends with a colon, a space, and
|
1861 |
+
// the "extra" characters. We rely on that instead of
|
1862 |
+
// attempting to perfectly reproduce the parsing algorithm.
|
1863 |
+
var dateStringLength = dateTimeString.length - (err.length - err.indexOf(':') - 2),
|
1864 |
+
timeString = dateTimeString.substring(dateStringLength);
|
1865 |
+
|
1866 |
+
return [$.trim(dateTimeString.substring(0, dateStringLength)), $.trim(dateTimeString.substring(dateStringLength))];
|
1867 |
+
|
1868 |
+
} else {
|
1869 |
+
throw err;
|
1870 |
+
}
|
1871 |
+
}
|
1872 |
+
return [dateTimeString, ''];
|
1873 |
+
};
|
1874 |
+
|
1875 |
+
/*
|
1876 |
+
* Internal function to parse datetime interval
|
1877 |
+
* Returns: {date: Date, timeObj: Object}, where
|
1878 |
+
* date - parsed date without time (type Date)
|
1879 |
+
* timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional
|
1880 |
+
*/
|
1881 |
+
var parseDateTimeInternal = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
|
1882 |
+
var date;
|
1883 |
+
var splitRes = splitDateTime(dateFormat, dateTimeString, dateSettings, timeSettings);
|
1884 |
+
date = $.datepicker._base_parseDate(dateFormat, splitRes[0], dateSettings);
|
1885 |
+
if (splitRes[1] !== '') {
|
1886 |
+
var timeString = splitRes[1],
|
1887 |
+
parsedTime = $.datepicker.parseTime(timeFormat, timeString, timeSettings);
|
1888 |
+
|
1889 |
+
if (parsedTime === null) {
|
1890 |
+
throw 'Wrong time format';
|
1891 |
+
}
|
1892 |
+
return {
|
1893 |
+
date: date,
|
1894 |
+
timeObj: parsedTime
|
1895 |
+
};
|
1896 |
+
} else {
|
1897 |
+
return {
|
1898 |
+
date: date
|
1899 |
+
};
|
1900 |
+
}
|
1901 |
+
};
|
1902 |
+
|
1903 |
+
/*
|
1904 |
+
* Internal function to set timezone_select to the local timezone
|
1905 |
+
*/
|
1906 |
+
var selectLocalTimezone = function(tp_inst, date) {
|
1907 |
+
if (tp_inst && tp_inst.timezone_select) {
|
1908 |
+
var now = typeof date !== 'undefined' ? date : new Date();
|
1909 |
+
tp_inst.timezone_select.val(now.getTimezoneOffset()*-1);
|
1910 |
+
}
|
1911 |
+
};
|
1912 |
+
|
1913 |
+
/*
|
1914 |
+
* Create a Singleton Insance
|
1915 |
+
*/
|
1916 |
+
$.timepicker = new Timepicker();
|
1917 |
+
|
1918 |
+
/**
|
1919 |
+
* Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5)
|
1920 |
+
* @param number if not a number this value is returned
|
1921 |
+
* @param boolean if true formats in accordance to iso8601 "+12:45"
|
1922 |
+
* @return string
|
1923 |
+
*/
|
1924 |
+
$.timepicker.timezoneOffsetString = function(tzMinutes, iso8601) {
|
1925 |
+
if(isNaN(tzMinutes) || tzMinutes > 840){
|
1926 |
+
return tzMinutes;
|
1927 |
+
}
|
1928 |
+
|
1929 |
+
var off = tzMinutes,
|
1930 |
+
minutes = off % 60,
|
1931 |
+
hours = (off - minutes) / 60,
|
1932 |
+
iso = iso8601? ':':'',
|
1933 |
+
tz = (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).slice(-2) + iso + ('0' + (minutes * 101).toString()).slice(-2);
|
1934 |
+
|
1935 |
+
if(tz == '+00:00'){
|
1936 |
+
return 'Z';
|
1937 |
+
}
|
1938 |
+
return tz;
|
1939 |
+
};
|
1940 |
+
|
1941 |
+
/**
|
1942 |
+
* Get the number in minutes that represents a timezone string
|
1943 |
+
* @param string formated like "+0500", "-1245"
|
1944 |
+
* @return number
|
1945 |
+
*/
|
1946 |
+
$.timepicker.timezoneOffsetNumber = function(tzString) {
|
1947 |
+
tzString = tzString.toString().replace(':',''); // excuse any iso8601, end up with "+1245"
|
1948 |
+
|
1949 |
+
if(tzString.toUpperCase() === 'Z'){ // if iso8601 with Z, its 0 minute offset
|
1950 |
+
return 0;
|
1951 |
+
}
|
1952 |
+
|
1953 |
+
if(!/^(\-|\+)\d{4}$/.test(tzString)){ // possibly a user defined tz, so just give it back
|
1954 |
+
return tzString;
|
1955 |
+
}
|
1956 |
+
|
1957 |
+
return ((tzString.substr(0,1) =='-'? -1 : 1) * // plus or minus
|
1958 |
+
((parseInt(tzString.substr(1,2),10)*60) + // hours (converted to minutes)
|
1959 |
+
parseInt(tzString.substr(3,2),10))); // minutes
|
1960 |
+
};
|
1961 |
+
|
1962 |
+
/**
|
1963 |
+
* No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate)
|
1964 |
+
* @param date
|
1965 |
+
* @param string formated like "+0500", "-1245"
|
1966 |
+
* @return date
|
1967 |
+
*/
|
1968 |
+
$.timepicker.timezoneAdjust = function(date, toTimezone) {
|
1969 |
+
var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);
|
1970 |
+
if(!isNaN(toTz)){
|
1971 |
+
date.setMinutes(date.getMinutes()*1 + (date.getTimezoneOffset()*-1 - toTz*1) );
|
1972 |
+
}
|
1973 |
+
return date;
|
1974 |
+
};
|
1975 |
+
|
1976 |
+
/**
|
1977 |
+
* Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to
|
1978 |
+
* enforce date range limits.
|
1979 |
+
* n.b. The input value must be correctly formatted (reformatting is not supported)
|
1980 |
+
* @param Element startTime
|
1981 |
+
* @param Element endTime
|
1982 |
+
* @param obj options Options for the timepicker() call
|
1983 |
+
* @return jQuery
|
1984 |
+
*/
|
1985 |
+
$.timepicker.timeRange = function(startTime, endTime, options) {
|
1986 |
+
return $.timepicker.handleRange('timepicker', startTime, endTime, options);
|
1987 |
+
};
|
1988 |
+
|
1989 |
+
/**
|
1990 |
+
* Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to
|
1991 |
+
* enforce date range limits.
|
1992 |
+
* @param Element startTime
|
1993 |
+
* @param Element endTime
|
1994 |
+
* @param obj options Options for the `timepicker()` call. Also supports `reformat`,
|
1995 |
+
* a boolean value that can be used to reformat the input values to the `dateFormat`.
|
1996 |
+
* @param string method Can be used to specify the type of picker to be added
|
1997 |
+
* @return jQuery
|
1998 |
+
*/
|
1999 |
+
$.timepicker.datetimeRange = function(startTime, endTime, options) {
|
2000 |
+
$.timepicker.handleRange('datetimepicker', startTime, endTime, options);
|
2001 |
+
};
|
2002 |
+
|
2003 |
+
/**
|
2004 |
+
* Calls `method` on the `startTime` and `endTime` elements, and configures them to
|
2005 |
+
* enforce date range limits.
|
2006 |
+
* @param Element startTime
|
2007 |
+
* @param Element endTime
|
2008 |
+
* @param obj options Options for the `timepicker()` call. Also supports `reformat`,
|
2009 |
+
* a boolean value that can be used to reformat the input values to the `dateFormat`.
|
2010 |
+
* @return jQuery
|
2011 |
+
*/
|
2012 |
+
$.timepicker.dateRange = function(startTime, endTime, options) {
|
2013 |
+
$.timepicker.handleRange('datepicker', startTime, endTime, options);
|
2014 |
+
};
|
2015 |
+
|
2016 |
+
/**
|
2017 |
+
* Calls `method` on the `startTime` and `endTime` elements, and configures them to
|
2018 |
+
* enforce date range limits.
|
2019 |
+
* @param string method Can be used to specify the type of picker to be added
|
2020 |
+
* @param Element startTime
|
2021 |
+
* @param Element endTime
|
2022 |
+
* @param obj options Options for the `timepicker()` call. Also supports `reformat`,
|
2023 |
+
* a boolean value that can be used to reformat the input values to the `dateFormat`.
|
2024 |
+
* @return jQuery
|
2025 |
+
*/
|
2026 |
+
$.timepicker.handleRange = function(method, startTime, endTime, options) {
|
2027 |
+
options = $.extend({}, {
|
2028 |
+
minInterval: 0, // min allowed interval in milliseconds
|
2029 |
+
maxInterval: 0, // max allowed interval in milliseconds
|
2030 |
+
start: {}, // options for start picker
|
2031 |
+
end: {} // options for end picker
|
2032 |
+
}, options);
|
2033 |
+
|
2034 |
+
$.fn[method].call(startTime, $.extend({
|
2035 |
+
onClose: function(dateText, inst) {
|
2036 |
+
checkDates($(this), endTime);
|
2037 |
+
},
|
2038 |
+
onSelect: function(selectedDateTime) {
|
2039 |
+
selected($(this), endTime, 'minDate');
|
2040 |
+
}
|
2041 |
+
}, options, options.start));
|
2042 |
+
$.fn[method].call(endTime, $.extend({
|
2043 |
+
onClose: function(dateText, inst) {
|
2044 |
+
checkDates($(this), startTime);
|
2045 |
+
},
|
2046 |
+
onSelect: function(selectedDateTime) {
|
2047 |
+
selected($(this), startTime, 'maxDate');
|
2048 |
+
}
|
2049 |
+
}, options, options.end));
|
2050 |
+
|
2051 |
+
checkDates(startTime, endTime);
|
2052 |
+
selected(startTime, endTime, 'minDate');
|
2053 |
+
selected(endTime, startTime, 'maxDate');
|
2054 |
+
|
2055 |
+
function checkDates(changed, other) {
|
2056 |
+
var startdt = startTime[method]('getDate'),
|
2057 |
+
enddt = endTime[method]('getDate'),
|
2058 |
+
changeddt = changed[method]('getDate');
|
2059 |
+
|
2060 |
+
if(startdt !== null){
|
2061 |
+
var minDate = new Date(startdt.getTime()),
|
2062 |
+
maxDate = new Date(startdt.getTime());
|
2063 |
+
|
2064 |
+
minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval);
|
2065 |
+
maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval);
|
2066 |
+
|
2067 |
+
if(options.minInterval > 0 && minDate > enddt){ // minInterval check
|
2068 |
+
endTime[method]('setDate',minDate);
|
2069 |
+
}
|
2070 |
+
else if(options.maxInterval > 0 && maxDate < enddt){ // max interval check
|
2071 |
+
endTime[method]('setDate',maxDate);
|
2072 |
+
}
|
2073 |
+
else if (startdt > enddt) {
|
2074 |
+
other[method]('setDate',changeddt);
|
2075 |
+
}
|
2076 |
+
}
|
2077 |
+
}
|
2078 |
+
|
2079 |
+
function selected(changed, other, option) {
|
2080 |
+
if (!changed.val()) {
|
2081 |
+
return;
|
2082 |
+
}
|
2083 |
+
var date = changed[method].call(changed, 'getDate');
|
2084 |
+
if(date !== null && options.minInterval > 0){
|
2085 |
+
if(option == 'minDate'){
|
2086 |
+
date.setMilliseconds(date.getMilliseconds() + options.minInterval);
|
2087 |
+
}
|
2088 |
+
if(option == 'maxDate'){
|
2089 |
+
date.setMilliseconds(date.getMilliseconds() - options.minInterval);
|
2090 |
+
}
|
2091 |
+
}
|
2092 |
+
if (date.getTime) {
|
2093 |
+
other[method].call(other, 'option', option, date);
|
2094 |
+
}
|
2095 |
+
}
|
2096 |
+
return $([startTime.get(0), endTime.get(0)]);
|
2097 |
+
};
|
2098 |
+
|
2099 |
+
/**
|
2100 |
+
* Log error or data to the console during error or debugging
|
2101 |
+
* @param Object err pass any type object to log to the console during error or debugging
|
2102 |
+
* @return void
|
2103 |
+
*/
|
2104 |
+
$.timepicker.log = function(err){
|
2105 |
+
if(window.console){
|
2106 |
+
console.log(err);
|
2107 |
+
}
|
2108 |
+
};
|
2109 |
+
|
2110 |
+
/*
|
2111 |
+
* Microsecond support
|
2112 |
+
*/
|
2113 |
+
if(!Date.prototype.getMicroseconds){
|
2114 |
+
Date.prototype.microseconds = 0;
|
2115 |
+
Date.prototype.getMicroseconds = function(){ return this.microseconds; };
|
2116 |
+
Date.prototype.setMicroseconds = function(m){
|
2117 |
+
this.setMilliseconds(this.getMilliseconds() + Math.floor(m/1000));
|
2118 |
+
this.microseconds = m%1000;
|
2119 |
+
return this;
|
2120 |
+
};
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
/*
|
2124 |
+
* Keep up with the version
|
2125 |
+
*/
|
2126 |
+
$.timepicker.version = "1.3.1";
|
2127 |
+
|
2128 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-af.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Afrikaans translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Deon Heyns */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['af'] = {
|
5 |
+
timeOnlyTitle: 'Kies Tyd',
|
6 |
+
timeText: 'Tyd ',
|
7 |
+
hourText: 'Ure ',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Sekondes',
|
10 |
+
millisecText: 'Millisekondes',
|
11 |
+
microsecText: 'Mikrosekondes',
|
12 |
+
timezoneText: 'Tydsone',
|
13 |
+
currentText: 'Huidige Tyd',
|
14 |
+
closeText: 'Klaar',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['af']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-bg.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bulgarian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Plamen Kovandjiev */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['bg'] = {
|
5 |
+
timeOnlyTitle: 'Изберете време',
|
6 |
+
timeText: 'Време',
|
7 |
+
hourText: 'Час',
|
8 |
+
minuteText: 'Минути',
|
9 |
+
secondText: 'Секунди',
|
10 |
+
millisecText: 'Милисекунди',
|
11 |
+
microsecText: 'Микросекунди',
|
12 |
+
timezoneText: 'Часови пояс',
|
13 |
+
currentText: 'Сега',
|
14 |
+
closeText: 'Затвори',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['bg']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ca.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Catalan translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Sergi Faber */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ca'] = {
|
5 |
+
timeOnlyTitle: 'Escollir una hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Hores',
|
8 |
+
minuteText: 'Minuts',
|
9 |
+
secondText: 'Segons',
|
10 |
+
millisecText: 'Milisegons',
|
11 |
+
microsecText: 'Microsegons',
|
12 |
+
timezoneText: 'Fus horari',
|
13 |
+
currentText: 'Ara',
|
14 |
+
closeText: 'Tancar',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['ca']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-cs.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Czech translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Ondřej Vodáček */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['cs'] = {
|
5 |
+
timeOnlyTitle: 'Vyberte čas',
|
6 |
+
timeText: 'Čas',
|
7 |
+
hourText: 'Hodiny',
|
8 |
+
minuteText: 'Minuty',
|
9 |
+
secondText: 'Vteřiny',
|
10 |
+
millisecText: 'Milisekundy',
|
11 |
+
microsecText: 'Mikrosekundy',
|
12 |
+
timezoneText: 'Časové pásmo',
|
13 |
+
currentText: 'Nyní',
|
14 |
+
closeText: 'Zavřít',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['dop.', 'AM', 'A'],
|
17 |
+
pmNames: ['odp.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['cs']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-da.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Danish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Lars H. Jensen (http://www.larshj.dk) */
|
3 |
+
(function ($) {
|
4 |
+
$.timepicker.regional['da'] = {
|
5 |
+
timeOnlyTitle: 'Vælg tid',
|
6 |
+
timeText: 'Tid',
|
7 |
+
hourText: 'Time',
|
8 |
+
minuteText: 'Minut',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekund',
|
11 |
+
microsecText: 'Mikrosekund',
|
12 |
+
timezoneText: 'Tidszone',
|
13 |
+
currentText: 'Nu',
|
14 |
+
closeText: 'Luk',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['am', 'AM', 'A'],
|
17 |
+
pmNames: ['pm', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['da']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-de.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* German translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Marvin */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['de'] = {
|
5 |
+
timeOnlyTitle: 'Zeit Wählen',
|
6 |
+
timeText: 'Zeit',
|
7 |
+
hourText: 'Stunde',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Sekunde',
|
10 |
+
millisecText: 'Millisekunde',
|
11 |
+
microsecText: 'Mikrosekunde',
|
12 |
+
timezoneText: 'Zeitzone',
|
13 |
+
currentText: 'Jetzt',
|
14 |
+
closeText: 'Fertig',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['vorm.', 'AM', 'A'],
|
17 |
+
pmNames: ['nachm.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['de']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-el.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hellenic translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Christos Pontikis */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['el'] = {
|
5 |
+
timeOnlyTitle: 'Επιλογή ώρας',
|
6 |
+
timeText: 'Ώρα',
|
7 |
+
hourText: 'Ώρες',
|
8 |
+
minuteText: 'Λεπτά',
|
9 |
+
secondText: 'Δευτερόλεπτα',
|
10 |
+
millisecText: 'μιλιδευτερόλεπτο',
|
11 |
+
microsecText: 'Microseconds',
|
12 |
+
timezoneText: 'Ζώνη ώρας',
|
13 |
+
currentText: 'Τώρα',
|
14 |
+
closeText: 'Κλείσιμο',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['π.μ.', 'AM', 'A'],
|
17 |
+
pmNames: ['μ.μ.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['el']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-es.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Spanish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Ianaré Sévi */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['es'] = {
|
5 |
+
timeOnlyTitle: 'Elegir una hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milisegundos',
|
11 |
+
microsecText: 'Microsegundos',
|
12 |
+
timezoneText: 'Huso horario',
|
13 |
+
currentText: 'Ahora',
|
14 |
+
closeText: 'Cerrar',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['a.m.', 'AM', 'A'],
|
17 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['es']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-et.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Estonian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Karl Sutt (karl@sutt.ee) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['et'] = {
|
5 |
+
timeOnlyTitle: 'Vali aeg',
|
6 |
+
timeText: 'Aeg',
|
7 |
+
hourText: 'Tund',
|
8 |
+
minuteText: 'Minut',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekundis',
|
11 |
+
microsecText: 'Mikrosekundis',
|
12 |
+
timezoneText: 'Ajavöönd',
|
13 |
+
currentText: 'Praegu',
|
14 |
+
closeText: 'Valmis',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['et']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-eu.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Basque trannslation for JQuery Timepicker Addon
|
2 |
+
/* Translated by Xabi Fer */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['eu'] = {
|
5 |
+
timeOnlyTitle: 'Aukeratu ordua',
|
6 |
+
timeText: 'Ordua',
|
7 |
+
hourText: 'Orduak',
|
8 |
+
minuteText: 'Minutuak',
|
9 |
+
secondText: 'Segunduak',
|
10 |
+
millisecText: 'Milisegunduak',
|
11 |
+
microsecText: 'Mikrosegundotan',
|
12 |
+
timezoneText: 'Ordu-eremua',
|
13 |
+
currentText: 'Orain',
|
14 |
+
closeText: 'Itxi',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['a.m.', 'AM', 'A'],
|
17 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['eu']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-fi.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Finnish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Juga Paazmaya (http://github.com/paazmaya) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['fi'] = {
|
5 |
+
timeOnlyTitle: 'Valitse aika',
|
6 |
+
timeText: 'Aika',
|
7 |
+
hourText: 'Tunti',
|
8 |
+
minuteText: 'Minuutti',
|
9 |
+
secondText: 'Sekunti',
|
10 |
+
millisecText: 'Millisekunnin',
|
11 |
+
microsecText: 'Mikrosekuntia',
|
12 |
+
timezoneText: 'Aikavyöhyke',
|
13 |
+
currentText: 'Nyt',
|
14 |
+
closeText: 'Sulje',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['ap.', 'AM', 'A'],
|
17 |
+
pmNames: ['ip.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['fi']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-fr.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* French translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Thomas Lété */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['fr'] = {
|
5 |
+
timeOnlyTitle: 'Choisir une heure',
|
6 |
+
timeText: 'Heure',
|
7 |
+
hourText: 'Heures',
|
8 |
+
minuteText: 'Minutes',
|
9 |
+
secondText: 'Secondes',
|
10 |
+
millisecText: 'Millisecondes',
|
11 |
+
microsecText: 'Microsecondes',
|
12 |
+
timezoneText: 'Fuseau horaire',
|
13 |
+
currentText: 'Maintenant',
|
14 |
+
closeText: 'Terminé',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['fr']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-gl.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Galician translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by David Barral */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['gl'] = {
|
5 |
+
timeOnlyTitle: 'Elixir unha hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milisegundos',
|
11 |
+
microsecText: 'Microssegundos',
|
12 |
+
timezoneText: 'Fuso horario',
|
13 |
+
currentText: 'Agora',
|
14 |
+
closeText: 'Pechar',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['a.m.', 'AM', 'A'],
|
17 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['gl']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-he.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hebrew translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Lior Lapid */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional["he"] = {
|
5 |
+
timeOnlyTitle: "בחירת זמן",
|
6 |
+
timeText: "שעה",
|
7 |
+
hourText: "שעות",
|
8 |
+
minuteText: "דקות",
|
9 |
+
secondText: "שניות",
|
10 |
+
millisecText: "אלפית השנייה",
|
11 |
+
microsecText: "מיקרו",
|
12 |
+
timezoneText: "אזור זמן",
|
13 |
+
currentText: "עכשיו",
|
14 |
+
closeText:"סגור",
|
15 |
+
timeFormat: "HH:mm",
|
16 |
+
amNames: ['לפנה"צ', 'AM', 'A'],
|
17 |
+
pmNames: ['אחה"צ', 'PM', 'P'],
|
18 |
+
isRTL: true
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional["he"]);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-hr.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Croatian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Mladen */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['hr'] = {
|
5 |
+
timeOnlyTitle: 'Odaberi vrijeme',
|
6 |
+
timeText: 'Vrijeme',
|
7 |
+
hourText: 'Sati',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Sekunde',
|
10 |
+
millisecText: 'Milisekunde',
|
11 |
+
microsecText: 'Mikrosekunde',
|
12 |
+
timezoneText: 'Vremenska zona',
|
13 |
+
currentText: 'Sada',
|
14 |
+
closeText: 'Gotovo',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['a.m.', 'AM', 'A'],
|
17 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['hr']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-hu.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hungarian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Vas Gábor */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['hu'] = {
|
5 |
+
timeOnlyTitle: 'Válasszon időpontot',
|
6 |
+
timeText: 'Idő',
|
7 |
+
hourText: 'Óra',
|
8 |
+
minuteText: 'Perc',
|
9 |
+
secondText: 'Másodperc',
|
10 |
+
millisecText: 'Milliszekundumos',
|
11 |
+
microsecText: 'Ezredmásodperc',
|
12 |
+
timezoneText: 'Időzóna',
|
13 |
+
currentText: 'Most',
|
14 |
+
closeText: 'Kész',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['de.', 'AM', 'A'],
|
17 |
+
pmNames: ['du.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['hu']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-id.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Indonesian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nia */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['id'] = {
|
5 |
+
timeOnlyTitle: 'Pilih Waktu',
|
6 |
+
timeText: 'Waktu',
|
7 |
+
hourText: 'Pukul',
|
8 |
+
minuteText: 'Menit',
|
9 |
+
secondText: 'Detik',
|
10 |
+
millisecText: 'Milidetik',
|
11 |
+
microsecText: 'Mikrodetik',
|
12 |
+
timezoneText: 'Zona Waktu',
|
13 |
+
currentText: 'Sekarang',
|
14 |
+
closeText: 'OK',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['id']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-it.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Italian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Marco "logicoder" Del Tongo */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['it'] = {
|
5 |
+
timeOnlyTitle: 'Scegli orario',
|
6 |
+
timeText: 'Orario',
|
7 |
+
hourText: 'Ora',
|
8 |
+
minuteText: 'Minuti',
|
9 |
+
secondText: 'Secondi',
|
10 |
+
millisecText: 'Millisecondi',
|
11 |
+
microsecText: 'Microsecondi',
|
12 |
+
timezoneText: 'Fuso orario',
|
13 |
+
currentText: 'Adesso',
|
14 |
+
closeText: 'Chiudi',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['m.', 'AM', 'A'],
|
17 |
+
pmNames: ['p.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['it']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ja.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Japanese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Jun Omae */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ja'] = {
|
5 |
+
timeOnlyTitle: '時間を選択',
|
6 |
+
timeText: '時間',
|
7 |
+
hourText: '時',
|
8 |
+
minuteText: '分',
|
9 |
+
secondText: '秒',
|
10 |
+
millisecText: 'ミリ秒',
|
11 |
+
microsecText: 'マイクロ秒',
|
12 |
+
timezoneText: 'タイムゾーン',
|
13 |
+
currentText: '現時刻',
|
14 |
+
closeText: '閉じる',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['午前', 'AM', 'A'],
|
17 |
+
pmNames: ['午後', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['ja']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ko.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Korean translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Genie */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ko'] = {
|
5 |
+
timeOnlyTitle: '시간 선택',
|
6 |
+
timeText: '시간',
|
7 |
+
hourText: '시',
|
8 |
+
minuteText: '분',
|
9 |
+
secondText: '초',
|
10 |
+
millisecText: '밀리초',
|
11 |
+
microsecText: '마이크로',
|
12 |
+
timezoneText: '표준 시간대',
|
13 |
+
currentText: '현재 시각',
|
14 |
+
closeText: '닫기',
|
15 |
+
timeFormat: 'tt h:mm',
|
16 |
+
amNames: ['오전', 'AM', 'A'],
|
17 |
+
pmNames: ['오후', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['ko']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-lt.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Lithuanian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Irmantas Šiupšinskas */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['lt'] = {
|
5 |
+
timeOnlyTitle: 'Pasirinkite laiką',
|
6 |
+
timeText: 'Laikas',
|
7 |
+
hourText: 'Valandos',
|
8 |
+
minuteText: 'Minutės',
|
9 |
+
secondText: 'Sekundės',
|
10 |
+
millisecText: 'Milisekundės',
|
11 |
+
microsecText: 'Mikrosekundės',
|
12 |
+
timezoneText: 'Laiko zona',
|
13 |
+
currentText: 'Dabar',
|
14 |
+
closeText: 'Uždaryti',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['priešpiet', 'AM', 'A'],
|
17 |
+
pmNames: ['popiet', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['lt']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-nl.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Martijn van der Lee */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['nl'] = {
|
5 |
+
timeOnlyTitle: 'Tijdstip',
|
6 |
+
timeText: 'Tijd',
|
7 |
+
hourText: 'Uur',
|
8 |
+
minuteText: 'Minuut',
|
9 |
+
secondText: 'Seconde',
|
10 |
+
millisecText: 'Milliseconde',
|
11 |
+
microsecText: 'Microseconde',
|
12 |
+
timezoneText: 'Tijdzone',
|
13 |
+
currentText: 'Vandaag',
|
14 |
+
closeText: 'Sluiten',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['nl']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-no.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Morten Hauan (http://hauan.me) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['no'] = {
|
5 |
+
timeOnlyTitle: 'Velg tid',
|
6 |
+
timeText: 'Tid',
|
7 |
+
hourText: 'Time',
|
8 |
+
minuteText: 'Minutt',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekund',
|
11 |
+
microsecText: 'mikrosekund',
|
12 |
+
timezoneText: 'Tidssone',
|
13 |
+
currentText: 'Nå',
|
14 |
+
closeText: 'Lukk',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['am', 'AM', 'A'],
|
17 |
+
pmNames: ['pm', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['no']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-pl.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Polish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Michał Pena */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['pl'] = {
|
5 |
+
timeOnlyTitle: 'Wybierz godzinę',
|
6 |
+
timeText: 'Czas',
|
7 |
+
hourText: 'Godzina',
|
8 |
+
minuteText: 'Minuta',
|
9 |
+
secondText: 'Sekunda',
|
10 |
+
millisecText: 'Milisekunda',
|
11 |
+
microsecText: 'Mikrosekunda',
|
12 |
+
timezoneText: 'Strefa czasowa',
|
13 |
+
currentText: 'Teraz',
|
14 |
+
closeText: 'Gotowe',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['pl']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-pt-BR.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Brazilian Portuguese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Diogo Damiani (diogodamiani@gmail.com) */
|
3 |
+
(function ($) {
|
4 |
+
$.timepicker.regional['pt-BR'] = {
|
5 |
+
timeOnlyTitle: 'Escolha o horário',
|
6 |
+
timeText: 'Horário',
|
7 |
+
hourText: 'Hora',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milissegundos',
|
11 |
+
microsecText: 'Microssegundos',
|
12 |
+
timezoneText: 'Fuso horário',
|
13 |
+
currentText: 'Agora',
|
14 |
+
closeText: 'Fechar',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['a.m.', 'AM', 'A'],
|
17 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['pt-BR']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-pt.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Portuguese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Luan Almeida */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['pt'] = {
|
5 |
+
timeOnlyTitle: 'Escolha uma hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milissegundos',
|
11 |
+
microsecText: 'Microssegundos',
|
12 |
+
timezoneText: 'Fuso horário',
|
13 |
+
currentText: 'Agora',
|
14 |
+
closeText: 'Fechar',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['a.m.', 'AM', 'A'],
|
17 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['pt']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ro.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romanian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Romeo Adrian Cioaba */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ro'] = {
|
5 |
+
timeOnlyTitle: 'Alegeţi o oră',
|
6 |
+
timeText: 'Timp',
|
7 |
+
hourText: 'Ore',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Secunde',
|
10 |
+
millisecText: 'Milisecunde',
|
11 |
+
microsecText: 'Microsecunde',
|
12 |
+
timezoneText: 'Fus orar',
|
13 |
+
currentText: 'Acum',
|
14 |
+
closeText: 'Închide',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['ro']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-ru.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Russian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Trent Richardson */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ru'] = {
|
5 |
+
timeOnlyTitle: 'Выберите время',
|
6 |
+
timeText: 'Время',
|
7 |
+
hourText: 'Часы',
|
8 |
+
minuteText: 'Минуты',
|
9 |
+
secondText: 'Секунды',
|
10 |
+
millisecText: 'Миллисекунды',
|
11 |
+
microsecText: 'Микросекунды',
|
12 |
+
timezoneText: 'Часовой пояс',
|
13 |
+
currentText: 'Сейчас',
|
14 |
+
closeText: 'Закрыть',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['ru']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-sk.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovak translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by David Vallner */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['sk'] = {
|
5 |
+
timeOnlyTitle: 'Zvoľte čas',
|
6 |
+
timeText: 'Čas',
|
7 |
+
hourText: 'Hodiny',
|
8 |
+
minuteText: 'Minúty',
|
9 |
+
secondText: 'Sekundy',
|
10 |
+
millisecText: 'Milisekundy',
|
11 |
+
microsecText: 'Mikrosekundy',
|
12 |
+
timezoneText: 'Časové pásmo',
|
13 |
+
currentText: 'Teraz',
|
14 |
+
closeText: 'Zavrieť',
|
15 |
+
timeFormat: 'H:m',
|
16 |
+
amNames: ['dop.', 'AM', 'A'],
|
17 |
+
pmNames: ['pop.', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['sk']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-sv.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swedish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nevon */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['sv'] = {
|
5 |
+
timeOnlyTitle: 'Välj en tid',
|
6 |
+
timeText: 'Tid',
|
7 |
+
hourText: 'Timme',
|
8 |
+
minuteText: 'Minut',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekund',
|
11 |
+
microsecText: 'Mikrosekund',
|
12 |
+
timezoneText: 'Tidszon',
|
13 |
+
currentText: 'Nu',
|
14 |
+
closeText: 'Stäng',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['sv']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-th.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Thai translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Yote Wachirapornpongsa */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['th'] = {
|
5 |
+
timeOnlyTitle: 'เลือกเวลา',
|
6 |
+
timeText: 'เวลา ',
|
7 |
+
hourText: 'ชั่วโมง ',
|
8 |
+
minuteText: 'นาที',
|
9 |
+
secondText: 'วินาที',
|
10 |
+
millisecText: 'มิลลิวินาที',
|
11 |
+
microsecText: 'ไมโคริวินาที',
|
12 |
+
timezoneText: 'เขตเวลา',
|
13 |
+
currentText: 'เวลาปัจจุบัน',
|
14 |
+
closeText: 'ปิด',
|
15 |
+
timeFormat: 'hh:mm tt'
|
16 |
+
};
|
17 |
+
$.timepicker.setDefaults($.timepicker.regional['th']);
|
18 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-tr.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Turkish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Fehmi Can Saglam, Edited by Goktug Ozturk */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['tr'] = {
|
5 |
+
timeOnlyTitle: 'Zaman Seçiniz',
|
6 |
+
timeText: 'Zaman',
|
7 |
+
hourText: 'Saat',
|
8 |
+
minuteText: 'Dakika',
|
9 |
+
secondText: 'Saniye',
|
10 |
+
millisecText: 'Milisaniye',
|
11 |
+
microsecText: 'Mikrosaniye',
|
12 |
+
timezoneText: 'Zaman Dilimi',
|
13 |
+
currentText: 'Şu an',
|
14 |
+
closeText: 'Tamam',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['ÖÖ', 'Ö'],
|
17 |
+
pmNames: ['ÖS', 'S'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['tr']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-uk.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ukrainian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Sergey Noskov */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['uk'] = {
|
5 |
+
timeOnlyTitle: 'Виберіть час',
|
6 |
+
timeText: 'Час',
|
7 |
+
hourText: 'Години',
|
8 |
+
minuteText: 'Хвилини',
|
9 |
+
secondText: 'Секунди',
|
10 |
+
millisecText: 'Мілісекунди',
|
11 |
+
microsecText: 'Мікросекунди',
|
12 |
+
timezoneText: 'Часовий пояс',
|
13 |
+
currentText: 'Зараз',
|
14 |
+
closeText: 'Закрити',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['uk']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-vi.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Vietnamese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nguyen Dinh Trung */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['vi'] = {
|
5 |
+
timeOnlyTitle: 'Chọn giờ',
|
6 |
+
timeText: 'Thời gian',
|
7 |
+
hourText: 'Giờ',
|
8 |
+
minuteText: 'Phút',
|
9 |
+
secondText: 'Giây',
|
10 |
+
millisecText: 'Phần nghìn giây',
|
11 |
+
microsecText: 'Miligiây',
|
12 |
+
timezoneText: 'Múi giờ',
|
13 |
+
currentText: 'Hiện thời',
|
14 |
+
closeText: 'Đóng',
|
15 |
+
timeFormat: 'H:m',
|
16 |
+
amNames: ['SA', 'AM', 'A'],
|
17 |
+
pmNames: ['CH', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['vi']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-zh-CN.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Simplified Chinese translation for the jQuery Timepicker Addon /
|
2 |
+
/ Written by Will Lu */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['zh-CN'] = {
|
5 |
+
timeOnlyTitle: '选择时间',
|
6 |
+
timeText: '时间',
|
7 |
+
hourText: '小时',
|
8 |
+
minuteText: '分钟',
|
9 |
+
secondText: '秒钟',
|
10 |
+
millisecText: '微秒',
|
11 |
+
microsecText: '微秒',
|
12 |
+
timezoneText: '时区',
|
13 |
+
currentText: '现在时间',
|
14 |
+
closeText: '关闭',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['AM', 'A'],
|
17 |
+
pmNames: ['PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['zh-CN']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/localization/jquery-ui-timepicker-zh-TW.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Alang.lin */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['zh-TW'] = {
|
5 |
+
timeOnlyTitle: '選擇時分秒',
|
6 |
+
timeText: '時間',
|
7 |
+
hourText: '時',
|
8 |
+
minuteText: '分',
|
9 |
+
secondText: '秒',
|
10 |
+
millisecText: '毫秒',
|
11 |
+
microsecText: '微秒',
|
12 |
+
timezoneText: '時區',
|
13 |
+
currentText: '現在時間',
|
14 |
+
closeText: '確定',
|
15 |
+
timeFormat: 'HH:mm',
|
16 |
+
amNames: ['上午', 'AM', 'A'],
|
17 |
+
pmNames: ['下午', 'PM', 'P'],
|
18 |
+
isRTL: false
|
19 |
+
};
|
20 |
+
$.timepicker.setDefaults($.timepicker.regional['zh-TW']);
|
21 |
+
})(jQuery);
|
shared/assets/plugins/acf-field-date-time-picker/js/timepicker-localization.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Attach a jQuery.datetimepicker() to "input[type=text].time_picker" fields. Will also attach to dynamic added fields.
|
3 |
+
*/
|
4 |
+
jQuery(function() {
|
5 |
+
jQuery("body").on("focusin", "input[type=text].time_picker", function(){
|
6 |
+
self = jQuery(this);
|
7 |
+
self.datetimepicker({
|
8 |
+
closeText: timepicker_objectL10n.closeText,
|
9 |
+
currentText: timepicker_objectL10n.currentText,
|
10 |
+
prevText: timepicker_objectL10n.prevText,
|
11 |
+
nextText: timepicker_objectL10n.nextText,
|
12 |
+
weekHeader: timepicker_objectL10n.weekHeader,
|
13 |
+
isRTL: timepicker_objectL10n.isRTL,
|
14 |
+
timeText: timepicker_objectL10n.timeText,
|
15 |
+
hourText: timepicker_objectL10n.hourText,
|
16 |
+
minuteText: timepicker_objectL10n.minuteText,
|
17 |
+
secondText: timepicker_objectL10n.secondText,
|
18 |
+
millisecText: timepicker_objectL10n.millisecText,
|
19 |
+
timezoneText: timepicker_objectL10n.timezoneText
|
20 |
+
});
|
21 |
+
});
|
22 |
+
});
|
shared/assets/plugins/acf-field-date-time-picker/js/timepicker.js
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Date and Time Picker
|
3 |
+
*/
|
4 |
+
(function($){
|
5 |
+
|
6 |
+
function initialize_field( $el ) {
|
7 |
+
|
8 |
+
//$el.doStuff();
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
|
13 |
+
if( typeof acf.add_action !== 'undefined' ) {
|
14 |
+
|
15 |
+
/*
|
16 |
+
* ready append (ACF5)
|
17 |
+
*
|
18 |
+
* These are 2 events which are fired during the page load
|
19 |
+
* ready = on page load similar to $(document).ready()
|
20 |
+
* append = on new DOM elements appended via repeater field
|
21 |
+
*
|
22 |
+
* @type event
|
23 |
+
* @date 20/07/13
|
24 |
+
*
|
25 |
+
* @param $el (jQuery selection) the jQuery element which contains the ACF fields
|
26 |
+
* @return n/a
|
27 |
+
*/
|
28 |
+
|
29 |
+
acf.add_action('ready append', function( $el ){
|
30 |
+
|
31 |
+
$el.find('input.ps_timepicker').each(function(){
|
32 |
+
var input = $(this)
|
33 |
+
, is_timeonly = (input.attr('data-date_format') == undefined)
|
34 |
+
, date_format = (input.attr('data-date_format') != undefined) ? input.attr('data-date_format') : 'mm/dd/yy'
|
35 |
+
, time_format = input.attr('data-time_format')
|
36 |
+
, has_ampm = (input.attr('data-time_format').search(/t/i) != -1);
|
37 |
+
|
38 |
+
//don't apply datepicker to clone field
|
39 |
+
if (input.parents('.acf-row.clone').length) {
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
input.addClass('active').attr("placeholder", (is_timeonly) ? time_format : date_format + ' ' + time_format).datetimepicker({
|
45 |
+
changeYear: true
|
46 |
+
, yearRange: "-100:+100"
|
47 |
+
, changeMonth: true
|
48 |
+
, timeOnly: is_timeonly
|
49 |
+
, timeFormat: time_format
|
50 |
+
, dateFormat: date_format
|
51 |
+
, showWeek: (input.attr('data-show_week_number') != "true") ? 0 : 1
|
52 |
+
, ampm: has_ampm
|
53 |
+
, controlType: input.attr('data-picker')
|
54 |
+
, timeOnlyTitle: input.attr('title')
|
55 |
+
, monthNames: timepicker_objectL10n.monthNames
|
56 |
+
, monthNamesShort: timepicker_objectL10n.monthNamesShort
|
57 |
+
, dayNames: timepicker_objectL10n.dayNames
|
58 |
+
, dayNamesShort: timepicker_objectL10n.dayNamesShort
|
59 |
+
, dayNamesMin: timepicker_objectL10n.dayNamesMin
|
60 |
+
, firstDay: timepicker_objectL10n.firstDay
|
61 |
+
});
|
62 |
+
|
63 |
+
|
64 |
+
if($('body > #ui-datepicker-div').length > 0)
|
65 |
+
{
|
66 |
+
$('#ui-datepicker-div').wrap('<div class="ui-acf" />');
|
67 |
+
}
|
68 |
+
|
69 |
+
// allow null
|
70 |
+
input.blur(function(){
|
71 |
+
|
72 |
+
if( !input.val() )
|
73 |
+
{
|
74 |
+
input.val('');
|
75 |
+
}
|
76 |
+
});
|
77 |
+
});
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
});
|
82 |
+
|
83 |
+
|
84 |
+
} else {
|
85 |
+
|
86 |
+
|
87 |
+
/*
|
88 |
+
* acf/setup_fields (ACF4)
|
89 |
+
*
|
90 |
+
* This event is triggered when ACF adds any new elements to the DOM.
|
91 |
+
*
|
92 |
+
* @type function
|
93 |
+
* @since 1.0.0
|
94 |
+
* @date 01/01/12
|
95 |
+
*
|
96 |
+
* @param event e: an event object. This can be ignored
|
97 |
+
* @param Element postbox: An element which contains the new HTML
|
98 |
+
*
|
99 |
+
* @return n/a
|
100 |
+
*/
|
101 |
+
|
102 |
+
$(document).live('acf/setup_fields', function(e, postbox){
|
103 |
+
|
104 |
+
$(postbox).find('input.ps_timepicker').each(function(){
|
105 |
+
var input = $(this)
|
106 |
+
, is_timeonly = (input.attr('data-date_format') == undefined)
|
107 |
+
, date_format = (input.attr('data-date_format') != undefined) ? input.attr('data-date_format') : 'mm/dd/yy'
|
108 |
+
, time_format = input.attr('data-time_format')
|
109 |
+
, has_ampm = (input.attr('data-time_format').search(/t/i) != -1);
|
110 |
+
|
111 |
+
if( acf.helpers.is_clone_field(input) )
|
112 |
+
{
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
|
117 |
+
input.addClass('active').attr("placeholder", (is_timeonly) ? time_format : date_format + ' ' + time_format).datetimepicker({
|
118 |
+
changeYear: true
|
119 |
+
, yearRange: "-100:+100"
|
120 |
+
, changeMonth: true
|
121 |
+
, timeOnly: is_timeonly
|
122 |
+
, timeFormat: time_format
|
123 |
+
, dateFormat: date_format
|
124 |
+
, showWeek: (input.attr('data-show_week_number') != "true") ? 0 : 1
|
125 |
+
, ampm: has_ampm
|
126 |
+
, controlType: input.attr('data-picker')
|
127 |
+
, timeOnlyTitle: input.attr('title')
|
128 |
+
, monthNames: timepicker_objectL10n.monthNames
|
129 |
+
, monthNamesShort: timepicker_objectL10n.monthNamesShort
|
130 |
+
, dayNames: timepicker_objectL10n.dayNames
|
131 |
+
, dayNamesShort: timepicker_objectL10n.dayNamesShort
|
132 |
+
, dayNamesMin: timepicker_objectL10n.dayNamesMin
|
133 |
+
, firstDay: timepicker_objectL10n.firstDay
|
134 |
+
});
|
135 |
+
|
136 |
+
|
137 |
+
if($('body > #ui-datepicker-div').length > 0)
|
138 |
+
{
|
139 |
+
$('#ui-datepicker-div').wrap('<div class="ui-acf" />');
|
140 |
+
}
|
141 |
+
|
142 |
+
// allow null
|
143 |
+
input.blur(function(){
|
144 |
+
|
145 |
+
if( !input.val() )
|
146 |
+
{
|
147 |
+
input.val('');
|
148 |
+
}
|
149 |
+
});
|
150 |
+
});
|
151 |
+
});
|
152 |
+
}
|
153 |
+
})(jQuery);
|
shared/classes/class.acf-bootstrap.php
CHANGED
@@ -45,6 +45,7 @@ class Inbound_Shared_ACF_BootStrap {
|
|
45 |
public static function load_acf_extended_fields() {
|
46 |
if (!function_exists('register_fields_font_awesome')) {
|
47 |
include_once( INBOUNDNOW_SHARED_PATH . 'assets/plugins/advanced-custom-fields-font-awesome/acf-font-awesome.php');
|
|
|
48 |
}
|
49 |
}
|
50 |
|
45 |
public static function load_acf_extended_fields() {
|
46 |
if (!function_exists('register_fields_font_awesome')) {
|
47 |
include_once( INBOUNDNOW_SHARED_PATH . 'assets/plugins/advanced-custom-fields-font-awesome/acf-font-awesome.php');
|
48 |
+
include_once( INBOUNDNOW_SHARED_PATH . 'assets/plugins/acf-field-date-time-picker/acf-date_time_picker.php');
|
49 |
}
|
50 |
}
|
51 |
|
shared/classes/class.events.php
CHANGED
@@ -86,14 +86,14 @@ class Inbound_Events {
|
|
86 |
'event_name' => 'inbound_form_submission',
|
87 |
'page_id' => $lead['page_id'],
|
88 |
'variation_id' => $lead['variation'],
|
89 |
-
'form_id' => $raw_params['inbound_form_id'],
|
90 |
'lead_id' => $lead['id'],
|
91 |
'lead_uid' => ( isset($_COOKIE['wp_lead_uid']) ? $_COOKIE['wp_lead_uid'] : null ),
|
92 |
'session_id' => '',
|
93 |
'event_details' => json_encode($details),
|
94 |
'datetime' => $lead['wordpress_date_time']
|
95 |
);
|
96 |
-
|
97 |
self::store_event($args);
|
98 |
}
|
99 |
|
@@ -119,7 +119,8 @@ class Inbound_Events {
|
|
119 |
'lead_id' => $args['urlparams']['lead_id'],
|
120 |
'lead_uid' => ( isset($_COOKIE['wp_lead_uid']) ? $_COOKIE['wp_lead_uid'] : null ),
|
121 |
'event_details' => json_encode($args['urlparams']),
|
122 |
-
'datetime' => $args['datetime']
|
|
|
123 |
);
|
124 |
|
125 |
self::store_event($args);
|
@@ -207,26 +208,26 @@ class Inbound_Events {
|
|
207 |
|
208 |
return $results;
|
209 |
}
|
210 |
-
|
211 |
-
|
212 |
* Get form submission events given conditions
|
213 |
-
|
214 |
*/
|
215 |
public static function get_form_submissions_by( $nature = 'lead_id' , $params ){
|
216 |
global $wpdb;
|
217 |
|
218 |
$table_name = $wpdb->prefix . "inbound_events";
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
$results = $wpdb->get_results( $query , ARRAY_A );
|
231 |
|
232 |
return $results;
|
@@ -248,22 +249,22 @@ class Inbound_Events {
|
|
248 |
|
249 |
/**
|
250 |
* Get cta click events given conditions
|
251 |
-
|
252 |
*/
|
253 |
public static function get_cta_clicks_by( $nature = 'lead_id' , $params ){
|
254 |
global $wpdb;
|
255 |
|
256 |
$table_name = $wpdb->prefix . "inbound_events";
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
$results = $wpdb->get_results( $query , ARRAY_A );
|
268 |
|
269 |
return $results;
|
@@ -297,6 +298,50 @@ class Inbound_Events {
|
|
297 |
return $results;
|
298 |
}
|
299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
/**
|
301 |
* Get custom event data by lead id
|
302 |
*/
|
@@ -310,7 +355,7 @@ class Inbound_Events {
|
|
310 |
|
311 |
return $results;
|
312 |
}
|
313 |
-
|
314 |
/**
|
315 |
* Get all all custom event data by a certain indicator
|
316 |
*/
|
@@ -319,15 +364,15 @@ class Inbound_Events {
|
|
319 |
|
320 |
$table_name = $wpdb->prefix . "inbound_events";
|
321 |
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
$results = $wpdb->get_results( $query , ARRAY_A );
|
332 |
|
333 |
return $results;
|
@@ -392,12 +437,12 @@ class Inbound_Events {
|
|
392 |
return $count;
|
393 |
}
|
394 |
|
395 |
-
|
396 |
-
|
397 |
* @param string $activity [any or custom event type]
|
398 |
* @param datetime $start_date
|
399 |
* @param datetime $end_date
|
400 |
-
|
401 |
public static function get_page_actions($page_id , $activity = 'any' , $start_date, $end_date ){
|
402 |
global $wpdb;
|
403 |
|
@@ -412,7 +457,7 @@ class Inbound_Events {
|
|
412 |
break;
|
413 |
}
|
414 |
|
415 |
-
|
416 |
/* return latest activity if recorded */
|
417 |
$count = $wpdb->get_var( $query , 0, 0 );
|
418 |
|
86 |
'event_name' => 'inbound_form_submission',
|
87 |
'page_id' => $lead['page_id'],
|
88 |
'variation_id' => $lead['variation'],
|
89 |
+
'form_id' => (isset($raw_params['inbound_form_id'])) ? $raw_params['inbound_form_id'] : '',
|
90 |
'lead_id' => $lead['id'],
|
91 |
'lead_uid' => ( isset($_COOKIE['wp_lead_uid']) ? $_COOKIE['wp_lead_uid'] : null ),
|
92 |
'session_id' => '',
|
93 |
'event_details' => json_encode($details),
|
94 |
'datetime' => $lead['wordpress_date_time']
|
95 |
);
|
96 |
+
|
97 |
self::store_event($args);
|
98 |
}
|
99 |
|
119 |
'lead_id' => $args['urlparams']['lead_id'],
|
120 |
'lead_uid' => ( isset($_COOKIE['wp_lead_uid']) ? $_COOKIE['wp_lead_uid'] : null ),
|
121 |
'event_details' => json_encode($args['urlparams']),
|
122 |
+
'datetime' => $args['datetime'],
|
123 |
+
'form_id' => ''
|
124 |
);
|
125 |
|
126 |
self::store_event($args);
|
208 |
|
209 |
return $results;
|
210 |
}
|
211 |
+
|
212 |
+
/**
|
213 |
* Get form submission events given conditions
|
214 |
+
*
|
215 |
*/
|
216 |
public static function get_form_submissions_by( $nature = 'lead_id' , $params ){
|
217 |
global $wpdb;
|
218 |
|
219 |
$table_name = $wpdb->prefix . "inbound_events";
|
220 |
+
|
221 |
+
switch ($nature) {
|
222 |
+
case 'lead_id':
|
223 |
+
$query = 'SELECT * FROM '.$table_name.' WHERE datetime >= "'.$params['start_date'].'" AND datetime <= "'.$params['end_date'].'" AND `lead_id` = "'.$params['lead_id'].'" AND `event_name` = "inbound_form_submission" ORDER BY `datetime` DESC';
|
224 |
+
break;
|
225 |
+
case 'page_id':
|
226 |
+
$query = 'SELECT * FROM '.$table_name.' WHERE datetime >= "'.$params['start_date'].'" AND datetime <= "'.$params['end_date'].'" AND `page_id` = "'.$params['page_id'].'" AND `event_name` = "inbound_form_submission" ORDER BY `datetime` DESC';
|
227 |
+
break;
|
228 |
+
}
|
229 |
+
|
230 |
+
|
231 |
$results = $wpdb->get_results( $query , ARRAY_A );
|
232 |
|
233 |
return $results;
|
249 |
|
250 |
/**
|
251 |
* Get cta click events given conditions
|
252 |
+
*
|
253 |
*/
|
254 |
public static function get_cta_clicks_by( $nature = 'lead_id' , $params ){
|
255 |
global $wpdb;
|
256 |
|
257 |
$table_name = $wpdb->prefix . "inbound_events";
|
258 |
+
|
259 |
+
switch ($nature) {
|
260 |
+
case 'lead_id':
|
261 |
+
$query = 'SELECT * FROM '.$table_name.' WHERE datetime >= "'.$params['start_date'].'" AND datetime <= "'.$params['end_date'].'" AND `lead_id` = "'.$params['lead_id'].'" AND `event_name` = "inbound_cta_click" ORDER BY `datetime` DESC';
|
262 |
+
break;
|
263 |
+
case 'page_id':
|
264 |
+
$query = 'SELECT * FROM '.$table_name.' WHERE datetime >= "'.$params['start_date'].'" AND datetime <= "'.$params['end_date'].'" AND `page_id` = "'.$params['page_id'].'" AND `event_name` = "inbound_cta_click" ORDER BY `datetime` DESC';
|
265 |
+
break;
|
266 |
+
}
|
267 |
+
|
268 |
$results = $wpdb->get_results( $query , ARRAY_A );
|
269 |
|
270 |
return $results;
|
298 |
return $results;
|
299 |
}
|
300 |
|
301 |
+
/**
|
302 |
+
* Get all unsubscribe events given an email id
|
303 |
+
*/
|
304 |
+
public static function get_unsubscribes_by_email( $email_id, $vid = null ){
|
305 |
+
global $wpdb;
|
306 |
+
|
307 |
+
$table_name = $wpdb->prefix . "inbound_events";
|
308 |
+
|
309 |
+
$query = 'SELECT * FROM '.$table_name.' WHERE `email_id` = "'.$email_id.'"';
|
310 |
+
|
311 |
+
if ($vid>-1) {
|
312 |
+
$query .= 'AND `variation_id` = "'.$vid.'"';
|
313 |
+
}
|
314 |
+
$query .= 'AND `event_name` = "inbound_unsubscribe"';
|
315 |
+
|
316 |
+
$results = $wpdb->get_results( $query , ARRAY_A );
|
317 |
+
|
318 |
+
return $results;
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Get all unsubscribe events given an email id
|
323 |
+
*/
|
324 |
+
public static function get_unsubscribes_count_by_email_id( $email_id , $vid = null ){
|
325 |
+
global $wpdb;
|
326 |
+
|
327 |
+
$table_name = $wpdb->prefix . "inbound_events";
|
328 |
+
|
329 |
+
$query = 'SELECT count(*) FROM '.$table_name.' WHERE `email_id` = "'.$email_id.'"';
|
330 |
+
|
331 |
+
if ($vid>-1) {
|
332 |
+
$query .= 'AND `variation_id` = "'.$vid.'"';
|
333 |
+
}
|
334 |
+
|
335 |
+
$query .= 'AND `event_name` = "inbound_unsubscribe"';
|
336 |
+
|
337 |
+
$count = $wpdb->get_var( $query , 0, 0 );
|
338 |
+
|
339 |
+
/* return null if nothing there */
|
340 |
+
return ($count) ? $count : 0;
|
341 |
+
|
342 |
+
|
343 |
+
}
|
344 |
+
|
345 |
/**
|
346 |
* Get custom event data by lead id
|
347 |
*/
|
355 |
|
356 |
return $results;
|
357 |
}
|
358 |
+
|
359 |
/**
|
360 |
* Get all all custom event data by a certain indicator
|
361 |
*/
|
364 |
|
365 |
$table_name = $wpdb->prefix . "inbound_events";
|
366 |
|
367 |
+
switch ($nature) {
|
368 |
+
case 'lead_id':
|
369 |
+
$query = 'SELECT * FROM '.$table_name.' WHERE `lead_id` = "'.$params['lead_id'].'" AND `event_name` NOT LIKE "inbound_%" ORDER BY `datetime` DESC';
|
370 |
+
break;
|
371 |
+
case 'page_id':
|
372 |
+
$query = 'SELECT * FROM '.$table_name.' WHERE `page_id` = "'.$params['page_id'].'" AND `event_name` NOT LIKE "inbound_%" ORDER BY `datetime` DESC';
|
373 |
+
break;
|
374 |
+
}
|
375 |
+
|
376 |
$results = $wpdb->get_results( $query , ARRAY_A );
|
377 |
|
378 |
return $results;
|
437 |
return $count;
|
438 |
}
|
439 |
|
440 |
+
/**
|
441 |
+
* @param int $page_id
|
442 |
* @param string $activity [any or custom event type]
|
443 |
* @param datetime $start_date
|
444 |
* @param datetime $end_date
|
445 |
+
*/
|
446 |
public static function get_page_actions($page_id , $activity = 'any' , $start_date, $end_date ){
|
447 |
global $wpdb;
|
448 |
|
457 |
break;
|
458 |
}
|
459 |
|
460 |
+
|
461 |
/* return latest activity if recorded */
|
462 |
$count = $wpdb->get_var( $query , 0, 0 );
|
463 |
|
shared/classes/class.form.php
CHANGED
@@ -451,7 +451,7 @@ if (!class_exists('Inbound_Forms')) {
|
|
451 |
'.$icon_insert.''.$submit_button.$inner_button.'</button></div><input data-ignore-form-field="true" type="hidden" name="inbound_submitted" value="1">';
|
452 |
/* <!--<input type="submit" '.$submit_button_type.' class="button" value="'.$submit_button.'" name="send" id="inbound_form_submit" />--> */
|
453 |
|
454 |
-
$form .= '<input type="hidden" name="inbound_form_n" class="inbound_form_n" value="'.$form_name.'"><input type="hidden" name="inbound_form_lists" id="inbound_form_lists" value="'.$lists.'" data-map-form-field="inbound_form_lists"><input type="hidden" name="inbound_form_id" class="inbound_form_id" value="'.$id.'"><input type="hidden" name="inbound_current_page_url" value="'.$current_page.'"><input type="hidden" name="inbound_furl" value="'. base64_encode($redirect) .'"><input type="hidden" name="inbound_notify" value="'. base64_encode($notify) .'"><input type="hidden" class="inbound_params" name="inbound_params" value=""></form></div>';
|
455 |
$form .= "<style type='text/css'>.inbound-button-submit{ {$font_size} }</style>";
|
456 |
$form = preg_replace('/<br class="inbr".\/>/', '', $form); /* remove editor br tags */
|
457 |
|
@@ -622,7 +622,12 @@ if (!class_exists('Inbound_Forms')) {
|
|
622 |
|
623 |
/* replace core tokens */
|
624 |
$content = str_replace('{{site-name}}', get_bloginfo( 'name' ), $content);
|
625 |
-
|
|
|
|
|
|
|
|
|
|
|
626 |
|
627 |
foreach ($form_data as $key => $value) {
|
628 |
$token_key = str_replace('_','-', $key);
|
@@ -631,6 +636,14 @@ if (!class_exists('Inbound_Forms')) {
|
|
631 |
$content = str_replace( '{{'.trim($token_key).'}}', $value, $content );
|
632 |
}
|
633 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
return $content;
|
635 |
}
|
636 |
|
@@ -722,6 +735,7 @@ if (!class_exists('Inbound_Forms')) {
|
|
722 |
|
723 |
/* redirect now */
|
724 |
if ($redirect != "") {
|
|
|
725 |
wp_redirect( $redirect );
|
726 |
exit();
|
727 |
}
|
451 |
'.$icon_insert.''.$submit_button.$inner_button.'</button></div><input data-ignore-form-field="true" type="hidden" name="inbound_submitted" value="1">';
|
452 |
/* <!--<input type="submit" '.$submit_button_type.' class="button" value="'.$submit_button.'" name="send" id="inbound_form_submit" />--> */
|
453 |
|
454 |
+
$form .= '<input type="hidden" name="inbound_form_n" class="inbound_form_n" value="'.$form_name.'"><input type="hidden" name="inbound_form_lists" id="inbound_form_lists" value="'.$lists.'" data-map-form-field="inbound_form_lists"><input type="hidden" name="inbound_form_id" class="inbound_form_id" value="'.$id.'"><input type="hidden" name="inbound_current_page_url" value="'.$current_page.'"><input type="hidden" name="page_id" value="'.( isset($post->ID) ? $post->ID : '0' ) .'"><input type="hidden" name="inbound_furl" value="'. base64_encode($redirect) .'"><input type="hidden" name="inbound_notify" value="'. base64_encode($notify) .'"><input type="hidden" class="inbound_params" name="inbound_params" value=""></form></div>';
|
455 |
$form .= "<style type='text/css'>.inbound-button-submit{ {$font_size} }</style>";
|
456 |
$form = preg_replace('/<br class="inbr".\/>/', '', $form); /* remove editor br tags */
|
457 |
|
622 |
|
623 |
/* replace core tokens */
|
624 |
$content = str_replace('{{site-name}}', get_bloginfo( 'name' ), $content);
|
625 |
+
$content = str_replace('{{form-name}}', $form_data['inbound_form_n'], $content);
|
626 |
+
|
627 |
+
/* clean possible encoding issues */
|
628 |
+
$von = array("ä","ö","ü","ß","Ä","Ö","Ü","é"); //to correct double whitepaces as well
|
629 |
+
$zu = array("ä","ö","ü","ß","Ä","Ö","Ü","é");
|
630 |
+
$content = str_replace($von, $zu, $content);
|
631 |
|
632 |
foreach ($form_data as $key => $value) {
|
633 |
$token_key = str_replace('_','-', $key);
|
636 |
$content = str_replace( '{{'.trim($token_key).'}}', $value, $content );
|
637 |
}
|
638 |
|
639 |
+
foreach ($_POST as $key => $value) {
|
640 |
+
$token_key = str_replace('_','-', $key);
|
641 |
+
$token_key = str_replace('inbound-','', $token_key);
|
642 |
+
|
643 |
+
$content = str_replace( '{{'.trim($token_key).'}}', $value, $content );
|
644 |
+
}
|
645 |
+
|
646 |
+
|
647 |
return $content;
|
648 |
}
|
649 |
|
735 |
|
736 |
/* redirect now */
|
737 |
if ($redirect != "") {
|
738 |
+
$redirect = str_replace('%3F', '/', html_entity_decode($redirect));
|
739 |
wp_redirect( $redirect );
|
740 |
exit();
|
741 |
}
|
shared/classes/class.inbound-api.php
CHANGED
@@ -1279,7 +1279,7 @@ if (!class_exists('Inbound_API')) {
|
|
1279 |
$params = array_merge( $params, $_REQUEST );
|
1280 |
|
1281 |
/* lead email or lead id required */
|
1282 |
-
if ( !isset( $params['id'] ) && !isset( $params['
|
1283 |
$error['error'] = __( 'This endpoint requires either the \'id\' or the \'email\' or the \'cta_id\' parameter be set.', INBOUNDNOW_TEXT_DOMAIN ) ;
|
1284 |
self::$data = $error;
|
1285 |
self::output( 401 );
|
@@ -1317,6 +1317,11 @@ if (!class_exists('Inbound_API')) {
|
|
1317 |
$args['datetime'] = current_time('mysql');
|
1318 |
}
|
1319 |
|
|
|
|
|
|
|
|
|
|
|
1320 |
/* get tracked link */
|
1321 |
$tracked_link = self::analytics_get_tracking_code( $args );
|
1322 |
|
1279 |
$params = array_merge( $params, $_REQUEST );
|
1280 |
|
1281 |
/* lead email or lead id required */
|
1282 |
+
if ( !isset( $params['id'] ) && !isset( $params['email_id']) && !isset( $params['cta_id']) ) {
|
1283 |
$error['error'] = __( 'This endpoint requires either the \'id\' or the \'email\' or the \'cta_id\' parameter be set.', INBOUNDNOW_TEXT_DOMAIN ) ;
|
1284 |
self::$data = $error;
|
1285 |
self::output( 401 );
|
1317 |
$args['datetime'] = current_time('mysql');
|
1318 |
}
|
1319 |
|
1320 |
+
/* if lead_id is not set then set */
|
1321 |
+
if (!isset($args['lead_id'])) {
|
1322 |
+
$args['lead_id'] = $args['id'];
|
1323 |
+
}
|
1324 |
+
|
1325 |
/* get tracked link */
|
1326 |
$tracked_link = self::analytics_get_tracking_code( $args );
|
1327 |
|
shared/classes/class.lead-storage.php
CHANGED
@@ -120,8 +120,13 @@ if (!class_exists('LeadStorage')) {
|
|
120 |
if(!empty($lead['lead_lists']) && is_array($lead['lead_lists'])){
|
121 |
global $Inbound_Leads;
|
122 |
$Inbound_Leads->add_lead_to_list($lead['id'], $lead['lead_lists'], 'wplead_list_category');
|
|
|
|
|
|
|
123 |
}
|
124 |
|
|
|
|
|
125 |
/* Store page views for people with ajax tracking off */
|
126 |
$ajax_tracking_off = false; /* get_option */
|
127 |
if($lead['page_views'] && $ajax_tracking_off ) {
|
120 |
if(!empty($lead['lead_lists']) && is_array($lead['lead_lists'])){
|
121 |
global $Inbound_Leads;
|
122 |
$Inbound_Leads->add_lead_to_list($lead['id'], $lead['lead_lists'], 'wplead_list_category');
|
123 |
+
|
124 |
+
/* store lead list cookie */
|
125 |
+
Leads_Tracking::cookie_lead_lists($lead['id']);
|
126 |
}
|
127 |
|
128 |
+
|
129 |
+
|
130 |
/* Store page views for people with ajax tracking off */
|
131 |
$ajax_tracking_off = false; /* get_option */
|
132 |
if($lead['page_views'] && $ajax_tracking_off ) {
|
shared/classes/class.licensing.php
CHANGED
@@ -164,34 +164,23 @@ if ( ! class_exists( 'Inbound_License' ) )
|
|
164 |
{
|
165 |
|
166 |
$date = date("Y-m-d");
|
167 |
-
$cache_date =
|
168 |
$license_status = get_option('inboundnow_license_status_'.$this->plugin_slug);
|
169 |
|
170 |
-
/*
|
171 |
-
echo "date: $date <br>";
|
172 |
-
echo "cache date: $cache_date <br>";
|
173 |
-
echo "license status: $license_status <br>";
|
174 |
-
echo "license key: ".$field['value'];
|
175 |
-
echo "<br>";
|
176 |
-
*/
|
177 |
|
178 |
-
if (isset($cache_date)
|
179 |
return "valid";
|
180 |
}
|
181 |
|
182 |
$api_params = array(
|
183 |
-
'edd_action' => '
|
184 |
'license' => $field['value'],
|
185 |
'item_name' => urlencode( $this->remote_download_slug ) ,
|
186 |
'cache_bust'=> substr(md5(rand()),0,7)
|
187 |
);
|
188 |
|
189 |
-
/*print_r($api_params); */
|
190 |
-
/*echo '<br>'; */
|
191 |
-
|
192 |
/* Call the custom API. */
|
193 |
-
$response = wp_remote_get( add_query_arg( $api_params, $this->remote_api_url ), array( 'timeout' =>
|
194 |
-
/*print_r($response['body']);exit; */
|
195 |
|
196 |
if ( is_wp_error( $response ) )
|
197 |
return false;
|
@@ -199,13 +188,13 @@ if ( ! class_exists( 'Inbound_License' ) )
|
|
199 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
200 |
/*print_r($license_data);exit; */
|
201 |
|
202 |
-
if( $license_data->license == '
|
203 |
$newDate = date('Y-m-d', strtotime($license_data->expires));
|
204 |
-
|
205 |
-
return '
|
206 |
/* this license is still valid */
|
207 |
} else {
|
208 |
-
return '
|
209 |
}
|
210 |
}
|
211 |
|
@@ -246,7 +235,7 @@ if ( ! class_exists( 'Inbound_License' ) )
|
|
246 |
|
247 |
/* data to send in our API request */
|
248 |
$api_params = array(
|
249 |
-
'edd_action'=> '
|
250 |
'license' => $master_license_key,
|
251 |
'item_name' => $this->remote_download_slug ,
|
252 |
'cache_bust'=> substr(md5(rand()),0,7)
|
@@ -256,8 +245,6 @@ if ( ! class_exists( 'Inbound_License' ) )
|
|
256 |
|
257 |
/* Call the custom API. */
|
258 |
$response = wp_remote_get( add_query_arg( $api_params, $this->remote_api_url ), array( 'timeout' => 30, 'sslverify' => false ) );
|
259 |
-
/*echo $response['body']; */
|
260 |
-
/*echo "<hr>"; */
|
261 |
|
262 |
/* decode the license data */
|
263 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
@@ -323,7 +310,7 @@ if ( ! class_exists( 'Inbound_License' ) )
|
|
323 |
public function api_request() {
|
324 |
|
325 |
$api_params = array(
|
326 |
-
'edd_action' => '
|
327 |
'license' => $this->master_license_key,
|
328 |
'name' => $this->remote_download_slug,
|
329 |
'slug' => $this->plugin_slug
|
164 |
{
|
165 |
|
166 |
$date = date("Y-m-d");
|
167 |
+
$cache_date = get_transient($field['id']."-expire");
|
168 |
$license_status = get_option('inboundnow_license_status_'.$this->plugin_slug);
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
+
if (isset($cache_date)&&$license_status=='active') {
|
172 |
return "valid";
|
173 |
}
|
174 |
|
175 |
$api_params = array(
|
176 |
+
'edd_action' => 'inbound_check_license',
|
177 |
'license' => $field['value'],
|
178 |
'item_name' => urlencode( $this->remote_download_slug ) ,
|
179 |
'cache_bust'=> substr(md5(rand()),0,7)
|
180 |
);
|
181 |
|
|
|
|
|
|
|
182 |
/* Call the custom API. */
|
183 |
+
$response = wp_remote_get( add_query_arg( $api_params, $this->remote_api_url ), array( 'timeout' => 30, 'sslverify' => false ) );
|
|
|
184 |
|
185 |
if ( is_wp_error( $response ) )
|
186 |
return false;
|
188 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
189 |
/*print_r($license_data);exit; */
|
190 |
|
191 |
+
if( $license_data->license == 'active' ) {
|
192 |
$newDate = date('Y-m-d', strtotime($license_data->expires));
|
193 |
+
set_transient($field['id']."-expire", true, YEAR_IN_SECONDS / 2 );
|
194 |
+
return 'active';
|
195 |
/* this license is still valid */
|
196 |
} else {
|
197 |
+
return 'inactive';
|
198 |
}
|
199 |
}
|
200 |
|
235 |
|
236 |
/* data to send in our API request */
|
237 |
$api_params = array(
|
238 |
+
'edd_action'=> 'inbound_check_license',
|
239 |
'license' => $master_license_key,
|
240 |
'item_name' => $this->remote_download_slug ,
|
241 |
'cache_bust'=> substr(md5(rand()),0,7)
|
245 |
|
246 |
/* Call the custom API. */
|
247 |
$response = wp_remote_get( add_query_arg( $api_params, $this->remote_api_url ), array( 'timeout' => 30, 'sslverify' => false ) );
|
|
|
|
|
248 |
|
249 |
/* decode the license data */
|
250 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
310 |
public function api_request() {
|
311 |
|
312 |
$api_params = array(
|
313 |
+
'edd_action' => 'inbound_get_version',
|
314 |
'license' => $this->master_license_key,
|
315 |
'name' => $this->remote_download_slug,
|
316 |
'slug' => $this->plugin_slug
|
shared/classes/class.load-shared.php
CHANGED
@@ -77,8 +77,8 @@ if (!class_exists('Inbound_Load_Shared')) {
|
|
77 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.licensing.php');
|
78 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.master-license.php');
|
79 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.branching.php');
|
80 |
-
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.
|
81 |
-
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.feedback.php');
|
82 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.notifications.php');
|
83 |
require_once( INBOUNDNOW_SHARED_PATH . 'classes/class.inbound-api.api-key-generation.php');
|
84 |
require_once( INBOUNDNOW_SHARED_PATH . 'classes/class.inbound-api.api-keys-table.php');
|
77 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.licensing.php');
|
78 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.master-license.php');
|
79 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.branching.php');
|
80 |
+
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.promote.php');
|
81 |
+
/* include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.feedback.php'); */
|
82 |
include_once( INBOUNDNOW_SHARED_PATH . 'classes/class.notifications.php');
|
83 |
require_once( INBOUNDNOW_SHARED_PATH . 'classes/class.inbound-api.api-key-generation.php');
|
84 |
require_once( INBOUNDNOW_SHARED_PATH . 'classes/class.inbound-api.api-keys-table.php');
|
shared/classes/class.master-license.php
CHANGED
@@ -35,8 +35,8 @@ if (!function_exists('inboundnow_add_master_license'))
|
|
35 |
$global_settings[$key]['settings']['master-key'] = array(
|
36 |
'id' => 'inboundnow_master_license_key',
|
37 |
'option_name' => 'inboundnow_master_license_key',
|
38 |
-
'label' => __('
|
39 |
-
'description' => __( "Head to http://www.inboundnow.com/ to retrieve your extension-ready license key.", $text_domain ),
|
40 |
'type' => 'text',
|
41 |
'default' => ''
|
42 |
);
|
35 |
$global_settings[$key]['settings']['master-key'] = array(
|
36 |
'id' => 'inboundnow_master_license_key',
|
37 |
'option_name' => 'inboundnow_master_license_key',
|
38 |
+
'label' => __('Inbound Now API Key', $text_domain ),
|
39 |
+
'description' => __( "Head to http://www.inboundnow.com/account to retrieve your extension-ready license key.", $text_domain ),
|
40 |
'type' => 'text',
|
41 |
'default' => ''
|
42 |
);
|
shared/classes/class.menus.adminbar.php
CHANGED
@@ -129,6 +129,17 @@ if (!class_exists('Inbound_Menus_Adminbar')) {
|
|
129 |
$wp_admin_bar->add_node( $menu_item );
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
133 |
|
134 |
/**
|
129 |
$wp_admin_bar->add_node( $menu_item );
|
130 |
}
|
131 |
|
132 |
+
/* add lead search */
|
133 |
+
if (class_exists('Inbound_Pro_Plugin')) {
|
134 |
+
$args = array(
|
135 |
+
'id' => 'lead_search',
|
136 |
+
'title' => '<i class="fa fa-search"></i>',
|
137 |
+
'href' => '#lead-search',
|
138 |
+
'meta' => array('class' => 'adminbar-leads-search')
|
139 |
+
);
|
140 |
+
$wp_admin_bar->add_node($args);
|
141 |
+
}
|
142 |
+
|
143 |
}
|
144 |
|
145 |
/**
|
shared/classes/class.promote.php
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Inbound Now Weclome Page Class
|
4 |
+
*
|
5 |
+
* @package Landing Pages
|
6 |
+
* @subpackage Admin/Welcome
|
7 |
+
* @copyright Copyright (c) 2014, David Wells
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 1.4
|
10 |
+
* Forked from pippin's https://easydigitaldownloads.com/
|
11 |
+
*/
|
12 |
+
/**
|
13 |
+
* Inbound_Promote Class
|
14 |
+
*
|
15 |
+
* A general class for About and Credits page.
|
16 |
+
*
|
17 |
+
* @since 1.4
|
18 |
+
*/
|
19 |
+
|
20 |
+
class Inbound_Promote {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* initiate class
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
self::load_hooks();
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Load hooks and filters
|
31 |
+
*/
|
32 |
+
public static function load_hooks() {
|
33 |
+
/* add hooks only available if pro not activated */
|
34 |
+
if (!defined('INBOUND_PRO_PATH')) {
|
35 |
+
add_filter( 'plugin_row_meta', array( __CLASS__ , 'filter_quick_links' ), 10, 2 );
|
36 |
+
|
37 |
+
/* help us translate the plugin */
|
38 |
+
add_action('admin_notices', array(__CLASS__, 'help_us_translate'));
|
39 |
+
|
40 |
+
/* help us translate the plugin */
|
41 |
+
add_action('admin_notices', array( __CLASS__, 'upgrade_to_pro' ));
|
42 |
+
|
43 |
+
/* Add ajax listeners for switching templates */
|
44 |
+
add_action( 'wp_ajax_inbound_dismiss_ajax', array(__CLASS__, 'dismiss_notice'));
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
/**
|
52 |
+
* displays pro upgrade cta for non pro users
|
53 |
+
*/
|
54 |
+
public static function filter_quick_links( $links, $file ) {
|
55 |
+
|
56 |
+
$plugins = array(
|
57 |
+
'landing-pages/landing-pages.php',
|
58 |
+
'cta/calls-to-action.php',
|
59 |
+
'leads/leads.php',
|
60 |
+
);
|
61 |
+
|
62 |
+
if ( in_array( $file , $plugins ) ) {
|
63 |
+
return array_merge(
|
64 |
+
$links,
|
65 |
+
array( '<a href="http://inboundsite.wpengine.com/upgrade">'.__( 'UPGRADE TO PRO (FREE)' , INBOUNDNOW_TEXT_DOMAIN ) .'</a>' )
|
66 |
+
);
|
67 |
+
}
|
68 |
+
return $links;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Translation cta
|
73 |
+
*/
|
74 |
+
public static function help_us_translate() {
|
75 |
+
global $pagenow;
|
76 |
+
global $current_user;
|
77 |
+
|
78 |
+
$message_id = 'translate';
|
79 |
+
|
80 |
+
/* check if current page is target post type */
|
81 |
+
$post_types = array('landing-page', 'wp-call-to-action', 'wp-lead');
|
82 |
+
$type = get_post_type(get_the_ID());
|
83 |
+
if ( !in_array($type, $post_types)) {
|
84 |
+
return;
|
85 |
+
}
|
86 |
+
|
87 |
+
/* check if user viewed message already */
|
88 |
+
if (self::check_if_viewed($message_id)) {
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
|
92 |
+
echo '<div class="updated" id="inbound_notice_'.$message_id.'">
|
93 |
+
<h2>' . __('Help Translate Inbound Now Marketing Plugins', INBOUNDNOW_TEXT_DOMAIN) . '</h2>
|
94 |
+
<p style="width:80%;">' . sprintf(__('Help translate Inbound Now\'s marketing plugins to your %s native langauge %s!', INBOUNDNOW_TEXT_DOMAIN), '<a href="http://docs.inboundnow.com/guide/inbound-translations-project/" target="_blank">', '</a>') . '</p>
|
95 |
+
<a class="button button-primary button-large" href="http://www.inboundnow.com/translate-inbound-now/" target="_blank">' . __('Help Translate the plugins', INBOUNDNOW_TEXT_DOMAIN) . '</a>
|
96 |
+
<a class="button button-large inbound_dismiss" href="#" id="'.$message_id.'" data-notification-id="'.$message_id.'" >' . __('No Thanks', INBOUNDNOW_TEXT_DOMAIN) . '</a>
|
97 |
+
<br><br>
|
98 |
+
</div>';
|
99 |
+
|
100 |
+
/* echo javascript used to listen for notice closing */
|
101 |
+
self::javascript_dismiss_notice();
|
102 |
+
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* call to action to upgrade to pro
|
108 |
+
*/
|
109 |
+
public static function upgrade_to_pro() {
|
110 |
+
|
111 |
+
$message_id = 'upgrade_to_pro';
|
112 |
+
|
113 |
+
/* check if current page is target post type */
|
114 |
+
$post_types = array('landing-page', 'wp-call-to-action', 'wp-lead');
|
115 |
+
$type = get_post_type(get_the_ID());
|
116 |
+
if ( !in_array($type, $post_types)) {
|
117 |
+
return;
|
118 |
+
}
|
119 |
+
|
120 |
+
/* check if user viewed message already */
|
121 |
+
if (self::check_if_viewed($message_id)) {
|
122 |
+
return;
|
123 |
+
}
|
124 |
+
|
125 |
+
echo '<div class="updated" id="inbound_notice_'.$message_id.'">
|
126 |
+
<h1>A friendly message from Inbound Now</h1>
|
127 |
+
<p style="width:80%;">
|
128 |
+
'.__('Hello there!' , INBOUNDNOW_TEXT_DOMAIN ) .'
|
129 |
+
</p>
|
130 |
+
<p style="width:80%;">
|
131 |
+
' . __('We noticed you are using a stand alone version of an Inbound Now plugin. Did you know we provide a more powerful free plugin that includes this one and offers a lot more? ' , INBOUNDNOW_TEXT_DOMAIN ) .'
|
132 |
+
</p>
|
133 |
+
<p style="width:80%;">
|
134 |
+
' . __('It\'s free, and we invite you to try it.' , INBOUNDNOW_TEXT_DOMAIN ) .'
|
135 |
+
</p>
|
136 |
+
<br>
|
137 |
+
<a class="button button-primary button-large" href="http://inboundsite.wpengine.com/upgrade/" target="_blank">' . __('Upgrade', INBOUNDNOW_TEXT_DOMAIN) . '</a>
|
138 |
+
<a class="button button-default button-large inbound_dismiss" href="#" id="'.$message_id.'" data-notification-id="'.$message_id.'" >' . __('Dismiss this message', INBOUNDNOW_TEXT_DOMAIN) . '</a>
|
139 |
+
<br>
|
140 |
+
<br>
|
141 |
+
</div>';
|
142 |
+
|
143 |
+
/* echo javascript used to listen for notice closing */
|
144 |
+
self::javascript_dismiss_notice();
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
+
/**
|
149 |
+
* check if user has viewed and dismissed cta
|
150 |
+
* @param $notificaiton_id
|
151 |
+
*/
|
152 |
+
public static function check_if_viewed( $notificaiton_id ) {
|
153 |
+
global $current_user;
|
154 |
+
|
155 |
+
$user_id = $current_user->ID;
|
156 |
+
|
157 |
+
return get_user_meta($user_id, 'inbound_notification_' . $notificaiton_id ) ;
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
+
public static function javascript_dismiss_notice() {
|
162 |
+
global $current_user;
|
163 |
+
|
164 |
+
$user_id = $current_user->ID;
|
165 |
+
?>
|
166 |
+
<script type="text/javascript">
|
167 |
+
jQuery( document ).ready(function() {
|
168 |
+
|
169 |
+
jQuery('body').on('click' , '.inbound_dismiss' , function() {
|
170 |
+
|
171 |
+
var notification_id = jQuery( this ).data('notification-id');
|
172 |
+
|
173 |
+
jQuery('#inbound_notice_' + notification_id).hide();
|
174 |
+
|
175 |
+
jQuery.ajax({
|
176 |
+
type: 'POST',
|
177 |
+
url: ajaxurl,
|
178 |
+
context: this,
|
179 |
+
data: {
|
180 |
+
action: 'inbound_dismiss_ajax',
|
181 |
+
notification_id: notification_id,
|
182 |
+
user_id: '<?php echo $user_id; ?>'
|
183 |
+
},
|
184 |
+
|
185 |
+
success: function (data) {
|
186 |
+
},
|
187 |
+
|
188 |
+
error: function (MLHttpRequest, textStatus, errorThrown) {
|
189 |
+
alert("Ajax not enabled");
|
190 |
+
}
|
191 |
+
});
|
192 |
+
})
|
193 |
+
|
194 |
+
});
|
195 |
+
</script>
|
196 |
+
<?php
|
197 |
+
}
|
198 |
+
|
199 |
+
public static function dismiss_notice() {
|
200 |
+
update_user_meta($_REQUEST['user_id'], 'inbound_notification_' . $_REQUEST['notification_id'] ) ;
|
201 |
+
exit;
|
202 |
+
}
|
203 |
+
|
204 |
+
}
|
205 |
+
|
206 |
+
new Inbound_Promote;
|
shared/docs/analytics.events.md
CHANGED
@@ -1,352 +1,352 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
<!-- Start shared\assets\js\frontend\analytics-src\analytics.events.js -->
|
4 |
-
|
5 |
-
# Analytics Events
|
6 |
-
|
7 |
-
Events are triggered throughout the visitors journey through the site. See more on [Inbound Now][in]
|
8 |
-
|
9 |
-
Author: David Wells <david@inboundnow.com>
|
10 |
-
|
11 |
-
Version: 0.0.1
|
12 |
-
[in]: http://www.inboundnow.com/
|
13 |
-
|
14 |
-
# Event Usage
|
15 |
-
|
16 |
-
Events are triggered throughout the visitors path through the site.
|
17 |
-
You can hook into these custom actions and filters much like WordPress Core
|
18 |
-
|
19 |
-
See below for examples
|
20 |
-
|
21 |
-
Adding Custom Actions
|
22 |
-
------------------
|
23 |
-
You can hook into custom events throughout analytics. See the full list of available [events below](#all-events)
|
24 |
-
|
25 |
-
`
|
26 |
-
_inbound.add_action( 'action_name', callback, priority );
|
27 |
-
`
|
28 |
-
|
29 |
-
```js
|
30 |
-
// example:
|
31 |
-
|
32 |
-
// Add custom function to `page_visit` event
|
33 |
-
_inbound.add_action( 'page_visit', callback, 10 );
|
34 |
-
|
35 |
-
// add custom callback to trigger when `page_visit` fires
|
36 |
-
function callback(pageData){
|
37 |
-
var pageData = pageData || {};
|
38 |
-
// run callback on 'page_visit' trigger
|
39 |
-
alert(pageData.title);
|
40 |
-
}
|
41 |
-
```
|
42 |
-
|
43 |
-
### Params:
|
44 |
-
|
45 |
-
* **string** *action_name* Name of the event trigger
|
46 |
-
* **function** *callback* function to trigger when event happens
|
47 |
-
* **int** *priority* Order to trigger the event in
|
48 |
-
|
49 |
-
Removing Custom Actions
|
50 |
-
------------------
|
51 |
-
You can hook into custom events throughout analytics. See the full list of available [events below](#all-events)
|
52 |
-
|
53 |
-
`
|
54 |
-
_inbound.remove_action( 'action_name');
|
55 |
-
`
|
56 |
-
|
57 |
-
```js
|
58 |
-
// example:
|
59 |
-
|
60 |
-
_inbound.remove_action( 'page_visit');
|
61 |
-
// all 'page_visit' actions have been deregistered
|
62 |
-
```
|
63 |
-
|
64 |
-
### Params:
|
65 |
-
|
66 |
-
* **string** *action_name* Name of the event trigger
|
67 |
-
|
68 |
-
# Event List
|
69 |
-
|
70 |
-
Events are triggered throughout the visitors journey through the site
|
71 |
-
|
72 |
-
## analytics_ready()
|
73 |
-
|
74 |
-
Triggers when analyics has finished loading
|
75 |
-
|
76 |
-
## url_parameters()
|
77 |
-
|
78 |
-
Triggers when the browser url params are parsed. You can perform custom actions
|
79 |
-
if specific url params exist.
|
80 |
-
|
81 |
-
```js
|
82 |
-
// Usage:
|
83 |
-
|
84 |
-
// Add function to 'url_parameters' event
|
85 |
-
_inbound.add_action( 'url_parameters', url_parameters_func_example, 10);
|
86 |
-
|
87 |
-
function url_parameters_func_example(urlParams) {
|
88 |
-
var urlParams = urlParams || {};
|
89 |
-
for( var param in urlParams ) {
|
90 |
-
var key = param;
|
91 |
-
var value = urlParams[param];
|
92 |
-
}
|
93 |
-
// All URL Params
|
94 |
-
alert(JSON.stringify(urlParams));
|
95 |
-
|
96 |
-
// Check if URL parameter `utm_source` exists and matches value
|
97 |
-
if(urlParams.utm_source === "twitter") {
|
98 |
-
alert('This person is from twitter!');
|
99 |
-
}
|
100 |
-
}
|
101 |
-
```
|
102 |
-
|
103 |
-
## session_start()
|
104 |
-
|
105 |
-
Triggers when session starts
|
106 |
-
|
107 |
-
```js
|
108 |
-
// Usage:
|
109 |
-
|
110 |
-
// Add function to 'session_start' event
|
111 |
-
_inbound.add_action( 'session_start', session_start_func_example, 10);
|
112 |
-
|
113 |
-
function session_start_func_example(data) {
|
114 |
-
var data = data || {};
|
115 |
-
// session start. Do something for new visitor
|
116 |
-
}
|
117 |
-
```
|
118 |
-
|
119 |
-
## session_end()
|
120 |
-
|
121 |
-
Triggers when visitor session goes idle for more than 30 minutes.
|
122 |
-
|
123 |
-
```js
|
124 |
-
// Usage:
|
125 |
-
|
126 |
-
// Add function to 'session_end' event
|
127 |
-
_inbound.add_action( 'session_end', session_end_func_example, 10);
|
128 |
-
|
129 |
-
function session_end_func_example(data) {
|
130 |
-
var data = data || {};
|
131 |
-
// Do something when session ends
|
132 |
-
alert("Hey! It's been 30 minutes... where did you go?");
|
133 |
-
}
|
134 |
-
```
|
135 |
-
|
136 |
-
## session_active()
|
137 |
-
|
138 |
-
Triggers if active session is detected
|
139 |
-
|
140 |
-
```js
|
141 |
-
// Usage:
|
142 |
-
|
143 |
-
// Add function to 'session_active' event
|
144 |
-
_inbound.add_action( 'session_active', session_active_func_example, 10);
|
145 |
-
|
146 |
-
function session_active_func_example(data) {
|
147 |
-
var data = data || {};
|
148 |
-
// session active
|
149 |
-
}
|
150 |
-
```
|
151 |
-
|
152 |
-
## session_idle()
|
153 |
-
|
154 |
-
Triggers when visitor session goes idle. Idling occurs after 60 seconds of
|
155 |
-
inactivity or when the visitor switches browser tabs
|
156 |
-
|
157 |
-
```js
|
158 |
-
// Usage:
|
159 |
-
|
160 |
-
// Add function to 'session_idle' event
|
161 |
-
_inbound.add_action( 'session_idle', session_idle_func_example, 10);
|
162 |
-
|
163 |
-
function session_idle_func_example(data) {
|
164 |
-
var data = data || {};
|
165 |
-
// Do something when session idles
|
166 |
-
alert('Here is a special offer for you!');
|
167 |
-
}
|
168 |
-
```
|
169 |
-
|
170 |
-
## session_resume()
|
171 |
-
|
172 |
-
Triggers when session is already active and gets resumed
|
173 |
-
|
174 |
-
```js
|
175 |
-
// Usage:
|
176 |
-
|
177 |
-
// Add function to 'session_resume' event
|
178 |
-
_inbound.add_action( 'session_resume', session_resume_func_example, 10);
|
179 |
-
|
180 |
-
function session_resume_func_example(data) {
|
181 |
-
var data = data || {};
|
182 |
-
// Session exists and is being resumed
|
183 |
-
}
|
184 |
-
```
|
185 |
-
|
186 |
-
## session_heartbeat()
|
187 |
-
|
188 |
-
Session emitter. Runs every 10 seconds. This is a useful function for
|
189 |
-
pinging third party services
|
190 |
-
|
191 |
-
```js
|
192 |
-
// Usage:
|
193 |
-
|
194 |
-
// Add session_heartbeat_func_example function to 'session_heartbeat' event
|
195 |
-
_inbound.add_action( 'session_heartbeat', session_heartbeat_func_example, 10);
|
196 |
-
|
197 |
-
function session_heartbeat_func_example(data) {
|
198 |
-
var data = data || {};
|
199 |
-
// Do something with every 10 seconds
|
200 |
-
}
|
201 |
-
```
|
202 |
-
|
203 |
-
## page_visit()
|
204 |
-
|
205 |
-
Triggers Every Page View
|
206 |
-
|
207 |
-
```js
|
208 |
-
// Usage:
|
209 |
-
|
210 |
-
// Add function to 'page_visit' event
|
211 |
-
_inbound.add_action( 'page_visit', page_visit_func_example, 10);
|
212 |
-
|
213 |
-
function session_idle_func_example(pageData) {
|
214 |
-
var pageData = pageData || {};
|
215 |
-
if( pageData.view_count > 8 ){
|
216 |
-
alert('Wow you have been to this page more than 8 times.');
|
217 |
-
}
|
218 |
-
}
|
219 |
-
```
|
220 |
-
|
221 |
-
## page_first_visit()
|
222 |
-
|
223 |
-
Triggers If the visitor has never seen the page before
|
224 |
-
|
225 |
-
```js
|
226 |
-
// Usage:
|
227 |
-
|
228 |
-
// Add function to 'page_first_visit' event
|
229 |
-
_inbound.add_action( 'page_first_visit', page_first_visit_func_example, 10);
|
230 |
-
|
231 |
-
function page_first_visit_func_example(pageData) {
|
232 |
-
var pageData = pageData || {};
|
233 |
-
alert('Welcome to this page! Its the first time you have seen it')
|
234 |
-
}
|
235 |
-
```
|
236 |
-
|
237 |
-
## page_revisit()
|
238 |
-
|
239 |
-
Triggers If the visitor has seen the page before
|
240 |
-
|
241 |
-
```js
|
242 |
-
// Usage:
|
243 |
-
|
244 |
-
// Add function to 'page_revisit' event
|
245 |
-
_inbound.add_action( 'page_revisit', page_revisit_func_example, 10);
|
246 |
-
|
247 |
-
function page_revisit_func_example(pageData) {
|
248 |
-
var pageData = pageData || {};
|
249 |
-
alert('Welcome back to this page!');
|
250 |
-
// Show visitor special content/offer
|
251 |
-
}
|
252 |
-
```
|
253 |
-
|
254 |
-
## tab_hidden()
|
255 |
-
|
256 |
-
`tab_hidden` is triggered when the visitor switches browser tabs
|
257 |
-
|
258 |
-
```js
|
259 |
-
// Usage:
|
260 |
-
|
261 |
-
// Adding the callback
|
262 |
-
function tab_hidden_function( data ) {
|
263 |
-
alert('The Tab is Hidden');
|
264 |
-
};
|
265 |
-
|
266 |
-
// Hook the function up the the `tab_hidden` event
|
267 |
-
_inbound.add_action( 'tab_hidden', tab_hidden_function, 10 );
|
268 |
-
```
|
269 |
-
|
270 |
-
## tab_visible()
|
271 |
-
|
272 |
-
`tab_visible` is triggered when the visitor switches back to the sites tab
|
273 |
-
|
274 |
-
```js
|
275 |
-
// Usage:
|
276 |
-
|
277 |
-
// Adding the callback
|
278 |
-
function tab_visible_function( data ) {
|
279 |
-
alert('Welcome back to this tab!');
|
280 |
-
// trigger popup or offer special discount etc.
|
281 |
-
};
|
282 |
-
|
283 |
-
// Hook the function up the the `tab_visible` event
|
284 |
-
_inbound.add_action( 'tab_visible', tab_visible_function, 10 );
|
285 |
-
```
|
286 |
-
|
287 |
-
## tab_mouseout()
|
288 |
-
|
289 |
-
`tab_mouseout` is triggered when the visitor mouses out of the browser window.
|
290 |
-
This is especially useful for exit popups
|
291 |
-
|
292 |
-
```js
|
293 |
-
// Usage:
|
294 |
-
|
295 |
-
// Adding the callback
|
296 |
-
function tab_mouseout_function( data ) {
|
297 |
-
alert("Wait don't Go");
|
298 |
-
// trigger popup or offer special discount etc.
|
299 |
-
};
|
300 |
-
|
301 |
-
// Hook the function up the the `tab_mouseout` event
|
302 |
-
_inbound.add_action( 'tab_mouseout', tab_mouseout_function, 10 );
|
303 |
-
```
|
304 |
-
|
305 |
-
## form_input_change()
|
306 |
-
|
307 |
-
`form_input_change` is triggered when tracked form inputs change
|
308 |
-
You can use this to add additional validation or set conditional triggers
|
309 |
-
|
310 |
-
```js
|
311 |
-
// Usage:
|
312 |
-
|
313 |
-
```
|
314 |
-
|
315 |
-
## form_before_submission()
|
316 |
-
|
317 |
-
`form_before_submission` is triggered before the form is submitted to the server.
|
318 |
-
You can filter the data here or send it to third party services
|
319 |
-
|
320 |
-
```js
|
321 |
-
// Usage:
|
322 |
-
|
323 |
-
// Adding the callback
|
324 |
-
function form_before_submission_function( data ) {
|
325 |
-
var data = data || {};
|
326 |
-
// filter form data
|
327 |
-
};
|
328 |
-
|
329 |
-
// Hook the function up the the `form_before_submission` event
|
330 |
-
_inbound.add_action( 'form_before_submission', form_before_submission_function, 10 );
|
331 |
-
```
|
332 |
-
|
333 |
-
## form_after_submission()
|
334 |
-
|
335 |
-
`form_after_submission` is triggered after the form is submitted to the server.
|
336 |
-
You can filter the data here or send it to third party services
|
337 |
-
|
338 |
-
```js
|
339 |
-
// Usage:
|
340 |
-
|
341 |
-
// Adding the callback
|
342 |
-
function form_after_submission_function( data ) {
|
343 |
-
var data = data || {};
|
344 |
-
// filter form data
|
345 |
-
};
|
346 |
-
|
347 |
-
// Hook the function up the the `form_after_submission` event
|
348 |
-
_inbound.add_action( 'form_after_submission', form_after_submission_function, 10 );
|
349 |
-
```
|
350 |
-
|
351 |
-
<!-- End shared\assets\js\frontend\analytics-src\analytics.events.js -->
|
352 |
-
|
1 |
+
|
2 |
+
|
3 |
+
<!-- Start shared\assets\js\frontend\analytics-src\analytics.events.js -->
|
4 |
+
|
5 |
+
# Analytics Events
|
6 |
+
|
7 |
+
Events are triggered throughout the visitors journey through the site. See more on [Inbound Now][in]
|
8 |
+
|
9 |
+
Author: David Wells <david@inboundnow.com>
|
10 |
+
|
11 |
+
Version: 0.0.1
|
12 |
+
[in]: http://www.inboundnow.com/
|
13 |
+
|
14 |
+
# Event Usage
|
15 |
+
|
16 |
+
Events are triggered throughout the visitors path through the site.
|
17 |
+
You can hook into these custom actions and filters much like WordPress Core
|
18 |
+
|
19 |
+
See below for examples
|
20 |
+
|
21 |
+
Adding Custom Actions
|
22 |
+
------------------
|
23 |
+
You can hook into custom events throughout analytics. See the full list of available [events below](#all-events)
|
24 |
+
|
25 |
+
`
|
26 |
+
_inbound.add_action( 'action_name', callback, priority );
|
27 |
+
`
|
28 |
+
|
29 |
+
```js
|
30 |
+
// example:
|
31 |
+
|
32 |
+
// Add custom function to `page_visit` event
|
33 |
+
_inbound.add_action( 'page_visit', callback, 10 );
|
34 |
+
|
35 |
+
// add custom callback to trigger when `page_visit` fires
|
36 |
+
function callback(pageData){
|
37 |
+
var pageData = pageData || {};
|
38 |
+
// run callback on 'page_visit' trigger
|
39 |
+
alert(pageData.title);
|
40 |
+
}
|
41 |
+
```
|
42 |
+
|
43 |
+
### Params:
|
44 |
+
|
45 |
+
* **string** *action_name* Name of the event trigger
|
46 |
+
* **function** *callback* function to trigger when event happens
|
47 |
+
* **int** *priority* Order to trigger the event in
|
48 |
+
|
49 |
+
Removing Custom Actions
|
50 |
+
------------------
|
51 |
+
You can hook into custom events throughout analytics. See the full list of available [events below](#all-events)
|
52 |
+
|
53 |
+
`
|
54 |
+
_inbound.remove_action( 'action_name');
|
55 |
+
`
|
56 |
+
|
57 |
+
```js
|
58 |
+
// example:
|
59 |
+
|
60 |
+
_inbound.remove_action( 'page_visit');
|
61 |
+
// all 'page_visit' actions have been deregistered
|
62 |
+
```
|
63 |
+
|
64 |
+
### Params:
|
65 |
+
|
66 |
+
* **string** *action_name* Name of the event trigger
|
67 |
+
|
68 |
+
# Event List
|
69 |
+
|
70 |
+
Events are triggered throughout the visitors journey through the site
|
71 |
+
|
72 |
+
## analytics_ready()
|
73 |
+
|
74 |
+
Triggers when analyics has finished loading
|
75 |
+
|
76 |
+
## url_parameters()
|
77 |
+
|
78 |
+
Triggers when the browser url params are parsed. You can perform custom actions
|
79 |
+
if specific url params exist.
|
80 |
+
|
81 |
+
```js
|
82 |
+
// Usage:
|
83 |
+
|
84 |
+
// Add function to 'url_parameters' event
|
85 |
+
_inbound.add_action( 'url_parameters', url_parameters_func_example, 10);
|
86 |
+
|
87 |
+
function url_parameters_func_example(urlParams) {
|
88 |
+
var urlParams = urlParams || {};
|
89 |
+
for( var param in urlParams ) {
|
90 |
+
var key = param;
|
91 |
+
var value = urlParams[param];
|
92 |
+
}
|
93 |
+
// All URL Params
|
94 |
+
alert(JSON.stringify(urlParams));
|
95 |
+
|
96 |
+
// Check if URL parameter `utm_source` exists and matches value
|
97 |
+
if(urlParams.utm_source === "twitter") {
|
98 |
+
alert('This person is from twitter!');
|
99 |
+
}
|
100 |
+
}
|
101 |
+
```
|
102 |
+
|
103 |
+
## session_start()
|
104 |
+
|
105 |
+
Triggers when session starts
|
106 |
+
|
107 |
+
```js
|
108 |
+
// Usage:
|
109 |
+
|
110 |
+
// Add function to 'session_start' event
|
111 |
+
_inbound.add_action( 'session_start', session_start_func_example, 10);
|
112 |
+
|
113 |
+
function session_start_func_example(data) {
|
114 |
+
var data = data || {};
|
115 |
+
// session start. Do something for new visitor
|
116 |
+
}
|
117 |
+
```
|
118 |
+
|
119 |
+
## session_end()
|
120 |
+
|
121 |
+
Triggers when visitor session goes idle for more than 30 minutes.
|
122 |
+
|
123 |
+
```js
|
124 |
+
// Usage:
|
125 |
+
|
126 |
+
// Add function to 'session_end' event
|
127 |
+
_inbound.add_action( 'session_end', session_end_func_example, 10);
|
128 |
+
|
129 |
+
function session_end_func_example(data) {
|
130 |
+
var data = data || {};
|
131 |
+
// Do something when session ends
|
132 |
+
alert("Hey! It's been 30 minutes... where did you go?");
|
133 |
+
}
|
134 |
+
```
|
135 |
+
|
136 |
+
## session_active()
|
137 |
+
|
138 |
+
Triggers if active session is detected
|
139 |
+
|
140 |
+
```js
|
141 |
+
// Usage:
|
142 |
+
|
143 |
+
// Add function to 'session_active' event
|
144 |
+
_inbound.add_action( 'session_active', session_active_func_example, 10);
|
145 |
+
|
146 |
+
function session_active_func_example(data) {
|
147 |
+
var data = data || {};
|
148 |
+
// session active
|
149 |
+
}
|
150 |
+
```
|
151 |
+
|
152 |
+
## session_idle()
|
153 |
+
|
154 |
+
Triggers when visitor session goes idle. Idling occurs after 60 seconds of
|
155 |
+
inactivity or when the visitor switches browser tabs
|
156 |
+
|
157 |
+
```js
|
158 |
+
// Usage:
|
159 |
+
|
160 |
+
// Add function to 'session_idle' event
|
161 |
+
_inbound.add_action( 'session_idle', session_idle_func_example, 10);
|
162 |
+
|
163 |
+
function session_idle_func_example(data) {
|
164 |
+
var data = data || {};
|
165 |
+
// Do something when session idles
|
166 |
+
alert('Here is a special offer for you!');
|
167 |
+
}
|
168 |
+
```
|
169 |
+
|
170 |
+
## session_resume()
|
171 |
+
|
172 |
+
Triggers when session is already active and gets resumed
|
173 |
+
|
174 |
+
```js
|
175 |
+
// Usage:
|
176 |
+
|
177 |
+
// Add function to 'session_resume' event
|
178 |
+
_inbound.add_action( 'session_resume', session_resume_func_example, 10);
|
179 |
+
|
180 |
+
function session_resume_func_example(data) {
|
181 |
+
var data = data || {};
|
182 |
+
// Session exists and is being resumed
|
183 |
+
}
|
184 |
+
```
|
185 |
+
|
186 |
+
## session_heartbeat()
|
187 |
+
|
188 |
+
Session emitter. Runs every 10 seconds. This is a useful function for
|
189 |
+
pinging third party services
|
190 |
+
|
191 |
+
```js
|
192 |
+
// Usage:
|
193 |
+
|
194 |
+
// Add session_heartbeat_func_example function to 'session_heartbeat' event
|
195 |
+
_inbound.add_action( 'session_heartbeat', session_heartbeat_func_example, 10);
|
196 |
+
|
197 |
+
function session_heartbeat_func_example(data) {
|
198 |
+
var data = data || {};
|
199 |
+
// Do something with every 10 seconds
|
200 |
+
}
|
201 |
+
```
|
202 |
+
|
203 |
+
## page_visit()
|
204 |
+
|
205 |
+
Triggers Every Page View
|
206 |
+
|
207 |
+
```js
|
208 |
+
// Usage:
|
209 |
+
|
210 |
+
// Add function to 'page_visit' event
|
211 |
+
_inbound.add_action( 'page_visit', page_visit_func_example, 10);
|
212 |
+
|
213 |
+
function session_idle_func_example(pageData) {
|
214 |
+
var pageData = pageData || {};
|
215 |
+
if( pageData.view_count > 8 ){
|
216 |
+
alert('Wow you have been to this page more than 8 times.');
|
217 |
+
}
|
218 |
+
}
|
219 |
+
```
|
220 |
+
|
221 |
+
## page_first_visit()
|
222 |
+
|
223 |
+
Triggers If the visitor has never seen the page before
|
224 |
+
|
225 |
+
```js
|
226 |
+
// Usage:
|
227 |
+
|
228 |
+
// Add function to 'page_first_visit' event
|
229 |
+
_inbound.add_action( 'page_first_visit', page_first_visit_func_example, 10);
|
230 |
+
|
231 |
+
function page_first_visit_func_example(pageData) {
|
232 |
+
var pageData = pageData || {};
|
233 |
+
alert('Welcome to this page! Its the first time you have seen it')
|
234 |
+
}
|
235 |
+
```
|
236 |
+
|
237 |
+
## page_revisit()
|
238 |
+
|
239 |
+
Triggers If the visitor has seen the page before
|
240 |
+
|
241 |
+
```js
|
242 |
+
// Usage:
|
243 |
+
|
244 |
+
// Add function to 'page_revisit' event
|
245 |
+
_inbound.add_action( 'page_revisit', page_revisit_func_example, 10);
|
246 |
+
|
247 |
+
function page_revisit_func_example(pageData) {
|
248 |
+
var pageData = pageData || {};
|
249 |
+
alert('Welcome back to this page!');
|
250 |
+
// Show visitor special content/offer
|
251 |
+
}
|
252 |
+
```
|
253 |
+
|
254 |
+
## tab_hidden()
|
255 |
+
|
256 |
+
`tab_hidden` is triggered when the visitor switches browser tabs
|
257 |
+
|
258 |
+
```js
|
259 |
+
// Usage:
|
260 |
+
|
261 |
+
// Adding the callback
|
262 |
+
function tab_hidden_function( data ) {
|
263 |
+
alert('The Tab is Hidden');
|
264 |
+
};
|
265 |
+
|
266 |
+
// Hook the function up the the `tab_hidden` event
|
267 |
+
_inbound.add_action( 'tab_hidden', tab_hidden_function, 10 );
|
268 |
+
```
|
269 |
+
|
270 |
+
## tab_visible()
|
271 |
+
|
272 |
+
`tab_visible` is triggered when the visitor switches back to the sites tab
|
273 |
+
|
274 |
+
```js
|
275 |
+
// Usage:
|
276 |
+
|
277 |
+
// Adding the callback
|
278 |
+
function tab_visible_function( data ) {
|
279 |
+
alert('Welcome back to this tab!');
|
280 |
+
// trigger popup or offer special discount etc.
|
281 |
+
};
|
282 |
+
|
283 |
+
// Hook the function up the the `tab_visible` event
|
284 |
+
_inbound.add_action( 'tab_visible', tab_visible_function, 10 );
|
285 |
+
```
|
286 |
+
|
287 |
+
## tab_mouseout()
|
288 |
+
|
289 |
+
`tab_mouseout` is triggered when the visitor mouses out of the browser window.
|
290 |
+
This is especially useful for exit popups
|
291 |
+
|
292 |
+
```js
|
293 |
+
// Usage:
|
294 |
+
|
295 |
+
// Adding the callback
|
296 |
+
function tab_mouseout_function( data ) {
|
297 |
+
alert("Wait don't Go");
|
298 |
+
// trigger popup or offer special discount etc.
|
299 |
+
};
|
300 |
+
|
301 |
+
// Hook the function up the the `tab_mouseout` event
|
302 |
+
_inbound.add_action( 'tab_mouseout', tab_mouseout_function, 10 );
|
303 |
+
```
|
304 |
+
|
305 |
+
## form_input_change()
|
306 |
+
|
307 |
+
`form_input_change` is triggered when tracked form inputs change
|
308 |
+
You can use this to add additional validation or set conditional triggers
|
309 |
+
|
310 |
+
```js
|
311 |
+
// Usage:
|
312 |
+
|
313 |
+
```
|
314 |
+
|
315 |
+
## form_before_submission()
|
316 |
+
|
317 |
+
`form_before_submission` is triggered before the form is submitted to the server.
|
318 |
+
You can filter the data here or send it to third party services
|
319 |
+
|
320 |
+
```js
|
321 |
+
// Usage:
|
322 |
+
|
323 |
+
// Adding the callback
|
324 |
+
function form_before_submission_function( data ) {
|
325 |
+
var data = data || {};
|
326 |
+
// filter form data
|
327 |
+
};
|
328 |
+
|
329 |
+
// Hook the function up the the `form_before_submission` event
|
330 |
+
_inbound.add_action( 'form_before_submission', form_before_submission_function, 10 );
|
331 |
+
```
|
332 |
+
|
333 |
+
## form_after_submission()
|
334 |
+
|
335 |
+
`form_after_submission` is triggered after the form is submitted to the server.
|
336 |
+
You can filter the data here or send it to third party services
|
337 |
+
|
338 |
+
```js
|
339 |
+
// Usage:
|
340 |
+
|
341 |
+
// Adding the callback
|
342 |
+
function form_after_submission_function( data ) {
|
343 |
+
var data = data || {};
|
344 |
+
// filter form data
|
345 |
+
};
|
346 |
+
|
347 |
+
// Hook the function up the the `form_after_submission` event
|
348 |
+
_inbound.add_action( 'form_after_submission', form_after_submission_function, 10 );
|
349 |
+
```
|
350 |
+
|
351 |
+
<!-- End shared\assets\js\frontend\analytics-src\analytics.events.js -->
|
352 |
+
|
shared/docs/css/blur.jpg
CHANGED
File without changes
|
shared/docs/css/style.css
CHANGED
File without changes
|
shared/docs/css/theme.css
CHANGED
File without changes
|
shared/docs/index.html
CHANGED
File without changes
|
shared/docs/js/flatdoc.js
CHANGED
File without changes
|
shared/docs/js/jquery.js
CHANGED
File without changes
|
shared/docs/js/legacy.js
CHANGED
File without changes
|
shared/docs/js/script.js
CHANGED
File without changes
|
shared/docs/js/theme.js
CHANGED
File without changes
|
shared/docs/main.md
CHANGED
File without changes
|
shared/docs/shortcodes.md
CHANGED
File without changes
|
templates/countdown-lander/config.php
CHANGED
@@ -104,7 +104,7 @@ if( function_exists('register_field_group') ):
|
|
104 |
'key' => 'field_55d38c97835ae',
|
105 |
'label' => __( 'Countdown Date','landing-pages' ),
|
106 |
'name' => 'countdown-lander-date-picker',
|
107 |
-
'type' => '
|
108 |
'instructions' => __( 'What date are we counting down to?','landing-pages' ),
|
109 |
'required' => 1,
|
110 |
'conditional_logic' => 0,
|
104 |
'key' => 'field_55d38c97835ae',
|
105 |
'label' => __( 'Countdown Date','landing-pages' ),
|
106 |
'name' => 'countdown-lander-date-picker',
|
107 |
+
'type' => 'date_time_picker',
|
108 |
'instructions' => __( 'What date are we counting down to?','landing-pages' ),
|
109 |
'required' => 1,
|
110 |
'conditional_logic' => 0,
|
templates/do-NOT-install-templates-here.txt
CHANGED
File without changes
|
templates/dropcap/assets/css/style.css
CHANGED
@@ -1,138 +1,193 @@
|
|
1 |
|
2 |
body, div, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, img, form, fieldset, input, textarea, blockquote {
|
3 |
-
|
|
|
|
|
4 |
}
|
|
|
5 |
h1, h2, h3, h4, h5, h6, p {
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
}
|
8 |
-
|
9 |
body {
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
14 |
}
|
|
|
15 |
#wrapper {
|
16 |
-
|
17 |
}
|
18 |
|
19 |
#textspot {
|
20 |
-
|
|
|
21 |
}
|
22 |
|
23 |
#textspot p {
|
24 |
-
|
|
|
25 |
|
26 |
-
|
27 |
}
|
|
|
28 |
#textspot p:first-child:first-letter {
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
#content {margin: auto; width:800px; padding:20px;}
|
34 |
-
#main-content-area {padding-left: 0px;}
|
35 |
-
form {font-family: Sans-Serif;}
|
36 |
.btn.large {
|
37 |
-
font-size: 16px;
|
38 |
-
line-height: normal;
|
39 |
-
padding: 9px 14px 9px;
|
40 |
-
-webkit-border-radius: 6px;
|
41 |
-
-moz-border-radius: 6px;
|
42 |
-
border-radius: 6px;
|
43 |
}
|
|
|
44 |
.lp-form {
|
45 |
-
width: 485px;
|
46 |
-
margin: auto;
|
47 |
-
text-align: center;
|
48 |
}
|
49 |
|
50 |
.lp-form-submit {
|
51 |
-
cursor: pointer;
|
52 |
-
display: inline-block;
|
53 |
-
background-color: #E6E6E6;
|
54 |
-
background-repeat: no-repeat;
|
55 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), color-stop(0.25, white), to(#E6E6E6));
|
56 |
-
background-image: -webkit-linear-gradient(white, white 0.25, #E6E6E6);
|
57 |
-
background-image: -moz-linear-gradient(white, white 0.25, #E6E6E6);
|
58 |
-
background-image: -ms-linear-gradient(white, white 0.25, #E6E6E6);
|
59 |
-
background-image: -o-linear-gradient(white, white 0.25, #E6E6E6);
|
60 |
-
background-image: linear-gradient(white, white 0.25, #E6E6E6);
|
61 |
-
padding: 5px 14px 6px;
|
62 |
-
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
63 |
-
color: #333;
|
64 |
-
font-size: 13px;
|
65 |
-
line-height: normal;
|
66 |
-
border: 1px solid #CCC;
|
67 |
-
border-bottom-color: #BBB;
|
68 |
-
-webkit-border-radius: 4px;
|
69 |
-
-moz-border-radius: 4px;
|
70 |
-
border-radius: 4px;
|
71 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
72 |
-
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
73 |
-
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
74 |
-
-webkit-transition: 0.1s linear all;
|
75 |
-
-moz-transition: 0.1s linear all;
|
76 |
-
transition: 0.1s linear all;
|
77 |
}
|
|
|
78 |
button {
|
79 |
-
clear: left;
|
80 |
-
display: block;
|
81 |
-
float: left;
|
82 |
-
margin: 15px auto 22px;
|
83 |
-
width: 100%;
|
84 |
}
|
|
|
85 |
/* Form Styles */
|
86 |
-
.lp_form_field {
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
input[type="text"], input[type="email"], textarea, #inbound-form-wrapper input[type=text], #inbound-form-wrapper input[type=url], #inbound-form-wrapper input[type=email], #inbound-form-wrapper input[type=tel], #inbound-form-wrapper input[type=number], #inbound-form-wrapper input[type=password] {
|
95 |
-
font-family: 'Lato', Calibri, Arial, sans-serif;
|
96 |
-
font-size: 13px;
|
97 |
-
font-weight: 400;
|
98 |
-
display: block;
|
99 |
-
width: 100%;
|
100 |
-
padding: 5px;
|
101 |
-
margin-bottom: 8px;
|
102 |
-
border: 3px solid #EBE6E2;
|
103 |
-
border-radius: 5px;
|
104 |
-
-webkit-transition: all 0.3s ease-out;
|
105 |
-
-moz-transition: all 0.3s ease-out;
|
106 |
-
-ms-transition: all 0.3s ease-out;
|
107 |
-
-o-transition: all 0.3s ease-out;
|
108 |
-
transition: all 0.3s ease-out;
|
109 |
}
|
|
|
110 |
.lp-input-submit, input[type="submit"], button[type="submit"] {
|
111 |
-
|
112 |
-
border: 1px solid #202020;
|
113 |
-
font-family: Arial, Helvetica, sans-serif;
|
114 |
-
cursor: pointer;
|
115 |
-
margin: auto;
|
116 |
-
|
117 |
-
outline: medium none;
|
118 |
-
padding: 6px;
|
119 |
-
width: 60%;
|
120 |
-
letter-spacing: -1px;
|
121 |
-
text-align: center;
|
122 |
-
text-decoration: none;
|
123 |
-
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
124 |
-
color: white;
|
125 |
-
font-size: 19px;
|
126 |
}
|
|
|
127 |
.lp-input-label {
|
128 |
-
text-align: left;
|
129 |
-
margin-bottom: 5px;
|
130 |
-
display: block;
|
131 |
-
font-size: 18px;
|
132 |
}
|
|
|
133 |
#content {
|
134 |
-
|
135 |
-
|
136 |
}
|
137 |
-
|
138 |
-
|
|
|
|
1 |
|
2 |
body, div, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, img, form, fieldset, input, textarea, blockquote {
|
3 |
+
margin: 0;
|
4 |
+
padding: 0;
|
5 |
+
border: 0;
|
6 |
}
|
7 |
+
|
8 |
h1, h2, h3, h4, h5, h6, p {
|
9 |
+
display: block;
|
10 |
+
}
|
11 |
+
|
12 |
+
h3 {
|
13 |
+
font-size: 2em;
|
14 |
}
|
15 |
+
|
16 |
body {
|
17 |
|
18 |
+
font-family: "Chunk", Sans-Serif;
|
19 |
+
color: #fff;
|
20 |
+
font-family: 'Open Sans', sans-serif;
|
21 |
+
/*background: #566074 url(bg1.png); */
|
22 |
}
|
23 |
+
|
24 |
#wrapper {
|
25 |
+
padding-top: 150px;
|
26 |
}
|
27 |
|
28 |
#textspot {
|
29 |
+
width: 95%;
|
30 |
+
margin: 0px auto 0px;
|
31 |
}
|
32 |
|
33 |
#textspot p {
|
34 |
+
font-size: 50px;
|
35 |
+
line-height: 80px;
|
36 |
|
37 |
+
text-shadow: 10px 10px 0 rgba(255, 255, 255, 0.07);
|
38 |
}
|
39 |
+
|
40 |
#textspot p:first-child:first-letter {
|
41 |
+
font-size: 160px;
|
42 |
+
float: left;
|
43 |
+
margin: 20px 20px 0 0;
|
44 |
+
line-height: 0.8;
|
45 |
+
text-shadow: 4px 4px 0 #566074, 7px 7px 0 #fff;
|
46 |
+
}
|
47 |
+
|
48 |
+
#content {
|
49 |
+
margin: auto;
|
50 |
+
max-width: 800px;
|
51 |
+
padding: 20px;
|
52 |
+
}
|
53 |
+
|
54 |
+
#main-content-area {
|
55 |
+
padding-left: 0px;
|
56 |
+
}
|
57 |
+
|
58 |
+
form {
|
59 |
+
font-family: Sans-Serif;
|
60 |
+
}
|
61 |
|
|
|
|
|
|
|
62 |
.btn.large {
|
63 |
+
font-size: 16px;
|
64 |
+
line-height: normal;
|
65 |
+
padding: 9px 14px 9px;
|
66 |
+
-webkit-border-radius: 6px;
|
67 |
+
-moz-border-radius: 6px;
|
68 |
+
border-radius: 6px;
|
69 |
}
|
70 |
+
|
71 |
.lp-form {
|
72 |
+
width: 485px;
|
73 |
+
margin: auto;
|
74 |
+
text-align: center;
|
75 |
}
|
76 |
|
77 |
.lp-form-submit {
|
78 |
+
cursor: pointer;
|
79 |
+
display: inline-block;
|
80 |
+
background-color: #E6E6E6;
|
81 |
+
background-repeat: no-repeat;
|
82 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), color-stop(0.25, white), to(#E6E6E6));
|
83 |
+
background-image: -webkit-linear-gradient(white, white 0.25, #E6E6E6);
|
84 |
+
background-image: -moz-linear-gradient(white, white 0.25, #E6E6E6);
|
85 |
+
background-image: -ms-linear-gradient(white, white 0.25, #E6E6E6);
|
86 |
+
background-image: -o-linear-gradient(white, white 0.25, #E6E6E6);
|
87 |
+
background-image: linear-gradient(white, white 0.25, #E6E6E6);
|
88 |
+
padding: 5px 14px 6px;
|
89 |
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
90 |
+
color: #333;
|
91 |
+
font-size: 13px;
|
92 |
+
line-height: normal;
|
93 |
+
border: 1px solid #CCC;
|
94 |
+
border-bottom-color: #BBB;
|
95 |
+
-webkit-border-radius: 4px;
|
96 |
+
-moz-border-radius: 4px;
|
97 |
+
border-radius: 4px;
|
98 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
99 |
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
100 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
101 |
+
-webkit-transition: 0.1s linear all;
|
102 |
+
-moz-transition: 0.1s linear all;
|
103 |
+
transition: 0.1s linear all;
|
104 |
}
|
105 |
+
|
106 |
button {
|
107 |
+
clear: left;
|
108 |
+
display: block;
|
109 |
+
float: left;
|
110 |
+
margin: 15px auto 22px;
|
111 |
+
width: 100%;
|
112 |
}
|
113 |
+
|
114 |
/* Form Styles */
|
115 |
+
.lp_form_field {
|
116 |
+
width: 70%;
|
117 |
+
margin: auto;
|
118 |
+
}
|
119 |
+
|
120 |
+
.lp-select-heading {
|
121 |
+
display: block;
|
122 |
+
}
|
123 |
+
|
124 |
+
#lp-input-container {
|
125 |
+
margin-top: 5px;
|
126 |
+
}
|
127 |
+
|
128 |
+
.lp-form-label {
|
129 |
+
margin-bottom: 5px;
|
130 |
+
}
|
131 |
+
|
132 |
+
#lp-field .lp-radio-area {
|
133 |
+
display: inline;
|
134 |
+
}
|
135 |
+
|
136 |
+
#lp-input-container .lp-form-radio input {
|
137 |
+
display: inline;
|
138 |
+
}
|
139 |
+
|
140 |
+
.lp-form-radio {
|
141 |
+
display: inline-block;
|
142 |
+
}
|
143 |
+
|
144 |
input[type="text"], input[type="email"], textarea, #inbound-form-wrapper input[type=text], #inbound-form-wrapper input[type=url], #inbound-form-wrapper input[type=email], #inbound-form-wrapper input[type=tel], #inbound-form-wrapper input[type=number], #inbound-form-wrapper input[type=password] {
|
145 |
+
font-family: 'Lato', Calibri, Arial, sans-serif;
|
146 |
+
font-size: 13px;
|
147 |
+
font-weight: 400;
|
148 |
+
display: block;
|
149 |
+
width: 100%;
|
150 |
+
padding: 5px;
|
151 |
+
margin-bottom: 8px;
|
152 |
+
border: 3px solid #EBE6E2;
|
153 |
+
border-radius: 5px;
|
154 |
+
-webkit-transition: all 0.3s ease-out;
|
155 |
+
-moz-transition: all 0.3s ease-out;
|
156 |
+
-ms-transition: all 0.3s ease-out;
|
157 |
+
-o-transition: all 0.3s ease-out;
|
158 |
+
transition: all 0.3s ease-out;
|
159 |
}
|
160 |
+
|
161 |
.lp-input-submit, input[type="submit"], button[type="submit"] {
|
162 |
+
background: url("../../assets/images/button-green.png") repeat scroll 0 0 #83A736;
|
163 |
+
border: 1px solid #202020;
|
164 |
+
font-family: Arial, Helvetica, sans-serif;
|
165 |
+
cursor: pointer;
|
166 |
+
margin: auto;
|
167 |
+
|
168 |
+
outline: medium none;
|
169 |
+
padding: 6px;
|
170 |
+
width: 60%;
|
171 |
+
letter-spacing: -1px;
|
172 |
+
text-align: center;
|
173 |
+
text-decoration: none;
|
174 |
+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
175 |
+
color: white;
|
176 |
+
font-size: 19px;
|
177 |
}
|
178 |
+
|
179 |
.lp-input-label {
|
180 |
+
text-align: left;
|
181 |
+
margin-bottom: 5px;
|
182 |
+
display: block;
|
183 |
+
font-size: 18px;
|
184 |
}
|
185 |
+
|
186 |
#content {
|
187 |
+
margin-bottom: 80px;
|
188 |
+
padding-bottom: 40px;
|
189 |
}
|
190 |
+
|
191 |
+
.lp-input-label:nth-of-type(1) {
|
192 |
+
margin-top: 5px;
|
193 |
+
}
|
templates/dropcap/index.php
CHANGED
@@ -6,48 +6,49 @@
|
|
6 |
|
7 |
/* Declare Template Key */
|
8 |
$key = basename(dirname(__FILE__));
|
9 |
-
$path = LANDINGPAGES_URLPATH.'templates/'
|
10 |
$url = plugins_url();
|
11 |
|
12 |
/* Include ACF Field Definitions */
|
13 |
-
include_once(LANDINGPAGES_PATH.'templates/'
|
14 |
|
15 |
/* Define Landing Pages's custom pre-load hook for 3rd party plugin integration */
|
16 |
do_action('lp_init');
|
17 |
|
18 |
/* Load $post data */
|
19 |
-
if (have_posts()) : while (have_posts()) :
|
|
|
20 |
|
21 |
/* Pre-load meta data into variables */
|
22 |
-
$content = get_field(
|
23 |
-
$main_headline = get_field(
|
24 |
-
$conversion_area = get_field(
|
25 |
-
$text_color = get_field(
|
26 |
-
$content_background = get_field(
|
27 |
-
$form_text_color = get_field(
|
28 |
-
$background_style = get_field(
|
29 |
-
$background_image = get_field(
|
30 |
-
$background_color = get_field(
|
31 |
-
|
32 |
-
if (
|
33 |
-
|
34 |
-webkit-background-size: cover;
|
35 |
-moz-background-size: cover;
|
36 |
-o-background-size: cover;
|
37 |
background-size: cover;
|
38 |
-
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
39 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'
|
40 |
-
} else if(
|
41 |
-
|
42 |
-
|
43 |
-
} else if(
|
44 |
-
|
45 |
-
} else if(
|
46 |
-
|
47 |
-
} else if(
|
48 |
-
|
49 |
-
} else if(
|
50 |
-
|
51 |
}
|
52 |
|
53 |
|
@@ -55,70 +56,100 @@ if ( $background_style === "fullscreen" ) {
|
|
55 |
<!DOCTYPE html>
|
56 |
<html>
|
57 |
<head>
|
58 |
-
|
59 |
-
<meta charset="utf-8">
|
60 |
-
<title><?php wp_title(); ?></title>
|
61 |
-
<link href="<?php echo $path; ?>assets/css/style.css" rel="stylesheet">
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
<style type="text/css">
|
68 |
-
@font-face {
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
<?php
|
79 |
-
|
80 |
-
|
81 |
-
<?php
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
#
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
}
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
</head>
|
97 |
|
98 |
|
99 |
-
|
100 |
-
<body <?php lp_body_class();?>>
|
101 |
<div id="wrapper">
|
102 |
-
<div id="content">
|
103 |
-
<div id="textspot">
|
104 |
-
|
105 |
-
</div>
|
106 |
-
<div id="main-content-area">
|
107 |
-
|
108 |
-
|
109 |
-
</div>
|
110 |
-
</div>
|
111 |
</div>
|
112 |
-
<?php break;
|
|
|
|
|
113 |
|
114 |
do_action('lp_footer'); // Load Landing Page Footer Hook
|
115 |
wp_footer();
|
116 |
?>
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
</body
|
|
6 |
|
7 |
/* Declare Template Key */
|
8 |
$key = basename(dirname(__FILE__));
|
9 |
+
$path = LANDINGPAGES_URLPATH . 'templates/' . $key . '/';
|
10 |
$url = plugins_url();
|
11 |
|
12 |
/* Include ACF Field Definitions */
|
13 |
+
include_once(LANDINGPAGES_PATH . 'templates/' . $key . '/config.php');
|
14 |
|
15 |
/* Define Landing Pages's custom pre-load hook for 3rd party plugin integration */
|
16 |
do_action('lp_init');
|
17 |
|
18 |
/* Load $post data */
|
19 |
+
if (have_posts()) : while (have_posts()) :
|
20 |
+
the_post();
|
21 |
|
22 |
/* Pre-load meta data into variables */
|
23 |
+
$content = get_field('dropcap-main-content', $post->ID, false);
|
24 |
+
$main_headline = get_field('lp-main-headline', $post->ID, false);
|
25 |
+
$conversion_area = get_field('dropcap-conversion-area-content', $post->ID, false);
|
26 |
+
$text_color = get_field('dropcap-text-color', $post->ID, false);
|
27 |
+
$content_background = get_field('dropcap-content-background', $post->ID, false);
|
28 |
+
$form_text_color = get_field('dropcap-form-text-color', $post->ID, false);
|
29 |
+
$background_style = get_field('dropcap-background-style', $post->ID, false);
|
30 |
+
$background_image = get_field('dropcap-background-image', $post->ID, false);
|
31 |
+
$background_color = get_field('dropcap-background-color', $post->ID, false);
|
32 |
+
|
33 |
+
if ($background_style === "fullscreen") {
|
34 |
+
$bg_style = 'background: url(' . $background_image . ') no-repeat center center fixed;
|
35 |
-webkit-background-size: cover;
|
36 |
-moz-background-size: cover;
|
37 |
-o-background-size: cover;
|
38 |
background-size: cover;
|
39 |
+
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . $background_image . '", sizingMethod="scale");
|
40 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . $background_image . '", sizingMethod="scale")";';
|
41 |
+
} else if ($background_style === "color") {
|
42 |
+
$bg_style = 'background: ' . $background_color . ';';
|
43 |
+
|
44 |
+
} else if ($background_style === "tile") {
|
45 |
+
$bg_style = 'background: url(' . $background_image . ') repeat; ';
|
46 |
+
} else if ($background_style === "repeat-x") {
|
47 |
+
$bg_style = 'background: url(' . $background_image . ') repeat-x; ';
|
48 |
+
} else if ($background_style === "repeat-y") {
|
49 |
+
$bg_style = 'background: url(' . $background_image . ') repeat-y; ';
|
50 |
+
} else if ($background_style === "repeat-y") {
|
51 |
+
$bg_style = 'background: url(' . $background_image . ') repeat-y; ';
|
52 |
}
|
53 |
|
54 |
|
56 |
<!DOCTYPE html>
|
57 |
<html>
|
58 |
<head>
|
59 |
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
60 |
+
<meta charset="utf-8">
|
61 |
+
<title><?php wp_title(); ?></title>
|
62 |
+
<link href="<?php echo $path; ?>assets/css/style.css" rel="stylesheet">
|
63 |
+
|
64 |
+
|
65 |
+
<?php wp_head(); // Load Regular WP Head ?>
|
66 |
+
|
67 |
+
|
68 |
+
<style type="text/css">
|
69 |
+
@font-face {
|
70 |
+
font-family: Chunk;
|
71 |
+
src: url('<?php echo $path; ?>assets/fonts/Chunkfive-webfont.eot');
|
72 |
+
src: url('<?php echo $path; ?>assets/fonts/Chunkfive-webfont.eot?#iefix') format('embedded-opentype'),
|
73 |
+
url('<?php echo $path; ?>assets/fonts/Chunkfive-webfont.woff') format('woff'),
|
74 |
+
url('<?php echo $path; ?>assets/fonts/Chunkfive-webfont.ttf') format('truetype'),
|
75 |
+
url('<?php echo $path; ?>assets/fonts/Chunkfive-webfont.svg#ChunkFiveRegular') format('svg');
|
76 |
+
}
|
77 |
+
|
78 |
+
body {
|
79 |
+
<?php echo $bg_style; ?>
|
80 |
+
}
|
81 |
+
|
82 |
+
<?php if ($text_color != "") { ?>
|
83 |
+
#textspot p {
|
84 |
+
color: <?php echo $text_color;?>;
|
85 |
+
}
|
86 |
+
|
87 |
+
<?php } ?>
|
88 |
+
<?php if ($content_background != "") { ?>
|
89 |
+
#content {
|
90 |
+
background: url('<?php echo LANDINGPAGES_URLPATH; ?>assets/images/image.php?hex=<?php echo str_replace('#','', $content_background);?>');
|
91 |
+
border-radius: 8px;
|
92 |
+
}
|
93 |
+
|
94 |
+
<?php } ?>
|
95 |
+
<?php if ($form_text_color != "") { echo "#lp_container {color: #$form_text_color;}"; } ?>
|
96 |
+
p {
|
97 |
+
margin-bottom: 20px;
|
98 |
+
font-weight: 100;
|
99 |
+
}
|
100 |
+
|
101 |
+
#wrapper {
|
102 |
+
padding-top: 70px;
|
103 |
+
}
|
104 |
+
|
105 |
+
body {
|
106 |
+
font-family: 'Open Sans', sans-serif;
|
107 |
+
}
|
108 |
+
|
109 |
+
#textspot p {
|
110 |
+
font-family: "Chunk", Sans-Serif;
|
111 |
+
letter-spacing: 1px;
|
112 |
+
}
|
113 |
+
|
114 |
+
ul {
|
115 |
+
margin-bottom: 20px;
|
116 |
+
}
|
117 |
+
|
118 |
+
#main-content-area {
|
119 |
+
padding-left: 0px;
|
120 |
+
width: 89%;
|
121 |
+
margin: auto;
|
122 |
+
}
|
123 |
+
</style>
|
124 |
+
<?php do_action('lp_head'); // Load Custom Landing Page Specific Header Items ?>
|
125 |
</head>
|
126 |
|
127 |
|
128 |
+
<body <?php lp_body_class(); ?>>
|
|
|
129 |
<div id="wrapper">
|
130 |
+
<div id="content">
|
131 |
+
<div id="textspot">
|
132 |
+
<p><?php echo $main_headline; ?></p>
|
133 |
+
</div>
|
134 |
+
<div id="main-content-area">
|
135 |
+
<?php echo $content; ?>
|
136 |
+
<?php echo $conversion_area; /* Print out form content */ ?>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
</div>
|
140 |
+
<?php break;
|
141 |
+
endwhile;
|
142 |
+
endif; // end wordpress loop
|
143 |
|
144 |
do_action('lp_footer'); // Load Landing Page Footer Hook
|
145 |
wp_footer();
|
146 |
?>
|
147 |
+
<link href="<?php echo $path; ?>assets/css/form.css" rel="stylesheet">
|
148 |
+
<script type="text/javascript">
|
149 |
+
jQuery(document).ready(function ($) {
|
150 |
+
$("p:empty").remove();
|
151 |
+
});
|
152 |
+
|
153 |
+
</script>
|
154 |
+
</body>
|
155 |
+
</html>
|
templates/simple-solid-lite/config.php
CHANGED
File without changes
|
templates/simple-solid-lite/css/inbound-compiled-style.css
CHANGED
File without changes
|
templates/simple-solid-lite/css/main.css
CHANGED
File without changes
|
templates/simple-solid-lite/images/inbound-logo.png
CHANGED
File without changes
|
templates/simple-solid-lite/index.php
CHANGED
File without changes
|
templates/simple-solid-lite/js/jquery.min.js
CHANGED
File without changes
|
templates/simple-solid-lite/js/scripts.js
CHANGED
File without changes
|
templates/simple-solid-lite/js/selectivizr-min.js
CHANGED
File without changes
|
templates/simple-solid-lite/thumbnail.png
CHANGED
File without changes
|
templates/tubelar/assets/js/jquery.tubular.1.0.js
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
// defaults
|
18 |
var defaults = {
|
19 |
ratio: 16/9, // usually either 4/3 or 16/9 -- tweak as needed
|
20 |
-
videoId: '
|
21 |
mute: true,
|
22 |
repeat: true,
|
23 |
width: $(window).width(),
|
@@ -57,7 +57,10 @@
|
|
57 |
controls: 0,
|
58 |
showinfo: 0,
|
59 |
modestbranding: 1,
|
60 |
-
wmode: 'transparent'
|
|
|
|
|
|
|
61 |
},
|
62 |
events: {
|
63 |
'onReady': onPlayerReady,
|
17 |
// defaults
|
18 |
var defaults = {
|
19 |
ratio: 16/9, // usually either 4/3 or 16/9 -- tweak as needed
|
20 |
+
videoId: 'ZCAnLxRvNNc', // toy robot in space is a good default, no?
|
21 |
mute: true,
|
22 |
repeat: true,
|
23 |
width: $(window).width(),
|
57 |
controls: 0,
|
58 |
showinfo: 0,
|
59 |
modestbranding: 1,
|
60 |
+
wmode: 'transparent',
|
61 |
+
rel: 0,
|
62 |
+
autoplay: 1,
|
63 |
+
html5: 1
|
64 |
},
|
65 |
events: {
|
66 |
'onReady': onPlayerReady,
|