Version Description
- Updated styles for the "Hide notification forever" link
- Compatibility with plugins from webcraftic is updated
Download this release
Release Info
Developer | webcraftic |
Plugin | Disable admin notices individually |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.2
- admin/boot.php +23 -38
- admin/options.php +154 -0
- admin/pages/more-features.php +2 -2
- admin/pages/notices.php +17 -70
- disable-admin-notices.php +6 -6
- includes/classes/class.configurate-notices.php +5 -3
- languages/disable-admin-notices-ru_RU.mo +0 -0
- languages/disable-admin-notices-ru_RU.po +419 -381
- languages/hide-admin-notices-ru_RU.mo +0 -0
- languages/hide-admin-notices-ru_RU.po +0 -381
- libs/factory/bootstrap/assets/flat/css/bootstrap.accordion.css +0 -33
- libs/factory/bootstrap/assets/flat/css/bootstrap.blue.css +0 -48
- libs/factory/bootstrap/assets/flat/css/bootstrap.coffee.css +0 -48
- libs/factory/bootstrap/assets/flat/css/bootstrap.datepicker.css +0 -782
- libs/factory/bootstrap/assets/flat/css/bootstrap.datetimepicker.css +432 -0
- libs/factory/bootstrap/assets/flat/css/bootstrap.ectoplasm.css +0 -48
- libs/factory/bootstrap/assets/flat/css/bootstrap.form-metabox.css +0 -56
- libs/factory/bootstrap/assets/flat/css/bootstrap.midnight.css +0 -48
- libs/factory/bootstrap/assets/flat/css/bootstrap.ocean.css +0 -48
- libs/factory/bootstrap/assets/flat/css/bootstrap.sunrise.css +0 -48
- libs/factory/bootstrap/assets/flat/css/bootstrap.tab.css +0 -112
- libs/factory/bootstrap/assets/flat/css/bootstrap.wp-editor.css +0 -28
- libs/factory/bootstrap/assets/flat/css/control.color-and-opacity.css +0 -24
- libs/factory/bootstrap/assets/flat/css/control.color.css +0 -44
- libs/factory/bootstrap/assets/flat/css/control.dropdown-and-colors.css +0 -16
- libs/factory/bootstrap/assets/flat/css/control.fonts.css +0 -24
- libs/factory/bootstrap/assets/flat/css/control.integer.css +0 -1
- libs/factory/bootstrap/assets/flat/css/control.list.css +0 -67
- libs/factory/bootstrap/assets/flat/css/control.multiple-textbox.css +37 -0
- libs/factory/bootstrap/assets/flat/css/control.pattern.css +0 -187
- libs/factory/bootstrap/assets/flat/css/control.radio-colors.css +0 -39
- libs/factory/bootstrap/assets/flat/css/holder.conrol-group.css +0 -32
- libs/factory/bootstrap/assets/flat/css/plugin.chosen.css +0 -494
- libs/factory/bootstrap/assets/flat/css/plugin.gradient-picker.css +0 -149
- libs/factory/bootstrap/assets/flat/css/plugin.nouislider.css +0 -1
- libs/factory/bootstrap/assets/flat/css/plugin.paddings-editor.css +0 -109
- libs/factory/bootstrap/assets/images/chosen-sprite.png +0 -0
- libs/factory/bootstrap/assets/images/chosen-sprite@2x.png +0 -0
- libs/factory/bootstrap/assets/images/color_picker_pattern.jpg +0 -0
- libs/factory/bootstrap/assets/images/drop-menu_arrow.png +0 -0
- libs/factory/bootstrap/assets/images/no-pattern-background-control.png +0 -0
- libs/factory/bootstrap/assets/js/bootstrap.accordion.js +0 -49
- libs/factory/bootstrap/assets/js/bootstrap.affix.js +0 -127
- libs/factory/bootstrap/assets/js/bootstrap.alert.js +0 -98
- libs/factory/bootstrap/assets/js/bootstrap.button.js +0 -115
- libs/factory/bootstrap/assets/js/bootstrap.carousel.js +0 -217
- libs/factory/bootstrap/assets/js/bootstrap.collapse.js +0 -167
- libs/factory/bootstrap/assets/js/bootstrap.datepicker.js +0 -1966
- libs/factory/bootstrap/assets/js/bootstrap.datetimepicker.js +2746 -0
- libs/factory/bootstrap/assets/js/bootstrap.modal.js +0 -246
- libs/factory/bootstrap/assets/js/bootstrap.popover.js +0 -117
- libs/factory/bootstrap/assets/js/bootstrap.scrollspy.js +0 -158
- libs/factory/bootstrap/assets/js/bootstrap.tab.js +0 -135
- libs/factory/bootstrap/assets/js/bootstrap.transition.js +0 -63
- libs/factory/bootstrap/assets/js/control.color-and-opacity.js +0 -32
- libs/factory/bootstrap/assets/js/control.color.js +0 -88
- libs/factory/bootstrap/assets/js/control.dropdown-and-colors.js +0 -61
- libs/factory/bootstrap/assets/js/control.fonts.js +0 -196
- libs/factory/bootstrap/assets/js/control.gradient.js +0 -51
- libs/factory/bootstrap/assets/js/control.integer.js +0 -102
- libs/factory/bootstrap/assets/js/control.multiple-textbox.js +43 -0
- libs/factory/bootstrap/assets/js/control.pattern.js +0 -218
- libs/factory/bootstrap/assets/js/global.color-functions.js +0 -28
- libs/factory/bootstrap/assets/js/holder.conrol-group.js +0 -20
- libs/factory/bootstrap/assets/js/holder.more-link.js +0 -37
- libs/factory/bootstrap/assets/js/plugin.chosen.js +0 -1211
- libs/factory/bootstrap/assets/js/plugin.color.js +0 -595
- libs/factory/bootstrap/assets/js/plugin.ddslick.js +0 -1
- libs/factory/bootstrap/assets/js/plugin.gradient-picker.js +0 -585
- libs/factory/bootstrap/assets/js/plugin.iris.js +0 -893
- libs/factory/bootstrap/assets/js/plugin.nouislider.js +0 -24
- libs/factory/bootstrap/assets/js/plugin.paddings-editor.js +0 -254
- libs/factory/clearfy/boot.php +9 -9
- libs/factory/clearfy/includes/class.configurate.php +3 -3
- libs/factory/clearfy/langs/{factory_clearfy_101-fr-FR.mo → factory_clearfy_102-fr-FR.mo} +0 -0
- libs/factory/clearfy/langs/{factory_clearfy_101-fr-FR.po → factory_clearfy_102-fr-FR.po} +0 -0
- libs/factory/clearfy/langs/{factory_clearfy_101-ru_RU.mo → factory_clearfy_102-ru_RU.mo} +0 -0
- libs/factory/clearfy/langs/{factory_clearfy_101-ru_RU.po → factory_clearfy_102-ru_RU.po} +0 -0
- libs/factory/clearfy/pages/more-features.php +23 -23
- libs/factory/forms/boot.php +10 -0
- libs/factory/forms/controls/customs/html.php +34 -35
- libs/factory/forms/controls/datepicker-range.php +96 -0
- libs/factory/forms/controls/multiple-textbox.php +108 -0
- libs/factory/forms/includes/form-element.class.php +11 -0
- libs/factory/pages/boot.php +10 -10
- libs/factory/pages/includes/admin-page.class.php +12 -4
- libs/factory/pages/includes/page.class.php +2 -2
- libs/factory/pages/includes/request.class.php +10 -4
- libs/factory/pages/langs/{factory_pages_322-fr_FR.mo → factory_pages_324-fr_FR.mo} +0 -0
- libs/factory/pages/langs/{factory_pages_322-fr_FR.po → factory_pages_324-fr_FR.po} +0 -0
- libs/factory/pages/langs/{factory_pages_322-ru_RU.mo → factory_pages_324-ru_RU.mo} +0 -0
- libs/factory/pages/langs/{factory_pages_322-ru_RU.po → factory_pages_324-ru_RU.po} +0 -0
- libs/factory/pages/pages.php +3 -3
- libs/factory/pages/templates/assets/css/impressive.page.template.css +29 -1
- libs/factory/pages/templates/assets/css/impressive.page.template.less +29 -2
- libs/factory/pages/templates/impressive-page.class.php +154 -47
- readme.txt +4 -0
admin/boot.php
CHANGED
@@ -6,67 +6,50 @@
|
|
6 |
* @version 1.0
|
7 |
*/
|
8 |
|
9 |
-
require(WBCR_DAN_PLUGIN_DIR . '/admin/
|
10 |
|
11 |
if( !defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
|
12 |
require(WBCR_DAN_PLUGIN_DIR . '/admin/pages/more-features.php');
|
|
|
13 |
}
|
14 |
|
15 |
if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'wbcr_clearfy_hide_notices' ) {
|
16 |
require(WBCR_DAN_PLUGIN_DIR . '/admin/ajax/hide-notice.php');
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
function wbcr_dan_group_options($options)
|
20 |
{
|
21 |
$options[] = array(
|
22 |
-
'name' => '
|
23 |
-
'title' => __('
|
24 |
-
'tags' => array(
|
25 |
-
'values' => array('
|
26 |
);
|
27 |
$options[] = array(
|
28 |
-
'name' => '
|
29 |
-
'title' => __('
|
30 |
'tags' => array()
|
31 |
);
|
32 |
$options[] = array(
|
33 |
-
'name' => '
|
34 |
-
'title' => __('
|
35 |
-
'tags' => array('recommended', 'seo_optimize')
|
36 |
-
);
|
37 |
-
$options[] = array(
|
38 |
-
'name' => 'pseudo_comment_author_link',
|
39 |
-
'title' => __('Replace external links from comment authors on the JavaScript code', 'disable-admin-notices'),
|
40 |
-
'tags' => array('recommended', 'seo_optimize')
|
41 |
-
);
|
42 |
-
$options[] = array(
|
43 |
-
'name' => 'remove_x_pingback',
|
44 |
-
'title' => __('Disable X-Pingback', 'disable-admin-notices'),
|
45 |
-
'tags' => array('recommended', 'defence', 'disable_all_comments')
|
46 |
-
);
|
47 |
-
$options[] = array(
|
48 |
-
'name' => 'remove_url_from_comment_form',
|
49 |
-
'title' => __('Remove field "site" in comment form', 'disable-admin-notices'),
|
50 |
'tags' => array()
|
51 |
);
|
52 |
|
53 |
return $options;
|
54 |
}
|
55 |
|
56 |
-
add_filter("wbcr_clearfy_group_options", 'wbcr_dan_group_options');
|
57 |
-
|
58 |
-
function wbcr_dan_allow_quick_mods($mods)
|
59 |
-
{
|
60 |
-
$mods['disable_all_comments'] = array(
|
61 |
-
'title' => __('Disable all comments', 'disable-admin-notices'),
|
62 |
-
'icon' => 'dashicons-testimonial'
|
63 |
-
);
|
64 |
-
|
65 |
-
return $mods;
|
66 |
-
}
|
67 |
-
|
68 |
-
add_filter("wbcr_clearfy_allow_quick_mods", 'wbcr_dan_allow_quick_mods');
|
69 |
-
|
70 |
function wbcr_dan_set_plugin_meta($links, $file)
|
71 |
{
|
72 |
if( $file == WBCR_DAN_PLUGIN_BASE ) {
|
@@ -76,6 +59,8 @@
|
|
76 |
return $links;
|
77 |
}
|
78 |
|
|
|
|
|
79 |
if( !defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
|
80 |
add_filter('plugin_row_meta', 'wbcr_dan_set_plugin_meta', 10, 2);
|
81 |
}
|
6 |
* @version 1.0
|
7 |
*/
|
8 |
|
9 |
+
require(WBCR_DAN_PLUGIN_DIR . '/admin/options.php');
|
10 |
|
11 |
if( !defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
|
12 |
require(WBCR_DAN_PLUGIN_DIR . '/admin/pages/more-features.php');
|
13 |
+
require(WBCR_DAN_PLUGIN_DIR . '/admin/pages/notices.php');
|
14 |
}
|
15 |
|
16 |
if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'wbcr_clearfy_hide_notices' ) {
|
17 |
require(WBCR_DAN_PLUGIN_DIR . '/admin/ajax/hide-notice.php');
|
18 |
}
|
19 |
|
20 |
+
function wbcr_dan_rating_widget_url($page_url, $plugin_name)
|
21 |
+
{
|
22 |
+
if( $plugin_name == 'wbcr_dan' ) {
|
23 |
+
return 'https://goo.gl/68ucHp';
|
24 |
+
}
|
25 |
+
|
26 |
+
return $page_url;
|
27 |
+
}
|
28 |
+
|
29 |
+
add_filter('wbcr_factory_imppage_rating_widget_url', 'wbcr_dan_rating_widget_url', 10, 2);
|
30 |
+
|
31 |
function wbcr_dan_group_options($options)
|
32 |
{
|
33 |
$options[] = array(
|
34 |
+
'name' => 'hide_admin_notices',
|
35 |
+
'title' => __('Hide admin notices', 'disable-admin-notices'),
|
36 |
+
'tags' => array(),
|
37 |
+
'values' => array('hide_admin_notices' => 'only_selected')
|
38 |
);
|
39 |
$options[] = array(
|
40 |
+
'name' => 'show_notices_in_adminbar',
|
41 |
+
'title' => __('Enable hidden notices in adminbar', 'disable-admin-notices'),
|
42 |
'tags' => array()
|
43 |
);
|
44 |
$options[] = array(
|
45 |
+
'name' => 'hidden_notices',
|
46 |
+
'title' => __('Hidden notices', 'disable-admin-notices'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
'tags' => array()
|
48 |
);
|
49 |
|
50 |
return $options;
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
function wbcr_dan_set_plugin_meta($links, $file)
|
54 |
{
|
55 |
if( $file == WBCR_DAN_PLUGIN_BASE ) {
|
59 |
return $links;
|
60 |
}
|
61 |
|
62 |
+
add_filter("wbcr_clearfy_group_options", 'wbcr_dan_group_options');
|
63 |
+
|
64 |
if( !defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
|
65 |
add_filter('plugin_row_meta', 'wbcr_dan_set_plugin_meta', 10, 2);
|
66 |
}
|
admin/options.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Options for additionally form
|
4 |
+
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
5 |
+
* @copyright (c) 21.01.2018, Webcraftic
|
6 |
+
* @version 1.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @return array
|
11 |
+
*/
|
12 |
+
function wbcr_dan_get_plugin_options()
|
13 |
+
{
|
14 |
+
$options = array();
|
15 |
+
|
16 |
+
if( defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
|
17 |
+
$options[] = array(
|
18 |
+
'type' => 'html',
|
19 |
+
'html' => '<div class="wbcr-clearfy-group-header">' . '<strong>' . __('Admin notifications, Update nags', 'disable-admin-notices') . '</strong>' . '<p>' . __('Do you know the situation, when some plugin offers you to update to premium, to collect technical data and shows many annoying notices? You are close these notices every now and again but they newly appears and interfere your work with WordPress. Even worse, some plugin’s authors delete “close” button from notices and they shows in your admin panel forever.', 'disable-admin-notices') . '</p>' . '</div>'
|
20 |
+
);
|
21 |
+
}
|
22 |
+
|
23 |
+
$options[] = array(
|
24 |
+
'type' => 'dropdown',
|
25 |
+
'name' => 'hide_admin_notices',
|
26 |
+
'way' => 'buttons',
|
27 |
+
'title' => __('Hide admin notices', 'disable-admin-notices'),
|
28 |
+
'data' => array(
|
29 |
+
array(
|
30 |
+
'all',
|
31 |
+
__('All notices', 'disable-admin-notices'),
|
32 |
+
__('Hide all notices globally.', 'disable-admin-notices')
|
33 |
+
),
|
34 |
+
array(
|
35 |
+
'only_selected',
|
36 |
+
__('Only selected', 'disable-admin-notices'),
|
37 |
+
__('Hide selected notices only. You will see the link "Hide notification forever" in each notice. Push it and they will not bother you anymore.', 'disable-admin-notices')
|
38 |
+
),
|
39 |
+
array(
|
40 |
+
'not_hide',
|
41 |
+
__("Don't nide", 'disable-admin-notices'),
|
42 |
+
__('Do not hide notices and do not show “Hide notification forever” link for admin.', 'disable-admin-notices')
|
43 |
+
)
|
44 |
+
),
|
45 |
+
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
46 |
+
'hint' => __('Some plugins shows notifications about premium version, data collecting or promote their services. Even if you push close button (that sometimes are impossible), notices are shows again in some time. This option allows you to control notices. Hide them all or each individually. Some plugins shows notifications about premium version, data collecting or promote their services. Even if you push close button (that sometimes are impossible), notices are shows again in some time. This option allows you to control notices. Hide them all or each individually.', 'disable-admin-notices'),
|
47 |
+
'default' => 'only_selected',
|
48 |
+
'events' => array(
|
49 |
+
'all' => array(
|
50 |
+
'show' => '.factory-control-hide_admin_notices_user_roles',
|
51 |
+
'hide' => '.factory-control-reset_notices_button'
|
52 |
+
),
|
53 |
+
'only_selected' => array(
|
54 |
+
'hide' => '.factory-control-hide_admin_notices_user_roles',
|
55 |
+
'show' => '.factory-control-reset_notices_button'
|
56 |
+
),
|
57 |
+
'not_hide' => array(
|
58 |
+
'hide' => '.factory-control-hide_admin_notices_user_roles, .factory-control-reset_notices_button'
|
59 |
+
)
|
60 |
+
)
|
61 |
+
);
|
62 |
+
|
63 |
+
$options[] = array(
|
64 |
+
'type' => 'checkbox',
|
65 |
+
'way' => 'buttons',
|
66 |
+
'name' => 'show_notices_in_adminbar',
|
67 |
+
'title' => __('Enable hidden notices in adminbar', 'disable-admin-notices'),
|
68 |
+
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
69 |
+
'hint' => __('By default, the plugin hides all notices, which you specified. If you enable this option, the plugin will collect all hidden notices and show them into the top admin toolbar. It will not disturb you but will allow to look notices at your convenience.', 'disable-admin-notices'),
|
70 |
+
'default' => false
|
71 |
+
);
|
72 |
+
|
73 |
+
$options[] = array(
|
74 |
+
'type' => 'html',
|
75 |
+
'html' => 'wbcr_dan_reset_notices_button'
|
76 |
+
);
|
77 |
+
|
78 |
+
$options[] = array(
|
79 |
+
'type' => 'separator'
|
80 |
+
);
|
81 |
+
|
82 |
+
return $options;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @param $form
|
87 |
+
* @param $page FactoryPages324_ImpressiveThemplate
|
88 |
+
* @return mixed
|
89 |
+
*/
|
90 |
+
function wbcr_dan_additionally_form_options($form, $page)
|
91 |
+
{
|
92 |
+
if( empty($form) ) {
|
93 |
+
return $form;
|
94 |
+
}
|
95 |
+
|
96 |
+
$options = wbcr_dan_get_plugin_options();
|
97 |
+
|
98 |
+
foreach(array_reverse($options) as $option) {
|
99 |
+
array_unshift($form[0]['items'], $option);
|
100 |
+
}
|
101 |
+
|
102 |
+
return $form;
|
103 |
+
}
|
104 |
+
|
105 |
+
add_filter('wbcr_clr_additionally_form_options', 'wbcr_dan_additionally_form_options', 10, 2);
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @param $html_builder FactoryForms329_Html
|
109 |
+
*/
|
110 |
+
function wbcr_dan_reset_notices_button($html_builder)
|
111 |
+
{
|
112 |
+
global $wbcr_dan_plugin;
|
113 |
+
|
114 |
+
$form_name = $html_builder->getFormName();
|
115 |
+
$reseted = false;
|
116 |
+
|
117 |
+
if( isset($_POST['wbcr_dan_reset_action']) ) {
|
118 |
+
check_admin_referer($form_name, 'wbcr_dan_reset_nonce');
|
119 |
+
|
120 |
+
delete_option($wbcr_dan_plugin->pluginName . '_hidden_notices');
|
121 |
+
|
122 |
+
$reseted = true;
|
123 |
+
}
|
124 |
+
|
125 |
+
$count_hidden_notices = 0;
|
126 |
+
$hidden_notices = get_option($wbcr_dan_plugin->pluginName . '_hidden_notices');
|
127 |
+
|
128 |
+
if( !empty($hidden_notices) ) {
|
129 |
+
$count_hidden_notices = sizeof($hidden_notices);
|
130 |
+
}
|
131 |
+
|
132 |
+
?>
|
133 |
+
<div class="form-group form-group-checkbox factory-control-reset_notices_button">
|
134 |
+
<label for="wbcr_clearfy_reset_notices_button" class="col-sm-6 control-label">
|
135 |
+
<span class="factory-hint-icon factory-hint-icon-grey" data-toggle="factory-tooltip" data-placement="right" title="" data-original-title="<?php _e('Push reset hidden notices if you need to show hidden notices again.', 'disable-admin-notices') ?>">
|
136 |
+
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt="">
|
137 |
+
</span>
|
138 |
+
</label>
|
139 |
+
|
140 |
+
<div class="control-group col-sm-6">
|
141 |
+
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group">
|
142 |
+
<form method="post">
|
143 |
+
<?php wp_nonce_field($form_name, 'wbcr_dan_reset_nonce'); ?>
|
144 |
+
<input type="submit" name="wbcr_dan_reset_action" value="<?php printf(__('Reset hidden notices (%s)', 'disable-admin-notices'), $count_hidden_notices) ?>" class="button button-default"/>
|
145 |
+
<?php if( $reseted ): ?>
|
146 |
+
<div style="color:green;margin-top:5px;"><?php _e('Hidden notices are successfully reset, now you can see them again!', 'disable-admin-notices') ?></div>
|
147 |
+
<?php endif; ?>
|
148 |
+
</form>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
<?php
|
153 |
+
}
|
154 |
+
|
admin/pages/more-features.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
-
class WbcrHan_MoreFeaturesPage extends
|
9 |
|
10 |
}
|
11 |
|
12 |
-
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
+
class WbcrHan_MoreFeaturesPage extends FactoryClearfy102_MoreFeaturesPage {
|
9 |
|
10 |
}
|
11 |
|
12 |
+
FactoryPages324::register($wbcr_dan_plugin, 'WbcrHan_MoreFeaturesPage');
|
admin/pages/notices.php
CHANGED
@@ -5,13 +5,13 @@
|
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
-
class WbcrHan_NoticesPage extends
|
9 |
|
10 |
/**
|
11 |
* The id of the page in the admin menu.
|
12 |
*
|
13 |
* Mainly used to navigate between pages.
|
14 |
-
* @see
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
* @var string
|
@@ -29,7 +29,7 @@
|
|
29 |
$this->addLinkToPluginActions = true;
|
30 |
}
|
31 |
|
32 |
-
add_filter('wbcr_factory_imppage_actions_notice', array($this, 'actionsNotice'));
|
33 |
|
34 |
parent::__construct($plugin);
|
35 |
}
|
@@ -37,17 +37,25 @@
|
|
37 |
public function getMenuTitle()
|
38 |
{
|
39 |
return defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON')
|
40 |
-
? __('
|
41 |
: __('General', 'disable-admin-notices');
|
42 |
}
|
43 |
|
|
|
44 |
/**
|
45 |
* We register notifications for some actions
|
46 |
* @param $notices
|
|
|
47 |
* @return array
|
48 |
*/
|
49 |
-
public function actionsNotice($notices)
|
50 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
$notices[] = array(
|
52 |
'conditions' => array(
|
53 |
'wbcr_dan_reseted_notices' => 1
|
@@ -62,7 +70,7 @@
|
|
62 |
'wbcr_dan_code' => 'interal_error'
|
63 |
),
|
64 |
'type' => 'danger',
|
65 |
-
'message' => __('An error occurred while trying to delete comments. Internal error occured. Please try again later.', '
|
66 |
);*/
|
67 |
|
68 |
return $notices;
|
@@ -76,62 +84,7 @@
|
|
76 |
*/
|
77 |
public function getOptions()
|
78 |
{
|
79 |
-
$options =
|
80 |
-
|
81 |
-
$count_hidden_notices = 0;
|
82 |
-
$hidden_notices = get_option($this->plugin->pluginName . '_hidden_notices');
|
83 |
-
|
84 |
-
if( !empty($hidden_notices) ) {
|
85 |
-
$count_hidden_notices = sizeof($hidden_notices);
|
86 |
-
}
|
87 |
-
|
88 |
-
$options[] = array(
|
89 |
-
'type' => 'dropdown',
|
90 |
-
'name' => 'hide_admin_notices',
|
91 |
-
'way' => 'buttons',
|
92 |
-
'title' => __('Hide admin notices', 'disable-admin-notices'),
|
93 |
-
'data' => array(
|
94 |
-
array(
|
95 |
-
'all',
|
96 |
-
__('All notices', 'disable-admin-notices'),
|
97 |
-
__('Hide all notices globally.', 'disable-admin-notices')
|
98 |
-
),
|
99 |
-
array(
|
100 |
-
'only_selected',
|
101 |
-
__('Only selected', 'disable-admin-notices'),
|
102 |
-
sprintf(__('Hide selected notices only. You will see the link "Hide notification forever" in each notice. Push it and they will not bother you anymore. Push <a href="%s">reset hidden notices (%d)</a> if you need to show hidden notices again.', 'disable-admin-notices'), $this->getActionUrl('reset_hidden_notices'), $count_hidden_notices)
|
103 |
-
),
|
104 |
-
array(
|
105 |
-
'not_hide',
|
106 |
-
__("Don't nide", 'disable-admin-notices'),
|
107 |
-
__('Do not hide notices and do not show “Hide notification forever” link for admin.', 'disable-admin-notices')
|
108 |
-
)
|
109 |
-
),
|
110 |
-
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
111 |
-
'hint' => __('Some plugins shows notifications about premium version, data collecting or promote their services. Even if you push close button (that sometimes are impossible), notices are shows again in some time. This option allows you to control notices. Hide them all or each individually. Some plugins shows notifications about premium version, data collecting or promote their services. Even if you push close button (that sometimes are impossible), notices are shows again in some time. This option allows you to control notices. Hide them all or each individually.', 'disable-admin-notices'),
|
112 |
-
'default' => 'only_selected',
|
113 |
-
'events' => array(
|
114 |
-
'all' => array(
|
115 |
-
'show' => '.factory-control-hide_admin_notices_user_roles'
|
116 |
-
),
|
117 |
-
'only_selected' => array(
|
118 |
-
'hide' => '.factory-control-hide_admin_notices_user_roles'
|
119 |
-
),
|
120 |
-
'not_hide' => array(
|
121 |
-
'hide' => '.factory-control-hide_admin_notices_user_roles'
|
122 |
-
)
|
123 |
-
)
|
124 |
-
);
|
125 |
-
|
126 |
-
$options[] = array(
|
127 |
-
'type' => 'checkbox',
|
128 |
-
'way' => 'buttons',
|
129 |
-
'name' => 'show_notices_in_adminbar',
|
130 |
-
'title' => __('Enable hidden notices in adminbar', 'disable-admin-notices'),
|
131 |
-
'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
|
132 |
-
'hint' => __('By default, the plugin hides all notices, which you specified. If you enable this option, the plugin will collect all hidden notices and show them into the top admin toolbar. It will not disturb you but will allow to look notices at your convenience.', 'disable-admin-notices'),
|
133 |
-
'default' => false
|
134 |
-
);
|
135 |
|
136 |
$formOptions = array();
|
137 |
|
@@ -141,14 +94,8 @@
|
|
141 |
//'cssClass' => 'postbox'
|
142 |
);
|
143 |
|
144 |
-
return apply_filters('wbcr_dan_notices_form_options', $formOptions);
|
145 |
-
}
|
146 |
-
|
147 |
-
public function resetHiddenNoticesAction()
|
148 |
-
{
|
149 |
-
delete_option('wbcr_dan_hidden_notices');
|
150 |
-
$this->redirectToAction('index', array('wbcr_dan_reseted_notices' => 1));
|
151 |
}
|
152 |
}
|
153 |
|
154 |
-
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
+
class WbcrHan_NoticesPage extends FactoryPages324_ImpressiveThemplate {
|
9 |
|
10 |
/**
|
11 |
* The id of the page in the admin menu.
|
12 |
*
|
13 |
* Mainly used to navigate between pages.
|
14 |
+
* @see FactoryPages324_AdminPage
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
* @var string
|
29 |
$this->addLinkToPluginActions = true;
|
30 |
}
|
31 |
|
32 |
+
add_filter('wbcr_factory_imppage_actions_notice', array($this, 'actionsNotice'), 10, 2);
|
33 |
|
34 |
parent::__construct($plugin);
|
35 |
}
|
37 |
public function getMenuTitle()
|
38 |
{
|
39 |
return defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON')
|
40 |
+
? __('Notices', 'disable-admin-notices')
|
41 |
: __('General', 'disable-admin-notices');
|
42 |
}
|
43 |
|
44 |
+
|
45 |
/**
|
46 |
* We register notifications for some actions
|
47 |
* @param $notices
|
48 |
+
* @param $plugin
|
49 |
* @return array
|
50 |
*/
|
51 |
+
public function actionsNotice($notices, $plugin)
|
52 |
{
|
53 |
+
global $wbcr_dan_plugin;
|
54 |
+
|
55 |
+
if( $wbcr_dan_plugin->pluginName != $plugin->pluginName ) {
|
56 |
+
return $notices;
|
57 |
+
}
|
58 |
+
|
59 |
$notices[] = array(
|
60 |
'conditions' => array(
|
61 |
'wbcr_dan_reseted_notices' => 1
|
70 |
'wbcr_dan_code' => 'interal_error'
|
71 |
),
|
72 |
'type' => 'danger',
|
73 |
+
'message' => __('An error occurred while trying to delete comments. Internal error occured. Please try again later.', 'factory_pages_324')
|
74 |
);*/
|
75 |
|
76 |
return $notices;
|
84 |
*/
|
85 |
public function getOptions()
|
86 |
{
|
87 |
+
$options = wbcr_dan_get_plugin_options();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
$formOptions = array();
|
90 |
|
94 |
//'cssClass' => 'postbox'
|
95 |
);
|
96 |
|
97 |
+
return apply_filters('wbcr_dan_notices_form_options', $formOptions, $this);
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
}
|
100 |
|
101 |
+
FactoryPages324::register($wbcr_dan_plugin, 'WbcrHan_NoticesPage');
|
disable-admin-notices.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name: Webcraftic
|
4 |
* Plugin URI: https://wordpress.org/plugins/disable-admin-notices/
|
5 |
* Description: Disable admin notices plugin gives you the option to hide updates warnings and inline notices in the admin panel.
|
6 |
* Author: Webcraftic <wordpress.webraftic@gmail.com>
|
7 |
-
* Version: 1.0.
|
8 |
* Text Domain: disable-admin-notices
|
9 |
* Domain Path: /languages/
|
10 |
*/
|
@@ -52,7 +52,7 @@
|
|
52 |
$wbcr_dan_plugin = new Factory326_Plugin(__FILE__, array(
|
53 |
'name' => 'wbcr_dan',
|
54 |
'title' => __('Webcraftic disable admin notices', 'disable-admin-notices'),
|
55 |
-
'version' => '1.0.
|
56 |
'host' => 'wordpress.org',
|
57 |
'url' => 'https://wordpress.org/plugins/disable-admin-notices/',
|
58 |
'assembly' => 'free',
|
@@ -63,11 +63,11 @@
|
|
63 |
$wbcr_dan_plugin->load(array(
|
64 |
array('libs/factory/bootstrap', 'factory_bootstrap_330', 'admin'),
|
65 |
array('libs/factory/forms', 'factory_forms_329', 'admin'),
|
66 |
-
array('libs/factory/pages', '
|
67 |
-
array('libs/factory/clearfy', '
|
68 |
));
|
69 |
}
|
70 |
-
|
71 |
// loading other files
|
72 |
if( is_admin() ) {
|
73 |
require(WBCR_DAN_PLUGIN_DIR . '/admin/boot.php');
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: Webcraftic Disable Admin Notices Individually
|
4 |
* Plugin URI: https://wordpress.org/plugins/disable-admin-notices/
|
5 |
* Description: Disable admin notices plugin gives you the option to hide updates warnings and inline notices in the admin panel.
|
6 |
* Author: Webcraftic <wordpress.webraftic@gmail.com>
|
7 |
+
* Version: 1.0.2
|
8 |
* Text Domain: disable-admin-notices
|
9 |
* Domain Path: /languages/
|
10 |
*/
|
52 |
$wbcr_dan_plugin = new Factory326_Plugin(__FILE__, array(
|
53 |
'name' => 'wbcr_dan',
|
54 |
'title' => __('Webcraftic disable admin notices', 'disable-admin-notices'),
|
55 |
+
'version' => '1.0.2',
|
56 |
'host' => 'wordpress.org',
|
57 |
'url' => 'https://wordpress.org/plugins/disable-admin-notices/',
|
58 |
'assembly' => 'free',
|
63 |
$wbcr_dan_plugin->load(array(
|
64 |
array('libs/factory/bootstrap', 'factory_bootstrap_330', 'admin'),
|
65 |
array('libs/factory/forms', 'factory_forms_329', 'admin'),
|
66 |
+
array('libs/factory/pages', 'factory_pages_324', 'admin'),
|
67 |
+
array('libs/factory/clearfy', 'factory_clearfy_102', 'all')
|
68 |
));
|
69 |
}
|
70 |
+
|
71 |
// loading other files
|
72 |
if( is_admin() ) {
|
73 |
require(WBCR_DAN_PLUGIN_DIR . '/admin/boot.php');
|
includes/classes/class.configurate-notices.php
CHANGED
@@ -99,13 +99,15 @@
|
|
99 |
.wbcr-clearfy-hide-notice-link {
|
100 |
display: block;
|
101 |
text-align: right;
|
102 |
-
|
103 |
-
top: 50%;
|
104 |
-
margin-top: 5px;
|
105 |
font-weight: bold;
|
106 |
color: #F44336;
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
109 |
.wbcr-clearfy-hide-notice-link:active, .wbcr-clearfy-hide-notice-link:focus {
|
110 |
box-shadow: none;
|
111 |
outline: none;
|
99 |
.wbcr-clearfy-hide-notice-link {
|
100 |
display: block;
|
101 |
text-align: right;
|
102 |
+
margin: 5px 0 5px 5px;
|
|
|
|
|
103 |
font-weight: bold;
|
104 |
color: #F44336;
|
105 |
}
|
106 |
|
107 |
+
.is-dismissible .wbcr-clearfy-hide-notice-link {
|
108 |
+
margin-right: -30px;
|
109 |
+
}
|
110 |
+
|
111 |
.wbcr-clearfy-hide-notice-link:active, .wbcr-clearfy-hide-notice-link:focus {
|
112 |
box-shadow: none;
|
113 |
outline: none;
|
languages/disable-admin-notices-ru_RU.mo
CHANGED
Binary file
|
languages/disable-admin-notices-ru_RU.po
CHANGED
@@ -1,381 +1,419 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: clearfy\n"
|
4 |
-
"POT-Creation-Date: 2018-01-
|
5 |
-
"PO-Revision-Date: 2018-01-
|
6 |
-
"Last-Translator: alex.kovalevv@gmail.com <alex.kovalevv@gmail.com>\n"
|
7 |
-
"Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
|
8 |
-
"Language: ru_RU\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.8.8\n"
|
13 |
-
"X-Poedit-Basepath: ..\n"
|
14 |
-
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
15 |
-
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
16 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
|
18 |
-
"X-Poedit-SearchPath-0: .\n"
|
19 |
-
"X-Poedit-SearchPathExcluded-0: libs\n"
|
20 |
-
|
21 |
-
#: admin/ajax/hide-notice.php:16
|
22 |
-
msgid "You don't have enough capability to edit this information."
|
23 |
-
msgstr "Вы не имеете разрешения на редактирование этого!"
|
24 |
-
|
25 |
-
#: admin/ajax/hide-notice.php:33
|
26 |
-
msgid "Undefinded notice id."
|
27 |
-
msgstr "Не передан notice id."
|
28 |
-
|
29 |
-
#: admin/ajax/hide-notice.php:47
|
30 |
-
msgid "Success"
|
31 |
-
msgstr "Успешно"
|
32 |
-
|
33 |
-
#: admin/boot.php:
|
34 |
-
msgid "
|
35 |
-
msgstr "
|
36 |
-
|
37 |
-
#: admin/boot.php:
|
38 |
-
msgid "
|
39 |
-
msgstr "
|
40 |
-
|
41 |
-
#: admin/boot.php:
|
42 |
-
msgid "
|
43 |
-
msgstr "
|
44 |
-
|
45 |
-
#: admin/boot.php:
|
46 |
-
msgid "
|
47 |
-
msgstr "
|
48 |
-
|
49 |
-
#: admin/
|
50 |
-
msgid "
|
51 |
-
msgstr "
|
52 |
-
|
53 |
-
#: admin/
|
54 |
-
msgid "
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
msgstr "
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
"
|
99 |
-
"
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
"
|
104 |
-
"
|
105 |
-
"
|
106 |
-
"
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
"
|
115 |
-
"
|
116 |
-
|
117 |
-
"
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
"
|
123 |
-
"
|
124 |
-
"
|
125 |
-
|
126 |
-
"
|
127 |
-
"
|
128 |
-
"
|
129 |
-
"
|
130 |
-
|
131 |
-
|
132 |
-
"
|
133 |
-
"
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
"
|
157 |
-
"
|
158 |
-
|
159 |
-
|
160 |
-
"
|
161 |
-
"
|
162 |
-
"
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
#~
|
179 |
-
|
180 |
-
|
181 |
-
#~
|
182 |
-
|
183 |
-
|
184 |
-
#~
|
185 |
-
|
186 |
-
#~ "
|
187 |
-
#~ msgstr ""
|
188 |
-
|
189 |
-
#~ "
|
190 |
-
|
191 |
-
|
192 |
-
#~
|
193 |
-
|
194 |
-
|
195 |
-
#~
|
196 |
-
|
197 |
-
|
198 |
-
#~
|
199 |
-
|
200 |
-
|
201 |
-
#~
|
202 |
-
#~
|
203 |
-
|
204 |
-
#~
|
205 |
-
#~ "
|
206 |
-
#~
|
207 |
-
#~
|
208 |
-
#~ "
|
209 |
-
#~ "
|
210 |
-
#~ "
|
211 |
-
|
212 |
-
|
213 |
-
#~
|
214 |
-
|
215 |
-
|
216 |
-
#~
|
217 |
-
|
218 |
-
|
219 |
-
#~
|
220 |
-
|
221 |
-
|
222 |
-
#~
|
223 |
-
#~ "
|
224 |
-
#~
|
225 |
-
#~
|
226 |
-
#~ "
|
227 |
-
|
228 |
-
|
229 |
-
#~
|
230 |
-
|
231 |
-
|
232 |
-
#~
|
233 |
-
|
234 |
-
|
235 |
-
#~
|
236 |
-
|
237 |
-
|
238 |
-
#~
|
239 |
-
#~ "
|
240 |
-
#~ msgstr ""
|
241 |
-
|
242 |
-
#~ "
|
243 |
-
|
244 |
-
#~
|
245 |
-
#~ msgstr "
|
246 |
-
|
247 |
-
#~
|
248 |
-
#~ "
|
249 |
-
|
250 |
-
#~ "
|
251 |
-
#~ msgstr ""
|
252 |
-
|
253 |
-
#~ "
|
254 |
-
#~ "
|
255 |
-
|
256 |
-
|
257 |
-
#~
|
258 |
-
|
259 |
-
#~
|
260 |
-
#~ "
|
261 |
-
#~
|
262 |
-
#~
|
263 |
-
#~ "
|
264 |
-
#~ "
|
265 |
-
|
266 |
-
#~ msgid ""
|
267 |
-
#~ "
|
268 |
-
|
269 |
-
#~ "
|
270 |
-
#~ "
|
271 |
-
|
272 |
-
#~
|
273 |
-
#~
|
274 |
-
|
275 |
-
#~
|
276 |
-
|
277 |
-
#~
|
278 |
-
#~ msgstr "
|
279 |
-
|
280 |
-
#~
|
281 |
-
|
282 |
-
#~ "
|
283 |
-
#~ msgstr ""
|
284 |
-
|
285 |
-
#~
|
286 |
-
|
287 |
-
#~
|
288 |
-
#~
|
289 |
-
|
290 |
-
#~
|
291 |
-
#~ "
|
292 |
-
#~ "
|
293 |
-
#~
|
294 |
-
|
295 |
-
#~
|
296 |
-
|
297 |
-
#~
|
298 |
-
#~
|
299 |
-
|
300 |
-
#~
|
301 |
-
#~ "
|
302 |
-
#~ "
|
303 |
-
|
304 |
-
#~
|
305 |
-
#~ "
|
306 |
-
|
307 |
-
#~
|
308 |
-
#~
|
309 |
-
#~
|
310 |
-
#~ "
|
311 |
-
|
312 |
-
#~
|
313 |
-
#~ "
|
314 |
-
|
315 |
-
#~
|
316 |
-
#~ "
|
317 |
-
|
318 |
-
|
319 |
-
#~
|
320 |
-
#~ "
|
321 |
-
#~
|
322 |
-
#~
|
323 |
-
#~ "
|
324 |
-
|
325 |
-
|
326 |
-
#~
|
327 |
-
|
328 |
-
|
329 |
-
#~
|
330 |
-
#~
|
331 |
-
|
332 |
-
#~
|
333 |
-
#~ "
|
334 |
-
|
335 |
-
#~
|
336 |
-
#~
|
337 |
-
|
338 |
-
#~
|
339 |
-
#~ "
|
340 |
-
#~ "
|
341 |
-
#~
|
342 |
-
|
343 |
-
#~
|
344 |
-
|
345 |
-
|
346 |
-
#~
|
347 |
-
#~ "
|
348 |
-
#~ "
|
349 |
-
|
350 |
-
#~
|
351 |
-
#~ "
|
352 |
-
#~ "
|
353 |
-
#~
|
354 |
-
#~ "
|
355 |
-
|
356 |
-
|
357 |
-
#~
|
358 |
-
|
359 |
-
#~
|
360 |
-
#~ msgstr "
|
361 |
-
|
362 |
-
#~
|
363 |
-
|
364 |
-
#~ "
|
365 |
-
#~ "
|
366 |
-
|
367 |
-
#~ "
|
368 |
-
#~ "
|
369 |
-
|
370 |
-
|
371 |
-
#~
|
372 |
-
#~ "
|
373 |
-
#~ "
|
374 |
-
#~ "
|
375 |
-
#~ msgstr ""
|
376 |
-
#~ "
|
377 |
-
#~ "
|
378 |
-
#~ "
|
379 |
-
|
380 |
-
|
381 |
-
#~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: clearfy\n"
|
4 |
+
"POT-Creation-Date: 2018-01-21 23:48+0300\n"
|
5 |
+
"PO-Revision-Date: 2018-01-21 23:55+0300\n"
|
6 |
+
"Last-Translator: alex.kovalevv@gmail.com <alex.kovalevv@gmail.com>\n"
|
7 |
+
"Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
|
8 |
+
"Language: ru_RU\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.8\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
15 |
+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SearchPathExcluded-0: libs\n"
|
20 |
+
|
21 |
+
#: admin/ajax/hide-notice.php:16
|
22 |
+
msgid "You don't have enough capability to edit this information."
|
23 |
+
msgstr "Вы не имеете разрешения на редактирование этого!"
|
24 |
+
|
25 |
+
#: admin/ajax/hide-notice.php:33
|
26 |
+
msgid "Undefinded notice id."
|
27 |
+
msgstr "Не передан notice id."
|
28 |
+
|
29 |
+
#: admin/ajax/hide-notice.php:47
|
30 |
+
msgid "Success"
|
31 |
+
msgstr "Успешно"
|
32 |
+
|
33 |
+
#: admin/boot.php:37 admin/options.php:27 admin/pages/notices.php:24
|
34 |
+
msgid "Hide admin notices"
|
35 |
+
msgstr "Скрыть уведомления"
|
36 |
+
|
37 |
+
#: admin/boot.php:43 admin/options.php:67
|
38 |
+
msgid "Enable hidden notices in adminbar"
|
39 |
+
msgstr "Включить уведомления в админбаре"
|
40 |
+
|
41 |
+
#: admin/boot.php:48
|
42 |
+
msgid "Hidden notices"
|
43 |
+
msgstr "Скрытые уведомления"
|
44 |
+
|
45 |
+
#: admin/boot.php:58
|
46 |
+
msgid "Get ultimate plugin free"
|
47 |
+
msgstr "Получите полную версию плагина бесплатно"
|
48 |
+
|
49 |
+
#: admin/options.php:19
|
50 |
+
msgid "Admin notifications, Update nags"
|
51 |
+
msgstr "Уведомления администратора, уведомления об обновлении Wordpress"
|
52 |
+
|
53 |
+
#: admin/options.php:19
|
54 |
+
msgid ""
|
55 |
+
"Do you know the situation, when some plugin offers you to update to premium, "
|
56 |
+
"to collect technical data and shows many annoying notices? You are close "
|
57 |
+
"these notices every now and again but they newly appears and interfere your "
|
58 |
+
"work with WordPress. Even worse, some plugin’s authors delete “close” button "
|
59 |
+
"from notices and they shows in your admin panel forever."
|
60 |
+
msgstr ""
|
61 |
+
"Вам знакома ситуация, когда какой-то плагин просит вас обновиться до премиум-"
|
62 |
+
"версии, получить права на сбор данных о вашем сайте и создает много "
|
63 |
+
"раздражающих уведомлений? Вы закрываете эти уведомления раз за разом, но они "
|
64 |
+
"вновь появляются и мешают вашей работе с WordPress. Хуже того, некоторые "
|
65 |
+
"авторы и вовсе удаляют кнопку “закрыть” из уведомлений, и они висят в шапке "
|
66 |
+
"вашей панели администратора целую вечность."
|
67 |
+
|
68 |
+
#: admin/options.php:31
|
69 |
+
msgid "All notices"
|
70 |
+
msgstr "Все уведомления"
|
71 |
+
|
72 |
+
#: admin/options.php:32
|
73 |
+
msgid "Hide all notices globally."
|
74 |
+
msgstr "Скрыть все уведомления глобально."
|
75 |
+
|
76 |
+
#: admin/options.php:36
|
77 |
+
msgid "Only selected"
|
78 |
+
msgstr "Только выбранные"
|
79 |
+
|
80 |
+
#: admin/options.php:37
|
81 |
+
msgid ""
|
82 |
+
"Hide selected notices only. You will see the link \"Hide notification forever"
|
83 |
+
"\" in each notice. Push it and they will not bother you anymore."
|
84 |
+
msgstr ""
|
85 |
+
"Скрывать только выбранные уведомления. В каждом уведомлении вы увидите "
|
86 |
+
"ссылку \"Скрыть уведомление навсегда\". Нажмите на неё и уведомление будет "
|
87 |
+
"скрыто навсегда и перестанет вас беспокоить."
|
88 |
+
|
89 |
+
#: admin/options.php:41
|
90 |
+
msgid "Don't nide"
|
91 |
+
msgstr "Не скрывать"
|
92 |
+
|
93 |
+
#: admin/options.php:42
|
94 |
+
msgid ""
|
95 |
+
"Do not hide notices and do not show “Hide notification forever” link for "
|
96 |
+
"admin."
|
97 |
+
msgstr ""
|
98 |
+
"Не скрывать уведомления и не показывать ссылку \"Скрыть уведомление навсегда"
|
99 |
+
"\" в уведомлениях администратора."
|
100 |
+
|
101 |
+
#: admin/options.php:46
|
102 |
+
msgid ""
|
103 |
+
"Some plugins shows notifications about premium version, data collecting or "
|
104 |
+
"promote their services. Even if you push close button (that sometimes are "
|
105 |
+
"impossible), notices are shows again in some time. This option allows you to "
|
106 |
+
"control notices. Hide them all or each individually. Some plugins shows "
|
107 |
+
"notifications about premium version, data collecting or promote their "
|
108 |
+
"services. Even if you push close button (that sometimes are impossible), "
|
109 |
+
"notices are shows again in some time. This option allows you to control "
|
110 |
+
"notices. Hide them all or each individually."
|
111 |
+
msgstr ""
|
112 |
+
"Зачастую, плагины отображают уведомления о возможности перехода на премиум "
|
113 |
+
"версию, просят разрешение на сбор данных, рекламируют свои услуги. Даже если "
|
114 |
+
"вы нажмете кнопку закрыть (что не всегда возможно), уведомления всё равно "
|
115 |
+
"отобразятся через какое-то время. С помощью этой настройки, вы можете "
|
116 |
+
"контролировать эти уведомления. Скройте их все сразу или каждое по "
|
117 |
+
"отдельности."
|
118 |
+
|
119 |
+
#: admin/options.php:69
|
120 |
+
msgid ""
|
121 |
+
"By default, the plugin hides all notices, which you specified. If you enable "
|
122 |
+
"this option, the plugin will collect all hidden notices and show them into "
|
123 |
+
"the top admin toolbar. It will not disturb you but will allow to look "
|
124 |
+
"notices at your convenience."
|
125 |
+
msgstr ""
|
126 |
+
"По умолчанию, плагин полностью скрывает отключенные вами уведомления. Если "
|
127 |
+
"включить эту опцию, то плагин будет собирать все скрытые вами уведомления и "
|
128 |
+
"выводить в верхней панели администратора. Это не будет вас раздражать, но и "
|
129 |
+
"позволит просматривать уведомления, когда вам это удобно."
|
130 |
+
|
131 |
+
#: admin/options.php:135
|
132 |
+
msgid "Push reset hidden notices if you need to show hidden notices again."
|
133 |
+
msgstr "Нажмите кнопку \\\"Сбросить скрытые уведомления\\\""
|
134 |
+
|
135 |
+
#: admin/options.php:144
|
136 |
+
#, php-format
|
137 |
+
msgid "Reset hidden notices (%s)"
|
138 |
+
msgstr "Сбросить скрытые уведомления (%s)"
|
139 |
+
|
140 |
+
#: admin/options.php:146 admin/pages/notices.php:64
|
141 |
+
msgid "Hidden notices are successfully reset, now you can see them again!"
|
142 |
+
msgstr ""
|
143 |
+
"Скрытые уведомления успешно восстановлены, теперь вы можете снова видеть их!"
|
144 |
+
|
145 |
+
#: admin/pages/notices.php:40
|
146 |
+
msgid "Notices"
|
147 |
+
msgstr "Уведомления"
|
148 |
+
|
149 |
+
#: admin/pages/notices.php:41
|
150 |
+
msgid "General"
|
151 |
+
msgstr "Основные"
|
152 |
+
|
153 |
+
#: disable-admin-notices.php:17
|
154 |
+
msgid ""
|
155 |
+
"We found that you have the \"Clearfy - disable unused features\" plugin "
|
156 |
+
"installed, this plugin already has disable comments functions, so you can "
|
157 |
+
"deactivate plugin \"Disable admin notices\"!"
|
158 |
+
msgstr ""
|
159 |
+
"Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
|
160 |
+
"неиспользуемые функции», этот плагин уже имеет функции отключения "
|
161 |
+
"комментариев, поэтому вы можете отключить плагин «Скрыть уведомления "
|
162 |
+
"администратора»!"
|
163 |
+
|
164 |
+
#: disable-admin-notices.php:82
|
165 |
+
msgid "Webcraftic disable admin notices"
|
166 |
+
msgstr "Webcraftic отключить уведомления администратора"
|
167 |
+
|
168 |
+
#: includes/classes/class.configurate-notices.php:52
|
169 |
+
#, php-format
|
170 |
+
msgid "Notifications %s"
|
171 |
+
msgstr "Уведомления %s"
|
172 |
+
|
173 |
+
#: includes/classes/class.configurate-notices.php:217
|
174 |
+
msgid "Hide notification forever"
|
175 |
+
msgstr "Скрыть уведомление навсегда"
|
176 |
+
|
177 |
+
#~ msgid "Disable comments on the entire site"
|
178 |
+
#~ msgstr "Отключить комментарии на всем сайте"
|
179 |
+
|
180 |
+
#~ msgid "Select post types"
|
181 |
+
#~ msgstr "Выбрать тип записи"
|
182 |
+
|
183 |
+
#~ msgid "Replace external links in comments on the JavaScript code"
|
184 |
+
#~ msgstr "Заменить внешние ссылки в комментариях на JavaScript код"
|
185 |
+
|
186 |
+
#~ msgid "Replace external links from comment authors on the JavaScript code"
|
187 |
+
#~ msgstr "Заменить внешние ссылки от авторов комментариев на код JavaScript"
|
188 |
+
|
189 |
+
#~ msgid "Disable X-Pingback"
|
190 |
+
#~ msgstr "Убрать ссылку на X-Pingback и возможность спамить pingback-ами"
|
191 |
+
|
192 |
+
#~ msgid "Remove field \"site\" in comment form"
|
193 |
+
#~ msgstr "Удаляет поле \"Сайт\" в форме комментариев"
|
194 |
+
|
195 |
+
#~ msgid "Disable all comments"
|
196 |
+
#~ msgstr "Отключить все комментарии"
|
197 |
+
|
198 |
+
#~ msgid "Comments"
|
199 |
+
#~ msgstr "Комментарии"
|
200 |
+
|
201 |
+
#~ msgid ""
|
202 |
+
#~ "Hide selected notices only. You will see the link \"Hide notification "
|
203 |
+
#~ "forever\" in each notice. Push it and they will not bother you anymore. "
|
204 |
+
#~ "Push <a href=\"%s\">reset hidden notices (%d)</a> if you need to show "
|
205 |
+
#~ "hidden notices again."
|
206 |
+
#~ msgstr ""
|
207 |
+
#~ "Скрывать только выбранные уведомления. В каждом уведомлении вы увидите "
|
208 |
+
#~ "ссылку \"Скрыть уведомление навсегда\". Нажмите на неё и уведомление "
|
209 |
+
#~ "будет скрыто навсегда и перестанет вас беспокоить. Нажмите <a href=\"%s"
|
210 |
+
#~ "\">сбросить скрытые уведомления (%d)</a>, если вам нужно восстановить "
|
211 |
+
#~ "показ скрытых ранее уведомлений."
|
212 |
+
|
213 |
+
#~ msgid "Webcraftic hide admin notices"
|
214 |
+
#~ msgstr "Webcraftic скрыть уведомления администратора"
|
215 |
+
|
216 |
+
#~ msgid "Comments tweaks"
|
217 |
+
#~ msgstr "Инструменты комментариев"
|
218 |
+
|
219 |
+
#~ msgid "All comments have been deleted."
|
220 |
+
#~ msgstr "Все комментарии были удалены."
|
221 |
+
|
222 |
+
#~ msgid ""
|
223 |
+
#~ "An error occurred while trying to delete comments. Internal error "
|
224 |
+
#~ "occured. Please try again later."
|
225 |
+
#~ msgstr ""
|
226 |
+
#~ "При попытке удалить комментарии произошла ошибка. Пожалуйста, повторите "
|
227 |
+
#~ "попытку позже."
|
228 |
+
|
229 |
+
#~ msgid "You are not allowed to view this page."
|
230 |
+
#~ msgstr "Вам не разрешено просматривать эту страницу."
|
231 |
+
|
232 |
+
#~ msgid "You do not have the selected post types!"
|
233 |
+
#~ msgstr "Вы не выбрали еще ни одного типа записей!"
|
234 |
+
|
235 |
+
#~ msgid "No comments available for deletion."
|
236 |
+
#~ msgstr "Нет комментариев для удаления."
|
237 |
+
|
238 |
+
#~ msgid ""
|
239 |
+
#~ "Are you sure that you desire to delete all comments from the database?"
|
240 |
+
#~ msgstr "Вы уверены, что хотите удалить все комментарии из базы данных?"
|
241 |
+
|
242 |
+
#~ msgid ""
|
243 |
+
#~ "Deleting comments will remove existing comment entries in the database "
|
244 |
+
#~ "and cannot be reverted without a database backup."
|
245 |
+
#~ msgstr ""
|
246 |
+
#~ "При удалении комментариев удаляются существующие записи комментариев в "
|
247 |
+
#~ "базе данных, они не могут быть восстановлены без резервного копирования "
|
248 |
+
#~ "базы данных."
|
249 |
+
|
250 |
+
#~ msgid "You have %s comments"
|
251 |
+
#~ msgstr "У вас есть %s комментариев"
|
252 |
+
|
253 |
+
#~ msgid "Yes, I'm sure"
|
254 |
+
#~ msgstr "Да, я уверен"
|
255 |
+
|
256 |
+
#~ msgid "No, return back"
|
257 |
+
#~ msgstr "Нет, вернуться"
|
258 |
+
|
259 |
+
#~ msgid ""
|
260 |
+
#~ "Are you sure that you desire to delete all comments from the database for "
|
261 |
+
#~ "the selected post types (%s)?"
|
262 |
+
#~ msgstr ""
|
263 |
+
#~ "Вы уверены, что хотите удалить все комментарии из базы данных для "
|
264 |
+
#~ "выбранных типов записей (%s)?"
|
265 |
+
|
266 |
+
#~ msgid "Disable comments"
|
267 |
+
#~ msgstr "Отключить комментарии"
|
268 |
+
|
269 |
+
#~ msgid "Not disable"
|
270 |
+
#~ msgstr "Не отключать"
|
271 |
+
|
272 |
+
#~ msgid "Everywhere"
|
273 |
+
#~ msgstr "Повсюду"
|
274 |
+
|
275 |
+
#~ msgid ""
|
276 |
+
#~ "You can delete all comments in the database by clicking on this link (<a "
|
277 |
+
#~ "href=\"%s\">cleaning comments in database</a>)."
|
278 |
+
#~ msgstr ""
|
279 |
+
#~ "Вы можете удалить все комментарии в базе данных, нажав на эту ссылку ( <a "
|
280 |
+
#~ "href=\"%s\">очистка комментариев в базе данных</a> )."
|
281 |
+
|
282 |
+
#~ msgid "On certain post types"
|
283 |
+
#~ msgstr "Только выбранные типы записей"
|
284 |
+
|
285 |
+
#~ msgid ""
|
286 |
+
#~ "You can delete all comments for the selected post types. Select the post "
|
287 |
+
#~ "types below and save the settings. After that, click the link (<a href="
|
288 |
+
#~ "\"%s\">delete all comments for the selected post types in database</a>)."
|
289 |
+
#~ msgstr ""
|
290 |
+
#~ "Вы можете удалить все комментарии для выбранных типов записей. Выберите "
|
291 |
+
#~ "типы записей ниже и сохраните настройки. После этого нажмите ссылку ( <a "
|
292 |
+
#~ "href=\"%s\">удалите все комментарии для выбранных типов записей в базе "
|
293 |
+
#~ "данных</a> )."
|
294 |
+
|
295 |
+
#~ msgid ""
|
296 |
+
#~ "Everywhere - Warning: This option is global and will affect your entire "
|
297 |
+
#~ "site. Use it only if you want to disable comments everywhere. A complete "
|
298 |
+
#~ "description of what this option does is available here"
|
299 |
+
#~ msgstr ""
|
300 |
+
#~ "Повсюду - предупреждение: этот параметр является глобальным и повлияет на "
|
301 |
+
#~ "весь ваш сайт. Используйте его только в том случае, если вы хотите "
|
302 |
+
#~ "отключить комментарии повсюду. "
|
303 |
+
|
304 |
+
#~ msgid ""
|
305 |
+
#~ "On certain post types - Disabling comments will also disable trackbacks "
|
306 |
+
#~ "and pingbacks. All comment-related fields will also be hidden from the "
|
307 |
+
#~ "edit/quick-edit screens of the affected posts. These settings cannot be "
|
308 |
+
#~ "overridden for individual posts."
|
309 |
+
#~ msgstr ""
|
310 |
+
#~ "В некоторых типах сообщений - отключение комментариев также отключает "
|
311 |
+
#~ "трекбэки и pingback. Все поля, связанные с комментариями, также будут "
|
312 |
+
#~ "скрыты от экранов редактирования / быстрого редактирования затронутых "
|
313 |
+
#~ "сообщений. Эти настройки нельзя переопределять для отдельных сообщений."
|
314 |
+
|
315 |
+
#~ msgid "Select the post types for which comments will be disabled"
|
316 |
+
#~ msgstr "Выберите типы записей, для которых комментарии будут отключены."
|
317 |
+
|
318 |
+
#~ msgid ""
|
319 |
+
#~ "Tired of spam in the comments? Do visitors leave \"blank\" comments for "
|
320 |
+
#~ "the sake of a link to their site?"
|
321 |
+
#~ msgstr ""
|
322 |
+
#~ "Надоел спам в комментариях? Посетители оставляют «пустые» комментарии "
|
323 |
+
#~ "ради ссылки на свой сайт?"
|
324 |
+
|
325 |
+
#~ msgid "Removes the \"Site\" field from the comment form."
|
326 |
+
#~ msgstr "Убирает поле «Сайт» из формы комментирования."
|
327 |
+
|
328 |
+
#~ msgid ""
|
329 |
+
#~ "Works with the standard comment form, if the form is manually written in "
|
330 |
+
#~ "your theme-it probably will not work!"
|
331 |
+
#~ msgstr ""
|
332 |
+
#~ "Работает со стандартной формой комментирования, если в Вашей теме форма "
|
333 |
+
#~ "прописана вручную - скорей всего не сработает!"
|
334 |
+
|
335 |
+
#~ msgid "Recommended"
|
336 |
+
#~ msgstr "Рекомендовано"
|
337 |
+
|
338 |
+
#~ msgid ""
|
339 |
+
#~ "Superfluous external links from comments, which can be typed from a dozen "
|
340 |
+
#~ "and more for one article, do not bring anything good for promotion."
|
341 |
+
#~ msgstr ""
|
342 |
+
#~ "Внешние ссылки в комментариях, которых может быть десятки или больше на "
|
343 |
+
#~ "одной странице, могут ухудшить продвижение вашего сайта."
|
344 |
+
|
345 |
+
#~ msgid "Replaces the links of this kind of %s, on links of this kind %s"
|
346 |
+
#~ msgstr ""
|
347 |
+
#~ "Заменяет ссылки %s, на span тег и устанавливает переход с помощью "
|
348 |
+
#~ "JavaScript %s"
|
349 |
+
|
350 |
+
#~ msgid ""
|
351 |
+
#~ "Up to 90 percent of comments in the blog can be left for the sake of an "
|
352 |
+
#~ "external link. Even nofollow from page weight loss here does not help."
|
353 |
+
#~ msgstr ""
|
354 |
+
#~ "До 90 процентов комментариев в блоге оставляют ради внешней ссылки. Не "
|
355 |
+
#~ "поможет даже nofollow от потери веса страницы."
|
356 |
+
|
357 |
+
#~ msgid ""
|
358 |
+
#~ "Replaces the links of the authors of comments on the JavaScript code, it "
|
359 |
+
#~ "is impossible to distinguish it from usual links."
|
360 |
+
#~ msgstr ""
|
361 |
+
#~ "Заменяет ссылки авторов комментариев на JavaScript код, его невозможно "
|
362 |
+
#~ "отличить от обычной ссылки."
|
363 |
+
|
364 |
+
#~ msgid "In some Wordpress topics this may not work."
|
365 |
+
#~ msgstr "В некоторых темах Wordpress это может не сработать."
|
366 |
+
|
367 |
+
#~ msgid "Disable XML-RPC"
|
368 |
+
#~ msgstr "Отключить XML-RPC"
|
369 |
+
|
370 |
+
#~ msgid ""
|
371 |
+
#~ "A pingback is basically an automated comment that gets created when "
|
372 |
+
#~ "another blog links to you. A self-pingback is created when you link to an "
|
373 |
+
#~ "article within your own blog. Pingbacks are essentially nothing more than "
|
374 |
+
#~ "spam and simply waste resources."
|
375 |
+
#~ msgstr ""
|
376 |
+
#~ "Pingback по-существу автоматизированных комментарий, который создается, "
|
377 |
+
#~ "когда другой блог ссылается на вас. Self-pingback создается, когда вы "
|
378 |
+
#~ "оставили ссылку на статью в своем блоге. Pingbacks по существу являются "
|
379 |
+
#~ "не более чем спам и пустая трата ресурсов вашего сайта."
|
380 |
+
|
381 |
+
#~ msgid "Removes the server responses a reference to the xmlrpc file."
|
382 |
+
#~ msgstr "Удаляет ссылку на xmlrpc-файл и ответ сервера."
|
383 |
+
|
384 |
+
#~ msgid ""
|
385 |
+
#~ "We found that you have the \"Clearfy - disable unused features\" plugin "
|
386 |
+
#~ "installed, this plugin already has disable comments functions, so you can "
|
387 |
+
#~ "deactivate plugin \"Comments tweaks\"!"
|
388 |
+
#~ msgstr ""
|
389 |
+
#~ "Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
|
390 |
+
#~ "неиспользуемые функции», этот плагин уже имеет функции отключения "
|
391 |
+
#~ "комментариев, поэтому вы можете отключить плагин «Инструменты "
|
392 |
+
#~ "комментариев»!"
|
393 |
+
|
394 |
+
#~ msgid "Webcraftic comments tweaks"
|
395 |
+
#~ msgstr "Webcraftic инструменты комментариев"
|
396 |
+
|
397 |
+
#~ msgid "Comments are closed."
|
398 |
+
#~ msgstr "Комментарии Закрыты."
|
399 |
+
|
400 |
+
#~ msgid ""
|
401 |
+
#~ "Note: The <em>%s</em> plugin is currently active, and comments are "
|
402 |
+
#~ "completely disabled on: %s. Many of the settings below will not be "
|
403 |
+
#~ "applicable for those post types."
|
404 |
+
#~ msgstr ""
|
405 |
+
#~ "Примечание. Плагин <em>%s</em> в настоящий момент активен, и комментарии "
|
406 |
+
#~ "полностью отключены: %s. Многие из приведенных ниже настроек не будут "
|
407 |
+
#~ "применяться для этих типов сообщений."
|
408 |
+
|
409 |
+
#~ msgid ""
|
410 |
+
#~ "We found that you have the \"Clearfy - disable unused features\" plugin "
|
411 |
+
#~ "installed, this plugin already has disable comments functions, so you can "
|
412 |
+
#~ "deactivate plugin \"Disable comments\"!"
|
413 |
+
#~ msgstr ""
|
414 |
+
#~ "Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
|
415 |
+
#~ "неиспользуемые функции», этот плагин уже имеет функции отключения "
|
416 |
+
#~ "комментариев, поэтому вы можете отключить плагин «Отключить комментарии»!"
|
417 |
+
|
418 |
+
#~ msgid "Webcraftic Disable comments"
|
419 |
+
#~ msgstr "Webcraftic отключить комментарии"
|
languages/hide-admin-notices-ru_RU.mo
DELETED
Binary file
|
languages/hide-admin-notices-ru_RU.po
DELETED
@@ -1,381 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: clearfy\n"
|
4 |
-
"POT-Creation-Date: 2018-01-17 10:28+0300\n"
|
5 |
-
"PO-Revision-Date: 2018-01-17 11:23+0300\n"
|
6 |
-
"Last-Translator: alex.kovalevv@gmail.com <alex.kovalevv@gmail.com>\n"
|
7 |
-
"Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
|
8 |
-
"Language: ru_RU\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.8.8\n"
|
13 |
-
"X-Poedit-Basepath: ..\n"
|
14 |
-
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
15 |
-
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
16 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
|
18 |
-
"X-Poedit-SearchPath-0: .\n"
|
19 |
-
"X-Poedit-SearchPathExcluded-0: libs\n"
|
20 |
-
|
21 |
-
#: admin/ajax/hide-notice.php:16
|
22 |
-
msgid "You don't have enough capability to edit this information."
|
23 |
-
msgstr "Вы не имеете разрешения на редактирование этого!"
|
24 |
-
|
25 |
-
#: admin/ajax/hide-notice.php:33
|
26 |
-
msgid "Undefinded notice id."
|
27 |
-
msgstr "Не передан notice id."
|
28 |
-
|
29 |
-
#: admin/ajax/hide-notice.php:47
|
30 |
-
msgid "Success"
|
31 |
-
msgstr "Успешно"
|
32 |
-
|
33 |
-
#: admin/boot.php:23
|
34 |
-
msgid "Disable comments on the entire site"
|
35 |
-
msgstr "Отключить комментарии на всем сайте"
|
36 |
-
|
37 |
-
#: admin/boot.php:29
|
38 |
-
msgid "Select post types"
|
39 |
-
msgstr "Выбрать тип записи"
|
40 |
-
|
41 |
-
#: admin/boot.php:34
|
42 |
-
msgid "Replace external links in comments on the JavaScript code"
|
43 |
-
msgstr "Заменить внешние ссылки в комментариях на JavaScript код"
|
44 |
-
|
45 |
-
#: admin/boot.php:39
|
46 |
-
msgid "Replace external links from comment authors on the JavaScript code"
|
47 |
-
msgstr "Заменить внешние ссылки от авторов комментариев на код JavaScript"
|
48 |
-
|
49 |
-
#: admin/boot.php:44
|
50 |
-
msgid "Disable X-Pingback"
|
51 |
-
msgstr "Убрать ссылку на X-Pingback и возможность спамить pingback-ами"
|
52 |
-
|
53 |
-
#: admin/boot.php:49
|
54 |
-
msgid "Remove field \"site\" in comment form"
|
55 |
-
msgstr "Удаляет поле \"Сайт\" в форме комментариев"
|
56 |
-
|
57 |
-
#: admin/boot.php:61
|
58 |
-
msgid "Disable all comments"
|
59 |
-
msgstr "Отключить все комментарии"
|
60 |
-
|
61 |
-
#: admin/boot.php:73
|
62 |
-
msgid "Get ultimate plugin free"
|
63 |
-
msgstr "Получите полную версию плагина бесплатно"
|
64 |
-
|
65 |
-
#: admin/pages/notices.php:24 admin/pages/notices.php:92
|
66 |
-
msgid "Hide admin notices"
|
67 |
-
msgstr "Скрыть уведомления"
|
68 |
-
|
69 |
-
#: admin/pages/notices.php:40
|
70 |
-
msgid "Comments"
|
71 |
-
msgstr "Комментарии"
|
72 |
-
|
73 |
-
#: admin/pages/notices.php:41
|
74 |
-
msgid "General"
|
75 |
-
msgstr "Основные"
|
76 |
-
|
77 |
-
#: admin/pages/notices.php:56
|
78 |
-
msgid "Hidden notices are successfully reset, now you can see them again!"
|
79 |
-
msgstr ""
|
80 |
-
"Скрытые уведомления успешно восстановлены, теперь вы можете снова видеть их!"
|
81 |
-
|
82 |
-
#: admin/pages/notices.php:96
|
83 |
-
msgid "All notices"
|
84 |
-
msgstr "Все уведомления"
|
85 |
-
|
86 |
-
#: admin/pages/notices.php:97
|
87 |
-
msgid "Hide all notices globally."
|
88 |
-
msgstr "Скрыть все уведомления глобально."
|
89 |
-
|
90 |
-
#: admin/pages/notices.php:101
|
91 |
-
msgid "Only selected"
|
92 |
-
msgstr "Только выбранные"
|
93 |
-
|
94 |
-
#: admin/pages/notices.php:102
|
95 |
-
#, php-format
|
96 |
-
msgid ""
|
97 |
-
"Hide selected notices only. You will see the link \"Hide notification forever"
|
98 |
-
"\" in each notice. Push it and they will not bother you anymore. Push <a "
|
99 |
-
"href=\"%s\">reset hidden notices (%d)</a> if you need to show hidden notices "
|
100 |
-
"again."
|
101 |
-
msgstr ""
|
102 |
-
"Скрывать только выбранные уведомления. В каждом уведомлении вы увидите "
|
103 |
-
"ссылку \"Скрыть уведомление навсегда\". Нажмите на неё и уведомление будет "
|
104 |
-
"скрыто навсегда и перестанет вас беспокоить. Нажмите <a href=\"%s\">сбросить "
|
105 |
-
"скрытые уведомления (%d)</a>, если вам нужно восстановить показ скрытых "
|
106 |
-
"ранее уведомлений."
|
107 |
-
|
108 |
-
#: admin/pages/notices.php:106
|
109 |
-
msgid "Don't nide"
|
110 |
-
msgstr "Не скрывать"
|
111 |
-
|
112 |
-
#: admin/pages/notices.php:107
|
113 |
-
msgid ""
|
114 |
-
"Do not hide notices and do not show “Hide notification forever” link for "
|
115 |
-
"admin."
|
116 |
-
msgstr ""
|
117 |
-
"Не скрывать уведомления и не показывать ссылку \"Скрыть уведомление навсегда"
|
118 |
-
"\" в уведомлениях администратора."
|
119 |
-
|
120 |
-
#: admin/pages/notices.php:111
|
121 |
-
msgid ""
|
122 |
-
"Some plugins shows notifications about premium version, data collecting or "
|
123 |
-
"promote their services. Even if you push close button (that sometimes are "
|
124 |
-
"impossible), notices are shows again in some time. This option allows you to "
|
125 |
-
"control notices. Hide them all or each individually. Some plugins shows "
|
126 |
-
"notifications about premium version, data collecting or promote their "
|
127 |
-
"services. Even if you push close button (that sometimes are impossible), "
|
128 |
-
"notices are shows again in some time. This option allows you to control "
|
129 |
-
"notices. Hide them all or each individually."
|
130 |
-
msgstr ""
|
131 |
-
"Зачастую, плагины отображают уведомления о возможности перехода на премиум "
|
132 |
-
"версию, просят разрешение на сбор данных, рекламируют свои услуги. Даже если "
|
133 |
-
"вы нажмете кнопку закрыть (что не всегда возможно), уведомления всё равно "
|
134 |
-
"отобразятся через какое-то время. С помощью этой настройки, вы можете "
|
135 |
-
"контролировать эти уведомления. Скройте их все сразу или каждое по "
|
136 |
-
"отдельности."
|
137 |
-
|
138 |
-
#: admin/pages/notices.php:130
|
139 |
-
msgid "Enable hidden notices in adminbar"
|
140 |
-
msgstr "Включить уведомления в админбаре"
|
141 |
-
|
142 |
-
#: admin/pages/notices.php:132
|
143 |
-
msgid ""
|
144 |
-
"By default, the plugin hides all notices, which you specified. If you enable "
|
145 |
-
"this option, the plugin will collect all hidden notices and show them into "
|
146 |
-
"the top admin toolbar. It will not disturb you but will allow to look "
|
147 |
-
"notices at your convenience."
|
148 |
-
msgstr ""
|
149 |
-
"По умолчанию, плагин полностью скрывает отключенные вами уведомления. Если "
|
150 |
-
"включить эту опцию, то плагин будет собирать все скрытые вами уведомления и "
|
151 |
-
"выводить в верхней панели администратора. Это не будет вас раздражать, но и "
|
152 |
-
"позволит просматривать уведомления, когда вам это удобно."
|
153 |
-
|
154 |
-
#: disable-admin-notices.php:17
|
155 |
-
msgid ""
|
156 |
-
"We found that you have the \"Clearfy - disable unused features\" plugin "
|
157 |
-
"installed, this plugin already has disable comments functions, so you can "
|
158 |
-
"deactivate plugin \"Disable admin notices\"!"
|
159 |
-
msgstr ""
|
160 |
-
"Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
|
161 |
-
"неиспользуемые функции», этот плагин уже имеет функции отключения "
|
162 |
-
"комментариев, поэтому вы можете отключить плагин «Скрыть уведомления "
|
163 |
-
"администратора»!"
|
164 |
-
|
165 |
-
#: disable-admin-notices.php:82
|
166 |
-
msgid "Webcraftic hide admin notices"
|
167 |
-
msgstr "Webcraftic скрыть уведомления администратора"
|
168 |
-
|
169 |
-
#: includes/classes/class.configurate-notices.php:52
|
170 |
-
#, php-format
|
171 |
-
msgid "Notifications %s"
|
172 |
-
msgstr "Уведомления %s"
|
173 |
-
|
174 |
-
#: includes/classes/class.configurate-notices.php:215
|
175 |
-
msgid "Hide notification forever"
|
176 |
-
msgstr "Скрыть уведомление навсегда"
|
177 |
-
|
178 |
-
#~ msgid "Comments tweaks"
|
179 |
-
#~ msgstr "Инструменты комментариев"
|
180 |
-
|
181 |
-
#~ msgid "All comments have been deleted."
|
182 |
-
#~ msgstr "Все комментарии были удалены."
|
183 |
-
|
184 |
-
#~ msgid ""
|
185 |
-
#~ "An error occurred while trying to delete comments. Internal error "
|
186 |
-
#~ "occured. Please try again later."
|
187 |
-
#~ msgstr ""
|
188 |
-
#~ "При попытке удалить комментарии произошла ошибка. Пожалуйста, повторите "
|
189 |
-
#~ "попытку позже."
|
190 |
-
|
191 |
-
#~ msgid "You are not allowed to view this page."
|
192 |
-
#~ msgstr "Вам не разрешено просматривать эту страницу."
|
193 |
-
|
194 |
-
#~ msgid "You do not have the selected post types!"
|
195 |
-
#~ msgstr "Вы не выбрали еще ни одного типа записей!"
|
196 |
-
|
197 |
-
#~ msgid "No comments available for deletion."
|
198 |
-
#~ msgstr "Нет комментариев для удаления."
|
199 |
-
|
200 |
-
#~ msgid ""
|
201 |
-
#~ "Are you sure that you desire to delete all comments from the database?"
|
202 |
-
#~ msgstr "Вы уверены, что хотите удалить все комментарии из базы данных?"
|
203 |
-
|
204 |
-
#~ msgid ""
|
205 |
-
#~ "Deleting comments will remove existing comment entries in the database "
|
206 |
-
#~ "and cannot be reverted without a database backup."
|
207 |
-
#~ msgstr ""
|
208 |
-
#~ "При удалении комментариев удаляются существующие записи комментариев в "
|
209 |
-
#~ "базе данных, они не могут быть восстановлены без резервного копирования "
|
210 |
-
#~ "базы данных."
|
211 |
-
|
212 |
-
#~ msgid "You have %s comments"
|
213 |
-
#~ msgstr "У вас есть %s комментариев"
|
214 |
-
|
215 |
-
#~ msgid "Yes, I'm sure"
|
216 |
-
#~ msgstr "Да, я уверен"
|
217 |
-
|
218 |
-
#~ msgid "No, return back"
|
219 |
-
#~ msgstr "Нет, вернуться"
|
220 |
-
|
221 |
-
#~ msgid ""
|
222 |
-
#~ "Are you sure that you desire to delete all comments from the database for "
|
223 |
-
#~ "the selected post types (%s)?"
|
224 |
-
#~ msgstr ""
|
225 |
-
#~ "Вы уверены, что хотите удалить все комментарии из базы данных для "
|
226 |
-
#~ "выбранных типов записей (%s)?"
|
227 |
-
|
228 |
-
#~ msgid "Disable comments"
|
229 |
-
#~ msgstr "Отключить комментарии"
|
230 |
-
|
231 |
-
#~ msgid "Not disable"
|
232 |
-
#~ msgstr "Не отключать"
|
233 |
-
|
234 |
-
#~ msgid "Everywhere"
|
235 |
-
#~ msgstr "Повсюду"
|
236 |
-
|
237 |
-
#~ msgid ""
|
238 |
-
#~ "You can delete all comments in the database by clicking on this link (<a "
|
239 |
-
#~ "href=\"%s\">cleaning comments in database</a>)."
|
240 |
-
#~ msgstr ""
|
241 |
-
#~ "Вы можете удалить все комментарии в базе данных, нажав на эту ссылку ( <a "
|
242 |
-
#~ "href=\"%s\">очистка комментариев в базе данных</a> )."
|
243 |
-
|
244 |
-
#~ msgid "On certain post types"
|
245 |
-
#~ msgstr "Только выбранные типы записей"
|
246 |
-
|
247 |
-
#~ msgid ""
|
248 |
-
#~ "You can delete all comments for the selected post types. Select the post "
|
249 |
-
#~ "types below and save the settings. After that, click the link (<a href="
|
250 |
-
#~ "\"%s\">delete all comments for the selected post types in database</a>)."
|
251 |
-
#~ msgstr ""
|
252 |
-
#~ "Вы можете удалить все комментарии для выбранных типов записей. Выберите "
|
253 |
-
#~ "типы записей ниже и сохраните настройки. После этого нажмите ссылку ( <a "
|
254 |
-
#~ "href=\"%s\">удалите все комментарии для выбранных типов записей в базе "
|
255 |
-
#~ "данных</a> )."
|
256 |
-
|
257 |
-
#~ msgid ""
|
258 |
-
#~ "Everywhere - Warning: This option is global and will affect your entire "
|
259 |
-
#~ "site. Use it only if you want to disable comments everywhere. A complete "
|
260 |
-
#~ "description of what this option does is available here"
|
261 |
-
#~ msgstr ""
|
262 |
-
#~ "Повсюду - предупреждение: этот параметр является глобальным и повлияет на "
|
263 |
-
#~ "весь ваш сайт. Используйте его только в том случае, если вы хотите "
|
264 |
-
#~ "отключить комментарии повсюду. "
|
265 |
-
|
266 |
-
#~ msgid ""
|
267 |
-
#~ "On certain post types - Disabling comments will also disable trackbacks "
|
268 |
-
#~ "and pingbacks. All comment-related fields will also be hidden from the "
|
269 |
-
#~ "edit/quick-edit screens of the affected posts. These settings cannot be "
|
270 |
-
#~ "overridden for individual posts."
|
271 |
-
#~ msgstr ""
|
272 |
-
#~ "В некоторых типах сообщений - отключение комментариев также отключает "
|
273 |
-
#~ "трекбэки и pingback. Все поля, связанные с комментариями, также будут "
|
274 |
-
#~ "скрыты от экранов редактирования / быстрого редактирования затронутых "
|
275 |
-
#~ "сообщений. Эти настройки нельзя переопределять для отдельных сообщений."
|
276 |
-
|
277 |
-
#~ msgid "Select the post types for which comments will be disabled"
|
278 |
-
#~ msgstr "Выберите типы записей, для которых комментарии будут отключены."
|
279 |
-
|
280 |
-
#~ msgid ""
|
281 |
-
#~ "Tired of spam in the comments? Do visitors leave \"blank\" comments for "
|
282 |
-
#~ "the sake of a link to their site?"
|
283 |
-
#~ msgstr ""
|
284 |
-
#~ "Надоел спам в комментариях? Посетители оставляют «пустые» комментарии "
|
285 |
-
#~ "ради ссылки на свой сайт?"
|
286 |
-
|
287 |
-
#~ msgid "Removes the \"Site\" field from the comment form."
|
288 |
-
#~ msgstr "Убирает поле «Сайт» из формы комментирования."
|
289 |
-
|
290 |
-
#~ msgid ""
|
291 |
-
#~ "Works with the standard comment form, if the form is manually written in "
|
292 |
-
#~ "your theme-it probably will not work!"
|
293 |
-
#~ msgstr ""
|
294 |
-
#~ "Работает со стандартной формой комментирования, если в Вашей теме форма "
|
295 |
-
#~ "прописана вручную - скорей всего не сработает!"
|
296 |
-
|
297 |
-
#~ msgid "Recommended"
|
298 |
-
#~ msgstr "Рекомендовано"
|
299 |
-
|
300 |
-
#~ msgid ""
|
301 |
-
#~ "Superfluous external links from comments, which can be typed from a dozen "
|
302 |
-
#~ "and more for one article, do not bring anything good for promotion."
|
303 |
-
#~ msgstr ""
|
304 |
-
#~ "Внешние ссылки в комментариях, которых может быть десятки или больше на "
|
305 |
-
#~ "одной странице, могут ухудшить продвижение вашего сайта."
|
306 |
-
|
307 |
-
#~ msgid "Replaces the links of this kind of %s, on links of this kind %s"
|
308 |
-
#~ msgstr ""
|
309 |
-
#~ "Заменяет ссылки %s, на span тег и устанавливает переход с помощью "
|
310 |
-
#~ "JavaScript %s"
|
311 |
-
|
312 |
-
#~ msgid ""
|
313 |
-
#~ "Up to 90 percent of comments in the blog can be left for the sake of an "
|
314 |
-
#~ "external link. Even nofollow from page weight loss here does not help."
|
315 |
-
#~ msgstr ""
|
316 |
-
#~ "До 90 процентов комментариев в блоге оставляют ради внешней ссылки. Не "
|
317 |
-
#~ "поможет даже nofollow от потери веса страницы."
|
318 |
-
|
319 |
-
#~ msgid ""
|
320 |
-
#~ "Replaces the links of the authors of comments on the JavaScript code, it "
|
321 |
-
#~ "is impossible to distinguish it from usual links."
|
322 |
-
#~ msgstr ""
|
323 |
-
#~ "Заменяет ссылки авторов комментариев на JavaScript код, его невозможно "
|
324 |
-
#~ "отличить от обычной ссылки."
|
325 |
-
|
326 |
-
#~ msgid "In some Wordpress topics this may not work."
|
327 |
-
#~ msgstr "В некоторых темах Wordpress это может не сработать."
|
328 |
-
|
329 |
-
#~ msgid "Disable XML-RPC"
|
330 |
-
#~ msgstr "Отключить XML-RPC"
|
331 |
-
|
332 |
-
#~ msgid ""
|
333 |
-
#~ "A pingback is basically an automated comment that gets created when "
|
334 |
-
#~ "another blog links to you. A self-pingback is created when you link to an "
|
335 |
-
#~ "article within your own blog. Pingbacks are essentially nothing more than "
|
336 |
-
#~ "spam and simply waste resources."
|
337 |
-
#~ msgstr ""
|
338 |
-
#~ "Pingback по-существу автоматизированных комментарий, который создается, "
|
339 |
-
#~ "когда другой блог ссылается на вас. Self-pingback создается, когда вы "
|
340 |
-
#~ "оставили ссылку на статью в своем блоге. Pingbacks по существу являются "
|
341 |
-
#~ "не более чем спам и пустая трата ресурсов вашего сайта."
|
342 |
-
|
343 |
-
#~ msgid "Removes the server responses a reference to the xmlrpc file."
|
344 |
-
#~ msgstr "Удаляет ссылку на xmlrpc-файл и ответ сервера."
|
345 |
-
|
346 |
-
#~ msgid ""
|
347 |
-
#~ "We found that you have the \"Clearfy - disable unused features\" plugin "
|
348 |
-
#~ "installed, this plugin already has disable comments functions, so you can "
|
349 |
-
#~ "deactivate plugin \"Comments tweaks\"!"
|
350 |
-
#~ msgstr ""
|
351 |
-
#~ "Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
|
352 |
-
#~ "неиспользуемые функции», этот плагин уже имеет функции отключения "
|
353 |
-
#~ "комментариев, поэтому вы можете отключить плагин «Инструменты "
|
354 |
-
#~ "комментариев»!"
|
355 |
-
|
356 |
-
#~ msgid "Webcraftic comments tweaks"
|
357 |
-
#~ msgstr "Webcraftic инструменты комментариев"
|
358 |
-
|
359 |
-
#~ msgid "Comments are closed."
|
360 |
-
#~ msgstr "Комментарии Закрыты."
|
361 |
-
|
362 |
-
#~ msgid ""
|
363 |
-
#~ "Note: The <em>%s</em> plugin is currently active, and comments are "
|
364 |
-
#~ "completely disabled on: %s. Many of the settings below will not be "
|
365 |
-
#~ "applicable for those post types."
|
366 |
-
#~ msgstr ""
|
367 |
-
#~ "Примечание. Плагин <em>%s</em> в настоящий момент активен, и комментарии "
|
368 |
-
#~ "полностью отключены: %s. Многие из приведенных ниже настроек не будут "
|
369 |
-
#~ "применяться для этих типов сообщений."
|
370 |
-
|
371 |
-
#~ msgid ""
|
372 |
-
#~ "We found that you have the \"Clearfy - disable unused features\" plugin "
|
373 |
-
#~ "installed, this plugin already has disable comments functions, so you can "
|
374 |
-
#~ "deactivate plugin \"Disable comments\"!"
|
375 |
-
#~ msgstr ""
|
376 |
-
#~ "Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
|
377 |
-
#~ "неиспользуемые функции», этот плагин уже имеет функции отключения "
|
378 |
-
#~ "комментариев, поэтому вы можете отключить плагин «Отключить комментарии»!"
|
379 |
-
|
380 |
-
#~ msgid "Webcraftic Disable comments"
|
381 |
-
#~ msgstr "Webcraftic отключить комментарии"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.accordion.css
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Light Weight jQuery Accordions
|
3 |
-
*/
|
4 |
-
|
5 |
-
.factory-bootstrap-330 .factory-accordion {
|
6 |
-
margin: 0 0 30px;
|
7 |
-
border-top: 1px solid #DDD;
|
8 |
-
border-right: 1px solid #DDD;
|
9 |
-
border-left: 1px solid #DDD;
|
10 |
-
-webkit-border-radius: 4px;
|
11 |
-
-moz-border-radius: 4px;
|
12 |
-
border-radius: 4px;
|
13 |
-
}
|
14 |
-
.factory-bootstrap-330 .factory-accordion > h3 {
|
15 |
-
border-bottom: 1px solid #DDD;
|
16 |
-
cursor: pointer;
|
17 |
-
padding: 8px 15px;
|
18 |
-
margin: 0;
|
19 |
-
}
|
20 |
-
.factory-bootstrap-330 .factory-accordion > div {
|
21 |
-
display: none;
|
22 |
-
margin:0;
|
23 |
-
border-bottom: 1px solid #DDD;
|
24 |
-
}
|
25 |
-
.factory-bootstrap-330 .factory-accordion-item {
|
26 |
-
display: none;
|
27 |
-
}
|
28 |
-
.factory-bootstrap-330 .inner-factory-accordion-item {
|
29 |
-
padding: 10px 0;
|
30 |
-
}
|
31 |
-
.factory-bootstrap-330 .factory-accordion > h3.active:hover {
|
32 |
-
cursor: default;
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.blue.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .btn-primary {
|
2 |
-
background: #e1a948;
|
3 |
-
border-color: #d39323;
|
4 |
-
color: white;
|
5 |
-
-webkit-box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15);
|
6 |
-
box-shadow: inset 0 1px 0 #ecc88a, 0 1px 0 rgba(0, 0, 0, 0.15);
|
7 |
-
}
|
8 |
-
.factory-bootstrap-330 .btn-primary:hover,
|
9 |
-
.factory-bootstrap-330 .btn-primary:focus {
|
10 |
-
background: #db9825;
|
11 |
-
border-color: #bd831f;
|
12 |
-
color: white;
|
13 |
-
-webkit-box-shadow: inset 0 1px 0 #e8be74, 0 1px 0 rgba(0, 0, 0, 0.15);
|
14 |
-
box-shadow: inset 0 1px 0 #e8be74, 0 1px 0 rgba(0, 0, 0, 0.15);
|
15 |
-
}
|
16 |
-
.factory-bootstrap-330 .btn-primary:active {
|
17 |
-
background: #db9825;
|
18 |
-
border-color: #bd831f;
|
19 |
-
color: white;
|
20 |
-
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
21 |
-
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
22 |
-
}
|
23 |
-
.factory-bootstrap-330 .btn-primary[disabled],
|
24 |
-
.factory-bootstrap-330 .btn-primary:disabled {
|
25 |
-
color: #d1cdc7 !important;
|
26 |
-
background: #db9825 !important;
|
27 |
-
border-color: #bd831f !important;
|
28 |
-
text-shadow: none !important;
|
29 |
-
}
|
30 |
-
|
31 |
-
.factory-bootstrap-330 .btn-group .btn.active.value {
|
32 |
-
background-color: #e1a948;
|
33 |
-
-webkit-box-shadow: inset 0 1px 2px #d39323;
|
34 |
-
box-shadow: inset 0 1px 2px #d39323;
|
35 |
-
border-top: 1px solid #d39323;
|
36 |
-
border-bottom: 1px solid #d39323;
|
37 |
-
border-left: 1px solid #d39323;
|
38 |
-
}
|
39 |
-
|
40 |
-
.factory-bootstrap-330 .pagination > .active > a,
|
41 |
-
.factory-bootstrap-330 .pagination > .active > span,
|
42 |
-
.factory-bootstrap-330 .pagination > .active > a:hover,
|
43 |
-
.factory-bootstrap-330 .pagination > .active > span:hover,
|
44 |
-
.factory-bootstrap-330 .pagination > .active > a:focus,
|
45 |
-
.factory-bootstrap-330 .pagination > .active > span:focus {
|
46 |
-
background-color: #e1a948;
|
47 |
-
border-color: #d39323;
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.coffee.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .btn-primary {
|
2 |
-
background: #c7a589;
|
3 |
-
border-color: #b78a66;
|
4 |
-
color: white;
|
5 |
-
-webkit-box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15);
|
6 |
-
box-shadow: inset 0 1px 0 #e0cdbd, 0 1px 0 rgba(0, 0, 0, 0.15);
|
7 |
-
}
|
8 |
-
.factory-bootstrap-330 .btn-primary:hover,
|
9 |
-
.factory-bootstrap-330 .btn-primary:focus {
|
10 |
-
background: #ba906d;
|
11 |
-
border-color: #ae7d55;
|
12 |
-
color: white;
|
13 |
-
-webkit-box-shadow: inset 0 1px 0 #d7bfac, 0 1px 0 rgba(0, 0, 0, 0.15);
|
14 |
-
box-shadow: inset 0 1px 0 #d7bfac, 0 1px 0 rgba(0, 0, 0, 0.15);
|
15 |
-
}
|
16 |
-
.factory-bootstrap-330 .btn-primary:active {
|
17 |
-
background: #ba906d;
|
18 |
-
border-color: #ae7d55;
|
19 |
-
color: white;
|
20 |
-
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
21 |
-
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
22 |
-
}
|
23 |
-
.factory-bootstrap-330 .btn-primary[disabled],
|
24 |
-
.factory-bootstrap-330 .btn-primary:disabled {
|
25 |
-
color: #d1cbc7 !important;
|
26 |
-
background: #ba906d !important;
|
27 |
-
border-color: #ae7d55 !important;
|
28 |
-
text-shadow: none !important;
|
29 |
-
}
|
30 |
-
|
31 |
-
.factory-bootstrap-330 .btn-group .btn.active.value {
|
32 |
-
background-color: #c7a589;
|
33 |
-
-webkit-box-shadow: inset 0 1px 2px #b78a66;
|
34 |
-
box-shadow: inset 0 1px 2px #b78a66;
|
35 |
-
border-top: 1px solid #b78a66;
|
36 |
-
border-bottom: 1px solid #b78a66;
|
37 |
-
border-left: 1px solid #b78a66;
|
38 |
-
}
|
39 |
-
|
40 |
-
.factory-bootstrap-330 .pagination > .active > a,
|
41 |
-
.factory-bootstrap-330 .pagination > .active > span,
|
42 |
-
.factory-bootstrap-330 .pagination > .active > a:hover,
|
43 |
-
.factory-bootstrap-330 .pagination > .active > span:hover,
|
44 |
-
.factory-bootstrap-330 .pagination > .active > a:focus,
|
45 |
-
.factory-bootstrap-330 .pagination > .active > span:focus {
|
46 |
-
background-color: #c7a589;
|
47 |
-
border-color: #b78a66;
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.datepicker.css
DELETED
@@ -1,782 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Datepicker for Bootstrap v1.5.0-dev (https://github.com/eternicode/bootstrap-datepicker)
|
3 |
-
*
|
4 |
-
* Copyright 2012 Stefan Petre
|
5 |
-
* Improvements by Andrew Rowls
|
6 |
-
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
7 |
-
*/
|
8 |
-
.datepicker {
|
9 |
-
border-radius: 4px;
|
10 |
-
direction: ltr;
|
11 |
-
}
|
12 |
-
.datepicker-inline {
|
13 |
-
width: 220px;
|
14 |
-
}
|
15 |
-
.datepicker.datepicker-rtl {
|
16 |
-
direction: rtl;
|
17 |
-
}
|
18 |
-
.datepicker.datepicker-rtl table tr td span {
|
19 |
-
float: right;
|
20 |
-
}
|
21 |
-
.datepicker-dropdown {
|
22 |
-
top: 0;
|
23 |
-
left: 0;
|
24 |
-
}
|
25 |
-
.datepicker-dropdown:before {
|
26 |
-
content: '';
|
27 |
-
display: inline-block;
|
28 |
-
border-left: 7px solid transparent;
|
29 |
-
border-right: 7px solid transparent;
|
30 |
-
border-bottom: 7px solid #ccc;
|
31 |
-
border-top: 0;
|
32 |
-
border-bottom-color: rgba(0, 0, 0, 0.2);
|
33 |
-
position: absolute;
|
34 |
-
}
|
35 |
-
.datepicker-dropdown:after {
|
36 |
-
content: '';
|
37 |
-
display: inline-block;
|
38 |
-
border-left: 6px solid transparent;
|
39 |
-
border-right: 6px solid transparent;
|
40 |
-
border-bottom: 6px solid #fff;
|
41 |
-
border-top: 0;
|
42 |
-
position: absolute;
|
43 |
-
}
|
44 |
-
.datepicker-dropdown.datepicker-orient-left:before {
|
45 |
-
left: 6px;
|
46 |
-
}
|
47 |
-
.datepicker-dropdown.datepicker-orient-left:after {
|
48 |
-
left: 7px;
|
49 |
-
}
|
50 |
-
.datepicker-dropdown.datepicker-orient-right:before {
|
51 |
-
right: 6px;
|
52 |
-
}
|
53 |
-
.datepicker-dropdown.datepicker-orient-right:after {
|
54 |
-
right: 7px;
|
55 |
-
}
|
56 |
-
.datepicker-dropdown.datepicker-orient-top:before {
|
57 |
-
top: -7px;
|
58 |
-
}
|
59 |
-
.datepicker-dropdown.datepicker-orient-top:after {
|
60 |
-
top: -6px;
|
61 |
-
}
|
62 |
-
.datepicker-dropdown.datepicker-orient-bottom:before {
|
63 |
-
bottom: -7px;
|
64 |
-
border-bottom: 0;
|
65 |
-
border-top: 7px solid #999;
|
66 |
-
}
|
67 |
-
.datepicker-dropdown.datepicker-orient-bottom:after {
|
68 |
-
bottom: -6px;
|
69 |
-
border-bottom: 0;
|
70 |
-
border-top: 6px solid #fff;
|
71 |
-
}
|
72 |
-
.datepicker > div {
|
73 |
-
display: none;
|
74 |
-
}
|
75 |
-
.datepicker.days .datepicker-days,
|
76 |
-
.datepicker.months .datepicker-months,
|
77 |
-
.datepicker.years .datepicker-years {
|
78 |
-
display: block;
|
79 |
-
}
|
80 |
-
.datepicker table {
|
81 |
-
margin: 0;
|
82 |
-
-webkit-touch-callout: none;
|
83 |
-
-webkit-user-select: none;
|
84 |
-
-khtml-user-select: none;
|
85 |
-
-moz-user-select: none;
|
86 |
-
-ms-user-select: none;
|
87 |
-
user-select: none;
|
88 |
-
}
|
89 |
-
.datepicker table tr td,
|
90 |
-
.datepicker table tr th {
|
91 |
-
text-align: center;
|
92 |
-
width: 30px;
|
93 |
-
height: 30px;
|
94 |
-
border-radius: 4px;
|
95 |
-
border: none;
|
96 |
-
}
|
97 |
-
.table-striped .datepicker table tr td,
|
98 |
-
.table-striped .datepicker table tr th {
|
99 |
-
background-color: transparent;
|
100 |
-
}
|
101 |
-
.datepicker table tr td.day:hover,
|
102 |
-
.datepicker table tr td.day.focused {
|
103 |
-
background: #eeeeee;
|
104 |
-
cursor: pointer;
|
105 |
-
}
|
106 |
-
.datepicker table tr td.old,
|
107 |
-
.datepicker table tr td.new {
|
108 |
-
color: #999999;
|
109 |
-
}
|
110 |
-
.datepicker table tr td.disabled,
|
111 |
-
.datepicker table tr td.disabled:hover {
|
112 |
-
background: none;
|
113 |
-
color: #999999;
|
114 |
-
cursor: default;
|
115 |
-
}
|
116 |
-
.datepicker table tr td.today,
|
117 |
-
.datepicker table tr td.today:hover,
|
118 |
-
.datepicker table tr td.today.disabled,
|
119 |
-
.datepicker table tr td.today.disabled:hover {
|
120 |
-
color: #000000;
|
121 |
-
background-color: #ffdb99;
|
122 |
-
border-color: #ffb733;
|
123 |
-
}
|
124 |
-
.datepicker table tr td.today:hover,
|
125 |
-
.datepicker table tr td.today:hover:hover,
|
126 |
-
.datepicker table tr td.today.disabled:hover,
|
127 |
-
.datepicker table tr td.today.disabled:hover:hover,
|
128 |
-
.datepicker table tr td.today:focus,
|
129 |
-
.datepicker table tr td.today:hover:focus,
|
130 |
-
.datepicker table tr td.today.disabled:focus,
|
131 |
-
.datepicker table tr td.today.disabled:hover:focus,
|
132 |
-
.datepicker table tr td.today:active,
|
133 |
-
.datepicker table tr td.today:hover:active,
|
134 |
-
.datepicker table tr td.today.disabled:active,
|
135 |
-
.datepicker table tr td.today.disabled:hover:active,
|
136 |
-
.datepicker table tr td.today.active,
|
137 |
-
.datepicker table tr td.today:hover.active,
|
138 |
-
.datepicker table tr td.today.disabled.active,
|
139 |
-
.datepicker table tr td.today.disabled:hover.active,
|
140 |
-
.open .dropdown-toggle.datepicker table tr td.today,
|
141 |
-
.open .dropdown-toggle.datepicker table tr td.today:hover,
|
142 |
-
.open .dropdown-toggle.datepicker table tr td.today.disabled,
|
143 |
-
.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
|
144 |
-
color: #000000;
|
145 |
-
background-color: #ffcd70;
|
146 |
-
border-color: #f59e00;
|
147 |
-
}
|
148 |
-
.datepicker table tr td.today:active,
|
149 |
-
.datepicker table tr td.today:hover:active,
|
150 |
-
.datepicker table tr td.today.disabled:active,
|
151 |
-
.datepicker table tr td.today.disabled:hover:active,
|
152 |
-
.datepicker table tr td.today.active,
|
153 |
-
.datepicker table tr td.today:hover.active,
|
154 |
-
.datepicker table tr td.today.disabled.active,
|
155 |
-
.datepicker table tr td.today.disabled:hover.active,
|
156 |
-
.open .dropdown-toggle.datepicker table tr td.today,
|
157 |
-
.open .dropdown-toggle.datepicker table tr td.today:hover,
|
158 |
-
.open .dropdown-toggle.datepicker table tr td.today.disabled,
|
159 |
-
.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
|
160 |
-
background-image: none;
|
161 |
-
}
|
162 |
-
.datepicker table tr td.today.disabled,
|
163 |
-
.datepicker table tr td.today:hover.disabled,
|
164 |
-
.datepicker table tr td.today.disabled.disabled,
|
165 |
-
.datepicker table tr td.today.disabled:hover.disabled,
|
166 |
-
.datepicker table tr td.today[disabled],
|
167 |
-
.datepicker table tr td.today:hover[disabled],
|
168 |
-
.datepicker table tr td.today.disabled[disabled],
|
169 |
-
.datepicker table tr td.today.disabled:hover[disabled],
|
170 |
-
fieldset[disabled] .datepicker table tr td.today,
|
171 |
-
fieldset[disabled] .datepicker table tr td.today:hover,
|
172 |
-
fieldset[disabled] .datepicker table tr td.today.disabled,
|
173 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:hover,
|
174 |
-
.datepicker table tr td.today.disabled:hover,
|
175 |
-
.datepicker table tr td.today:hover.disabled:hover,
|
176 |
-
.datepicker table tr td.today.disabled.disabled:hover,
|
177 |
-
.datepicker table tr td.today.disabled:hover.disabled:hover,
|
178 |
-
.datepicker table tr td.today[disabled]:hover,
|
179 |
-
.datepicker table tr td.today:hover[disabled]:hover,
|
180 |
-
.datepicker table tr td.today.disabled[disabled]:hover,
|
181 |
-
.datepicker table tr td.today.disabled:hover[disabled]:hover,
|
182 |
-
fieldset[disabled] .datepicker table tr td.today:hover,
|
183 |
-
fieldset[disabled] .datepicker table tr td.today:hover:hover,
|
184 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:hover,
|
185 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:hover:hover,
|
186 |
-
.datepicker table tr td.today.disabled:focus,
|
187 |
-
.datepicker table tr td.today:hover.disabled:focus,
|
188 |
-
.datepicker table tr td.today.disabled.disabled:focus,
|
189 |
-
.datepicker table tr td.today.disabled:hover.disabled:focus,
|
190 |
-
.datepicker table tr td.today[disabled]:focus,
|
191 |
-
.datepicker table tr td.today:hover[disabled]:focus,
|
192 |
-
.datepicker table tr td.today.disabled[disabled]:focus,
|
193 |
-
.datepicker table tr td.today.disabled:hover[disabled]:focus,
|
194 |
-
fieldset[disabled] .datepicker table tr td.today:focus,
|
195 |
-
fieldset[disabled] .datepicker table tr td.today:hover:focus,
|
196 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:focus,
|
197 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:hover:focus,
|
198 |
-
.datepicker table tr td.today.disabled:active,
|
199 |
-
.datepicker table tr td.today:hover.disabled:active,
|
200 |
-
.datepicker table tr td.today.disabled.disabled:active,
|
201 |
-
.datepicker table tr td.today.disabled:hover.disabled:active,
|
202 |
-
.datepicker table tr td.today[disabled]:active,
|
203 |
-
.datepicker table tr td.today:hover[disabled]:active,
|
204 |
-
.datepicker table tr td.today.disabled[disabled]:active,
|
205 |
-
.datepicker table tr td.today.disabled:hover[disabled]:active,
|
206 |
-
fieldset[disabled] .datepicker table tr td.today:active,
|
207 |
-
fieldset[disabled] .datepicker table tr td.today:hover:active,
|
208 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:active,
|
209 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:hover:active,
|
210 |
-
.datepicker table tr td.today.disabled.active,
|
211 |
-
.datepicker table tr td.today:hover.disabled.active,
|
212 |
-
.datepicker table tr td.today.disabled.disabled.active,
|
213 |
-
.datepicker table tr td.today.disabled:hover.disabled.active,
|
214 |
-
.datepicker table tr td.today[disabled].active,
|
215 |
-
.datepicker table tr td.today:hover[disabled].active,
|
216 |
-
.datepicker table tr td.today.disabled[disabled].active,
|
217 |
-
.datepicker table tr td.today.disabled:hover[disabled].active,
|
218 |
-
fieldset[disabled] .datepicker table tr td.today.active,
|
219 |
-
fieldset[disabled] .datepicker table tr td.today:hover.active,
|
220 |
-
fieldset[disabled] .datepicker table tr td.today.disabled.active,
|
221 |
-
fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
|
222 |
-
background-color: #ffdb99;
|
223 |
-
border-color: #ffb733;
|
224 |
-
}
|
225 |
-
.datepicker table tr td.today:hover:hover {
|
226 |
-
color: #000;
|
227 |
-
}
|
228 |
-
.datepicker table tr td.today.active:hover {
|
229 |
-
color: #fff;
|
230 |
-
}
|
231 |
-
.datepicker table tr td.range,
|
232 |
-
.datepicker table tr td.range:hover,
|
233 |
-
.datepicker table tr td.range.disabled,
|
234 |
-
.datepicker table tr td.range.disabled:hover {
|
235 |
-
background: #eeeeee;
|
236 |
-
border-radius: 0;
|
237 |
-
}
|
238 |
-
.datepicker table tr td.range.today,
|
239 |
-
.datepicker table tr td.range.today:hover,
|
240 |
-
.datepicker table tr td.range.today.disabled,
|
241 |
-
.datepicker table tr td.range.today.disabled:hover {
|
242 |
-
color: #000000;
|
243 |
-
background-color: #f7ca77;
|
244 |
-
border-color: #f1a417;
|
245 |
-
border-radius: 0;
|
246 |
-
}
|
247 |
-
.datepicker table tr td.range.today:hover,
|
248 |
-
.datepicker table tr td.range.today:hover:hover,
|
249 |
-
.datepicker table tr td.range.today.disabled:hover,
|
250 |
-
.datepicker table tr td.range.today.disabled:hover:hover,
|
251 |
-
.datepicker table tr td.range.today:focus,
|
252 |
-
.datepicker table tr td.range.today:hover:focus,
|
253 |
-
.datepicker table tr td.range.today.disabled:focus,
|
254 |
-
.datepicker table tr td.range.today.disabled:hover:focus,
|
255 |
-
.datepicker table tr td.range.today:active,
|
256 |
-
.datepicker table tr td.range.today:hover:active,
|
257 |
-
.datepicker table tr td.range.today.disabled:active,
|
258 |
-
.datepicker table tr td.range.today.disabled:hover:active,
|
259 |
-
.datepicker table tr td.range.today.active,
|
260 |
-
.datepicker table tr td.range.today:hover.active,
|
261 |
-
.datepicker table tr td.range.today.disabled.active,
|
262 |
-
.datepicker table tr td.range.today.disabled:hover.active,
|
263 |
-
.open .dropdown-toggle.datepicker table tr td.range.today,
|
264 |
-
.open .dropdown-toggle.datepicker table tr td.range.today:hover,
|
265 |
-
.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
|
266 |
-
.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
|
267 |
-
color: #000000;
|
268 |
-
background-color: #f4bb51;
|
269 |
-
border-color: #bf800c;
|
270 |
-
}
|
271 |
-
.datepicker table tr td.range.today:active,
|
272 |
-
.datepicker table tr td.range.today:hover:active,
|
273 |
-
.datepicker table tr td.range.today.disabled:active,
|
274 |
-
.datepicker table tr td.range.today.disabled:hover:active,
|
275 |
-
.datepicker table tr td.range.today.active,
|
276 |
-
.datepicker table tr td.range.today:hover.active,
|
277 |
-
.datepicker table tr td.range.today.disabled.active,
|
278 |
-
.datepicker table tr td.range.today.disabled:hover.active,
|
279 |
-
.open .dropdown-toggle.datepicker table tr td.range.today,
|
280 |
-
.open .dropdown-toggle.datepicker table tr td.range.today:hover,
|
281 |
-
.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
|
282 |
-
.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
|
283 |
-
background-image: none;
|
284 |
-
}
|
285 |
-
.datepicker table tr td.range.today.disabled,
|
286 |
-
.datepicker table tr td.range.today:hover.disabled,
|
287 |
-
.datepicker table tr td.range.today.disabled.disabled,
|
288 |
-
.datepicker table tr td.range.today.disabled:hover.disabled,
|
289 |
-
.datepicker table tr td.range.today[disabled],
|
290 |
-
.datepicker table tr td.range.today:hover[disabled],
|
291 |
-
.datepicker table tr td.range.today.disabled[disabled],
|
292 |
-
.datepicker table tr td.range.today.disabled:hover[disabled],
|
293 |
-
fieldset[disabled] .datepicker table tr td.range.today,
|
294 |
-
fieldset[disabled] .datepicker table tr td.range.today:hover,
|
295 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled,
|
296 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
|
297 |
-
.datepicker table tr td.range.today.disabled:hover,
|
298 |
-
.datepicker table tr td.range.today:hover.disabled:hover,
|
299 |
-
.datepicker table tr td.range.today.disabled.disabled:hover,
|
300 |
-
.datepicker table tr td.range.today.disabled:hover.disabled:hover,
|
301 |
-
.datepicker table tr td.range.today[disabled]:hover,
|
302 |
-
.datepicker table tr td.range.today:hover[disabled]:hover,
|
303 |
-
.datepicker table tr td.range.today.disabled[disabled]:hover,
|
304 |
-
.datepicker table tr td.range.today.disabled:hover[disabled]:hover,
|
305 |
-
fieldset[disabled] .datepicker table tr td.range.today:hover,
|
306 |
-
fieldset[disabled] .datepicker table tr td.range.today:hover:hover,
|
307 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
|
308 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:hover,
|
309 |
-
.datepicker table tr td.range.today.disabled:focus,
|
310 |
-
.datepicker table tr td.range.today:hover.disabled:focus,
|
311 |
-
.datepicker table tr td.range.today.disabled.disabled:focus,
|
312 |
-
.datepicker table tr td.range.today.disabled:hover.disabled:focus,
|
313 |
-
.datepicker table tr td.range.today[disabled]:focus,
|
314 |
-
.datepicker table tr td.range.today:hover[disabled]:focus,
|
315 |
-
.datepicker table tr td.range.today.disabled[disabled]:focus,
|
316 |
-
.datepicker table tr td.range.today.disabled:hover[disabled]:focus,
|
317 |
-
fieldset[disabled] .datepicker table tr td.range.today:focus,
|
318 |
-
fieldset[disabled] .datepicker table tr td.range.today:hover:focus,
|
319 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:focus,
|
320 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:focus,
|
321 |
-
.datepicker table tr td.range.today.disabled:active,
|
322 |
-
.datepicker table tr td.range.today:hover.disabled:active,
|
323 |
-
.datepicker table tr td.range.today.disabled.disabled:active,
|
324 |
-
.datepicker table tr td.range.today.disabled:hover.disabled:active,
|
325 |
-
.datepicker table tr td.range.today[disabled]:active,
|
326 |
-
.datepicker table tr td.range.today:hover[disabled]:active,
|
327 |
-
.datepicker table tr td.range.today.disabled[disabled]:active,
|
328 |
-
.datepicker table tr td.range.today.disabled:hover[disabled]:active,
|
329 |
-
fieldset[disabled] .datepicker table tr td.range.today:active,
|
330 |
-
fieldset[disabled] .datepicker table tr td.range.today:hover:active,
|
331 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:active,
|
332 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:active,
|
333 |
-
.datepicker table tr td.range.today.disabled.active,
|
334 |
-
.datepicker table tr td.range.today:hover.disabled.active,
|
335 |
-
.datepicker table tr td.range.today.disabled.disabled.active,
|
336 |
-
.datepicker table tr td.range.today.disabled:hover.disabled.active,
|
337 |
-
.datepicker table tr td.range.today[disabled].active,
|
338 |
-
.datepicker table tr td.range.today:hover[disabled].active,
|
339 |
-
.datepicker table tr td.range.today.disabled[disabled].active,
|
340 |
-
.datepicker table tr td.range.today.disabled:hover[disabled].active,
|
341 |
-
fieldset[disabled] .datepicker table tr td.range.today.active,
|
342 |
-
fieldset[disabled] .datepicker table tr td.range.today:hover.active,
|
343 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled.active,
|
344 |
-
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active {
|
345 |
-
background-color: #f7ca77;
|
346 |
-
border-color: #f1a417;
|
347 |
-
}
|
348 |
-
.datepicker table tr td.selected,
|
349 |
-
.datepicker table tr td.selected:hover,
|
350 |
-
.datepicker table tr td.selected.disabled,
|
351 |
-
.datepicker table tr td.selected.disabled:hover {
|
352 |
-
color: #ffffff;
|
353 |
-
background-color: #999999;
|
354 |
-
border-color: #555555;
|
355 |
-
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
356 |
-
}
|
357 |
-
.datepicker table tr td.selected:hover,
|
358 |
-
.datepicker table tr td.selected:hover:hover,
|
359 |
-
.datepicker table tr td.selected.disabled:hover,
|
360 |
-
.datepicker table tr td.selected.disabled:hover:hover,
|
361 |
-
.datepicker table tr td.selected:focus,
|
362 |
-
.datepicker table tr td.selected:hover:focus,
|
363 |
-
.datepicker table tr td.selected.disabled:focus,
|
364 |
-
.datepicker table tr td.selected.disabled:hover:focus,
|
365 |
-
.datepicker table tr td.selected:active,
|
366 |
-
.datepicker table tr td.selected:hover:active,
|
367 |
-
.datepicker table tr td.selected.disabled:active,
|
368 |
-
.datepicker table tr td.selected.disabled:hover:active,
|
369 |
-
.datepicker table tr td.selected.active,
|
370 |
-
.datepicker table tr td.selected:hover.active,
|
371 |
-
.datepicker table tr td.selected.disabled.active,
|
372 |
-
.datepicker table tr td.selected.disabled:hover.active,
|
373 |
-
.open .dropdown-toggle.datepicker table tr td.selected,
|
374 |
-
.open .dropdown-toggle.datepicker table tr td.selected:hover,
|
375 |
-
.open .dropdown-toggle.datepicker table tr td.selected.disabled,
|
376 |
-
.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
|
377 |
-
color: #ffffff;
|
378 |
-
background-color: #858585;
|
379 |
-
border-color: #373737;
|
380 |
-
}
|
381 |
-
.datepicker table tr td.selected:active,
|
382 |
-
.datepicker table tr td.selected:hover:active,
|
383 |
-
.datepicker table tr td.selected.disabled:active,
|
384 |
-
.datepicker table tr td.selected.disabled:hover:active,
|
385 |
-
.datepicker table tr td.selected.active,
|
386 |
-
.datepicker table tr td.selected:hover.active,
|
387 |
-
.datepicker table tr td.selected.disabled.active,
|
388 |
-
.datepicker table tr td.selected.disabled:hover.active,
|
389 |
-
.open .dropdown-toggle.datepicker table tr td.selected,
|
390 |
-
.open .dropdown-toggle.datepicker table tr td.selected:hover,
|
391 |
-
.open .dropdown-toggle.datepicker table tr td.selected.disabled,
|
392 |
-
.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
|
393 |
-
background-image: none;
|
394 |
-
}
|
395 |
-
.datepicker table tr td.selected.disabled,
|
396 |
-
.datepicker table tr td.selected:hover.disabled,
|
397 |
-
.datepicker table tr td.selected.disabled.disabled,
|
398 |
-
.datepicker table tr td.selected.disabled:hover.disabled,
|
399 |
-
.datepicker table tr td.selected[disabled],
|
400 |
-
.datepicker table tr td.selected:hover[disabled],
|
401 |
-
.datepicker table tr td.selected.disabled[disabled],
|
402 |
-
.datepicker table tr td.selected.disabled:hover[disabled],
|
403 |
-
fieldset[disabled] .datepicker table tr td.selected,
|
404 |
-
fieldset[disabled] .datepicker table tr td.selected:hover,
|
405 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled,
|
406 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
|
407 |
-
.datepicker table tr td.selected.disabled:hover,
|
408 |
-
.datepicker table tr td.selected:hover.disabled:hover,
|
409 |
-
.datepicker table tr td.selected.disabled.disabled:hover,
|
410 |
-
.datepicker table tr td.selected.disabled:hover.disabled:hover,
|
411 |
-
.datepicker table tr td.selected[disabled]:hover,
|
412 |
-
.datepicker table tr td.selected:hover[disabled]:hover,
|
413 |
-
.datepicker table tr td.selected.disabled[disabled]:hover,
|
414 |
-
.datepicker table tr td.selected.disabled:hover[disabled]:hover,
|
415 |
-
fieldset[disabled] .datepicker table tr td.selected:hover,
|
416 |
-
fieldset[disabled] .datepicker table tr td.selected:hover:hover,
|
417 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
|
418 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:hover:hover,
|
419 |
-
.datepicker table tr td.selected.disabled:focus,
|
420 |
-
.datepicker table tr td.selected:hover.disabled:focus,
|
421 |
-
.datepicker table tr td.selected.disabled.disabled:focus,
|
422 |
-
.datepicker table tr td.selected.disabled:hover.disabled:focus,
|
423 |
-
.datepicker table tr td.selected[disabled]:focus,
|
424 |
-
.datepicker table tr td.selected:hover[disabled]:focus,
|
425 |
-
.datepicker table tr td.selected.disabled[disabled]:focus,
|
426 |
-
.datepicker table tr td.selected.disabled:hover[disabled]:focus,
|
427 |
-
fieldset[disabled] .datepicker table tr td.selected:focus,
|
428 |
-
fieldset[disabled] .datepicker table tr td.selected:hover:focus,
|
429 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:focus,
|
430 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:hover:focus,
|
431 |
-
.datepicker table tr td.selected.disabled:active,
|
432 |
-
.datepicker table tr td.selected:hover.disabled:active,
|
433 |
-
.datepicker table tr td.selected.disabled.disabled:active,
|
434 |
-
.datepicker table tr td.selected.disabled:hover.disabled:active,
|
435 |
-
.datepicker table tr td.selected[disabled]:active,
|
436 |
-
.datepicker table tr td.selected:hover[disabled]:active,
|
437 |
-
.datepicker table tr td.selected.disabled[disabled]:active,
|
438 |
-
.datepicker table tr td.selected.disabled:hover[disabled]:active,
|
439 |
-
fieldset[disabled] .datepicker table tr td.selected:active,
|
440 |
-
fieldset[disabled] .datepicker table tr td.selected:hover:active,
|
441 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:active,
|
442 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:hover:active,
|
443 |
-
.datepicker table tr td.selected.disabled.active,
|
444 |
-
.datepicker table tr td.selected:hover.disabled.active,
|
445 |
-
.datepicker table tr td.selected.disabled.disabled.active,
|
446 |
-
.datepicker table tr td.selected.disabled:hover.disabled.active,
|
447 |
-
.datepicker table tr td.selected[disabled].active,
|
448 |
-
.datepicker table tr td.selected:hover[disabled].active,
|
449 |
-
.datepicker table tr td.selected.disabled[disabled].active,
|
450 |
-
.datepicker table tr td.selected.disabled:hover[disabled].active,
|
451 |
-
fieldset[disabled] .datepicker table tr td.selected.active,
|
452 |
-
fieldset[disabled] .datepicker table tr td.selected:hover.active,
|
453 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled.active,
|
454 |
-
fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active {
|
455 |
-
background-color: #999999;
|
456 |
-
border-color: #555555;
|
457 |
-
}
|
458 |
-
.datepicker table tr td.active,
|
459 |
-
.datepicker table tr td.active:hover,
|
460 |
-
.datepicker table tr td.active.disabled,
|
461 |
-
.datepicker table tr td.active.disabled:hover {
|
462 |
-
color: #ffffff;
|
463 |
-
background-color: #428bca;
|
464 |
-
border-color: #357ebd;
|
465 |
-
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
466 |
-
}
|
467 |
-
.datepicker table tr td.active:hover,
|
468 |
-
.datepicker table tr td.active:hover:hover,
|
469 |
-
.datepicker table tr td.active.disabled:hover,
|
470 |
-
.datepicker table tr td.active.disabled:hover:hover,
|
471 |
-
.datepicker table tr td.active:focus,
|
472 |
-
.datepicker table tr td.active:hover:focus,
|
473 |
-
.datepicker table tr td.active.disabled:focus,
|
474 |
-
.datepicker table tr td.active.disabled:hover:focus,
|
475 |
-
.datepicker table tr td.active:active,
|
476 |
-
.datepicker table tr td.active:hover:active,
|
477 |
-
.datepicker table tr td.active.disabled:active,
|
478 |
-
.datepicker table tr td.active.disabled:hover:active,
|
479 |
-
.datepicker table tr td.active.active,
|
480 |
-
.datepicker table tr td.active:hover.active,
|
481 |
-
.datepicker table tr td.active.disabled.active,
|
482 |
-
.datepicker table tr td.active.disabled:hover.active,
|
483 |
-
.open .dropdown-toggle.datepicker table tr td.active,
|
484 |
-
.open .dropdown-toggle.datepicker table tr td.active:hover,
|
485 |
-
.open .dropdown-toggle.datepicker table tr td.active.disabled,
|
486 |
-
.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
|
487 |
-
color: #ffffff;
|
488 |
-
background-color: #3276b1;
|
489 |
-
border-color: #285e8e;
|
490 |
-
}
|
491 |
-
.datepicker table tr td.active:active,
|
492 |
-
.datepicker table tr td.active:hover:active,
|
493 |
-
.datepicker table tr td.active.disabled:active,
|
494 |
-
.datepicker table tr td.active.disabled:hover:active,
|
495 |
-
.datepicker table tr td.active.active,
|
496 |
-
.datepicker table tr td.active:hover.active,
|
497 |
-
.datepicker table tr td.active.disabled.active,
|
498 |
-
.datepicker table tr td.active.disabled:hover.active,
|
499 |
-
.open .dropdown-toggle.datepicker table tr td.active,
|
500 |
-
.open .dropdown-toggle.datepicker table tr td.active:hover,
|
501 |
-
.open .dropdown-toggle.datepicker table tr td.active.disabled,
|
502 |
-
.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
|
503 |
-
background-image: none;
|
504 |
-
}
|
505 |
-
.datepicker table tr td.active.disabled,
|
506 |
-
.datepicker table tr td.active:hover.disabled,
|
507 |
-
.datepicker table tr td.active.disabled.disabled,
|
508 |
-
.datepicker table tr td.active.disabled:hover.disabled,
|
509 |
-
.datepicker table tr td.active[disabled],
|
510 |
-
.datepicker table tr td.active:hover[disabled],
|
511 |
-
.datepicker table tr td.active.disabled[disabled],
|
512 |
-
.datepicker table tr td.active.disabled:hover[disabled],
|
513 |
-
fieldset[disabled] .datepicker table tr td.active,
|
514 |
-
fieldset[disabled] .datepicker table tr td.active:hover,
|
515 |
-
fieldset[disabled] .datepicker table tr td.active.disabled,
|
516 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:hover,
|
517 |
-
.datepicker table tr td.active.disabled:hover,
|
518 |
-
.datepicker table tr td.active:hover.disabled:hover,
|
519 |
-
.datepicker table tr td.active.disabled.disabled:hover,
|
520 |
-
.datepicker table tr td.active.disabled:hover.disabled:hover,
|
521 |
-
.datepicker table tr td.active[disabled]:hover,
|
522 |
-
.datepicker table tr td.active:hover[disabled]:hover,
|
523 |
-
.datepicker table tr td.active.disabled[disabled]:hover,
|
524 |
-
.datepicker table tr td.active.disabled:hover[disabled]:hover,
|
525 |
-
fieldset[disabled] .datepicker table tr td.active:hover,
|
526 |
-
fieldset[disabled] .datepicker table tr td.active:hover:hover,
|
527 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:hover,
|
528 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:hover:hover,
|
529 |
-
.datepicker table tr td.active.disabled:focus,
|
530 |
-
.datepicker table tr td.active:hover.disabled:focus,
|
531 |
-
.datepicker table tr td.active.disabled.disabled:focus,
|
532 |
-
.datepicker table tr td.active.disabled:hover.disabled:focus,
|
533 |
-
.datepicker table tr td.active[disabled]:focus,
|
534 |
-
.datepicker table tr td.active:hover[disabled]:focus,
|
535 |
-
.datepicker table tr td.active.disabled[disabled]:focus,
|
536 |
-
.datepicker table tr td.active.disabled:hover[disabled]:focus,
|
537 |
-
fieldset[disabled] .datepicker table tr td.active:focus,
|
538 |
-
fieldset[disabled] .datepicker table tr td.active:hover:focus,
|
539 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:focus,
|
540 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:hover:focus,
|
541 |
-
.datepicker table tr td.active.disabled:active,
|
542 |
-
.datepicker table tr td.active:hover.disabled:active,
|
543 |
-
.datepicker table tr td.active.disabled.disabled:active,
|
544 |
-
.datepicker table tr td.active.disabled:hover.disabled:active,
|
545 |
-
.datepicker table tr td.active[disabled]:active,
|
546 |
-
.datepicker table tr td.active:hover[disabled]:active,
|
547 |
-
.datepicker table tr td.active.disabled[disabled]:active,
|
548 |
-
.datepicker table tr td.active.disabled:hover[disabled]:active,
|
549 |
-
fieldset[disabled] .datepicker table tr td.active:active,
|
550 |
-
fieldset[disabled] .datepicker table tr td.active:hover:active,
|
551 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:active,
|
552 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:hover:active,
|
553 |
-
.datepicker table tr td.active.disabled.active,
|
554 |
-
.datepicker table tr td.active:hover.disabled.active,
|
555 |
-
.datepicker table tr td.active.disabled.disabled.active,
|
556 |
-
.datepicker table tr td.active.disabled:hover.disabled.active,
|
557 |
-
.datepicker table tr td.active[disabled].active,
|
558 |
-
.datepicker table tr td.active:hover[disabled].active,
|
559 |
-
.datepicker table tr td.active.disabled[disabled].active,
|
560 |
-
.datepicker table tr td.active.disabled:hover[disabled].active,
|
561 |
-
fieldset[disabled] .datepicker table tr td.active.active,
|
562 |
-
fieldset[disabled] .datepicker table tr td.active:hover.active,
|
563 |
-
fieldset[disabled] .datepicker table tr td.active.disabled.active,
|
564 |
-
fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
|
565 |
-
background-color: #428bca;
|
566 |
-
border-color: #357ebd;
|
567 |
-
}
|
568 |
-
.datepicker table tr td span {
|
569 |
-
display: block;
|
570 |
-
width: 23%;
|
571 |
-
height: 54px;
|
572 |
-
line-height: 54px;
|
573 |
-
float: left;
|
574 |
-
margin: 1%;
|
575 |
-
cursor: pointer;
|
576 |
-
border-radius: 4px;
|
577 |
-
}
|
578 |
-
.datepicker table tr td span:hover {
|
579 |
-
background: #eeeeee;
|
580 |
-
}
|
581 |
-
.datepicker table tr td span.disabled,
|
582 |
-
.datepicker table tr td span.disabled:hover {
|
583 |
-
background: none;
|
584 |
-
color: #999999;
|
585 |
-
cursor: default;
|
586 |
-
}
|
587 |
-
.datepicker table tr td span.active,
|
588 |
-
.datepicker table tr td span.active:hover,
|
589 |
-
.datepicker table tr td span.active.disabled,
|
590 |
-
.datepicker table tr td span.active.disabled:hover {
|
591 |
-
color: #ffffff;
|
592 |
-
background-color: #428bca;
|
593 |
-
border-color: #357ebd;
|
594 |
-
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
595 |
-
}
|
596 |
-
.datepicker table tr td span.active:hover,
|
597 |
-
.datepicker table tr td span.active:hover:hover,
|
598 |
-
.datepicker table tr td span.active.disabled:hover,
|
599 |
-
.datepicker table tr td span.active.disabled:hover:hover,
|
600 |
-
.datepicker table tr td span.active:focus,
|
601 |
-
.datepicker table tr td span.active:hover:focus,
|
602 |
-
.datepicker table tr td span.active.disabled:focus,
|
603 |
-
.datepicker table tr td span.active.disabled:hover:focus,
|
604 |
-
.datepicker table tr td span.active:active,
|
605 |
-
.datepicker table tr td span.active:hover:active,
|
606 |
-
.datepicker table tr td span.active.disabled:active,
|
607 |
-
.datepicker table tr td span.active.disabled:hover:active,
|
608 |
-
.datepicker table tr td span.active.active,
|
609 |
-
.datepicker table tr td span.active:hover.active,
|
610 |
-
.datepicker table tr td span.active.disabled.active,
|
611 |
-
.datepicker table tr td span.active.disabled:hover.active,
|
612 |
-
.open .dropdown-toggle.datepicker table tr td span.active,
|
613 |
-
.open .dropdown-toggle.datepicker table tr td span.active:hover,
|
614 |
-
.open .dropdown-toggle.datepicker table tr td span.active.disabled,
|
615 |
-
.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
|
616 |
-
color: #ffffff;
|
617 |
-
background-color: #3276b1;
|
618 |
-
border-color: #285e8e;
|
619 |
-
}
|
620 |
-
.datepicker table tr td span.active:active,
|
621 |
-
.datepicker table tr td span.active:hover:active,
|
622 |
-
.datepicker table tr td span.active.disabled:active,
|
623 |
-
.datepicker table tr td span.active.disabled:hover:active,
|
624 |
-
.datepicker table tr td span.active.active,
|
625 |
-
.datepicker table tr td span.active:hover.active,
|
626 |
-
.datepicker table tr td span.active.disabled.active,
|
627 |
-
.datepicker table tr td span.active.disabled:hover.active,
|
628 |
-
.open .dropdown-toggle.datepicker table tr td span.active,
|
629 |
-
.open .dropdown-toggle.datepicker table tr td span.active:hover,
|
630 |
-
.open .dropdown-toggle.datepicker table tr td span.active.disabled,
|
631 |
-
.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
|
632 |
-
background-image: none;
|
633 |
-
}
|
634 |
-
.datepicker table tr td span.active.disabled,
|
635 |
-
.datepicker table tr td span.active:hover.disabled,
|
636 |
-
.datepicker table tr td span.active.disabled.disabled,
|
637 |
-
.datepicker table tr td span.active.disabled:hover.disabled,
|
638 |
-
.datepicker table tr td span.active[disabled],
|
639 |
-
.datepicker table tr td span.active:hover[disabled],
|
640 |
-
.datepicker table tr td span.active.disabled[disabled],
|
641 |
-
.datepicker table tr td span.active.disabled:hover[disabled],
|
642 |
-
fieldset[disabled] .datepicker table tr td span.active,
|
643 |
-
fieldset[disabled] .datepicker table tr td span.active:hover,
|
644 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled,
|
645 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
|
646 |
-
.datepicker table tr td span.active.disabled:hover,
|
647 |
-
.datepicker table tr td span.active:hover.disabled:hover,
|
648 |
-
.datepicker table tr td span.active.disabled.disabled:hover,
|
649 |
-
.datepicker table tr td span.active.disabled:hover.disabled:hover,
|
650 |
-
.datepicker table tr td span.active[disabled]:hover,
|
651 |
-
.datepicker table tr td span.active:hover[disabled]:hover,
|
652 |
-
.datepicker table tr td span.active.disabled[disabled]:hover,
|
653 |
-
.datepicker table tr td span.active.disabled:hover[disabled]:hover,
|
654 |
-
fieldset[disabled] .datepicker table tr td span.active:hover,
|
655 |
-
fieldset[disabled] .datepicker table tr td span.active:hover:hover,
|
656 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
|
657 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover,
|
658 |
-
.datepicker table tr td span.active.disabled:focus,
|
659 |
-
.datepicker table tr td span.active:hover.disabled:focus,
|
660 |
-
.datepicker table tr td span.active.disabled.disabled:focus,
|
661 |
-
.datepicker table tr td span.active.disabled:hover.disabled:focus,
|
662 |
-
.datepicker table tr td span.active[disabled]:focus,
|
663 |
-
.datepicker table tr td span.active:hover[disabled]:focus,
|
664 |
-
.datepicker table tr td span.active.disabled[disabled]:focus,
|
665 |
-
.datepicker table tr td span.active.disabled:hover[disabled]:focus,
|
666 |
-
fieldset[disabled] .datepicker table tr td span.active:focus,
|
667 |
-
fieldset[disabled] .datepicker table tr td span.active:hover:focus,
|
668 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:focus,
|
669 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus,
|
670 |
-
.datepicker table tr td span.active.disabled:active,
|
671 |
-
.datepicker table tr td span.active:hover.disabled:active,
|
672 |
-
.datepicker table tr td span.active.disabled.disabled:active,
|
673 |
-
.datepicker table tr td span.active.disabled:hover.disabled:active,
|
674 |
-
.datepicker table tr td span.active[disabled]:active,
|
675 |
-
.datepicker table tr td span.active:hover[disabled]:active,
|
676 |
-
.datepicker table tr td span.active.disabled[disabled]:active,
|
677 |
-
.datepicker table tr td span.active.disabled:hover[disabled]:active,
|
678 |
-
fieldset[disabled] .datepicker table tr td span.active:active,
|
679 |
-
fieldset[disabled] .datepicker table tr td span.active:hover:active,
|
680 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:active,
|
681 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:hover:active,
|
682 |
-
.datepicker table tr td span.active.disabled.active,
|
683 |
-
.datepicker table tr td span.active:hover.disabled.active,
|
684 |
-
.datepicker table tr td span.active.disabled.disabled.active,
|
685 |
-
.datepicker table tr td span.active.disabled:hover.disabled.active,
|
686 |
-
.datepicker table tr td span.active[disabled].active,
|
687 |
-
.datepicker table tr td span.active:hover[disabled].active,
|
688 |
-
.datepicker table tr td span.active.disabled[disabled].active,
|
689 |
-
.datepicker table tr td span.active.disabled:hover[disabled].active,
|
690 |
-
fieldset[disabled] .datepicker table tr td span.active.active,
|
691 |
-
fieldset[disabled] .datepicker table tr td span.active:hover.active,
|
692 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled.active,
|
693 |
-
fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
|
694 |
-
background-color: #428bca;
|
695 |
-
border-color: #357ebd;
|
696 |
-
}
|
697 |
-
.datepicker table tr td span.old,
|
698 |
-
.datepicker table tr td span.new {
|
699 |
-
color: #999999;
|
700 |
-
}
|
701 |
-
.datepicker .datepicker-switch {
|
702 |
-
width: 145px;
|
703 |
-
}
|
704 |
-
.datepicker thead tr:first-child th,
|
705 |
-
.datepicker tfoot tr th {
|
706 |
-
cursor: pointer;
|
707 |
-
}
|
708 |
-
.datepicker thead tr:first-child th:hover,
|
709 |
-
.datepicker tfoot tr th:hover {
|
710 |
-
background: #eeeeee;
|
711 |
-
}
|
712 |
-
.datepicker .cw {
|
713 |
-
font-size: 10px;
|
714 |
-
width: 12px;
|
715 |
-
padding: 0 2px 0 5px;
|
716 |
-
vertical-align: middle;
|
717 |
-
}
|
718 |
-
.datepicker thead tr:first-child .cw {
|
719 |
-
cursor: default;
|
720 |
-
background-color: transparent;
|
721 |
-
}
|
722 |
-
.input-group.date .input-group-addon {
|
723 |
-
cursor: pointer;
|
724 |
-
}
|
725 |
-
.input-daterange {
|
726 |
-
width: 100%;
|
727 |
-
}
|
728 |
-
.input-daterange input {
|
729 |
-
text-align: center;
|
730 |
-
}
|
731 |
-
.input-daterange input:first-child {
|
732 |
-
border-radius: 3px 0 0 3px;
|
733 |
-
}
|
734 |
-
.input-daterange input:last-child {
|
735 |
-
border-radius: 0 3px 3px 0;
|
736 |
-
}
|
737 |
-
.input-daterange .input-group-addon {
|
738 |
-
width: auto;
|
739 |
-
min-width: 16px;
|
740 |
-
padding: 4px 5px;
|
741 |
-
font-weight: normal;
|
742 |
-
line-height: 1.42857143;
|
743 |
-
text-align: center;
|
744 |
-
text-shadow: 0 1px 0 #fff;
|
745 |
-
vertical-align: middle;
|
746 |
-
background-color: #eeeeee;
|
747 |
-
border: solid #cccccc;
|
748 |
-
border-width: 1px 0;
|
749 |
-
margin-left: -5px;
|
750 |
-
margin-right: -5px;
|
751 |
-
}
|
752 |
-
.datepicker.dropdown-menu {
|
753 |
-
position: absolute;
|
754 |
-
top: 100%;
|
755 |
-
left: 0;
|
756 |
-
z-index: 1000;
|
757 |
-
float: left;
|
758 |
-
display: none;
|
759 |
-
min-width: 160px;
|
760 |
-
list-style: none;
|
761 |
-
background-color: #ffffff;
|
762 |
-
border: 1px solid #ccc;
|
763 |
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
764 |
-
border-radius: 5px;
|
765 |
-
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
766 |
-
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
767 |
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
768 |
-
-webkit-background-clip: padding-box;
|
769 |
-
-moz-background-clip: padding;
|
770 |
-
background-clip: padding-box;
|
771 |
-
*border-right-width: 2px;
|
772 |
-
*border-bottom-width: 2px;
|
773 |
-
color: #333333;
|
774 |
-
font-size: 13px;
|
775 |
-
line-height: 1.42857143;
|
776 |
-
}
|
777 |
-
.datepicker.dropdown-menu th,
|
778 |
-
.datepicker.datepicker-inline th,
|
779 |
-
.datepicker.dropdown-menu td,
|
780 |
-
.datepicker.datepicker-inline td {
|
781 |
-
padding: 0px 5px;
|
782 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.datetimepicker.css
ADDED
@@ -0,0 +1,432 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Datetimepicker for Bootstrap 3
|
3 |
+
* version : 4.17.47
|
4 |
+
* https://github.com/Eonasdan/bootstrap-datetimepicker/
|
5 |
+
*/
|
6 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget {
|
7 |
+
list-style: none;
|
8 |
+
}
|
9 |
+
|
10 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu {
|
11 |
+
display: block;
|
12 |
+
margin: 2px 0;
|
13 |
+
padding: 4px;
|
14 |
+
width: 19em;
|
15 |
+
}
|
16 |
+
|
17 |
+
@media (min-width: 768px) {
|
18 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
|
19 |
+
width: 38em;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
@media (min-width: 992px) {
|
24 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
|
25 |
+
width: 38em;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
@media (min-width: 1200px) {
|
30 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
|
31 |
+
width: 38em;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu:before,
|
36 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu:after {
|
37 |
+
content: '';
|
38 |
+
display: inline-block;
|
39 |
+
position: absolute;
|
40 |
+
}
|
41 |
+
|
42 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.bottom:before {
|
43 |
+
border-left: 7px solid transparent;
|
44 |
+
border-right: 7px solid transparent;
|
45 |
+
border-bottom: 7px solid #ccc;
|
46 |
+
border-bottom-color: rgba(0, 0, 0, 0.2);
|
47 |
+
top: -7px;
|
48 |
+
left: 7px;
|
49 |
+
}
|
50 |
+
|
51 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.bottom:after {
|
52 |
+
border-left: 6px solid transparent;
|
53 |
+
border-right: 6px solid transparent;
|
54 |
+
border-bottom: 6px solid white;
|
55 |
+
top: -6px;
|
56 |
+
left: 8px;
|
57 |
+
}
|
58 |
+
|
59 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.top:before {
|
60 |
+
border-left: 7px solid transparent;
|
61 |
+
border-right: 7px solid transparent;
|
62 |
+
border-top: 7px solid #ccc;
|
63 |
+
border-top-color: rgba(0, 0, 0, 0.2);
|
64 |
+
bottom: -7px;
|
65 |
+
left: 6px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.top:after {
|
69 |
+
border-left: 6px solid transparent;
|
70 |
+
border-right: 6px solid transparent;
|
71 |
+
border-top: 6px solid white;
|
72 |
+
bottom: -6px;
|
73 |
+
left: 7px;
|
74 |
+
}
|
75 |
+
|
76 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before {
|
77 |
+
left: auto;
|
78 |
+
right: 6px;
|
79 |
+
}
|
80 |
+
|
81 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after {
|
82 |
+
left: auto;
|
83 |
+
right: 7px;
|
84 |
+
}
|
85 |
+
|
86 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .list-unstyled {
|
87 |
+
margin: 0;
|
88 |
+
}
|
89 |
+
|
90 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget a[data-action] {
|
91 |
+
padding: 6px 0;
|
92 |
+
}
|
93 |
+
|
94 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget a[data-action]:active {
|
95 |
+
box-shadow: none;
|
96 |
+
}
|
97 |
+
|
98 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .timepicker-hour,
|
99 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .timepicker-minute,
|
100 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .timepicker-second {
|
101 |
+
width: 54px;
|
102 |
+
font-weight: bold;
|
103 |
+
font-size: 1.2em;
|
104 |
+
margin: 0;
|
105 |
+
}
|
106 |
+
|
107 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget button[data-action] {
|
108 |
+
padding: 6px;
|
109 |
+
}
|
110 |
+
|
111 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after {
|
112 |
+
position: absolute;
|
113 |
+
width: 1px;
|
114 |
+
height: 1px;
|
115 |
+
margin: -1px;
|
116 |
+
padding: 0;
|
117 |
+
overflow: hidden;
|
118 |
+
clip: rect(0, 0, 0, 0);
|
119 |
+
border: 0;
|
120 |
+
content: "Increment Hours";
|
121 |
+
}
|
122 |
+
|
123 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after {
|
124 |
+
position: absolute;
|
125 |
+
width: 1px;
|
126 |
+
height: 1px;
|
127 |
+
margin: -1px;
|
128 |
+
padding: 0;
|
129 |
+
overflow: hidden;
|
130 |
+
clip: rect(0, 0, 0, 0);
|
131 |
+
border: 0;
|
132 |
+
content: "Increment Minutes";
|
133 |
+
}
|
134 |
+
|
135 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after {
|
136 |
+
position: absolute;
|
137 |
+
width: 1px;
|
138 |
+
height: 1px;
|
139 |
+
margin: -1px;
|
140 |
+
padding: 0;
|
141 |
+
overflow: hidden;
|
142 |
+
clip: rect(0, 0, 0, 0);
|
143 |
+
border: 0;
|
144 |
+
content: "Decrement Hours";
|
145 |
+
}
|
146 |
+
|
147 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after {
|
148 |
+
position: absolute;
|
149 |
+
width: 1px;
|
150 |
+
height: 1px;
|
151 |
+
margin: -1px;
|
152 |
+
padding: 0;
|
153 |
+
overflow: hidden;
|
154 |
+
clip: rect(0, 0, 0, 0);
|
155 |
+
border: 0;
|
156 |
+
content: "Decrement Minutes";
|
157 |
+
}
|
158 |
+
|
159 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after {
|
160 |
+
position: absolute;
|
161 |
+
width: 1px;
|
162 |
+
height: 1px;
|
163 |
+
margin: -1px;
|
164 |
+
padding: 0;
|
165 |
+
overflow: hidden;
|
166 |
+
clip: rect(0, 0, 0, 0);
|
167 |
+
border: 0;
|
168 |
+
content: "Show Hours";
|
169 |
+
}
|
170 |
+
|
171 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after {
|
172 |
+
position: absolute;
|
173 |
+
width: 1px;
|
174 |
+
height: 1px;
|
175 |
+
margin: -1px;
|
176 |
+
padding: 0;
|
177 |
+
overflow: hidden;
|
178 |
+
clip: rect(0, 0, 0, 0);
|
179 |
+
border: 0;
|
180 |
+
content: "Show Minutes";
|
181 |
+
}
|
182 |
+
|
183 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after {
|
184 |
+
position: absolute;
|
185 |
+
width: 1px;
|
186 |
+
height: 1px;
|
187 |
+
margin: -1px;
|
188 |
+
padding: 0;
|
189 |
+
overflow: hidden;
|
190 |
+
clip: rect(0, 0, 0, 0);
|
191 |
+
border: 0;
|
192 |
+
content: "Toggle AM/PM";
|
193 |
+
}
|
194 |
+
|
195 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="clear"]::after {
|
196 |
+
position: absolute;
|
197 |
+
width: 1px;
|
198 |
+
height: 1px;
|
199 |
+
margin: -1px;
|
200 |
+
padding: 0;
|
201 |
+
overflow: hidden;
|
202 |
+
clip: rect(0, 0, 0, 0);
|
203 |
+
border: 0;
|
204 |
+
content: "Clear the picker";
|
205 |
+
}
|
206 |
+
|
207 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .btn[data-action="today"]::after {
|
208 |
+
position: absolute;
|
209 |
+
width: 1px;
|
210 |
+
height: 1px;
|
211 |
+
margin: -1px;
|
212 |
+
padding: 0;
|
213 |
+
overflow: hidden;
|
214 |
+
clip: rect(0, 0, 0, 0);
|
215 |
+
border: 0;
|
216 |
+
content: "Set the date to today";
|
217 |
+
}
|
218 |
+
|
219 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .picker-switch {
|
220 |
+
text-align: center;
|
221 |
+
}
|
222 |
+
|
223 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .picker-switch::after {
|
224 |
+
position: absolute;
|
225 |
+
width: 1px;
|
226 |
+
height: 1px;
|
227 |
+
margin: -1px;
|
228 |
+
padding: 0;
|
229 |
+
overflow: hidden;
|
230 |
+
clip: rect(0, 0, 0, 0);
|
231 |
+
border: 0;
|
232 |
+
content: "Toggle Date and Time Screens";
|
233 |
+
}
|
234 |
+
|
235 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .picker-switch td {
|
236 |
+
padding: 0;
|
237 |
+
margin: 0;
|
238 |
+
height: auto;
|
239 |
+
width: auto;
|
240 |
+
line-height: inherit;
|
241 |
+
}
|
242 |
+
|
243 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .picker-switch td span {
|
244 |
+
line-height: 2.5;
|
245 |
+
height: 2.5em;
|
246 |
+
width: 100%;
|
247 |
+
}
|
248 |
+
|
249 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table {
|
250 |
+
width: 100%;
|
251 |
+
margin: 0;
|
252 |
+
}
|
253 |
+
|
254 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td,
|
255 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table th {
|
256 |
+
text-align: center;
|
257 |
+
border-radius: 4px;
|
258 |
+
}
|
259 |
+
|
260 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table th {
|
261 |
+
height: 20px;
|
262 |
+
line-height: 20px;
|
263 |
+
width: 20px;
|
264 |
+
}
|
265 |
+
|
266 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table th.picker-switch {
|
267 |
+
width: 145px;
|
268 |
+
}
|
269 |
+
|
270 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table th.disabled,
|
271 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table th.disabled:hover {
|
272 |
+
background: none;
|
273 |
+
color: #777777;
|
274 |
+
cursor: not-allowed;
|
275 |
+
}
|
276 |
+
|
277 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table th.prev::after {
|
278 |
+
position: absolute;
|
279 |
+
width: 1px;
|
280 |
+
height: 1px;
|
281 |
+
margin: -1px;
|
282 |
+
padding: 0;
|
283 |
+
overflow: hidden;
|
284 |
+
clip: rect(0, 0, 0, 0);
|
285 |
+
border: 0;
|
286 |
+
content: "Previous Month";
|
287 |
+
}
|
288 |
+
|
289 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table th.next::after {
|
290 |
+
position: absolute;
|
291 |
+
width: 1px;
|
292 |
+
height: 1px;
|
293 |
+
margin: -1px;
|
294 |
+
padding: 0;
|
295 |
+
overflow: hidden;
|
296 |
+
clip: rect(0, 0, 0, 0);
|
297 |
+
border: 0;
|
298 |
+
content: "Next Month";
|
299 |
+
}
|
300 |
+
|
301 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table thead tr:first-child th {
|
302 |
+
cursor: pointer;
|
303 |
+
}
|
304 |
+
|
305 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
|
306 |
+
background: #eeeeee;
|
307 |
+
}
|
308 |
+
|
309 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td {
|
310 |
+
height: 54px;
|
311 |
+
line-height: 54px;
|
312 |
+
width: 54px;
|
313 |
+
}
|
314 |
+
|
315 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.cw {
|
316 |
+
font-size: .8em;
|
317 |
+
height: 20px;
|
318 |
+
line-height: 20px;
|
319 |
+
color: #777777;
|
320 |
+
}
|
321 |
+
|
322 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.day {
|
323 |
+
height: 20px;
|
324 |
+
line-height: 20px;
|
325 |
+
width: 20px;
|
326 |
+
}
|
327 |
+
|
328 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.day:hover,
|
329 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.hour:hover,
|
330 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.minute:hover,
|
331 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.second:hover {
|
332 |
+
background: #eeeeee;
|
333 |
+
cursor: pointer;
|
334 |
+
}
|
335 |
+
|
336 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.old,
|
337 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.new {
|
338 |
+
color: #777777;
|
339 |
+
}
|
340 |
+
|
341 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.today {
|
342 |
+
position: relative;
|
343 |
+
}
|
344 |
+
|
345 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.today:before {
|
346 |
+
content: '';
|
347 |
+
display: inline-block;
|
348 |
+
border: solid transparent;
|
349 |
+
border-width: 0 0 7px 7px;
|
350 |
+
border-bottom-color: #337ab7;
|
351 |
+
border-top-color: rgba(0, 0, 0, 0.2);
|
352 |
+
position: absolute;
|
353 |
+
bottom: 4px;
|
354 |
+
right: 4px;
|
355 |
+
}
|
356 |
+
|
357 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.active,
|
358 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.active:hover {
|
359 |
+
background-color: #337ab7;
|
360 |
+
color: #fff;
|
361 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
362 |
+
}
|
363 |
+
|
364 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.active.today:before {
|
365 |
+
border-bottom-color: #fff;
|
366 |
+
}
|
367 |
+
|
368 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.disabled,
|
369 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td.disabled:hover {
|
370 |
+
background: none;
|
371 |
+
color: #777777;
|
372 |
+
cursor: not-allowed;
|
373 |
+
}
|
374 |
+
|
375 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td span {
|
376 |
+
display: inline-block;
|
377 |
+
width: 54px;
|
378 |
+
height: 54px;
|
379 |
+
line-height: 54px;
|
380 |
+
margin: 2px 1.5px;
|
381 |
+
cursor: pointer;
|
382 |
+
border-radius: 4px;
|
383 |
+
}
|
384 |
+
|
385 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td span:hover {
|
386 |
+
background: #eeeeee;
|
387 |
+
}
|
388 |
+
|
389 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td span.active {
|
390 |
+
background-color: #337ab7;
|
391 |
+
color: #fff;
|
392 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
393 |
+
}
|
394 |
+
|
395 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td span.old {
|
396 |
+
color: #777777;
|
397 |
+
}
|
398 |
+
|
399 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td span.disabled,
|
400 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget table td span.disabled:hover {
|
401 |
+
background: none;
|
402 |
+
color: #777777;
|
403 |
+
cursor: not-allowed;
|
404 |
+
}
|
405 |
+
|
406 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.usetwentyfour td.hour {
|
407 |
+
height: 27px;
|
408 |
+
line-height: 27px;
|
409 |
+
}
|
410 |
+
|
411 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget.wider {
|
412 |
+
width: 21em;
|
413 |
+
}
|
414 |
+
|
415 |
+
.factory-bootstrap-330 .bootstrap-datetimepicker-widget .datepicker-decades .decade {
|
416 |
+
line-height: 1.8em !important;
|
417 |
+
}
|
418 |
+
|
419 |
+
.factory-bootstrap-330 .input-group.date .input-group-addon {
|
420 |
+
cursor: pointer;
|
421 |
+
}
|
422 |
+
|
423 |
+
.factory-bootstrap-330 .sr-only {
|
424 |
+
position: absolute;
|
425 |
+
width: 1px;
|
426 |
+
height: 1px;
|
427 |
+
margin: -1px;
|
428 |
+
padding: 0;
|
429 |
+
overflow: hidden;
|
430 |
+
clip: rect(0, 0, 0, 0);
|
431 |
+
border: 0;
|
432 |
+
}
|
libs/factory/bootstrap/assets/flat/css/bootstrap.ectoplasm.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .btn-primary {
|
2 |
-
background: #a3b745;
|
3 |
-
border-color: #839237;
|
4 |
-
color: white;
|
5 |
-
-webkit-box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15);
|
6 |
-
box-shadow: inset 0 1px 0 #c0cd7b, 0 1px 0 rgba(0, 0, 0, 0.15);
|
7 |
-
}
|
8 |
-
.factory-bootstrap-330 .btn-primary:hover,
|
9 |
-
.factory-bootstrap-330 .btn-primary:focus {
|
10 |
-
background: #89993a;
|
11 |
-
border-color: #727f30;
|
12 |
-
color: white;
|
13 |
-
-webkit-box-shadow: inset 0 1px 0 #b7c669, 0 1px 0 rgba(0, 0, 0, 0.15);
|
14 |
-
box-shadow: inset 0 1px 0 #b7c669, 0 1px 0 rgba(0, 0, 0, 0.15);
|
15 |
-
}
|
16 |
-
.factory-bootstrap-330 .btn-primary:active {
|
17 |
-
background: #89993a;
|
18 |
-
border-color: #727f30;
|
19 |
-
color: white;
|
20 |
-
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
21 |
-
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
22 |
-
}
|
23 |
-
.factory-bootstrap-330 .btn-primary[disabled],
|
24 |
-
.factory-bootstrap-330 .btn-primary:disabled {
|
25 |
-
color: #cfd1c7 !important;
|
26 |
-
background: #89993a !important;
|
27 |
-
border-color: #727f30 !important;
|
28 |
-
text-shadow: none !important;
|
29 |
-
}
|
30 |
-
|
31 |
-
.factory-bootstrap-330 .btn-group .btn.active.value {
|
32 |
-
background-color: #a3b745;
|
33 |
-
-webkit-box-shadow: inset 0 1px 2px #839237;
|
34 |
-
box-shadow: inset 0 1px 2px #839237;
|
35 |
-
border-top: 1px solid #839237;
|
36 |
-
border-bottom: 1px solid #839237;
|
37 |
-
border-left: 1px solid #839237;
|
38 |
-
}
|
39 |
-
|
40 |
-
.factory-bootstrap-330 .pagination > .active > a,
|
41 |
-
.factory-bootstrap-330 .pagination > .active > span,
|
42 |
-
.factory-bootstrap-330 .pagination > .active > a:hover,
|
43 |
-
.factory-bootstrap-330 .pagination > .active > span:hover,
|
44 |
-
.factory-bootstrap-330 .pagination > .active > a:focus,
|
45 |
-
.factory-bootstrap-330 .pagination > .active > span:focus {
|
46 |
-
background-color: #a3b745;
|
47 |
-
border-color: #839237;
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.form-metabox.css
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Form Metaboxes
|
3 |
-
*/
|
4 |
-
|
5 |
-
.factory-form-metabox {
|
6 |
-
padding: 15px 10px 10px 10px;
|
7 |
-
}
|
8 |
-
.factory-form-metabox .control-group:last-child {
|
9 |
-
margin-bottom: 0px;
|
10 |
-
}
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Side form metaboxes
|
14 |
-
*/
|
15 |
-
|
16 |
-
#side-sortables .factory-bootstrap-330 .control-label {
|
17 |
-
float: left;
|
18 |
-
width: 100%;
|
19 |
-
text-align: left;
|
20 |
-
position: relative;
|
21 |
-
top: 1px;
|
22 |
-
}
|
23 |
-
#side-sortables .factory-bootstrap-330 .control-icon {
|
24 |
-
float: left;
|
25 |
-
margin: 0 6px 0 0;
|
26 |
-
}
|
27 |
-
#side-sortables .factory-bootstrap-330 input
|
28 |
-
{
|
29 |
-
float: right;
|
30 |
-
position: relative;
|
31 |
-
top: -25px;
|
32 |
-
}
|
33 |
-
#side-sortables .factory-bootstrap-330 .help-block {
|
34 |
-
|
35 |
-
}
|
36 |
-
#side-sortables .factory-bootstrap-330 .col-sm-10 {
|
37 |
-
margin: 0px;
|
38 |
-
width: 100%;
|
39 |
-
}
|
40 |
-
#side-sortables .factory-bootstrap-330 .form-group {
|
41 |
-
float: none;
|
42 |
-
margin-top: 0px;
|
43 |
-
width: auto;
|
44 |
-
overflow: auto;
|
45 |
-
}
|
46 |
-
#side-sortables .factory-bootstrap-330 .form-group {
|
47 |
-
margin-bottom: 0px;
|
48 |
-
border-top: 1px solid #f7f7f7;
|
49 |
-
padding-top: 15px;
|
50 |
-
margin-top: 15px;
|
51 |
-
}
|
52 |
-
#side-sortables .factory-bootstrap-330 .form-group:first-child {
|
53 |
-
border-top: 0px;
|
54 |
-
padding-top: 0px;
|
55 |
-
margin-top: 0px;
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.midnight.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .btn-primary {
|
2 |
-
background: #e14d43;
|
3 |
-
border-color: #d02a21;
|
4 |
-
color: white;
|
5 |
-
-webkit-box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15);
|
6 |
-
box-shadow: inset 0 1px 0 #ec8a85, 0 1px 0 rgba(0, 0, 0, 0.15);
|
7 |
-
}
|
8 |
-
.factory-bootstrap-330 .btn-primary:hover,
|
9 |
-
.factory-bootstrap-330 .btn-primary:focus {
|
10 |
-
background: #d92c23;
|
11 |
-
border-color: #ba251e;
|
12 |
-
color: white;
|
13 |
-
-webkit-box-shadow: inset 0 1px 0 #e8756f, 0 1px 0 rgba(0, 0, 0, 0.15);
|
14 |
-
box-shadow: inset 0 1px 0 #e8756f, 0 1px 0 rgba(0, 0, 0, 0.15);
|
15 |
-
}
|
16 |
-
.factory-bootstrap-330 .btn-primary:active {
|
17 |
-
background: #d92c23;
|
18 |
-
border-color: #ba251e;
|
19 |
-
color: white;
|
20 |
-
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
21 |
-
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
22 |
-
}
|
23 |
-
.factory-bootstrap-330 .btn-primary[disabled],
|
24 |
-
.factory-bootstrap-330 .btn-primary:disabled {
|
25 |
-
color: #d1c7c7 !important;
|
26 |
-
background: #d92c23 !important;
|
27 |
-
border-color: #ba251e !important;
|
28 |
-
text-shadow: none !important;
|
29 |
-
}
|
30 |
-
|
31 |
-
.factory-bootstrap-330 .btn-group .btn.active.value {
|
32 |
-
background-color: #e14d43;
|
33 |
-
-webkit-box-shadow: inset 0 1px 2px #d02a21;
|
34 |
-
box-shadow: inset 0 1px 2px #d02a21;
|
35 |
-
border-top: 1px solid #d02a21;
|
36 |
-
border-bottom: 1px solid #d02a21;
|
37 |
-
border-left: 1px solid #d02a21;
|
38 |
-
}
|
39 |
-
|
40 |
-
.factory-bootstrap-330 .pagination > .active > a,
|
41 |
-
.factory-bootstrap-330 .pagination > .active > span,
|
42 |
-
.factory-bootstrap-330 .pagination > .active > a:hover,
|
43 |
-
.factory-bootstrap-330 .pagination > .active > span:hover,
|
44 |
-
.factory-bootstrap-330 .pagination > .active > a:focus,
|
45 |
-
.factory-bootstrap-330 .pagination > .active > span:focus {
|
46 |
-
background-color: #e14d43;
|
47 |
-
border-color: #d02a21;
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.ocean.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .btn-primary {
|
2 |
-
background: #9ebaa0;
|
3 |
-
border-color: #80a583;
|
4 |
-
color: white;
|
5 |
-
-webkit-box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15);
|
6 |
-
box-shadow: inset 0 1px 0 #cbdacc, 0 1px 0 rgba(0, 0, 0, 0.15);
|
7 |
-
}
|
8 |
-
.factory-bootstrap-330 .btn-primary:hover,
|
9 |
-
.factory-bootstrap-330 .btn-primary:focus {
|
10 |
-
background: #86a988;
|
11 |
-
border-color: #719a74;
|
12 |
-
color: white;
|
13 |
-
-webkit-box-shadow: inset 0 1px 0 #bccfbd, 0 1px 0 rgba(0, 0, 0, 0.15);
|
14 |
-
box-shadow: inset 0 1px 0 #bccfbd, 0 1px 0 rgba(0, 0, 0, 0.15);
|
15 |
-
}
|
16 |
-
.factory-bootstrap-330 .btn-primary:active {
|
17 |
-
background: #86a988;
|
18 |
-
border-color: #719a74;
|
19 |
-
color: white;
|
20 |
-
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
21 |
-
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
22 |
-
}
|
23 |
-
.factory-bootstrap-330 .btn-primary[disabled],
|
24 |
-
.factory-bootstrap-330 .btn-primary:disabled {
|
25 |
-
color: #c7d1c8 !important;
|
26 |
-
background: #86a988 !important;
|
27 |
-
border-color: #719a74 !important;
|
28 |
-
text-shadow: none !important;
|
29 |
-
}
|
30 |
-
|
31 |
-
.factory-bootstrap-330 .btn-group .btn.active.value {
|
32 |
-
background-color: #9ebaa0;
|
33 |
-
-webkit-box-shadow: inset 0 1px 2px #80a583;
|
34 |
-
box-shadow: inset 0 1px 2px #80a583;
|
35 |
-
border-top: 1px solid #80a583;
|
36 |
-
border-bottom: 1px solid #80a583;
|
37 |
-
border-left: 1px solid #80a583;
|
38 |
-
}
|
39 |
-
|
40 |
-
.factory-bootstrap-330 .pagination > .active > a,
|
41 |
-
.factory-bootstrap-330 .pagination > .active > span,
|
42 |
-
.factory-bootstrap-330 .pagination > .active > a:hover,
|
43 |
-
.factory-bootstrap-330 .pagination > .active > span:hover,
|
44 |
-
.factory-bootstrap-330 .pagination > .active > a:focus,
|
45 |
-
.factory-bootstrap-330 .pagination > .active > span:focus {
|
46 |
-
background-color: #9ebaa0;
|
47 |
-
border-color: #80a583;
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.sunrise.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .btn-primary {
|
2 |
-
background: #dd823b;
|
3 |
-
border-color: #c36822;
|
4 |
-
color: white;
|
5 |
-
-webkit-box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15);
|
6 |
-
box-shadow: inset 0 1px 0 #e8ab7c, 0 1px 0 rgba(0, 0, 0, 0.15);
|
7 |
-
}
|
8 |
-
.factory-bootstrap-330 .btn-primary:hover,
|
9 |
-
.factory-bootstrap-330 .btn-primary:focus {
|
10 |
-
background: #cc6c23;
|
11 |
-
border-color: #ad5c1e;
|
12 |
-
color: white;
|
13 |
-
-webkit-box-shadow: inset 0 1px 0 #e59d66, 0 1px 0 rgba(0, 0, 0, 0.15);
|
14 |
-
box-shadow: inset 0 1px 0 #e59d66, 0 1px 0 rgba(0, 0, 0, 0.15);
|
15 |
-
}
|
16 |
-
.factory-bootstrap-330 .btn-primary:active {
|
17 |
-
background: #cc6c23;
|
18 |
-
border-color: #ad5c1e;
|
19 |
-
color: white;
|
20 |
-
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
21 |
-
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
22 |
-
}
|
23 |
-
.factory-bootstrap-330 .btn-primary[disabled],
|
24 |
-
.factory-bootstrap-330 .btn-primary:disabled {
|
25 |
-
color: #d1cbc7 !important;
|
26 |
-
background: #cc6c23 !important;
|
27 |
-
border-color: #ad5c1e !important;
|
28 |
-
text-shadow: none !important;
|
29 |
-
}
|
30 |
-
|
31 |
-
.factory-bootstrap-330 .btn-group .btn.active.value {
|
32 |
-
background-color: #dd823b;
|
33 |
-
-webkit-box-shadow: inset 0 1px 2px #c36822;
|
34 |
-
box-shadow: inset 0 1px 2px #c36822;
|
35 |
-
border-top: 1px solid #c36822;
|
36 |
-
border-bottom: 1px solid #c36822;
|
37 |
-
border-left: 1px solid #c36822;
|
38 |
-
}
|
39 |
-
|
40 |
-
.factory-bootstrap-330 .pagination > .active > a,
|
41 |
-
.factory-bootstrap-330 .pagination > .active > span,
|
42 |
-
.factory-bootstrap-330 .pagination > .active > a:hover,
|
43 |
-
.factory-bootstrap-330 .pagination > .active > span:hover,
|
44 |
-
.factory-bootstrap-330 .pagination > .active > a:focus,
|
45 |
-
.factory-bootstrap-330 .pagination > .active > span:focus {
|
46 |
-
background-color: #dd823b;
|
47 |
-
border-color: #c36822;
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.tab.css
DELETED
@@ -1,112 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Tabs
|
3 |
-
*/
|
4 |
-
|
5 |
-
.factory-bootstrap-330 .factory-tab {
|
6 |
-
overflow: hidden;
|
7 |
-
margin-bottom: 25px;
|
8 |
-
}
|
9 |
-
|
10 |
-
.factory-bootstrap-330 .factory-tab .form-group {
|
11 |
-
overflow: hidden;
|
12 |
-
}
|
13 |
-
|
14 |
-
.factory-bootstrap-330 .factory-tab + .form-group {
|
15 |
-
margin-top: 30px;
|
16 |
-
}
|
17 |
-
|
18 |
-
.factory-bootstrap-330 .nav-tabs a {
|
19 |
-
text-decoration: none;
|
20 |
-
}
|
21 |
-
|
22 |
-
.factory-bootstrap-330 .factory-align-horizontal .nav-tabs {
|
23 |
-
border-bottom: 0px;
|
24 |
-
}
|
25 |
-
|
26 |
-
.factory-bootstrap-330 .factory-align-vertical .factory-headers {
|
27 |
-
float: left;
|
28 |
-
width: 150px;
|
29 |
-
}
|
30 |
-
|
31 |
-
.factory-bootstrap-330 .factory-align-vertical .factory-headers .nav-tabs {
|
32 |
-
border-bottom: 0px;
|
33 |
-
display: block;
|
34 |
-
margin: 0px;
|
35 |
-
-webkit-border-bottom-left-radius: 4px;
|
36 |
-
-moz-border-radius-bottomleft: 4px;
|
37 |
-
border-bottom-left-radius: 4px;
|
38 |
-
}
|
39 |
-
|
40 |
-
.factory-bootstrap-330 .factory-tab .factory-bodies {
|
41 |
-
background-color: #fff;
|
42 |
-
-webkit-border-radius: 0 3px 3px 3px;
|
43 |
-
-moz-border-radius: 0 3px 3px 3px;
|
44 |
-
border-radius: 0 3px 3px 3px;
|
45 |
-
border: 1px solid #DDD;
|
46 |
-
padding: 30px 15px 25px 10px;
|
47 |
-
}
|
48 |
-
|
49 |
-
.factory-bootstrap-330 .factory-align-vertical .factory-bodies {
|
50 |
-
min-height: 250px;
|
51 |
-
margin-left: 150px;
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
.factory-bootstrap-330 .factory-align-vertical .factory-bodies .actory-tab-item {
|
56 |
-
clear: both;
|
57 |
-
}
|
58 |
-
|
59 |
-
.factory-bootstrap-330 .form-horizontal .factory-align-vertical .form-group {
|
60 |
-
margin-left: -5px;
|
61 |
-
}
|
62 |
-
|
63 |
-
.factory-bootstrap-330 .factory-align-vertical .nav-tabs li {
|
64 |
-
float: none;
|
65 |
-
}
|
66 |
-
|
67 |
-
.factory-bootstrap-330 .factory-align-vertical .nav-tabs li a {
|
68 |
-
margin-right: -1px;
|
69 |
-
margin-bottom: 0px;
|
70 |
-
position: relative;
|
71 |
-
z-index: 10;
|
72 |
-
padding: 10px 0 9px 15px;
|
73 |
-
|
74 |
-
-webkit-border-radius: 3px;
|
75 |
-
-webkit-border-top-right-radius: 0px;
|
76 |
-
-webkit-border-bottom-right-radius: 0px;
|
77 |
-
-moz-border-radius: 3px;
|
78 |
-
-moz-border-radius-topright: 0px;
|
79 |
-
-moz-border-radius-bottomright: 0px;
|
80 |
-
border-radius: 3px;
|
81 |
-
border-top-right-radius: 0px;
|
82 |
-
border-bottom-right-radius: 0px;
|
83 |
-
}
|
84 |
-
|
85 |
-
.factory-bootstrap-330 .factory-align-vertical .nav-tabs > .active > a {
|
86 |
-
border: 1px solid #DDD !important;
|
87 |
-
border-right: 1px solid #fff !important;
|
88 |
-
}
|
89 |
-
|
90 |
-
.factory-bootstrap-330 .factory-align-vertical .nav-tabs > li a:hover {
|
91 |
-
color: #21759B;
|
92 |
-
z-index: 5;
|
93 |
-
border-color: transparent;
|
94 |
-
}
|
95 |
-
|
96 |
-
.factory-bootstrap-330 .factory-align-vertical .control-label {
|
97 |
-
width: 20%;
|
98 |
-
max-width: 140px;
|
99 |
-
}
|
100 |
-
|
101 |
-
.factory-bootstrap-330 .factory-align-vertical .factory-tab-item {
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
.factory-bootstrap-330 .factory-align-vertical .control-group {
|
106 |
-
width: 80%;
|
107 |
-
}
|
108 |
-
|
109 |
-
.factory-bootstrap-330 .factory-align-vertical .control-group input[type=text],
|
110 |
-
.factory-bootstrap-330 .factory-align-vertical .control-group textarea {
|
111 |
-
width: 90%;
|
112 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/bootstrap.wp-editor.css
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* WP Editor
|
3 |
-
*/
|
4 |
-
|
5 |
-
.factory-bootstrap-330 .wp-editor-wrap * {
|
6 |
-
-webkit-box-sizing: content-box;
|
7 |
-
-moz-box-sizing: content-box;
|
8 |
-
box-sizing: content-box;
|
9 |
-
}
|
10 |
-
.factory-bootstrap-330 .wp-editor-wrap .button,
|
11 |
-
.factory-bootstrap-330 .wp-editor-wrap textarea,
|
12 |
-
.factory-bootstrap-330 .wp-editor-wrap input {
|
13 |
-
-webkit-box-sizing: border-box;
|
14 |
-
-moz-box-sizing: border-box;
|
15 |
-
box-sizing: border-box;
|
16 |
-
}
|
17 |
-
.factory-bootstrap-330 .switch-tmce,
|
18 |
-
.factory-bootstrap-330 .switch-html {
|
19 |
-
color: #777;
|
20 |
-
}
|
21 |
-
.factory-bootstrap-330 .tmce-active .switch-tmce,
|
22 |
-
.factory-bootstrap-330 .html-active .switch-html {
|
23 |
-
color: #555;
|
24 |
-
}
|
25 |
-
.factory-bootstrap-330 .switch-tmce:hover,
|
26 |
-
.factory-bootstrap-330 .switch-html:hover {
|
27 |
-
color: #777;
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/control.color-and-opacity.css
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .factory-color-and-opacity .factory-preview-wrap {
|
2 |
-
|
3 |
-
}
|
4 |
-
|
5 |
-
.factory-bootstrap-330 .factory-control-row {
|
6 |
-
padding-left: 105px;
|
7 |
-
position: relative;
|
8 |
-
}
|
9 |
-
.factory-bootstrap-330 .factory-control-row .factory-color-wrap {
|
10 |
-
position: absolute;
|
11 |
-
left: 0px;
|
12 |
-
top: 0px;
|
13 |
-
}
|
14 |
-
.factory-bootstrap-330 .factory-control-row .factory-opacity-wrap {
|
15 |
-
width: 100%;
|
16 |
-
}
|
17 |
-
|
18 |
-
.factory-bootstrap-330 .factory-picker-target {
|
19 |
-
|
20 |
-
}
|
21 |
-
|
22 |
-
.factory-bootstrap-330 .iris-picker {
|
23 |
-
margin-top: 10px;
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/control.color.css
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .factory-color {
|
2 |
-
position: relative;
|
3 |
-
}
|
4 |
-
|
5 |
-
.factory-bootstrap-330 .factory-color .factory-color-hex {
|
6 |
-
display: inline-block;
|
7 |
-
width: 65px;
|
8 |
-
text-align: left;
|
9 |
-
vertical-align: top;
|
10 |
-
border-radius: 0px;
|
11 |
-
border-top-right-radius: 3px;
|
12 |
-
border-bottom-right-radius: 3px;
|
13 |
-
border-radius: 3px;
|
14 |
-
z-index: 1;
|
15 |
-
position: relative;
|
16 |
-
margin-left: 26px;
|
17 |
-
border-top-left-radius: 0px;
|
18 |
-
border-bottom-left-radius: 0px;
|
19 |
-
}
|
20 |
-
|
21 |
-
.factory-bootstrap-330 .factory-color .factory-pattern,
|
22 |
-
.factory-bootstrap-330 .factory-color .factory-background {
|
23 |
-
cursor: pointer;
|
24 |
-
}
|
25 |
-
|
26 |
-
.factory-bootstrap-330 .factory-color .factory-pattern,
|
27 |
-
.factory-bootstrap-330 .factory-color .factory-background {
|
28 |
-
height: 26px;
|
29 |
-
width: 26px;
|
30 |
-
position: absolute;
|
31 |
-
border-radius: 5px;
|
32 |
-
background: transparent url('../../images/color_picker_pattern.jpg') center center repeat;
|
33 |
-
-moz-box-sizing: border-box;
|
34 |
-
box-sizing: border-box;
|
35 |
-
border-bottom: 2px solid rgba(0, 0, 0, 0.34);
|
36 |
-
z-index: 1;
|
37 |
-
border-top-right-radius: 0px !important;
|
38 |
-
border-bottom-right-radius: 0px !important;
|
39 |
-
}
|
40 |
-
|
41 |
-
.factory-bootstrap-330 .factory-color .factory-background {
|
42 |
-
z-index: 2;
|
43 |
-
border-radius: 3px;
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/control.dropdown-and-colors.css
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .factory-dropdown-and-colors .factory-colors-wrap,
|
2 |
-
.factory-bootstrap-330 .factory-dropdown-and-colors .factory-dropdown-wrap {
|
3 |
-
display: inline-block;
|
4 |
-
}
|
5 |
-
|
6 |
-
.factory-bootstrap-330 .factory-dropdown-and-colors .factory-dropdown-wrap {
|
7 |
-
min-width: 200px;
|
8 |
-
max-width: 300px;
|
9 |
-
}
|
10 |
-
|
11 |
-
/*.factory-bootstrap-330 .factory-from-radio-label, .factory-bootstrap-330 .factory-from-radio-label > span {
|
12 |
-
-webkit-transition: all 0.3s;
|
13 |
-
-moz-transition: all 0.3s;
|
14 |
-
-o-transition: all 0.3s;
|
15 |
-
transition: all 0.3s;
|
16 |
-
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/control.fonts.css
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .factory-font .factory-control-row {
|
2 |
-
padding:0;
|
3 |
-
vertical-align: top;
|
4 |
-
}
|
5 |
-
.factory-bootstrap-330 .factory-font .factory-color-wrap {
|
6 |
-
position:static;
|
7 |
-
display:inline-block;
|
8 |
-
vertical-align: top;
|
9 |
-
}
|
10 |
-
.factory-bootstrap-330 .factory-font .factory-size-wrap {
|
11 |
-
display:inline-block;
|
12 |
-
width: 70px;
|
13 |
-
vertical-align: top;
|
14 |
-
}
|
15 |
-
.factory-bootstrap-330 .iris-picker {
|
16 |
-
margin-top: 10px;
|
17 |
-
}
|
18 |
-
.factory-bootstrap-330 .factory-font .factory-family-wrap {
|
19 |
-
padding-bottom: 10px;
|
20 |
-
}
|
21 |
-
|
22 |
-
.factory-bootstrap-330 .factory-font .chosen-results {
|
23 |
-
max-height: 150px;
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/control.integer.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
|
|
libs/factory/bootstrap/assets/flat/css/control.list.css
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
|
2 |
-
.factory-bootstrap-330 .factory-list li input {
|
3 |
-
margin: 0 5px 0 0;
|
4 |
-
position: relative;
|
5 |
-
top: 1px;
|
6 |
-
outline: none !important;
|
7 |
-
}
|
8 |
-
.factory-bootstrap-330 .factory-list li span {
|
9 |
-
vertical-align: bottom;
|
10 |
-
line-height: 100%;
|
11 |
-
}
|
12 |
-
|
13 |
-
/* erorrs */
|
14 |
-
|
15 |
-
.factory-bootstrap-330 .factory-list .factory-error {
|
16 |
-
position: relative;
|
17 |
-
display: inline-block;
|
18 |
-
}
|
19 |
-
.factory-bootstrap-330 .factory-list .factory-error i {
|
20 |
-
color: #f47665;
|
21 |
-
margin: 0 7px 0 1px;
|
22 |
-
cursor: help;
|
23 |
-
}
|
24 |
-
.factory-bootstrap-330 .factory-list .factory-error-text {
|
25 |
-
display: none;
|
26 |
-
position: absolute;
|
27 |
-
width: 300px;
|
28 |
-
}
|
29 |
-
.factory-bootstrap-330 .factory-list .factory-error-text,
|
30 |
-
.factory-bootstrap-330 .factory-list-error {
|
31 |
-
background-color: rgba(0,0,0,0.8);
|
32 |
-
white-space: normal;
|
33 |
-
z-index: 10;
|
34 |
-
padding: 10px 12px 12px 12px;
|
35 |
-
font-weight: normal;
|
36 |
-
line-height: 150%;
|
37 |
-
border-radius: 4px;
|
38 |
-
color: #fff;
|
39 |
-
font-size: 13px;
|
40 |
-
margin-top: 2px;
|
41 |
-
}
|
42 |
-
.factory-bootstrap-330 .factory-list-error {
|
43 |
-
padding: 5px 10px;
|
44 |
-
max-width: 500px;
|
45 |
-
display: inline-block;
|
46 |
-
}
|
47 |
-
.factory-bootstrap-330 .factory-list-error i {
|
48 |
-
margin: 0 7px 0 1px;
|
49 |
-
}
|
50 |
-
.factory-bootstrap-330 .factory-list .factory-error-text a {
|
51 |
-
color: #fff;
|
52 |
-
font-weight: bold;
|
53 |
-
}
|
54 |
-
.factory-bootstrap-330 .factory-list .factory-has-error:hover .factory-error-text {
|
55 |
-
display: block;
|
56 |
-
}
|
57 |
-
.factory-bootstrap-330 .factory-list .factory-has-error {
|
58 |
-
cursor: default;
|
59 |
-
}
|
60 |
-
.opanda-connect-buttons .opanda-has-error .opanda-error {
|
61 |
-
display: inline-block;
|
62 |
-
}
|
63 |
-
|
64 |
-
.factory-bootstrap-330 .factory-checklist-way.factory-empty {
|
65 |
-
font-style: italic;
|
66 |
-
margin-top: 7px;
|
67 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/control.multiple-textbox.css
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.factory-bootstrap-330 .factory-mtextbox-item {
|
2 |
+
position: relative;
|
3 |
+
margin-bottom: 5px;
|
4 |
+
}
|
5 |
+
|
6 |
+
.factory-bootstrap-330 .factory-mtextbox-item input, .factory-mtextbox-remove-item {
|
7 |
+
display: inline-block;
|
8 |
+
}
|
9 |
+
|
10 |
+
.factory-bootstrap-330 .factory-mtextbox-item .factory-mtextbox-remove-item {
|
11 |
+
position: absolute;
|
12 |
+
top: 0;
|
13 |
+
right: 0;
|
14 |
+
bottom: 0;
|
15 |
+
width: 40px;
|
16 |
+
border-radius: 0 3px 3px 0;
|
17 |
+
outline: none;
|
18 |
+
/*background: #fbe3e3;
|
19 |
+
color: #9c7070;
|
20 |
+
box-shadow: none;*/
|
21 |
+
}
|
22 |
+
|
23 |
+
.factory-bootstrap-330 .factory-mtextbox-item .factory-mtextbox-remove-item:hover,
|
24 |
+
.factory-bootstrap-330 .factory-mtextbox-item .factory-mtextbox-remove-item:focus {
|
25 |
+
box-shadow: none;
|
26 |
+
outline: none;
|
27 |
+
}
|
28 |
+
|
29 |
+
/*.factory-bootstrap-330 .factory-mtextbox-item .factory-mtextbox-remove-item:hover {
|
30 |
+
background: #fbe3e3;
|
31 |
+
color: #9c7070;
|
32 |
+
}*/
|
33 |
+
|
34 |
+
.factory-bootstrap-330 .factory-mtextbox-add-item {
|
35 |
+
display: block;
|
36 |
+
margin-top: 10px;
|
37 |
+
}
|
libs/factory/bootstrap/assets/flat/css/control.pattern.css
DELETED
@@ -1,187 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Pattern Control
|
3 |
-
*
|
4 |
-
* @author Alex Kovalev <alex@byonepress.com>
|
5 |
-
* @author Paul Kashtanoff <paul@byonepress.com>
|
6 |
-
* @copyright (c) 2013-2014, OnePress Ltd
|
7 |
-
*
|
8 |
-
* @package factory-forms
|
9 |
-
* @since 3.1.0
|
10 |
-
*/
|
11 |
-
|
12 |
-
.factory-bootstrap-330 .factory-pattern .factory-pattern-controls {
|
13 |
-
vertical-align: middle;
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Preview
|
18 |
-
*/
|
19 |
-
|
20 |
-
.factory-bootstrap-330 .factory-pattern .factory-preview-wrap {
|
21 |
-
display: inline-block;
|
22 |
-
vertical-align: middle;
|
23 |
-
}
|
24 |
-
.factory-bootstrap-330 .factory-pattern .factory-preview {
|
25 |
-
width: 100px;
|
26 |
-
height: 26px;
|
27 |
-
background:transparent url('../assets/images/color_picker_pattern.jpg') repeat;
|
28 |
-
border:0;
|
29 |
-
border-radius:3px;
|
30 |
-
cursor:pointer;
|
31 |
-
-moz-box-sizing: border-box;
|
32 |
-
box-sizing: border-box;
|
33 |
-
border-bottom: 2px solid rgba(0,0,0,0.34) !important;
|
34 |
-
position: relative;
|
35 |
-
|
36 |
-
}
|
37 |
-
.factory-bootstrap-330 .factory-pattern .factory-preview.factory-empty {
|
38 |
-
background:transparent url('../assets/images/color_picker_pattern.jpg') repeat !important;
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Preview Arrow
|
43 |
-
*/
|
44 |
-
|
45 |
-
.factory-bootstrap-330 .factory-pattern .factory-preview span {
|
46 |
-
position:absolute;
|
47 |
-
top:0;
|
48 |
-
left:76px;
|
49 |
-
background: #111111;
|
50 |
-
width: 26px;
|
51 |
-
height: 26px;
|
52 |
-
border-radius:0 3px 3px 0;
|
53 |
-
-moz-border-radius:0 3px 3px 0;
|
54 |
-
-webkit-border-radius:0 3px 3px 0;
|
55 |
-
z-index:99;
|
56 |
-
border-bottom: 2px solid #000;
|
57 |
-
}
|
58 |
-
.factory-bootstrap-330 .factory-pattern .factory-preview span:hover {
|
59 |
-
background: #161616;
|
60 |
-
}
|
61 |
-
.factory-bootstrap-330 .factory-pattern .factory-preview span:after {
|
62 |
-
content: '';
|
63 |
-
width: 0;
|
64 |
-
height: 0;
|
65 |
-
border: transparent solid 5px;
|
66 |
-
border-top-color: #96a6a6;
|
67 |
-
position: absolute;
|
68 |
-
top: 10px;
|
69 |
-
right: 7px;
|
70 |
-
z-index: 1;
|
71 |
-
}
|
72 |
-
.factory-bootstrap-330 .factory-pattern.factory-patterns-panel-active .factory-preview span:after {
|
73 |
-
border-top-color: transparent;
|
74 |
-
border-bottom-color: #96a6a6;
|
75 |
-
top: 4px;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Color Picker
|
80 |
-
*/
|
81 |
-
|
82 |
-
.factory-bootstrap-330 .factory-pattern .factory-color-panel {
|
83 |
-
padding: 10px;
|
84 |
-
margin-top: 10px;
|
85 |
-
background: rgba(255,255,255,0.04);
|
86 |
-
border-radius: 3px;
|
87 |
-
display: none;
|
88 |
-
}
|
89 |
-
.factory-bootstrap-330 .factory-pattern.factory-color-panel-active .factory-color-panel {
|
90 |
-
display: block;
|
91 |
-
}
|
92 |
-
.factory-bootstrap-330 .factory-pattern .factory-color-label {
|
93 |
-
margin-right: 5px;
|
94 |
-
}
|
95 |
-
.factory-bootstrap-330 .factory-pattern .factory-color-label,
|
96 |
-
.factory-bootstrap-330 .factory-pattern .factory-color {
|
97 |
-
display: inline-block;
|
98 |
-
vertical-align: middle;
|
99 |
-
}
|
100 |
-
.factory-bootstrap-330 .factory-pattern .factory-color-panel .factory-hint {
|
101 |
-
margin-top: 7px;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Available Patterns
|
106 |
-
*/
|
107 |
-
|
108 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-panel {
|
109 |
-
display: none;
|
110 |
-
margin-top: 10px;
|
111 |
-
padding: 2px 0 0;
|
112 |
-
border-top: 1px solid #272727;
|
113 |
-
overflow: visible;
|
114 |
-
}
|
115 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-group {
|
116 |
-
clear: both;
|
117 |
-
padding: 2px 0 0;
|
118 |
-
border-bottom: 1px solid #272727;
|
119 |
-
padding-bottom: 10px;
|
120 |
-
}
|
121 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-group-title {
|
122 |
-
margin-top: 10px;
|
123 |
-
}
|
124 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-row {
|
125 |
-
padding-top: 10px;
|
126 |
-
}
|
127 |
-
.factory-bootstrap-330 .factory-pattern.factory-patterns-panel-active .factory-patterns-panel {
|
128 |
-
display: block;
|
129 |
-
}
|
130 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-item,
|
131 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-item div {
|
132 |
-
width: 46px;
|
133 |
-
height: 46px;
|
134 |
-
}
|
135 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-item {
|
136 |
-
display: inline-block;
|
137 |
-
cursor: pointer;
|
138 |
-
position: relative;
|
139 |
-
vertical-align: top;
|
140 |
-
}
|
141 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-item + .factory-patterns-item {
|
142 |
-
margin-left: 10px;
|
143 |
-
}
|
144 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-item div {
|
145 |
-
position: absolute;
|
146 |
-
border-radius: 100%;
|
147 |
-
border: 4px solid #333;
|
148 |
-
}
|
149 |
-
.factory-bootstrap-330 .factory-pattern .factory-patterns-item:hover .factory-pattern-holder {
|
150 |
-
width: 64px;
|
151 |
-
height: 64px;
|
152 |
-
top: -10px;
|
153 |
-
left: -10px;
|
154 |
-
border: 1px solid #333;
|
155 |
-
z-index: 10;
|
156 |
-
}
|
157 |
-
.factory-bootstrap-330 .factory-pattern .factory-no-preview {
|
158 |
-
background: #2f2f2f;
|
159 |
-
line-height: 46px;
|
160 |
-
border-radius: 100%;
|
161 |
-
text-align: center;
|
162 |
-
font-size: 20px;
|
163 |
-
}
|
164 |
-
.factory-bootstrap-330 .factory-pattern .factory-no-preview:hover {
|
165 |
-
background: #333;
|
166 |
-
}
|
167 |
-
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Control Buttons
|
171 |
-
*/
|
172 |
-
|
173 |
-
.factory-bootstrap-330 .factory-pattern .factory-button .fa {
|
174 |
-
font-size: 14px;
|
175 |
-
margin-right: 1px;
|
176 |
-
}
|
177 |
-
.factory-bootstrap-330 .factory-pattern .factory-button span {
|
178 |
-
position: relative;
|
179 |
-
top: -1px;
|
180 |
-
}
|
181 |
-
.factory-bootstrap-330 .factory-pattern .factory-button + .factory-button {
|
182 |
-
margin-left: 3px;
|
183 |
-
}
|
184 |
-
.factory-bootstrap-330 .factory-pattern .factory-change-color-btn {
|
185 |
-
margin-left: 5px;
|
186 |
-
}
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/control.radio-colors.css
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
.factory-bootstrap-330 .factory-from-radio-label, .factory-bootstrap-330 .factory-from-radio-label > span {
|
2 |
-
-webkit-transition: all 0.3s;
|
3 |
-
-moz-transition: all 0.3s;
|
4 |
-
-o-transition: all 0.3s;
|
5 |
-
transition: all 0.3s;
|
6 |
-
}
|
7 |
-
|
8 |
-
.factory-bootstrap-330 .factory-from-radio-label {
|
9 |
-
position: relative;
|
10 |
-
width: 30px;
|
11 |
-
height: 30px;
|
12 |
-
border-radius: 3px;
|
13 |
-
background-color: #fff;
|
14 |
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
15 |
-
}
|
16 |
-
|
17 |
-
.factory-bootstrap-330 .factory-from-radio-label:hover {
|
18 |
-
background-color: #f5f2f2;
|
19 |
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
20 |
-
}
|
21 |
-
|
22 |
-
.factory-bootstrap-330 .factory-from-radio-label > span {
|
23 |
-
display: block;
|
24 |
-
position: absolute;
|
25 |
-
top: 2px;
|
26 |
-
left: 2px;
|
27 |
-
right: 2px;
|
28 |
-
bottom: 2px;
|
29 |
-
text-indent: -9999px;
|
30 |
-
background-color: #fff;
|
31 |
-
}
|
32 |
-
|
33 |
-
.factory-bootstrap-330 .factory-from-radio-label .factory-radio-color:checked + span {
|
34 |
-
border: 5px solid #fff;
|
35 |
-
}
|
36 |
-
|
37 |
-
.factory-bootstrap-330 .factory-radio-color {
|
38 |
-
opacity: 0;
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/holder.conrol-group.css
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* jQuery Control gropup holder
|
3 |
-
*/
|
4 |
-
|
5 |
-
.factory-control-group .factory-header {
|
6 |
-
margin-bottom: 7px;
|
7 |
-
display: block;
|
8 |
-
}
|
9 |
-
.factory-control-group-nav {
|
10 |
-
width:284px;
|
11 |
-
margin:10px 8px;
|
12 |
-
}
|
13 |
-
.factory-control-group-nav li{
|
14 |
-
display:inline-block;
|
15 |
-
padding:8px 15px;
|
16 |
-
margin:0;
|
17 |
-
background-color: #444;
|
18 |
-
color:#fff;
|
19 |
-
border-radius:2px;
|
20 |
-
-moz-border-radius:2px;
|
21 |
-
-webkit-border-radius:2px;
|
22 |
-
cursor:pointer;
|
23 |
-
}
|
24 |
-
.factory-control-group-nav li.current{
|
25 |
-
background-color: #222;
|
26 |
-
}
|
27 |
-
.factory-control-group-item {
|
28 |
-
display:none;
|
29 |
-
}
|
30 |
-
.factory-control-group-item.current {
|
31 |
-
display:block;
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/plugin.chosen.css
DELETED
@@ -1,494 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
Chosen, a Select Box Enhancer for jQuery and Prototype
|
3 |
-
by Patrick Filler for Harvest, http://getharvest.com
|
4 |
-
|
5 |
-
Version 1.1.0
|
6 |
-
Full source at https://github.com/harvesthq/chosen
|
7 |
-
Copyright (c) 2011 Harvest http://getharvest.com
|
8 |
-
|
9 |
-
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
10 |
-
This file is generated by `grunt build`, do not edit it by hand.
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* @group Base */
|
14 |
-
.chosen-container {
|
15 |
-
position: relative;
|
16 |
-
display: inline-block;
|
17 |
-
vertical-align: middle;
|
18 |
-
font-size: 13px;
|
19 |
-
zoom: 1;
|
20 |
-
*display: inline;
|
21 |
-
-webkit-user-select: none;
|
22 |
-
-moz-user-select: none;
|
23 |
-
user-select: none;
|
24 |
-
}
|
25 |
-
|
26 |
-
.chosen-container .chosen-drop {
|
27 |
-
position: absolute;
|
28 |
-
top: 100%;
|
29 |
-
left: -9999px;
|
30 |
-
z-index: 1010;
|
31 |
-
-webkit-box-sizing: border-box;
|
32 |
-
-moz-box-sizing: border-box;
|
33 |
-
box-sizing: border-box;
|
34 |
-
width: 100%;
|
35 |
-
border: 1px solid #aaa;
|
36 |
-
border-top: 0;
|
37 |
-
background: #fff;
|
38 |
-
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
|
39 |
-
}
|
40 |
-
|
41 |
-
.chosen-container.chosen-with-drop .chosen-drop {
|
42 |
-
left: 0;
|
43 |
-
}
|
44 |
-
|
45 |
-
.chosen-container a {
|
46 |
-
cursor: pointer;
|
47 |
-
}
|
48 |
-
|
49 |
-
/* @end */
|
50 |
-
/* @group Single Chosen */
|
51 |
-
.chosen-container-single .chosen-single {
|
52 |
-
position: relative;
|
53 |
-
display: block;
|
54 |
-
overflow: hidden;
|
55 |
-
padding: 0 0 0 8px;
|
56 |
-
height: 23px;
|
57 |
-
border: 1px solid #aaa;
|
58 |
-
border-radius: 5px;
|
59 |
-
background-color: #fff;
|
60 |
-
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
|
61 |
-
background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
62 |
-
background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
63 |
-
background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
64 |
-
background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
65 |
-
background-clip: padding-box;
|
66 |
-
box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
|
67 |
-
color: #444;
|
68 |
-
text-decoration: none;
|
69 |
-
white-space: nowrap;
|
70 |
-
line-height: 24px;
|
71 |
-
-moz-box-sizing: border-box;
|
72 |
-
box-sizing: border-box;
|
73 |
-
}
|
74 |
-
|
75 |
-
.chosen-container-single .chosen-default {
|
76 |
-
color: #999;
|
77 |
-
}
|
78 |
-
|
79 |
-
.chosen-container-single .chosen-single span {
|
80 |
-
display: block;
|
81 |
-
overflow: hidden;
|
82 |
-
margin-right: 26px;
|
83 |
-
text-overflow: ellipsis;
|
84 |
-
white-space: nowrap;
|
85 |
-
}
|
86 |
-
|
87 |
-
.chosen-container-single .chosen-single-with-deselect span {
|
88 |
-
margin-right: 38px;
|
89 |
-
}
|
90 |
-
|
91 |
-
.chosen-container-single .chosen-single abbr {
|
92 |
-
position: absolute;
|
93 |
-
top: 6px;
|
94 |
-
right: 26px;
|
95 |
-
display: block;
|
96 |
-
width: 12px;
|
97 |
-
height: 12px;
|
98 |
-
background: url('../../images/chosen-sprite.png') -42px 1px no-repeat;
|
99 |
-
font-size: 1px;
|
100 |
-
}
|
101 |
-
|
102 |
-
.chosen-container-single .chosen-single abbr:hover {
|
103 |
-
background-position: -42px -10px;
|
104 |
-
}
|
105 |
-
|
106 |
-
.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
|
107 |
-
background-position: -42px -10px;
|
108 |
-
}
|
109 |
-
|
110 |
-
.chosen-container-single .chosen-single div {
|
111 |
-
position: absolute;
|
112 |
-
top: 0;
|
113 |
-
right: 0;
|
114 |
-
display: block;
|
115 |
-
width: 18px;
|
116 |
-
height: 100%;
|
117 |
-
}
|
118 |
-
|
119 |
-
.chosen-container-single .chosen-single div b {
|
120 |
-
display: block;
|
121 |
-
width: 100%;
|
122 |
-
height: 100%;
|
123 |
-
background: url('../../images/chosen-sprite.png') no-repeat 0px 2px;
|
124 |
-
}
|
125 |
-
|
126 |
-
.chosen-container-single .chosen-search {
|
127 |
-
position: relative;
|
128 |
-
z-index: 1010;
|
129 |
-
margin: 0;
|
130 |
-
padding: 3px 4px;
|
131 |
-
white-space: nowrap;
|
132 |
-
}
|
133 |
-
|
134 |
-
.chosen-container-single .chosen-search input[type="text"] {
|
135 |
-
-webkit-box-sizing: border-box;
|
136 |
-
-moz-box-sizing: border-box;
|
137 |
-
box-sizing: border-box;
|
138 |
-
margin: 1px 0;
|
139 |
-
padding: 4px 20px 4px 5px;
|
140 |
-
width: 100%;
|
141 |
-
height: auto;
|
142 |
-
outline: 0;
|
143 |
-
border: 1px solid #aaa;
|
144 |
-
background: white url('../../images/chosen-sprite.png') no-repeat 100% -20px;
|
145 |
-
font-size: 1em;
|
146 |
-
font-family: sans-serif;
|
147 |
-
line-height: normal;
|
148 |
-
border-radius: 0;
|
149 |
-
}
|
150 |
-
|
151 |
-
.chosen-container-single .chosen-drop {
|
152 |
-
margin-top: -1px;
|
153 |
-
border-radius: 0 0 4px 4px;
|
154 |
-
background-clip: padding-box;
|
155 |
-
}
|
156 |
-
|
157 |
-
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
|
158 |
-
position: absolute;
|
159 |
-
left: -9999px;
|
160 |
-
}
|
161 |
-
|
162 |
-
/* @end */
|
163 |
-
/* @group Results */
|
164 |
-
.chosen-container .chosen-results {
|
165 |
-
position: relative;
|
166 |
-
overflow-x: hidden;
|
167 |
-
overflow-y: auto;
|
168 |
-
margin: 0 4px 4px 0;
|
169 |
-
padding: 0 0 0 4px;
|
170 |
-
max-height: 240px;
|
171 |
-
-webkit-overflow-scrolling: touch;
|
172 |
-
}
|
173 |
-
|
174 |
-
.chosen-container .chosen-results li {
|
175 |
-
display: none;
|
176 |
-
margin: 0;
|
177 |
-
padding: 5px 6px;
|
178 |
-
list-style: none;
|
179 |
-
line-height: 15px;
|
180 |
-
-webkit-touch-callout: none;
|
181 |
-
}
|
182 |
-
|
183 |
-
.chosen-container .chosen-results li.active-result {
|
184 |
-
display: list-item;
|
185 |
-
cursor: pointer;
|
186 |
-
}
|
187 |
-
|
188 |
-
.chosen-container .chosen-results li.disabled-result {
|
189 |
-
display: list-item;
|
190 |
-
color: #ccc;
|
191 |
-
cursor: default;
|
192 |
-
}
|
193 |
-
|
194 |
-
.chosen-container .chosen-results li.highlighted {
|
195 |
-
background-color: #3875d7;
|
196 |
-
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
197 |
-
background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
198 |
-
background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
199 |
-
background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
|
200 |
-
background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
|
201 |
-
color: #fff;
|
202 |
-
}
|
203 |
-
|
204 |
-
.chosen-container .chosen-results li.no-results {
|
205 |
-
display: list-item;
|
206 |
-
background: #f4f4f4;
|
207 |
-
}
|
208 |
-
|
209 |
-
.chosen-container .chosen-results li.group-result {
|
210 |
-
display: list-item;
|
211 |
-
font-weight: bold;
|
212 |
-
cursor: default;
|
213 |
-
}
|
214 |
-
|
215 |
-
.chosen-container .chosen-results li.group-option {
|
216 |
-
padding-left: 15px;
|
217 |
-
}
|
218 |
-
|
219 |
-
.chosen-container .chosen-results li em {
|
220 |
-
font-style: normal;
|
221 |
-
text-decoration: underline;
|
222 |
-
}
|
223 |
-
|
224 |
-
/* @end */
|
225 |
-
/* @group Multi Chosen */
|
226 |
-
.chosen-container-multi .chosen-choices {
|
227 |
-
position: relative;
|
228 |
-
overflow: hidden;
|
229 |
-
-webkit-box-sizing: border-box;
|
230 |
-
-moz-box-sizing: border-box;
|
231 |
-
box-sizing: border-box;
|
232 |
-
margin: 0;
|
233 |
-
padding: 0;
|
234 |
-
width: 100%;
|
235 |
-
height: auto !important;
|
236 |
-
height: 1%;
|
237 |
-
border: 1px solid #aaa;
|
238 |
-
background-color: #fff;
|
239 |
-
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
240 |
-
background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
241 |
-
background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
242 |
-
background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
|
243 |
-
background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
|
244 |
-
cursor: text;
|
245 |
-
}
|
246 |
-
|
247 |
-
.chosen-container-multi .chosen-choices li {
|
248 |
-
float: left;
|
249 |
-
list-style: none;
|
250 |
-
}
|
251 |
-
|
252 |
-
.chosen-container-multi .chosen-choices li.search-field {
|
253 |
-
margin: 0;
|
254 |
-
padding: 0;
|
255 |
-
white-space: nowrap;
|
256 |
-
}
|
257 |
-
|
258 |
-
.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
|
259 |
-
margin: 1px 0;
|
260 |
-
padding: 5px;
|
261 |
-
height: 15px;
|
262 |
-
outline: 0;
|
263 |
-
border: 0 !important;
|
264 |
-
background: transparent !important;
|
265 |
-
box-shadow: none;
|
266 |
-
color: #666;
|
267 |
-
font-size: 100%;
|
268 |
-
font-family: sans-serif;
|
269 |
-
line-height: normal;
|
270 |
-
border-radius: 0;
|
271 |
-
}
|
272 |
-
|
273 |
-
.chosen-container-multi .chosen-choices li.search-field .default {
|
274 |
-
color: #999;
|
275 |
-
}
|
276 |
-
|
277 |
-
.chosen-container-multi .chosen-choices li.search-choice {
|
278 |
-
position: relative;
|
279 |
-
margin: 3px 0 3px 5px;
|
280 |
-
padding: 3px 20px 3px 5px;
|
281 |
-
border: 1px solid #aaa;
|
282 |
-
border-radius: 3px;
|
283 |
-
background-color: #e4e4e4;
|
284 |
-
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
285 |
-
background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
286 |
-
background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
287 |
-
background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
288 |
-
background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
289 |
-
background-clip: padding-box;
|
290 |
-
box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
291 |
-
color: #333;
|
292 |
-
line-height: 13px;
|
293 |
-
cursor: default;
|
294 |
-
}
|
295 |
-
|
296 |
-
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
297 |
-
position: absolute;
|
298 |
-
top: 4px;
|
299 |
-
right: 3px;
|
300 |
-
display: block;
|
301 |
-
width: 12px;
|
302 |
-
height: 12px;
|
303 |
-
background: url('../../images/chosen-sprite.png') -42px 1px no-repeat;
|
304 |
-
font-size: 1px;
|
305 |
-
}
|
306 |
-
|
307 |
-
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
|
308 |
-
background-position: -42px -10px;
|
309 |
-
}
|
310 |
-
|
311 |
-
.chosen-container-multi .chosen-choices li.search-choice-disabled {
|
312 |
-
padding-right: 5px;
|
313 |
-
border: 1px solid #ccc;
|
314 |
-
background-color: #e4e4e4;
|
315 |
-
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
316 |
-
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
317 |
-
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
318 |
-
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
319 |
-
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
320 |
-
color: #666;
|
321 |
-
}
|
322 |
-
|
323 |
-
.chosen-container-multi .chosen-choices li.search-choice-focus {
|
324 |
-
background: #d4d4d4;
|
325 |
-
}
|
326 |
-
|
327 |
-
.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
|
328 |
-
background-position: -42px -10px;
|
329 |
-
}
|
330 |
-
|
331 |
-
.chosen-container-multi .chosen-results {
|
332 |
-
margin: 0;
|
333 |
-
padding: 0;
|
334 |
-
}
|
335 |
-
|
336 |
-
.chosen-container-multi .chosen-drop .result-selected {
|
337 |
-
display: list-item;
|
338 |
-
color: #ccc;
|
339 |
-
cursor: default;
|
340 |
-
}
|
341 |
-
|
342 |
-
/* @end */
|
343 |
-
/* @group Active */
|
344 |
-
.chosen-container-active .chosen-single {
|
345 |
-
border: 1px solid #5897fb;
|
346 |
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
347 |
-
}
|
348 |
-
|
349 |
-
.chosen-container-active.chosen-with-drop .chosen-single {
|
350 |
-
border: 1px solid #aaa;
|
351 |
-
-moz-border-radius-bottomright: 0;
|
352 |
-
border-bottom-right-radius: 0;
|
353 |
-
-moz-border-radius-bottomleft: 0;
|
354 |
-
border-bottom-left-radius: 0;
|
355 |
-
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
|
356 |
-
background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
357 |
-
background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
358 |
-
background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
|
359 |
-
background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
|
360 |
-
box-shadow: 0 1px 0 #fff inset;
|
361 |
-
}
|
362 |
-
|
363 |
-
.chosen-container-active.chosen-with-drop .chosen-single div {
|
364 |
-
border-left: none;
|
365 |
-
background: transparent;
|
366 |
-
}
|
367 |
-
|
368 |
-
.chosen-container-active.chosen-with-drop .chosen-single div b {
|
369 |
-
background-position: -18px 2px;
|
370 |
-
}
|
371 |
-
|
372 |
-
.chosen-container-active .chosen-choices {
|
373 |
-
border: 1px solid #5897fb;
|
374 |
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
|
375 |
-
}
|
376 |
-
|
377 |
-
.chosen-container-active .chosen-choices li.search-field input[type="text"] {
|
378 |
-
color: #111 !important;
|
379 |
-
}
|
380 |
-
|
381 |
-
/* @end */
|
382 |
-
/* @group Disabled Support */
|
383 |
-
.chosen-disabled {
|
384 |
-
opacity: 0.5 !important;
|
385 |
-
cursor: default;
|
386 |
-
}
|
387 |
-
|
388 |
-
.chosen-disabled .chosen-single {
|
389 |
-
cursor: default;
|
390 |
-
}
|
391 |
-
|
392 |
-
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
|
393 |
-
cursor: default;
|
394 |
-
}
|
395 |
-
|
396 |
-
/* @end */
|
397 |
-
/* @group Right to Left */
|
398 |
-
.chosen-rtl {
|
399 |
-
text-align: right;
|
400 |
-
}
|
401 |
-
|
402 |
-
.chosen-rtl .chosen-single {
|
403 |
-
overflow: visible;
|
404 |
-
padding: 0 8px 0 0;
|
405 |
-
}
|
406 |
-
|
407 |
-
.chosen-rtl .chosen-single span {
|
408 |
-
margin-right: 0;
|
409 |
-
margin-left: 26px;
|
410 |
-
direction: rtl;
|
411 |
-
}
|
412 |
-
|
413 |
-
.chosen-rtl .chosen-single-with-deselect span {
|
414 |
-
margin-left: 38px;
|
415 |
-
}
|
416 |
-
|
417 |
-
.chosen-rtl .chosen-single div {
|
418 |
-
right: auto;
|
419 |
-
left: 3px;
|
420 |
-
}
|
421 |
-
|
422 |
-
.chosen-rtl .chosen-single abbr {
|
423 |
-
right: auto;
|
424 |
-
left: 26px;
|
425 |
-
}
|
426 |
-
|
427 |
-
.chosen-rtl .chosen-choices li {
|
428 |
-
float: right;
|
429 |
-
}
|
430 |
-
|
431 |
-
.chosen-rtl .chosen-choices li.search-field input[type="text"] {
|
432 |
-
direction: rtl;
|
433 |
-
}
|
434 |
-
|
435 |
-
.chosen-rtl .chosen-choices li.search-choice {
|
436 |
-
margin: 3px 5px 3px 0;
|
437 |
-
padding: 3px 5px 3px 19px;
|
438 |
-
}
|
439 |
-
|
440 |
-
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
|
441 |
-
right: auto;
|
442 |
-
left: 4px;
|
443 |
-
}
|
444 |
-
|
445 |
-
.chosen-rtl.chosen-container-single-nosearch .chosen-search,
|
446 |
-
.chosen-rtl .chosen-drop {
|
447 |
-
left: 9999px;
|
448 |
-
}
|
449 |
-
|
450 |
-
.chosen-rtl.chosen-container-single .chosen-results {
|
451 |
-
margin: 0 0 4px 4px;
|
452 |
-
padding: 0 4px 0 0;
|
453 |
-
}
|
454 |
-
|
455 |
-
.chosen-rtl .chosen-results li.group-option {
|
456 |
-
padding-right: 15px;
|
457 |
-
padding-left: 0;
|
458 |
-
}
|
459 |
-
|
460 |
-
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
|
461 |
-
border-right: none;
|
462 |
-
}
|
463 |
-
|
464 |
-
.chosen-rtl .chosen-search input[type="text"] {
|
465 |
-
padding: 4px 5px 4px 20px;
|
466 |
-
background: white url('../../images/chosen-sprite.png') no-repeat -30px -20px;
|
467 |
-
direction: rtl;
|
468 |
-
}
|
469 |
-
|
470 |
-
.chosen-rtl.chosen-container-single .chosen-single div b {
|
471 |
-
background-position: 6px 2px;
|
472 |
-
}
|
473 |
-
|
474 |
-
.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
|
475 |
-
background-position: -12px 2px;
|
476 |
-
}
|
477 |
-
|
478 |
-
/* @end */
|
479 |
-
/* @group Retina compatibility */
|
480 |
-
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
|
481 |
-
.chosen-rtl .chosen-search input[type="text"],
|
482 |
-
.chosen-container-single .chosen-single abbr,
|
483 |
-
.chosen-container-single .chosen-single div b,
|
484 |
-
.chosen-container-single .chosen-search input[type="text"],
|
485 |
-
.chosen-container-multi .chosen-choices .search-choice .search-choice-close,
|
486 |
-
.chosen-container .chosen-results-scroll-down span,
|
487 |
-
.chosen-container .chosen-results-scroll-up span {
|
488 |
-
background-image: url('../../images/chosen-sprite@2x.png') !important;
|
489 |
-
background-size: 52px 37px !important;
|
490 |
-
background-repeat: no-repeat !important;
|
491 |
-
}
|
492 |
-
}
|
493 |
-
|
494 |
-
/* @end */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/plugin.gradient-picker.css
DELETED
@@ -1,149 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* jQuery gradient generator
|
3 |
-
*/
|
4 |
-
.factory-bootstrap-330 .factory-gradient-picker-wrap {
|
5 |
-
margin-bottom: 20px;
|
6 |
-
}
|
7 |
-
|
8 |
-
.factory-bootstrap-330 .gradientPicker-preview {
|
9 |
-
width: 100%;
|
10 |
-
height: 30px;
|
11 |
-
border-radius: 3px;
|
12 |
-
background: transparent url('../../images/color_picker_pattern.jpg') repeat;
|
13 |
-
}
|
14 |
-
|
15 |
-
.factory-bootstrap-330 .factory-color-picker-container {
|
16 |
-
display: none;
|
17 |
-
padding-top: 15px;
|
18 |
-
}
|
19 |
-
|
20 |
-
.factory-bootstrap-330 .factory-point,
|
21 |
-
.factory-bootstrap-330 .factory-point-color {
|
22 |
-
position: absolute;
|
23 |
-
width: 10px;
|
24 |
-
height: 10px;
|
25 |
-
border: 0;
|
26 |
-
font-size: 0;
|
27 |
-
border-radius: 50% 50% 100% 100%;
|
28 |
-
-moz-border-radius: 50% 50% 100% 100%;
|
29 |
-
-webkit-border-radius: 50% 50% 100% 100%;
|
30 |
-
cursor: pointer;
|
31 |
-
overflow: hidden;
|
32 |
-
}
|
33 |
-
|
34 |
-
.factory-bootstrap-330 .factory-point-color {
|
35 |
-
border-radius: 0px;
|
36 |
-
}
|
37 |
-
|
38 |
-
.factory-bootstrap-330 .factory-point {
|
39 |
-
background: transparent url('../../images/color_picker_pattern.jpg') repeat;
|
40 |
-
}
|
41 |
-
|
42 |
-
.factory-bootstrap-330 .factory-current-point {
|
43 |
-
-ms-transform: rotate(180deg);
|
44 |
-
-webkit-transform: rotate(180deg);
|
45 |
-
transform: rotate(180deg);
|
46 |
-
}
|
47 |
-
|
48 |
-
.factory-bootstrap-330 .factory-points {
|
49 |
-
position: relative;
|
50 |
-
height: 10px;
|
51 |
-
width: 100%;
|
52 |
-
cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAWCAYAAADAQbwGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ1JREFUeNq8VAEKwCAITOn%2FX3ZzTBCxUicTBsvsOO9EIKJhAwCe5H0H4xBvLQgOegV8yZ8AZwJHc8zKI4c53bk6IGNqMH3GCJuMlkeG4p4G1e5Lq1KXatmCM7AdrbLLq7FC0agycx7oXOmk8%2FY%2FPNjRR7s6ZFHFqY5AcasLFDPtpAC7WH7aNkxgO9gdLNv3oWdKiKXX7r8bu6rlJcAA9ZRfMt5oHoIAAAAASUVORK5CYII%3D') 5 0, pointer;
|
53 |
-
}
|
54 |
-
|
55 |
-
.factory-bootstrap-330 .gradientPicker-iris-wrap {
|
56 |
-
display: none;
|
57 |
-
position: absolute;
|
58 |
-
left: 0;
|
59 |
-
top: 78px;
|
60 |
-
width: 212px;
|
61 |
-
height: 212px;
|
62 |
-
background: #111;
|
63 |
-
border: 1px solid #222;
|
64 |
-
border-radius: 5px;
|
65 |
-
-moz-border-radius: 5px;
|
66 |
-
-webkit-border-radius: 5px;
|
67 |
-
z-index: 9999;
|
68 |
-
|
69 |
-
}
|
70 |
-
|
71 |
-
.factory-bootstrap-330 .gradientPicker-iris-wrap .iris-border, .factory-bootstrap-330 .gradientPicker-iris-wrap .iris-picker {
|
72 |
-
border: 0;
|
73 |
-
background: #111;
|
74 |
-
}
|
75 |
-
|
76 |
-
/* Preset Gradients */
|
77 |
-
|
78 |
-
.factory-bootstrap-330 .gradientPicker-pallets {
|
79 |
-
padding: 8px 0px 3px 0px;
|
80 |
-
margin-bottom: 10px;
|
81 |
-
border-bottom: 1px solid #323232;
|
82 |
-
border-top: 1px solid #323232;
|
83 |
-
font-size: 0px;
|
84 |
-
line-height: 0px;
|
85 |
-
text-align: center;
|
86 |
-
}
|
87 |
-
|
88 |
-
.factory-bootstrap-330 .factory-preset-gradient,
|
89 |
-
.factory-bootstrap-330 .factory-secondary-color {
|
90 |
-
width: 22px;
|
91 |
-
height: 22px;
|
92 |
-
border-radius: 100%;
|
93 |
-
}
|
94 |
-
|
95 |
-
.factory-bootstrap-330 .factory-preset-gradient {
|
96 |
-
display: inline-block;
|
97 |
-
cursor: pointer;
|
98 |
-
margin-bottom: 3px;
|
99 |
-
position: relative;
|
100 |
-
}
|
101 |
-
|
102 |
-
.factory-bootstrap-330 .factory-preset-gradient:hover {
|
103 |
-
opacity: 0.9;
|
104 |
-
}
|
105 |
-
|
106 |
-
.factory-bootstrap-330 .factory-preset-gradient + .factory-preset-gradient {
|
107 |
-
margin-left: 5px;
|
108 |
-
}
|
109 |
-
|
110 |
-
.factory-bootstrap-330 .factory-secondary-color-wrap {
|
111 |
-
width: 11px;
|
112 |
-
height: 22px;
|
113 |
-
position: absolute;
|
114 |
-
overflow: hidden;
|
115 |
-
right: 0px;
|
116 |
-
}
|
117 |
-
|
118 |
-
.factory-bootstrap-330 .factory-secondary-color {
|
119 |
-
position: absolute;
|
120 |
-
left: -11px;
|
121 |
-
background-color: red;
|
122 |
-
}
|
123 |
-
|
124 |
-
.factory-bootstrap-330 .gradientPicker-filldirection {
|
125 |
-
width: 200px;
|
126 |
-
margin-top: 5px;
|
127 |
-
}
|
128 |
-
|
129 |
-
.factory-bootstrap-330 .gradientPicker-ptConfig .color-chooser {
|
130 |
-
float: left;
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Color
|
135 |
-
*/
|
136 |
-
|
137 |
-
.factory-bootstrap-330 .factory-color-picker-container .factory-slider {
|
138 |
-
padding-left: 75px;
|
139 |
-
padding-right: 60px;
|
140 |
-
position: relative;
|
141 |
-
}
|
142 |
-
|
143 |
-
.factory-bootstrap-330 .factory-color-picker-container .factory-color-hex {
|
144 |
-
top: 0;
|
145 |
-
left: 0;
|
146 |
-
position: absolute;
|
147 |
-
width: 65px;
|
148 |
-
}
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/flat/css/plugin.nouislider.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.noUi-target,.noUi-target *{-webkit-touch-callout:none;-webkit-user-select:none;-ms-touch-action:none;-ms-user-select:none;-moz-user-select:none;-moz-box-sizing:border-box;box-sizing:border-box}.noUi-base{width:100%;height:100%;position:relative}.noUi-origin{position:absolute;right:0;top:0;left:0;bottom:0}.noUi-handle{position:relative;z-index:1}.noUi-stacking .noUi-handle{z-index:10}.noUi-stacking+.noUi-origin{*z-index:-1}.noUi-state-tap .noUi-origin{-webkit-transition:left .3s,top .3s;transition:left .3s,top .3s}.noUi-state-drag *{cursor:inherit!important}.noUi-horizontal{height:18px}.noUi-horizontal .noUi-handle{width:34px;height:28px;left:-17px;top:-6px}.noUi-horizontal.noUi-extended{padding:0 15px}.noUi-horizontal.noUi-extended .noUi-origin{right:-15px}.noUi-vertical{width:18px}.noUi-vertical .noUi-handle{width:28px;height:34px;left:-6px;top:-17px}.noUi-vertical.noUi-extended{padding:15px 0}.noUi-vertical.noUi-extended .noUi-origin{bottom:-15px}.noUi-background{background:#FAFAFA;box-shadow:inset 0 1px 1px #f0f0f0}.noUi-connect{background:#3FB8AF;box-shadow:inset 0 0 3px rgba(51,51,51,.45);-webkit-transition:background 450ms;transition:background 450ms}.noUi-origin{border-radius:2px}.noUi-target{border-radius:4px;border:1px solid #D3D3D3;box-shadow:inset 0 1px 1px #F0F0F0,0 3px 6px -5px #BBB}.noUi-target.noUi-connect{box-shadow:inset 0 0 3px rgba(51,51,51,.45),0 3px 6px -5px #BBB}.noUi-dragable{cursor:w-resize}.noUi-vertical .noUi-dragable{cursor:n-resize}.noUi-handle{border:1px solid #D9D9D9;border-radius:3px;background:#FFF;cursor:default;box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #EBEBEB,0 3px 6px -3px #BBB}.noUi-active{box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #DDD,0 3px 6px -3px #BBB}.noUi-handle:after,.noUi-handle:before{content:"";display:block;position:absolute;height:14px;width:1px;background:#E8E7E6;left:14px;top:6px}.noUi-handle:after{left:17px}.noUi-vertical .noUi-handle:after,.noUi-vertical .noUi-handle:before{width:14px;height:1px;left:6px;top:14px}.noUi-vertical .noUi-handle:after{top:17px}[disabled] .noUi-connect,[disabled].noUi-connect{background:#B8B8B8}[disabled] .noUi-handle{cursor:not-allowed}
|
|
libs/factory/bootstrap/assets/flat/css/plugin.paddings-editor.css
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* jQuery Paddings
|
3 |
-
*
|
4 |
-
* @uses plugin.nouislider
|
5 |
-
*/
|
6 |
-
|
7 |
-
.factory-bootstrap-330 .factory-paddings-editor {
|
8 |
-
padding-left: 135px;
|
9 |
-
height: 90px;
|
10 |
-
position: relative;
|
11 |
-
}
|
12 |
-
|
13 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-rectangle {
|
14 |
-
width: 120px;
|
15 |
-
height: 90px;
|
16 |
-
border-radius: 10px;
|
17 |
-
background-color: #a6b6b6;
|
18 |
-
position: relative;
|
19 |
-
overflow: hidden;
|
20 |
-
cursor: pointer;
|
21 |
-
-moz-box-sizing: content-box;
|
22 |
-
box-sizing: content-box;
|
23 |
-
position: absolute;
|
24 |
-
top: 0px;
|
25 |
-
left: 0px;
|
26 |
-
}
|
27 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side {
|
28 |
-
width: 100%;
|
29 |
-
height: 100%;
|
30 |
-
position: absolute;
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-center {
|
35 |
-
width: 30px;
|
36 |
-
height: 30px;
|
37 |
-
border-radius: 100%;
|
38 |
-
background-color: #bac9c9;
|
39 |
-
position: absolute;
|
40 |
-
top: 30px;
|
41 |
-
left: 45px;
|
42 |
-
-moz-box-sizing: content-box;
|
43 |
-
box-sizing: content-box;
|
44 |
-
}
|
45 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-center:hover {
|
46 |
-
background-color: #c0cece;
|
47 |
-
}
|
48 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-center.factory-active {
|
49 |
-
background-color: #829595;
|
50 |
-
}
|
51 |
-
|
52 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-top {
|
53 |
-
height: 30px; /* = ( rectangle_height - center_button_height ) / 2 */
|
54 |
-
top: 0px;
|
55 |
-
left: 0px;
|
56 |
-
}
|
57 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-right {
|
58 |
-
width: 45px; /* = ( rectangle_width - center_button_width ) / 2 */
|
59 |
-
top: 0px;
|
60 |
-
right: 0px;
|
61 |
-
}
|
62 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-bottom {
|
63 |
-
height: 30px; /* = ( rectangle_height - center_button_height ) / 2 */
|
64 |
-
bottom: 0px;
|
65 |
-
left: 0px;
|
66 |
-
}
|
67 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-left {
|
68 |
-
width: 45px; /* = ( rectangle_width - center_button_width ) / 2 */
|
69 |
-
top: 0px;
|
70 |
-
left: 0px;
|
71 |
-
}
|
72 |
-
|
73 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-rectangle .factory-visible-value {
|
74 |
-
color: #1b1f1f;
|
75 |
-
background-color: rgba(255,255,255,0.3);
|
76 |
-
border-radius: 3px;
|
77 |
-
padding: 2px;
|
78 |
-
line-height: 13px;
|
79 |
-
display: inline-block;
|
80 |
-
}
|
81 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-rectangle .factory-side.factory-active .factory-visible-value {
|
82 |
-
background-color: rgba(255,255,255,0.3);
|
83 |
-
border-radius: 3px;
|
84 |
-
padding: 2px;
|
85 |
-
line-height: 13px;
|
86 |
-
display: inline-block;
|
87 |
-
}
|
88 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-visible-value em {
|
89 |
-
font-style: normal;
|
90 |
-
}
|
91 |
-
|
92 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-top,
|
93 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-bottom {
|
94 |
-
text-align: center;
|
95 |
-
line-height: 30px; /* = side_height */
|
96 |
-
}
|
97 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-left,
|
98 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-side-right {
|
99 |
-
line-height: 90px; /* = side_height */
|
100 |
-
text-align: center;
|
101 |
-
}
|
102 |
-
|
103 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-slider-container {
|
104 |
-
font-style: italic;
|
105 |
-
}
|
106 |
-
.factory-bootstrap-330 .factory-paddings-editor .factory-slider {
|
107 |
-
padding-right: 0px;
|
108 |
-
margin-top: 7px
|
109 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/images/chosen-sprite.png
DELETED
Binary file
|
libs/factory/bootstrap/assets/images/chosen-sprite@2x.png
DELETED
Binary file
|
libs/factory/bootstrap/assets/images/color_picker_pattern.jpg
DELETED
Binary file
|
libs/factory/bootstrap/assets/images/drop-menu_arrow.png
DELETED
Binary file
|
libs/factory/bootstrap/assets/images/no-pattern-background-control.png
DELETED
Binary file
|
libs/factory/bootstrap/assets/js/bootstrap.accordion.js
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Light Weight jQuery Accordions
|
3 |
-
*/
|
4 |
-
|
5 |
-
;(function ( $, window, document, undefined ) {
|
6 |
-
"use strict"; // jshint ;_;
|
7 |
-
|
8 |
-
$.fn.factoryBootstrap330_accordion = function(){
|
9 |
-
return this.each(function () {
|
10 |
-
var $self = $(this);
|
11 |
-
var startAnimation = false;
|
12 |
-
|
13 |
-
$('.'+$self.attr('class')+' > div:first').show();
|
14 |
-
$('.'+$self.attr('class')+' > div:first')
|
15 |
-
.add('.'+$self.attr('class')+' > h3:first')
|
16 |
-
.addClass('active');
|
17 |
-
|
18 |
-
$('.'+$self.attr('class')+' > h3').on('click', function() {
|
19 |
-
var selfOn = $(this);
|
20 |
-
var target = selfOn.next();
|
21 |
-
|
22 |
-
if(!selfOn.hasClass('active') && !startAnimation){
|
23 |
-
startAnimation = true;
|
24 |
-
selfOn.parent().children('div').slideUp(500);
|
25 |
-
|
26 |
-
$('.'+$self.attr('class')+' > h3').removeClass('active');
|
27 |
-
selfOn.addClass('active');
|
28 |
-
target.addClass('active').slideDown({
|
29 |
-
duration: 500,
|
30 |
-
complete: function(){
|
31 |
-
startAnimation = false;
|
32 |
-
$self.trigger('shown.bs.accordion', [selfOn]);
|
33 |
-
},
|
34 |
-
progress: function() {
|
35 |
-
$self.trigger('progress.bs.accordion', [selfOn]);
|
36 |
-
}
|
37 |
-
});
|
38 |
-
}
|
39 |
-
|
40 |
-
return false;
|
41 |
-
});
|
42 |
-
});
|
43 |
-
}
|
44 |
-
|
45 |
-
$(function(){
|
46 |
-
$('.factory-bootstrap-330 .factory-accordion').factoryBootstrap330_accordion();
|
47 |
-
});
|
48 |
-
|
49 |
-
})( jQuery, window, document );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.affix.js
DELETED
@@ -1,127 +0,0 @@
|
|
1 |
-
|
2 |
-
/* ========================================================================
|
3 |
-
* Bootstrap: affix.js v3.0.3
|
4 |
-
* http://getbootstrap.com/javascript/#affix
|
5 |
-
* ========================================================================
|
6 |
-
* Copyright 2013 Twitter, Inc.
|
7 |
-
*
|
8 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
9 |
-
* you may not use this file except in compliance with the License.
|
10 |
-
* You may obtain a copy of the License at
|
11 |
-
*
|
12 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
13 |
-
*
|
14 |
-
* Unless required by applicable law or agreed to in writing, software
|
15 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
16 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17 |
-
* See the License for the specific language governing permissions and
|
18 |
-
* limitations under the License.
|
19 |
-
* ======================================================================== */
|
20 |
-
|
21 |
-
|
22 |
-
+function ($) { "use strict";
|
23 |
-
|
24 |
-
// AFFIX CLASS DEFINITION
|
25 |
-
// ======================
|
26 |
-
|
27 |
-
var Affix = function (element, options) {
|
28 |
-
this.options = $.extend({}, Affix.DEFAULTS, options)
|
29 |
-
this.$window = $(window)
|
30 |
-
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
31 |
-
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
32 |
-
|
33 |
-
this.$element = $(element)
|
34 |
-
this.affixed =
|
35 |
-
this.unpin = null
|
36 |
-
|
37 |
-
this.checkPosition()
|
38 |
-
}
|
39 |
-
|
40 |
-
Affix.RESET = 'affix affix-top affix-bottom'
|
41 |
-
|
42 |
-
Affix.DEFAULTS = {
|
43 |
-
offset: 0
|
44 |
-
}
|
45 |
-
|
46 |
-
Affix.prototype.checkPositionWithEventLoop = function () {
|
47 |
-
setTimeout($.proxy(this.checkPosition, this), 1)
|
48 |
-
}
|
49 |
-
|
50 |
-
Affix.prototype.checkPosition = function () {
|
51 |
-
if (!this.$element.is(':visible')) return
|
52 |
-
|
53 |
-
var scrollHeight = $(document).height()
|
54 |
-
var scrollTop = this.$window.scrollTop()
|
55 |
-
var position = this.$element.offset()
|
56 |
-
var offset = this.options.offset
|
57 |
-
var offsetTop = offset.top
|
58 |
-
var offsetBottom = offset.bottom
|
59 |
-
|
60 |
-
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
61 |
-
if (typeof offsetTop == 'function') offsetTop = offset.top()
|
62 |
-
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
|
63 |
-
|
64 |
-
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
|
65 |
-
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
|
66 |
-
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
|
67 |
-
|
68 |
-
if (this.affixed === affix) return
|
69 |
-
if (this.unpin) this.$element.css('top', '')
|
70 |
-
|
71 |
-
this.affixed = affix
|
72 |
-
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
|
73 |
-
|
74 |
-
this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
|
75 |
-
|
76 |
-
if (affix == 'bottom') {
|
77 |
-
this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
|
78 |
-
}
|
79 |
-
}
|
80 |
-
|
81 |
-
|
82 |
-
// AFFIX PLUGIN DEFINITION
|
83 |
-
// =======================
|
84 |
-
|
85 |
-
var old = $.fn.affix
|
86 |
-
|
87 |
-
$.fn.affix = function (option) {
|
88 |
-
return this.each(function () {
|
89 |
-
var $this = $(this)
|
90 |
-
var data = $this.data('bs.affix')
|
91 |
-
var options = typeof option == 'object' && option
|
92 |
-
|
93 |
-
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
|
94 |
-
if (typeof option == 'string') data[option]()
|
95 |
-
})
|
96 |
-
}
|
97 |
-
|
98 |
-
$.fn.affix.Constructor = Affix
|
99 |
-
|
100 |
-
|
101 |
-
// AFFIX NO CONFLICT
|
102 |
-
// =================
|
103 |
-
|
104 |
-
$.fn.affix.noConflict = function () {
|
105 |
-
$.fn.affix = old
|
106 |
-
return this
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
// AFFIX DATA-API
|
111 |
-
// ==============
|
112 |
-
|
113 |
-
$(window).on('load', function () {
|
114 |
-
$('[data-spy="affix"]').each(function () {
|
115 |
-
var $spy = $(this)
|
116 |
-
var data = $spy.data()
|
117 |
-
|
118 |
-
data.offset = data.offset || {}
|
119 |
-
|
120 |
-
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
|
121 |
-
if (data.offsetTop) data.offset.top = data.offsetTop
|
122 |
-
|
123 |
-
$spy.affix(data)
|
124 |
-
})
|
125 |
-
})
|
126 |
-
|
127 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.alert.js
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: alert.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#alerts
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// ALERT CLASS DEFINITION
|
24 |
-
// ======================
|
25 |
-
|
26 |
-
var dismiss = '[data-dismiss="alert"]'
|
27 |
-
var Alert = function (el) {
|
28 |
-
$(el).on('click', dismiss, this.close)
|
29 |
-
}
|
30 |
-
|
31 |
-
Alert.prototype.close = function (e) {
|
32 |
-
var $this = $(this)
|
33 |
-
var selector = $this.attr('data-target')
|
34 |
-
|
35 |
-
if (!selector) {
|
36 |
-
selector = $this.attr('href')
|
37 |
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
38 |
-
}
|
39 |
-
|
40 |
-
var $parent = $(selector)
|
41 |
-
|
42 |
-
if (e) e.preventDefault()
|
43 |
-
|
44 |
-
if (!$parent.length) {
|
45 |
-
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
46 |
-
}
|
47 |
-
|
48 |
-
$parent.trigger(e = $.Event('close.bs.alert'))
|
49 |
-
|
50 |
-
if (e.isDefaultPrevented()) return
|
51 |
-
|
52 |
-
$parent.removeClass('in')
|
53 |
-
|
54 |
-
function removeElement() {
|
55 |
-
$parent.trigger('closed.bs.alert').remove()
|
56 |
-
}
|
57 |
-
|
58 |
-
$.support.transition && $parent.hasClass('fade') ?
|
59 |
-
$parent
|
60 |
-
.one($.support.transition.end, removeElement)
|
61 |
-
.emulateTransitionEnd(150) :
|
62 |
-
removeElement()
|
63 |
-
}
|
64 |
-
|
65 |
-
|
66 |
-
// ALERT PLUGIN DEFINITION
|
67 |
-
// =======================
|
68 |
-
|
69 |
-
var old = $.fn.alert
|
70 |
-
|
71 |
-
$.fn.alert = function (option) {
|
72 |
-
return this.each(function () {
|
73 |
-
var $this = $(this)
|
74 |
-
var data = $this.data('bs.alert')
|
75 |
-
|
76 |
-
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
77 |
-
if (typeof option == 'string') data[option].call($this)
|
78 |
-
})
|
79 |
-
}
|
80 |
-
|
81 |
-
$.fn.alert.Constructor = Alert
|
82 |
-
|
83 |
-
|
84 |
-
// ALERT NO CONFLICT
|
85 |
-
// =================
|
86 |
-
|
87 |
-
$.fn.alert.noConflict = function () {
|
88 |
-
$.fn.alert = old
|
89 |
-
return this
|
90 |
-
}
|
91 |
-
|
92 |
-
|
93 |
-
// ALERT DATA-API
|
94 |
-
// ==============
|
95 |
-
|
96 |
-
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
97 |
-
|
98 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.button.js
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: button.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#buttons
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// BUTTON PUBLIC CLASS DEFINITION
|
24 |
-
// ==============================
|
25 |
-
|
26 |
-
var Button = function (element, options) {
|
27 |
-
this.$element = $(element)
|
28 |
-
this.options = $.extend({}, Button.DEFAULTS, options)
|
29 |
-
}
|
30 |
-
|
31 |
-
Button.DEFAULTS = {
|
32 |
-
loadingText: 'loading...'
|
33 |
-
}
|
34 |
-
|
35 |
-
Button.prototype.setState = function (state) {
|
36 |
-
var d = 'disabled'
|
37 |
-
var $el = this.$element
|
38 |
-
var val = $el.is('input') ? 'val' : 'html'
|
39 |
-
var data = $el.data()
|
40 |
-
|
41 |
-
state = state + 'Text'
|
42 |
-
|
43 |
-
if (!data.resetText) $el.data('resetText', $el[val]())
|
44 |
-
|
45 |
-
$el[val](data[state] || this.options[state])
|
46 |
-
|
47 |
-
// push to event loop to allow forms to submit
|
48 |
-
setTimeout(function () {
|
49 |
-
state == 'loadingText' ?
|
50 |
-
$el.addClass(d).attr(d, d) :
|
51 |
-
$el.removeClass(d).removeAttr(d);
|
52 |
-
}, 0)
|
53 |
-
}
|
54 |
-
|
55 |
-
Button.prototype.toggle = function () {
|
56 |
-
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
57 |
-
var changed = true
|
58 |
-
|
59 |
-
if ($parent.length) {
|
60 |
-
var $input = this.$element.find('input')
|
61 |
-
if ($input.prop('type') === 'radio') {
|
62 |
-
// see if clicking on current one
|
63 |
-
if ($input.prop('checked') && this.$element.hasClass('active'))
|
64 |
-
changed = false
|
65 |
-
else
|
66 |
-
$parent.find('.active').removeClass('active')
|
67 |
-
}
|
68 |
-
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
69 |
-
}
|
70 |
-
|
71 |
-
if (changed) this.$element.toggleClass('active')
|
72 |
-
}
|
73 |
-
|
74 |
-
|
75 |
-
// BUTTON PLUGIN DEFINITION
|
76 |
-
// ========================
|
77 |
-
|
78 |
-
var old = $.fn.button
|
79 |
-
|
80 |
-
$.fn.button = function (option) {
|
81 |
-
return this.each(function () {
|
82 |
-
var $this = $(this)
|
83 |
-
var data = $this.data('bs.button')
|
84 |
-
var options = typeof option == 'object' && option
|
85 |
-
|
86 |
-
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
87 |
-
|
88 |
-
if (option == 'toggle') data.toggle()
|
89 |
-
else if (option) data.setState(option)
|
90 |
-
})
|
91 |
-
}
|
92 |
-
|
93 |
-
$.fn.button.Constructor = Button
|
94 |
-
|
95 |
-
|
96 |
-
// BUTTON NO CONFLICT
|
97 |
-
// ==================
|
98 |
-
|
99 |
-
$.fn.button.noConflict = function () {
|
100 |
-
$.fn.button = old
|
101 |
-
return this
|
102 |
-
}
|
103 |
-
|
104 |
-
|
105 |
-
// BUTTON DATA-API
|
106 |
-
// ===============
|
107 |
-
|
108 |
-
$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
|
109 |
-
var $btn = $(e.target)
|
110 |
-
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
111 |
-
$btn.button('toggle')
|
112 |
-
e.preventDefault()
|
113 |
-
})
|
114 |
-
|
115 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.carousel.js
DELETED
@@ -1,217 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: carousel.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#carousel
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// CAROUSEL CLASS DEFINITION
|
24 |
-
// =========================
|
25 |
-
|
26 |
-
var Carousel = function (element, options) {
|
27 |
-
this.$element = $(element)
|
28 |
-
this.$indicators = this.$element.find('.carousel-indicators')
|
29 |
-
this.options = options
|
30 |
-
this.paused =
|
31 |
-
this.sliding =
|
32 |
-
this.interval =
|
33 |
-
this.$active =
|
34 |
-
this.$items = null
|
35 |
-
|
36 |
-
this.options.pause == 'hover' && this.$element
|
37 |
-
.on('mouseenter', $.proxy(this.pause, this))
|
38 |
-
.on('mouseleave', $.proxy(this.cycle, this))
|
39 |
-
}
|
40 |
-
|
41 |
-
Carousel.DEFAULTS = {
|
42 |
-
interval: 5000
|
43 |
-
, pause: 'hover'
|
44 |
-
, wrap: true
|
45 |
-
}
|
46 |
-
|
47 |
-
Carousel.prototype.cycle = function (e) {
|
48 |
-
e || (this.paused = false)
|
49 |
-
|
50 |
-
this.interval && clearInterval(this.interval)
|
51 |
-
|
52 |
-
this.options.interval
|
53 |
-
&& !this.paused
|
54 |
-
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
55 |
-
|
56 |
-
return this
|
57 |
-
}
|
58 |
-
|
59 |
-
Carousel.prototype.getActiveIndex = function () {
|
60 |
-
this.$active = this.$element.find('.item.active')
|
61 |
-
this.$items = this.$active.parent().children()
|
62 |
-
|
63 |
-
return this.$items.index(this.$active)
|
64 |
-
}
|
65 |
-
|
66 |
-
Carousel.prototype.to = function (pos) {
|
67 |
-
var that = this
|
68 |
-
var activeIndex = this.getActiveIndex()
|
69 |
-
|
70 |
-
if (pos > (this.$items.length - 1) || pos < 0) return
|
71 |
-
|
72 |
-
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
|
73 |
-
if (activeIndex == pos) return this.pause().cycle()
|
74 |
-
|
75 |
-
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
76 |
-
}
|
77 |
-
|
78 |
-
Carousel.prototype.pause = function (e) {
|
79 |
-
e || (this.paused = true)
|
80 |
-
|
81 |
-
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
|
82 |
-
this.$element.trigger($.support.transition.end)
|
83 |
-
this.cycle(true)
|
84 |
-
}
|
85 |
-
|
86 |
-
this.interval = clearInterval(this.interval)
|
87 |
-
|
88 |
-
return this
|
89 |
-
}
|
90 |
-
|
91 |
-
Carousel.prototype.next = function () {
|
92 |
-
if (this.sliding) return
|
93 |
-
return this.slide('next')
|
94 |
-
}
|
95 |
-
|
96 |
-
Carousel.prototype.prev = function () {
|
97 |
-
if (this.sliding) return
|
98 |
-
return this.slide('prev')
|
99 |
-
}
|
100 |
-
|
101 |
-
Carousel.prototype.slide = function (type, next) {
|
102 |
-
var $active = this.$element.find('.item.active')
|
103 |
-
var $next = next || $active[type]()
|
104 |
-
var isCycling = this.interval
|
105 |
-
var direction = type == 'next' ? 'left' : 'right'
|
106 |
-
var fallback = type == 'next' ? 'first' : 'last'
|
107 |
-
var that = this
|
108 |
-
|
109 |
-
if (!$next.length) {
|
110 |
-
if (!this.options.wrap) return
|
111 |
-
$next = this.$element.find('.item')[fallback]()
|
112 |
-
}
|
113 |
-
|
114 |
-
this.sliding = true
|
115 |
-
|
116 |
-
isCycling && this.pause()
|
117 |
-
|
118 |
-
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
|
119 |
-
|
120 |
-
if ($next.hasClass('active')) return
|
121 |
-
|
122 |
-
if (this.$indicators.length) {
|
123 |
-
this.$indicators.find('.active').removeClass('active')
|
124 |
-
this.$element.one('slid.bs.carousel', function () {
|
125 |
-
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
|
126 |
-
$nextIndicator && $nextIndicator.addClass('active')
|
127 |
-
})
|
128 |
-
}
|
129 |
-
|
130 |
-
if ($.support.transition && this.$element.hasClass('slide')) {
|
131 |
-
this.$element.trigger(e)
|
132 |
-
if (e.isDefaultPrevented()) return
|
133 |
-
$next.addClass(type)
|
134 |
-
$next[0].offsetWidth // force reflow
|
135 |
-
$active.addClass(direction)
|
136 |
-
$next.addClass(direction)
|
137 |
-
$active
|
138 |
-
.one($.support.transition.end, function () {
|
139 |
-
$next.removeClass([type, direction].join(' ')).addClass('active')
|
140 |
-
$active.removeClass(['active', direction].join(' '))
|
141 |
-
that.sliding = false
|
142 |
-
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
|
143 |
-
})
|
144 |
-
.emulateTransitionEnd(600)
|
145 |
-
} else {
|
146 |
-
this.$element.trigger(e)
|
147 |
-
if (e.isDefaultPrevented()) return
|
148 |
-
$active.removeClass('active')
|
149 |
-
$next.addClass('active')
|
150 |
-
this.sliding = false
|
151 |
-
this.$element.trigger('slid.bs.carousel')
|
152 |
-
}
|
153 |
-
|
154 |
-
isCycling && this.cycle()
|
155 |
-
|
156 |
-
return this
|
157 |
-
}
|
158 |
-
|
159 |
-
|
160 |
-
// CAROUSEL PLUGIN DEFINITION
|
161 |
-
// ==========================
|
162 |
-
|
163 |
-
var old = $.fn.carousel
|
164 |
-
|
165 |
-
$.fn.carousel = function (option) {
|
166 |
-
return this.each(function () {
|
167 |
-
var $this = $(this)
|
168 |
-
var data = $this.data('bs.carousel')
|
169 |
-
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
170 |
-
var action = typeof option == 'string' ? option : options.slide
|
171 |
-
|
172 |
-
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
|
173 |
-
if (typeof option == 'number') data.to(option)
|
174 |
-
else if (action) data[action]()
|
175 |
-
else if (options.interval) data.pause().cycle()
|
176 |
-
})
|
177 |
-
}
|
178 |
-
|
179 |
-
$.fn.carousel.Constructor = Carousel
|
180 |
-
|
181 |
-
|
182 |
-
// CAROUSEL NO CONFLICT
|
183 |
-
// ====================
|
184 |
-
|
185 |
-
$.fn.carousel.noConflict = function () {
|
186 |
-
$.fn.carousel = old
|
187 |
-
return this
|
188 |
-
}
|
189 |
-
|
190 |
-
|
191 |
-
// CAROUSEL DATA-API
|
192 |
-
// =================
|
193 |
-
|
194 |
-
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
195 |
-
var $this = $(this), href
|
196 |
-
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
197 |
-
var options = $.extend({}, $target.data(), $this.data())
|
198 |
-
var slideIndex = $this.attr('data-slide-to')
|
199 |
-
if (slideIndex) options.interval = false
|
200 |
-
|
201 |
-
$target.carousel(options)
|
202 |
-
|
203 |
-
if (slideIndex = $this.attr('data-slide-to')) {
|
204 |
-
$target.data('bs.carousel').to(slideIndex)
|
205 |
-
}
|
206 |
-
|
207 |
-
e.preventDefault()
|
208 |
-
})
|
209 |
-
|
210 |
-
$(window).on('load', function () {
|
211 |
-
$('[data-ride="carousel"]').each(function () {
|
212 |
-
var $carousel = $(this)
|
213 |
-
$carousel.carousel($carousel.data())
|
214 |
-
})
|
215 |
-
})
|
216 |
-
|
217 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.collapse.js
DELETED
@@ -1,167 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: collapse.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#collapse
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// COLLAPSE PUBLIC CLASS DEFINITION
|
24 |
-
// ================================
|
25 |
-
|
26 |
-
var Collapse = function (element, options) {
|
27 |
-
this.$element = $(element)
|
28 |
-
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
29 |
-
this.transitioning = null
|
30 |
-
|
31 |
-
if (this.options.parent) this.$parent = $(this.options.parent)
|
32 |
-
if (this.options.toggle) this.toggle()
|
33 |
-
}
|
34 |
-
|
35 |
-
Collapse.DEFAULTS = {
|
36 |
-
toggle: true
|
37 |
-
}
|
38 |
-
|
39 |
-
Collapse.prototype.dimension = function () {
|
40 |
-
var hasWidth = this.$element.hasClass('width')
|
41 |
-
return hasWidth ? 'width' : 'height'
|
42 |
-
}
|
43 |
-
|
44 |
-
Collapse.prototype.show = function () {
|
45 |
-
if (this.transitioning || this.$element.hasClass('in')) return
|
46 |
-
|
47 |
-
var startEvent = $.Event('show.bs.collapse')
|
48 |
-
this.$element.trigger(startEvent)
|
49 |
-
if (startEvent.isDefaultPrevented()) return
|
50 |
-
|
51 |
-
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
52 |
-
|
53 |
-
if (actives && actives.length) {
|
54 |
-
var hasData = actives.data('bs.collapse')
|
55 |
-
if (hasData && hasData.transitioning) return
|
56 |
-
actives.collapse('hide')
|
57 |
-
hasData || actives.data('bs.collapse', null)
|
58 |
-
}
|
59 |
-
|
60 |
-
var dimension = this.dimension()
|
61 |
-
|
62 |
-
this.$element
|
63 |
-
.removeClass('collapse')
|
64 |
-
.addClass('collapsing')
|
65 |
-
[dimension](0)
|
66 |
-
|
67 |
-
this.transitioning = 1
|
68 |
-
|
69 |
-
var complete = function () {
|
70 |
-
this.$element
|
71 |
-
.removeClass('collapsing')
|
72 |
-
.addClass('in')
|
73 |
-
[dimension]('auto')
|
74 |
-
this.transitioning = 0
|
75 |
-
this.$element.trigger('shown.bs.collapse')
|
76 |
-
}
|
77 |
-
|
78 |
-
if (!$.support.transition) return complete.call(this)
|
79 |
-
|
80 |
-
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
81 |
-
|
82 |
-
this.$element
|
83 |
-
.one($.support.transition.end, $.proxy(complete, this))
|
84 |
-
.emulateTransitionEnd(350)
|
85 |
-
[dimension](this.$element[0][scrollSize])
|
86 |
-
}
|
87 |
-
|
88 |
-
Collapse.prototype.hide = function () {
|
89 |
-
if (this.transitioning || !this.$element.hasClass('in')) return
|
90 |
-
|
91 |
-
var startEvent = $.Event('hide.bs.collapse')
|
92 |
-
this.$element.trigger(startEvent)
|
93 |
-
if (startEvent.isDefaultPrevented()) return
|
94 |
-
|
95 |
-
var dimension = this.dimension()
|
96 |
-
|
97 |
-
this.$element
|
98 |
-
[dimension](this.$element[dimension]())
|
99 |
-
[0].offsetHeight
|
100 |
-
|
101 |
-
this.$element
|
102 |
-
.addClass('collapsing')
|
103 |
-
.removeClass('collapse')
|
104 |
-
.removeClass('in')
|
105 |
-
|
106 |
-
this.transitioning = 1
|
107 |
-
|
108 |
-
var complete = function () {
|
109 |
-
this.transitioning = 0
|
110 |
-
this.$element
|
111 |
-
.trigger('hidden.bs.collapse')
|
112 |
-
.removeClass('collapsing')
|
113 |
-
.addClass('collapse')
|
114 |
-
}
|
115 |
-
|
116 |
-
if (!$.support.transition) return complete.call(this)
|
117 |
-
|
118 |
-
this.$element
|
119 |
-
[dimension](0)
|
120 |
-
.one($.support.transition.end, $.proxy(complete, this))
|
121 |
-
.emulateTransitionEnd(350)
|
122 |
-
}
|
123 |
-
|
124 |
-
Collapse.prototype.toggle = function () {
|
125 |
-
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
126 |
-
}
|
127 |
-
|
128 |
-
|
129 |
-
// COLLAPSE PLUGIN DEFINITION
|
130 |
-
// ==========================
|
131 |
-
|
132 |
-
$.fn.factoryBootstrap330_collapse = function (option) {
|
133 |
-
return this.each(function () {
|
134 |
-
var $this = $(this)
|
135 |
-
var data = $this.data('bs.collapse')
|
136 |
-
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
137 |
-
|
138 |
-
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
139 |
-
if (typeof option == 'string') data[option]()
|
140 |
-
})
|
141 |
-
}
|
142 |
-
|
143 |
-
$.fn.factoryBootstrap330_collapse.Constructor = Collapse
|
144 |
-
|
145 |
-
// COLLAPSE DATA-API
|
146 |
-
// =================
|
147 |
-
|
148 |
-
$(document).on('click.bs.collapse.data-api', '[data-toggle=factory-collapse]', function (e) {
|
149 |
-
var $this = $(this), href
|
150 |
-
var target = $this.attr('data-target')
|
151 |
-
|| e.preventDefault()
|
152 |
-
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
153 |
-
var $target = $(target)
|
154 |
-
var data = $target.data('bs.collapse')
|
155 |
-
var option = data ? 'toggle' : $this.data()
|
156 |
-
var parent = $this.attr('data-parent')
|
157 |
-
var $parent = parent && $(parent)
|
158 |
-
|
159 |
-
if (!data || !data.transitioning) {
|
160 |
-
if ($parent) $parent.find('[data-toggle=factory-collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
161 |
-
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
162 |
-
}
|
163 |
-
|
164 |
-
$target.collapse(option)
|
165 |
-
})
|
166 |
-
|
167 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.datepicker.js
DELETED
@@ -1,1966 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Datepicker for Bootstrap v1.5.0-dev (https://github.com/eternicode/bootstrap-datepicker)
|
3 |
-
*
|
4 |
-
* Copyright 2012 Stefan Petre
|
5 |
-
* Improvements by Andrew Rowls
|
6 |
-
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
7 |
-
*/
|
8 |
-
(function($, undefined) {
|
9 |
-
|
10 |
-
function UTCDate() {
|
11 |
-
return new Date(Date.UTC.apply(Date, arguments));
|
12 |
-
}
|
13 |
-
|
14 |
-
function UTCToday() {
|
15 |
-
var today = new Date();
|
16 |
-
return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
|
17 |
-
}
|
18 |
-
|
19 |
-
function isUTCEquals(date1, date2) {
|
20 |
-
return (
|
21 |
-
date1.getUTCFullYear() === date2.getUTCFullYear() &&
|
22 |
-
date1.getUTCMonth() === date2.getUTCMonth() &&
|
23 |
-
date1.getUTCDate() === date2.getUTCDate()
|
24 |
-
);
|
25 |
-
}
|
26 |
-
|
27 |
-
function alias(method) {
|
28 |
-
return function() {
|
29 |
-
return this[method].apply(this, arguments);
|
30 |
-
};
|
31 |
-
}
|
32 |
-
|
33 |
-
var DateArray = (function() {
|
34 |
-
var extras = {
|
35 |
-
get: function(i) {
|
36 |
-
return this.slice(i)[0];
|
37 |
-
},
|
38 |
-
contains: function(d) {
|
39 |
-
// Array.indexOf is not cross-browser;
|
40 |
-
// $.inArray doesn't work with Dates
|
41 |
-
var val = d && d.valueOf();
|
42 |
-
for( var i = 0, l = this.length; i < l; i++ ) {
|
43 |
-
if( this[i].valueOf() === val ) {
|
44 |
-
return i;
|
45 |
-
}
|
46 |
-
}
|
47 |
-
return -1;
|
48 |
-
},
|
49 |
-
remove: function(i) {
|
50 |
-
this.splice(i, 1);
|
51 |
-
},
|
52 |
-
replace: function(new_array) {
|
53 |
-
if( !new_array ) {
|
54 |
-
return;
|
55 |
-
}
|
56 |
-
if( !$.isArray(new_array) ) {
|
57 |
-
new_array = [new_array];
|
58 |
-
}
|
59 |
-
this.clear();
|
60 |
-
this.push.apply(this, new_array);
|
61 |
-
},
|
62 |
-
clear: function() {
|
63 |
-
this.length = 0;
|
64 |
-
},
|
65 |
-
copy: function() {
|
66 |
-
var a = new DateArray();
|
67 |
-
a.replace(this);
|
68 |
-
return a;
|
69 |
-
}
|
70 |
-
};
|
71 |
-
|
72 |
-
return function() {
|
73 |
-
var a = [];
|
74 |
-
a.push.apply(a, arguments);
|
75 |
-
$.extend(a, extras);
|
76 |
-
return a;
|
77 |
-
};
|
78 |
-
})();
|
79 |
-
|
80 |
-
// Picker object
|
81 |
-
|
82 |
-
var Datepicker = function(element, options) {
|
83 |
-
this._process_options(options);
|
84 |
-
|
85 |
-
this.dates = new DateArray();
|
86 |
-
this.viewDate = this.o.defaultViewDate;
|
87 |
-
this.focusDate = null;
|
88 |
-
|
89 |
-
this.element = $(element);
|
90 |
-
this.isInline = false;
|
91 |
-
this.isInput = this.element.is('input');
|
92 |
-
this.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;
|
93 |
-
this.hasInput = this.component && this.element.find('input').length;
|
94 |
-
if( this.component && this.component.length === 0 ) {
|
95 |
-
this.component = false;
|
96 |
-
}
|
97 |
-
|
98 |
-
this.picker = $(DPGlobal.template);
|
99 |
-
this._buildEvents();
|
100 |
-
this._attachEvents();
|
101 |
-
|
102 |
-
if( this.isInline ) {
|
103 |
-
this.picker.addClass('datepicker-inline').appendTo(this.element);
|
104 |
-
}
|
105 |
-
else {
|
106 |
-
this.picker.addClass('datepicker-dropdown dropdown-menu');
|
107 |
-
}
|
108 |
-
|
109 |
-
if( this.o.rtl ) {
|
110 |
-
this.picker.addClass('datepicker-rtl');
|
111 |
-
}
|
112 |
-
|
113 |
-
this.viewMode = this.o.startView;
|
114 |
-
|
115 |
-
if( this.o.calendarWeeks ) {
|
116 |
-
this.picker.find('tfoot .today, tfoot .clear')
|
117 |
-
.attr('colspan', function(i, val) {
|
118 |
-
return parseInt(val) + 1;
|
119 |
-
});
|
120 |
-
}
|
121 |
-
|
122 |
-
this._allow_update = false;
|
123 |
-
|
124 |
-
this.setStartDate(this._o.startDate);
|
125 |
-
this.setEndDate(this._o.endDate);
|
126 |
-
this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);
|
127 |
-
this.setDatesDisabled(this.o.datesDisabled);
|
128 |
-
|
129 |
-
this.fillDow();
|
130 |
-
this.fillMonths();
|
131 |
-
|
132 |
-
this._allow_update = true;
|
133 |
-
|
134 |
-
this.update();
|
135 |
-
this.showMode();
|
136 |
-
|
137 |
-
if( this.isInline ) {
|
138 |
-
this.show();
|
139 |
-
}
|
140 |
-
};
|
141 |
-
|
142 |
-
Datepicker.prototype = {
|
143 |
-
constructor: Datepicker,
|
144 |
-
|
145 |
-
_process_options: function(opts) {
|
146 |
-
// Store raw options for reference
|
147 |
-
this._o = $.extend({}, this._o, opts);
|
148 |
-
// Processed options
|
149 |
-
var o = this.o = $.extend({}, this._o);
|
150 |
-
|
151 |
-
// Check if "de-DE" style date is available, if not language should
|
152 |
-
// fallback to 2 letter code eg "de"
|
153 |
-
var lang = o.language;
|
154 |
-
if( !dates[lang] ) {
|
155 |
-
lang = lang.split('-')[0];
|
156 |
-
if( !dates[lang] ) {
|
157 |
-
lang = defaults.language;
|
158 |
-
}
|
159 |
-
}
|
160 |
-
o.language = lang;
|
161 |
-
|
162 |
-
switch( o.startView ) {
|
163 |
-
case 2:
|
164 |
-
case 'decade':
|
165 |
-
o.startView = 2;
|
166 |
-
break;
|
167 |
-
case 1:
|
168 |
-
case 'year':
|
169 |
-
o.startView = 1;
|
170 |
-
break;
|
171 |
-
default:
|
172 |
-
o.startView = 0;
|
173 |
-
}
|
174 |
-
|
175 |
-
switch( o.minViewMode ) {
|
176 |
-
case 1:
|
177 |
-
case 'months':
|
178 |
-
o.minViewMode = 1;
|
179 |
-
break;
|
180 |
-
case 2:
|
181 |
-
case 'years':
|
182 |
-
o.minViewMode = 2;
|
183 |
-
break;
|
184 |
-
default:
|
185 |
-
o.minViewMode = 0;
|
186 |
-
}
|
187 |
-
|
188 |
-
o.startView = Math.max(o.startView, o.minViewMode);
|
189 |
-
|
190 |
-
// true, false, or Number > 0
|
191 |
-
if( o.multidate !== true ) {
|
192 |
-
o.multidate = Number(o.multidate) || false;
|
193 |
-
if( o.multidate !== false ) {
|
194 |
-
o.multidate = Math.max(0, o.multidate);
|
195 |
-
}
|
196 |
-
}
|
197 |
-
o.multidateSeparator = String(o.multidateSeparator);
|
198 |
-
|
199 |
-
o.weekStart %= 7;
|
200 |
-
o.weekEnd = ((o.weekStart + 6) % 7);
|
201 |
-
|
202 |
-
var format = DPGlobal.parseFormat(o.format);
|
203 |
-
if( o.startDate !== -Infinity ) {
|
204 |
-
if( !!o.startDate ) {
|
205 |
-
if( o.startDate instanceof Date ) {
|
206 |
-
o.startDate = this._local_to_utc(this._zero_time(o.startDate));
|
207 |
-
} else {
|
208 |
-
o.startDate = DPGlobal.parseDate(o.startDate, format, o.language);
|
209 |
-
}
|
210 |
-
}
|
211 |
-
else {
|
212 |
-
o.startDate = -Infinity;
|
213 |
-
}
|
214 |
-
}
|
215 |
-
if( o.endDate !== Infinity ) {
|
216 |
-
if( !!o.endDate ) {
|
217 |
-
if( o.endDate instanceof Date ) {
|
218 |
-
o.endDate = this._local_to_utc(this._zero_time(o.endDate));
|
219 |
-
} else {
|
220 |
-
o.endDate = DPGlobal.parseDate(o.endDate, format, o.language);
|
221 |
-
}
|
222 |
-
}
|
223 |
-
else {
|
224 |
-
o.endDate = Infinity;
|
225 |
-
}
|
226 |
-
}
|
227 |
-
|
228 |
-
o.daysOfWeekDisabled = o.daysOfWeekDisabled || [];
|
229 |
-
if( !$.isArray(o.daysOfWeekDisabled) ) {
|
230 |
-
o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/);
|
231 |
-
}
|
232 |
-
o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d) {
|
233 |
-
return parseInt(d, 10);
|
234 |
-
});
|
235 |
-
|
236 |
-
o.datesDisabled = o.datesDisabled || [];
|
237 |
-
if( !$.isArray(o.datesDisabled) ) {
|
238 |
-
var datesDisabled = [];
|
239 |
-
datesDisabled.push(DPGlobal.parseDate(o.datesDisabled, format, o.language));
|
240 |
-
o.datesDisabled = datesDisabled;
|
241 |
-
}
|
242 |
-
o.datesDisabled = $.map(o.datesDisabled, function(d) {
|
243 |
-
return DPGlobal.parseDate(d, format, o.language);
|
244 |
-
});
|
245 |
-
|
246 |
-
var plc = String(o.orientation).toLowerCase().split(/\s+/g),
|
247 |
-
_plc = o.orientation.toLowerCase();
|
248 |
-
plc = $.grep(plc, function(word) {
|
249 |
-
return /^auto|left|right|top|bottom$/.test(word);
|
250 |
-
});
|
251 |
-
o.orientation = {
|
252 |
-
x: 'auto',
|
253 |
-
y: 'auto'
|
254 |
-
};
|
255 |
-
if( !_plc || _plc === 'auto' ) {
|
256 |
-
;
|
257 |
-
}// no action
|
258 |
-
else if( plc.length === 1 ) {
|
259 |
-
switch( plc[0] ) {
|
260 |
-
case 'top':
|
261 |
-
case 'bottom':
|
262 |
-
o.orientation.y = plc[0];
|
263 |
-
break;
|
264 |
-
case 'left':
|
265 |
-
case 'right':
|
266 |
-
o.orientation.x = plc[0];
|
267 |
-
break;
|
268 |
-
}
|
269 |
-
}
|
270 |
-
else {
|
271 |
-
_plc = $.grep(plc, function(word) {
|
272 |
-
return /^left|right$/.test(word);
|
273 |
-
});
|
274 |
-
o.orientation.x = _plc[0] || 'auto';
|
275 |
-
|
276 |
-
_plc = $.grep(plc, function(word) {
|
277 |
-
return /^top|bottom$/.test(word);
|
278 |
-
});
|
279 |
-
o.orientation.y = _plc[0] || 'auto';
|
280 |
-
}
|
281 |
-
if( o.defaultViewDate ) {
|
282 |
-
var year = o.defaultViewDate.year || new Date().getFullYear();
|
283 |
-
var month = o.defaultViewDate.month || 0;
|
284 |
-
var day = o.defaultViewDate.day || 1;
|
285 |
-
o.defaultViewDate = UTCDate(year, month, day);
|
286 |
-
} else {
|
287 |
-
o.defaultViewDate = UTCToday();
|
288 |
-
}
|
289 |
-
o.showOnFocus = o.showOnFocus !== undefined ? o.showOnFocus : true;
|
290 |
-
},
|
291 |
-
_events: [],
|
292 |
-
_secondaryEvents: [],
|
293 |
-
_applyEvents: function(evs) {
|
294 |
-
for( var i = 0, el, ch, ev; i < evs.length; i++ ) {
|
295 |
-
el = evs[i][0];
|
296 |
-
if( evs[i].length === 2 ) {
|
297 |
-
ch = undefined;
|
298 |
-
ev = evs[i][1];
|
299 |
-
}
|
300 |
-
else if( evs[i].length === 3 ) {
|
301 |
-
ch = evs[i][1];
|
302 |
-
ev = evs[i][2];
|
303 |
-
}
|
304 |
-
el.on(ev, ch);
|
305 |
-
}
|
306 |
-
},
|
307 |
-
_unapplyEvents: function(evs) {
|
308 |
-
for( var i = 0, el, ev, ch; i < evs.length; i++ ) {
|
309 |
-
el = evs[i][0];
|
310 |
-
if( evs[i].length === 2 ) {
|
311 |
-
ch = undefined;
|
312 |
-
ev = evs[i][1];
|
313 |
-
}
|
314 |
-
else if( evs[i].length === 3 ) {
|
315 |
-
ch = evs[i][1];
|
316 |
-
ev = evs[i][2];
|
317 |
-
}
|
318 |
-
el.off(ev, ch);
|
319 |
-
}
|
320 |
-
},
|
321 |
-
_buildEvents: function() {
|
322 |
-
var events = {
|
323 |
-
keyup: $.proxy(function(e) {
|
324 |
-
if( $.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1 ) {
|
325 |
-
this.update();
|
326 |
-
}
|
327 |
-
}, this),
|
328 |
-
keydown: $.proxy(this.keydown, this),
|
329 |
-
paste: $.proxy(this.paste, this)
|
330 |
-
};
|
331 |
-
|
332 |
-
if( this.o.showOnFocus === true ) {
|
333 |
-
events.focus = $.proxy(this.show, this);
|
334 |
-
}
|
335 |
-
|
336 |
-
if( this.isInput ) { // single input
|
337 |
-
this._events = [
|
338 |
-
[this.element, events]
|
339 |
-
];
|
340 |
-
}
|
341 |
-
else if( this.component && this.hasInput ) { // component: input + button
|
342 |
-
this._events = [
|
343 |
-
// For components that are not readonly, allow keyboard nav
|
344 |
-
[this.element.find('input'), events],
|
345 |
-
[
|
346 |
-
this.component, {
|
347 |
-
click: $.proxy(this.show, this)
|
348 |
-
}
|
349 |
-
]
|
350 |
-
];
|
351 |
-
}
|
352 |
-
else if( this.element.is('div') ) { // inline datepicker
|
353 |
-
this.isInline = true;
|
354 |
-
}
|
355 |
-
else {
|
356 |
-
this._events = [
|
357 |
-
[
|
358 |
-
this.element, {
|
359 |
-
click: $.proxy(this.show, this)
|
360 |
-
}
|
361 |
-
]
|
362 |
-
];
|
363 |
-
}
|
364 |
-
this._events.push(
|
365 |
-
// Component: listen for blur on element descendants
|
366 |
-
[
|
367 |
-
this.element, '*', {
|
368 |
-
blur: $.proxy(function(e) {
|
369 |
-
this._focused_from = e.target;
|
370 |
-
}, this)
|
371 |
-
}
|
372 |
-
],
|
373 |
-
// Input: listen for blur on element
|
374 |
-
[
|
375 |
-
this.element, {
|
376 |
-
blur: $.proxy(function(e) {
|
377 |
-
this._focused_from = e.target;
|
378 |
-
}, this)
|
379 |
-
}
|
380 |
-
]
|
381 |
-
);
|
382 |
-
|
383 |
-
if( this.o.immediateUpdates ) {
|
384 |
-
// Trigger input updates immediately on changed year/month
|
385 |
-
this._events.push([
|
386 |
-
this.element, {
|
387 |
-
'changeYear changeMonth': $.proxy(function(e) {
|
388 |
-
this.update(e.date);
|
389 |
-
}, this)
|
390 |
-
}
|
391 |
-
]);
|
392 |
-
}
|
393 |
-
|
394 |
-
this._secondaryEvents = [
|
395 |
-
[
|
396 |
-
this.picker, {
|
397 |
-
click: $.proxy(this.click, this)
|
398 |
-
}
|
399 |
-
],
|
400 |
-
[
|
401 |
-
$(window), {
|
402 |
-
resize: $.proxy(this.place, this)
|
403 |
-
}
|
404 |
-
],
|
405 |
-
[
|
406 |
-
$(document), {
|
407 |
-
mousedown: $.proxy(function(e) {
|
408 |
-
// Clicked outside the datepicker, hide it
|
409 |
-
if( !(
|
410 |
-
this.element.is(e.target) ||
|
411 |
-
this.element.find(e.target).length ||
|
412 |
-
this.picker.is(e.target) ||
|
413 |
-
this.picker.find(e.target).length
|
414 |
-
) ) {
|
415 |
-
$(this.picker).hide();
|
416 |
-
}
|
417 |
-
}, this)
|
418 |
-
}
|
419 |
-
]
|
420 |
-
];
|
421 |
-
},
|
422 |
-
_attachEvents: function() {
|
423 |
-
this._detachEvents();
|
424 |
-
this._applyEvents(this._events);
|
425 |
-
},
|
426 |
-
_detachEvents: function() {
|
427 |
-
this._unapplyEvents(this._events);
|
428 |
-
},
|
429 |
-
_attachSecondaryEvents: function() {
|
430 |
-
this._detachSecondaryEvents();
|
431 |
-
this._applyEvents(this._secondaryEvents);
|
432 |
-
},
|
433 |
-
_detachSecondaryEvents: function() {
|
434 |
-
this._unapplyEvents(this._secondaryEvents);
|
435 |
-
},
|
436 |
-
_trigger: function(event, altdate) {
|
437 |
-
var date = altdate || this.dates.get(-1),
|
438 |
-
local_date = this._utc_to_local(date);
|
439 |
-
|
440 |
-
this.element.trigger({
|
441 |
-
type: event,
|
442 |
-
date: local_date,
|
443 |
-
dates: $.map(this.dates, this._utc_to_local),
|
444 |
-
format: $.proxy(function(ix, format) {
|
445 |
-
if( arguments.length === 0 ) {
|
446 |
-
ix = this.dates.length - 1;
|
447 |
-
format = this.o.format;
|
448 |
-
}
|
449 |
-
else if( typeof ix === 'string' ) {
|
450 |
-
format = ix;
|
451 |
-
ix = this.dates.length - 1;
|
452 |
-
}
|
453 |
-
format = format || this.o.format;
|
454 |
-
var date = this.dates.get(ix);
|
455 |
-
return DPGlobal.formatDate(date, format, this.o.language);
|
456 |
-
}, this)
|
457 |
-
});
|
458 |
-
},
|
459 |
-
|
460 |
-
show: function() {
|
461 |
-
if( this.element.attr('readonly') && this.o.enableOnReadonly === false ) {
|
462 |
-
return;
|
463 |
-
}
|
464 |
-
if( !this.isInline ) {
|
465 |
-
this.picker.appendTo(this.o.container);
|
466 |
-
}
|
467 |
-
this.place();
|
468 |
-
this.picker.show();
|
469 |
-
this._attachSecondaryEvents();
|
470 |
-
this._trigger('show');
|
471 |
-
if( (window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard ) {
|
472 |
-
$(this.element).blur();
|
473 |
-
}
|
474 |
-
return this;
|
475 |
-
},
|
476 |
-
|
477 |
-
hide: function() {
|
478 |
-
if( this.isInline ) {
|
479 |
-
return this;
|
480 |
-
}
|
481 |
-
if( !this.picker.is(':visible') ) {
|
482 |
-
return this;
|
483 |
-
}
|
484 |
-
this.focusDate = null;
|
485 |
-
this.picker.hide().detach();
|
486 |
-
this._detachSecondaryEvents();
|
487 |
-
this.viewMode = this.o.startView;
|
488 |
-
this.showMode();
|
489 |
-
|
490 |
-
if(
|
491 |
-
this.o.forceParse &&
|
492 |
-
(
|
493 |
-
this.isInput && this.element.val() ||
|
494 |
-
this.hasInput && this.element.find('input').val()
|
495 |
-
)
|
496 |
-
) {
|
497 |
-
this.setValue();
|
498 |
-
}
|
499 |
-
this._trigger('hide');
|
500 |
-
return this;
|
501 |
-
},
|
502 |
-
|
503 |
-
remove: function() {
|
504 |
-
this.hide();
|
505 |
-
this._detachEvents();
|
506 |
-
this._detachSecondaryEvents();
|
507 |
-
this.picker.remove();
|
508 |
-
delete this.element.data().datepicker;
|
509 |
-
if( !this.isInput ) {
|
510 |
-
delete this.element.data().date;
|
511 |
-
}
|
512 |
-
return this;
|
513 |
-
},
|
514 |
-
|
515 |
-
paste: function(evt) {
|
516 |
-
var dateString;
|
517 |
-
if( evt.originalEvent.clipboardData && evt.originalEvent.clipboardData.types
|
518 |
-
&& $.inArray('text/plain', evt.originalEvent.clipboardData.types) !== -1 ) {
|
519 |
-
dateString = evt.originalEvent.clipboardData.getData('text/plain');
|
520 |
-
}
|
521 |
-
else if( window.clipboardData ) {
|
522 |
-
dateString = window.clipboardData.getData('Text');
|
523 |
-
}
|
524 |
-
else {
|
525 |
-
return;
|
526 |
-
}
|
527 |
-
this.setDate(dateString);
|
528 |
-
this.update();
|
529 |
-
evt.preventDefault();
|
530 |
-
},
|
531 |
-
|
532 |
-
_utc_to_local: function(utc) {
|
533 |
-
return utc && new Date(utc.getTime() + (utc.getTimezoneOffset() * 60000));
|
534 |
-
},
|
535 |
-
_local_to_utc: function(local) {
|
536 |
-
return local && new Date(local.getTime() - (local.getTimezoneOffset() * 60000));
|
537 |
-
},
|
538 |
-
_zero_time: function(local) {
|
539 |
-
return local && new Date(local.getFullYear(), local.getMonth(), local.getDate());
|
540 |
-
},
|
541 |
-
_zero_utc_time: function(utc) {
|
542 |
-
return utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()));
|
543 |
-
},
|
544 |
-
|
545 |
-
getDates: function() {
|
546 |
-
return $.map(this.dates, this._utc_to_local);
|
547 |
-
},
|
548 |
-
|
549 |
-
getUTCDates: function() {
|
550 |
-
return $.map(this.dates, function(d) {
|
551 |
-
return new Date(d);
|
552 |
-
});
|
553 |
-
},
|
554 |
-
|
555 |
-
getDate: function() {
|
556 |
-
return this._utc_to_local(this.getUTCDate());
|
557 |
-
},
|
558 |
-
|
559 |
-
getUTCDate: function() {
|
560 |
-
var selected_date = this.dates.get(-1);
|
561 |
-
if( typeof selected_date !== 'undefined' ) {
|
562 |
-
return new Date(selected_date);
|
563 |
-
} else {
|
564 |
-
return null;
|
565 |
-
}
|
566 |
-
},
|
567 |
-
|
568 |
-
clearDates: function() {
|
569 |
-
var element;
|
570 |
-
if( this.isInput ) {
|
571 |
-
element = this.element;
|
572 |
-
} else if( this.component ) {
|
573 |
-
element = this.element.find('input');
|
574 |
-
}
|
575 |
-
|
576 |
-
if( element ) {
|
577 |
-
element.val('').change();
|
578 |
-
}
|
579 |
-
|
580 |
-
this.update();
|
581 |
-
this._trigger('changeDate');
|
582 |
-
|
583 |
-
if( this.o.autoclose ) {
|
584 |
-
this.hide();
|
585 |
-
}
|
586 |
-
},
|
587 |
-
setDates: function() {
|
588 |
-
var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
|
589 |
-
this.update.apply(this, args);
|
590 |
-
this._trigger('changeDate');
|
591 |
-
this.setValue();
|
592 |
-
return this;
|
593 |
-
},
|
594 |
-
|
595 |
-
setUTCDates: function() {
|
596 |
-
var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
|
597 |
-
this.update.apply(this, $.map(args, this._utc_to_local));
|
598 |
-
this._trigger('changeDate');
|
599 |
-
this.setValue();
|
600 |
-
return this;
|
601 |
-
},
|
602 |
-
|
603 |
-
setDate: alias('setDates'),
|
604 |
-
setUTCDate: alias('setUTCDates'),
|
605 |
-
|
606 |
-
setValue: function() {
|
607 |
-
var formatted = this.getFormattedDate();
|
608 |
-
if( !this.isInput ) {
|
609 |
-
if( this.component ) {
|
610 |
-
this.element.find('input').val(formatted).change();
|
611 |
-
}
|
612 |
-
}
|
613 |
-
else {
|
614 |
-
this.element.val(formatted).change();
|
615 |
-
}
|
616 |
-
return this;
|
617 |
-
},
|
618 |
-
|
619 |
-
getFormattedDate: function(format) {
|
620 |
-
if( format === undefined ) {
|
621 |
-
format = this.o.format;
|
622 |
-
}
|
623 |
-
|
624 |
-
var lang = this.o.language;
|
625 |
-
return $.map(this.dates, function(d) {
|
626 |
-
return DPGlobal.formatDate(d, format, lang);
|
627 |
-
}).join(this.o.multidateSeparator);
|
628 |
-
},
|
629 |
-
|
630 |
-
setStartDate: function(startDate) {
|
631 |
-
this._process_options({startDate: startDate});
|
632 |
-
this.update();
|
633 |
-
this.updateNavArrows();
|
634 |
-
return this;
|
635 |
-
},
|
636 |
-
|
637 |
-
setEndDate: function(endDate) {
|
638 |
-
this._process_options({endDate: endDate});
|
639 |
-
this.update();
|
640 |
-
this.updateNavArrows();
|
641 |
-
return this;
|
642 |
-
},
|
643 |
-
|
644 |
-
setDaysOfWeekDisabled: function(daysOfWeekDisabled) {
|
645 |
-
this._process_options({daysOfWeekDisabled: daysOfWeekDisabled});
|
646 |
-
this.update();
|
647 |
-
this.updateNavArrows();
|
648 |
-
return this;
|
649 |
-
},
|
650 |
-
|
651 |
-
setDatesDisabled: function(datesDisabled) {
|
652 |
-
this._process_options({datesDisabled: datesDisabled});
|
653 |
-
this.update();
|
654 |
-
this.updateNavArrows();
|
655 |
-
},
|
656 |
-
|
657 |
-
place: function() {
|
658 |
-
if( this.isInline ) {
|
659 |
-
return this;
|
660 |
-
}
|
661 |
-
var calendarWidth = this.picker.outerWidth(),
|
662 |
-
calendarHeight = this.picker.outerHeight(),
|
663 |
-
visualPadding = 10,
|
664 |
-
windowWidth = $(this.o.container).width(),
|
665 |
-
windowHeight = $(this.o.container).height(),
|
666 |
-
scrollTop = $(this.o.container).scrollTop(),
|
667 |
-
appendOffset = $(this.o.container).offset();
|
668 |
-
|
669 |
-
var parentsZindex = [];
|
670 |
-
this.element.parents().each(function() {
|
671 |
-
var itemZIndex = $(this).css('z-index');
|
672 |
-
if( itemZIndex !== 'auto' && itemZIndex !== 0 ) {
|
673 |
-
parentsZindex.push(parseInt(itemZIndex));
|
674 |
-
}
|
675 |
-
});
|
676 |
-
var zIndex = Math.max.apply(Math, parentsZindex) + 10;
|
677 |
-
var offset = this.component ? this.component.parent().offset() : this.element.offset();
|
678 |
-
var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);
|
679 |
-
var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false);
|
680 |
-
var left = offset.left - appendOffset.left,
|
681 |
-
top = offset.top - appendOffset.top;
|
682 |
-
|
683 |
-
this.picker.removeClass(
|
684 |
-
'datepicker-orient-top datepicker-orient-bottom ' +
|
685 |
-
'datepicker-orient-right datepicker-orient-left'
|
686 |
-
);
|
687 |
-
|
688 |
-
if( this.o.orientation.x !== 'auto' ) {
|
689 |
-
this.picker.addClass('datepicker-orient-' + this.o.orientation.x);
|
690 |
-
if( this.o.orientation.x === 'right' ) {
|
691 |
-
left -= calendarWidth - width;
|
692 |
-
}
|
693 |
-
}
|
694 |
-
// auto x orientation is best-placement: if it crosses a window
|
695 |
-
// edge, fudge it sideways
|
696 |
-
else {
|
697 |
-
if( offset.left < 0 ) {
|
698 |
-
// component is outside the window on the left side. Move it into visible range
|
699 |
-
this.picker.addClass('datepicker-orient-left');
|
700 |
-
left -= offset.left - visualPadding;
|
701 |
-
} else if( left + calendarWidth > windowWidth ) {
|
702 |
-
// the calendar passes the widow right edge. Align it to component right side
|
703 |
-
this.picker.addClass('datepicker-orient-right');
|
704 |
-
left = offset.left + width - calendarWidth;
|
705 |
-
} else {
|
706 |
-
// Default to left
|
707 |
-
this.picker.addClass('datepicker-orient-left');
|
708 |
-
}
|
709 |
-
}
|
710 |
-
|
711 |
-
// auto y orientation is best-situation: top or bottom, no fudging,
|
712 |
-
// decision based on which shows more of the calendar
|
713 |
-
var yorient = this.o.orientation.y,
|
714 |
-
top_overflow, bottom_overflow;
|
715 |
-
if( yorient === 'auto' ) {
|
716 |
-
top_overflow = -scrollTop + top - calendarHeight;
|
717 |
-
bottom_overflow = scrollTop + windowHeight - (top + height + calendarHeight);
|
718 |
-
if( Math.max(top_overflow, bottom_overflow) === bottom_overflow ) {
|
719 |
-
yorient = 'top';
|
720 |
-
} else {
|
721 |
-
yorient = 'bottom';
|
722 |
-
}
|
723 |
-
}
|
724 |
-
this.picker.addClass('datepicker-orient-' + yorient);
|
725 |
-
if( yorient === 'top' ) {
|
726 |
-
top += height;
|
727 |
-
} else {
|
728 |
-
top -= calendarHeight + parseInt(this.picker.css('padding-top'));
|
729 |
-
}
|
730 |
-
|
731 |
-
if( this.o.rtl ) {
|
732 |
-
var right = windowWidth - (left + width);
|
733 |
-
this.picker.css({
|
734 |
-
top: top,
|
735 |
-
right: right,
|
736 |
-
zIndex: zIndex
|
737 |
-
});
|
738 |
-
} else {
|
739 |
-
this.picker.css({
|
740 |
-
top: top,
|
741 |
-
left: left,
|
742 |
-
zIndex: zIndex
|
743 |
-
});
|
744 |
-
}
|
745 |
-
return this;
|
746 |
-
},
|
747 |
-
|
748 |
-
_allow_update: true,
|
749 |
-
update: function() {
|
750 |
-
if( !this._allow_update ) {
|
751 |
-
return this;
|
752 |
-
}
|
753 |
-
|
754 |
-
var oldDates = this.dates.copy(),
|
755 |
-
dates = [],
|
756 |
-
fromArgs = false;
|
757 |
-
if( arguments.length ) {
|
758 |
-
$.each(arguments, $.proxy(function(i, date) {
|
759 |
-
if( date instanceof Date ) {
|
760 |
-
date = this._local_to_utc(date);
|
761 |
-
}
|
762 |
-
dates.push(date);
|
763 |
-
}, this));
|
764 |
-
fromArgs = true;
|
765 |
-
}
|
766 |
-
else {
|
767 |
-
dates = this.isInput
|
768 |
-
? this.element.val()
|
769 |
-
: this.element.data('date') || this.element.find('input').val();
|
770 |
-
if( dates && this.o.multidate ) {
|
771 |
-
dates = dates.split(this.o.multidateSeparator);
|
772 |
-
} else {
|
773 |
-
dates = [dates];
|
774 |
-
}
|
775 |
-
delete this.element.data().date;
|
776 |
-
}
|
777 |
-
|
778 |
-
dates = $.map(dates, $.proxy(function(date) {
|
779 |
-
return DPGlobal.parseDate(date, this.o.format, this.o.language);
|
780 |
-
}, this));
|
781 |
-
dates = $.grep(dates, $.proxy(function(date) {
|
782 |
-
return (
|
783 |
-
date < this.o.startDate ||
|
784 |
-
date > this.o.endDate || !date
|
785 |
-
);
|
786 |
-
}, this), true);
|
787 |
-
this.dates.replace(dates);
|
788 |
-
|
789 |
-
if( this.dates.length ) {
|
790 |
-
this.viewDate = new Date(this.dates.get(-1));
|
791 |
-
} else if( this.viewDate < this.o.startDate ) {
|
792 |
-
this.viewDate = new Date(this.o.startDate);
|
793 |
-
} else if( this.viewDate > this.o.endDate ) {
|
794 |
-
this.viewDate = new Date(this.o.endDate);
|
795 |
-
}
|
796 |
-
|
797 |
-
if( fromArgs ) {
|
798 |
-
// setting date by clicking
|
799 |
-
this.setValue();
|
800 |
-
}
|
801 |
-
else if( dates.length ) {
|
802 |
-
// setting date by typing
|
803 |
-
if( String(oldDates) !== String(this.dates) ) {
|
804 |
-
this._trigger('changeDate');
|
805 |
-
}
|
806 |
-
}
|
807 |
-
if( !this.dates.length && oldDates.length ) {
|
808 |
-
this._trigger('clearDate');
|
809 |
-
}
|
810 |
-
|
811 |
-
this.fill();
|
812 |
-
return this;
|
813 |
-
},
|
814 |
-
|
815 |
-
fillDow: function() {
|
816 |
-
var dowCnt = this.o.weekStart,
|
817 |
-
html = '<tr>';
|
818 |
-
if( this.o.calendarWeeks ) {
|
819 |
-
this.picker.find('.datepicker-days thead tr:first-child .datepicker-switch')
|
820 |
-
.attr('colspan', function(i, val) {
|
821 |
-
return parseInt(val) + 1;
|
822 |
-
});
|
823 |
-
var cell = '<th class="cw"> </th>';
|
824 |
-
html += cell;
|
825 |
-
}
|
826 |
-
while( dowCnt < this.o.weekStart + 7 ) {
|
827 |
-
html += '<th class="dow">' + dates[this.o.language].daysMin[(dowCnt++) % 7] + '</th>';
|
828 |
-
}
|
829 |
-
html += '</tr>';
|
830 |
-
this.picker.find('.datepicker-days thead').append(html);
|
831 |
-
},
|
832 |
-
|
833 |
-
fillMonths: function() {
|
834 |
-
var html = '',
|
835 |
-
i = 0;
|
836 |
-
while( i < 12 ) {
|
837 |
-
html += '<span class="month">' + dates[this.o.language].monthsShort[i++] + '</span>';
|
838 |
-
}
|
839 |
-
this.picker.find('.datepicker-months td').html(html);
|
840 |
-
},
|
841 |
-
|
842 |
-
setRange: function(range) {
|
843 |
-
if( !range || !range.length ) {
|
844 |
-
delete this.range;
|
845 |
-
} else {
|
846 |
-
this.range = $.map(range, function(d) {
|
847 |
-
return d.valueOf();
|
848 |
-
});
|
849 |
-
}
|
850 |
-
this.fill();
|
851 |
-
},
|
852 |
-
|
853 |
-
getClassNames: function(date) {
|
854 |
-
var cls = [],
|
855 |
-
year = this.viewDate.getUTCFullYear(),
|
856 |
-
month = this.viewDate.getUTCMonth(),
|
857 |
-
today = new Date();
|
858 |
-
if( date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month) ) {
|
859 |
-
cls.push('old');
|
860 |
-
}
|
861 |
-
else if( date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month) ) {
|
862 |
-
cls.push('new');
|
863 |
-
}
|
864 |
-
if( this.focusDate && date.valueOf() === this.focusDate.valueOf() ) {
|
865 |
-
cls.push('focused');
|
866 |
-
}
|
867 |
-
// Compare internal UTC date with local today, not UTC today
|
868 |
-
if( this.o.todayHighlight &&
|
869 |
-
date.getUTCFullYear() === today.getFullYear() &&
|
870 |
-
date.getUTCMonth() === today.getMonth() &&
|
871 |
-
date.getUTCDate() === today.getDate() ) {
|
872 |
-
cls.push('today');
|
873 |
-
}
|
874 |
-
if( this.dates.contains(date) !== -1 ) {
|
875 |
-
cls.push('active');
|
876 |
-
}
|
877 |
-
if( date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate ||
|
878 |
-
$.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1 ) {
|
879 |
-
cls.push('disabled');
|
880 |
-
}
|
881 |
-
if( this.o.datesDisabled.length > 0 &&
|
882 |
-
$.grep(this.o.datesDisabled, function(d) {
|
883 |
-
return isUTCEquals(date, d);
|
884 |
-
}).length > 0 ) {
|
885 |
-
cls.push('disabled', 'disabled-date');
|
886 |
-
}
|
887 |
-
|
888 |
-
if( this.range ) {
|
889 |
-
if( date > this.range[0] && date < this.range[this.range.length - 1] ) {
|
890 |
-
cls.push('range');
|
891 |
-
}
|
892 |
-
if( $.inArray(date.valueOf(), this.range) !== -1 ) {
|
893 |
-
cls.push('selected');
|
894 |
-
}
|
895 |
-
}
|
896 |
-
return cls;
|
897 |
-
},
|
898 |
-
|
899 |
-
fill: function() {
|
900 |
-
var d = new Date(this.viewDate),
|
901 |
-
year = d.getUTCFullYear(),
|
902 |
-
month = d.getUTCMonth(),
|
903 |
-
startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,
|
904 |
-
startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,
|
905 |
-
endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,
|
906 |
-
endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,
|
907 |
-
todaytxt = dates[this.o.language].today || dates['en'].today || '',
|
908 |
-
cleartxt = dates[this.o.language].clear || dates['en'].clear || '',
|
909 |
-
tooltip;
|
910 |
-
if( isNaN(year) || isNaN(month) ) {
|
911 |
-
return;
|
912 |
-
}
|
913 |
-
this.picker.find('.datepicker-days thead .datepicker-switch')
|
914 |
-
.text(dates[this.o.language].months[month] + ' ' + year);
|
915 |
-
this.picker.find('tfoot .today')
|
916 |
-
.text(todaytxt)
|
917 |
-
.toggle(this.o.todayBtn !== false);
|
918 |
-
this.picker.find('tfoot .clear')
|
919 |
-
.text(cleartxt)
|
920 |
-
.toggle(this.o.clearBtn !== false);
|
921 |
-
this.updateNavArrows();
|
922 |
-
this.fillMonths();
|
923 |
-
var prevMonth = UTCDate(year, month - 1, 28),
|
924 |
-
day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
|
925 |
-
prevMonth.setUTCDate(day);
|
926 |
-
prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7) % 7);
|
927 |
-
var nextMonth = new Date(prevMonth);
|
928 |
-
nextMonth.setUTCDate(nextMonth.getUTCDate() + 42);
|
929 |
-
nextMonth = nextMonth.valueOf();
|
930 |
-
var html = [];
|
931 |
-
var clsName;
|
932 |
-
while( prevMonth.valueOf() < nextMonth ) {
|
933 |
-
if( prevMonth.getUTCDay() === this.o.weekStart ) {
|
934 |
-
html.push('<tr>');
|
935 |
-
if( this.o.calendarWeeks ) {
|
936 |
-
// ISO 8601: First week contains first thursday.
|
937 |
-
// ISO also states week starts on Monday, but we can be more abstract here.
|
938 |
-
var
|
939 |
-
// Start of current week: based on weekstart/current date
|
940 |
-
ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5),
|
941 |
-
// Thursday of this week
|
942 |
-
th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),
|
943 |
-
// First Thursday of year, year from thursday
|
944 |
-
yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay()) % 7 * 864e5),
|
945 |
-
// Calendar week: ms between thursdays, div ms per day, div 7 days
|
946 |
-
calWeek = (th - yth) / 864e5 / 7 + 1;
|
947 |
-
html.push('<td class="cw">' + calWeek + '</td>');
|
948 |
-
|
949 |
-
}
|
950 |
-
}
|
951 |
-
clsName = this.getClassNames(prevMonth);
|
952 |
-
clsName.push('day');
|
953 |
-
|
954 |
-
if( this.o.beforeShowDay !== $.noop ) {
|
955 |
-
var before = this.o.beforeShowDay(this._utc_to_local(prevMonth));
|
956 |
-
if( before === undefined ) {
|
957 |
-
before = {};
|
958 |
-
} else if( typeof(before) === 'boolean' ) {
|
959 |
-
before = {enabled: before};
|
960 |
-
} else if( typeof(before) === 'string' ) {
|
961 |
-
before = {classes: before};
|
962 |
-
}
|
963 |
-
if( before.enabled === false ) {
|
964 |
-
clsName.push('disabled');
|
965 |
-
}
|
966 |
-
if( before.classes ) {
|
967 |
-
clsName = clsName.concat(before.classes.split(/\s+/));
|
968 |
-
}
|
969 |
-
if( before.tooltip ) {
|
970 |
-
tooltip = before.tooltip;
|
971 |
-
}
|
972 |
-
}
|
973 |
-
|
974 |
-
clsName = $.unique(clsName);
|
975 |
-
html.push('<td class="' + clsName.join(' ') + '"' + (tooltip
|
976 |
-
? ' title="' + tooltip + '"'
|
977 |
-
: '') + '>' + prevMonth.getUTCDate() + '</td>');
|
978 |
-
tooltip = null;
|
979 |
-
if( prevMonth.getUTCDay() === this.o.weekEnd ) {
|
980 |
-
html.push('</tr>');
|
981 |
-
}
|
982 |
-
prevMonth.setUTCDate(prevMonth.getUTCDate() + 1);
|
983 |
-
}
|
984 |
-
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
|
985 |
-
|
986 |
-
var months = this.picker.find('.datepicker-months')
|
987 |
-
.find('th:eq(1)')
|
988 |
-
.text(year)
|
989 |
-
.end()
|
990 |
-
.find('span').removeClass('active');
|
991 |
-
|
992 |
-
$.each(this.dates, function(i, d) {
|
993 |
-
if( d.getUTCFullYear() === year ) {
|
994 |
-
months.eq(d.getUTCMonth()).addClass('active');
|
995 |
-
}
|
996 |
-
});
|
997 |
-
|
998 |
-
if( year < startYear || year > endYear ) {
|
999 |
-
months.addClass('disabled');
|
1000 |
-
}
|
1001 |
-
if( year === startYear ) {
|
1002 |
-
months.slice(0, startMonth).addClass('disabled');
|
1003 |
-
}
|
1004 |
-
if( year === endYear ) {
|
1005 |
-
months.slice(endMonth + 1).addClass('disabled');
|
1006 |
-
}
|
1007 |
-
|
1008 |
-
if( this.o.beforeShowMonth !== $.noop ) {
|
1009 |
-
var that = this;
|
1010 |
-
$.each(months, function(i, month) {
|
1011 |
-
if( !$(month).hasClass('disabled') ) {
|
1012 |
-
var moDate = new Date(year, i, 1);
|
1013 |
-
var before = that.o.beforeShowMonth(moDate);
|
1014 |
-
if( before === false ) {
|
1015 |
-
$(month).addClass('disabled');
|
1016 |
-
}
|
1017 |
-
}
|
1018 |
-
});
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
html = '';
|
1022 |
-
year = parseInt(year / 10, 10) * 10;
|
1023 |
-
var yearCont = this.picker.find('.datepicker-years')
|
1024 |
-
.find('th:eq(1)')
|
1025 |
-
.text(year + '-' + (year + 9))
|
1026 |
-
.end()
|
1027 |
-
.find('td');
|
1028 |
-
year -= 1;
|
1029 |
-
var years = $.map(this.dates, function(d) {
|
1030 |
-
return d.getUTCFullYear();
|
1031 |
-
}),
|
1032 |
-
classes;
|
1033 |
-
for( var i = -1; i < 11; i++ ) {
|
1034 |
-
classes = ['year'];
|
1035 |
-
if( i === -1 ) {
|
1036 |
-
classes.push('old');
|
1037 |
-
} else if( i === 10 ) {
|
1038 |
-
classes.push('new');
|
1039 |
-
}
|
1040 |
-
if( $.inArray(year, years) !== -1 ) {
|
1041 |
-
classes.push('active');
|
1042 |
-
}
|
1043 |
-
if( year < startYear || year > endYear ) {
|
1044 |
-
classes.push('disabled');
|
1045 |
-
}
|
1046 |
-
html += '<span class="' + classes.join(' ') + '">' + year + '</span>';
|
1047 |
-
year += 1;
|
1048 |
-
}
|
1049 |
-
yearCont.html(html);
|
1050 |
-
},
|
1051 |
-
|
1052 |
-
updateNavArrows: function() {
|
1053 |
-
if( !this._allow_update ) {
|
1054 |
-
return;
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
var d = new Date(this.viewDate),
|
1058 |
-
year = d.getUTCFullYear(),
|
1059 |
-
month = d.getUTCMonth();
|
1060 |
-
switch( this.viewMode ) {
|
1061 |
-
case 0:
|
1062 |
-
if( this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth() ) {
|
1063 |
-
this.picker.find('.prev').css({visibility: 'hidden'});
|
1064 |
-
}
|
1065 |
-
else {
|
1066 |
-
this.picker.find('.prev').css({visibility: 'visible'});
|
1067 |
-
}
|
1068 |
-
if( this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth() ) {
|
1069 |
-
this.picker.find('.next').css({visibility: 'hidden'});
|
1070 |
-
}
|
1071 |
-
else {
|
1072 |
-
this.picker.find('.next').css({visibility: 'visible'});
|
1073 |
-
}
|
1074 |
-
break;
|
1075 |
-
case 1:
|
1076 |
-
case 2:
|
1077 |
-
if( this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() ) {
|
1078 |
-
this.picker.find('.prev').css({visibility: 'hidden'});
|
1079 |
-
}
|
1080 |
-
else {
|
1081 |
-
this.picker.find('.prev').css({visibility: 'visible'});
|
1082 |
-
}
|
1083 |
-
if( this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() ) {
|
1084 |
-
this.picker.find('.next').css({visibility: 'hidden'});
|
1085 |
-
}
|
1086 |
-
else {
|
1087 |
-
this.picker.find('.next').css({visibility: 'visible'});
|
1088 |
-
}
|
1089 |
-
break;
|
1090 |
-
}
|
1091 |
-
},
|
1092 |
-
|
1093 |
-
click: function(e) {
|
1094 |
-
e.preventDefault();
|
1095 |
-
var target = $(e.target).closest('span, td, th'),
|
1096 |
-
year, month, day;
|
1097 |
-
if( target.length === 1 ) {
|
1098 |
-
switch( target[0].nodeName.toLowerCase() ) {
|
1099 |
-
case 'th':
|
1100 |
-
switch( target[0].className ) {
|
1101 |
-
case 'datepicker-switch':
|
1102 |
-
this.showMode(1);
|
1103 |
-
break;
|
1104 |
-
case 'prev':
|
1105 |
-
case 'next':
|
1106 |
-
var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev'
|
1107 |
-
? -1
|
1108 |
-
: 1);
|
1109 |
-
switch( this.viewMode ) {
|
1110 |
-
case 0:
|
1111 |
-
this.viewDate = this.moveMonth(this.viewDate, dir);
|
1112 |
-
this._trigger('changeMonth', this.viewDate);
|
1113 |
-
break;
|
1114 |
-
case 1:
|
1115 |
-
case 2:
|
1116 |
-
this.viewDate = this.moveYear(this.viewDate, dir);
|
1117 |
-
if( this.viewMode === 1 ) {
|
1118 |
-
this._trigger('changeYear', this.viewDate);
|
1119 |
-
}
|
1120 |
-
break;
|
1121 |
-
}
|
1122 |
-
this.fill();
|
1123 |
-
break;
|
1124 |
-
case 'today':
|
1125 |
-
var date = new Date();
|
1126 |
-
date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
|
1127 |
-
|
1128 |
-
this.showMode(-2);
|
1129 |
-
var which = this.o.todayBtn === 'linked' ? null : 'view';
|
1130 |
-
this._setDate(date, which);
|
1131 |
-
break;
|
1132 |
-
case 'clear':
|
1133 |
-
this.clearDates();
|
1134 |
-
break;
|
1135 |
-
}
|
1136 |
-
break;
|
1137 |
-
case 'span':
|
1138 |
-
if( !target.hasClass('disabled') ) {
|
1139 |
-
this.viewDate.setUTCDate(1);
|
1140 |
-
if( target.hasClass('month') ) {
|
1141 |
-
day = 1;
|
1142 |
-
month = target.parent().find('span').index(target);
|
1143 |
-
year = this.viewDate.getUTCFullYear();
|
1144 |
-
this.viewDate.setUTCMonth(month);
|
1145 |
-
this._trigger('changeMonth', this.viewDate);
|
1146 |
-
if( this.o.minViewMode === 1 ) {
|
1147 |
-
this._setDate(UTCDate(year, month, day));
|
1148 |
-
this.showMode();
|
1149 |
-
} else {
|
1150 |
-
this.showMode(-1);
|
1151 |
-
}
|
1152 |
-
}
|
1153 |
-
else {
|
1154 |
-
day = 1;
|
1155 |
-
month = 0;
|
1156 |
-
year = parseInt(target.text(), 10) || 0;
|
1157 |
-
this.viewDate.setUTCFullYear(year);
|
1158 |
-
this._trigger('changeYear', this.viewDate);
|
1159 |
-
if( this.o.minViewMode === 2 ) {
|
1160 |
-
this._setDate(UTCDate(year, month, day));
|
1161 |
-
}
|
1162 |
-
this.showMode(-1);
|
1163 |
-
}
|
1164 |
-
this.fill();
|
1165 |
-
}
|
1166 |
-
break;
|
1167 |
-
case 'td':
|
1168 |
-
if( target.hasClass('day') && !target.hasClass('disabled') ) {
|
1169 |
-
day = parseInt(target.text(), 10) || 1;
|
1170 |
-
year = this.viewDate.getUTCFullYear();
|
1171 |
-
month = this.viewDate.getUTCMonth();
|
1172 |
-
if( target.hasClass('old') ) {
|
1173 |
-
if( month === 0 ) {
|
1174 |
-
month = 11;
|
1175 |
-
year -= 1;
|
1176 |
-
}
|
1177 |
-
else {
|
1178 |
-
month -= 1;
|
1179 |
-
}
|
1180 |
-
}
|
1181 |
-
else if( target.hasClass('new') ) {
|
1182 |
-
if( month === 11 ) {
|
1183 |
-
month = 0;
|
1184 |
-
year += 1;
|
1185 |
-
}
|
1186 |
-
else {
|
1187 |
-
month += 1;
|
1188 |
-
}
|
1189 |
-
}
|
1190 |
-
this._setDate(UTCDate(year, month, day));
|
1191 |
-
}
|
1192 |
-
break;
|
1193 |
-
}
|
1194 |
-
}
|
1195 |
-
if( this.picker.is(':visible') && this._focused_from ) {
|
1196 |
-
$(this._focused_from).focus();
|
1197 |
-
}
|
1198 |
-
delete this._focused_from;
|
1199 |
-
},
|
1200 |
-
|
1201 |
-
_toggle_multidate: function(date) {
|
1202 |
-
var ix = this.dates.contains(date);
|
1203 |
-
if( !date ) {
|
1204 |
-
this.dates.clear();
|
1205 |
-
}
|
1206 |
-
|
1207 |
-
if( ix !== -1 ) {
|
1208 |
-
if( this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive ) {
|
1209 |
-
this.dates.remove(ix);
|
1210 |
-
}
|
1211 |
-
} else if( this.o.multidate === false ) {
|
1212 |
-
this.dates.clear();
|
1213 |
-
this.dates.push(date);
|
1214 |
-
}
|
1215 |
-
else {
|
1216 |
-
this.dates.push(date);
|
1217 |
-
}
|
1218 |
-
|
1219 |
-
if( typeof this.o.multidate === 'number' ) {
|
1220 |
-
while( this.dates.length > this.o.multidate ) {
|
1221 |
-
this.dates.remove(0);
|
1222 |
-
}
|
1223 |
-
}
|
1224 |
-
},
|
1225 |
-
|
1226 |
-
_setDate: function(date, which) {
|
1227 |
-
if( !which || which === 'date' ) {
|
1228 |
-
this._toggle_multidate(date && new Date(date));
|
1229 |
-
}
|
1230 |
-
if( !which || which === 'view' ) {
|
1231 |
-
this.viewDate = date && new Date(date);
|
1232 |
-
}
|
1233 |
-
|
1234 |
-
this.fill();
|
1235 |
-
this.setValue();
|
1236 |
-
if( !which || which !== 'view' ) {
|
1237 |
-
this._trigger('changeDate');
|
1238 |
-
}
|
1239 |
-
var element;
|
1240 |
-
if( this.isInput ) {
|
1241 |
-
element = this.element;
|
1242 |
-
}
|
1243 |
-
else if( this.component ) {
|
1244 |
-
element = this.element.find('input');
|
1245 |
-
}
|
1246 |
-
if( element ) {
|
1247 |
-
element.change();
|
1248 |
-
}
|
1249 |
-
if( this.o.autoclose && (!which || which === 'date') ) {
|
1250 |
-
this.hide();
|
1251 |
-
}
|
1252 |
-
},
|
1253 |
-
|
1254 |
-
moveMonth: function(date, dir) {
|
1255 |
-
if( !date ) {
|
1256 |
-
return undefined;
|
1257 |
-
}
|
1258 |
-
if( !dir ) {
|
1259 |
-
return date;
|
1260 |
-
}
|
1261 |
-
var new_date = new Date(date.valueOf()),
|
1262 |
-
day = new_date.getUTCDate(),
|
1263 |
-
month = new_date.getUTCMonth(),
|
1264 |
-
mag = Math.abs(dir),
|
1265 |
-
new_month, test;
|
1266 |
-
dir = dir > 0 ? 1 : -1;
|
1267 |
-
if( mag === 1 ) {
|
1268 |
-
test = dir === -1
|
1269 |
-
// If going back one month, make sure month is not current month
|
1270 |
-
// (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
|
1271 |
-
? function() {
|
1272 |
-
return new_date.getUTCMonth() === month;
|
1273 |
-
}
|
1274 |
-
// If going forward one month, make sure month is as expected
|
1275 |
-
// (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
|
1276 |
-
: function() {
|
1277 |
-
return new_date.getUTCMonth() !== new_month;
|
1278 |
-
};
|
1279 |
-
new_month = month + dir;
|
1280 |
-
new_date.setUTCMonth(new_month);
|
1281 |
-
// Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
|
1282 |
-
if( new_month < 0 || new_month > 11 ) {
|
1283 |
-
new_month = (new_month + 12) % 12;
|
1284 |
-
}
|
1285 |
-
}
|
1286 |
-
else {
|
1287 |
-
// For magnitudes >1, move one month at a time...
|
1288 |
-
for( var i = 0; i < mag; i++ )
|
1289 |
-
// ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
|
1290 |
-
{
|
1291 |
-
new_date = this.moveMonth(new_date, dir);
|
1292 |
-
}
|
1293 |
-
// ...then reset the day, keeping it in the new month
|
1294 |
-
new_month = new_date.getUTCMonth();
|
1295 |
-
new_date.setUTCDate(day);
|
1296 |
-
test = function() {
|
1297 |
-
return new_month !== new_date.getUTCMonth();
|
1298 |
-
};
|
1299 |
-
}
|
1300 |
-
// Common date-resetting loop -- if date is beyond end of month, make it
|
1301 |
-
// end of month
|
1302 |
-
while( test() ) {
|
1303 |
-
new_date.setUTCDate(--day);
|
1304 |
-
new_date.setUTCMonth(new_month);
|
1305 |
-
}
|
1306 |
-
return new_date;
|
1307 |
-
},
|
1308 |
-
|
1309 |
-
moveYear: function(date, dir) {
|
1310 |
-
return this.moveMonth(date, dir * 12);
|
1311 |
-
},
|
1312 |
-
|
1313 |
-
dateWithinRange: function(date) {
|
1314 |
-
return date >= this.o.startDate && date <= this.o.endDate;
|
1315 |
-
},
|
1316 |
-
|
1317 |
-
keydown: function(e) {
|
1318 |
-
if( !this.picker.is(':visible') ) {
|
1319 |
-
if( e.keyCode === 40 || e.keyCode === 27 ) // allow down to re-show picker
|
1320 |
-
{
|
1321 |
-
this.show();
|
1322 |
-
}
|
1323 |
-
return;
|
1324 |
-
}
|
1325 |
-
var dateChanged = false,
|
1326 |
-
dir, newDate, newViewDate,
|
1327 |
-
focusDate = this.focusDate || this.viewDate;
|
1328 |
-
switch( e.keyCode ) {
|
1329 |
-
case 27: // escape
|
1330 |
-
if( this.focusDate ) {
|
1331 |
-
this.focusDate = null;
|
1332 |
-
this.viewDate = this.dates.get(-1) || this.viewDate;
|
1333 |
-
this.fill();
|
1334 |
-
}
|
1335 |
-
else {
|
1336 |
-
this.hide();
|
1337 |
-
}
|
1338 |
-
e.preventDefault();
|
1339 |
-
break;
|
1340 |
-
case 37: // left
|
1341 |
-
case 39: // right
|
1342 |
-
if( !this.o.keyboardNavigation ) {
|
1343 |
-
break;
|
1344 |
-
}
|
1345 |
-
dir = e.keyCode === 37 ? -1 : 1;
|
1346 |
-
if( e.ctrlKey ) {
|
1347 |
-
newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
|
1348 |
-
newViewDate = this.moveYear(focusDate, dir);
|
1349 |
-
this._trigger('changeYear', this.viewDate);
|
1350 |
-
}
|
1351 |
-
else if( e.shiftKey ) {
|
1352 |
-
newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
|
1353 |
-
newViewDate = this.moveMonth(focusDate, dir);
|
1354 |
-
this._trigger('changeMonth', this.viewDate);
|
1355 |
-
}
|
1356 |
-
else {
|
1357 |
-
newDate = new Date(this.dates.get(-1) || UTCToday());
|
1358 |
-
newDate.setUTCDate(newDate.getUTCDate() + dir);
|
1359 |
-
newViewDate = new Date(focusDate);
|
1360 |
-
newViewDate.setUTCDate(focusDate.getUTCDate() + dir);
|
1361 |
-
}
|
1362 |
-
if( this.dateWithinRange(newViewDate) ) {
|
1363 |
-
this.focusDate = this.viewDate = newViewDate;
|
1364 |
-
this.setValue();
|
1365 |
-
this.fill();
|
1366 |
-
e.preventDefault();
|
1367 |
-
}
|
1368 |
-
break;
|
1369 |
-
case 38: // up
|
1370 |
-
case 40: // down
|
1371 |
-
if( !this.o.keyboardNavigation ) {
|
1372 |
-
break;
|
1373 |
-
}
|
1374 |
-
dir = e.keyCode === 38 ? -1 : 1;
|
1375 |
-
if( e.ctrlKey ) {
|
1376 |
-
newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
|
1377 |
-
newViewDate = this.moveYear(focusDate, dir);
|
1378 |
-
this._trigger('changeYear', this.viewDate);
|
1379 |
-
}
|
1380 |
-
else if( e.shiftKey ) {
|
1381 |
-
newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
|
1382 |
-
newViewDate = this.moveMonth(focusDate, dir);
|
1383 |
-
this._trigger('changeMonth', this.viewDate);
|
1384 |
-
}
|
1385 |
-
else {
|
1386 |
-
newDate = new Date(this.dates.get(-1) || UTCToday());
|
1387 |
-
newDate.setUTCDate(newDate.getUTCDate() + dir * 7);
|
1388 |
-
newViewDate = new Date(focusDate);
|
1389 |
-
newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7);
|
1390 |
-
}
|
1391 |
-
if( this.dateWithinRange(newViewDate) ) {
|
1392 |
-
this.focusDate = this.viewDate = newViewDate;
|
1393 |
-
this.setValue();
|
1394 |
-
this.fill();
|
1395 |
-
e.preventDefault();
|
1396 |
-
}
|
1397 |
-
break;
|
1398 |
-
case 32: // spacebar
|
1399 |
-
// Spacebar is used in manually typing dates in some formats.
|
1400 |
-
// As such, its behavior should not be hijacked.
|
1401 |
-
break;
|
1402 |
-
case 13: // enter
|
1403 |
-
focusDate = this.focusDate || this.dates.get(-1) || this.viewDate;
|
1404 |
-
if( this.o.keyboardNavigation ) {
|
1405 |
-
this._toggle_multidate(focusDate);
|
1406 |
-
dateChanged = true;
|
1407 |
-
}
|
1408 |
-
this.focusDate = null;
|
1409 |
-
this.viewDate = this.dates.get(-1) || this.viewDate;
|
1410 |
-
this.setValue();
|
1411 |
-
this.fill();
|
1412 |
-
if( this.picker.is(':visible') ) {
|
1413 |
-
e.preventDefault();
|
1414 |
-
if( typeof e.stopPropagation === 'function' ) {
|
1415 |
-
e.stopPropagation(); // All modern browsers, IE9+
|
1416 |
-
} else {
|
1417 |
-
e.cancelBubble = true; // IE6,7,8 ignore "stopPropagation"
|
1418 |
-
}
|
1419 |
-
if( this.o.autoclose ) {
|
1420 |
-
this.hide();
|
1421 |
-
}
|
1422 |
-
}
|
1423 |
-
break;
|
1424 |
-
case 9: // tab
|
1425 |
-
this.focusDate = null;
|
1426 |
-
this.viewDate = this.dates.get(-1) || this.viewDate;
|
1427 |
-
this.fill();
|
1428 |
-
this.hide();
|
1429 |
-
break;
|
1430 |
-
}
|
1431 |
-
if( dateChanged ) {
|
1432 |
-
if( this.dates.length ) {
|
1433 |
-
this._trigger('changeDate');
|
1434 |
-
} else {
|
1435 |
-
this._trigger('clearDate');
|
1436 |
-
}
|
1437 |
-
var element;
|
1438 |
-
if( this.isInput ) {
|
1439 |
-
element = this.element;
|
1440 |
-
}
|
1441 |
-
else if( this.component ) {
|
1442 |
-
element = this.element.find('input');
|
1443 |
-
}
|
1444 |
-
if( element ) {
|
1445 |
-
element.change();
|
1446 |
-
}
|
1447 |
-
}
|
1448 |
-
},
|
1449 |
-
|
1450 |
-
showMode: function(dir) {
|
1451 |
-
if( dir ) {
|
1452 |
-
this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir));
|
1453 |
-
}
|
1454 |
-
this.picker
|
1455 |
-
.children('div')
|
1456 |
-
.hide()
|
1457 |
-
.filter('.datepicker-' + DPGlobal.modes[this.viewMode].clsName)
|
1458 |
-
.css('display', 'block');
|
1459 |
-
this.updateNavArrows();
|
1460 |
-
}
|
1461 |
-
};
|
1462 |
-
|
1463 |
-
var DateRangePicker = function(element, options) {
|
1464 |
-
this.element = $(element);
|
1465 |
-
this.inputs = $.map(options.inputs, function(i) {
|
1466 |
-
return i.jquery ? i[0] : i;
|
1467 |
-
});
|
1468 |
-
delete options.inputs;
|
1469 |
-
|
1470 |
-
datepickerPlugin.call($(this.inputs), options)
|
1471 |
-
.on('changeDate', $.proxy(this.dateUpdated, this));
|
1472 |
-
|
1473 |
-
this.pickers = $.map(this.inputs, function(i) {
|
1474 |
-
return $(i).data('datepicker');
|
1475 |
-
});
|
1476 |
-
this.updateDates();
|
1477 |
-
};
|
1478 |
-
DateRangePicker.prototype = {
|
1479 |
-
updateDates: function() {
|
1480 |
-
this.dates = $.map(this.pickers, function(i) {
|
1481 |
-
return i.getUTCDate();
|
1482 |
-
});
|
1483 |
-
this.updateRanges();
|
1484 |
-
},
|
1485 |
-
updateRanges: function() {
|
1486 |
-
var range = $.map(this.dates, function(d) {
|
1487 |
-
return d.valueOf();
|
1488 |
-
});
|
1489 |
-
$.each(this.pickers, function(i, p) {
|
1490 |
-
p.setRange(range);
|
1491 |
-
});
|
1492 |
-
},
|
1493 |
-
dateUpdated: function(e) {
|
1494 |
-
// `this.updating` is a workaround for preventing infinite recursion
|
1495 |
-
// between `changeDate` triggering and `setUTCDate` calling. Until
|
1496 |
-
// there is a better mechanism.
|
1497 |
-
if( this.updating ) {
|
1498 |
-
return;
|
1499 |
-
}
|
1500 |
-
this.updating = true;
|
1501 |
-
|
1502 |
-
var dp = $(e.target).data('datepicker'),
|
1503 |
-
new_date = dp.getUTCDate(),
|
1504 |
-
i = $.inArray(e.target, this.inputs),
|
1505 |
-
j = i - 1,
|
1506 |
-
k = i + 1,
|
1507 |
-
l = this.inputs.length;
|
1508 |
-
if( i === -1 ) {
|
1509 |
-
return;
|
1510 |
-
}
|
1511 |
-
|
1512 |
-
$.each(this.pickers, function(i, p) {
|
1513 |
-
if( !p.getUTCDate() ) {
|
1514 |
-
p.setUTCDate(new_date);
|
1515 |
-
}
|
1516 |
-
});
|
1517 |
-
|
1518 |
-
if( new_date < this.dates[j] ) {
|
1519 |
-
// Date being moved earlier/left
|
1520 |
-
while( j >= 0 && new_date < this.dates[j] ) {
|
1521 |
-
this.pickers[j--].setUTCDate(new_date);
|
1522 |
-
}
|
1523 |
-
}
|
1524 |
-
else if( new_date > this.dates[k] ) {
|
1525 |
-
// Date being moved later/right
|
1526 |
-
while( k < l && new_date > this.dates[k] ) {
|
1527 |
-
this.pickers[k++].setUTCDate(new_date);
|
1528 |
-
}
|
1529 |
-
}
|
1530 |
-
this.updateDates();
|
1531 |
-
|
1532 |
-
delete this.updating;
|
1533 |
-
},
|
1534 |
-
remove: function() {
|
1535 |
-
$.map(this.pickers, function(p) {
|
1536 |
-
p.remove();
|
1537 |
-
});
|
1538 |
-
delete this.element.data().datepicker;
|
1539 |
-
}
|
1540 |
-
};
|
1541 |
-
|
1542 |
-
function opts_from_el(el, prefix) {
|
1543 |
-
// Derive options from element data-attrs
|
1544 |
-
var data = $(el).data(),
|
1545 |
-
out = {}, inkey,
|
1546 |
-
replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');
|
1547 |
-
prefix = new RegExp('^' + prefix.toLowerCase());
|
1548 |
-
function re_lower(_, a) {
|
1549 |
-
return a.toLowerCase();
|
1550 |
-
}
|
1551 |
-
|
1552 |
-
for( var key in data ) {
|
1553 |
-
if( prefix.test(key) ) {
|
1554 |
-
inkey = key.replace(replace, re_lower);
|
1555 |
-
out[inkey] = data[key];
|
1556 |
-
}
|
1557 |
-
}
|
1558 |
-
return out;
|
1559 |
-
}
|
1560 |
-
|
1561 |
-
function opts_from_locale(lang) {
|
1562 |
-
// Derive options from locale plugins
|
1563 |
-
var out = {};
|
1564 |
-
// Check if "de-DE" style date is available, if not language should
|
1565 |
-
// fallback to 2 letter code eg "de"
|
1566 |
-
if( !dates[lang] ) {
|
1567 |
-
lang = lang.split('-')[0];
|
1568 |
-
if( !dates[lang] ) {
|
1569 |
-
return;
|
1570 |
-
}
|
1571 |
-
}
|
1572 |
-
var d = dates[lang];
|
1573 |
-
$.each(locale_opts, function(i, k) {
|
1574 |
-
if( k in d ) {
|
1575 |
-
out[k] = d[k];
|
1576 |
-
}
|
1577 |
-
});
|
1578 |
-
return out;
|
1579 |
-
}
|
1580 |
-
|
1581 |
-
var old = $.fn.datepicker;
|
1582 |
-
var datepickerPlugin = function(option) {
|
1583 |
-
var args = Array.apply(null, arguments);
|
1584 |
-
args.shift();
|
1585 |
-
var internal_return;
|
1586 |
-
this.each(function() {
|
1587 |
-
var $this = $(this),
|
1588 |
-
data = $this.data('datepicker'),
|
1589 |
-
options = typeof option === 'object' && option;
|
1590 |
-
if( !data ) {
|
1591 |
-
var elopts = opts_from_el(this, 'date'),
|
1592 |
-
// Preliminary otions
|
1593 |
-
xopts = $.extend({}, defaults, elopts, options),
|
1594 |
-
locopts = opts_from_locale(xopts.language),
|
1595 |
-
// Options priority: js args, data-attrs, locales, defaults
|
1596 |
-
opts = $.extend({}, defaults, locopts, elopts, options);
|
1597 |
-
if( $this.hasClass('input-daterange') || opts.inputs ) {
|
1598 |
-
var ropts = {
|
1599 |
-
inputs: opts.inputs || $this.find('input').toArray()
|
1600 |
-
};
|
1601 |
-
$this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts))));
|
1602 |
-
}
|
1603 |
-
else {
|
1604 |
-
$this.data('datepicker', (data = new Datepicker(this, opts)));
|
1605 |
-
}
|
1606 |
-
}
|
1607 |
-
if( typeof option === 'string' && typeof data[option] === 'function' ) {
|
1608 |
-
internal_return = data[option].apply(data, args);
|
1609 |
-
if( internal_return !== undefined ) {
|
1610 |
-
return false;
|
1611 |
-
}
|
1612 |
-
}
|
1613 |
-
});
|
1614 |
-
if( internal_return !== undefined ) {
|
1615 |
-
return internal_return;
|
1616 |
-
} else {
|
1617 |
-
return this;
|
1618 |
-
}
|
1619 |
-
};
|
1620 |
-
$.fn.datepicker = datepickerPlugin;
|
1621 |
-
|
1622 |
-
var defaults = $.fn.datepicker.defaults = {
|
1623 |
-
autoclose: false,
|
1624 |
-
beforeShowDay: $.noop,
|
1625 |
-
beforeShowMonth: $.noop,
|
1626 |
-
calendarWeeks: false,
|
1627 |
-
clearBtn: false,
|
1628 |
-
toggleActive: false,
|
1629 |
-
daysOfWeekDisabled: [],
|
1630 |
-
datesDisabled: [],
|
1631 |
-
endDate: Infinity,
|
1632 |
-
forceParse: true,
|
1633 |
-
format: 'mm/dd/yyyy',
|
1634 |
-
keyboardNavigation: true,
|
1635 |
-
language: 'en',
|
1636 |
-
minViewMode: 0,
|
1637 |
-
multidate: false,
|
1638 |
-
multidateSeparator: ',',
|
1639 |
-
orientation: "auto",
|
1640 |
-
rtl: false,
|
1641 |
-
startDate: -Infinity,
|
1642 |
-
startView: 0,
|
1643 |
-
todayBtn: false,
|
1644 |
-
todayHighlight: false,
|
1645 |
-
weekStart: 0,
|
1646 |
-
disableTouchKeyboard: false,
|
1647 |
-
enableOnReadonly: true,
|
1648 |
-
container: 'body',
|
1649 |
-
immediateUpdates: false
|
1650 |
-
};
|
1651 |
-
var locale_opts = $.fn.datepicker.locale_opts = [
|
1652 |
-
'format',
|
1653 |
-
'rtl',
|
1654 |
-
'weekStart'
|
1655 |
-
];
|
1656 |
-
$.fn.datepicker.Constructor = Datepicker;
|
1657 |
-
var dates = $.fn.datepicker.dates = {
|
1658 |
-
en: {
|
1659 |
-
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
1660 |
-
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
1661 |
-
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
1662 |
-
months: [
|
1663 |
-
"January",
|
1664 |
-
"February",
|
1665 |
-
"March",
|
1666 |
-
"April",
|
1667 |
-
"May",
|
1668 |
-
"June",
|
1669 |
-
"July",
|
1670 |
-
"August",
|
1671 |
-
"September",
|
1672 |
-
"October",
|
1673 |
-
"November",
|
1674 |
-
"December"
|
1675 |
-
],
|
1676 |
-
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
1677 |
-
today: "Today",
|
1678 |
-
clear: "Clear"
|
1679 |
-
},
|
1680 |
-
ru: {
|
1681 |
-
days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
|
1682 |
-
daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб"],
|
1683 |
-
daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
|
1684 |
-
months: [
|
1685 |
-
"Январь",
|
1686 |
-
"Февраль",
|
1687 |
-
"Март",
|
1688 |
-
"Апрель",
|
1689 |
-
"Май",
|
1690 |
-
"Июнь",
|
1691 |
-
"Июль",
|
1692 |
-
"Август",
|
1693 |
-
"Сентябрь",
|
1694 |
-
"Октябрь",
|
1695 |
-
"Ноябрь",
|
1696 |
-
"Декабрь"
|
1697 |
-
],
|
1698 |
-
monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
|
1699 |
-
today: "Сегодня",
|
1700 |
-
clear: "Очистить",
|
1701 |
-
format: "dd/mm/yyyy",
|
1702 |
-
weekStart: 1,
|
1703 |
-
monthsTitle: 'Месяцы'
|
1704 |
-
}
|
1705 |
-
};
|
1706 |
-
|
1707 |
-
var DPGlobal = {
|
1708 |
-
modes: [
|
1709 |
-
{
|
1710 |
-
clsName: 'days',
|
1711 |
-
navFnc: 'Month',
|
1712 |
-
navStep: 1
|
1713 |
-
},
|
1714 |
-
{
|
1715 |
-
clsName: 'months',
|
1716 |
-
navFnc: 'FullYear',
|
1717 |
-
navStep: 1
|
1718 |
-
},
|
1719 |
-
{
|
1720 |
-
clsName: 'years',
|
1721 |
-
navFnc: 'FullYear',
|
1722 |
-
navStep: 10
|
1723 |
-
}
|
1724 |
-
],
|
1725 |
-
isLeapYear: function(year) {
|
1726 |
-
return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));
|
1727 |
-
},
|
1728 |
-
getDaysInMonth: function(year, month) {
|
1729 |
-
return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
|
1730 |
-
},
|
1731 |
-
validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,
|
1732 |
-
nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,
|
1733 |
-
parseFormat: function(format) {
|
1734 |
-
// IE treats \0 as a string end in inputs (truncating the value),
|
1735 |
-
// so it's a bad format delimiter, anyway
|
1736 |
-
var separators = format.replace(this.validParts, '\0').split('\0'),
|
1737 |
-
parts = format.match(this.validParts);
|
1738 |
-
if( !separators || !separators.length || !parts || parts.length === 0 ) {
|
1739 |
-
throw new Error("Invalid date format.");
|
1740 |
-
}
|
1741 |
-
return {
|
1742 |
-
separators: separators,
|
1743 |
-
parts: parts
|
1744 |
-
};
|
1745 |
-
},
|
1746 |
-
parseDate: function(date, format, language) {
|
1747 |
-
if( !date ) {
|
1748 |
-
return undefined;
|
1749 |
-
}
|
1750 |
-
if( date instanceof Date ) {
|
1751 |
-
return date;
|
1752 |
-
}
|
1753 |
-
if( typeof format === 'string' ) {
|
1754 |
-
format = DPGlobal.parseFormat(format);
|
1755 |
-
}
|
1756 |
-
var part_re = /([\-+]\d+)([dmwy])/,
|
1757 |
-
parts = date.match(/([\-+]\d+)([dmwy])/g),
|
1758 |
-
part, dir, i;
|
1759 |
-
if( /^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date) ) {
|
1760 |
-
date = new Date();
|
1761 |
-
for( i = 0; i < parts.length; i++ ) {
|
1762 |
-
part = part_re.exec(parts[i]);
|
1763 |
-
dir = parseInt(part[1]);
|
1764 |
-
switch( part[2] ) {
|
1765 |
-
case 'd':
|
1766 |
-
date.setUTCDate(date.getUTCDate() + dir);
|
1767 |
-
break;
|
1768 |
-
case 'm':
|
1769 |
-
date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir);
|
1770 |
-
break;
|
1771 |
-
case 'w':
|
1772 |
-
date.setUTCDate(date.getUTCDate() + dir * 7);
|
1773 |
-
break;
|
1774 |
-
case 'y':
|
1775 |
-
date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir);
|
1776 |
-
break;
|
1777 |
-
}
|
1778 |
-
}
|
1779 |
-
return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);
|
1780 |
-
}
|
1781 |
-
parts = date && date.match(this.nonpunctuation) || [];
|
1782 |
-
date = new Date();
|
1783 |
-
var parsed = {},
|
1784 |
-
setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],
|
1785 |
-
setters_map = {
|
1786 |
-
yyyy: function(d, v) {
|
1787 |
-
return d.setUTCFullYear(v);
|
1788 |
-
},
|
1789 |
-
yy: function(d, v) {
|
1790 |
-
return d.setUTCFullYear(2000 + v);
|
1791 |
-
},
|
1792 |
-
m: function(d, v) {
|
1793 |
-
if( isNaN(d) ) {
|
1794 |
-
return d;
|
1795 |
-
}
|
1796 |
-
v -= 1;
|
1797 |
-
while( v < 0 ) {
|
1798 |
-
v += 12;
|
1799 |
-
}
|
1800 |
-
v %= 12;
|
1801 |
-
d.setUTCMonth(v);
|
1802 |
-
while( d.getUTCMonth() !== v ) {
|
1803 |
-
d.setUTCDate(d.getUTCDate() - 1);
|
1804 |
-
}
|
1805 |
-
return d;
|
1806 |
-
},
|
1807 |
-
d: function(d, v) {
|
1808 |
-
return d.setUTCDate(v);
|
1809 |
-
}
|
1810 |
-
},
|
1811 |
-
val, filtered;
|
1812 |
-
setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
|
1813 |
-
setters_map['dd'] = setters_map['d'];
|
1814 |
-
date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
|
1815 |
-
var fparts = format.parts.slice();
|
1816 |
-
// Remove noop parts
|
1817 |
-
if( parts.length !== fparts.length ) {
|
1818 |
-
fparts = $(fparts).filter(function(i, p) {
|
1819 |
-
return $.inArray(p, setters_order) !== -1;
|
1820 |
-
}).toArray();
|
1821 |
-
}
|
1822 |
-
// Process remainder
|
1823 |
-
function match_part() {
|
1824 |
-
var m = this.slice(0, parts[i].length),
|
1825 |
-
p = parts[i].slice(0, m.length);
|
1826 |
-
return m.toLowerCase() === p.toLowerCase();
|
1827 |
-
}
|
1828 |
-
|
1829 |
-
if( parts.length === fparts.length ) {
|
1830 |
-
var cnt;
|
1831 |
-
for( i = 0, cnt = fparts.length; i < cnt; i++ ) {
|
1832 |
-
val = parseInt(parts[i], 10);
|
1833 |
-
part = fparts[i];
|
1834 |
-
if( isNaN(val) ) {
|
1835 |
-
switch( part ) {
|
1836 |
-
case 'MM':
|
1837 |
-
filtered = $(dates[language].months).filter(match_part);
|
1838 |
-
val = $.inArray(filtered[0], dates[language].months) + 1;
|
1839 |
-
break;
|
1840 |
-
case 'M':
|
1841 |
-
filtered = $(dates[language].monthsShort).filter(match_part);
|
1842 |
-
val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
|
1843 |
-
break;
|
1844 |
-
}
|
1845 |
-
}
|
1846 |
-
parsed[part] = val;
|
1847 |
-
}
|
1848 |
-
var _date, s;
|
1849 |
-
for( i = 0; i < setters_order.length; i++ ) {
|
1850 |
-
s = setters_order[i];
|
1851 |
-
if( s in parsed && !isNaN(parsed[s]) ) {
|
1852 |
-
_date = new Date(date);
|
1853 |
-
setters_map[s](_date, parsed[s]);
|
1854 |
-
if( !isNaN(_date) ) {
|
1855 |
-
date = _date;
|
1856 |
-
}
|
1857 |
-
}
|
1858 |
-
}
|
1859 |
-
}
|
1860 |
-
return date;
|
1861 |
-
},
|
1862 |
-
formatDate: function(date, format, language) {
|
1863 |
-
if( !date ) {
|
1864 |
-
return '';
|
1865 |
-
}
|
1866 |
-
if( typeof format === 'string' ) {
|
1867 |
-
format = DPGlobal.parseFormat(format);
|
1868 |
-
}
|
1869 |
-
var val = {
|
1870 |
-
d: date.getUTCDate(),
|
1871 |
-
D: dates[language].daysShort[date.getUTCDay()],
|
1872 |
-
DD: dates[language].days[date.getUTCDay()],
|
1873 |
-
m: date.getUTCMonth() + 1,
|
1874 |
-
M: dates[language].monthsShort[date.getUTCMonth()],
|
1875 |
-
MM: dates[language].months[date.getUTCMonth()],
|
1876 |
-
yy: date.getUTCFullYear().toString().substring(2),
|
1877 |
-
yyyy: date.getUTCFullYear()
|
1878 |
-
};
|
1879 |
-
val.dd = (val.d < 10 ? '0' : '') + val.d;
|
1880 |
-
val.mm = (val.m < 10 ? '0' : '') + val.m;
|
1881 |
-
date = [];
|
1882 |
-
var seps = $.extend([], format.separators);
|
1883 |
-
for( var i = 0, cnt = format.parts.length; i <= cnt; i++ ) {
|
1884 |
-
if( seps.length ) {
|
1885 |
-
date.push(seps.shift());
|
1886 |
-
}
|
1887 |
-
date.push(val[format.parts[i]]);
|
1888 |
-
}
|
1889 |
-
return date.join('');
|
1890 |
-
},
|
1891 |
-
headTemplate: '<thead>' +
|
1892 |
-
'<tr>' +
|
1893 |
-
'<th class="prev">«</th>' +
|
1894 |
-
'<th colspan="5" class="datepicker-switch"></th>' +
|
1895 |
-
'<th class="next">»</th>' +
|
1896 |
-
'</tr>' +
|
1897 |
-
'</thead>',
|
1898 |
-
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>',
|
1899 |
-
footTemplate: '<tfoot>' +
|
1900 |
-
'<tr>' +
|
1901 |
-
'<th colspan="7" class="today"></th>' +
|
1902 |
-
'</tr>' +
|
1903 |
-
'<tr>' +
|
1904 |
-
'<th colspan="7" class="clear"></th>' +
|
1905 |
-
'</tr>' +
|
1906 |
-
'</tfoot>'
|
1907 |
-
};
|
1908 |
-
DPGlobal.template = '<div class="datepicker">' +
|
1909 |
-
'<div class="datepicker-days">' +
|
1910 |
-
'<table class=" table-condensed">' +
|
1911 |
-
DPGlobal.headTemplate +
|
1912 |
-
'<tbody></tbody>' +
|
1913 |
-
DPGlobal.footTemplate +
|
1914 |
-
'</table>' +
|
1915 |
-
'</div>' +
|
1916 |
-
'<div class="datepicker-months">' +
|
1917 |
-
'<table class="table-condensed">' +
|
1918 |
-
DPGlobal.headTemplate +
|
1919 |
-
DPGlobal.contTemplate +
|
1920 |
-
DPGlobal.footTemplate +
|
1921 |
-
'</table>' +
|
1922 |
-
'</div>' +
|
1923 |
-
'<div class="datepicker-years">' +
|
1924 |
-
'<table class="table-condensed">' +
|
1925 |
-
DPGlobal.headTemplate +
|
1926 |
-
DPGlobal.contTemplate +
|
1927 |
-
DPGlobal.footTemplate +
|
1928 |
-
'</table>' +
|
1929 |
-
'</div>' +
|
1930 |
-
'</div>';
|
1931 |
-
|
1932 |
-
$.fn.datepicker.DPGlobal = DPGlobal;
|
1933 |
-
|
1934 |
-
/* DATEPICKER NO CONFLICT
|
1935 |
-
* =================== */
|
1936 |
-
|
1937 |
-
$.fn.datepicker.noConflict = function() {
|
1938 |
-
$.fn.datepicker = old;
|
1939 |
-
return this;
|
1940 |
-
};
|
1941 |
-
|
1942 |
-
/* DATEPICKER VERSION
|
1943 |
-
* =================== */
|
1944 |
-
$.fn.datepicker.version = "1.4.1-dev";
|
1945 |
-
|
1946 |
-
/* DATEPICKER DATA-API
|
1947 |
-
* ================== */
|
1948 |
-
|
1949 |
-
$(document).on(
|
1950 |
-
'focus.datepicker.data-api click.datepicker.data-api',
|
1951 |
-
'[data-provide="datepicker"]',
|
1952 |
-
function(e) {
|
1953 |
-
var $this = $(this);
|
1954 |
-
if( $this.data('datepicker') ) {
|
1955 |
-
return;
|
1956 |
-
}
|
1957 |
-
e.preventDefault();
|
1958 |
-
// component click requires us to explicitly show it
|
1959 |
-
datepickerPlugin.call($this, 'show');
|
1960 |
-
}
|
1961 |
-
);
|
1962 |
-
$(function() {
|
1963 |
-
datepickerPlugin.call($('[data-provide="datepicker-inline"]'));
|
1964 |
-
});
|
1965 |
-
|
1966 |
-
}(window.jQuery));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.datetimepicker.js
ADDED
@@ -0,0 +1,2746 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! version : 4.17.47
|
2 |
+
=========================================================
|
3 |
+
bootstrap-datetimejs
|
4 |
+
https://github.com/Eonasdan/bootstrap-datetimepicker
|
5 |
+
Copyright (c) 2015 Jonathan Peterson
|
6 |
+
=========================================================
|
7 |
+
*/
|
8 |
+
/*
|
9 |
+
The MIT License (MIT)
|
10 |
+
|
11 |
+
Copyright (c) 2015 Jonathan Peterson
|
12 |
+
|
13 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
14 |
+
of this software and associated documentation files (the "Software"), to deal
|
15 |
+
in the Software without restriction, including without limitation the rights
|
16 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
17 |
+
copies of the Software, and to permit persons to whom the Software is
|
18 |
+
furnished to do so, subject to the following conditions:
|
19 |
+
|
20 |
+
The above copyright notice and this permission notice shall be included in
|
21 |
+
all copies or substantial portions of the Software.
|
22 |
+
|
23 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
24 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
25 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
26 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
27 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
28 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
29 |
+
THE SOFTWARE.
|
30 |
+
*/
|
31 |
+
/*global define:false */
|
32 |
+
/*global exports:false */
|
33 |
+
/*global require:false */
|
34 |
+
/*global jQuery:false */
|
35 |
+
/*global moment:false */
|
36 |
+
(function(factory) {
|
37 |
+
'use strict';
|
38 |
+
if( typeof define === 'function' && define.amd ) {
|
39 |
+
// AMD is used - Register as an anonymous module.
|
40 |
+
define(['jquery', 'moment'], factory);
|
41 |
+
} else if( typeof exports === 'object' ) {
|
42 |
+
module.exports = factory(require('jquery'), require('moment'));
|
43 |
+
} else {
|
44 |
+
// Neither AMD nor CommonJS used. Use global variables.
|
45 |
+
if( typeof jQuery === 'undefined' ) {
|
46 |
+
throw 'bootstrap-datetimepicker requires jQuery to be loaded first';
|
47 |
+
}
|
48 |
+
if( typeof moment === 'undefined' ) {
|
49 |
+
throw 'bootstrap-datetimepicker requires Moment.js to be loaded first';
|
50 |
+
}
|
51 |
+
factory(jQuery, moment);
|
52 |
+
}
|
53 |
+
}(function($, moment) {
|
54 |
+
'use strict';
|
55 |
+
if( !moment ) {
|
56 |
+
throw new Error('bootstrap-datetimepicker requires Moment.js to be loaded first');
|
57 |
+
}
|
58 |
+
|
59 |
+
var dateTimePicker = function(element, options) {
|
60 |
+
var picker = {},
|
61 |
+
date,
|
62 |
+
viewDate,
|
63 |
+
unset = true,
|
64 |
+
input,
|
65 |
+
component = false,
|
66 |
+
widget = false,
|
67 |
+
use24Hours,
|
68 |
+
minViewModeNumber = 0,
|
69 |
+
actualFormat,
|
70 |
+
parseFormats,
|
71 |
+
currentViewMode,
|
72 |
+
datePickerModes = [
|
73 |
+
{
|
74 |
+
clsName: 'days',
|
75 |
+
navFnc: 'M',
|
76 |
+
navStep: 1
|
77 |
+
},
|
78 |
+
{
|
79 |
+
clsName: 'months',
|
80 |
+
navFnc: 'y',
|
81 |
+
navStep: 1
|
82 |
+
},
|
83 |
+
{
|
84 |
+
clsName: 'years',
|
85 |
+
navFnc: 'y',
|
86 |
+
navStep: 10
|
87 |
+
},
|
88 |
+
{
|
89 |
+
clsName: 'decades',
|
90 |
+
navFnc: 'y',
|
91 |
+
navStep: 100
|
92 |
+
}
|
93 |
+
],
|
94 |
+
viewModes = ['days', 'months', 'years', 'decades'],
|
95 |
+
verticalModes = ['top', 'bottom', 'auto'],
|
96 |
+
horizontalModes = ['left', 'right', 'auto'],
|
97 |
+
toolbarPlacements = ['default', 'top', 'bottom'],
|
98 |
+
keyMap = {
|
99 |
+
'up': 38,
|
100 |
+
38: 'up',
|
101 |
+
'down': 40,
|
102 |
+
40: 'down',
|
103 |
+
'left': 37,
|
104 |
+
37: 'left',
|
105 |
+
'right': 39,
|
106 |
+
39: 'right',
|
107 |
+
'tab': 9,
|
108 |
+
9: 'tab',
|
109 |
+
'escape': 27,
|
110 |
+
27: 'escape',
|
111 |
+
'enter': 13,
|
112 |
+
13: 'enter',
|
113 |
+
'pageUp': 33,
|
114 |
+
33: 'pageUp',
|
115 |
+
'pageDown': 34,
|
116 |
+
34: 'pageDown',
|
117 |
+
'shift': 16,
|
118 |
+
16: 'shift',
|
119 |
+
'control': 17,
|
120 |
+
17: 'control',
|
121 |
+
'space': 32,
|
122 |
+
32: 'space',
|
123 |
+
't': 84,
|
124 |
+
84: 't',
|
125 |
+
'delete': 46,
|
126 |
+
46: 'delete'
|
127 |
+
},
|
128 |
+
keyState = {},
|
129 |
+
|
130 |
+
/********************************************************************************
|
131 |
+
*
|
132 |
+
* Private functions
|
133 |
+
*
|
134 |
+
********************************************************************************/
|
135 |
+
|
136 |
+
hasTimeZone = function() {
|
137 |
+
return moment.tz !== undefined && options.timeZone !== undefined && options.timeZone !== null && options.timeZone !== '';
|
138 |
+
},
|
139 |
+
|
140 |
+
getMoment = function(d) {
|
141 |
+
var returnMoment;
|
142 |
+
|
143 |
+
if( d === undefined || d === null ) {
|
144 |
+
returnMoment = moment(); //TODO should this use format? and locale?
|
145 |
+
} else if( moment.isDate(d) || moment.isMoment(d) ) {
|
146 |
+
// If the date that is passed in is already a Date() or moment() object,
|
147 |
+
// pass it directly to moment.
|
148 |
+
returnMoment = moment(d);
|
149 |
+
} else if( hasTimeZone() ) { // There is a string to parse and a default time zone
|
150 |
+
// parse with the tz function which takes a default time zone if it is not in the format string
|
151 |
+
returnMoment = moment.tz(d, parseFormats, options.useStrict, options.timeZone);
|
152 |
+
} else {
|
153 |
+
returnMoment = moment(d, parseFormats, options.useStrict);
|
154 |
+
}
|
155 |
+
|
156 |
+
if( hasTimeZone() ) {
|
157 |
+
returnMoment.tz(options.timeZone);
|
158 |
+
}
|
159 |
+
|
160 |
+
return returnMoment;
|
161 |
+
},
|
162 |
+
|
163 |
+
isEnabled = function(granularity) {
|
164 |
+
if( typeof granularity !== 'string' || granularity.length > 1 ) {
|
165 |
+
throw new TypeError('isEnabled expects a single character string parameter');
|
166 |
+
}
|
167 |
+
switch( granularity ) {
|
168 |
+
case 'y':
|
169 |
+
return actualFormat.indexOf('Y') !== -1;
|
170 |
+
case 'M':
|
171 |
+
return actualFormat.indexOf('M') !== -1;
|
172 |
+
case 'd':
|
173 |
+
return actualFormat.toLowerCase().indexOf('d') !== -1;
|
174 |
+
case 'h':
|
175 |
+
case 'H':
|
176 |
+
return actualFormat.toLowerCase().indexOf('h') !== -1;
|
177 |
+
case 'm':
|
178 |
+
return actualFormat.indexOf('m') !== -1;
|
179 |
+
case 's':
|
180 |
+
return actualFormat.indexOf('s') !== -1;
|
181 |
+
default:
|
182 |
+
return false;
|
183 |
+
}
|
184 |
+
},
|
185 |
+
|
186 |
+
hasTime = function() {
|
187 |
+
return (isEnabled('h') || isEnabled('m') || isEnabled('s'));
|
188 |
+
},
|
189 |
+
|
190 |
+
hasDate = function() {
|
191 |
+
return (isEnabled('y') || isEnabled('M') || isEnabled('d'));
|
192 |
+
},
|
193 |
+
|
194 |
+
getDatePickerTemplate = function() {
|
195 |
+
var headTemplate = $('<thead>')
|
196 |
+
.append($('<tr>')
|
197 |
+
.append($('<th>').addClass('prev').attr('data-action', 'previous')
|
198 |
+
.append($('<span>').addClass(options.icons.previous))
|
199 |
+
)
|
200 |
+
.append($('<th>').addClass('picker-switch').attr('data-action', 'pickerSwitch').attr('colspan', (options.calendarWeeks
|
201 |
+
? '6'
|
202 |
+
: '5')))
|
203 |
+
.append($('<th>').addClass('next').attr('data-action', 'next')
|
204 |
+
.append($('<span>').addClass(options.icons.next))
|
205 |
+
)
|
206 |
+
),
|
207 |
+
contTemplate = $('<tbody>')
|
208 |
+
.append($('<tr>')
|
209 |
+
.append($('<td>').attr('colspan', (options.calendarWeeks ? '8' : '7')))
|
210 |
+
);
|
211 |
+
|
212 |
+
return [
|
213 |
+
$('<div>').addClass('datepicker-days')
|
214 |
+
.append($('<table>').addClass('table-condensed')
|
215 |
+
.append(headTemplate)
|
216 |
+
.append($('<tbody>'))
|
217 |
+
),
|
218 |
+
$('<div>').addClass('datepicker-months')
|
219 |
+
.append($('<table>').addClass('table-condensed')
|
220 |
+
.append(headTemplate.clone())
|
221 |
+
.append(contTemplate.clone())
|
222 |
+
),
|
223 |
+
$('<div>').addClass('datepicker-years')
|
224 |
+
.append($('<table>').addClass('table-condensed')
|
225 |
+
.append(headTemplate.clone())
|
226 |
+
.append(contTemplate.clone())
|
227 |
+
),
|
228 |
+
$('<div>').addClass('datepicker-decades')
|
229 |
+
.append($('<table>').addClass('table-condensed')
|
230 |
+
.append(headTemplate.clone())
|
231 |
+
.append(contTemplate.clone())
|
232 |
+
)
|
233 |
+
];
|
234 |
+
},
|
235 |
+
|
236 |
+
getTimePickerMainTemplate = function() {
|
237 |
+
var topRow = $('<tr>'),
|
238 |
+
middleRow = $('<tr>'),
|
239 |
+
bottomRow = $('<tr>');
|
240 |
+
|
241 |
+
if( isEnabled('h') ) {
|
242 |
+
topRow.append($('<td>')
|
243 |
+
.append($('<a>').attr({
|
244 |
+
href: '#',
|
245 |
+
tabindex: '-1',
|
246 |
+
'title': options.tooltips.incrementHour
|
247 |
+
}).addClass('btn').attr('data-action', 'incrementHours').append($('<span>').addClass(options.icons.up))));
|
248 |
+
middleRow.append($('<td>')
|
249 |
+
.append($('<span>').addClass('timepicker-hour').attr({
|
250 |
+
'data-time-component': 'hours',
|
251 |
+
'title': options.tooltips.pickHour
|
252 |
+
}).attr('data-action', 'showHours')));
|
253 |
+
bottomRow.append($('<td>')
|
254 |
+
.append($('<a>').attr({
|
255 |
+
href: '#',
|
256 |
+
tabindex: '-1',
|
257 |
+
'title': options.tooltips.decrementHour
|
258 |
+
}).addClass('btn').attr('data-action', 'decrementHours').append($('<span>').addClass(options.icons.down))));
|
259 |
+
}
|
260 |
+
if( isEnabled('m') ) {
|
261 |
+
if( isEnabled('h') ) {
|
262 |
+
topRow.append($('<td>').addClass('separator'));
|
263 |
+
middleRow.append($('<td>').addClass('separator').html(':'));
|
264 |
+
bottomRow.append($('<td>').addClass('separator'));
|
265 |
+
}
|
266 |
+
topRow.append($('<td>')
|
267 |
+
.append($('<a>').attr({
|
268 |
+
href: '#',
|
269 |
+
tabindex: '-1',
|
270 |
+
'title': options.tooltips.incrementMinute
|
271 |
+
}).addClass('btn').attr('data-action', 'incrementMinutes')
|
272 |
+
.append($('<span>').addClass(options.icons.up))));
|
273 |
+
middleRow.append($('<td>')
|
274 |
+
.append($('<span>').addClass('timepicker-minute').attr({
|
275 |
+
'data-time-component': 'minutes',
|
276 |
+
'title': options.tooltips.pickMinute
|
277 |
+
}).attr('data-action', 'showMinutes')));
|
278 |
+
bottomRow.append($('<td>')
|
279 |
+
.append($('<a>').attr({
|
280 |
+
href: '#',
|
281 |
+
tabindex: '-1',
|
282 |
+
'title': options.tooltips.decrementMinute
|
283 |
+
}).addClass('btn').attr('data-action', 'decrementMinutes')
|
284 |
+
.append($('<span>').addClass(options.icons.down))));
|
285 |
+
}
|
286 |
+
if( isEnabled('s') ) {
|
287 |
+
if( isEnabled('m') ) {
|
288 |
+
topRow.append($('<td>').addClass('separator'));
|
289 |
+
middleRow.append($('<td>').addClass('separator').html(':'));
|
290 |
+
bottomRow.append($('<td>').addClass('separator'));
|
291 |
+
}
|
292 |
+
topRow.append($('<td>')
|
293 |
+
.append($('<a>').attr({
|
294 |
+
href: '#',
|
295 |
+
tabindex: '-1',
|
296 |
+
'title': options.tooltips.incrementSecond
|
297 |
+
}).addClass('btn').attr('data-action', 'incrementSeconds')
|
298 |
+
.append($('<span>').addClass(options.icons.up))));
|
299 |
+
middleRow.append($('<td>')
|
300 |
+
.append($('<span>').addClass('timepicker-second').attr({
|
301 |
+
'data-time-component': 'seconds',
|
302 |
+
'title': options.tooltips.pickSecond
|
303 |
+
}).attr('data-action', 'showSeconds')));
|
304 |
+
bottomRow.append($('<td>')
|
305 |
+
.append($('<a>').attr({
|
306 |
+
href: '#',
|
307 |
+
tabindex: '-1',
|
308 |
+
'title': options.tooltips.decrementSecond
|
309 |
+
}).addClass('btn').attr('data-action', 'decrementSeconds')
|
310 |
+
.append($('<span>').addClass(options.icons.down))));
|
311 |
+
}
|
312 |
+
|
313 |
+
if( !use24Hours ) {
|
314 |
+
topRow.append($('<td>').addClass('separator'));
|
315 |
+
middleRow.append($('<td>')
|
316 |
+
.append($('<button>').addClass('btn btn-primary').attr({
|
317 |
+
'data-action': 'togglePeriod',
|
318 |
+
tabindex: '-1',
|
319 |
+
'title': options.tooltips.togglePeriod
|
320 |
+
})));
|
321 |
+
bottomRow.append($('<td>').addClass('separator'));
|
322 |
+
}
|
323 |
+
|
324 |
+
return $('<div>').addClass('timepicker-picker')
|
325 |
+
.append($('<table>').addClass('table-condensed')
|
326 |
+
.append([topRow, middleRow, bottomRow]));
|
327 |
+
},
|
328 |
+
|
329 |
+
getTimePickerTemplate = function() {
|
330 |
+
var hoursView = $('<div>').addClass('timepicker-hours')
|
331 |
+
.append($('<table>').addClass('table-condensed')),
|
332 |
+
minutesView = $('<div>').addClass('timepicker-minutes')
|
333 |
+
.append($('<table>').addClass('table-condensed')),
|
334 |
+
secondsView = $('<div>').addClass('timepicker-seconds')
|
335 |
+
.append($('<table>').addClass('table-condensed')),
|
336 |
+
ret = [getTimePickerMainTemplate()];
|
337 |
+
|
338 |
+
if( isEnabled('h') ) {
|
339 |
+
ret.push(hoursView);
|
340 |
+
}
|
341 |
+
if( isEnabled('m') ) {
|
342 |
+
ret.push(minutesView);
|
343 |
+
}
|
344 |
+
if( isEnabled('s') ) {
|
345 |
+
ret.push(secondsView);
|
346 |
+
}
|
347 |
+
|
348 |
+
return ret;
|
349 |
+
},
|
350 |
+
|
351 |
+
getToolbar = function() {
|
352 |
+
var row = [];
|
353 |
+
if( options.showTodayButton ) {
|
354 |
+
row.push($('<td>').append($('<a>').attr({
|
355 |
+
'data-action': 'today',
|
356 |
+
'title': options.tooltips.today
|
357 |
+
}).append($('<span>').addClass(options.icons.today))));
|
358 |
+
}
|
359 |
+
if( !options.sideBySide && hasDate() && hasTime() ) {
|
360 |
+
row.push($('<td>').append($('<a>').attr({
|
361 |
+
'data-action': 'togglePicker',
|
362 |
+
'title': options.tooltips.selectTime
|
363 |
+
}).append($('<span>').addClass(options.icons.time))));
|
364 |
+
}
|
365 |
+
if( options.showClear ) {
|
366 |
+
row.push($('<td>').append($('<a>').attr({
|
367 |
+
'data-action': 'clear',
|
368 |
+
'title': options.tooltips.clear
|
369 |
+
}).append($('<span>').addClass(options.icons.clear))));
|
370 |
+
}
|
371 |
+
if( options.showClose ) {
|
372 |
+
row.push($('<td>').append($('<a>').attr({
|
373 |
+
'data-action': 'close',
|
374 |
+
'title': options.tooltips.close
|
375 |
+
}).append($('<span>').addClass(options.icons.close))));
|
376 |
+
}
|
377 |
+
return $('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));
|
378 |
+
},
|
379 |
+
|
380 |
+
getTemplate = function() {
|
381 |
+
var template = $('<div>').addClass('bootstrap-datetimepicker-widget dropdown-menu'),
|
382 |
+
dateView = $('<div>').addClass('datepicker').append(getDatePickerTemplate()),
|
383 |
+
timeView = $('<div>').addClass('timepicker').append(getTimePickerTemplate()),
|
384 |
+
content = $('<ul>').addClass('list-unstyled'),
|
385 |
+
toolbar = $('<li>').addClass('picker-switch' + (options.collapse
|
386 |
+
? ' accordion-toggle'
|
387 |
+
: '')).append(getToolbar());
|
388 |
+
|
389 |
+
if( options.inline ) {
|
390 |
+
template.removeClass('dropdown-menu');
|
391 |
+
}
|
392 |
+
|
393 |
+
if( use24Hours ) {
|
394 |
+
template.addClass('usetwentyfour');
|
395 |
+
}
|
396 |
+
|
397 |
+
if( isEnabled('s') && !use24Hours ) {
|
398 |
+
template.addClass('wider');
|
399 |
+
}
|
400 |
+
|
401 |
+
if( options.sideBySide && hasDate() && hasTime() ) {
|
402 |
+
template.addClass('timepicker-sbs');
|
403 |
+
if( options.toolbarPlacement === 'top' ) {
|
404 |
+
template.append(toolbar);
|
405 |
+
}
|
406 |
+
template.append(
|
407 |
+
$('<div>').addClass('row')
|
408 |
+
.append(dateView.addClass('col-md-6'))
|
409 |
+
.append(timeView.addClass('col-md-6'))
|
410 |
+
);
|
411 |
+
if( options.toolbarPlacement === 'bottom' ) {
|
412 |
+
template.append(toolbar);
|
413 |
+
}
|
414 |
+
return template;
|
415 |
+
}
|
416 |
+
|
417 |
+
if( options.toolbarPlacement === 'top' ) {
|
418 |
+
content.append(toolbar);
|
419 |
+
}
|
420 |
+
if( hasDate() ) {
|
421 |
+
content.append($('<li>').addClass((options.collapse && hasTime()
|
422 |
+
? 'collapse in'
|
423 |
+
: '')).append(dateView));
|
424 |
+
}
|
425 |
+
if( options.toolbarPlacement === 'default' ) {
|
426 |
+
content.append(toolbar);
|
427 |
+
}
|
428 |
+
if( hasTime() ) {
|
429 |
+
content.append($('<li>').addClass((options.collapse && hasDate()
|
430 |
+
? 'collapse'
|
431 |
+
: '')).append(timeView));
|
432 |
+
}
|
433 |
+
if( options.toolbarPlacement === 'bottom' ) {
|
434 |
+
content.append(toolbar);
|
435 |
+
}
|
436 |
+
return template.append(content);
|
437 |
+
},
|
438 |
+
|
439 |
+
dataToOptions = function() {
|
440 |
+
var eData,
|
441 |
+
dataOptions = {};
|
442 |
+
|
443 |
+
if( element.is('input') || options.inline ) {
|
444 |
+
eData = element.data();
|
445 |
+
} else {
|
446 |
+
eData = element.find('input').data();
|
447 |
+
}
|
448 |
+
|
449 |
+
if( eData.dateOptions && eData.dateOptions instanceof Object ) {
|
450 |
+
dataOptions = $.extend(true, dataOptions, eData.dateOptions);
|
451 |
+
}
|
452 |
+
|
453 |
+
$.each(options, function(key) {
|
454 |
+
var attributeName = 'date' + key.charAt(0).toUpperCase() + key.slice(1);
|
455 |
+
if( eData[attributeName] !== undefined ) {
|
456 |
+
dataOptions[key] = eData[attributeName];
|
457 |
+
}
|
458 |
+
});
|
459 |
+
return dataOptions;
|
460 |
+
},
|
461 |
+
|
462 |
+
place = function() {
|
463 |
+
var position = (component || element).position(),
|
464 |
+
offset = (component || element).offset(),
|
465 |
+
vertical = options.widgetPositioning.vertical,
|
466 |
+
horizontal = options.widgetPositioning.horizontal,
|
467 |
+
parent;
|
468 |
+
|
469 |
+
if( options.widgetParent ) {
|
470 |
+
parent = options.widgetParent.append(widget);
|
471 |
+
} else if( element.is('input') ) {
|
472 |
+
parent = element.after(widget).parent();
|
473 |
+
} else if( options.inline ) {
|
474 |
+
parent = element.append(widget);
|
475 |
+
return;
|
476 |
+
} else {
|
477 |
+
parent = element;
|
478 |
+
element.children().first().after(widget);
|
479 |
+
}
|
480 |
+
|
481 |
+
// Top and bottom logic
|
482 |
+
if( vertical === 'auto' ) {
|
483 |
+
if( offset.top + widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() &&
|
484 |
+
widget.height() + element.outerHeight() < offset.top ) {
|
485 |
+
vertical = 'top';
|
486 |
+
} else {
|
487 |
+
vertical = 'bottom';
|
488 |
+
}
|
489 |
+
}
|
490 |
+
|
491 |
+
// Left and right logic
|
492 |
+
if( horizontal === 'auto' ) {
|
493 |
+
if( parent.width() < offset.left + widget.outerWidth() / 2 &&
|
494 |
+
offset.left + widget.outerWidth() > $(window).width() ) {
|
495 |
+
horizontal = 'right';
|
496 |
+
} else {
|
497 |
+
horizontal = 'left';
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
if( vertical === 'top' ) {
|
502 |
+
widget.addClass('top').removeClass('bottom');
|
503 |
+
} else {
|
504 |
+
widget.addClass('bottom').removeClass('top');
|
505 |
+
}
|
506 |
+
|
507 |
+
if( horizontal === 'right' ) {
|
508 |
+
widget.addClass('pull-right');
|
509 |
+
} else {
|
510 |
+
widget.removeClass('pull-right');
|
511 |
+
}
|
512 |
+
|
513 |
+
// find the first parent element that has a non-static css positioning
|
514 |
+
if( parent.css('position') === 'static' ) {
|
515 |
+
parent = parent.parents().filter(function() {
|
516 |
+
return $(this).css('position') !== 'static';
|
517 |
+
}).first();
|
518 |
+
}
|
519 |
+
|
520 |
+
if( parent.length === 0 ) {
|
521 |
+
throw new Error('datetimepicker component should be placed within a non-static positioned container');
|
522 |
+
}
|
523 |
+
|
524 |
+
widget.css({
|
525 |
+
top: vertical === 'top' ? 'auto' : position.top + element.outerHeight(),
|
526 |
+
bottom: vertical === 'top'
|
527 |
+
? parent.outerHeight() - (parent === element ? 0 : position.top)
|
528 |
+
: 'auto',
|
529 |
+
left: horizontal === 'left' ? (parent === element ? 0 : position.left) : 'auto',
|
530 |
+
right: horizontal === 'left'
|
531 |
+
? 'auto'
|
532 |
+
: parent.outerWidth() - element.outerWidth() - (parent === element ? 0 : position.left)
|
533 |
+
});
|
534 |
+
},
|
535 |
+
|
536 |
+
notifyEvent = function(e) {
|
537 |
+
if( e.type === 'dp.change' && ((e.date && e.date.isSame(e.oldDate)) || (!e.date && !e.oldDate)) ) {
|
538 |
+
return;
|
539 |
+
}
|
540 |
+
element.trigger(e);
|
541 |
+
},
|
542 |
+
|
543 |
+
viewUpdate = function(e) {
|
544 |
+
if( e === 'y' ) {
|
545 |
+
e = 'YYYY';
|
546 |
+
}
|
547 |
+
notifyEvent({
|
548 |
+
type: 'dp.update',
|
549 |
+
change: e,
|
550 |
+
viewDate: viewDate.clone()
|
551 |
+
});
|
552 |
+
},
|
553 |
+
|
554 |
+
showMode = function(dir) {
|
555 |
+
if( !widget ) {
|
556 |
+
return;
|
557 |
+
}
|
558 |
+
if( dir ) {
|
559 |
+
currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir));
|
560 |
+
}
|
561 |
+
widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show();
|
562 |
+
},
|
563 |
+
|
564 |
+
fillDow = function() {
|
565 |
+
var row = $('<tr>'),
|
566 |
+
currentDate = viewDate.clone().startOf('w').startOf('d');
|
567 |
+
|
568 |
+
if( options.calendarWeeks === true ) {
|
569 |
+
row.append($('<th>').addClass('cw').text('#'));
|
570 |
+
}
|
571 |
+
|
572 |
+
while( currentDate.isBefore(viewDate.clone().endOf('w')) ) {
|
573 |
+
row.append($('<th>').addClass('dow').text(currentDate.format('dd')));
|
574 |
+
currentDate.add(1, 'd');
|
575 |
+
}
|
576 |
+
widget.find('.datepicker-days thead').append(row);
|
577 |
+
},
|
578 |
+
|
579 |
+
isInDisabledDates = function(testDate) {
|
580 |
+
return options.disabledDates[testDate.format('YYYY-MM-DD')] === true;
|
581 |
+
},
|
582 |
+
|
583 |
+
isInEnabledDates = function(testDate) {
|
584 |
+
return options.enabledDates[testDate.format('YYYY-MM-DD')] === true;
|
585 |
+
},
|
586 |
+
|
587 |
+
isInDisabledHours = function(testDate) {
|
588 |
+
return options.disabledHours[testDate.format('H')] === true;
|
589 |
+
},
|
590 |
+
|
591 |
+
isInEnabledHours = function(testDate) {
|
592 |
+
return options.enabledHours[testDate.format('H')] === true;
|
593 |
+
},
|
594 |
+
|
595 |
+
isValid = function(targetMoment, granularity) {
|
596 |
+
if( !targetMoment.isValid() ) {
|
597 |
+
return false;
|
598 |
+
}
|
599 |
+
if( options.disabledDates && granularity === 'd' && isInDisabledDates(targetMoment) ) {
|
600 |
+
return false;
|
601 |
+
}
|
602 |
+
if( options.enabledDates && granularity === 'd' && !isInEnabledDates(targetMoment) ) {
|
603 |
+
return false;
|
604 |
+
}
|
605 |
+
if( options.minDate && targetMoment.isBefore(options.minDate, granularity) ) {
|
606 |
+
return false;
|
607 |
+
}
|
608 |
+
if( options.maxDate && targetMoment.isAfter(options.maxDate, granularity) ) {
|
609 |
+
return false;
|
610 |
+
}
|
611 |
+
if( options.daysOfWeekDisabled && granularity === 'd' && options.daysOfWeekDisabled.indexOf(targetMoment.day()) !== -1 ) {
|
612 |
+
return false;
|
613 |
+
}
|
614 |
+
if( options.disabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && isInDisabledHours(targetMoment) ) {
|
615 |
+
return false;
|
616 |
+
}
|
617 |
+
if( options.enabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && !isInEnabledHours(targetMoment) ) {
|
618 |
+
return false;
|
619 |
+
}
|
620 |
+
if( options.disabledTimeIntervals && (granularity === 'h' || granularity === 'm' || granularity === 's') ) {
|
621 |
+
var found = false;
|
622 |
+
$.each(options.disabledTimeIntervals, function() {
|
623 |
+
if( targetMoment.isBetween(this[0], this[1]) ) {
|
624 |
+
found = true;
|
625 |
+
return false;
|
626 |
+
}
|
627 |
+
});
|
628 |
+
if( found ) {
|
629 |
+
return false;
|
630 |
+
}
|
631 |
+
}
|
632 |
+
return true;
|
633 |
+
},
|
634 |
+
|
635 |
+
fillMonths = function() {
|
636 |
+
var spans = [],
|
637 |
+
monthsShort = viewDate.clone().startOf('y').startOf('d');
|
638 |
+
while( monthsShort.isSame(viewDate, 'y') ) {
|
639 |
+
spans.push($('<span>').attr('data-action', 'selectMonth').addClass('month').text(monthsShort.format('MMM')));
|
640 |
+
monthsShort.add(1, 'M');
|
641 |
+
}
|
642 |
+
widget.find('.datepicker-months td').empty().append(spans);
|
643 |
+
},
|
644 |
+
|
645 |
+
updateMonths = function() {
|
646 |
+
var monthsView = widget.find('.datepicker-months'),
|
647 |
+
monthsViewHeader = monthsView.find('th'),
|
648 |
+
months = monthsView.find('tbody').find('span');
|
649 |
+
|
650 |
+
monthsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevYear);
|
651 |
+
monthsViewHeader.eq(1).attr('title', options.tooltips.selectYear);
|
652 |
+
monthsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextYear);
|
653 |
+
|
654 |
+
monthsView.find('.disabled').removeClass('disabled');
|
655 |
+
|
656 |
+
if( !isValid(viewDate.clone().subtract(1, 'y'), 'y') ) {
|
657 |
+
monthsViewHeader.eq(0).addClass('disabled');
|
658 |
+
}
|
659 |
+
|
660 |
+
monthsViewHeader.eq(1).text(viewDate.year());
|
661 |
+
|
662 |
+
if( !isValid(viewDate.clone().add(1, 'y'), 'y') ) {
|
663 |
+
monthsViewHeader.eq(2).addClass('disabled');
|
664 |
+
}
|
665 |
+
|
666 |
+
months.removeClass('active');
|
667 |
+
if( date.isSame(viewDate, 'y') && !unset ) {
|
668 |
+
months.eq(date.month()).addClass('active');
|
669 |
+
}
|
670 |
+
|
671 |
+
months.each(function(index) {
|
672 |
+
if( !isValid(viewDate.clone().month(index), 'M') ) {
|
673 |
+
$(this).addClass('disabled');
|
674 |
+
}
|
675 |
+
});
|
676 |
+
},
|
677 |
+
|
678 |
+
updateYears = function() {
|
679 |
+
var yearsView = widget.find('.datepicker-years'),
|
680 |
+
yearsViewHeader = yearsView.find('th'),
|
681 |
+
startYear = viewDate.clone().subtract(5, 'y'),
|
682 |
+
endYear = viewDate.clone().add(6, 'y'),
|
683 |
+
html = '';
|
684 |
+
|
685 |
+
yearsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevDecade);
|
686 |
+
yearsViewHeader.eq(1).attr('title', options.tooltips.selectDecade);
|
687 |
+
yearsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextDecade);
|
688 |
+
|
689 |
+
yearsView.find('.disabled').removeClass('disabled');
|
690 |
+
|
691 |
+
if( options.minDate && options.minDate.isAfter(startYear, 'y') ) {
|
692 |
+
yearsViewHeader.eq(0).addClass('disabled');
|
693 |
+
}
|
694 |
+
|
695 |
+
yearsViewHeader.eq(1).text(startYear.year() + '-' + endYear.year());
|
696 |
+
|
697 |
+
if( options.maxDate && options.maxDate.isBefore(endYear, 'y') ) {
|
698 |
+
yearsViewHeader.eq(2).addClass('disabled');
|
699 |
+
}
|
700 |
+
|
701 |
+
while( !startYear.isAfter(endYear, 'y') ) {
|
702 |
+
html += '<span data-action="selectYear" class="year' + (startYear.isSame(date, 'y') && !unset
|
703 |
+
? ' active'
|
704 |
+
: '') + (!isValid(startYear, 'y') ? ' disabled' : '') + '">' + startYear.year() + '</span>';
|
705 |
+
startYear.add(1, 'y');
|
706 |
+
}
|
707 |
+
|
708 |
+
yearsView.find('td').html(html);
|
709 |
+
},
|
710 |
+
|
711 |
+
updateDecades = function() {
|
712 |
+
var decadesView = widget.find('.datepicker-decades'),
|
713 |
+
decadesViewHeader = decadesView.find('th'),
|
714 |
+
startDecade = moment({y: viewDate.year() - (viewDate.year() % 100) - 1}),
|
715 |
+
endDecade = startDecade.clone().add(100, 'y'),
|
716 |
+
startedAt = startDecade.clone(),
|
717 |
+
minDateDecade = false,
|
718 |
+
maxDateDecade = false,
|
719 |
+
endDecadeYear,
|
720 |
+
html = '';
|
721 |
+
|
722 |
+
decadesViewHeader.eq(0).find('span').attr('title', options.tooltips.prevCentury);
|
723 |
+
decadesViewHeader.eq(2).find('span').attr('title', options.tooltips.nextCentury);
|
724 |
+
|
725 |
+
decadesView.find('.disabled').removeClass('disabled');
|
726 |
+
|
727 |
+
if( startDecade.isSame(moment({y: 1900})) || (options.minDate && options.minDate.isAfter(startDecade, 'y')) ) {
|
728 |
+
decadesViewHeader.eq(0).addClass('disabled');
|
729 |
+
}
|
730 |
+
|
731 |
+
decadesViewHeader.eq(1).text(startDecade.year() + '-' + endDecade.year());
|
732 |
+
|
733 |
+
if( startDecade.isSame(moment({y: 2000})) || (options.maxDate && options.maxDate.isBefore(endDecade, 'y')) ) {
|
734 |
+
decadesViewHeader.eq(2).addClass('disabled');
|
735 |
+
}
|
736 |
+
|
737 |
+
while( !startDecade.isAfter(endDecade, 'y') ) {
|
738 |
+
endDecadeYear = startDecade.year() + 12;
|
739 |
+
minDateDecade = options.minDate && options.minDate.isAfter(startDecade, 'y') && options.minDate.year() <= endDecadeYear;
|
740 |
+
maxDateDecade = options.maxDate && options.maxDate.isAfter(startDecade, 'y') && options.maxDate.year() <= endDecadeYear;
|
741 |
+
html += '<span data-action="selectDecade" class="decade' + (date.isAfter(startDecade) && date.year() <= endDecadeYear
|
742 |
+
? ' active'
|
743 |
+
: '') +
|
744 |
+
(!isValid(startDecade, 'y') && !minDateDecade && !maxDateDecade
|
745 |
+
? ' disabled'
|
746 |
+
: '') + '" data-selection="' + (startDecade.year() + 6) + '">' + (startDecade.year() + 1) + ' - ' + (startDecade.year() + 12) + '</span>';
|
747 |
+
startDecade.add(12, 'y');
|
748 |
+
}
|
749 |
+
html += '<span></span><span></span><span></span>'; //push the dangling block over, at least this way
|
750 |
+
// it's even
|
751 |
+
|
752 |
+
decadesView.find('td').html(html);
|
753 |
+
decadesViewHeader.eq(1).text((startedAt.year() + 1) + '-' + (startDecade.year()));
|
754 |
+
},
|
755 |
+
|
756 |
+
fillDate = function() {
|
757 |
+
var daysView = widget.find('.datepicker-days'),
|
758 |
+
daysViewHeader = daysView.find('th'),
|
759 |
+
currentDate,
|
760 |
+
html = [],
|
761 |
+
row,
|
762 |
+
clsNames = [],
|
763 |
+
i;
|
764 |
+
|
765 |
+
if( !hasDate() ) {
|
766 |
+
return;
|
767 |
+
}
|
768 |
+
|
769 |
+
daysViewHeader.eq(0).find('span').attr('title', options.tooltips.prevMonth);
|
770 |
+
daysViewHeader.eq(1).attr('title', options.tooltips.selectMonth);
|
771 |
+
daysViewHeader.eq(2).find('span').attr('title', options.tooltips.nextMonth);
|
772 |
+
|
773 |
+
daysView.find('.disabled').removeClass('disabled');
|
774 |
+
daysViewHeader.eq(1).text(viewDate.format(options.dayViewHeaderFormat));
|
775 |
+
|
776 |
+
if( !isValid(viewDate.clone().subtract(1, 'M'), 'M') ) {
|
777 |
+
daysViewHeader.eq(0).addClass('disabled');
|
778 |
+
}
|
779 |
+
if( !isValid(viewDate.clone().add(1, 'M'), 'M') ) {
|
780 |
+
daysViewHeader.eq(2).addClass('disabled');
|
781 |
+
}
|
782 |
+
|
783 |
+
currentDate = viewDate.clone().startOf('M').startOf('w').startOf('d');
|
784 |
+
|
785 |
+
for( i = 0; i < 42; i++ ) { //always display 42 days (should show 6 weeks)
|
786 |
+
if( currentDate.weekday() === 0 ) {
|
787 |
+
row = $('<tr>');
|
788 |
+
if( options.calendarWeeks ) {
|
789 |
+
row.append('<td class="cw">' + currentDate.week() + '</td>');
|
790 |
+
}
|
791 |
+
html.push(row);
|
792 |
+
}
|
793 |
+
clsNames = ['day'];
|
794 |
+
if( currentDate.isBefore(viewDate, 'M') ) {
|
795 |
+
clsNames.push('old');
|
796 |
+
}
|
797 |
+
if( currentDate.isAfter(viewDate, 'M') ) {
|
798 |
+
clsNames.push('new');
|
799 |
+
}
|
800 |
+
if( currentDate.isSame(date, 'd') && !unset ) {
|
801 |
+
clsNames.push('active');
|
802 |
+
}
|
803 |
+
if( !isValid(currentDate, 'd') ) {
|
804 |
+
clsNames.push('disabled');
|
805 |
+
}
|
806 |
+
if( currentDate.isSame(getMoment(), 'd') ) {
|
807 |
+
clsNames.push('today');
|
808 |
+
}
|
809 |
+
if( currentDate.day() === 0 || currentDate.day() === 6 ) {
|
810 |
+
clsNames.push('weekend');
|
811 |
+
}
|
812 |
+
notifyEvent({
|
813 |
+
type: 'dp.classify',
|
814 |
+
date: currentDate,
|
815 |
+
classNames: clsNames
|
816 |
+
});
|
817 |
+
row.append('<td data-action="selectDay" data-day="' + currentDate.format('L') + '" class="' + clsNames.join(' ') + '">' + currentDate.date() + '</td>');
|
818 |
+
currentDate.add(1, 'd');
|
819 |
+
}
|
820 |
+
|
821 |
+
daysView.find('tbody').empty().append(html);
|
822 |
+
|
823 |
+
updateMonths();
|
824 |
+
|
825 |
+
updateYears();
|
826 |
+
|
827 |
+
updateDecades();
|
828 |
+
},
|
829 |
+
|
830 |
+
fillHours = function() {
|
831 |
+
var table = widget.find('.timepicker-hours table'),
|
832 |
+
currentHour = viewDate.clone().startOf('d'),
|
833 |
+
html = [],
|
834 |
+
row = $('<tr>');
|
835 |
+
|
836 |
+
if( viewDate.hour() > 11 && !use24Hours ) {
|
837 |
+
currentHour.hour(12);
|
838 |
+
}
|
839 |
+
while( currentHour.isSame(viewDate, 'd') && (use24Hours || (viewDate.hour() < 12 && currentHour.hour() < 12) || viewDate.hour() > 11) ) {
|
840 |
+
if( currentHour.hour() % 4 === 0 ) {
|
841 |
+
row = $('<tr>');
|
842 |
+
html.push(row);
|
843 |
+
}
|
844 |
+
row.append('<td data-action="selectHour" class="hour' + (!isValid(currentHour, 'h')
|
845 |
+
? ' disabled'
|
846 |
+
: '') + '">' + currentHour.format(use24Hours ? 'HH' : 'hh') + '</td>');
|
847 |
+
currentHour.add(1, 'h');
|
848 |
+
}
|
849 |
+
table.empty().append(html);
|
850 |
+
},
|
851 |
+
|
852 |
+
fillMinutes = function() {
|
853 |
+
var table = widget.find('.timepicker-minutes table'),
|
854 |
+
currentMinute = viewDate.clone().startOf('h'),
|
855 |
+
html = [],
|
856 |
+
row = $('<tr>'),
|
857 |
+
step = options.stepping === 1 ? 5 : options.stepping;
|
858 |
+
|
859 |
+
while( viewDate.isSame(currentMinute, 'h') ) {
|
860 |
+
if( currentMinute.minute() % (step * 4) === 0 ) {
|
861 |
+
row = $('<tr>');
|
862 |
+
html.push(row);
|
863 |
+
}
|
864 |
+
row.append('<td data-action="selectMinute" class="minute' + (!isValid(currentMinute, 'm')
|
865 |
+
? ' disabled'
|
866 |
+
: '') + '">' + currentMinute.format('mm') + '</td>');
|
867 |
+
currentMinute.add(step, 'm');
|
868 |
+
}
|
869 |
+
table.empty().append(html);
|
870 |
+
},
|
871 |
+
|
872 |
+
fillSeconds = function() {
|
873 |
+
var table = widget.find('.timepicker-seconds table'),
|
874 |
+
currentSecond = viewDate.clone().startOf('m'),
|
875 |
+
html = [],
|
876 |
+
row = $('<tr>');
|
877 |
+
|
878 |
+
while( viewDate.isSame(currentSecond, 'm') ) {
|
879 |
+
if( currentSecond.second() % 20 === 0 ) {
|
880 |
+
row = $('<tr>');
|
881 |
+
html.push(row);
|
882 |
+
}
|
883 |
+
row.append('<td data-action="selectSecond" class="second' + (!isValid(currentSecond, 's')
|
884 |
+
? ' disabled'
|
885 |
+
: '') + '">' + currentSecond.format('ss') + '</td>');
|
886 |
+
currentSecond.add(5, 's');
|
887 |
+
}
|
888 |
+
|
889 |
+
table.empty().append(html);
|
890 |
+
},
|
891 |
+
|
892 |
+
fillTime = function() {
|
893 |
+
var toggle, newDate, timeComponents = widget.find('.timepicker span[data-time-component]');
|
894 |
+
|
895 |
+
if( !use24Hours ) {
|
896 |
+
toggle = widget.find('.timepicker [data-action=togglePeriod]');
|
897 |
+
newDate = date.clone().add((date.hours() >= 12) ? -12 : 12, 'h');
|
898 |
+
|
899 |
+
toggle.text(date.format('A'));
|
900 |
+
|
901 |
+
if( isValid(newDate, 'h') ) {
|
902 |
+
toggle.removeClass('disabled');
|
903 |
+
} else {
|
904 |
+
toggle.addClass('disabled');
|
905 |
+
}
|
906 |
+
}
|
907 |
+
timeComponents.filter('[data-time-component=hours]').text(date.format(use24Hours ? 'HH' : 'hh'));
|
908 |
+
timeComponents.filter('[data-time-component=minutes]').text(date.format('mm'));
|
909 |
+
timeComponents.filter('[data-time-component=seconds]').text(date.format('ss'));
|
910 |
+
|
911 |
+
fillHours();
|
912 |
+
fillMinutes();
|
913 |
+
fillSeconds();
|
914 |
+
},
|
915 |
+
|
916 |
+
update = function() {
|
917 |
+
if( !widget ) {
|
918 |
+
return;
|
919 |
+
}
|
920 |
+
fillDate();
|
921 |
+
fillTime();
|
922 |
+
},
|
923 |
+
|
924 |
+
setValue = function(targetMoment) {
|
925 |
+
var oldDate = unset ? null : date;
|
926 |
+
|
927 |
+
// case of calling setValue(null or false)
|
928 |
+
if( !targetMoment ) {
|
929 |
+
unset = true;
|
930 |
+
input.val('');
|
931 |
+
element.data('date', '');
|
932 |
+
notifyEvent({
|
933 |
+
type: 'dp.change',
|
934 |
+
date: false,
|
935 |
+
oldDate: oldDate
|
936 |
+
});
|
937 |
+
update();
|
938 |
+
return;
|
939 |
+
}
|
940 |
+
|
941 |
+
targetMoment = targetMoment.clone().locale(options.locale);
|
942 |
+
|
943 |
+
if( hasTimeZone() ) {
|
944 |
+
targetMoment.tz(options.timeZone);
|
945 |
+
}
|
946 |
+
|
947 |
+
if( options.stepping !== 1 ) {
|
948 |
+
targetMoment.minutes((Math.round(targetMoment.minutes() / options.stepping) * options.stepping)).seconds(0);
|
949 |
+
|
950 |
+
while( options.minDate && targetMoment.isBefore(options.minDate) ) {
|
951 |
+
targetMoment.add(options.stepping, 'minutes');
|
952 |
+
}
|
953 |
+
}
|
954 |
+
|
955 |
+
if( isValid(targetMoment) ) {
|
956 |
+
date = targetMoment;
|
957 |
+
viewDate = date.clone();
|
958 |
+
input.val(date.format(actualFormat));
|
959 |
+
element.data('date', date.format(actualFormat));
|
960 |
+
unset = false;
|
961 |
+
update();
|
962 |
+
notifyEvent({
|
963 |
+
type: 'dp.change',
|
964 |
+
date: date.clone(),
|
965 |
+
oldDate: oldDate
|
966 |
+
});
|
967 |
+
} else {
|
968 |
+
if( !options.keepInvalid ) {
|
969 |
+
input.val(unset ? '' : date.format(actualFormat));
|
970 |
+
} else {
|
971 |
+
notifyEvent({
|
972 |
+
type: 'dp.change',
|
973 |
+
date: targetMoment,
|
974 |
+
oldDate: oldDate
|
975 |
+
});
|
976 |
+
}
|
977 |
+
notifyEvent({
|
978 |
+
type: 'dp.error',
|
979 |
+
date: targetMoment,
|
980 |
+
oldDate: oldDate
|
981 |
+
});
|
982 |
+
}
|
983 |
+
},
|
984 |
+
|
985 |
+
/**
|
986 |
+
* Hides the widget. Possibly will emit dp.hide
|
987 |
+
*/
|
988 |
+
hide = function() {
|
989 |
+
var transitioning = false;
|
990 |
+
if( !widget ) {
|
991 |
+
return picker;
|
992 |
+
}
|
993 |
+
// Ignore event if in the middle of a picker transition
|
994 |
+
widget.find('.collapse').each(function() {
|
995 |
+
var collapseData = $(this).data('collapse');
|
996 |
+
if( collapseData && collapseData.transitioning ) {
|
997 |
+
transitioning = true;
|
998 |
+
return false;
|
999 |
+
}
|
1000 |
+
return true;
|
1001 |
+
});
|
1002 |
+
if( transitioning ) {
|
1003 |
+
return picker;
|
1004 |
+
}
|
1005 |
+
if( component && component.hasClass('btn') ) {
|
1006 |
+
component.toggleClass('active');
|
1007 |
+
}
|
1008 |
+
widget.hide();
|
1009 |
+
|
1010 |
+
$(window).off('resize', place);
|
1011 |
+
widget.off('click', '[data-action]');
|
1012 |
+
widget.off('mousedown', false);
|
1013 |
+
|
1014 |
+
widget.remove();
|
1015 |
+
widget = false;
|
1016 |
+
|
1017 |
+
notifyEvent({
|
1018 |
+
type: 'dp.hide',
|
1019 |
+
date: date.clone()
|
1020 |
+
});
|
1021 |
+
|
1022 |
+
input.blur();
|
1023 |
+
|
1024 |
+
viewDate = date.clone();
|
1025 |
+
|
1026 |
+
return picker;
|
1027 |
+
},
|
1028 |
+
|
1029 |
+
clear = function() {
|
1030 |
+
setValue(null);
|
1031 |
+
},
|
1032 |
+
|
1033 |
+
parseInputDate = function(inputDate) {
|
1034 |
+
if( options.parseInputDate === undefined ) {
|
1035 |
+
if( !moment.isMoment(inputDate) || inputDate instanceof Date ) {
|
1036 |
+
inputDate = getMoment(inputDate);
|
1037 |
+
}
|
1038 |
+
} else {
|
1039 |
+
inputDate = options.parseInputDate(inputDate);
|
1040 |
+
}
|
1041 |
+
//inputDate.locale(options.locale);
|
1042 |
+
return inputDate;
|
1043 |
+
},
|
1044 |
+
|
1045 |
+
/********************************************************************************
|
1046 |
+
*
|
1047 |
+
* Widget UI interaction functions
|
1048 |
+
*
|
1049 |
+
********************************************************************************/
|
1050 |
+
actions = {
|
1051 |
+
next: function() {
|
1052 |
+
var navFnc = datePickerModes[currentViewMode].navFnc;
|
1053 |
+
viewDate.add(datePickerModes[currentViewMode].navStep, navFnc);
|
1054 |
+
fillDate();
|
1055 |
+
viewUpdate(navFnc);
|
1056 |
+
},
|
1057 |
+
|
1058 |
+
previous: function() {
|
1059 |
+
var navFnc = datePickerModes[currentViewMode].navFnc;
|
1060 |
+
viewDate.subtract(datePickerModes[currentViewMode].navStep, navFnc);
|
1061 |
+
fillDate();
|
1062 |
+
viewUpdate(navFnc);
|
1063 |
+
},
|
1064 |
+
|
1065 |
+
pickerSwitch: function() {
|
1066 |
+
showMode(1);
|
1067 |
+
},
|
1068 |
+
|
1069 |
+
selectMonth: function(e) {
|
1070 |
+
var month = $(e.target).closest('tbody').find('span').index($(e.target));
|
1071 |
+
viewDate.month(month);
|
1072 |
+
if( currentViewMode === minViewModeNumber ) {
|
1073 |
+
setValue(date.clone().year(viewDate.year()).month(viewDate.month()));
|
1074 |
+
if( !options.inline ) {
|
1075 |
+
hide();
|
1076 |
+
}
|
1077 |
+
} else {
|
1078 |
+
showMode(-1);
|
1079 |
+
fillDate();
|
1080 |
+
}
|
1081 |
+
viewUpdate('M');
|
1082 |
+
},
|
1083 |
+
|
1084 |
+
selectYear: function(e) {
|
1085 |
+
var year = parseInt($(e.target).text(), 10) || 0;
|
1086 |
+
viewDate.year(year);
|
1087 |
+
if( currentViewMode === minViewModeNumber ) {
|
1088 |
+
setValue(date.clone().year(viewDate.year()));
|
1089 |
+
if( !options.inline ) {
|
1090 |
+
hide();
|
1091 |
+
}
|
1092 |
+
} else {
|
1093 |
+
showMode(-1);
|
1094 |
+
fillDate();
|
1095 |
+
}
|
1096 |
+
viewUpdate('YYYY');
|
1097 |
+
},
|
1098 |
+
|
1099 |
+
selectDecade: function(e) {
|
1100 |
+
var year = parseInt($(e.target).data('selection'), 10) || 0;
|
1101 |
+
viewDate.year(year);
|
1102 |
+
if( currentViewMode === minViewModeNumber ) {
|
1103 |
+
setValue(date.clone().year(viewDate.year()));
|
1104 |
+
if( !options.inline ) {
|
1105 |
+
hide();
|
1106 |
+
}
|
1107 |
+
} else {
|
1108 |
+
showMode(-1);
|
1109 |
+
fillDate();
|
1110 |
+
}
|
1111 |
+
viewUpdate('YYYY');
|
1112 |
+
},
|
1113 |
+
|
1114 |
+
selectDay: function(e) {
|
1115 |
+
var day = viewDate.clone();
|
1116 |
+
if( $(e.target).is('.old') ) {
|
1117 |
+
day.subtract(1, 'M');
|
1118 |
+
}
|
1119 |
+
if( $(e.target).is('.new') ) {
|
1120 |
+
day.add(1, 'M');
|
1121 |
+
}
|
1122 |
+
setValue(day.date(parseInt($(e.target).text(), 10)));
|
1123 |
+
if( !hasTime() && !options.keepOpen && !options.inline ) {
|
1124 |
+
hide();
|
1125 |
+
}
|
1126 |
+
},
|
1127 |
+
|
1128 |
+
incrementHours: function() {
|
1129 |
+
var newDate = date.clone().add(1, 'h');
|
1130 |
+
if( isValid(newDate, 'h') ) {
|
1131 |
+
setValue(newDate);
|
1132 |
+
}
|
1133 |
+
},
|
1134 |
+
|
1135 |
+
incrementMinutes: function() {
|
1136 |
+
var newDate = date.clone().add(options.stepping, 'm');
|
1137 |
+
if( isValid(newDate, 'm') ) {
|
1138 |
+
setValue(newDate);
|
1139 |
+
}
|
1140 |
+
},
|
1141 |
+
|
1142 |
+
incrementSeconds: function() {
|
1143 |
+
var newDate = date.clone().add(1, 's');
|
1144 |
+
if( isValid(newDate, 's') ) {
|
1145 |
+
setValue(newDate);
|
1146 |
+
}
|
1147 |
+
},
|
1148 |
+
|
1149 |
+
decrementHours: function() {
|
1150 |
+
var newDate = date.clone().subtract(1, 'h');
|
1151 |
+
if( isValid(newDate, 'h') ) {
|
1152 |
+
setValue(newDate);
|
1153 |
+
}
|
1154 |
+
},
|
1155 |
+
|
1156 |
+
decrementMinutes: function() {
|
1157 |
+
var newDate = date.clone().subtract(options.stepping, 'm');
|
1158 |
+
if( isValid(newDate, 'm') ) {
|
1159 |
+
setValue(newDate);
|
1160 |
+
}
|
1161 |
+
},
|
1162 |
+
|
1163 |
+
decrementSeconds: function() {
|
1164 |
+
var newDate = date.clone().subtract(1, 's');
|
1165 |
+
if( isValid(newDate, 's') ) {
|
1166 |
+
setValue(newDate);
|
1167 |
+
}
|
1168 |
+
},
|
1169 |
+
|
1170 |
+
togglePeriod: function() {
|
1171 |
+
setValue(date.clone().add((date.hours() >= 12) ? -12 : 12, 'h'));
|
1172 |
+
},
|
1173 |
+
|
1174 |
+
togglePicker: function(e) {
|
1175 |
+
var $this = $(e.target),
|
1176 |
+
$parent = $this.closest('ul'),
|
1177 |
+
expanded = $parent.find('.in'),
|
1178 |
+
closed = $parent.find('.collapse:not(.in)'),
|
1179 |
+
collapseData;
|
1180 |
+
|
1181 |
+
if( expanded && expanded.length ) {
|
1182 |
+
collapseData = expanded.data('collapse');
|
1183 |
+
if( collapseData && collapseData.transitioning ) {
|
1184 |
+
return;
|
1185 |
+
}
|
1186 |
+
if( expanded.collapse ) { // if collapse plugin is available through bootstrap.js then use it
|
1187 |
+
expanded.collapse('hide');
|
1188 |
+
closed.collapse('show');
|
1189 |
+
} else { // otherwise just toggle in class on the two views
|
1190 |
+
expanded.removeClass('in');
|
1191 |
+
closed.addClass('in');
|
1192 |
+
}
|
1193 |
+
if( $this.is('span') ) {
|
1194 |
+
$this.toggleClass(options.icons.time + ' ' + options.icons.date);
|
1195 |
+
} else {
|
1196 |
+
$this.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
// NOTE: uncomment if toggled state will be restored in show()
|
1200 |
+
//if (component) {
|
1201 |
+
// component.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);
|
1202 |
+
//}
|
1203 |
+
}
|
1204 |
+
},
|
1205 |
+
|
1206 |
+
showPicker: function() {
|
1207 |
+
widget.find('.timepicker > div:not(.timepicker-picker)').hide();
|
1208 |
+
widget.find('.timepicker .timepicker-picker').show();
|
1209 |
+
},
|
1210 |
+
|
1211 |
+
showHours: function() {
|
1212 |
+
widget.find('.timepicker .timepicker-picker').hide();
|
1213 |
+
widget.find('.timepicker .timepicker-hours').show();
|
1214 |
+
},
|
1215 |
+
|
1216 |
+
showMinutes: function() {
|
1217 |
+
widget.find('.timepicker .timepicker-picker').hide();
|
1218 |
+
widget.find('.timepicker .timepicker-minutes').show();
|
1219 |
+
},
|
1220 |
+
|
1221 |
+
showSeconds: function() {
|
1222 |
+
widget.find('.timepicker .timepicker-picker').hide();
|
1223 |
+
widget.find('.timepicker .timepicker-seconds').show();
|
1224 |
+
},
|
1225 |
+
|
1226 |
+
selectHour: function(e) {
|
1227 |
+
var hour = parseInt($(e.target).text(), 10);
|
1228 |
+
|
1229 |
+
if( !use24Hours ) {
|
1230 |
+
if( date.hours() >= 12 ) {
|
1231 |
+
if( hour !== 12 ) {
|
1232 |
+
hour += 12;
|
1233 |
+
}
|
1234 |
+
} else {
|
1235 |
+
if( hour === 12 ) {
|
1236 |
+
hour = 0;
|
1237 |
+
}
|
1238 |
+
}
|
1239 |
+
}
|
1240 |
+
setValue(date.clone().hours(hour));
|
1241 |
+
actions.showPicker.call(picker);
|
1242 |
+
},
|
1243 |
+
|
1244 |
+
selectMinute: function(e) {
|
1245 |
+
setValue(date.clone().minutes(parseInt($(e.target).text(), 10)));
|
1246 |
+
actions.showPicker.call(picker);
|
1247 |
+
},
|
1248 |
+
|
1249 |
+
selectSecond: function(e) {
|
1250 |
+
setValue(date.clone().seconds(parseInt($(e.target).text(), 10)));
|
1251 |
+
actions.showPicker.call(picker);
|
1252 |
+
},
|
1253 |
+
|
1254 |
+
clear: clear,
|
1255 |
+
|
1256 |
+
today: function() {
|
1257 |
+
var todaysDate = getMoment();
|
1258 |
+
if( isValid(todaysDate, 'd') ) {
|
1259 |
+
setValue(todaysDate);
|
1260 |
+
}
|
1261 |
+
},
|
1262 |
+
|
1263 |
+
close: hide
|
1264 |
+
},
|
1265 |
+
|
1266 |
+
doAction = function(e) {
|
1267 |
+
if( $(e.currentTarget).is('.disabled') ) {
|
1268 |
+
return false;
|
1269 |
+
}
|
1270 |
+
actions[$(e.currentTarget).data('action')].apply(picker, arguments);
|
1271 |
+
return false;
|
1272 |
+
},
|
1273 |
+
|
1274 |
+
/**
|
1275 |
+
* Shows the widget. Possibly will emit dp.show and dp.change
|
1276 |
+
*/
|
1277 |
+
show = function() {
|
1278 |
+
var currentMoment,
|
1279 |
+
useCurrentGranularity = {
|
1280 |
+
'year': function(m) {
|
1281 |
+
return m.month(0).date(1).hours(0).seconds(0).minutes(0);
|
1282 |
+
},
|
1283 |
+
'month': function(m) {
|
1284 |
+
return m.date(1).hours(0).seconds(0).minutes(0);
|
1285 |
+
},
|
1286 |
+
'day': function(m) {
|
1287 |
+
return m.hours(0).seconds(0).minutes(0);
|
1288 |
+
},
|
1289 |
+
'hour': function(m) {
|
1290 |
+
return m.seconds(0).minutes(0);
|
1291 |
+
},
|
1292 |
+
'minute': function(m) {
|
1293 |
+
return m.seconds(0);
|
1294 |
+
}
|
1295 |
+
};
|
1296 |
+
|
1297 |
+
if( input.prop('disabled') || (!options.ignoreReadonly && input.prop('readonly')) || widget ) {
|
1298 |
+
return picker;
|
1299 |
+
}
|
1300 |
+
if( input.val() !== undefined && input.val().trim().length !== 0 ) {
|
1301 |
+
setValue(parseInputDate(input.val().trim()));
|
1302 |
+
} else if( unset && options.useCurrent && (options.inline || (input.is('input') && input.val().trim().length === 0)) ) {
|
1303 |
+
currentMoment = getMoment();
|
1304 |
+
if( typeof options.useCurrent === 'string' ) {
|
1305 |
+
currentMoment = useCurrentGranularity[options.useCurrent](currentMoment);
|
1306 |
+
}
|
1307 |
+
setValue(currentMoment);
|
1308 |
+
}
|
1309 |
+
widget = getTemplate();
|
1310 |
+
|
1311 |
+
fillDow();
|
1312 |
+
fillMonths();
|
1313 |
+
|
1314 |
+
widget.find('.timepicker-hours').hide();
|
1315 |
+
widget.find('.timepicker-minutes').hide();
|
1316 |
+
widget.find('.timepicker-seconds').hide();
|
1317 |
+
|
1318 |
+
update();
|
1319 |
+
showMode();
|
1320 |
+
|
1321 |
+
$(window).on('resize', place);
|
1322 |
+
widget.on('click', '[data-action]', doAction); // this handles clicks on the widget
|
1323 |
+
widget.on('mousedown', false);
|
1324 |
+
|
1325 |
+
if( component && component.hasClass('btn') ) {
|
1326 |
+
component.toggleClass('active');
|
1327 |
+
}
|
1328 |
+
place();
|
1329 |
+
widget.show();
|
1330 |
+
if( options.focusOnShow && !input.is(':focus') ) {
|
1331 |
+
input.focus();
|
1332 |
+
}
|
1333 |
+
|
1334 |
+
notifyEvent({
|
1335 |
+
type: 'dp.show'
|
1336 |
+
});
|
1337 |
+
return picker;
|
1338 |
+
},
|
1339 |
+
|
1340 |
+
/**
|
1341 |
+
* Shows or hides the widget
|
1342 |
+
*/
|
1343 |
+
toggle = function() {
|
1344 |
+
return (widget ? hide() : show());
|
1345 |
+
},
|
1346 |
+
|
1347 |
+
keydown = function(e) {
|
1348 |
+
var handler = null,
|
1349 |
+
index,
|
1350 |
+
index2,
|
1351 |
+
pressedKeys = [],
|
1352 |
+
pressedModifiers = {},
|
1353 |
+
currentKey = e.which,
|
1354 |
+
keyBindKeys,
|
1355 |
+
allModifiersPressed,
|
1356 |
+
pressed = 'p';
|
1357 |
+
|
1358 |
+
keyState[currentKey] = pressed;
|
1359 |
+
|
1360 |
+
for( index in keyState ) {
|
1361 |
+
if( keyState.hasOwnProperty(index) && keyState[index] === pressed ) {
|
1362 |
+
pressedKeys.push(index);
|
1363 |
+
if( parseInt(index, 10) !== currentKey ) {
|
1364 |
+
pressedModifiers[index] = true;
|
1365 |
+
}
|
1366 |
+
}
|
1367 |
+
}
|
1368 |
+
|
1369 |
+
for( index in options.keyBinds ) {
|
1370 |
+
if( options.keyBinds.hasOwnProperty(index) && typeof (options.keyBinds[index]) === 'function' ) {
|
1371 |
+
keyBindKeys = index.split(' ');
|
1372 |
+
if( keyBindKeys.length === pressedKeys.length && keyMap[currentKey] === keyBindKeys[keyBindKeys.length - 1] ) {
|
1373 |
+
allModifiersPressed = true;
|
1374 |
+
for( index2 = keyBindKeys.length - 2; index2 >= 0; index2-- ) {
|
1375 |
+
if( !(keyMap[keyBindKeys[index2]] in pressedModifiers) ) {
|
1376 |
+
allModifiersPressed = false;
|
1377 |
+
break;
|
1378 |
+
}
|
1379 |
+
}
|
1380 |
+
if( allModifiersPressed ) {
|
1381 |
+
handler = options.keyBinds[index];
|
1382 |
+
break;
|
1383 |
+
}
|
1384 |
+
}
|
1385 |
+
}
|
1386 |
+
}
|
1387 |
+
|
1388 |
+
if( handler ) {
|
1389 |
+
handler.call(picker, widget);
|
1390 |
+
e.stopPropagation();
|
1391 |
+
e.preventDefault();
|
1392 |
+
}
|
1393 |
+
},
|
1394 |
+
|
1395 |
+
keyup = function(e) {
|
1396 |
+
keyState[e.which] = 'r';
|
1397 |
+
e.stopPropagation();
|
1398 |
+
e.preventDefault();
|
1399 |
+
},
|
1400 |
+
|
1401 |
+
change = function(e) {
|
1402 |
+
var val = $(e.target).val().trim(),
|
1403 |
+
parsedDate = val ? parseInputDate(val) : null;
|
1404 |
+
setValue(parsedDate);
|
1405 |
+
e.stopImmediatePropagation();
|
1406 |
+
return false;
|
1407 |
+
},
|
1408 |
+
|
1409 |
+
attachDatePickerElementEvents = function() {
|
1410 |
+
input.on({
|
1411 |
+
'change': change,
|
1412 |
+
'blur': options.debug ? '' : hide,
|
1413 |
+
'keydown': keydown,
|
1414 |
+
'keyup': keyup,
|
1415 |
+
'focus': options.allowInputToggle ? show : ''
|
1416 |
+
});
|
1417 |
+
|
1418 |
+
if( element.is('input') ) {
|
1419 |
+
input.on({
|
1420 |
+
'focus': show
|
1421 |
+
});
|
1422 |
+
} else if( component ) {
|
1423 |
+
component.on('click', toggle);
|
1424 |
+
component.on('mousedown', false);
|
1425 |
+
}
|
1426 |
+
},
|
1427 |
+
|
1428 |
+
detachDatePickerElementEvents = function() {
|
1429 |
+
input.off({
|
1430 |
+
'change': change,
|
1431 |
+
'blur': blur,
|
1432 |
+
'keydown': keydown,
|
1433 |
+
'keyup': keyup,
|
1434 |
+
'focus': options.allowInputToggle ? hide : ''
|
1435 |
+
});
|
1436 |
+
|
1437 |
+
if( element.is('input') ) {
|
1438 |
+
input.off({
|
1439 |
+
'focus': show
|
1440 |
+
});
|
1441 |
+
} else if( component ) {
|
1442 |
+
component.off('click', toggle);
|
1443 |
+
component.off('mousedown', false);
|
1444 |
+
}
|
1445 |
+
},
|
1446 |
+
|
1447 |
+
indexGivenDates = function(givenDatesArray) {
|
1448 |
+
// Store given enabledDates and disabledDates as keys.
|
1449 |
+
// This way we can check their existence in O(1) time instead of looping through whole array.
|
1450 |
+
// (for example: options.enabledDates['2014-02-27'] === true)
|
1451 |
+
var givenDatesIndexed = {};
|
1452 |
+
$.each(givenDatesArray, function() {
|
1453 |
+
var dDate = parseInputDate(this);
|
1454 |
+
if( dDate.isValid() ) {
|
1455 |
+
givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;
|
1456 |
+
}
|
1457 |
+
});
|
1458 |
+
return (Object.keys(givenDatesIndexed).length) ? givenDatesIndexed : false;
|
1459 |
+
},
|
1460 |
+
|
1461 |
+
indexGivenHours = function(givenHoursArray) {
|
1462 |
+
// Store given enabledHours and disabledHours as keys.
|
1463 |
+
// This way we can check their existence in O(1) time instead of looping through whole array.
|
1464 |
+
// (for example: options.enabledHours['2014-02-27'] === true)
|
1465 |
+
var givenHoursIndexed = {};
|
1466 |
+
$.each(givenHoursArray, function() {
|
1467 |
+
givenHoursIndexed[this] = true;
|
1468 |
+
});
|
1469 |
+
return (Object.keys(givenHoursIndexed).length) ? givenHoursIndexed : false;
|
1470 |
+
},
|
1471 |
+
|
1472 |
+
initFormatting = function() {
|
1473 |
+
var format = options.format || 'L LT';
|
1474 |
+
|
1475 |
+
actualFormat = format.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function(formatInput) {
|
1476 |
+
var newinput = date.localeData().longDateFormat(formatInput) || formatInput;
|
1477 |
+
return newinput.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function(formatInput2) { //temp fix for #740
|
1478 |
+
return date.localeData().longDateFormat(formatInput2) || formatInput2;
|
1479 |
+
});
|
1480 |
+
});
|
1481 |
+
|
1482 |
+
parseFormats = options.extraFormats ? options.extraFormats.slice() : [];
|
1483 |
+
if( parseFormats.indexOf(format) < 0 && parseFormats.indexOf(actualFormat) < 0 ) {
|
1484 |
+
parseFormats.push(actualFormat);
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
use24Hours = (actualFormat.toLowerCase().indexOf('a') < 1 && actualFormat.replace(/\[.*?\]/g, '').indexOf('h') < 1);
|
1488 |
+
|
1489 |
+
if( isEnabled('y') ) {
|
1490 |
+
minViewModeNumber = 2;
|
1491 |
+
}
|
1492 |
+
if( isEnabled('M') ) {
|
1493 |
+
minViewModeNumber = 1;
|
1494 |
+
}
|
1495 |
+
if( isEnabled('d') ) {
|
1496 |
+
minViewModeNumber = 0;
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
currentViewMode = Math.max(minViewModeNumber, currentViewMode);
|
1500 |
+
|
1501 |
+
if( !unset ) {
|
1502 |
+
setValue(date);
|
1503 |
+
}
|
1504 |
+
};
|
1505 |
+
|
1506 |
+
/********************************************************************************
|
1507 |
+
*
|
1508 |
+
* Public API functions
|
1509 |
+
* =====================
|
1510 |
+
*
|
1511 |
+
* Important: Do not expose direct references to private objects or the options
|
1512 |
+
* object to the outer world. Always return a clone when returning values or make
|
1513 |
+
* a clone when setting a private variable.
|
1514 |
+
*
|
1515 |
+
********************************************************************************/
|
1516 |
+
picker.destroy = function() {
|
1517 |
+
///<summary>Destroys the widget and removes all attached event listeners</summary>
|
1518 |
+
hide();
|
1519 |
+
detachDatePickerElementEvents();
|
1520 |
+
element.removeData('DateTimePicker');
|
1521 |
+
element.removeData('date');
|
1522 |
+
};
|
1523 |
+
|
1524 |
+
picker.toggle = toggle;
|
1525 |
+
|
1526 |
+
picker.show = show;
|
1527 |
+
|
1528 |
+
picker.hide = hide;
|
1529 |
+
|
1530 |
+
picker.disable = function() {
|
1531 |
+
///<summary>Disables the input element, the component is attached to, by adding a disabled="true" attribute
|
1532 |
+
// to it. /If the widget was visible before that call it is hidden. Possibly emits dp.hide</summary>
|
1533 |
+
hide();
|
1534 |
+
if( component && component.hasClass('btn') ) {
|
1535 |
+
component.addClass('disabled');
|
1536 |
+
}
|
1537 |
+
input.prop('disabled', true);
|
1538 |
+
return picker;
|
1539 |
+
};
|
1540 |
+
|
1541 |
+
picker.enable = function() {
|
1542 |
+
///<summary>Enables the input element, the component is attached to, by removing disabled attribute from
|
1543 |
+
// it.</summary>
|
1544 |
+
if( component && component.hasClass('btn') ) {
|
1545 |
+
component.removeClass('disabled');
|
1546 |
+
}
|
1547 |
+
input.prop('disabled', false);
|
1548 |
+
return picker;
|
1549 |
+
};
|
1550 |
+
|
1551 |
+
picker.ignoreReadonly = function(ignoreReadonly) {
|
1552 |
+
if( arguments.length === 0 ) {
|
1553 |
+
return options.ignoreReadonly;
|
1554 |
+
}
|
1555 |
+
if( typeof ignoreReadonly !== 'boolean' ) {
|
1556 |
+
throw new TypeError('ignoreReadonly () expects a boolean parameter');
|
1557 |
+
}
|
1558 |
+
options.ignoreReadonly = ignoreReadonly;
|
1559 |
+
return picker;
|
1560 |
+
};
|
1561 |
+
|
1562 |
+
picker.options = function(newOptions) {
|
1563 |
+
if( arguments.length === 0 ) {
|
1564 |
+
return $.extend(true, {}, options);
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
if( !(newOptions instanceof Object) ) {
|
1568 |
+
throw new TypeError('options() options parameter should be an object');
|
1569 |
+
}
|
1570 |
+
$.extend(true, options, newOptions);
|
1571 |
+
$.each(options, function(key, value) {
|
1572 |
+
if( picker[key] !== undefined ) {
|
1573 |
+
picker[key](value);
|
1574 |
+
} else {
|
1575 |
+
throw new TypeError('option ' + key + ' is not recognized!');
|
1576 |
+
}
|
1577 |
+
});
|
1578 |
+
return picker;
|
1579 |
+
};
|
1580 |
+
|
1581 |
+
picker.date = function(newDate) {
|
1582 |
+
///<signature helpKeyword="$.fn.factoryBootstrap330_DatetimePickerControl.date">
|
1583 |
+
///<summary>Returns the component's model current date, a moment object or null if not set.</summary>
|
1584 |
+
///<returns type="Moment">date.clone()</returns>
|
1585 |
+
///</signature>
|
1586 |
+
///<signature>
|
1587 |
+
///<summary>Sets the components model current moment to it. Passing a null value unsets the components
|
1588 |
+
// model current moment. Parsing of the newDate parameter is made using moment library with the
|
1589 |
+
// options.format and options.useStrict components configuration.</summary> /<param name="newDate"
|
1590 |
+
// locid="$.fn.factoryBootstrap330_DatetimePickerControl.date_p:newDate">Takes string, Date, moment, null
|
1591 |
+
// parameter.</param> /</signature>
|
1592 |
+
if( arguments.length === 0 ) {
|
1593 |
+
if( unset ) {
|
1594 |
+
return null;
|
1595 |
+
}
|
1596 |
+
return date.clone();
|
1597 |
+
}
|
1598 |
+
|
1599 |
+
if( newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date) ) {
|
1600 |
+
throw new TypeError('date() parameter must be one of [null, string, moment or Date]');
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
setValue(newDate === null ? null : parseInputDate(newDate));
|
1604 |
+
return picker;
|
1605 |
+
};
|
1606 |
+
|
1607 |
+
picker.format = function(newFormat) {
|
1608 |
+
///<summary>test su</summary>
|
1609 |
+
///<param name="newFormat">info about para</param>
|
1610 |
+
///<returns type="string|boolean">returns foo</returns>
|
1611 |
+
if( arguments.length === 0 ) {
|
1612 |
+
return options.format;
|
1613 |
+
}
|
1614 |
+
|
1615 |
+
if( (typeof newFormat !== 'string') && ((typeof newFormat !== 'boolean') || (newFormat !== false)) ) {
|
1616 |
+
throw new TypeError('format() expects a string or boolean:false parameter ' + newFormat);
|
1617 |
+
}
|
1618 |
+
|
1619 |
+
options.format = newFormat;
|
1620 |
+
if( actualFormat ) {
|
1621 |
+
initFormatting(); // reinit formatting
|
1622 |
+
}
|
1623 |
+
return picker;
|
1624 |
+
};
|
1625 |
+
|
1626 |
+
picker.timeZone = function(newZone) {
|
1627 |
+
if( arguments.length === 0 ) {
|
1628 |
+
return options.timeZone;
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
if( typeof newZone !== 'string' ) {
|
1632 |
+
throw new TypeError('newZone() expects a string parameter');
|
1633 |
+
}
|
1634 |
+
|
1635 |
+
options.timeZone = newZone;
|
1636 |
+
|
1637 |
+
return picker;
|
1638 |
+
};
|
1639 |
+
|
1640 |
+
picker.dayViewHeaderFormat = function(newFormat) {
|
1641 |
+
if( arguments.length === 0 ) {
|
1642 |
+
return options.dayViewHeaderFormat;
|
1643 |
+
}
|
1644 |
+
|
1645 |
+
if( typeof newFormat !== 'string' ) {
|
1646 |
+
throw new TypeError('dayViewHeaderFormat() expects a string parameter');
|
1647 |
+
}
|
1648 |
+
|
1649 |
+
options.dayViewHeaderFormat = newFormat;
|
1650 |
+
return picker;
|
1651 |
+
};
|
1652 |
+
|
1653 |
+
picker.extraFormats = function(formats) {
|
1654 |
+
if( arguments.length === 0 ) {
|
1655 |
+
return options.extraFormats;
|
1656 |
+
}
|
1657 |
+
|
1658 |
+
if( formats !== false && !(formats instanceof Array) ) {
|
1659 |
+
throw new TypeError('extraFormats() expects an array or false parameter');
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
options.extraFormats = formats;
|
1663 |
+
if( parseFormats ) {
|
1664 |
+
initFormatting(); // reinit formatting
|
1665 |
+
}
|
1666 |
+
return picker;
|
1667 |
+
};
|
1668 |
+
|
1669 |
+
picker.disabledDates = function(dates) {
|
1670 |
+
///<signature helpKeyword="$.fn.factoryBootstrap330_DatetimePickerControl.disabledDates">
|
1671 |
+
///<summary>Returns an array with the currently set disabled dates on the component.</summary>
|
1672 |
+
///<returns type="array">options.disabledDates</returns>
|
1673 |
+
///</signature>
|
1674 |
+
///<signature>
|
1675 |
+
///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling
|
1676 |
+
// this function removes the configuration of /options.enabledDates if such exist.</summary> /<param
|
1677 |
+
// name="dates" locid="$.fn.factoryBootstrap330_DatetimePickerControl.disabledDates_p:dates">Takes an [
|
1678 |
+
// string or Date or moment ] of values and allows the user to select only from those days.</param>
|
1679 |
+
// /</signature>
|
1680 |
+
if( arguments.length === 0 ) {
|
1681 |
+
return (options.disabledDates ? $.extend({}, options.disabledDates) : options.disabledDates);
|
1682 |
+
}
|
1683 |
+
|
1684 |
+
if( !dates ) {
|
1685 |
+
options.disabledDates = false;
|
1686 |
+
update();
|
1687 |
+
return picker;
|
1688 |
+
}
|
1689 |
+
if( !(dates instanceof Array) ) {
|
1690 |
+
throw new TypeError('disabledDates() expects an array parameter');
|
1691 |
+
}
|
1692 |
+
options.disabledDates = indexGivenDates(dates);
|
1693 |
+
options.enabledDates = false;
|
1694 |
+
update();
|
1695 |
+
return picker;
|
1696 |
+
};
|
1697 |
+
|
1698 |
+
picker.enabledDates = function(dates) {
|
1699 |
+
///<signature helpKeyword="$.fn.factoryBootstrap330_DatetimePickerControl.enabledDates">
|
1700 |
+
///<summary>Returns an array with the currently set enabled dates on the component.</summary>
|
1701 |
+
///<returns type="array">options.enabledDates</returns>
|
1702 |
+
///</signature>
|
1703 |
+
///<signature>
|
1704 |
+
///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling
|
1705 |
+
// this function removes the configuration of options.disabledDates if such exist.</summary> /<param
|
1706 |
+
// name="dates" locid="$.fn.factoryBootstrap330_DatetimePickerControl.enabledDates_p:dates">Takes an [
|
1707 |
+
// string or Date or moment ] of values and allows the user to select only from those days.</param>
|
1708 |
+
// /</signature>
|
1709 |
+
if( arguments.length === 0 ) {
|
1710 |
+
return (options.enabledDates ? $.extend({}, options.enabledDates) : options.enabledDates);
|
1711 |
+
}
|
1712 |
+
|
1713 |
+
if( !dates ) {
|
1714 |
+
options.enabledDates = false;
|
1715 |
+
update();
|
1716 |
+
return picker;
|
1717 |
+
}
|
1718 |
+
if( !(dates instanceof Array) ) {
|
1719 |
+
throw new TypeError('enabledDates() expects an array parameter');
|
1720 |
+
}
|
1721 |
+
options.enabledDates = indexGivenDates(dates);
|
1722 |
+
options.disabledDates = false;
|
1723 |
+
update();
|
1724 |
+
return picker;
|
1725 |
+
};
|
1726 |
+
|
1727 |
+
picker.daysOfWeekDisabled = function(daysOfWeekDisabled) {
|
1728 |
+
if( arguments.length === 0 ) {
|
1729 |
+
return options.daysOfWeekDisabled.splice(0);
|
1730 |
+
}
|
1731 |
+
|
1732 |
+
if( (typeof daysOfWeekDisabled === 'boolean') && !daysOfWeekDisabled ) {
|
1733 |
+
options.daysOfWeekDisabled = false;
|
1734 |
+
update();
|
1735 |
+
return picker;
|
1736 |
+
}
|
1737 |
+
|
1738 |
+
if( !(daysOfWeekDisabled instanceof Array) ) {
|
1739 |
+
throw new TypeError('daysOfWeekDisabled() expects an array parameter');
|
1740 |
+
}
|
1741 |
+
options.daysOfWeekDisabled = daysOfWeekDisabled.reduce(function(previousValue, currentValue) {
|
1742 |
+
currentValue = parseInt(currentValue, 10);
|
1743 |
+
if( currentValue > 6 || currentValue < 0 || isNaN(currentValue) ) {
|
1744 |
+
return previousValue;
|
1745 |
+
}
|
1746 |
+
if( previousValue.indexOf(currentValue) === -1 ) {
|
1747 |
+
previousValue.push(currentValue);
|
1748 |
+
}
|
1749 |
+
return previousValue;
|
1750 |
+
}, []).sort();
|
1751 |
+
if( options.useCurrent && !options.keepInvalid ) {
|
1752 |
+
var tries = 0;
|
1753 |
+
while( !isValid(date, 'd') ) {
|
1754 |
+
date.add(1, 'd');
|
1755 |
+
if( tries === 31 ) {
|
1756 |
+
throw 'Tried 31 times to find a valid date';
|
1757 |
+
}
|
1758 |
+
tries++;
|
1759 |
+
}
|
1760 |
+
setValue(date);
|
1761 |
+
}
|
1762 |
+
update();
|
1763 |
+
return picker;
|
1764 |
+
};
|
1765 |
+
|
1766 |
+
picker.maxDate = function(maxDate) {
|
1767 |
+
if( arguments.length === 0 ) {
|
1768 |
+
return options.maxDate ? options.maxDate.clone() : options.maxDate;
|
1769 |
+
}
|
1770 |
+
|
1771 |
+
if( (typeof maxDate === 'boolean') && maxDate === false ) {
|
1772 |
+
options.maxDate = false;
|
1773 |
+
update();
|
1774 |
+
return picker;
|
1775 |
+
}
|
1776 |
+
|
1777 |
+
if( typeof maxDate === 'string' ) {
|
1778 |
+
if( maxDate === 'now' || maxDate === 'moment' ) {
|
1779 |
+
maxDate = getMoment();
|
1780 |
+
}
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
var parsedDate = parseInputDate(maxDate);
|
1784 |
+
|
1785 |
+
if( !parsedDate.isValid() ) {
|
1786 |
+
throw new TypeError('maxDate() Could not parse date parameter: ' + maxDate);
|
1787 |
+
}
|
1788 |
+
if( options.minDate && parsedDate.isBefore(options.minDate) ) {
|
1789 |
+
throw new TypeError('maxDate() date parameter is before options.minDate: ' + parsedDate.format(actualFormat));
|
1790 |
+
}
|
1791 |
+
options.maxDate = parsedDate;
|
1792 |
+
if( options.useCurrent && !options.keepInvalid && date.isAfter(maxDate) ) {
|
1793 |
+
setValue(options.maxDate);
|
1794 |
+
}
|
1795 |
+
if( viewDate.isAfter(parsedDate) ) {
|
1796 |
+
viewDate = parsedDate.clone().subtract(options.stepping, 'm');
|
1797 |
+
}
|
1798 |
+
update();
|
1799 |
+
return picker;
|
1800 |
+
};
|
1801 |
+
|
1802 |
+
picker.minDate = function(minDate) {
|
1803 |
+
if( arguments.length === 0 ) {
|
1804 |
+
return options.minDate ? options.minDate.clone() : options.minDate;
|
1805 |
+
}
|
1806 |
+
|
1807 |
+
if( (typeof minDate === 'boolean') && minDate === false ) {
|
1808 |
+
options.minDate = false;
|
1809 |
+
update();
|
1810 |
+
return picker;
|
1811 |
+
}
|
1812 |
+
|
1813 |
+
if( typeof minDate === 'string' ) {
|
1814 |
+
if( minDate === 'now' || minDate === 'moment' ) {
|
1815 |
+
minDate = getMoment();
|
1816 |
+
}
|
1817 |
+
}
|
1818 |
+
|
1819 |
+
var parsedDate = parseInputDate(minDate);
|
1820 |
+
|
1821 |
+
if( !parsedDate.isValid() ) {
|
1822 |
+
throw new TypeError('minDate() Could not parse date parameter: ' + minDate);
|
1823 |
+
}
|
1824 |
+
if( options.maxDate && parsedDate.isAfter(options.maxDate) ) {
|
1825 |
+
throw new TypeError('minDate() date parameter is after options.maxDate: ' + parsedDate.format(actualFormat));
|
1826 |
+
}
|
1827 |
+
options.minDate = parsedDate;
|
1828 |
+
if( options.useCurrent && !options.keepInvalid && date.isBefore(minDate) ) {
|
1829 |
+
setValue(options.minDate);
|
1830 |
+
}
|
1831 |
+
if( viewDate.isBefore(parsedDate) ) {
|
1832 |
+
viewDate = parsedDate.clone().add(options.stepping, 'm');
|
1833 |
+
}
|
1834 |
+
update();
|
1835 |
+
return picker;
|
1836 |
+
};
|
1837 |
+
|
1838 |
+
picker.defaultDate = function(defaultDate) {
|
1839 |
+
///<signature helpKeyword="$.fn.factoryBootstrap330_DatetimePickerControl.defaultDate">
|
1840 |
+
///<summary>Returns a moment with the options.defaultDate option configuration or false if not
|
1841 |
+
// set</summary>
|
1842 |
+
///<returns type="Moment">date.clone()</returns>
|
1843 |
+
///</signature>
|
1844 |
+
///<signature>
|
1845 |
+
///<summary>Will set the picker's inital date. If a boolean:false value is passed the options.defaultDate
|
1846 |
+
// parameter is cleared.</summary> /<param name="defaultDate"
|
1847 |
+
// locid="$.fn.factoryBootstrap330_DatetimePickerControl.defaultDate_p:defaultDate">Takes a string, Date,
|
1848 |
+
// moment, boolean:false</param> /</signature>
|
1849 |
+
if( arguments.length === 0 ) {
|
1850 |
+
return options.defaultDate ? options.defaultDate.clone() : options.defaultDate;
|
1851 |
+
}
|
1852 |
+
if( !defaultDate ) {
|
1853 |
+
options.defaultDate = false;
|
1854 |
+
return picker;
|
1855 |
+
}
|
1856 |
+
|
1857 |
+
if( typeof defaultDate === 'string' ) {
|
1858 |
+
if( defaultDate === 'now' || defaultDate === 'moment' ) {
|
1859 |
+
defaultDate = getMoment();
|
1860 |
+
} else {
|
1861 |
+
defaultDate = getMoment(defaultDate);
|
1862 |
+
}
|
1863 |
+
}
|
1864 |
+
|
1865 |
+
var parsedDate = parseInputDate(defaultDate);
|
1866 |
+
if( !parsedDate.isValid() ) {
|
1867 |
+
throw new TypeError('defaultDate() Could not parse date parameter: ' + defaultDate);
|
1868 |
+
}
|
1869 |
+
if( !isValid(parsedDate) ) {
|
1870 |
+
throw new TypeError('defaultDate() date passed is invalid according to component setup validations');
|
1871 |
+
}
|
1872 |
+
|
1873 |
+
options.defaultDate = parsedDate;
|
1874 |
+
|
1875 |
+
if( (options.defaultDate && options.inline) || input.val().trim() === '' ) {
|
1876 |
+
setValue(options.defaultDate);
|
1877 |
+
}
|
1878 |
+
return picker;
|
1879 |
+
};
|
1880 |
+
|
1881 |
+
picker.locale = function(locale) {
|
1882 |
+
if( arguments.length === 0 ) {
|
1883 |
+
return options.locale;
|
1884 |
+
}
|
1885 |
+
|
1886 |
+
if( !moment.localeData(locale) ) {
|
1887 |
+
throw new TypeError('locale() locale ' + locale + ' is not loaded from moment locales!');
|
1888 |
+
}
|
1889 |
+
|
1890 |
+
options.locale = locale;
|
1891 |
+
date.locale(options.locale);
|
1892 |
+
viewDate.locale(options.locale);
|
1893 |
+
|
1894 |
+
if( actualFormat ) {
|
1895 |
+
initFormatting(); // reinit formatting
|
1896 |
+
}
|
1897 |
+
if( widget ) {
|
1898 |
+
hide();
|
1899 |
+
show();
|
1900 |
+
}
|
1901 |
+
return picker;
|
1902 |
+
};
|
1903 |
+
|
1904 |
+
picker.stepping = function(stepping) {
|
1905 |
+
if( arguments.length === 0 ) {
|
1906 |
+
return options.stepping;
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
stepping = parseInt(stepping, 10);
|
1910 |
+
if( isNaN(stepping) || stepping < 1 ) {
|
1911 |
+
stepping = 1;
|
1912 |
+
}
|
1913 |
+
options.stepping = stepping;
|
1914 |
+
return picker;
|
1915 |
+
};
|
1916 |
+
|
1917 |
+
picker.useCurrent = function(useCurrent) {
|
1918 |
+
var useCurrentOptions = ['year', 'month', 'day', 'hour', 'minute'];
|
1919 |
+
if( arguments.length === 0 ) {
|
1920 |
+
return options.useCurrent;
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
if( (typeof useCurrent !== 'boolean') && (typeof useCurrent !== 'string') ) {
|
1924 |
+
throw new TypeError('useCurrent() expects a boolean or string parameter');
|
1925 |
+
}
|
1926 |
+
if( typeof useCurrent === 'string' && useCurrentOptions.indexOf(useCurrent.toLowerCase()) === -1 ) {
|
1927 |
+
throw new TypeError('useCurrent() expects a string parameter of ' + useCurrentOptions.join(', '));
|
1928 |
+
}
|
1929 |
+
options.useCurrent = useCurrent;
|
1930 |
+
return picker;
|
1931 |
+
};
|
1932 |
+
|
1933 |
+
picker.collapse = function(collapse) {
|
1934 |
+
if( arguments.length === 0 ) {
|
1935 |
+
return options.collapse;
|
1936 |
+
}
|
1937 |
+
|
1938 |
+
if( typeof collapse !== 'boolean' ) {
|
1939 |
+
throw new TypeError('collapse() expects a boolean parameter');
|
1940 |
+
}
|
1941 |
+
if( options.collapse === collapse ) {
|
1942 |
+
return picker;
|
1943 |
+
}
|
1944 |
+
options.collapse = collapse;
|
1945 |
+
if( widget ) {
|
1946 |
+
hide();
|
1947 |
+
show();
|
1948 |
+
}
|
1949 |
+
return picker;
|
1950 |
+
};
|
1951 |
+
|
1952 |
+
picker.icons = function(icons) {
|
1953 |
+
if( arguments.length === 0 ) {
|
1954 |
+
return $.extend({}, options.icons);
|
1955 |
+
}
|
1956 |
+
|
1957 |
+
if( !(icons instanceof Object) ) {
|
1958 |
+
throw new TypeError('icons() expects parameter to be an Object');
|
1959 |
+
}
|
1960 |
+
$.extend(options.icons, icons);
|
1961 |
+
if( widget ) {
|
1962 |
+
hide();
|
1963 |
+
show();
|
1964 |
+
}
|
1965 |
+
return picker;
|
1966 |
+
};
|
1967 |
+
|
1968 |
+
picker.tooltips = function(tooltips) {
|
1969 |
+
if( arguments.length === 0 ) {
|
1970 |
+
return $.extend({}, options.tooltips);
|
1971 |
+
}
|
1972 |
+
|
1973 |
+
if( !(tooltips instanceof Object) ) {
|
1974 |
+
throw new TypeError('tooltips() expects parameter to be an Object');
|
1975 |
+
}
|
1976 |
+
$.extend(options.tooltips, tooltips);
|
1977 |
+
if( widget ) {
|
1978 |
+
hide();
|
1979 |
+
show();
|
1980 |
+
}
|
1981 |
+
return picker;
|
1982 |
+
};
|
1983 |
+
|
1984 |
+
picker.useStrict = function(useStrict) {
|
1985 |
+
if( arguments.length === 0 ) {
|
1986 |
+
return options.useStrict;
|
1987 |
+
}
|
1988 |
+
|
1989 |
+
if( typeof useStrict !== 'boolean' ) {
|
1990 |
+
throw new TypeError('useStrict() expects a boolean parameter');
|
1991 |
+
}
|
1992 |
+
options.useStrict = useStrict;
|
1993 |
+
return picker;
|
1994 |
+
};
|
1995 |
+
|
1996 |
+
picker.sideBySide = function(sideBySide) {
|
1997 |
+
if( arguments.length === 0 ) {
|
1998 |
+
return options.sideBySide;
|
1999 |
+
}
|
2000 |
+
|
2001 |
+
if( typeof sideBySide !== 'boolean' ) {
|
2002 |
+
throw new TypeError('sideBySide() expects a boolean parameter');
|
2003 |
+
}
|
2004 |
+
options.sideBySide = sideBySide;
|
2005 |
+
if( widget ) {
|
2006 |
+
hide();
|
2007 |
+
show();
|
2008 |
+
}
|
2009 |
+
return picker;
|
2010 |
+
};
|
2011 |
+
|
2012 |
+
picker.viewMode = function(viewMode) {
|
2013 |
+
if( arguments.length === 0 ) {
|
2014 |
+
return options.viewMode;
|
2015 |
+
}
|
2016 |
+
|
2017 |
+
if( typeof viewMode !== 'string' ) {
|
2018 |
+
throw new TypeError('viewMode() expects a string parameter');
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
if( viewModes.indexOf(viewMode) === -1 ) {
|
2022 |
+
throw new TypeError('viewMode() parameter must be one of (' + viewModes.join(', ') + ') value');
|
2023 |
+
}
|
2024 |
+
|
2025 |
+
options.viewMode = viewMode;
|
2026 |
+
currentViewMode = Math.max(viewModes.indexOf(viewMode), minViewModeNumber);
|
2027 |
+
|
2028 |
+
showMode();
|
2029 |
+
return picker;
|
2030 |
+
};
|
2031 |
+
|
2032 |
+
picker.toolbarPlacement = function(toolbarPlacement) {
|
2033 |
+
if( arguments.length === 0 ) {
|
2034 |
+
return options.toolbarPlacement;
|
2035 |
+
}
|
2036 |
+
|
2037 |
+
if( typeof toolbarPlacement !== 'string' ) {
|
2038 |
+
throw new TypeError('toolbarPlacement() expects a string parameter');
|
2039 |
+
}
|
2040 |
+
if( toolbarPlacements.indexOf(toolbarPlacement) === -1 ) {
|
2041 |
+
throw new TypeError('toolbarPlacement() parameter must be one of (' + toolbarPlacements.join(', ') + ') value');
|
2042 |
+
}
|
2043 |
+
options.toolbarPlacement = toolbarPlacement;
|
2044 |
+
|
2045 |
+
if( widget ) {
|
2046 |
+
hide();
|
2047 |
+
show();
|
2048 |
+
}
|
2049 |
+
return picker;
|
2050 |
+
};
|
2051 |
+
|
2052 |
+
picker.widgetPositioning = function(widgetPositioning) {
|
2053 |
+
if( arguments.length === 0 ) {
|
2054 |
+
return $.extend({}, options.widgetPositioning);
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
if( ({}).toString.call(widgetPositioning) !== '[object Object]' ) {
|
2058 |
+
throw new TypeError('widgetPositioning() expects an object variable');
|
2059 |
+
}
|
2060 |
+
if( widgetPositioning.horizontal ) {
|
2061 |
+
if( typeof widgetPositioning.horizontal !== 'string' ) {
|
2062 |
+
throw new TypeError('widgetPositioning() horizontal variable must be a string');
|
2063 |
+
}
|
2064 |
+
widgetPositioning.horizontal = widgetPositioning.horizontal.toLowerCase();
|
2065 |
+
if( horizontalModes.indexOf(widgetPositioning.horizontal) === -1 ) {
|
2066 |
+
throw new TypeError('widgetPositioning() expects horizontal parameter to be one of (' + horizontalModes.join(', ') + ')');
|
2067 |
+
}
|
2068 |
+
options.widgetPositioning.horizontal = widgetPositioning.horizontal;
|
2069 |
+
}
|
2070 |
+
if( widgetPositioning.vertical ) {
|
2071 |
+
if( typeof widgetPositioning.vertical !== 'string' ) {
|
2072 |
+
throw new TypeError('widgetPositioning() vertical variable must be a string');
|
2073 |
+
}
|
2074 |
+
widgetPositioning.vertical = widgetPositioning.vertical.toLowerCase();
|
2075 |
+
if( verticalModes.indexOf(widgetPositioning.vertical) === -1 ) {
|
2076 |
+
throw new TypeError('widgetPositioning() expects vertical parameter to be one of (' + verticalModes.join(', ') + ')');
|
2077 |
+
}
|
2078 |
+
options.widgetPositioning.vertical = widgetPositioning.vertical;
|
2079 |
+
}
|
2080 |
+
update();
|
2081 |
+
return picker;
|
2082 |
+
};
|
2083 |
+
|
2084 |
+
picker.calendarWeeks = function(calendarWeeks) {
|
2085 |
+
if( arguments.length === 0 ) {
|
2086 |
+
return options.calendarWeeks;
|
2087 |
+
}
|
2088 |
+
|
2089 |
+
if( typeof calendarWeeks !== 'boolean' ) {
|
2090 |
+
throw new TypeError('calendarWeeks() expects parameter to be a boolean value');
|
2091 |
+
}
|
2092 |
+
|
2093 |
+
options.calendarWeeks = calendarWeeks;
|
2094 |
+
update();
|
2095 |
+
return picker;
|
2096 |
+
};
|
2097 |
+
|
2098 |
+
picker.showTodayButton = function(showTodayButton) {
|
2099 |
+
if( arguments.length === 0 ) {
|
2100 |
+
return options.showTodayButton;
|
2101 |
+
}
|
2102 |
+
|
2103 |
+
if( typeof showTodayButton !== 'boolean' ) {
|
2104 |
+
throw new TypeError('showTodayButton() expects a boolean parameter');
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
options.showTodayButton = showTodayButton;
|
2108 |
+
if( widget ) {
|
2109 |
+
hide();
|
2110 |
+
show();
|
2111 |
+
}
|
2112 |
+
return picker;
|
2113 |
+
};
|
2114 |
+
|
2115 |
+
picker.showClear = function(showClear) {
|
2116 |
+
if( arguments.length === 0 ) {
|
2117 |
+
return options.showClear;
|
2118 |
+
}
|
2119 |
+
|
2120 |
+
if( typeof showClear !== 'boolean' ) {
|
2121 |
+
throw new TypeError('showClear() expects a boolean parameter');
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
options.showClear = showClear;
|
2125 |
+
if( widget ) {
|
2126 |
+
hide();
|
2127 |
+
show();
|
2128 |
+
}
|
2129 |
+
return picker;
|
2130 |
+
};
|
2131 |
+
|
2132 |
+
picker.widgetParent = function(widgetParent) {
|
2133 |
+
if( arguments.length === 0 ) {
|
2134 |
+
return options.widgetParent;
|
2135 |
+
}
|
2136 |
+
|
2137 |
+
if( typeof widgetParent === 'string' ) {
|
2138 |
+
widgetParent = $(widgetParent);
|
2139 |
+
}
|
2140 |
+
|
2141 |
+
if( widgetParent !== null && (typeof widgetParent !== 'string' && !(widgetParent instanceof $)) ) {
|
2142 |
+
throw new TypeError('widgetParent() expects a string or a jQuery object parameter');
|
2143 |
+
}
|
2144 |
+
|
2145 |
+
options.widgetParent = widgetParent;
|
2146 |
+
if( widget ) {
|
2147 |
+
hide();
|
2148 |
+
show();
|
2149 |
+
}
|
2150 |
+
return picker;
|
2151 |
+
};
|
2152 |
+
|
2153 |
+
picker.keepOpen = function(keepOpen) {
|
2154 |
+
if( arguments.length === 0 ) {
|
2155 |
+
return options.keepOpen;
|
2156 |
+
}
|
2157 |
+
|
2158 |
+
if( typeof keepOpen !== 'boolean' ) {
|
2159 |
+
throw new TypeError('keepOpen() expects a boolean parameter');
|
2160 |
+
}
|
2161 |
+
|
2162 |
+
options.keepOpen = keepOpen;
|
2163 |
+
return picker;
|
2164 |
+
};
|
2165 |
+
|
2166 |
+
picker.focusOnShow = function(focusOnShow) {
|
2167 |
+
if( arguments.length === 0 ) {
|
2168 |
+
return options.focusOnShow;
|
2169 |
+
}
|
2170 |
+
|
2171 |
+
if( typeof focusOnShow !== 'boolean' ) {
|
2172 |
+
throw new TypeError('focusOnShow() expects a boolean parameter');
|
2173 |
+
}
|
2174 |
+
|
2175 |
+
options.focusOnShow = focusOnShow;
|
2176 |
+
return picker;
|
2177 |
+
};
|
2178 |
+
|
2179 |
+
picker.inline = function(inline) {
|
2180 |
+
if( arguments.length === 0 ) {
|
2181 |
+
return options.inline;
|
2182 |
+
}
|
2183 |
+
|
2184 |
+
if( typeof inline !== 'boolean' ) {
|
2185 |
+
throw new TypeError('inline() expects a boolean parameter');
|
2186 |
+
}
|
2187 |
+
|
2188 |
+
options.inline = inline;
|
2189 |
+
return picker;
|
2190 |
+
};
|
2191 |
+
|
2192 |
+
picker.clear = function() {
|
2193 |
+
clear();
|
2194 |
+
return picker;
|
2195 |
+
};
|
2196 |
+
|
2197 |
+
picker.keyBinds = function(keyBinds) {
|
2198 |
+
if( arguments.length === 0 ) {
|
2199 |
+
return options.keyBinds;
|
2200 |
+
}
|
2201 |
+
|
2202 |
+
options.keyBinds = keyBinds;
|
2203 |
+
return picker;
|
2204 |
+
};
|
2205 |
+
|
2206 |
+
picker.getMoment = function(d) {
|
2207 |
+
return getMoment(d);
|
2208 |
+
};
|
2209 |
+
|
2210 |
+
picker.debug = function(debug) {
|
2211 |
+
if( typeof debug !== 'boolean' ) {
|
2212 |
+
throw new TypeError('debug() expects a boolean parameter');
|
2213 |
+
}
|
2214 |
+
|
2215 |
+
options.debug = debug;
|
2216 |
+
return picker;
|
2217 |
+
};
|
2218 |
+
|
2219 |
+
picker.allowInputToggle = function(allowInputToggle) {
|
2220 |
+
if( arguments.length === 0 ) {
|
2221 |
+
return options.allowInputToggle;
|
2222 |
+
}
|
2223 |
+
|
2224 |
+
if( typeof allowInputToggle !== 'boolean' ) {
|
2225 |
+
throw new TypeError('allowInputToggle() expects a boolean parameter');
|
2226 |
+
}
|
2227 |
+
|
2228 |
+
options.allowInputToggle = allowInputToggle;
|
2229 |
+
return picker;
|
2230 |
+
};
|
2231 |
+
|
2232 |
+
picker.showClose = function(showClose) {
|
2233 |
+
if( arguments.length === 0 ) {
|
2234 |
+
return options.showClose;
|
2235 |
+
}
|
2236 |
+
|
2237 |
+
if( typeof showClose !== 'boolean' ) {
|
2238 |
+
throw new TypeError('showClose() expects a boolean parameter');
|
2239 |
+
}
|
2240 |
+
|
2241 |
+
options.showClose = showClose;
|
2242 |
+
return picker;
|
2243 |
+
};
|
2244 |
+
|
2245 |
+
picker.keepInvalid = function(keepInvalid) {
|
2246 |
+
if( arguments.length === 0 ) {
|
2247 |
+
return options.keepInvalid;
|
2248 |
+
}
|
2249 |
+
|
2250 |
+
if( typeof keepInvalid !== 'boolean' ) {
|
2251 |
+
throw new TypeError('keepInvalid() expects a boolean parameter');
|
2252 |
+
}
|
2253 |
+
options.keepInvalid = keepInvalid;
|
2254 |
+
return picker;
|
2255 |
+
};
|
2256 |
+
|
2257 |
+
picker.datepickerInput = function(datepickerInput) {
|
2258 |
+
if( arguments.length === 0 ) {
|
2259 |
+
return options.datepickerInput;
|
2260 |
+
}
|
2261 |
+
|
2262 |
+
if( typeof datepickerInput !== 'string' ) {
|
2263 |
+
throw new TypeError('datepickerInput() expects a string parameter');
|
2264 |
+
}
|
2265 |
+
|
2266 |
+
options.datepickerInput = datepickerInput;
|
2267 |
+
return picker;
|
2268 |
+
};
|
2269 |
+
|
2270 |
+
picker.parseInputDate = function(parseInputDate) {
|
2271 |
+
if( arguments.length === 0 ) {
|
2272 |
+
return options.parseInputDate;
|
2273 |
+
}
|
2274 |
+
|
2275 |
+
if( typeof parseInputDate !== 'function' ) {
|
2276 |
+
throw new TypeError('parseInputDate() sholud be as function');
|
2277 |
+
}
|
2278 |
+
|
2279 |
+
options.parseInputDate = parseInputDate;
|
2280 |
+
|
2281 |
+
return picker;
|
2282 |
+
};
|
2283 |
+
|
2284 |
+
picker.disabledTimeIntervals = function(disabledTimeIntervals) {
|
2285 |
+
///<signature helpKeyword="$.fn.factoryBootstrap330_DatetimePickerControl.disabledTimeIntervals">
|
2286 |
+
///<summary>Returns an array with the currently set disabled dates on the component.</summary>
|
2287 |
+
///<returns type="array">options.disabledTimeIntervals</returns>
|
2288 |
+
///</signature>
|
2289 |
+
///<signature>
|
2290 |
+
///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling
|
2291 |
+
// this function removes the configuration of /options.enabledDates if such exist.</summary> /<param
|
2292 |
+
// name="dates" locid="$.fn.factoryBootstrap330_DatetimePickerControl.disabledTimeIntervals_p:dates">Takes
|
2293 |
+
// an [ string or Date or moment ] of values and allows the user to select only from those days.</param>
|
2294 |
+
// /</signature>
|
2295 |
+
if( arguments.length === 0 ) {
|
2296 |
+
return (options.disabledTimeIntervals
|
2297 |
+
? $.extend({}, options.disabledTimeIntervals)
|
2298 |
+
: options.disabledTimeIntervals);
|
2299 |
+
}
|
2300 |
+
|
2301 |
+
if( !disabledTimeIntervals ) {
|
2302 |
+
options.disabledTimeIntervals = false;
|
2303 |
+
update();
|
2304 |
+
return picker;
|
2305 |
+
}
|
2306 |
+
if( !(disabledTimeIntervals instanceof Array) ) {
|
2307 |
+
throw new TypeError('disabledTimeIntervals() expects an array parameter');
|
2308 |
+
}
|
2309 |
+
options.disabledTimeIntervals = disabledTimeIntervals;
|
2310 |
+
update();
|
2311 |
+
return picker;
|
2312 |
+
};
|
2313 |
+
|
2314 |
+
picker.disabledHours = function(hours) {
|
2315 |
+
///<signature helpKeyword="$.fn.factoryBootstrap330_DatetimePickerControl.disabledHours">
|
2316 |
+
///<summary>Returns an array with the currently set disabled hours on the component.</summary>
|
2317 |
+
///<returns type="array">options.disabledHours</returns>
|
2318 |
+
///</signature>
|
2319 |
+
///<signature>
|
2320 |
+
///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling
|
2321 |
+
// this function removes the configuration of /options.enabledHours if such exist.</summary> /<param
|
2322 |
+
// name="hours" locid="$.fn.factoryBootstrap330_DatetimePickerControl.disabledHours_p:hours">Takes an [ int
|
2323 |
+
// ] of values and disallows the user to select only from those hours.</param> /</signature>
|
2324 |
+
if( arguments.length === 0 ) {
|
2325 |
+
return (options.disabledHours ? $.extend({}, options.disabledHours) : options.disabledHours);
|
2326 |
+
}
|
2327 |
+
|
2328 |
+
if( !hours ) {
|
2329 |
+
options.disabledHours = false;
|
2330 |
+
update();
|
2331 |
+
return picker;
|
2332 |
+
}
|
2333 |
+
if( !(hours instanceof Array) ) {
|
2334 |
+
throw new TypeError('disabledHours() expects an array parameter');
|
2335 |
+
}
|
2336 |
+
options.disabledHours = indexGivenHours(hours);
|
2337 |
+
options.enabledHours = false;
|
2338 |
+
if( options.useCurrent && !options.keepInvalid ) {
|
2339 |
+
var tries = 0;
|
2340 |
+
while( !isValid(date, 'h') ) {
|
2341 |
+
date.add(1, 'h');
|
2342 |
+
if( tries === 24 ) {
|
2343 |
+
throw 'Tried 24 times to find a valid date';
|
2344 |
+
}
|
2345 |
+
tries++;
|
2346 |
+
}
|
2347 |
+
setValue(date);
|
2348 |
+
}
|
2349 |
+
update();
|
2350 |
+
return picker;
|
2351 |
+
};
|
2352 |
+
|
2353 |
+
picker.enabledHours = function(hours) {
|
2354 |
+
///<signature helpKeyword="$.fn.factoryBootstrap330_DatetimePickerControl.enabledHours">
|
2355 |
+
///<summary>Returns an array with the currently set enabled hours on the component.</summary>
|
2356 |
+
///<returns type="array">options.enabledHours</returns>
|
2357 |
+
///</signature>
|
2358 |
+
///<signature>
|
2359 |
+
///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling
|
2360 |
+
// this function removes the configuration of options.disabledHours if such exist.</summary> /<param
|
2361 |
+
// name="hours" locid="$.fn.factoryBootstrap330_DatetimePickerControl.enabledHours_p:hours">Takes an [ int
|
2362 |
+
// ] of values and allows the user to select only from those hours.</param> /</signature>
|
2363 |
+
if( arguments.length === 0 ) {
|
2364 |
+
return (options.enabledHours ? $.extend({}, options.enabledHours) : options.enabledHours);
|
2365 |
+
}
|
2366 |
+
|
2367 |
+
if( !hours ) {
|
2368 |
+
options.enabledHours = false;
|
2369 |
+
update();
|
2370 |
+
return picker;
|
2371 |
+
}
|
2372 |
+
if( !(hours instanceof Array) ) {
|
2373 |
+
throw new TypeError('enabledHours() expects an array parameter');
|
2374 |
+
}
|
2375 |
+
options.enabledHours = indexGivenHours(hours);
|
2376 |
+
options.disabledHours = false;
|
2377 |
+
if( options.useCurrent && !options.keepInvalid ) {
|
2378 |
+
var tries = 0;
|
2379 |
+
while( !isValid(date, 'h') ) {
|
2380 |
+
date.add(1, 'h');
|
2381 |
+
if( tries === 24 ) {
|
2382 |
+
throw 'Tried 24 times to find a valid date';
|
2383 |
+
}
|
2384 |
+
tries++;
|
2385 |
+
}
|
2386 |
+
setValue(date);
|
2387 |
+
}
|
2388 |
+
update();
|
2389 |
+
return picker;
|
2390 |
+
};
|
2391 |
+
/**
|
2392 |
+
* Returns the component's model current viewDate, a moment object or null if not set. Passing a null value
|
2393 |
+
* unsets the components model current moment. Parsing of the newDate parameter is made using moment library
|
2394 |
+
* with the options.format and options.useStrict components configuration.
|
2395 |
+
* @param {Takes string, viewDate, moment, null parameter.} newDate
|
2396 |
+
* @returns {viewDate.clone()}
|
2397 |
+
*/
|
2398 |
+
picker.viewDate = function(newDate) {
|
2399 |
+
if( arguments.length === 0 ) {
|
2400 |
+
return viewDate.clone();
|
2401 |
+
}
|
2402 |
+
|
2403 |
+
if( !newDate ) {
|
2404 |
+
viewDate = date.clone();
|
2405 |
+
return picker;
|
2406 |
+
}
|
2407 |
+
|
2408 |
+
if( typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date) ) {
|
2409 |
+
throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');
|
2410 |
+
}
|
2411 |
+
|
2412 |
+
viewDate = parseInputDate(newDate);
|
2413 |
+
viewUpdate();
|
2414 |
+
return picker;
|
2415 |
+
};
|
2416 |
+
|
2417 |
+
// initializing element and component attributes
|
2418 |
+
if( element.is('input') ) {
|
2419 |
+
input = element;
|
2420 |
+
} else {
|
2421 |
+
input = element.find(options.datepickerInput);
|
2422 |
+
if( input.length === 0 ) {
|
2423 |
+
input = element.find('input');
|
2424 |
+
} else if( !input.is('input') ) {
|
2425 |
+
throw new Error('CSS class "' + options.datepickerInput + '" cannot be applied to non input element');
|
2426 |
+
}
|
2427 |
+
}
|
2428 |
+
|
2429 |
+
if( element.hasClass('input-group') ) {
|
2430 |
+
// in case there is more then one 'input-group-addon' Issue #48
|
2431 |
+
if( element.find('.datepickerbutton').length === 0 ) {
|
2432 |
+
component = element.find('.input-group-addon');
|
2433 |
+
} else {
|
2434 |
+
component = element.find('.datepickerbutton');
|
2435 |
+
}
|
2436 |
+
}
|
2437 |
+
|
2438 |
+
if( !options.inline && !input.is('input') ) {
|
2439 |
+
throw new Error('Could not initialize DateTimePicker without an input element');
|
2440 |
+
}
|
2441 |
+
|
2442 |
+
// Set defaults for date here now instead of in var declaration
|
2443 |
+
date = getMoment();
|
2444 |
+
viewDate = date.clone();
|
2445 |
+
|
2446 |
+
$.extend(true, options, dataToOptions());
|
2447 |
+
|
2448 |
+
picker.options(options);
|
2449 |
+
|
2450 |
+
initFormatting();
|
2451 |
+
|
2452 |
+
attachDatePickerElementEvents();
|
2453 |
+
|
2454 |
+
if( input.prop('disabled') ) {
|
2455 |
+
picker.disable();
|
2456 |
+
}
|
2457 |
+
if( input.is('input') && input.val().trim().length !== 0 ) {
|
2458 |
+
setValue(parseInputDate(input.val().trim()));
|
2459 |
+
}
|
2460 |
+
else if( options.defaultDate && input.attr('placeholder') === undefined ) {
|
2461 |
+
setValue(options.defaultDate);
|
2462 |
+
}
|
2463 |
+
if( options.inline ) {
|
2464 |
+
show();
|
2465 |
+
}
|
2466 |
+
return picker;
|
2467 |
+
};
|
2468 |
+
|
2469 |
+
/********************************************************************************
|
2470 |
+
*
|
2471 |
+
* jQuery plugin constructor and defaults object
|
2472 |
+
*
|
2473 |
+
********************************************************************************/
|
2474 |
+
|
2475 |
+
/**
|
2476 |
+
* See (http://jquery.com/).
|
2477 |
+
* @name jQuery
|
2478 |
+
* @class
|
2479 |
+
* See the jQuery Library (http://jquery.com/) for full details. This just
|
2480 |
+
* documents the function and classes that are added to jQuery by this plug-in.
|
2481 |
+
*/
|
2482 |
+
/**
|
2483 |
+
* See (http://jquery.com/)
|
2484 |
+
* @name fn
|
2485 |
+
* @class
|
2486 |
+
* See the jQuery Library (http://jquery.com/) for full details. This just
|
2487 |
+
* documents the function and classes that are added to jQuery by this plug-in.
|
2488 |
+
* @memberOf jQuery
|
2489 |
+
*/
|
2490 |
+
/**
|
2491 |
+
* Show comments
|
2492 |
+
* @class datetimepicker
|
2493 |
+
* @memberOf jQuery.fn
|
2494 |
+
*/
|
2495 |
+
$.fn.factoryBootstrap330_DatetimePickerControl = function(options) {
|
2496 |
+
options = options || {};
|
2497 |
+
|
2498 |
+
var args = Array.prototype.slice.call(arguments, 1),
|
2499 |
+
isInstance = true,
|
2500 |
+
thisMethods = ['destroy', 'hide', 'show', 'toggle'],
|
2501 |
+
returnValue;
|
2502 |
+
|
2503 |
+
if( typeof options === 'object' ) {
|
2504 |
+
return this.each(function() {
|
2505 |
+
var $this = $(this),
|
2506 |
+
_options;
|
2507 |
+
if( !$this.data('DateTimePicker') ) {
|
2508 |
+
// create a private copy of the defaults object
|
2509 |
+
_options = $.extend(true, {}, $.fn.factoryBootstrap330_DatetimePickerControl.defaults, options);
|
2510 |
+
$this.data('DateTimePicker', dateTimePicker($this, _options));
|
2511 |
+
}
|
2512 |
+
});
|
2513 |
+
} else if( typeof options === 'string' ) {
|
2514 |
+
this.each(function() {
|
2515 |
+
var $this = $(this),
|
2516 |
+
instance = $this.data('DateTimePicker');
|
2517 |
+
if( !instance ) {
|
2518 |
+
throw new Error('bootstrap-datetimepicker("' + options + '") method was called on an element that is not using DateTimePicker');
|
2519 |
+
}
|
2520 |
+
|
2521 |
+
returnValue = instance[options].apply(instance, args);
|
2522 |
+
isInstance = returnValue === instance;
|
2523 |
+
});
|
2524 |
+
|
2525 |
+
if( isInstance || $.inArray(options, thisMethods) > -1 ) {
|
2526 |
+
return this;
|
2527 |
+
}
|
2528 |
+
|
2529 |
+
return returnValue;
|
2530 |
+
}
|
2531 |
+
|
2532 |
+
throw new TypeError('Invalid arguments for DateTimePicker: ' + options);
|
2533 |
+
};
|
2534 |
+
|
2535 |
+
$.fn.factoryBootstrap330_DatetimePickerControl.defaults = {
|
2536 |
+
timeZone: '',
|
2537 |
+
format: false,
|
2538 |
+
dayViewHeaderFormat: 'MMMM YYYY',
|
2539 |
+
extraFormats: false,
|
2540 |
+
stepping: 1,
|
2541 |
+
minDate: false,
|
2542 |
+
maxDate: false,
|
2543 |
+
useCurrent: true,
|
2544 |
+
collapse: true,
|
2545 |
+
locale: moment.locale(),
|
2546 |
+
defaultDate: false,
|
2547 |
+
disabledDates: false,
|
2548 |
+
enabledDates: false,
|
2549 |
+
icons: {
|
2550 |
+
time: 'fa fa-clock-o',
|
2551 |
+
date: 'fa fa-calendar',
|
2552 |
+
up: 'fa fa-arrow-up',
|
2553 |
+
down: 'fa fa-arrow-down',
|
2554 |
+
previous: 'fa fa-arrow-left',
|
2555 |
+
next: 'fa fa-arrow-right',
|
2556 |
+
today: 'fa fa-thumb-tack',
|
2557 |
+
clear: 'fa fa-trash',
|
2558 |
+
close: 'fa fa-times'
|
2559 |
+
},
|
2560 |
+
tooltips: {
|
2561 |
+
today: 'Go to today',
|
2562 |
+
clear: 'Clear selection',
|
2563 |
+
close: 'Close the picker',
|
2564 |
+
selectMonth: 'Select Month',
|
2565 |
+
prevMonth: 'Previous Month',
|
2566 |
+
nextMonth: 'Next Month',
|
2567 |
+
selectYear: 'Select Year',
|
2568 |
+
prevYear: 'Previous Year',
|
2569 |
+
nextYear: 'Next Year',
|
2570 |
+
selectDecade: 'Select Decade',
|
2571 |
+
prevDecade: 'Previous Decade',
|
2572 |
+
nextDecade: 'Next Decade',
|
2573 |
+
prevCentury: 'Previous Century',
|
2574 |
+
nextCentury: 'Next Century',
|
2575 |
+
pickHour: 'Pick Hour',
|
2576 |
+
incrementHour: 'Increment Hour',
|
2577 |
+
decrementHour: 'Decrement Hour',
|
2578 |
+
pickMinute: 'Pick Minute',
|
2579 |
+
incrementMinute: 'Increment Minute',
|
2580 |
+
decrementMinute: 'Decrement Minute',
|
2581 |
+
pickSecond: 'Pick Second',
|
2582 |
+
incrementSecond: 'Increment Second',
|
2583 |
+
decrementSecond: 'Decrement Second',
|
2584 |
+
togglePeriod: 'Toggle Period',
|
2585 |
+
selectTime: 'Select Time'
|
2586 |
+
},
|
2587 |
+
useStrict: false,
|
2588 |
+
sideBySide: false,
|
2589 |
+
daysOfWeekDisabled: false,
|
2590 |
+
calendarWeeks: false,
|
2591 |
+
viewMode: 'days',
|
2592 |
+
toolbarPlacement: 'default',
|
2593 |
+
showTodayButton: false,
|
2594 |
+
showClear: false,
|
2595 |
+
showClose: false,
|
2596 |
+
widgetPositioning: {
|
2597 |
+
horizontal: 'auto',
|
2598 |
+
vertical: 'auto'
|
2599 |
+
},
|
2600 |
+
widgetParent: null,
|
2601 |
+
ignoreReadonly: false,
|
2602 |
+
keepOpen: false,
|
2603 |
+
focusOnShow: true,
|
2604 |
+
inline: false,
|
2605 |
+
keepInvalid: false,
|
2606 |
+
datepickerInput: '.datepickerinput',
|
2607 |
+
keyBinds: {
|
2608 |
+
up: function(widget) {
|
2609 |
+
if( !widget ) {
|
2610 |
+
return;
|
2611 |
+
}
|
2612 |
+
var d = this.date() || this.getMoment();
|
2613 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2614 |
+
this.date(d.clone().subtract(7, 'd'));
|
2615 |
+
} else {
|
2616 |
+
this.date(d.clone().add(this.stepping(), 'm'));
|
2617 |
+
}
|
2618 |
+
},
|
2619 |
+
down: function(widget) {
|
2620 |
+
if( !widget ) {
|
2621 |
+
this.show();
|
2622 |
+
return;
|
2623 |
+
}
|
2624 |
+
var d = this.date() || this.getMoment();
|
2625 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2626 |
+
this.date(d.clone().add(7, 'd'));
|
2627 |
+
} else {
|
2628 |
+
this.date(d.clone().subtract(this.stepping(), 'm'));
|
2629 |
+
}
|
2630 |
+
},
|
2631 |
+
'control up': function(widget) {
|
2632 |
+
if( !widget ) {
|
2633 |
+
return;
|
2634 |
+
}
|
2635 |
+
var d = this.date() || this.getMoment();
|
2636 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2637 |
+
this.date(d.clone().subtract(1, 'y'));
|
2638 |
+
} else {
|
2639 |
+
this.date(d.clone().add(1, 'h'));
|
2640 |
+
}
|
2641 |
+
},
|
2642 |
+
'control down': function(widget) {
|
2643 |
+
if( !widget ) {
|
2644 |
+
return;
|
2645 |
+
}
|
2646 |
+
var d = this.date() || this.getMoment();
|
2647 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2648 |
+
this.date(d.clone().add(1, 'y'));
|
2649 |
+
} else {
|
2650 |
+
this.date(d.clone().subtract(1, 'h'));
|
2651 |
+
}
|
2652 |
+
},
|
2653 |
+
left: function(widget) {
|
2654 |
+
if( !widget ) {
|
2655 |
+
return;
|
2656 |
+
}
|
2657 |
+
var d = this.date() || this.getMoment();
|
2658 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2659 |
+
this.date(d.clone().subtract(1, 'd'));
|
2660 |
+
}
|
2661 |
+
},
|
2662 |
+
right: function(widget) {
|
2663 |
+
if( !widget ) {
|
2664 |
+
return;
|
2665 |
+
}
|
2666 |
+
var d = this.date() || this.getMoment();
|
2667 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2668 |
+
this.date(d.clone().add(1, 'd'));
|
2669 |
+
}
|
2670 |
+
},
|
2671 |
+
pageUp: function(widget) {
|
2672 |
+
if( !widget ) {
|
2673 |
+
return;
|
2674 |
+
}
|
2675 |
+
var d = this.date() || this.getMoment();
|
2676 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2677 |
+
this.date(d.clone().subtract(1, 'M'));
|
2678 |
+
}
|
2679 |
+
},
|
2680 |
+
pageDown: function(widget) {
|
2681 |
+
if( !widget ) {
|
2682 |
+
return;
|
2683 |
+
}
|
2684 |
+
var d = this.date() || this.getMoment();
|
2685 |
+
if( widget.find('.datepicker').is(':visible') ) {
|
2686 |
+
this.date(d.clone().add(1, 'M'));
|
2687 |
+
}
|
2688 |
+
},
|
2689 |
+
enter: function() {
|
2690 |
+
this.hide();
|
2691 |
+
},
|
2692 |
+
escape: function() {
|
2693 |
+
this.hide();
|
2694 |
+
},
|
2695 |
+
//tab: function (widget) { //this break the flow of the form. disabling for now
|
2696 |
+
// var toggle = widget.find('.picker-switch a[data-action="togglePicker"]');
|
2697 |
+
// if(toggle.length > 0) toggle.click();
|
2698 |
+
//},
|
2699 |
+
'control space': function(widget) {
|
2700 |
+
if( !widget ) {
|
2701 |
+
return;
|
2702 |
+
}
|
2703 |
+
if( widget.find('.timepicker').is(':visible') ) {
|
2704 |
+
widget.find('.btn[data-action="togglePeriod"]').click();
|
2705 |
+
}
|
2706 |
+
},
|
2707 |
+
t: function() {
|
2708 |
+
this.date(this.getMoment());
|
2709 |
+
},
|
2710 |
+
'delete': function() {
|
2711 |
+
this.clear();
|
2712 |
+
}
|
2713 |
+
},
|
2714 |
+
debug: false,
|
2715 |
+
allowInputToggle: false,
|
2716 |
+
disabledTimeIntervals: false,
|
2717 |
+
disabledHours: false,
|
2718 |
+
enabledHours: false,
|
2719 |
+
viewDate: false
|
2720 |
+
};
|
2721 |
+
|
2722 |
+
return $.fn.factoryBootstrap330_DatetimePickerControl;
|
2723 |
+
}));
|
2724 |
+
|
2725 |
+
( function($) {
|
2726 |
+
$(function() {
|
2727 |
+
/**
|
2728 |
+
* Init base controls
|
2729 |
+
*/
|
2730 |
+
$(".factory-bootstrap-330 .factory-datetimepicker").factoryBootstrap330_DatetimePickerControl();
|
2731 |
+
|
2732 |
+
/**
|
2733 |
+
* Init range controls
|
2734 |
+
*/
|
2735 |
+
$('.factory-bootstrap-330 .factory-datetimepicker-range-0').factoryBootstrap330_DatetimePickerControl();
|
2736 |
+
$('.factory-bootstrap-330 .factory-datetimepicker-range-1').factoryBootstrap330_DatetimePickerControl({
|
2737 |
+
useCurrent: false //Important! See issue #1075
|
2738 |
+
});
|
2739 |
+
$(".factory-bootstrap-330 .factory-datetimepicker-range-0").on("dp.change", function(e) {
|
2740 |
+
$('.factory-bootstrap-330 .factory-datetimepicker-range-1').data("DateTimePicker").minDate(e.date);
|
2741 |
+
});
|
2742 |
+
$(".factory-bootstrap-330 .factory-datetimepicker-range-1").on("dp.change", function(e) {
|
2743 |
+
$('.factory-bootstrap-330 .factory-datetimepicker-range-0').data("DateTimePicker").maxDate(e.date);
|
2744 |
+
});
|
2745 |
+
});
|
2746 |
+
}(jQuery) );
|
libs/factory/bootstrap/assets/js/bootstrap.modal.js
DELETED
@@ -1,246 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: modal.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#modals
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// MODAL CLASS DEFINITION
|
24 |
-
// ======================
|
25 |
-
|
26 |
-
var Modal = function (element, options) {
|
27 |
-
this.options = options
|
28 |
-
this.$element = $(element)
|
29 |
-
this.$backdrop =
|
30 |
-
this.isShown = null
|
31 |
-
|
32 |
-
if (this.options.remote) this.$element.load(this.options.remote)
|
33 |
-
}
|
34 |
-
|
35 |
-
Modal.DEFAULTS = {
|
36 |
-
backdrop: true
|
37 |
-
, keyboard: true
|
38 |
-
, show: true
|
39 |
-
}
|
40 |
-
|
41 |
-
Modal.prototype.toggle = function (_relatedTarget) {
|
42 |
-
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
|
43 |
-
}
|
44 |
-
|
45 |
-
Modal.prototype.show = function (_relatedTarget) {
|
46 |
-
var that = this
|
47 |
-
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
|
48 |
-
|
49 |
-
this.$element.trigger(e)
|
50 |
-
|
51 |
-
if (this.isShown || e.isDefaultPrevented()) return
|
52 |
-
|
53 |
-
this.isShown = true
|
54 |
-
|
55 |
-
this.escape()
|
56 |
-
|
57 |
-
this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
58 |
-
|
59 |
-
this.backdrop(function () {
|
60 |
-
var transition = $.support.transition && that.$element.hasClass('fade')
|
61 |
-
|
62 |
-
if (!that.$element.parent().length) {
|
63 |
-
that.$element.appendTo(document.body) // don't move modals dom position
|
64 |
-
}
|
65 |
-
|
66 |
-
that.$element.show()
|
67 |
-
|
68 |
-
if (transition) {
|
69 |
-
that.$element[0].offsetWidth // force reflow
|
70 |
-
}
|
71 |
-
|
72 |
-
that.$element
|
73 |
-
.addClass('in')
|
74 |
-
.attr('aria-hidden', false)
|
75 |
-
|
76 |
-
that.enforceFocus()
|
77 |
-
|
78 |
-
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
79 |
-
|
80 |
-
transition ?
|
81 |
-
that.$element.find('.modal-dialog') // wait for modal to slide in
|
82 |
-
.one($.support.transition.end, function () {
|
83 |
-
that.$element.focus().trigger(e)
|
84 |
-
})
|
85 |
-
.emulateTransitionEnd(300) :
|
86 |
-
that.$element.focus().trigger(e)
|
87 |
-
})
|
88 |
-
}
|
89 |
-
|
90 |
-
Modal.prototype.hide = function (e) {
|
91 |
-
if (e) e.preventDefault()
|
92 |
-
|
93 |
-
e = $.Event('hide.bs.modal')
|
94 |
-
|
95 |
-
this.$element.trigger(e)
|
96 |
-
|
97 |
-
if (!this.isShown || e.isDefaultPrevented()) return
|
98 |
-
|
99 |
-
this.isShown = false
|
100 |
-
|
101 |
-
this.escape()
|
102 |
-
|
103 |
-
$(document).off('focusin.bs.modal')
|
104 |
-
|
105 |
-
this.$element
|
106 |
-
.removeClass('in')
|
107 |
-
.attr('aria-hidden', true)
|
108 |
-
.off('click.dismiss.modal')
|
109 |
-
|
110 |
-
$.support.transition && this.$element.hasClass('fade') ?
|
111 |
-
this.$element
|
112 |
-
.one($.support.transition.end, $.proxy(this.hideModal, this))
|
113 |
-
.emulateTransitionEnd(300) :
|
114 |
-
this.hideModal()
|
115 |
-
}
|
116 |
-
|
117 |
-
Modal.prototype.enforceFocus = function () {
|
118 |
-
$(document)
|
119 |
-
.off('focusin.bs.modal') // guard against infinite focus loop
|
120 |
-
.on('focusin.bs.modal', $.proxy(function (e) {
|
121 |
-
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
|
122 |
-
this.$element.focus()
|
123 |
-
}
|
124 |
-
}, this))
|
125 |
-
}
|
126 |
-
|
127 |
-
Modal.prototype.escape = function () {
|
128 |
-
if (this.isShown && this.options.keyboard) {
|
129 |
-
this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
|
130 |
-
e.which == 27 && this.hide();
|
131 |
-
}, this))
|
132 |
-
} else if (!this.isShown) {
|
133 |
-
this.$element.off('keyup.dismiss.bs.modal')
|
134 |
-
}
|
135 |
-
}
|
136 |
-
|
137 |
-
Modal.prototype.hideModal = function () {
|
138 |
-
var that = this
|
139 |
-
this.$element.hide()
|
140 |
-
this.backdrop(function () {
|
141 |
-
that.removeBackdrop()
|
142 |
-
that.$element.trigger('hidden.bs.modal')
|
143 |
-
})
|
144 |
-
}
|
145 |
-
|
146 |
-
Modal.prototype.removeBackdrop = function () {
|
147 |
-
this.$backdrop && this.$backdrop.remove()
|
148 |
-
this.$backdrop = null
|
149 |
-
}
|
150 |
-
|
151 |
-
Modal.prototype.backdrop = function (callback) {
|
152 |
-
var that = this
|
153 |
-
var animate = this.$element.hasClass('fade') ? 'fade' : ''
|
154 |
-
|
155 |
-
if (this.isShown && this.options.backdrop) {
|
156 |
-
var doAnimate = $.support.transition && animate
|
157 |
-
|
158 |
-
this.$backdrop = $('<div class="factory-bootstrap-330-modal-backdrop ' + animate + '" />')
|
159 |
-
.appendTo(document.body)
|
160 |
-
|
161 |
-
this.$element.on('click.dismiss.modal', $.proxy(function (e) {
|
162 |
-
if (e.target !== e.currentTarget) return
|
163 |
-
this.options.backdrop == 'static'
|
164 |
-
? this.$element[0].focus.call(this.$element[0])
|
165 |
-
: this.hide.call(this)
|
166 |
-
}, this))
|
167 |
-
|
168 |
-
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
169 |
-
|
170 |
-
this.$backdrop.addClass('in')
|
171 |
-
|
172 |
-
if (!callback) return
|
173 |
-
|
174 |
-
doAnimate ?
|
175 |
-
this.$backdrop
|
176 |
-
.one($.support.transition.end, callback)
|
177 |
-
.emulateTransitionEnd(150) :
|
178 |
-
callback()
|
179 |
-
|
180 |
-
} else if (!this.isShown && this.$backdrop) {
|
181 |
-
this.$backdrop.removeClass('in')
|
182 |
-
|
183 |
-
$.support.transition && this.$element.hasClass('fade')?
|
184 |
-
this.$backdrop
|
185 |
-
.one($.support.transition.end, callback)
|
186 |
-
.emulateTransitionEnd(150) :
|
187 |
-
callback()
|
188 |
-
|
189 |
-
} else if (callback) {
|
190 |
-
callback()
|
191 |
-
}
|
192 |
-
}
|
193 |
-
|
194 |
-
|
195 |
-
// MODAL PLUGIN DEFINITION
|
196 |
-
// =======================
|
197 |
-
|
198 |
-
var old = $.fn.factoryBootstrap330_modal
|
199 |
-
|
200 |
-
$.fn.factoryBootstrap330_modal = function (option, _relatedTarget) {
|
201 |
-
return this.each(function () {
|
202 |
-
var $this = $(this)
|
203 |
-
var data = $this.data('bs.modal')
|
204 |
-
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
205 |
-
|
206 |
-
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
|
207 |
-
if (typeof option == 'string') data[option](_relatedTarget)
|
208 |
-
else if (options.show) data.show(_relatedTarget)
|
209 |
-
})
|
210 |
-
}
|
211 |
-
|
212 |
-
$.fn.factoryBootstrap330_modal.Constructor = Modal
|
213 |
-
|
214 |
-
|
215 |
-
// MODAL NO CONFLICT
|
216 |
-
// =================
|
217 |
-
|
218 |
-
$.fn.factoryBootstrap330_modal.noConflict = function () {
|
219 |
-
$.fn.factoryBootstrap330_modal = old
|
220 |
-
return this
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
// MODAL DATA-API
|
225 |
-
// ==============
|
226 |
-
|
227 |
-
$(document).on('click.bs.modal.data-api', '[data-toggle="factory-modal"]', function (e) {
|
228 |
-
var $this = $(this)
|
229 |
-
var href = $this.attr('href')
|
230 |
-
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
231 |
-
var option = $target.data('factory-modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
232 |
-
|
233 |
-
e.preventDefault()
|
234 |
-
|
235 |
-
$target
|
236 |
-
.factoryBootstrap330_modal(option, this)
|
237 |
-
.one('hide', function () {
|
238 |
-
$this.is(':visible') && $this.focus()
|
239 |
-
})
|
240 |
-
})
|
241 |
-
|
242 |
-
$(document)
|
243 |
-
.on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
|
244 |
-
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
|
245 |
-
|
246 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.popover.js
DELETED
@@ -1,117 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: popover.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#popovers
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// POPOVER PUBLIC CLASS DEFINITION
|
24 |
-
// ===============================
|
25 |
-
|
26 |
-
var Popover = function (element, options) {
|
27 |
-
this.init('popover', element, options)
|
28 |
-
}
|
29 |
-
|
30 |
-
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
31 |
-
|
32 |
-
Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
|
33 |
-
placement: 'right'
|
34 |
-
, trigger: 'click'
|
35 |
-
, content: ''
|
36 |
-
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
37 |
-
})
|
38 |
-
|
39 |
-
|
40 |
-
// NOTE: POPOVER EXTENDS tooltip.js
|
41 |
-
// ================================
|
42 |
-
|
43 |
-
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
|
44 |
-
|
45 |
-
Popover.prototype.constructor = Popover
|
46 |
-
|
47 |
-
Popover.prototype.getDefaults = function () {
|
48 |
-
return Popover.DEFAULTS
|
49 |
-
}
|
50 |
-
|
51 |
-
Popover.prototype.setContent = function () {
|
52 |
-
var $tip = this.tip()
|
53 |
-
var title = this.getTitle()
|
54 |
-
var content = this.getContent()
|
55 |
-
|
56 |
-
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
57 |
-
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
|
58 |
-
|
59 |
-
$tip.removeClass('fade top bottom left right in')
|
60 |
-
|
61 |
-
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
|
62 |
-
// this manually by checking the contents.
|
63 |
-
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
|
64 |
-
}
|
65 |
-
|
66 |
-
Popover.prototype.hasContent = function () {
|
67 |
-
return this.getTitle() || this.getContent()
|
68 |
-
}
|
69 |
-
|
70 |
-
Popover.prototype.getContent = function () {
|
71 |
-
var $e = this.$element
|
72 |
-
var o = this.options
|
73 |
-
|
74 |
-
return $e.attr('data-content')
|
75 |
-
|| (typeof o.content == 'function' ?
|
76 |
-
o.content.call($e[0]) :
|
77 |
-
o.content)
|
78 |
-
}
|
79 |
-
|
80 |
-
Popover.prototype.arrow = function () {
|
81 |
-
return this.$arrow = this.$arrow || this.tip().find('.arrow')
|
82 |
-
}
|
83 |
-
|
84 |
-
Popover.prototype.tip = function () {
|
85 |
-
if (!this.$tip) this.$tip = $(this.options.template)
|
86 |
-
return this.$tip
|
87 |
-
}
|
88 |
-
|
89 |
-
|
90 |
-
// POPOVER PLUGIN DEFINITION
|
91 |
-
// =========================
|
92 |
-
|
93 |
-
var old = $.fn.popover
|
94 |
-
|
95 |
-
$.fn.popover = function (option) {
|
96 |
-
return this.each(function () {
|
97 |
-
var $this = $(this)
|
98 |
-
var data = $this.data('bs.popover')
|
99 |
-
var options = typeof option == 'object' && option
|
100 |
-
|
101 |
-
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
102 |
-
if (typeof option == 'string') data[option]()
|
103 |
-
})
|
104 |
-
}
|
105 |
-
|
106 |
-
$.fn.popover.Constructor = Popover
|
107 |
-
|
108 |
-
|
109 |
-
// POPOVER NO CONFLICT
|
110 |
-
// ===================
|
111 |
-
|
112 |
-
$.fn.popover.noConflict = function () {
|
113 |
-
$.fn.popover = old
|
114 |
-
return this
|
115 |
-
}
|
116 |
-
|
117 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.scrollspy.js
DELETED
@@ -1,158 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: scrollspy.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#scrollspy
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// SCROLLSPY CLASS DEFINITION
|
24 |
-
// ==========================
|
25 |
-
|
26 |
-
function ScrollSpy(element, options) {
|
27 |
-
var href
|
28 |
-
var process = $.proxy(this.process, this)
|
29 |
-
|
30 |
-
this.$element = $(element).is('body') ? $(window) : $(element)
|
31 |
-
this.$body = $('body')
|
32 |
-
this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
|
33 |
-
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
34 |
-
this.selector = (this.options.target
|
35 |
-
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
36 |
-
|| '') + ' .nav li > a'
|
37 |
-
this.offsets = $([])
|
38 |
-
this.targets = $([])
|
39 |
-
this.activeTarget = null
|
40 |
-
|
41 |
-
this.refresh()
|
42 |
-
this.process()
|
43 |
-
}
|
44 |
-
|
45 |
-
ScrollSpy.DEFAULTS = {
|
46 |
-
offset: 10
|
47 |
-
}
|
48 |
-
|
49 |
-
ScrollSpy.prototype.refresh = function () {
|
50 |
-
var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
|
51 |
-
|
52 |
-
this.offsets = $([])
|
53 |
-
this.targets = $([])
|
54 |
-
|
55 |
-
var self = this
|
56 |
-
var $targets = this.$body
|
57 |
-
.find(this.selector)
|
58 |
-
.map(function () {
|
59 |
-
var $el = $(this)
|
60 |
-
var href = $el.data('target') || $el.attr('href')
|
61 |
-
var $href = /^#\w/.test(href) && $(href)
|
62 |
-
|
63 |
-
return ($href
|
64 |
-
&& $href.length
|
65 |
-
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
|
66 |
-
})
|
67 |
-
.sort(function (a, b) { return a[0] - b[0] })
|
68 |
-
.each(function () {
|
69 |
-
self.offsets.push(this[0])
|
70 |
-
self.targets.push(this[1])
|
71 |
-
})
|
72 |
-
}
|
73 |
-
|
74 |
-
ScrollSpy.prototype.process = function () {
|
75 |
-
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
76 |
-
var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
|
77 |
-
var maxScroll = scrollHeight - this.$scrollElement.height()
|
78 |
-
var offsets = this.offsets
|
79 |
-
var targets = this.targets
|
80 |
-
var activeTarget = this.activeTarget
|
81 |
-
var i
|
82 |
-
|
83 |
-
if (scrollTop >= maxScroll) {
|
84 |
-
return activeTarget != (i = targets.last()[0]) && this.activate(i)
|
85 |
-
}
|
86 |
-
|
87 |
-
for (i = offsets.length; i--;) {
|
88 |
-
activeTarget != targets[i]
|
89 |
-
&& scrollTop >= offsets[i]
|
90 |
-
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
91 |
-
&& this.activate( targets[i] )
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
ScrollSpy.prototype.activate = function (target) {
|
96 |
-
this.activeTarget = target
|
97 |
-
|
98 |
-
$(this.selector)
|
99 |
-
.parents('.active')
|
100 |
-
.removeClass('active')
|
101 |
-
|
102 |
-
var selector = this.selector
|
103 |
-
+ '[data-target="' + target + '"],'
|
104 |
-
+ this.selector + '[href="' + target + '"]'
|
105 |
-
|
106 |
-
var active = $(selector)
|
107 |
-
.parents('li')
|
108 |
-
.addClass('active')
|
109 |
-
|
110 |
-
if (active.parent('.dropdown-menu').length) {
|
111 |
-
active = active
|
112 |
-
.closest('li.dropdown')
|
113 |
-
.addClass('active')
|
114 |
-
}
|
115 |
-
|
116 |
-
active.trigger('activate.bs.scrollspy')
|
117 |
-
}
|
118 |
-
|
119 |
-
|
120 |
-
// SCROLLSPY PLUGIN DEFINITION
|
121 |
-
// ===========================
|
122 |
-
|
123 |
-
var old = $.fn.scrollspy
|
124 |
-
|
125 |
-
$.fn.scrollspy = function (option) {
|
126 |
-
return this.each(function () {
|
127 |
-
var $this = $(this)
|
128 |
-
var data = $this.data('bs.scrollspy')
|
129 |
-
var options = typeof option == 'object' && option
|
130 |
-
|
131 |
-
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
|
132 |
-
if (typeof option == 'string') data[option]()
|
133 |
-
})
|
134 |
-
}
|
135 |
-
|
136 |
-
$.fn.scrollspy.Constructor = ScrollSpy
|
137 |
-
|
138 |
-
|
139 |
-
// SCROLLSPY NO CONFLICT
|
140 |
-
// =====================
|
141 |
-
|
142 |
-
$.fn.scrollspy.noConflict = function () {
|
143 |
-
$.fn.scrollspy = old
|
144 |
-
return this
|
145 |
-
}
|
146 |
-
|
147 |
-
|
148 |
-
// SCROLLSPY DATA-API
|
149 |
-
// ==================
|
150 |
-
|
151 |
-
$(window).on('load', function () {
|
152 |
-
$('[data-spy="scroll"]').each(function () {
|
153 |
-
var $spy = $(this)
|
154 |
-
$spy.scrollspy($spy.data())
|
155 |
-
})
|
156 |
-
})
|
157 |
-
|
158 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.tab.js
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: tab.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#tabs
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// TAB CLASS DEFINITION
|
24 |
-
// ====================
|
25 |
-
|
26 |
-
var Tab = function (element) {
|
27 |
-
this.element = $(element)
|
28 |
-
}
|
29 |
-
|
30 |
-
Tab.prototype.show = function () {
|
31 |
-
var $this = this.element
|
32 |
-
var $ul = $this.closest('ul:not(.dropdown-menu)')
|
33 |
-
var selector = $this.data('target')
|
34 |
-
|
35 |
-
if (!selector) {
|
36 |
-
selector = $this.attr('href')
|
37 |
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
38 |
-
}
|
39 |
-
|
40 |
-
if ($this.parent('li').hasClass('active')) return
|
41 |
-
|
42 |
-
var previous = $ul.find('.active:last a')[0]
|
43 |
-
var e = $.Event('show.bs.tab', {
|
44 |
-
relatedTarget: previous
|
45 |
-
})
|
46 |
-
|
47 |
-
$this.trigger(e)
|
48 |
-
|
49 |
-
if (e.isDefaultPrevented()) return
|
50 |
-
|
51 |
-
var $target = $(selector)
|
52 |
-
|
53 |
-
this.activate($this.parent('li'), $ul)
|
54 |
-
this.activate($target, $target.parent(), function () {
|
55 |
-
$this.trigger({
|
56 |
-
type: 'shown.bs.tab'
|
57 |
-
, relatedTarget: previous
|
58 |
-
})
|
59 |
-
})
|
60 |
-
}
|
61 |
-
|
62 |
-
Tab.prototype.activate = function (element, container, callback) {
|
63 |
-
var $active = container.find('> .active')
|
64 |
-
var transition = callback
|
65 |
-
&& $.support.transition
|
66 |
-
&& $active.hasClass('fade')
|
67 |
-
|
68 |
-
function next() {
|
69 |
-
$active
|
70 |
-
.removeClass('active')
|
71 |
-
.find('> .dropdown-menu > .active')
|
72 |
-
.removeClass('active')
|
73 |
-
|
74 |
-
element.addClass('active')
|
75 |
-
|
76 |
-
if (transition) {
|
77 |
-
element[0].offsetWidth // reflow for transition
|
78 |
-
element.addClass('in')
|
79 |
-
} else {
|
80 |
-
element.removeClass('fade')
|
81 |
-
}
|
82 |
-
|
83 |
-
if (element.parent('.dropdown-menu')) {
|
84 |
-
element.closest('li.dropdown').addClass('active')
|
85 |
-
}
|
86 |
-
|
87 |
-
callback && callback()
|
88 |
-
}
|
89 |
-
|
90 |
-
transition ?
|
91 |
-
$active
|
92 |
-
.one($.support.transition.end, next)
|
93 |
-
.emulateTransitionEnd(150) :
|
94 |
-
next()
|
95 |
-
|
96 |
-
$active.removeClass('in')
|
97 |
-
}
|
98 |
-
|
99 |
-
|
100 |
-
// TAB PLUGIN DEFINITION
|
101 |
-
// =====================
|
102 |
-
|
103 |
-
var old = $.fn.tab
|
104 |
-
|
105 |
-
$.fn.tab = function ( option ) {
|
106 |
-
return this.each(function () {
|
107 |
-
var $this = $(this)
|
108 |
-
var data = $this.data('bs.tab')
|
109 |
-
|
110 |
-
if (!data) $this.data('bs.tab', (data = new Tab(this)))
|
111 |
-
if (typeof option == 'string') data[option]()
|
112 |
-
})
|
113 |
-
}
|
114 |
-
|
115 |
-
$.fn.tab.Constructor = Tab
|
116 |
-
|
117 |
-
|
118 |
-
// TAB NO CONFLICT
|
119 |
-
// ===============
|
120 |
-
|
121 |
-
$.fn.tab.noConflict = function () {
|
122 |
-
$.fn.tab = old
|
123 |
-
return this
|
124 |
-
}
|
125 |
-
|
126 |
-
|
127 |
-
// TAB DATA-API
|
128 |
-
// ============
|
129 |
-
|
130 |
-
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
131 |
-
e.preventDefault()
|
132 |
-
$(this).tab('show')
|
133 |
-
})
|
134 |
-
|
135 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/bootstrap.transition.js
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
/* ========================================================================
|
2 |
-
* Bootstrap: transition.js v3.0.3
|
3 |
-
* http://getbootstrap.com/javascript/#transitions
|
4 |
-
* ========================================================================
|
5 |
-
* Copyright 2013 Twitter, Inc.
|
6 |
-
*
|
7 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8 |
-
* you may not use this file except in compliance with the License.
|
9 |
-
* You may obtain a copy of the License at
|
10 |
-
*
|
11 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12 |
-
*
|
13 |
-
* Unless required by applicable law or agreed to in writing, software
|
14 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16 |
-
* See the License for the specific language governing permissions and
|
17 |
-
* limitations under the License.
|
18 |
-
* ======================================================================== */
|
19 |
-
|
20 |
-
|
21 |
-
+function ($) { "use strict";
|
22 |
-
|
23 |
-
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
|
24 |
-
// ============================================================
|
25 |
-
|
26 |
-
function transitionEnd() {
|
27 |
-
var el = document.createElement('bootstrap')
|
28 |
-
|
29 |
-
var transEndEventNames = {
|
30 |
-
'WebkitTransition' : 'webkitTransitionEnd'
|
31 |
-
, 'MozTransition' : 'transitionend'
|
32 |
-
, 'OTransition' : 'oTransitionEnd otransitionend'
|
33 |
-
, 'transition' : 'transitionend'
|
34 |
-
}
|
35 |
-
|
36 |
-
for (var name in transEndEventNames) {
|
37 |
-
if (el.style[name] !== undefined) {
|
38 |
-
return { end: transEndEventNames[name] }
|
39 |
-
}
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
// http://blog.alexmaccaw.com/css-transitions
|
44 |
-
$.fn.emulateTransitionEnd = function (duration) {
|
45 |
-
var called = false, $el = this
|
46 |
-
$(this).one($.support.transition.end, function () { called = true })
|
47 |
-
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
48 |
-
setTimeout(callback, duration)
|
49 |
-
return this
|
50 |
-
}
|
51 |
-
|
52 |
-
$(function () {
|
53 |
-
$.support.transition = transitionEnd()
|
54 |
-
});
|
55 |
-
|
56 |
-
// issue #SLWP-49
|
57 |
-
$(function () {
|
58 |
-
$(function () {
|
59 |
-
$.support.transition = transitionEnd();
|
60 |
-
});
|
61 |
-
});
|
62 |
-
|
63 |
-
}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/control.color-and-opacity.js
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
( function( $, undef ){
|
2 |
-
$(function(){
|
3 |
-
|
4 |
-
$(function(){
|
5 |
-
|
6 |
-
$(".factory-bootstrap-330 .factory-color-and-opacity").each(function(){
|
7 |
-
var $colorOpacityControl = $(this);
|
8 |
-
|
9 |
-
var $colorControl = $colorOpacityControl.find('.factory-color');
|
10 |
-
var $integerControl = $colorOpacityControl.find('.factory-integer');
|
11 |
-
|
12 |
-
|
13 |
-
// apply to change opacity of the preview
|
14 |
-
$integerControl.change(function(){
|
15 |
-
var opacityValue = $integerControl.find(".factory-result").val() / 100;
|
16 |
-
|
17 |
-
|
18 |
-
$colorControl.find('.factory-background').css('opacity', opacityValue );
|
19 |
-
|
20 |
-
|
21 |
-
});
|
22 |
-
|
23 |
-
$integerControl.change();
|
24 |
-
|
25 |
-
$integerControl.on("click.color.factory", function(e){
|
26 |
-
e.stopPropagation();
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
|
31 |
-
});
|
32 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/control.color.js
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Factory Botstrap Color Control
|
3 |
-
*
|
4 |
-
* @uses plugin.iris.js
|
5 |
-
*
|
6 |
-
* @author Paul Kashtanoff <paul@byonepress.com>
|
7 |
-
* @copyright (c) 2013-2014, OnePress Ltd
|
8 |
-
*
|
9 |
-
* @package factory-forms
|
10 |
-
* @since 3.1.0
|
11 |
-
*/
|
12 |
-
|
13 |
-
;( function( $ ){
|
14 |
-
|
15 |
-
$.widget( "factoryBootstrap330.colorControl", {
|
16 |
-
|
17 |
-
_create: function() {
|
18 |
-
|
19 |
-
this.$element = this.element;
|
20 |
-
this.$picker = this.$element.find('.factory-color-hex');
|
21 |
-
this.$preview = this.$element.find('.factory-preview');
|
22 |
-
this.$background = this.$element.find('.factory-background');
|
23 |
-
|
24 |
-
this._init();
|
25 |
-
},
|
26 |
-
|
27 |
-
_init: function( event ) {
|
28 |
-
var self = this;
|
29 |
-
|
30 |
-
var irisOptions = {
|
31 |
-
width: 216,
|
32 |
-
palettes: ['#16a086', '#27ae61', '#2a80b9', '#8f44ad', '#2d3e50', '#f49c14', '#c1392b', '#bec3c7'],
|
33 |
-
hide: true,
|
34 |
-
change: function(event, ui) {
|
35 |
-
self.$background.css({ background: ui.color.toString() });
|
36 |
-
|
37 |
-
self.$element.trigger('change.color.factory', [ ui.color.toString() ]);
|
38 |
-
self.$element.trigger('updated.color.factory', [ ui.color.toString() ]);
|
39 |
-
}
|
40 |
-
};
|
41 |
-
|
42 |
-
var picketTarget = this.$element.data('picker-target');
|
43 |
-
if ( picketTarget ) irisOptions.target = $(picketTarget);
|
44 |
-
|
45 |
-
this.$picker.factoryBootstrap330_iris(irisOptions);
|
46 |
-
this.$picker.off('focus');
|
47 |
-
|
48 |
-
$(document).on("click.color.factory", function(){
|
49 |
-
self.$picker.factoryBootstrap330_iris("hide");
|
50 |
-
});
|
51 |
-
|
52 |
-
this.$picker.add(this.$background).on("click.color.factory", function(e){
|
53 |
-
e.stopPropagation();
|
54 |
-
self.$picker.factoryBootstrap330_iris("show");
|
55 |
-
});
|
56 |
-
},
|
57 |
-
|
58 |
-
togglePicker: function() {
|
59 |
-
if( this.$element.hasClass('factory-picker-active') ) this.hidePicker();
|
60 |
-
else this.showPicker();
|
61 |
-
},
|
62 |
-
|
63 |
-
hidePicker: function() {
|
64 |
-
this.$element.removeClass('factory-picker-active');
|
65 |
-
this.$picker.factoryBootstrap330_iris( 'hide' );
|
66 |
-
},
|
67 |
-
|
68 |
-
showPicker: function() {
|
69 |
-
this.$element.addClass('factory-picker-active');
|
70 |
-
this.$picker.factoryBootstrap330_iris( 'show' );
|
71 |
-
},
|
72 |
-
|
73 |
-
getValue: function() {
|
74 |
-
return this.$picker.val();
|
75 |
-
},
|
76 |
-
|
77 |
-
setValue: function( value, trigger ) {
|
78 |
-
this.$picker.val(value);
|
79 |
-
if ( trigger ) self.$picker.trigger('change');
|
80 |
-
}
|
81 |
-
});
|
82 |
-
|
83 |
-
$(function(){
|
84 |
-
$.widget.bridge( "factoryBootstrap330_colorControl", $.factoryBootstrap330.colorControl );
|
85 |
-
$(".factory-bootstrap-330 .factory-color").factoryBootstrap330_colorControl({});
|
86 |
-
});
|
87 |
-
|
88 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/control.dropdown-and-colors.js
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
(function($) {
|
2 |
-
var dropdownAndColors = function(element) {
|
3 |
-
var $this = $(element);
|
4 |
-
var radioControlsWrap = $this.find('.factory-colors-inner-wrap');
|
5 |
-
|
6 |
-
$this.find('select').change(function() {
|
7 |
-
var selected = $this.find('select option:selected'),
|
8 |
-
colors = selected.data('colors');
|
9 |
-
|
10 |
-
var radioName = radioControlsWrap.data('radio-name');
|
11 |
-
|
12 |
-
if( !radioName || !colors ) {
|
13 |
-
//$this.fadeOut();
|
14 |
-
return;
|
15 |
-
}
|
16 |
-
|
17 |
-
radioControlsWrap.html('');
|
18 |
-
|
19 |
-
for( var i = 0; i < colors.length; i++ ) {
|
20 |
-
var colorItem = colors[i];
|
21 |
-
|
22 |
-
var radioItem = $('<span class="factory-form-radio-item">' +
|
23 |
-
'<label class="factory-from-radio-label">' +
|
24 |
-
'<input type="radio" name="' + radioName + '" class="factory-radio-color" value="' + colorItem[0] + '" checked="checked">' +
|
25 |
-
'<span style="background-color:' + colorItem[1] + '"></span>' +
|
26 |
-
'</label></span>');
|
27 |
-
|
28 |
-
radioControlsWrap.append(radioItem);
|
29 |
-
}
|
30 |
-
});
|
31 |
-
};
|
32 |
-
|
33 |
-
$.fn.factoryBootstrap330_dropdownAndColors = function(option) {
|
34 |
-
// call an method
|
35 |
-
if( typeof option === "string" ) {
|
36 |
-
var data = $(this).data('factory.dropdownAndColors.control');
|
37 |
-
if( !data ) {
|
38 |
-
return null;
|
39 |
-
}
|
40 |
-
return data[option]();
|
41 |
-
}
|
42 |
-
|
43 |
-
// creating an object
|
44 |
-
else {
|
45 |
-
return this.each(function() {
|
46 |
-
var $this = $(this);
|
47 |
-
var data = $this.data('factory.dropdownAndColors.control');
|
48 |
-
if( !data ) {
|
49 |
-
$this.data('factory.dropdownAndColors.control', (data = new dropdownAndColors(this)));
|
50 |
-
}
|
51 |
-
});
|
52 |
-
}
|
53 |
-
};
|
54 |
-
|
55 |
-
$.fn.factoryBootstrap330_dropdownAndColors.Constructor = dropdownAndColors;
|
56 |
-
|
57 |
-
$(function() {
|
58 |
-
$(".factory-bootstrap-330 .factory-dropdown-and-colors").factoryBootstrap330_dropdownAndColors();
|
59 |
-
});
|
60 |
-
|
61 |
-
}(jQuery) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/control.fonts.js
DELETED
@@ -1,196 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Font Control
|
3 |
-
*
|
4 |
-
* @author Paul Kashtanoff <paul@byonepress.com>
|
5 |
-
* @copyright (c) 2013-2014, OnePress Ltd
|
6 |
-
*
|
7 |
-
* @package factory-forms
|
8 |
-
* @since 3.1.0
|
9 |
-
*/
|
10 |
-
;( function( $ ){
|
11 |
-
|
12 |
-
$.widget( "factoryBootstrap330.fontControl", {
|
13 |
-
|
14 |
-
_create: function() {
|
15 |
-
|
16 |
-
this.$element = this.element;
|
17 |
-
|
18 |
-
this.$family = this.$element.find(".factory-family-wrap select");
|
19 |
-
this.$googleFontData = this.$element.find(".factory-google-font-data");
|
20 |
-
|
21 |
-
this.fontSelectorName = this.$family.attr('name');
|
22 |
-
|
23 |
-
this.googleFontsOptions = {
|
24 |
-
frameName: this.element.data('google-fonts-frame-name')
|
25 |
-
};
|
26 |
-
|
27 |
-
if ( !this.googleFontsOptions.frameName )
|
28 |
-
this.googleFontsOptions.frameName = 'preview';
|
29 |
-
|
30 |
-
this._initUI();
|
31 |
-
this._bindEvents();
|
32 |
-
},
|
33 |
-
|
34 |
-
_initUI: function() {
|
35 |
-
this.$family.chosen();
|
36 |
-
},
|
37 |
-
|
38 |
-
_bindEvents: function() {
|
39 |
-
var self = this;
|
40 |
-
|
41 |
-
this.$family.change(function( data ){
|
42 |
-
var $option = self._getCurrentOption();
|
43 |
-
var isGoogleFont = $option.data('google-font');
|
44 |
-
|
45 |
-
if ( isGoogleFont ) {
|
46 |
-
|
47 |
-
var family = $option.data('family');
|
48 |
-
var variants = $option.data('variants').split(',');
|
49 |
-
var subsets = $option.data('subsets').split(',');
|
50 |
-
|
51 |
-
self._loadGoogleFont( family, variants, subsets );
|
52 |
-
} else {
|
53 |
-
self.$googleFontData.val("");
|
54 |
-
}
|
55 |
-
});
|
56 |
-
},
|
57 |
-
|
58 |
-
_getCurrentOption: function() {
|
59 |
-
var value = this.$family.val();
|
60 |
-
return this._getOptionByValue( value );
|
61 |
-
},
|
62 |
-
|
63 |
-
_getOptionByValue: function( value ) {
|
64 |
-
var $option = this.$family.find("option[value='" + value + "']");
|
65 |
-
return $option;
|
66 |
-
},
|
67 |
-
|
68 |
-
_loadGoogleFont: function( family, variants, subsets ) {
|
69 |
-
|
70 |
-
// these filters allow extrenal apps to manage which variants
|
71 |
-
// and subsets have to be laoded and which should be skipped
|
72 |
-
|
73 |
-
var variants = this._filterGoogleFontVariantsBeforeLoading( family, variants, subsets );
|
74 |
-
var subsets = this._filterGoogleFontSubsetsBeforeLoading( family, variants, subsets );
|
75 |
-
|
76 |
-
this.$googleFontData.val(this._encode64(JSON.stringify({
|
77 |
-
name: family,
|
78 |
-
styles: variants,
|
79 |
-
subsets: subsets
|
80 |
-
})));
|
81 |
-
|
82 |
-
// the target is a place (current window or an iframe)
|
83 |
-
// where the font should be loaded
|
84 |
-
|
85 |
-
var $target = this._getTargetToLoadGoogleFont();
|
86 |
-
|
87 |
-
// the id is used to prevent loading multiple
|
88 |
-
// fonts for a single font control
|
89 |
-
|
90 |
-
var linkId = this.fontSelectorName + "-font-loader";
|
91 |
-
|
92 |
-
// removes the previous link with the same id
|
93 |
-
|
94 |
-
var $link = $target.find('#' + linkId);
|
95 |
-
if ( $target.find('#' + linkId).length > 0 ) {
|
96 |
-
$link.remove();
|
97 |
-
}
|
98 |
-
|
99 |
-
// builds an URL for loading the font
|
100 |
-
|
101 |
-
var url = 'http://fonts.googleapis.com/css';
|
102 |
-
|
103 |
-
if ( variants && variants.length ) family = family + ":" + variants.join(",");
|
104 |
-
url = url + '?family=' + family;
|
105 |
-
|
106 |
-
if ( subsets && subsets.length ) url = url + '&subset=' + subsets.join(",");
|
107 |
-
|
108 |
-
$('<link id="' + linkId + '" rel="stylesheet" type="text/css" href="' + url + '" >').appendTo( $target );
|
109 |
-
},
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Calls external filters to modify the list of the google font variants to be loaded.
|
113 |
-
* @since 3.2.8
|
114 |
-
*/
|
115 |
-
_filterGoogleFontVariantsBeforeLoading: function( family, variants, subsets ) {
|
116 |
-
var self = this;
|
117 |
-
$(document).trigger('factory-filter-google-font-variants', [variants, self.$element, family, subsets]);
|
118 |
-
return variants;
|
119 |
-
},
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Calls external filters to modify the list of the google font subsets to be loaded.
|
123 |
-
* @since 3.2.8
|
124 |
-
*/
|
125 |
-
_filterGoogleFontSubsetsBeforeLoading: function( family, variants, subsets ) {
|
126 |
-
var self = this;
|
127 |
-
$(document).trigger('factory-filter-google-font-subsets', [subsets, self.$element, variants, subsets]);
|
128 |
-
return subsets;
|
129 |
-
},
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Returns a target element where the google font link element should be appended.
|
133 |
-
* @since 3.2.8
|
134 |
-
*/
|
135 |
-
_getTargetToLoadGoogleFont: function() {
|
136 |
-
|
137 |
-
var frameName = this.googleFontsOptions.frameName;
|
138 |
-
var $target = $('head');
|
139 |
-
|
140 |
-
if ( frameName ) {
|
141 |
-
|
142 |
-
var $frame = $('iframe[name="' + frameName + '"]');
|
143 |
-
if ( $frame.length === 0 ) return console.error('The preview container not found.');
|
144 |
-
|
145 |
-
$target = $frame.contents().find('head');
|
146 |
-
}
|
147 |
-
|
148 |
-
return $target;
|
149 |
-
},
|
150 |
-
|
151 |
-
_base64KeyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
152 |
-
|
153 |
-
_encode64: function(input) {
|
154 |
-
input = escape(input);
|
155 |
-
var output = "";
|
156 |
-
var chr1, chr2, chr3 = "";
|
157 |
-
var enc1, enc2, enc3, enc4 = "";
|
158 |
-
var i = 0;
|
159 |
-
|
160 |
-
do {
|
161 |
-
chr1 = input.charCodeAt(i++);
|
162 |
-
chr2 = input.charCodeAt(i++);
|
163 |
-
chr3 = input.charCodeAt(i++);
|
164 |
-
|
165 |
-
enc1 = chr1 >> 2;
|
166 |
-
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
167 |
-
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
168 |
-
enc4 = chr3 & 63;
|
169 |
-
|
170 |
-
if (isNaN(chr2)) {
|
171 |
-
enc3 = enc4 = 64;
|
172 |
-
} else if (isNaN(chr3)) {
|
173 |
-
enc4 = 64;
|
174 |
-
}
|
175 |
-
|
176 |
-
output = output +
|
177 |
-
this._base64KeyStr.charAt(enc1) +
|
178 |
-
this._base64KeyStr.charAt(enc2) +
|
179 |
-
this._base64KeyStr.charAt(enc3) +
|
180 |
-
this._base64KeyStr.charAt(enc4);
|
181 |
-
|
182 |
-
chr1 = chr2 = chr3 = "";
|
183 |
-
enc1 = enc2 = enc3 = enc4 = "";
|
184 |
-
|
185 |
-
} while (i < input.length);
|
186 |
-
|
187 |
-
return output;
|
188 |
-
}
|
189 |
-
});
|
190 |
-
|
191 |
-
$(function(){
|
192 |
-
$.widget.bridge( "factoryBootstrap330_fontControl", $.factoryBootstrap330.fontControl );
|
193 |
-
$(".factory-bootstrap-330 .factory-font").factoryBootstrap330_fontControl({});
|
194 |
-
});
|
195 |
-
|
196 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/control.gradient.js
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
( function( $ ){
|
2 |
-
|
3 |
-
// GRADIENT CONTROL CLASS DEFINITION
|
4 |
-
// ================================
|
5 |
-
|
6 |
-
var GradientControl = function (el) {
|
7 |
-
this.$element = $(el);
|
8 |
-
this.$picker = this.$element.find(".factory-gradient-picker");
|
9 |
-
this.$result = this.$element.find(".factory-result");
|
10 |
-
|
11 |
-
this.init();
|
12 |
-
};
|
13 |
-
|
14 |
-
GradientControl.prototype.init = function() {
|
15 |
-
var self = this;
|
16 |
-
|
17 |
-
var directions = this.$element.data('directions');
|
18 |
-
var points = this.$element.data('points');
|
19 |
-
var arrPoints = points ? points.split(',') : [];
|
20 |
-
|
21 |
-
this.$picker.gradientPicker({
|
22 |
-
change: function(points, styles) {
|
23 |
-
self.$result.val(styles).trigger('keyup');
|
24 |
-
},
|
25 |
-
fillDirection: directions,
|
26 |
-
controlPoints: arrPoints
|
27 |
-
});
|
28 |
-
};
|
29 |
-
|
30 |
-
// GRADIENT CONTROL DEFINITION
|
31 |
-
// ================================
|
32 |
-
|
33 |
-
$.fn.factoryBootstrap330_gradientControl = function (option) {
|
34 |
-
return this.each(function () {
|
35 |
-
var $this = $(this);
|
36 |
-
var data = $this.data('factory.gradient-control');
|
37 |
-
if (!data) $this.data('factory.gradient-control', (data = new GradientControl(this)));
|
38 |
-
if (typeof option === 'string') data[option].call(data);
|
39 |
-
});
|
40 |
-
};
|
41 |
-
|
42 |
-
$.fn.factoryBootstrap330_gradientControl.Constructor = GradientControl;
|
43 |
-
|
44 |
-
// GRADIENT CREATING
|
45 |
-
// ================================
|
46 |
-
|
47 |
-
$(function(){
|
48 |
-
$(".factory-bootstrap-330 .factory-gradient").factoryBootstrap330_gradientControl();
|
49 |
-
});
|
50 |
-
|
51 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/control.integer.js
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
( function( $ ){
|
2 |
-
|
3 |
-
// INTEGER CONTROL CLASS DEFINITION
|
4 |
-
// ================================
|
5 |
-
|
6 |
-
var IntegerControl = function (el) {
|
7 |
-
this.$element = $(el);
|
8 |
-
|
9 |
-
if ( this.$element.hasClass('factory-has-slider') ) {
|
10 |
-
this.createSlider();
|
11 |
-
}
|
12 |
-
};
|
13 |
-
|
14 |
-
IntegerControl.prototype.createSlider = function() {
|
15 |
-
var self = this;
|
16 |
-
|
17 |
-
var $container = this.$element.find(".factory-slider-container");
|
18 |
-
this.$bar = $container.find(".factory-bar");
|
19 |
-
|
20 |
-
this.$result = $container.find(".factory-result");
|
21 |
-
this.$visibleValue = $container.find(".factory-visible-value");
|
22 |
-
|
23 |
-
this.units = $container.data('units');
|
24 |
-
this.rangeStart = $container.data('range-start');
|
25 |
-
this.rangeEnd = $container.data('range-end');
|
26 |
-
this.step = $container.data('step');
|
27 |
-
if ( !this.step ) this.step = 1;
|
28 |
-
|
29 |
-
var value = this.$result.val();
|
30 |
-
|
31 |
-
var setValue = function( value ) {
|
32 |
-
self.setValue( value );
|
33 |
-
}
|
34 |
-
|
35 |
-
this.$bar.noUiSlider({
|
36 |
-
start: parseInt( value ),
|
37 |
-
range: {min: self.rangeStart, max: self.rangeEnd},
|
38 |
-
connect: "lower",
|
39 |
-
step: self.step
|
40 |
-
});
|
41 |
-
|
42 |
-
this.$bar.on("slide set", function(){
|
43 |
-
self.setValue( parseInt( self.$bar.val() ) );
|
44 |
-
});
|
45 |
-
};
|
46 |
-
|
47 |
-
IntegerControl.prototype.setValue = function ( value, force) {
|
48 |
-
this.$result.val( value );
|
49 |
-
|
50 |
-
if ( this.$visibleValue.length > 0 ) {
|
51 |
-
if ( this.units ) this.$visibleValue.text(value + this.units);
|
52 |
-
else this.$visibleValue.text(value);
|
53 |
-
}
|
54 |
-
|
55 |
-
if ( force ) {
|
56 |
-
this.$bar.noUiSlider({ start: value }, true);
|
57 |
-
}
|
58 |
-
|
59 |
-
this.$result.trigger('keyup');
|
60 |
-
this.$element.trigger('change');
|
61 |
-
};
|
62 |
-
|
63 |
-
IntegerControl.prototype.getValue = function () {
|
64 |
-
return this.$result.val();
|
65 |
-
};
|
66 |
-
|
67 |
-
IntegerControl.prototype.api = function () {
|
68 |
-
return this;
|
69 |
-
};
|
70 |
-
|
71 |
-
// INTEGER CONTROL DEFINITION
|
72 |
-
// ================================
|
73 |
-
|
74 |
-
$.fn.factoryBootstrap330_integerControl = function (option) {
|
75 |
-
|
76 |
-
// call an method
|
77 |
-
if ( typeof option === "string" ) {
|
78 |
-
var data = $(this).data('factory.integer-control');
|
79 |
-
if ( !data ) return null;
|
80 |
-
return data[option]();
|
81 |
-
}
|
82 |
-
|
83 |
-
// creating an object
|
84 |
-
else {
|
85 |
-
return this.each(function () {
|
86 |
-
var $this = $(this);
|
87 |
-
var data = $this.data('factory.integer-control');
|
88 |
-
if (!data) $this.data('factory.integer-control', (data = new IntegerControl(this)));
|
89 |
-
});
|
90 |
-
}
|
91 |
-
};
|
92 |
-
|
93 |
-
$.fn.factoryBootstrap330_integerControl.Constructor = IntegerControl;
|
94 |
-
|
95 |
-
// AUTO CREATING
|
96 |
-
// ================================
|
97 |
-
|
98 |
-
$(function(){
|
99 |
-
$(".factory-bootstrap-330 .factory-integer").factoryBootstrap330_integerControl();
|
100 |
-
});
|
101 |
-
|
102 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/control.multiple-textbox.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Control multiple textbox
|
3 |
+
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
4 |
+
* @copyright (c) 22.11.2017, Webcraftic
|
5 |
+
* @version 1.0
|
6 |
+
*/
|
7 |
+
|
8 |
+
|
9 |
+
(function($) {
|
10 |
+
'use strict';
|
11 |
+
|
12 |
+
var multipleControl = function(element) {
|
13 |
+
var self = this;
|
14 |
+
this.$element = $(element);
|
15 |
+
|
16 |
+
var prototype = $('.factory-mtextbox-item', this.$element).eq(0).clone(true);
|
17 |
+
|
18 |
+
$('.factory-mtextbox-add-item', this.$element).on('click', function() {
|
19 |
+
var contanier = $(this).closest('.factory-multiple-textbox-group').find('.factory-mtextbox-items');
|
20 |
+
var element = prototype.clone(true);
|
21 |
+
var removeButton = $('<button class="btn btn-default btn-small factory-mtextbox-remove-item"><i class="fa fa-times" aria-hidden="true"></i></button>');
|
22 |
+
contanier.append(element.append(removeButton));
|
23 |
+
element.find('input[type="text"]').val('').focus();
|
24 |
+
return false;
|
25 |
+
});
|
26 |
+
|
27 |
+
$(document).on('click', '.factory-mtextbox-remove-item', function() {
|
28 |
+
$(this).closest('.factory-mtextbox-item').remove();
|
29 |
+
return false;
|
30 |
+
});
|
31 |
+
};
|
32 |
+
|
33 |
+
$.fn.factoryBootstrap330_MultipleTextboxControl = function() {
|
34 |
+
return this.each(function() {
|
35 |
+
new multipleControl(this);
|
36 |
+
});
|
37 |
+
};
|
38 |
+
|
39 |
+
$(function() {
|
40 |
+
$(".factory-bootstrap-330 .factory-multiple-textbox-group").factoryBootstrap330_MultipleTextboxControl();
|
41 |
+
});
|
42 |
+
|
43 |
+
})(jQuery);
|
libs/factory/bootstrap/assets/js/control.pattern.js
DELETED
@@ -1,218 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Pattern Control
|
3 |
-
*
|
4 |
-
* @author Alex Kovalev <alex@byonepress.com>
|
5 |
-
* @author Paul Kashtanoff <paul@byonepress.com>
|
6 |
-
* @copyright (c) 2013-2014, OnePress Ltd
|
7 |
-
*
|
8 |
-
* @package factory-forms
|
9 |
-
* @since 3.1.0
|
10 |
-
*/
|
11 |
-
;( function( $ ){
|
12 |
-
|
13 |
-
$.widget( "factoryBootstrap330.patternControl", {
|
14 |
-
|
15 |
-
_create: function() {
|
16 |
-
|
17 |
-
this.$element = this.element;
|
18 |
-
this.$preview = this.$element.find(".factory-preview");
|
19 |
-
|
20 |
-
this.$patternResult = this.$element.find(".factory-pattern-result");
|
21 |
-
this.$colorResult = this.$element.find(".factory-color-result");
|
22 |
-
|
23 |
-
this.$patterns = this.$element.find(".factory-patterns-panel");
|
24 |
-
this.$patternItems = this.$element.find(".factory-patterns-item");
|
25 |
-
|
26 |
-
this.$btnUpload = this.$element.find(".factory-upload-btn");
|
27 |
-
|
28 |
-
this.$btnChangeColor = this.$element.find(".factory-change-color-btn");
|
29 |
-
this.$colorPanel = this.$element.find(".factory-color-panel");
|
30 |
-
this.$colorContol = this.$element.find(".factory-color");
|
31 |
-
|
32 |
-
this._initMainPanel();
|
33 |
-
this._initColorPickerPanel();
|
34 |
-
this._initPatternsPanel();
|
35 |
-
},
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Inits the Main Panel with the dropdown and buttons.
|
39 |
-
*
|
40 |
-
* @since 3.1.0
|
41 |
-
* @return void
|
42 |
-
*/
|
43 |
-
_initMainPanel: function( ) {
|
44 |
-
var self = this;
|
45 |
-
|
46 |
-
// a click on a preview opens the patterns panel
|
47 |
-
|
48 |
-
this.$preview.on('click', function(){
|
49 |
-
|
50 |
-
self.togglePatternsPanel();
|
51 |
-
return false;
|
52 |
-
});
|
53 |
-
|
54 |
-
// the button showing the panel to a pattern change color
|
55 |
-
|
56 |
-
this.$btnChangeColor.on('click', function(){
|
57 |
-
|
58 |
-
self.toggleColorPanel();
|
59 |
-
return false;
|
60 |
-
});
|
61 |
-
},
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Toggles the panel with which the user can choose another color for a pattern.
|
65 |
-
*
|
66 |
-
* @since 3.1.0
|
67 |
-
* @returns void
|
68 |
-
*/
|
69 |
-
togglePatternsPanel: function() {
|
70 |
-
|
71 |
-
if ( this.$element.hasClass('factory-patterns-panel-active') ) this.hidePatternsPanel();
|
72 |
-
else this.showPatternsPanel();
|
73 |
-
},
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Hides the panel with which the user can choose another color for a pattern.
|
77 |
-
*
|
78 |
-
* @since 3.1.0
|
79 |
-
* @returns void
|
80 |
-
*/
|
81 |
-
hidePatternsPanel: function() {
|
82 |
-
|
83 |
-
this.$element.removeClass('factory-patterns-panel-active');
|
84 |
-
},
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Shows the panel with which the user can choose another color for a pattern.
|
88 |
-
*
|
89 |
-
* @since 3.1.0
|
90 |
-
* @returns void
|
91 |
-
*/
|
92 |
-
showPatternsPanel: function() {
|
93 |
-
|
94 |
-
this.$element.addClass('factory-patterns-panel-active');
|
95 |
-
},
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Returns true if the pattern has the color options set.
|
99 |
-
*
|
100 |
-
* @since 3.1.0
|
101 |
-
* @returns bool
|
102 |
-
*/
|
103 |
-
hasColor: function() {
|
104 |
-
|
105 |
-
return this.$element.hasClass('factory-color-panel-active');
|
106 |
-
},
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Toggles the panel with which the user can choose another color for a pattern.
|
110 |
-
*
|
111 |
-
* @since 3.1.0
|
112 |
-
* @returns void
|
113 |
-
*/
|
114 |
-
toggleColorPanel: function() {
|
115 |
-
|
116 |
-
if ( this.hasColor() ) this.hideColorPanel();
|
117 |
-
else this.showColorPanel();
|
118 |
-
},
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Hides the panel with which the user can choose another color for a pattern.
|
122 |
-
*
|
123 |
-
* @since 3.1.0
|
124 |
-
* @returns void
|
125 |
-
*/
|
126 |
-
hideColorPanel: function() {
|
127 |
-
|
128 |
-
this.$element.removeClass('factory-color-panel-active');
|
129 |
-
this.$btnChangeColor.removeClass('button-active');
|
130 |
-
this.$colorResult.val('');
|
131 |
-
this.$colorResult.trigger('change');
|
132 |
-
this.$element.trigger('change');
|
133 |
-
},
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Shows the panel with which the user can choose another color for a pattern.
|
137 |
-
*
|
138 |
-
* @since 3.1.0
|
139 |
-
* @returns void
|
140 |
-
*/
|
141 |
-
showColorPanel: function() {
|
142 |
-
|
143 |
-
this.$element.addClass('factory-color-panel-active');
|
144 |
-
this.$btnChangeColor.addClass('button-active');
|
145 |
-
this.$colorResult.val( this.$colorContol.factoryBootstrap330_colorControl('getValue') );
|
146 |
-
this.$colorResult.trigger('change');
|
147 |
-
this.$element.trigger('change');
|
148 |
-
},
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Inits the Color Picker panel.
|
152 |
-
*
|
153 |
-
* @since 3.1.0
|
154 |
-
* @return void
|
155 |
-
*/
|
156 |
-
_initColorPickerPanel: function() {
|
157 |
-
var self = this;
|
158 |
-
|
159 |
-
this.$colorContol.bind('updated.color.factory', function( e, color ){
|
160 |
-
self.$colorResult.val( color );
|
161 |
-
return false;
|
162 |
-
});
|
163 |
-
},
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Inits the Patterns Panel.
|
167 |
-
*
|
168 |
-
* @since 3.1.0
|
169 |
-
* @return void
|
170 |
-
*/
|
171 |
-
_initPatternsPanel: function() {
|
172 |
-
var self = this;
|
173 |
-
|
174 |
-
// the upload button
|
175 |
-
|
176 |
-
var _custom_media = true,
|
177 |
-
_orig_send_attachment = wp.media.editor.send.attachment;
|
178 |
-
|
179 |
-
this.$btnUpload.on('click', function(){
|
180 |
-
|
181 |
-
_custom_media = true;
|
182 |
-
wp.media.editor.send.attachment = function(props, attachment){
|
183 |
-
if ( _custom_media ) {
|
184 |
-
self.$preview.css({background:'url('+attachment.url+') repeat', border:'0', fontSize:'0'});
|
185 |
-
self.$patternResult.attr('value', attachment.url).trigger('change');
|
186 |
-
} else {
|
187 |
-
return _orig_send_attachment.apply( this, [props, attachment] );
|
188 |
-
};
|
189 |
-
}
|
190 |
-
|
191 |
-
wp.media.editor.open( self.$btnUpload );
|
192 |
-
$('.add_media').on('click', function(){
|
193 |
-
_custom_media = false;
|
194 |
-
});
|
195 |
-
|
196 |
-
return false;
|
197 |
-
});
|
198 |
-
|
199 |
-
// selecting a pattern
|
200 |
-
|
201 |
-
this.$patternItems.on('click', function(){
|
202 |
-
|
203 |
-
if( $(this).data('pattern') ) {
|
204 |
-
var puthImage = $(this).data('pattern');
|
205 |
-
self.$preview.removeClass('factory-empty');
|
206 |
-
self.$preview.css({ background: 'url('+puthImage+') repeat' });
|
207 |
-
self.$patternResult.attr('value', puthImage).trigger('change');
|
208 |
-
}
|
209 |
-
});
|
210 |
-
}
|
211 |
-
});
|
212 |
-
|
213 |
-
$(function(){
|
214 |
-
$.widget.bridge( "factoryBootstrap330_patternControl", $.factoryBootstrap330.patternControl );
|
215 |
-
$(".factory-bootstrap-330 .factory-pattern").factoryBootstrap330_patternControl({});
|
216 |
-
});
|
217 |
-
|
218 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/global.color-functions.js
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Конвертирует hex в rgb
|
3 |
-
*/
|
4 |
-
function hexToRgb(hex) {
|
5 |
-
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
6 |
-
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
7 |
-
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
|
8 |
-
return r + r + g + g + b + b;
|
9 |
-
});
|
10 |
-
|
11 |
-
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
12 |
-
return result ? {
|
13 |
-
r: parseInt(result[1], 16),
|
14 |
-
g: parseInt(result[2], 16),
|
15 |
-
b: parseInt(result[3], 16)
|
16 |
-
} : null;
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Конвертирует rgb в hex
|
21 |
-
*/
|
22 |
-
function rgb2hex(rgb){
|
23 |
-
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
24 |
-
return "#" +
|
25 |
-
("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
|
26 |
-
("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +
|
27 |
-
("0" + parseInt(rgb[3],10).toString(16)).slice(-2);
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/holder.conrol-group.js
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
*jQuery Control group holder
|
3 |
-
*/
|
4 |
-
(function( $ ) {
|
5 |
-
$(document).ready(function(){
|
6 |
-
$('.factory-control-group-nav-label').on('click', function(){
|
7 |
-
var parent = $(this).parents('.factory-control-group');
|
8 |
-
|
9 |
-
if( !$(this).hasClass('active') ) {
|
10 |
-
$('.factory-control-group-nav-label', parent).add('.factory-control-group-item', parent).removeClass('current');
|
11 |
-
$('.factory-control-is-active', parent).val(0);
|
12 |
-
|
13 |
-
$(this).add($("." + $(this).data('control-id'), parent)).addClass('current');
|
14 |
-
parent.children('input[type="hidden"]').val($(this).data('control-name')).trigger('change');
|
15 |
-
$('.factory-control-is-active', $("." + $(this).data('control-id'), parent)).val(1);
|
16 |
-
}
|
17 |
-
return false;
|
18 |
-
});
|
19 |
-
});
|
20 |
-
}(jQuery));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/holder.more-link.js
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Factory More Link
|
3 |
-
*/
|
4 |
-
|
5 |
-
;(function ( $, window, document, undefined ) {
|
6 |
-
"use strict"; // jshint ;_;
|
7 |
-
|
8 |
-
var pluginName = 'factoryBootstrap330_moreLink';
|
9 |
-
|
10 |
-
$.fn[pluginName] = function ( param1, param2 ) {
|
11 |
-
|
12 |
-
return this.each(function () {
|
13 |
-
var $this = $(this);
|
14 |
-
|
15 |
-
$this.find(".factory-more-link-show").click(function(){
|
16 |
-
$( $(this).attr('href') ).fadeIn();
|
17 |
-
$(this).hide();
|
18 |
-
return false;
|
19 |
-
});
|
20 |
-
|
21 |
-
$this.find(".factory-more-link-hide").click(function(){
|
22 |
-
var content = $( $(this).attr('href') );
|
23 |
-
content.fadeOut(300, function(){
|
24 |
-
content.parents(".factory-more-link").find(".factory-more-link-show").show();
|
25 |
-
});
|
26 |
-
return false;
|
27 |
-
});
|
28 |
-
});
|
29 |
-
};
|
30 |
-
|
31 |
-
// auto init
|
32 |
-
|
33 |
-
$(function(){
|
34 |
-
$('.factory-bootstrap-330 .factory-more-link').factoryBootstrap330_moreLink();
|
35 |
-
});
|
36 |
-
|
37 |
-
})( jQuery, window, document );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/plugin.chosen.js
DELETED
@@ -1,1211 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
Chosen, a Select Box Enhancer for jQuery and Prototype
|
3 |
-
by Patrick Filler for Harvest, http://getharvest.com
|
4 |
-
|
5 |
-
Version 1.1.0
|
6 |
-
Full source at https://github.com/harvesthq/chosen
|
7 |
-
Copyright (c) 2011 Harvest http://getharvest.com
|
8 |
-
|
9 |
-
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
10 |
-
This file is generated by `grunt build`, do not edit it by hand.
|
11 |
-
*/
|
12 |
-
|
13 |
-
(function() {
|
14 |
-
var $, AbstractChosen, Chosen, SelectParser, _ref,
|
15 |
-
__hasProp = {}.hasOwnProperty,
|
16 |
-
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
17 |
-
|
18 |
-
SelectParser = (function() {
|
19 |
-
function SelectParser() {
|
20 |
-
this.options_index = 0;
|
21 |
-
this.parsed = [];
|
22 |
-
}
|
23 |
-
|
24 |
-
SelectParser.prototype.add_node = function(child) {
|
25 |
-
if (child.nodeName.toUpperCase() === "OPTGROUP") {
|
26 |
-
return this.add_group(child);
|
27 |
-
} else {
|
28 |
-
return this.add_option(child);
|
29 |
-
}
|
30 |
-
};
|
31 |
-
|
32 |
-
SelectParser.prototype.add_group = function(group) {
|
33 |
-
var group_position, option, _i, _len, _ref, _results;
|
34 |
-
group_position = this.parsed.length;
|
35 |
-
this.parsed.push({
|
36 |
-
array_index: group_position,
|
37 |
-
group: true,
|
38 |
-
label: this.escapeExpression(group.label),
|
39 |
-
children: 0,
|
40 |
-
disabled: group.disabled
|
41 |
-
});
|
42 |
-
_ref = group.childNodes;
|
43 |
-
_results = [];
|
44 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
45 |
-
option = _ref[_i];
|
46 |
-
_results.push(this.add_option(option, group_position, group.disabled));
|
47 |
-
}
|
48 |
-
return _results;
|
49 |
-
};
|
50 |
-
|
51 |
-
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
52 |
-
if (option.nodeName.toUpperCase() === "OPTION") {
|
53 |
-
if (option.text !== "") {
|
54 |
-
if (group_position != null) {
|
55 |
-
this.parsed[group_position].children += 1;
|
56 |
-
}
|
57 |
-
this.parsed.push({
|
58 |
-
array_index: this.parsed.length,
|
59 |
-
options_index: this.options_index,
|
60 |
-
value: option.value,
|
61 |
-
text: option.text,
|
62 |
-
html: option.innerHTML,
|
63 |
-
selected: option.selected,
|
64 |
-
disabled: group_disabled === true ? group_disabled : option.disabled,
|
65 |
-
group_array_index: group_position,
|
66 |
-
classes: option.className,
|
67 |
-
style: option.style.cssText
|
68 |
-
});
|
69 |
-
} else {
|
70 |
-
this.parsed.push({
|
71 |
-
array_index: this.parsed.length,
|
72 |
-
options_index: this.options_index,
|
73 |
-
empty: true
|
74 |
-
});
|
75 |
-
}
|
76 |
-
return this.options_index += 1;
|
77 |
-
}
|
78 |
-
};
|
79 |
-
|
80 |
-
SelectParser.prototype.escapeExpression = function(text) {
|
81 |
-
var map, unsafe_chars;
|
82 |
-
if ((text == null) || text === false) {
|
83 |
-
return "";
|
84 |
-
}
|
85 |
-
if (!/[\&\<\>\"\'\`]/.test(text)) {
|
86 |
-
return text;
|
87 |
-
}
|
88 |
-
map = {
|
89 |
-
"<": "<",
|
90 |
-
">": ">",
|
91 |
-
'"': """,
|
92 |
-
"'": "'",
|
93 |
-
"`": "`"
|
94 |
-
};
|
95 |
-
unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
|
96 |
-
return text.replace(unsafe_chars, function(chr) {
|
97 |
-
return map[chr] || "&";
|
98 |
-
});
|
99 |
-
};
|
100 |
-
|
101 |
-
return SelectParser;
|
102 |
-
|
103 |
-
})();
|
104 |
-
|
105 |
-
SelectParser.select_to_array = function(select) {
|
106 |
-
var child, parser, _i, _len, _ref;
|
107 |
-
parser = new SelectParser();
|
108 |
-
_ref = select.childNodes;
|
109 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
110 |
-
child = _ref[_i];
|
111 |
-
parser.add_node(child);
|
112 |
-
}
|
113 |
-
return parser.parsed;
|
114 |
-
};
|
115 |
-
|
116 |
-
AbstractChosen = (function() {
|
117 |
-
function AbstractChosen(form_field, options) {
|
118 |
-
this.form_field = form_field;
|
119 |
-
this.options = options != null ? options : {};
|
120 |
-
if (!AbstractChosen.browser_is_supported()) {
|
121 |
-
return;
|
122 |
-
}
|
123 |
-
this.is_multiple = this.form_field.multiple;
|
124 |
-
this.set_default_text();
|
125 |
-
this.set_default_values();
|
126 |
-
this.setup();
|
127 |
-
this.set_up_html();
|
128 |
-
this.register_observers();
|
129 |
-
}
|
130 |
-
|
131 |
-
AbstractChosen.prototype.set_default_values = function() {
|
132 |
-
var _this = this;
|
133 |
-
this.click_test_action = function(evt) {
|
134 |
-
return _this.test_active_click(evt);
|
135 |
-
};
|
136 |
-
this.activate_action = function(evt) {
|
137 |
-
return _this.activate_field(evt);
|
138 |
-
};
|
139 |
-
this.active_field = false;
|
140 |
-
this.mouse_on_container = false;
|
141 |
-
this.results_showing = false;
|
142 |
-
this.result_highlighted = null;
|
143 |
-
this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
144 |
-
this.disable_search_threshold = this.options.disable_search_threshold || 0;
|
145 |
-
this.disable_search = this.options.disable_search || false;
|
146 |
-
this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
|
147 |
-
this.group_search = this.options.group_search != null ? this.options.group_search : true;
|
148 |
-
this.search_contains = this.options.search_contains || false;
|
149 |
-
this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
|
150 |
-
this.max_selected_options = this.options.max_selected_options || Infinity;
|
151 |
-
this.inherit_select_classes = this.options.inherit_select_classes || false;
|
152 |
-
this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
|
153 |
-
return this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
|
154 |
-
};
|
155 |
-
|
156 |
-
AbstractChosen.prototype.set_default_text = function() {
|
157 |
-
if (this.form_field.getAttribute("data-placeholder")) {
|
158 |
-
this.default_text = this.form_field.getAttribute("data-placeholder");
|
159 |
-
} else if (this.is_multiple) {
|
160 |
-
this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
|
161 |
-
} else {
|
162 |
-
this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
|
163 |
-
}
|
164 |
-
return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
|
165 |
-
};
|
166 |
-
|
167 |
-
AbstractChosen.prototype.mouse_enter = function() {
|
168 |
-
return this.mouse_on_container = true;
|
169 |
-
};
|
170 |
-
|
171 |
-
AbstractChosen.prototype.mouse_leave = function() {
|
172 |
-
return this.mouse_on_container = false;
|
173 |
-
};
|
174 |
-
|
175 |
-
AbstractChosen.prototype.input_focus = function(evt) {
|
176 |
-
var _this = this;
|
177 |
-
if (this.is_multiple) {
|
178 |
-
if (!this.active_field) {
|
179 |
-
return setTimeout((function() {
|
180 |
-
return _this.container_mousedown();
|
181 |
-
}), 50);
|
182 |
-
}
|
183 |
-
} else {
|
184 |
-
if (!this.active_field) {
|
185 |
-
return this.activate_field();
|
186 |
-
}
|
187 |
-
}
|
188 |
-
};
|
189 |
-
|
190 |
-
AbstractChosen.prototype.input_blur = function(evt) {
|
191 |
-
var _this = this;
|
192 |
-
if (!this.mouse_on_container) {
|
193 |
-
this.active_field = false;
|
194 |
-
return setTimeout((function() {
|
195 |
-
return _this.blur_test();
|
196 |
-
}), 100);
|
197 |
-
}
|
198 |
-
};
|
199 |
-
|
200 |
-
AbstractChosen.prototype.results_option_build = function(options) {
|
201 |
-
var content, data, _i, _len, _ref;
|
202 |
-
content = '';
|
203 |
-
_ref = this.results_data;
|
204 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
205 |
-
data = _ref[_i];
|
206 |
-
if (data.group) {
|
207 |
-
content += this.result_add_group(data);
|
208 |
-
} else {
|
209 |
-
content += this.result_add_option(data);
|
210 |
-
}
|
211 |
-
if (options != null ? options.first : void 0) {
|
212 |
-
if (data.selected && this.is_multiple) {
|
213 |
-
this.choice_build(data);
|
214 |
-
} else if (data.selected && !this.is_multiple) {
|
215 |
-
this.single_set_selected_text(data.text);
|
216 |
-
}
|
217 |
-
}
|
218 |
-
}
|
219 |
-
return content;
|
220 |
-
};
|
221 |
-
|
222 |
-
AbstractChosen.prototype.result_add_option = function(option) {
|
223 |
-
var classes, option_el;
|
224 |
-
if (!option.search_match) {
|
225 |
-
return '';
|
226 |
-
}
|
227 |
-
if (!this.include_option_in_results(option)) {
|
228 |
-
return '';
|
229 |
-
}
|
230 |
-
classes = [];
|
231 |
-
if (!option.disabled && !(option.selected && this.is_multiple)) {
|
232 |
-
classes.push("active-result");
|
233 |
-
}
|
234 |
-
if (option.disabled && !(option.selected && this.is_multiple)) {
|
235 |
-
classes.push("disabled-result");
|
236 |
-
}
|
237 |
-
if (option.selected) {
|
238 |
-
classes.push("result-selected");
|
239 |
-
}
|
240 |
-
if (option.group_array_index != null) {
|
241 |
-
classes.push("group-option");
|
242 |
-
}
|
243 |
-
if (option.classes !== "") {
|
244 |
-
classes.push(option.classes);
|
245 |
-
}
|
246 |
-
option_el = document.createElement("li");
|
247 |
-
option_el.className = classes.join(" ");
|
248 |
-
option_el.style.cssText = option.style;
|
249 |
-
option_el.setAttribute("data-option-array-index", option.array_index);
|
250 |
-
option_el.innerHTML = option.search_text;
|
251 |
-
return this.outerHTML(option_el);
|
252 |
-
};
|
253 |
-
|
254 |
-
AbstractChosen.prototype.result_add_group = function(group) {
|
255 |
-
var group_el;
|
256 |
-
if (!(group.search_match || group.group_match)) {
|
257 |
-
return '';
|
258 |
-
}
|
259 |
-
if (!(group.active_options > 0)) {
|
260 |
-
return '';
|
261 |
-
}
|
262 |
-
group_el = document.createElement("li");
|
263 |
-
group_el.className = "group-result";
|
264 |
-
group_el.innerHTML = group.search_text;
|
265 |
-
return this.outerHTML(group_el);
|
266 |
-
};
|
267 |
-
|
268 |
-
AbstractChosen.prototype.results_update_field = function() {
|
269 |
-
this.set_default_text();
|
270 |
-
if (!this.is_multiple) {
|
271 |
-
this.results_reset_cleanup();
|
272 |
-
}
|
273 |
-
this.result_clear_highlight();
|
274 |
-
this.results_build();
|
275 |
-
if (this.results_showing) {
|
276 |
-
return this.winnow_results();
|
277 |
-
}
|
278 |
-
};
|
279 |
-
|
280 |
-
AbstractChosen.prototype.reset_single_select_options = function() {
|
281 |
-
var result, _i, _len, _ref, _results;
|
282 |
-
_ref = this.results_data;
|
283 |
-
_results = [];
|
284 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
285 |
-
result = _ref[_i];
|
286 |
-
if (result.selected) {
|
287 |
-
_results.push(result.selected = false);
|
288 |
-
} else {
|
289 |
-
_results.push(void 0);
|
290 |
-
}
|
291 |
-
}
|
292 |
-
return _results;
|
293 |
-
};
|
294 |
-
|
295 |
-
AbstractChosen.prototype.results_toggle = function() {
|
296 |
-
if (this.results_showing) {
|
297 |
-
return this.results_hide();
|
298 |
-
} else {
|
299 |
-
return this.results_show();
|
300 |
-
}
|
301 |
-
};
|
302 |
-
|
303 |
-
AbstractChosen.prototype.results_search = function(evt) {
|
304 |
-
if (this.results_showing) {
|
305 |
-
return this.winnow_results();
|
306 |
-
} else {
|
307 |
-
return this.results_show();
|
308 |
-
}
|
309 |
-
};
|
310 |
-
|
311 |
-
AbstractChosen.prototype.winnow_results = function() {
|
312 |
-
var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
|
313 |
-
this.no_results_clear();
|
314 |
-
results = 0;
|
315 |
-
searchText = this.get_search_text();
|
316 |
-
escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
317 |
-
regexAnchor = this.search_contains ? "" : "^";
|
318 |
-
regex = new RegExp(regexAnchor + escapedSearchText, 'i');
|
319 |
-
zregex = new RegExp(escapedSearchText, 'i');
|
320 |
-
_ref = this.results_data;
|
321 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
322 |
-
option = _ref[_i];
|
323 |
-
option.search_match = false;
|
324 |
-
results_group = null;
|
325 |
-
if (this.include_option_in_results(option)) {
|
326 |
-
if (option.group) {
|
327 |
-
option.group_match = false;
|
328 |
-
option.active_options = 0;
|
329 |
-
}
|
330 |
-
if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
|
331 |
-
results_group = this.results_data[option.group_array_index];
|
332 |
-
if (results_group.active_options === 0 && results_group.search_match) {
|
333 |
-
results += 1;
|
334 |
-
}
|
335 |
-
results_group.active_options += 1;
|
336 |
-
}
|
337 |
-
if (!(option.group && !this.group_search)) {
|
338 |
-
option.search_text = option.group ? option.label : option.html;
|
339 |
-
option.search_match = this.search_string_match(option.search_text, regex);
|
340 |
-
if (option.search_match && !option.group) {
|
341 |
-
results += 1;
|
342 |
-
}
|
343 |
-
if (option.search_match) {
|
344 |
-
if (searchText.length) {
|
345 |
-
startpos = option.search_text.search(zregex);
|
346 |
-
text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
|
347 |
-
option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
|
348 |
-
}
|
349 |
-
if (results_group != null) {
|
350 |
-
results_group.group_match = true;
|
351 |
-
}
|
352 |
-
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
|
353 |
-
option.search_match = true;
|
354 |
-
}
|
355 |
-
}
|
356 |
-
}
|
357 |
-
}
|
358 |
-
this.result_clear_highlight();
|
359 |
-
if (results < 1 && searchText.length) {
|
360 |
-
this.update_results_content("");
|
361 |
-
return this.no_results(searchText);
|
362 |
-
} else {
|
363 |
-
this.update_results_content(this.results_option_build());
|
364 |
-
return this.winnow_results_set_highlight();
|
365 |
-
}
|
366 |
-
};
|
367 |
-
|
368 |
-
AbstractChosen.prototype.search_string_match = function(search_string, regex) {
|
369 |
-
var part, parts, _i, _len;
|
370 |
-
if (regex.test(search_string)) {
|
371 |
-
return true;
|
372 |
-
} else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
|
373 |
-
parts = search_string.replace(/\[|\]/g, "").split(" ");
|
374 |
-
if (parts.length) {
|
375 |
-
for (_i = 0, _len = parts.length; _i < _len; _i++) {
|
376 |
-
part = parts[_i];
|
377 |
-
if (regex.test(part)) {
|
378 |
-
return true;
|
379 |
-
}
|
380 |
-
}
|
381 |
-
}
|
382 |
-
}
|
383 |
-
};
|
384 |
-
|
385 |
-
AbstractChosen.prototype.choices_count = function() {
|
386 |
-
var option, _i, _len, _ref;
|
387 |
-
if (this.selected_option_count != null) {
|
388 |
-
return this.selected_option_count;
|
389 |
-
}
|
390 |
-
this.selected_option_count = 0;
|
391 |
-
_ref = this.form_field.options;
|
392 |
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
393 |
-
option = _ref[_i];
|
394 |
-
if (option.selected) {
|
395 |
-
this.selected_option_count += 1;
|
396 |
-
}
|
397 |
-
}
|
398 |
-
return this.selected_option_count;
|
399 |
-
};
|
400 |
-
|
401 |
-
AbstractChosen.prototype.choices_click = function(evt) {
|
402 |
-
evt.preventDefault();
|
403 |
-
if (!(this.results_showing || this.is_disabled)) {
|
404 |
-
return this.results_show();
|
405 |
-
}
|
406 |
-
};
|
407 |
-
|
408 |
-
AbstractChosen.prototype.keyup_checker = function(evt) {
|
409 |
-
var stroke, _ref;
|
410 |
-
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
|
411 |
-
this.search_field_scale();
|
412 |
-
switch (stroke) {
|
413 |
-
case 8:
|
414 |
-
if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
|
415 |
-
return this.keydown_backstroke();
|
416 |
-
} else if (!this.pending_backstroke) {
|
417 |
-
this.result_clear_highlight();
|
418 |
-
return this.results_search();
|
419 |
-
}
|
420 |
-
break;
|
421 |
-
case 13:
|
422 |
-
evt.preventDefault();
|
423 |
-
if (this.results_showing) {
|
424 |
-
return this.result_select(evt);
|
425 |
-
}
|
426 |
-
break;
|
427 |
-
case 27:
|
428 |
-
if (this.results_showing) {
|
429 |
-
this.results_hide();
|
430 |
-
}
|
431 |
-
return true;
|
432 |
-
case 9:
|
433 |
-
case 38:
|
434 |
-
case 40:
|
435 |
-
case 16:
|
436 |
-
case 91:
|
437 |
-
case 17:
|
438 |
-
break;
|
439 |
-
default:
|
440 |
-
return this.results_search();
|
441 |
-
}
|
442 |
-
};
|
443 |
-
|
444 |
-
AbstractChosen.prototype.clipboard_event_checker = function(evt) {
|
445 |
-
var _this = this;
|
446 |
-
return setTimeout((function() {
|
447 |
-
return _this.results_search();
|
448 |
-
}), 50);
|
449 |
-
};
|
450 |
-
|
451 |
-
AbstractChosen.prototype.container_width = function() {
|
452 |
-
if (this.options.width != null) {
|
453 |
-
return this.options.width;
|
454 |
-
} else {
|
455 |
-
return "" + this.form_field.offsetWidth + "px";
|
456 |
-
}
|
457 |
-
};
|
458 |
-
|
459 |
-
AbstractChosen.prototype.include_option_in_results = function(option) {
|
460 |
-
if (this.is_multiple && (!this.display_selected_options && option.selected)) {
|
461 |
-
return false;
|
462 |
-
}
|
463 |
-
if (!this.display_disabled_options && option.disabled) {
|
464 |
-
return false;
|
465 |
-
}
|
466 |
-
if (option.empty) {
|
467 |
-
return false;
|
468 |
-
}
|
469 |
-
return true;
|
470 |
-
};
|
471 |
-
|
472 |
-
AbstractChosen.prototype.search_results_touchstart = function(evt) {
|
473 |
-
this.touch_started = true;
|
474 |
-
return this.search_results_mouseover(evt);
|
475 |
-
};
|
476 |
-
|
477 |
-
AbstractChosen.prototype.search_results_touchmove = function(evt) {
|
478 |
-
this.touch_started = false;
|
479 |
-
return this.search_results_mouseout(evt);
|
480 |
-
};
|
481 |
-
|
482 |
-
AbstractChosen.prototype.search_results_touchend = function(evt) {
|
483 |
-
if (this.touch_started) {
|
484 |
-
return this.search_results_mouseup(evt);
|
485 |
-
}
|
486 |
-
};
|
487 |
-
|
488 |
-
AbstractChosen.prototype.outerHTML = function(element) {
|
489 |
-
var tmp;
|
490 |
-
if (element.outerHTML) {
|
491 |
-
return element.outerHTML;
|
492 |
-
}
|
493 |
-
tmp = document.createElement("div");
|
494 |
-
tmp.appendChild(element);
|
495 |
-
return tmp.innerHTML;
|
496 |
-
};
|
497 |
-
|
498 |
-
AbstractChosen.browser_is_supported = function() {
|
499 |
-
if (window.navigator.appName === "Microsoft Internet Explorer") {
|
500 |
-
return document.documentMode >= 8;
|
501 |
-
}
|
502 |
-
if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
|
503 |
-
return false;
|
504 |
-
}
|
505 |
-
if (/Android/i.test(window.navigator.userAgent)) {
|
506 |
-
if (/Mobile/i.test(window.navigator.userAgent)) {
|
507 |
-
return false;
|
508 |
-
}
|
509 |
-
}
|
510 |
-
return true;
|
511 |
-
};
|
512 |
-
|
513 |
-
AbstractChosen.default_multiple_text = "Select Some Options";
|
514 |
-
|
515 |
-
AbstractChosen.default_single_text = "Select an Option";
|
516 |
-
|
517 |
-
AbstractChosen.default_no_result_text = "No results match";
|
518 |
-
|
519 |
-
return AbstractChosen;
|
520 |
-
|
521 |
-
})();
|
522 |
-
|
523 |
-
$ = jQuery;
|
524 |
-
|
525 |
-
$.fn.extend({
|
526 |
-
chosen: function(options) {
|
527 |
-
if (!AbstractChosen.browser_is_supported()) {
|
528 |
-
return this;
|
529 |
-
}
|
530 |
-
return this.each(function(input_field) {
|
531 |
-
var $this, chosen;
|
532 |
-
$this = $(this);
|
533 |
-
chosen = $this.data('chosen');
|
534 |
-
if (options === 'destroy' && chosen) {
|
535 |
-
chosen.destroy();
|
536 |
-
} else if (!chosen) {
|
537 |
-
$this.data('chosen', new Chosen(this, options));
|
538 |
-
}
|
539 |
-
});
|
540 |
-
}
|
541 |
-
});
|
542 |
-
|
543 |
-
Chosen = (function(_super) {
|
544 |
-
__extends(Chosen, _super);
|
545 |
-
|
546 |
-
function Chosen() {
|
547 |
-
_ref = Chosen.__super__.constructor.apply(this, arguments);
|
548 |
-
return _ref;
|
549 |
-
}
|
550 |
-
|
551 |
-
Chosen.prototype.setup = function() {
|
552 |
-
this.form_field_jq = $(this.form_field);
|
553 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
554 |
-
return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
|
555 |
-
};
|
556 |
-
|
557 |
-
Chosen.prototype.set_up_html = function() {
|
558 |
-
var container_classes, container_props;
|
559 |
-
container_classes = ["chosen-container"];
|
560 |
-
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
|
561 |
-
if (this.inherit_select_classes && this.form_field.className) {
|
562 |
-
container_classes.push(this.form_field.className);
|
563 |
-
}
|
564 |
-
if (this.is_rtl) {
|
565 |
-
container_classes.push("chosen-rtl");
|
566 |
-
}
|
567 |
-
container_props = {
|
568 |
-
'class': container_classes.join(' '),
|
569 |
-
'style': "width: " + (this.container_width()) + ";",
|
570 |
-
'title': this.form_field.title
|
571 |
-
};
|
572 |
-
if (this.form_field.id.length) {
|
573 |
-
container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
|
574 |
-
}
|
575 |
-
this.container = $("<div />", container_props);
|
576 |
-
if (this.is_multiple) {
|
577 |
-
this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
|
578 |
-
} else {
|
579 |
-
this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
|
580 |
-
}
|
581 |
-
this.form_field_jq.hide().after(this.container);
|
582 |
-
this.dropdown = this.container.find('div.chosen-drop').first();
|
583 |
-
this.search_field = this.container.find('input').first();
|
584 |
-
this.search_results = this.container.find('ul.chosen-results').first();
|
585 |
-
this.search_field_scale();
|
586 |
-
this.search_no_results = this.container.find('li.no-results').first();
|
587 |
-
if (this.is_multiple) {
|
588 |
-
this.search_choices = this.container.find('ul.chosen-choices').first();
|
589 |
-
this.search_container = this.container.find('li.search-field').first();
|
590 |
-
} else {
|
591 |
-
this.search_container = this.container.find('div.chosen-search').first();
|
592 |
-
this.selected_item = this.container.find('.chosen-single').first();
|
593 |
-
}
|
594 |
-
this.results_build();
|
595 |
-
this.set_tab_index();
|
596 |
-
this.set_label_behavior();
|
597 |
-
return this.form_field_jq.trigger("chosen:ready", {
|
598 |
-
chosen: this
|
599 |
-
});
|
600 |
-
};
|
601 |
-
|
602 |
-
Chosen.prototype.register_observers = function() {
|
603 |
-
var _this = this;
|
604 |
-
this.container.bind('mousedown.chosen', function(evt) {
|
605 |
-
_this.container_mousedown(evt);
|
606 |
-
});
|
607 |
-
this.container.bind('mouseup.chosen', function(evt) {
|
608 |
-
_this.container_mouseup(evt);
|
609 |
-
});
|
610 |
-
this.container.bind('mouseenter.chosen', function(evt) {
|
611 |
-
_this.mouse_enter(evt);
|
612 |
-
});
|
613 |
-
this.container.bind('mouseleave.chosen', function(evt) {
|
614 |
-
_this.mouse_leave(evt);
|
615 |
-
});
|
616 |
-
this.search_results.bind('mouseup.chosen', function(evt) {
|
617 |
-
_this.search_results_mouseup(evt);
|
618 |
-
});
|
619 |
-
this.search_results.bind('mouseover.chosen', function(evt) {
|
620 |
-
_this.search_results_mouseover(evt);
|
621 |
-
});
|
622 |
-
this.search_results.bind('mouseout.chosen', function(evt) {
|
623 |
-
_this.search_results_mouseout(evt);
|
624 |
-
});
|
625 |
-
this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
|
626 |
-
_this.search_results_mousewheel(evt);
|
627 |
-
});
|
628 |
-
this.search_results.bind('touchstart.chosen', function(evt) {
|
629 |
-
_this.search_results_touchstart(evt);
|
630 |
-
});
|
631 |
-
this.search_results.bind('touchmove.chosen', function(evt) {
|
632 |
-
_this.search_results_touchmove(evt);
|
633 |
-
});
|
634 |
-
this.search_results.bind('touchend.chosen', function(evt) {
|
635 |
-
_this.search_results_touchend(evt);
|
636 |
-
});
|
637 |
-
this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
|
638 |
-
_this.results_update_field(evt);
|
639 |
-
});
|
640 |
-
this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
|
641 |
-
_this.activate_field(evt);
|
642 |
-
});
|
643 |
-
this.form_field_jq.bind("chosen:open.chosen", function(evt) {
|
644 |
-
_this.container_mousedown(evt);
|
645 |
-
});
|
646 |
-
this.form_field_jq.bind("chosen:close.chosen", function(evt) {
|
647 |
-
_this.input_blur(evt);
|
648 |
-
});
|
649 |
-
this.search_field.bind('blur.chosen', function(evt) {
|
650 |
-
_this.input_blur(evt);
|
651 |
-
});
|
652 |
-
this.search_field.bind('keyup.chosen', function(evt) {
|
653 |
-
_this.keyup_checker(evt);
|
654 |
-
});
|
655 |
-
this.search_field.bind('keydown.chosen', function(evt) {
|
656 |
-
_this.keydown_checker(evt);
|
657 |
-
});
|
658 |
-
this.search_field.bind('focus.chosen', function(evt) {
|
659 |
-
_this.input_focus(evt);
|
660 |
-
});
|
661 |
-
this.search_field.bind('cut.chosen', function(evt) {
|
662 |
-
_this.clipboard_event_checker(evt);
|
663 |
-
});
|
664 |
-
this.search_field.bind('paste.chosen', function(evt) {
|
665 |
-
_this.clipboard_event_checker(evt);
|
666 |
-
});
|
667 |
-
if (this.is_multiple) {
|
668 |
-
return this.search_choices.bind('click.chosen', function(evt) {
|
669 |
-
_this.choices_click(evt);
|
670 |
-
});
|
671 |
-
} else {
|
672 |
-
return this.container.bind('click.chosen', function(evt) {
|
673 |
-
evt.preventDefault();
|
674 |
-
});
|
675 |
-
}
|
676 |
-
};
|
677 |
-
|
678 |
-
Chosen.prototype.destroy = function() {
|
679 |
-
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
680 |
-
if (this.search_field[0].tabIndex) {
|
681 |
-
this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
|
682 |
-
}
|
683 |
-
this.container.remove();
|
684 |
-
this.form_field_jq.removeData('chosen');
|
685 |
-
return this.form_field_jq.show();
|
686 |
-
};
|
687 |
-
|
688 |
-
Chosen.prototype.search_field_disabled = function() {
|
689 |
-
this.is_disabled = this.form_field_jq[0].disabled;
|
690 |
-
if (this.is_disabled) {
|
691 |
-
this.container.addClass('chosen-disabled');
|
692 |
-
this.search_field[0].disabled = true;
|
693 |
-
if (!this.is_multiple) {
|
694 |
-
this.selected_item.unbind("focus.chosen", this.activate_action);
|
695 |
-
}
|
696 |
-
return this.close_field();
|
697 |
-
} else {
|
698 |
-
this.container.removeClass('chosen-disabled');
|
699 |
-
this.search_field[0].disabled = false;
|
700 |
-
if (!this.is_multiple) {
|
701 |
-
return this.selected_item.bind("focus.chosen", this.activate_action);
|
702 |
-
}
|
703 |
-
}
|
704 |
-
};
|
705 |
-
|
706 |
-
Chosen.prototype.container_mousedown = function(evt) {
|
707 |
-
if (!this.is_disabled) {
|
708 |
-
if (evt && evt.type === "mousedown" && !this.results_showing) {
|
709 |
-
evt.preventDefault();
|
710 |
-
}
|
711 |
-
if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
|
712 |
-
if (!this.active_field) {
|
713 |
-
if (this.is_multiple) {
|
714 |
-
this.search_field.val("");
|
715 |
-
}
|
716 |
-
$(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
|
717 |
-
this.results_show();
|
718 |
-
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
|
719 |
-
evt.preventDefault();
|
720 |
-
this.results_toggle();
|
721 |
-
}
|
722 |
-
return this.activate_field();
|
723 |
-
}
|
724 |
-
}
|
725 |
-
};
|
726 |
-
|
727 |
-
Chosen.prototype.container_mouseup = function(evt) {
|
728 |
-
if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
|
729 |
-
return this.results_reset(evt);
|
730 |
-
}
|
731 |
-
};
|
732 |
-
|
733 |
-
Chosen.prototype.search_results_mousewheel = function(evt) {
|
734 |
-
var delta;
|
735 |
-
if (evt.originalEvent) {
|
736 |
-
delta = -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
|
737 |
-
}
|
738 |
-
if (delta != null) {
|
739 |
-
evt.preventDefault();
|
740 |
-
if (evt.type === 'DOMMouseScroll') {
|
741 |
-
delta = delta * 40;
|
742 |
-
}
|
743 |
-
return this.search_results.scrollTop(delta + this.search_results.scrollTop());
|
744 |
-
}
|
745 |
-
};
|
746 |
-
|
747 |
-
Chosen.prototype.blur_test = function(evt) {
|
748 |
-
if (!this.active_field && this.container.hasClass("chosen-container-active")) {
|
749 |
-
return this.close_field();
|
750 |
-
}
|
751 |
-
};
|
752 |
-
|
753 |
-
Chosen.prototype.close_field = function() {
|
754 |
-
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
|
755 |
-
this.active_field = false;
|
756 |
-
this.results_hide();
|
757 |
-
this.container.removeClass("chosen-container-active");
|
758 |
-
this.clear_backstroke();
|
759 |
-
this.show_search_field_default();
|
760 |
-
return this.search_field_scale();
|
761 |
-
};
|
762 |
-
|
763 |
-
Chosen.prototype.activate_field = function() {
|
764 |
-
this.container.addClass("chosen-container-active");
|
765 |
-
this.active_field = true;
|
766 |
-
this.search_field.val(this.search_field.val());
|
767 |
-
return this.search_field.focus();
|
768 |
-
};
|
769 |
-
|
770 |
-
Chosen.prototype.test_active_click = function(evt) {
|
771 |
-
var active_container;
|
772 |
-
active_container = $(evt.target).closest('.chosen-container');
|
773 |
-
if (active_container.length && this.container[0] === active_container[0]) {
|
774 |
-
return this.active_field = true;
|
775 |
-
} else {
|
776 |
-
return this.close_field();
|
777 |
-
}
|
778 |
-
};
|
779 |
-
|
780 |
-
Chosen.prototype.results_build = function() {
|
781 |
-
this.parsing = true;
|
782 |
-
this.selected_option_count = null;
|
783 |
-
this.results_data = SelectParser.select_to_array(this.form_field);
|
784 |
-
if (this.is_multiple) {
|
785 |
-
this.search_choices.find("li.search-choice").remove();
|
786 |
-
} else if (!this.is_multiple) {
|
787 |
-
this.single_set_selected_text();
|
788 |
-
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
|
789 |
-
this.search_field[0].readOnly = true;
|
790 |
-
this.container.addClass("chosen-container-single-nosearch");
|
791 |
-
} else {
|
792 |
-
this.search_field[0].readOnly = false;
|
793 |
-
this.container.removeClass("chosen-container-single-nosearch");
|
794 |
-
}
|
795 |
-
}
|
796 |
-
this.update_results_content(this.results_option_build({
|
797 |
-
first: true
|
798 |
-
}));
|
799 |
-
this.search_field_disabled();
|
800 |
-
this.show_search_field_default();
|
801 |
-
this.search_field_scale();
|
802 |
-
return this.parsing = false;
|
803 |
-
};
|
804 |
-
|
805 |
-
Chosen.prototype.result_do_highlight = function(el) {
|
806 |
-
var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
|
807 |
-
if (el.length) {
|
808 |
-
this.result_clear_highlight();
|
809 |
-
this.result_highlight = el;
|
810 |
-
this.result_highlight.addClass("highlighted");
|
811 |
-
maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
|
812 |
-
visible_top = this.search_results.scrollTop();
|
813 |
-
visible_bottom = maxHeight + visible_top;
|
814 |
-
high_top = this.result_highlight.position().top + this.search_results.scrollTop();
|
815 |
-
high_bottom = high_top + this.result_highlight.outerHeight();
|
816 |
-
if (high_bottom >= visible_bottom) {
|
817 |
-
return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
|
818 |
-
} else if (high_top < visible_top) {
|
819 |
-
return this.search_results.scrollTop(high_top);
|
820 |
-
}
|
821 |
-
}
|
822 |
-
};
|
823 |
-
|
824 |
-
Chosen.prototype.result_clear_highlight = function() {
|
825 |
-
if (this.result_highlight) {
|
826 |
-
this.result_highlight.removeClass("highlighted");
|
827 |
-
}
|
828 |
-
return this.result_highlight = null;
|
829 |
-
};
|
830 |
-
|
831 |
-
Chosen.prototype.results_show = function() {
|
832 |
-
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
833 |
-
this.form_field_jq.trigger("chosen:maxselected", {
|
834 |
-
chosen: this
|
835 |
-
});
|
836 |
-
return false;
|
837 |
-
}
|
838 |
-
this.container.addClass("chosen-with-drop");
|
839 |
-
this.results_showing = true;
|
840 |
-
this.search_field.focus();
|
841 |
-
this.search_field.val(this.search_field.val());
|
842 |
-
this.winnow_results();
|
843 |
-
return this.form_field_jq.trigger("chosen:showing_dropdown", {
|
844 |
-
chosen: this
|
845 |
-
});
|
846 |
-
};
|
847 |
-
|
848 |
-
Chosen.prototype.update_results_content = function(content) {
|
849 |
-
return this.search_results.html(content);
|
850 |
-
};
|
851 |
-
|
852 |
-
Chosen.prototype.results_hide = function() {
|
853 |
-
if (this.results_showing) {
|
854 |
-
this.result_clear_highlight();
|
855 |
-
this.container.removeClass("chosen-with-drop");
|
856 |
-
this.form_field_jq.trigger("chosen:hiding_dropdown", {
|
857 |
-
chosen: this
|
858 |
-
});
|
859 |
-
}
|
860 |
-
return this.results_showing = false;
|
861 |
-
};
|
862 |
-
|
863 |
-
Chosen.prototype.set_tab_index = function(el) {
|
864 |
-
var ti;
|
865 |
-
if (this.form_field.tabIndex) {
|
866 |
-
ti = this.form_field.tabIndex;
|
867 |
-
this.form_field.tabIndex = -1;
|
868 |
-
return this.search_field[0].tabIndex = ti;
|
869 |
-
}
|
870 |
-
};
|
871 |
-
|
872 |
-
Chosen.prototype.set_label_behavior = function() {
|
873 |
-
var _this = this;
|
874 |
-
this.form_field_label = this.form_field_jq.parents("label");
|
875 |
-
if (!this.form_field_label.length && this.form_field.id.length) {
|
876 |
-
this.form_field_label = $("label[for='" + this.form_field.id + "']");
|
877 |
-
}
|
878 |
-
if (this.form_field_label.length > 0) {
|
879 |
-
return this.form_field_label.bind('click.chosen', function(evt) {
|
880 |
-
if (_this.is_multiple) {
|
881 |
-
return _this.container_mousedown(evt);
|
882 |
-
} else {
|
883 |
-
return _this.activate_field();
|
884 |
-
}
|
885 |
-
});
|
886 |
-
}
|
887 |
-
};
|
888 |
-
|
889 |
-
Chosen.prototype.show_search_field_default = function() {
|
890 |
-
if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
|
891 |
-
this.search_field.val(this.default_text);
|
892 |
-
return this.search_field.addClass("default");
|
893 |
-
} else {
|
894 |
-
this.search_field.val("");
|
895 |
-
return this.search_field.removeClass("default");
|
896 |
-
}
|
897 |
-
};
|
898 |
-
|
899 |
-
Chosen.prototype.search_results_mouseup = function(evt) {
|
900 |
-
var target;
|
901 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
902 |
-
if (target.length) {
|
903 |
-
this.result_highlight = target;
|
904 |
-
this.result_select(evt);
|
905 |
-
return this.search_field.focus();
|
906 |
-
}
|
907 |
-
};
|
908 |
-
|
909 |
-
Chosen.prototype.search_results_mouseover = function(evt) {
|
910 |
-
var target;
|
911 |
-
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
|
912 |
-
if (target) {
|
913 |
-
return this.result_do_highlight(target);
|
914 |
-
}
|
915 |
-
};
|
916 |
-
|
917 |
-
Chosen.prototype.search_results_mouseout = function(evt) {
|
918 |
-
if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
|
919 |
-
return this.result_clear_highlight();
|
920 |
-
}
|
921 |
-
};
|
922 |
-
|
923 |
-
Chosen.prototype.choice_build = function(item) {
|
924 |
-
var choice, close_link,
|
925 |
-
_this = this;
|
926 |
-
choice = $('<li />', {
|
927 |
-
"class": "search-choice"
|
928 |
-
}).html("<span>" + item.html + "</span>");
|
929 |
-
if (item.disabled) {
|
930 |
-
choice.addClass('search-choice-disabled');
|
931 |
-
} else {
|
932 |
-
close_link = $('<a />', {
|
933 |
-
"class": 'search-choice-close',
|
934 |
-
'data-option-array-index': item.array_index
|
935 |
-
});
|
936 |
-
close_link.bind('click.chosen', function(evt) {
|
937 |
-
return _this.choice_destroy_link_click(evt);
|
938 |
-
});
|
939 |
-
choice.append(close_link);
|
940 |
-
}
|
941 |
-
return this.search_container.before(choice);
|
942 |
-
};
|
943 |
-
|
944 |
-
Chosen.prototype.choice_destroy_link_click = function(evt) {
|
945 |
-
evt.preventDefault();
|
946 |
-
evt.stopPropagation();
|
947 |
-
if (!this.is_disabled) {
|
948 |
-
return this.choice_destroy($(evt.target));
|
949 |
-
}
|
950 |
-
};
|
951 |
-
|
952 |
-
Chosen.prototype.choice_destroy = function(link) {
|
953 |
-
if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
|
954 |
-
this.show_search_field_default();
|
955 |
-
if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
|
956 |
-
this.results_hide();
|
957 |
-
}
|
958 |
-
link.parents('li').first().remove();
|
959 |
-
return this.search_field_scale();
|
960 |
-
}
|
961 |
-
};
|
962 |
-
|
963 |
-
Chosen.prototype.results_reset = function() {
|
964 |
-
this.reset_single_select_options();
|
965 |
-
this.form_field.options[0].selected = true;
|
966 |
-
this.single_set_selected_text();
|
967 |
-
this.show_search_field_default();
|
968 |
-
this.results_reset_cleanup();
|
969 |
-
this.form_field_jq.trigger("change");
|
970 |
-
if (this.active_field) {
|
971 |
-
return this.results_hide();
|
972 |
-
}
|
973 |
-
};
|
974 |
-
|
975 |
-
Chosen.prototype.results_reset_cleanup = function() {
|
976 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
977 |
-
return this.selected_item.find("abbr").remove();
|
978 |
-
};
|
979 |
-
|
980 |
-
Chosen.prototype.result_select = function(evt) {
|
981 |
-
var high, item;
|
982 |
-
if (this.result_highlight) {
|
983 |
-
high = this.result_highlight;
|
984 |
-
this.result_clear_highlight();
|
985 |
-
if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
|
986 |
-
this.form_field_jq.trigger("chosen:maxselected", {
|
987 |
-
chosen: this
|
988 |
-
});
|
989 |
-
return false;
|
990 |
-
}
|
991 |
-
if (this.is_multiple) {
|
992 |
-
high.removeClass("active-result");
|
993 |
-
} else {
|
994 |
-
this.reset_single_select_options();
|
995 |
-
}
|
996 |
-
item = this.results_data[high[0].getAttribute("data-option-array-index")];
|
997 |
-
item.selected = true;
|
998 |
-
this.form_field.options[item.options_index].selected = true;
|
999 |
-
this.selected_option_count = null;
|
1000 |
-
if (this.is_multiple) {
|
1001 |
-
this.choice_build(item);
|
1002 |
-
} else {
|
1003 |
-
this.single_set_selected_text(item.text);
|
1004 |
-
}
|
1005 |
-
if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
|
1006 |
-
this.results_hide();
|
1007 |
-
}
|
1008 |
-
this.search_field.val("");
|
1009 |
-
if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
|
1010 |
-
this.form_field_jq.trigger("change", {
|
1011 |
-
'selected': this.form_field.options[item.options_index].value
|
1012 |
-
});
|
1013 |
-
}
|
1014 |
-
this.current_selectedIndex = this.form_field.selectedIndex;
|
1015 |
-
return this.search_field_scale();
|
1016 |
-
}
|
1017 |
-
};
|
1018 |
-
|
1019 |
-
Chosen.prototype.single_set_selected_text = function(text) {
|
1020 |
-
if (text == null) {
|
1021 |
-
text = this.default_text;
|
1022 |
-
}
|
1023 |
-
if (text === this.default_text) {
|
1024 |
-
this.selected_item.addClass("chosen-default");
|
1025 |
-
} else {
|
1026 |
-
this.single_deselect_control_build();
|
1027 |
-
this.selected_item.removeClass("chosen-default");
|
1028 |
-
}
|
1029 |
-
return this.selected_item.find("span").text(text);
|
1030 |
-
};
|
1031 |
-
|
1032 |
-
Chosen.prototype.result_deselect = function(pos) {
|
1033 |
-
var result_data;
|
1034 |
-
result_data = this.results_data[pos];
|
1035 |
-
if (!this.form_field.options[result_data.options_index].disabled) {
|
1036 |
-
result_data.selected = false;
|
1037 |
-
this.form_field.options[result_data.options_index].selected = false;
|
1038 |
-
this.selected_option_count = null;
|
1039 |
-
this.result_clear_highlight();
|
1040 |
-
if (this.results_showing) {
|
1041 |
-
this.winnow_results();
|
1042 |
-
}
|
1043 |
-
this.form_field_jq.trigger("change", {
|
1044 |
-
deselected: this.form_field.options[result_data.options_index].value
|
1045 |
-
});
|
1046 |
-
this.search_field_scale();
|
1047 |
-
return true;
|
1048 |
-
} else {
|
1049 |
-
return false;
|
1050 |
-
}
|
1051 |
-
};
|
1052 |
-
|
1053 |
-
Chosen.prototype.single_deselect_control_build = function() {
|
1054 |
-
if (!this.allow_single_deselect) {
|
1055 |
-
return;
|
1056 |
-
}
|
1057 |
-
if (!this.selected_item.find("abbr").length) {
|
1058 |
-
this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
|
1059 |
-
}
|
1060 |
-
return this.selected_item.addClass("chosen-single-with-deselect");
|
1061 |
-
};
|
1062 |
-
|
1063 |
-
Chosen.prototype.get_search_text = function() {
|
1064 |
-
if (this.search_field.val() === this.default_text) {
|
1065 |
-
return "";
|
1066 |
-
} else {
|
1067 |
-
return $('<div/>').text($.trim(this.search_field.val())).html();
|
1068 |
-
}
|
1069 |
-
};
|
1070 |
-
|
1071 |
-
Chosen.prototype.winnow_results_set_highlight = function() {
|
1072 |
-
var do_high, selected_results;
|
1073 |
-
selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
|
1074 |
-
do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
|
1075 |
-
if (do_high != null) {
|
1076 |
-
return this.result_do_highlight(do_high);
|
1077 |
-
}
|
1078 |
-
};
|
1079 |
-
|
1080 |
-
Chosen.prototype.no_results = function(terms) {
|
1081 |
-
var no_results_html;
|
1082 |
-
no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
|
1083 |
-
no_results_html.find("span").first().html(terms);
|
1084 |
-
this.search_results.append(no_results_html);
|
1085 |
-
return this.form_field_jq.trigger("chosen:no_results", {
|
1086 |
-
chosen: this
|
1087 |
-
});
|
1088 |
-
};
|
1089 |
-
|
1090 |
-
Chosen.prototype.no_results_clear = function() {
|
1091 |
-
return this.search_results.find(".no-results").remove();
|
1092 |
-
};
|
1093 |
-
|
1094 |
-
Chosen.prototype.keydown_arrow = function() {
|
1095 |
-
var next_sib;
|
1096 |
-
if (this.results_showing && this.result_highlight) {
|
1097 |
-
next_sib = this.result_highlight.nextAll("li.active-result").first();
|
1098 |
-
if (next_sib) {
|
1099 |
-
return this.result_do_highlight(next_sib);
|
1100 |
-
}
|
1101 |
-
} else {
|
1102 |
-
return this.results_show();
|
1103 |
-
}
|
1104 |
-
};
|
1105 |
-
|
1106 |
-
Chosen.prototype.keyup_arrow = function() {
|
1107 |
-
var prev_sibs;
|
1108 |
-
if (!this.results_showing && !this.is_multiple) {
|
1109 |
-
return this.results_show();
|
1110 |
-
} else if (this.result_highlight) {
|
1111 |
-
prev_sibs = this.result_highlight.prevAll("li.active-result");
|
1112 |
-
if (prev_sibs.length) {
|
1113 |
-
return this.result_do_highlight(prev_sibs.first());
|
1114 |
-
} else {
|
1115 |
-
if (this.choices_count() > 0) {
|
1116 |
-
this.results_hide();
|
1117 |
-
}
|
1118 |
-
return this.result_clear_highlight();
|
1119 |
-
}
|
1120 |
-
}
|
1121 |
-
};
|
1122 |
-
|
1123 |
-
Chosen.prototype.keydown_backstroke = function() {
|
1124 |
-
var next_available_destroy;
|
1125 |
-
if (this.pending_backstroke) {
|
1126 |
-
this.choice_destroy(this.pending_backstroke.find("a").first());
|
1127 |
-
return this.clear_backstroke();
|
1128 |
-
} else {
|
1129 |
-
next_available_destroy = this.search_container.siblings("li.search-choice").last();
|
1130 |
-
if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
|
1131 |
-
this.pending_backstroke = next_available_destroy;
|
1132 |
-
if (this.single_backstroke_delete) {
|
1133 |
-
return this.keydown_backstroke();
|
1134 |
-
} else {
|
1135 |
-
return this.pending_backstroke.addClass("search-choice-focus");
|
1136 |
-
}
|
1137 |
-
}
|
1138 |
-
}
|
1139 |
-
};
|
1140 |
-
|
1141 |
-
Chosen.prototype.clear_backstroke = function() {
|
1142 |
-
if (this.pending_backstroke) {
|
1143 |
-
this.pending_backstroke.removeClass("search-choice-focus");
|
1144 |
-
}
|
1145 |
-
return this.pending_backstroke = null;
|
1146 |
-
};
|
1147 |
-
|
1148 |
-
Chosen.prototype.keydown_checker = function(evt) {
|
1149 |
-
var stroke, _ref1;
|
1150 |
-
stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
|
1151 |
-
this.search_field_scale();
|
1152 |
-
if (stroke !== 8 && this.pending_backstroke) {
|
1153 |
-
this.clear_backstroke();
|
1154 |
-
}
|
1155 |
-
switch (stroke) {
|
1156 |
-
case 8:
|
1157 |
-
this.backstroke_length = this.search_field.val().length;
|
1158 |
-
break;
|
1159 |
-
case 9:
|
1160 |
-
if (this.results_showing && !this.is_multiple) {
|
1161 |
-
this.result_select(evt);
|
1162 |
-
}
|
1163 |
-
this.mouse_on_container = false;
|
1164 |
-
break;
|
1165 |
-
case 13:
|
1166 |
-
evt.preventDefault();
|
1167 |
-
break;
|
1168 |
-
case 38:
|
1169 |
-
evt.preventDefault();
|
1170 |
-
this.keyup_arrow();
|
1171 |
-
break;
|
1172 |
-
case 40:
|
1173 |
-
evt.preventDefault();
|
1174 |
-
this.keydown_arrow();
|
1175 |
-
break;
|
1176 |
-
}
|
1177 |
-
};
|
1178 |
-
|
1179 |
-
Chosen.prototype.search_field_scale = function() {
|
1180 |
-
var div, f_width, h, style, style_block, styles, w, _i, _len;
|
1181 |
-
if (this.is_multiple) {
|
1182 |
-
h = 0;
|
1183 |
-
w = 0;
|
1184 |
-
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
|
1185 |
-
styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
|
1186 |
-
for (_i = 0, _len = styles.length; _i < _len; _i++) {
|
1187 |
-
style = styles[_i];
|
1188 |
-
style_block += style + ":" + this.search_field.css(style) + ";";
|
1189 |
-
}
|
1190 |
-
div = $('<div />', {
|
1191 |
-
'style': style_block
|
1192 |
-
});
|
1193 |
-
div.text(this.search_field.val());
|
1194 |
-
$('body').append(div);
|
1195 |
-
w = div.width() + 25;
|
1196 |
-
div.remove();
|
1197 |
-
f_width = this.container.outerWidth();
|
1198 |
-
if (w > f_width - 10) {
|
1199 |
-
w = f_width - 10;
|
1200 |
-
}
|
1201 |
-
return this.search_field.css({
|
1202 |
-
'width': w + 'px'
|
1203 |
-
});
|
1204 |
-
}
|
1205 |
-
};
|
1206 |
-
|
1207 |
-
return Chosen;
|
1208 |
-
|
1209 |
-
})(AbstractChosen);
|
1210 |
-
|
1211 |
-
}).call(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/plugin.color.js
DELETED
@@ -1,595 +0,0 @@
|
|
1 |
-
|
2 |
-
/**
|
3 |
-
* jQuery Color
|
4 |
-
* A utility class for working with colors in JavaScript.
|
5 |
-
*/
|
6 |
-
|
7 |
-
(function(global, undef) {
|
8 |
-
|
9 |
-
var Color = function( color, type ) {
|
10 |
-
if ( ! ( this instanceof Color ) )
|
11 |
-
return new Color( color, type );
|
12 |
-
|
13 |
-
return this._init( color, type );
|
14 |
-
};
|
15 |
-
|
16 |
-
Color.fn = Color.prototype = {
|
17 |
-
_color: 0,
|
18 |
-
_alpha: 1,
|
19 |
-
error: false,
|
20 |
-
// for preserving hue/sat in fromHsl().toHsl() flows
|
21 |
-
_hsl: { h: 0, s: 0, l: 0 },
|
22 |
-
// for preserving hue/sat in fromHsv().toHsv() flows
|
23 |
-
_hsv: { h: 0, s: 0, v: 0 },
|
24 |
-
// for setting hsl or hsv space - needed for .h() & .s() functions to function properly
|
25 |
-
_hSpace: 'hsl',
|
26 |
-
_init: function( color ) {
|
27 |
-
var func = 'noop';
|
28 |
-
switch ( typeof color ) {
|
29 |
-
case 'object':
|
30 |
-
// alpha?
|
31 |
-
if ( color.a !== undef )
|
32 |
-
this.a( color.a );
|
33 |
-
func = ( color.r !== undef ) ? 'fromRgb' :
|
34 |
-
( color.l !== undef ) ? 'fromHsl' :
|
35 |
-
( color.v !== undef ) ? 'fromHsv' : func;
|
36 |
-
return this[func]( color );
|
37 |
-
case 'string':
|
38 |
-
return this.fromCSS( color );
|
39 |
-
case 'number':
|
40 |
-
return this.fromInt( parseInt( color, 10 ) );
|
41 |
-
}
|
42 |
-
return this;
|
43 |
-
},
|
44 |
-
|
45 |
-
_error: function() {
|
46 |
-
this.error = true;
|
47 |
-
return this;
|
48 |
-
},
|
49 |
-
|
50 |
-
clone: function() {
|
51 |
-
var newColor = new Color( this.toInt() ),
|
52 |
-
copy = ['_alpha', '_hSpace', '_hsl', '_hsv', 'error'];
|
53 |
-
for ( var i = copy.length - 1; i >= 0; i-- ) {
|
54 |
-
newColor[ copy[i] ] = this[ copy[i] ];
|
55 |
-
}
|
56 |
-
return newColor;
|
57 |
-
},
|
58 |
-
|
59 |
-
setHSpace: function( space ) {
|
60 |
-
this._hSpace = ( space === 'hsv' ) ? space : 'hsl';
|
61 |
-
return this;
|
62 |
-
},
|
63 |
-
|
64 |
-
noop: function() {
|
65 |
-
return this;
|
66 |
-
},
|
67 |
-
|
68 |
-
fromCSS: function( color ) {
|
69 |
-
var list,
|
70 |
-
leadingRE = /^(rgb|hs(l|v))a?\(/;
|
71 |
-
this.error = false;
|
72 |
-
|
73 |
-
// whitespace and semicolon trim
|
74 |
-
color = color.replace(/^\s+/, '').replace(/\s+$/, '').replace(/;$/, '');
|
75 |
-
|
76 |
-
if ( color.match(leadingRE) && color.match(/\)$/) ) {
|
77 |
-
list = color.replace(/(\s|%)/g, '').replace(leadingRE, '').replace(/,?\);?$/, '').split(',');
|
78 |
-
|
79 |
-
if ( list.length < 3 )
|
80 |
-
return this._error();
|
81 |
-
|
82 |
-
if ( list.length === 4 ) {
|
83 |
-
this.a( parseFloat( list.pop() ) );
|
84 |
-
// error state has been set to true in .a() if we passed NaN
|
85 |
-
if ( this.error )
|
86 |
-
return this;
|
87 |
-
}
|
88 |
-
|
89 |
-
for (var i = list.length - 1; i >= 0; i--) {
|
90 |
-
list[i] = parseInt(list[i], 10);
|
91 |
-
if ( isNaN( list[i] ) )
|
92 |
-
return this._error();
|
93 |
-
}
|
94 |
-
|
95 |
-
if ( color.match(/^rgb/) ) {
|
96 |
-
return this.fromRgb( {
|
97 |
-
r: list[0],
|
98 |
-
g: list[1],
|
99 |
-
b: list[2]
|
100 |
-
} );
|
101 |
-
} else if ( color.match(/^hsv/) ) {
|
102 |
-
return this.fromHsv( {
|
103 |
-
h: list[0],
|
104 |
-
s: list[1],
|
105 |
-
v: list[2]
|
106 |
-
} );
|
107 |
-
} else {
|
108 |
-
return this.fromHsl( {
|
109 |
-
h: list[0],
|
110 |
-
s: list[1],
|
111 |
-
l: list[2]
|
112 |
-
} );
|
113 |
-
}
|
114 |
-
} else {
|
115 |
-
// must be hex amirite?
|
116 |
-
return this.fromHex( color );
|
117 |
-
}
|
118 |
-
},
|
119 |
-
|
120 |
-
fromRgb: function( rgb, preserve ) {
|
121 |
-
if ( typeof rgb !== 'object' || rgb.r === undef || rgb.g === undef || rgb.b === undef )
|
122 |
-
return this._error();
|
123 |
-
|
124 |
-
this.error = false;
|
125 |
-
return this.fromInt( parseInt( ( rgb.r << 16 ) + ( rgb.g << 8 ) + rgb.b, 10 ), preserve );
|
126 |
-
},
|
127 |
-
|
128 |
-
fromHex: function( color ) {
|
129 |
-
color = color.replace(/^#/, '').replace(/^0x/, '');
|
130 |
-
if ( color.length === 3 ) {
|
131 |
-
color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
|
132 |
-
}
|
133 |
-
|
134 |
-
// rough error checking - this is where things go squirrely the most
|
135 |
-
this.error = ! /^[0-9A-F]{6}$/i.test( color );
|
136 |
-
return this.fromInt( parseInt( color, 16 ) );
|
137 |
-
},
|
138 |
-
|
139 |
-
fromHsl: function( hsl ) {
|
140 |
-
var r, g, b, q, p, h, s, l;
|
141 |
-
|
142 |
-
if ( typeof hsl !== 'object' || hsl.h === undef || hsl.s === undef || hsl.l === undef )
|
143 |
-
return this._error();
|
144 |
-
|
145 |
-
this._hsl = hsl; // store it
|
146 |
-
this._hSpace = 'hsl'; // implicit
|
147 |
-
h = hsl.h / 360; s = hsl.s / 100; l = hsl.l / 100;
|
148 |
-
if ( s === 0 ) {
|
149 |
-
r = g = b = l; // achromatic
|
150 |
-
}
|
151 |
-
else {
|
152 |
-
q = l < 0.5 ? l * ( 1 + s ) : l + s - l * s;
|
153 |
-
p = 2 * l - q;
|
154 |
-
r = this.hue2rgb( p, q, h + 1/3 );
|
155 |
-
g = this.hue2rgb( p, q, h );
|
156 |
-
b = this.hue2rgb( p, q, h - 1/3 );
|
157 |
-
}
|
158 |
-
return this.fromRgb( {
|
159 |
-
r: r * 255,
|
160 |
-
g: g * 255,
|
161 |
-
b: b * 255
|
162 |
-
}, true ); // true preserves hue/sat
|
163 |
-
},
|
164 |
-
|
165 |
-
fromHsv: function( hsv ) {
|
166 |
-
var h, s, v, r, g, b, i, f, p, q, t;
|
167 |
-
if ( typeof hsv !== 'object' || hsv.h === undef || hsv.s === undef || hsv.v === undef )
|
168 |
-
return this._error();
|
169 |
-
|
170 |
-
this._hsv = hsv; // store it
|
171 |
-
this._hSpace = 'hsv'; // implicit
|
172 |
-
|
173 |
-
h = hsv.h / 360; s = hsv.s / 100; v = hsv.v / 100;
|
174 |
-
i = Math.floor( h * 6 );
|
175 |
-
f = h * 6 - i;
|
176 |
-
p = v * ( 1 - s );
|
177 |
-
q = v * ( 1 - f * s );
|
178 |
-
t = v * ( 1 - ( 1 - f ) * s );
|
179 |
-
|
180 |
-
switch( i % 6 ) {
|
181 |
-
case 0:
|
182 |
-
r = v; g = t; b = p;
|
183 |
-
break;
|
184 |
-
case 1:
|
185 |
-
r = q; g = v; b = p;
|
186 |
-
break;
|
187 |
-
case 2:
|
188 |
-
r = p; g = v; b = t;
|
189 |
-
break;
|
190 |
-
case 3:
|
191 |
-
r = p; g = q; b = v;
|
192 |
-
break;
|
193 |
-
case 4:
|
194 |
-
r = t; g = p; b = v;
|
195 |
-
break;
|
196 |
-
case 5:
|
197 |
-
r = v; g = p; b = q;
|
198 |
-
break;
|
199 |
-
}
|
200 |
-
|
201 |
-
return this.fromRgb( {
|
202 |
-
r: r * 255,
|
203 |
-
g: g * 255,
|
204 |
-
b: b * 255
|
205 |
-
}, true ); // true preserves hue/sat
|
206 |
-
|
207 |
-
},
|
208 |
-
// everything comes down to fromInt
|
209 |
-
fromInt: function( color, preserve ) {
|
210 |
-
this._color = parseInt( color, 10 );
|
211 |
-
|
212 |
-
if ( isNaN( this._color ) )
|
213 |
-
this._color = 0;
|
214 |
-
|
215 |
-
// let's coerce things
|
216 |
-
if ( this._color > 16777215 )
|
217 |
-
this._color = 16777215;
|
218 |
-
else if ( this._color < 0 )
|
219 |
-
this._color = 0;
|
220 |
-
|
221 |
-
// let's not do weird things
|
222 |
-
if ( preserve === undef ) {
|
223 |
-
this._hsv.h = this._hsv.s = this._hsl.h = this._hsl.s = 0;
|
224 |
-
}
|
225 |
-
// EVENT GOES HERE
|
226 |
-
return this;
|
227 |
-
},
|
228 |
-
|
229 |
-
hue2rgb: function( p, q, t ) {
|
230 |
-
if ( t < 0 ) {
|
231 |
-
t += 1;
|
232 |
-
}
|
233 |
-
if ( t > 1 ) {
|
234 |
-
t -= 1;
|
235 |
-
}
|
236 |
-
if ( t < 1/6 ) {
|
237 |
-
return p + ( q - p ) * 6 * t;
|
238 |
-
}
|
239 |
-
if ( t < 1/2 ) {
|
240 |
-
return q;
|
241 |
-
}
|
242 |
-
if ( t < 2/3 ) {
|
243 |
-
return p + ( q - p ) * ( 2/3 - t ) * 6;
|
244 |
-
}
|
245 |
-
return p;
|
246 |
-
},
|
247 |
-
|
248 |
-
toString: function() {
|
249 |
-
var hex = parseInt( this._color, 10 ).toString( 16 );
|
250 |
-
if ( this.error )
|
251 |
-
return '';
|
252 |
-
// maybe left pad it
|
253 |
-
if ( hex.length < 6 ) {
|
254 |
-
for (var i = 6 - hex.length - 1; i >= 0; i--) {
|
255 |
-
hex = '0' + hex;
|
256 |
-
}
|
257 |
-
}
|
258 |
-
return '#' + hex;
|
259 |
-
},
|
260 |
-
|
261 |
-
toCSS: function( type, alpha ) {
|
262 |
-
type = type || 'hex';
|
263 |
-
alpha = parseFloat( alpha || this._alpha );
|
264 |
-
switch ( type ) {
|
265 |
-
case 'rgb':
|
266 |
-
case 'rgba':
|
267 |
-
var rgb = this.toRgb();
|
268 |
-
if ( alpha < 1 ) {
|
269 |
-
return "rgba( " + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + alpha + " )";
|
270 |
-
}
|
271 |
-
else {
|
272 |
-
return "rgb( " + rgb.r + ", " + rgb.g + ", " + rgb.b + " )";
|
273 |
-
}
|
274 |
-
break;
|
275 |
-
case 'hsl':
|
276 |
-
case 'hsla':
|
277 |
-
var hsl = this.toHsl();
|
278 |
-
if ( alpha < 1 ) {
|
279 |
-
return "hsla( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "%, " + alpha + " )";
|
280 |
-
}
|
281 |
-
else {
|
282 |
-
return "hsl( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "% )";
|
283 |
-
}
|
284 |
-
break;
|
285 |
-
default:
|
286 |
-
return this.toString();
|
287 |
-
}
|
288 |
-
},
|
289 |
-
|
290 |
-
toRgb: function() {
|
291 |
-
return {
|
292 |
-
r: 255 & ( this._color >> 16 ),
|
293 |
-
g: 255 & ( this._color >> 8 ),
|
294 |
-
b: 255 & ( this._color )
|
295 |
-
};
|
296 |
-
},
|
297 |
-
|
298 |
-
toHsl: function() {
|
299 |
-
var rgb = this.toRgb();
|
300 |
-
var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255;
|
301 |
-
var max = Math.max( r, g, b ), min = Math.min( r, g, b );
|
302 |
-
var h, s, l = ( max + min ) / 2;
|
303 |
-
|
304 |
-
if ( max === min ) {
|
305 |
-
h = s = 0; // achromatic
|
306 |
-
} else {
|
307 |
-
var d = max - min;
|
308 |
-
s = l > 0.5 ? d / ( 2 - max - min ) : d / ( max + min );
|
309 |
-
switch ( max ) {
|
310 |
-
case r: h = ( g - b ) / d + ( g < b ? 6 : 0 );
|
311 |
-
break;
|
312 |
-
case g: h = ( b - r ) / d + 2;
|
313 |
-
break;
|
314 |
-
case b: h = ( r - g ) / d + 4;
|
315 |
-
break;
|
316 |
-
}
|
317 |
-
h /= 6;
|
318 |
-
}
|
319 |
-
|
320 |
-
// maintain hue & sat if we've been manipulating things in the HSL space.
|
321 |
-
h = Math.round( h * 360 );
|
322 |
-
if ( h === 0 && this._hsl.h !== h ) {
|
323 |
-
h = this._hsl.h;
|
324 |
-
}
|
325 |
-
s = Math.round( s * 100 );
|
326 |
-
if ( s === 0 && this._hsl.s ) {
|
327 |
-
s = this._hsl.s;
|
328 |
-
}
|
329 |
-
|
330 |
-
return {
|
331 |
-
h: h,
|
332 |
-
s: s,
|
333 |
-
l: Math.round( l * 100 )
|
334 |
-
};
|
335 |
-
|
336 |
-
},
|
337 |
-
|
338 |
-
toHsv: function() {
|
339 |
-
var rgb = this.toRgb();
|
340 |
-
var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255;
|
341 |
-
var max = Math.max( r, g, b ), min = Math.min( r, g, b );
|
342 |
-
var h, s, v = max;
|
343 |
-
var d = max - min;
|
344 |
-
s = max === 0 ? 0 : d / max;
|
345 |
-
|
346 |
-
if ( max === min ) {
|
347 |
-
h = s = 0; // achromatic
|
348 |
-
} else {
|
349 |
-
switch( max ){
|
350 |
-
case r:
|
351 |
-
h = ( g - b ) / d + ( g < b ? 6 : 0 );
|
352 |
-
break;
|
353 |
-
case g:
|
354 |
-
h = ( b - r ) / d + 2;
|
355 |
-
break;
|
356 |
-
case b:
|
357 |
-
h = ( r - g ) / d + 4;
|
358 |
-
break;
|
359 |
-
}
|
360 |
-
h /= 6;
|
361 |
-
}
|
362 |
-
|
363 |
-
// maintain hue & sat if we've been manipulating things in the HSV space.
|
364 |
-
h = Math.round( h * 360 );
|
365 |
-
if ( h === 0 && this._hsv.h !== h ) {
|
366 |
-
h = this._hsv.h;
|
367 |
-
}
|
368 |
-
s = Math.round( s * 100 );
|
369 |
-
if ( s === 0 && this._hsv.s ) {
|
370 |
-
s = this._hsv.s;
|
371 |
-
}
|
372 |
-
|
373 |
-
return {
|
374 |
-
h: h,
|
375 |
-
s: s,
|
376 |
-
v: Math.round( v * 100 )
|
377 |
-
};
|
378 |
-
},
|
379 |
-
|
380 |
-
toInt: function() {
|
381 |
-
return this._color;
|
382 |
-
},
|
383 |
-
|
384 |
-
toIEOctoHex: function() {
|
385 |
-
// AARRBBGG
|
386 |
-
var hex = this.toString();
|
387 |
-
var AA = parseInt( 255 * this._alpha, 10 ).toString(16);
|
388 |
-
if ( AA.length === 1 ) {
|
389 |
-
AA = '0' + AA;
|
390 |
-
}
|
391 |
-
return '#' + AA + hex.replace(/^#/, '' );
|
392 |
-
},
|
393 |
-
|
394 |
-
toLuminosity: function() {
|
395 |
-
var rgb = this.toRgb();
|
396 |
-
return 0.2126 * Math.pow( rgb.r / 255, 2.2 ) + 0.7152 * Math.pow( rgb.g / 255, 2.2 ) + 0.0722 * Math.pow( rgb.b / 255, 2.2);
|
397 |
-
},
|
398 |
-
|
399 |
-
getDistanceLuminosityFrom: function( color ) {
|
400 |
-
if ( ! ( color instanceof Color ) ) {
|
401 |
-
throw 'getDistanceLuminosityFrom requires a Color object';
|
402 |
-
}
|
403 |
-
var lum1 = this.toLuminosity();
|
404 |
-
var lum2 = color.toLuminosity();
|
405 |
-
if ( lum1 > lum2 ) {
|
406 |
-
return ( lum1 + 0.05 ) / ( lum2 + 0.05 );
|
407 |
-
}
|
408 |
-
else {
|
409 |
-
return ( lum2 + 0.05 ) / ( lum1 + 0.05 );
|
410 |
-
}
|
411 |
-
},
|
412 |
-
|
413 |
-
getMaxContrastColor: function() {
|
414 |
-
var lum = this.toLuminosity();
|
415 |
-
var hex = ( lum >= 0.5 ) ? '000000' : 'ffffff';
|
416 |
-
return new Color( hex );
|
417 |
-
},
|
418 |
-
|
419 |
-
getReadableContrastingColor: function( bgColor, minContrast ) {
|
420 |
-
if ( ! bgColor instanceof Color ) {
|
421 |
-
return this;
|
422 |
-
}
|
423 |
-
|
424 |
-
// you shouldn't use less than 5, but you might want to.
|
425 |
-
var targetContrast = ( minContrast === undef ) ? 5 : minContrast;
|
426 |
-
// working things
|
427 |
-
var contrast = bgColor.getDistanceLuminosityFrom( this );
|
428 |
-
var maxContrastColor = bgColor.getMaxContrastColor();
|
429 |
-
var maxContrast = maxContrastColor.getDistanceLuminosityFrom( bgColor );
|
430 |
-
|
431 |
-
// if current max contrast is less than the target contrast, we had wishful thinking.
|
432 |
-
// still, go max
|
433 |
-
if ( maxContrast <= targetContrast ) {
|
434 |
-
return maxContrastColor;
|
435 |
-
}
|
436 |
-
// or, we might already have sufficient contrast
|
437 |
-
else if ( contrast >= targetContrast ) {
|
438 |
-
return this;
|
439 |
-
}
|
440 |
-
|
441 |
-
var incr = ( 0 === maxContrastColor.toInt() ) ? -1 : 1;
|
442 |
-
while ( contrast < targetContrast ) {
|
443 |
-
this.l( incr, true ); // 2nd arg turns this into an incrementer
|
444 |
-
contrast = this.getDistanceLuminosityFrom( bgColor );
|
445 |
-
// infininite loop prevention: you never know.
|
446 |
-
if ( this._color === 0 || this._color === 16777215 ) {
|
447 |
-
break;
|
448 |
-
}
|
449 |
-
}
|
450 |
-
|
451 |
-
return this;
|
452 |
-
|
453 |
-
},
|
454 |
-
|
455 |
-
a: function( val ) {
|
456 |
-
if ( val === undef )
|
457 |
-
return this._alpha;
|
458 |
-
|
459 |
-
var a = parseFloat( val );
|
460 |
-
|
461 |
-
if ( isNaN( a ) )
|
462 |
-
return this._error();
|
463 |
-
|
464 |
-
this._alpha = a;
|
465 |
-
return this;
|
466 |
-
},
|
467 |
-
|
468 |
-
// TRANSFORMS
|
469 |
-
|
470 |
-
darken: function( amount ) {
|
471 |
-
amount = amount || 5;
|
472 |
-
return this.l( - amount, true );
|
473 |
-
},
|
474 |
-
|
475 |
-
lighten: function( amount ) {
|
476 |
-
amount = amount || 5;
|
477 |
-
return this.l( amount, true );
|
478 |
-
},
|
479 |
-
|
480 |
-
saturate: function( amount ) {
|
481 |
-
amount = amount || 15;
|
482 |
-
return this.s( amount, true );
|
483 |
-
},
|
484 |
-
|
485 |
-
desaturate: function( amount ) {
|
486 |
-
amount = amount || 15;
|
487 |
-
return this.s( - amount, true );
|
488 |
-
},
|
489 |
-
|
490 |
-
toGrayscale: function() {
|
491 |
-
return this.setHSpace('hsl').s( 0 );
|
492 |
-
},
|
493 |
-
|
494 |
-
getComplement: function() {
|
495 |
-
return this.h( 180, true );
|
496 |
-
},
|
497 |
-
|
498 |
-
getSplitComplement: function( step ) {
|
499 |
-
step = step || 1;
|
500 |
-
var incr = 180 + ( step * 30 );
|
501 |
-
return this.h( incr, true );
|
502 |
-
},
|
503 |
-
|
504 |
-
getAnalog: function( step ) {
|
505 |
-
step = step || 1;
|
506 |
-
var incr = step * 30;
|
507 |
-
return this.h( incr, true );
|
508 |
-
},
|
509 |
-
|
510 |
-
getTetrad: function( step ) {
|
511 |
-
step = step || 1;
|
512 |
-
var incr = step * 60;
|
513 |
-
return this.h( incr, true );
|
514 |
-
},
|
515 |
-
|
516 |
-
getTriad: function( step ) {
|
517 |
-
step = step || 1;
|
518 |
-
var incr = step * 120;
|
519 |
-
return this.h( incr, true );
|
520 |
-
},
|
521 |
-
|
522 |
-
_partial: function( key ) {
|
523 |
-
var prop = shortProps[key];
|
524 |
-
return function( val, incr ) {
|
525 |
-
var color = this._spaceFunc('to', prop.space);
|
526 |
-
|
527 |
-
// GETTER
|
528 |
-
if ( val === undef )
|
529 |
-
return color[key];
|
530 |
-
|
531 |
-
// INCREMENT
|
532 |
-
if ( incr === true )
|
533 |
-
val = color[key] + val;
|
534 |
-
|
535 |
-
// MOD & RANGE
|
536 |
-
if ( prop.mod )
|
537 |
-
val = val % prop.mod;
|
538 |
-
if ( prop.range )
|
539 |
-
val = ( val < prop.range[0] ) ? prop.range[0] : ( val > prop.range[1] ) ? prop.range[1] : val;
|
540 |
-
|
541 |
-
// NEW VALUE
|
542 |
-
color[key] = val;
|
543 |
-
|
544 |
-
return this._spaceFunc('from', prop.space, color);
|
545 |
-
};
|
546 |
-
},
|
547 |
-
|
548 |
-
_spaceFunc: function( dir, s, val ) {
|
549 |
-
var space = s || this._hSpace,
|
550 |
-
funcName = dir + space.charAt(0).toUpperCase() + space.substr(1);
|
551 |
-
return this[funcName](val);
|
552 |
-
}
|
553 |
-
};
|
554 |
-
|
555 |
-
var shortProps = {
|
556 |
-
h: {
|
557 |
-
mod: 360
|
558 |
-
},
|
559 |
-
s: {
|
560 |
-
range: [0,100]
|
561 |
-
},
|
562 |
-
l: {
|
563 |
-
space: 'hsl',
|
564 |
-
range: [0,100]
|
565 |
-
},
|
566 |
-
v: {
|
567 |
-
space: 'hsv',
|
568 |
-
range: [0,100]
|
569 |
-
},
|
570 |
-
r: {
|
571 |
-
space: 'rgb',
|
572 |
-
range: [0,255]
|
573 |
-
},
|
574 |
-
g: {
|
575 |
-
space: 'rgb',
|
576 |
-
range: [0,255]
|
577 |
-
},
|
578 |
-
b: {
|
579 |
-
space: 'rgb',
|
580 |
-
range: [0,255]
|
581 |
-
}
|
582 |
-
};
|
583 |
-
|
584 |
-
for ( var key in shortProps ) {
|
585 |
-
if ( shortProps.hasOwnProperty( key ) )
|
586 |
-
Color.fn[key] = Color.fn._partial(key);
|
587 |
-
}
|
588 |
-
|
589 |
-
// play nicely with Node + browser
|
590 |
-
if ( typeof exports === 'object' )
|
591 |
-
module.exports = Color;
|
592 |
-
else
|
593 |
-
global.Color = Color;
|
594 |
-
|
595 |
-
}(this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/plugin.ddslick.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function (a) { function g(a, b) { var c = a.data("ddslick"); var d = a.find(".dd-selected"), e = d.siblings(".dd-selected-value"), f = a.find(".dd-options"), g = d.siblings(".dd-pointer"), h = a.find(".dd-option").eq(b), k = h.closest("li"), l = c.settings, m = c.settings.data[b]; a.find(".dd-option").removeClass("dd-option-selected"); h.addClass("dd-option-selected"); c.selectedIndex = b; c.selectedItem = k; c.selectedData = m; if (l.showSelectedHTML) { d.html((m.imageSrc ? '<img class="dd-selected-image' + (l.imagePosition == "right" ? " dd-image-right" : "") + '" src="' + m.imageSrc + '" />' : "") + (m.text ? '<label class="dd-selected-text">' + m.text + "</label>" : "") + (m.description ? '<small class="dd-selected-description dd-desc' + (l.truncateDescription ? " dd-selected-description-truncated" : "") + '" >' + m.description + "</small>" : "")) } else d.html(m.text); e.val(m.value); c.original.val(m.value); a.data("ddslick", c); i(a); j(a); if (typeof l.onSelected == "function") { l.onSelected.call(this, c) } } function h(b) { var c = b.find(".dd-select"), d = c.siblings(".dd-options"), e = c.find(".dd-pointer"), f = d.is(":visible"); a(".dd-click-off-close").not(d).slideUp(50); a(".dd-pointer").removeClass("dd-pointer-up"); if (f) { d.slideUp("fast"); e.removeClass("dd-pointer-up") } else { d.slideDown("fast"); e.addClass("dd-pointer-up") } k(b) } function i(a) { a.find(".dd-options").slideUp(50); a.find(".dd-pointer").removeClass("dd-pointer-up").removeClass("dd-pointer-up") } function j(a) { var b = a.find(".dd-select").css("height"); var c = a.find(".dd-selected-description"); var d = a.find(".dd-selected-image"); if (c.length <= 0 && d.length > 0) { a.find(".dd-selected-text").css("lineHeight", b) } } function k(b) { b.find(".dd-option").each(function () { var c = a(this); var d = c.css("height"); var e = c.find(".dd-option-description"); var f = b.find(".dd-option-image"); if (e.length <= 0 && f.length > 0) { c.find(".dd-option-text").css("lineHeight", d) } }) } a.fn.ddslick = function (c) { if (b[c]) { return b[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else if (typeof c === "object" || !c) { return b.init.apply(this, arguments) } else { a.error("Method " + c + " does not exists.") } }; var b = {}, c = { data: [], keepJSONItemsOnTop: false, width: 260, height: null, background: "#eee", selectText: "", defaultSelectedIndex: null, truncateDescription: true, imagePosition: "left", showSelectedHTML: true, clickOffToClose: true, onSelected: function () { } }, d = '<div class="dd-select"><input class="dd-selected-value" type="hidden" /><a class="dd-selected"></a><span class="dd-pointer dd-pointer-down"></span></div>', e = '<ul class="dd-options"></ul>', f = '<style id="css-ddslick" type="text/css">' + ".dd-select{ border-radius:2px; border:solid 1px #ccc; position:relative; cursor:pointer;}" + ".dd-desc { color:#aaa; display:block; overflow: hidden; font-weight:normal; line-height: 1.4em; }" + ".dd-selected{ overflow:hidden; display:block; padding:10px; font-weight:bold;}" + ".dd-pointer{ width:0; height:0; position:absolute; right:10px; top:50%; margin-top:-3px;}" + ".dd-pointer-down{ border:solid 5px transparent; border-top:solid 5px #000; }" + ".dd-pointer-up{border:solid 5px transparent !important; border-bottom:solid 5px #000 !important; margin-top:-8px;}" + ".dd-options{ border:solid 1px #ccc; border-top:none; list-style:none; box-shadow:0px 1px 5px #ddd; display:none; position:absolute; z-index:2000; margin:0; padding:0;background:#fff; overflow:auto;}" + ".dd-option{ padding:10px; display:block; border-bottom:solid 1px #ddd; overflow:hidden; text-decoration:none; color:#333; cursor:pointer;-webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out;-o-transition: all 0.25s ease-in-out;-ms-transition: all 0.25s ease-in-out; }" + ".dd-options > li:last-child > .dd-option{ border-bottom:none;}" + ".dd-option:hover{ background:#f3f3f3; color:#000;}" + ".dd-selected-description-truncated { text-overflow: ellipsis; white-space:nowrap; }" + ".dd-option-selected { background:#f6f6f6; }" + ".dd-option-image, .dd-selected-image { vertical-align:middle; float:left; margin-right:5px; max-width:64px;}" + ".dd-image-right { float:right; margin-right:15px; margin-left:5px;}" + ".dd-container{ position:relative;} .dd-selected-text { font-weight:bold}</style>"; if (a("#css-ddslick").length <= 0) { a(f).appendTo("head") } b.init = function (b) { var b = a.extend({}, c, b); return this.each(function () { var c = a(this), f = c.data("ddslick"); if (!f) { var i = [], j = b.data; c.find("option").each(function () { var b = a(this), c = b.data(); i.push({ text: a.trim(b.text()), value: b.val(), selected: b.is(":selected"), description: c.description, imageSrc: c.imagesrc }) }); if (b.keepJSONItemsOnTop) a.merge(b.data, i); else b.data = a.merge(i, b.data); var k = c, l = a('<div id="' + c.attr("id") + '"></div>'); c.replaceWith(l); c = l; c.addClass("dd-container").append(d).append(e); var i = c.find(".dd-select"), m = c.find(".dd-options"); m.css({ width: b.width }); i.css({ width: b.width, background: b.background }); c.css({ width: b.width }); if (b.height != null) m.css({ height: b.height, overflow: "auto" }); a.each(b.data, function (a, c) { if (c.selected) b.defaultSelectedIndex = a; m.append("<li>" + '<a class="dd-option">' + (c.value ? ' <input class="dd-option-value" type="hidden" value="' + c.value + '" />' : "") + (c.imageSrc ? ' <img class="dd-option-image' + (b.imagePosition == "right" ? " dd-image-right" : "") + '" src="' + c.imageSrc + '" />' : "") + (c.text ? ' <label class="dd-option-text">' + c.text + "</label>" : "") + (c.description ? ' <small class="dd-option-description dd-desc">' + c.description + "</small>" : "") + "</a>" + "</li>") }); var n = { settings: b, original: k, selectedIndex: -1, selectedItem: null, selectedData: null }; c.data("ddslick", n); if (b.selectText.length > 0 && b.defaultSelectedIndex == null) { c.find(".dd-selected").html(b.selectText) } else { var o = b.defaultSelectedIndex != null && b.defaultSelectedIndex >= 0 && b.defaultSelectedIndex < b.data.length ? b.defaultSelectedIndex : 0; g(c, o) } c.find(".dd-select").on("click.ddslick", function () { h(c) }); c.find(".dd-option").on("click.ddslick", function () { g(c, a(this).closest("li").index()) }); if (b.clickOffToClose) { m.addClass("dd-click-off-close"); c.on("click.ddslick", function (a) { a.stopPropagation() }); a("body").on("click", function () { a(".dd-click-off-close").slideUp(50).siblings(".dd-select").find(".dd-pointer").removeClass("dd-pointer-up") }) } } }) }; b.select = function (b) { return this.each(function () { if (b.index) g(a(this), b.index) }) }; b.open = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) h(b) }) }; b.close = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) i(b) }) }; b.destroy = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) { var d = c.original; b.removeData("ddslick").unbind(".ddslick").replaceWith(d) } }) } })(jQuery);
|
|
libs/factory/bootstrap/assets/js/plugin.gradient-picker.js
DELETED
@@ -1,585 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
*jQuery gradient generator
|
3 |
-
@author Matt Crinklaw-Vogt (tantaman)
|
4 |
-
*/
|
5 |
-
(function( $ ) {
|
6 |
-
|
7 |
-
if (!$.event.special.destroyed) {
|
8 |
-
$.event.special.destroyed = {
|
9 |
-
remove: function(o) {
|
10 |
-
if (o.handler) {
|
11 |
-
o.handler();
|
12 |
-
}
|
13 |
-
}
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
//Сортирует в порядке убывания
|
19 |
-
function ctrlPtComparator(l,r) {
|
20 |
-
return l.position - r.position;
|
21 |
-
}
|
22 |
-
//Преобразует и инициализирует объекты вне области видимости
|
23 |
-
function bind(fn, ctx) {
|
24 |
-
if (typeof fn.bind === "function") {
|
25 |
-
return fn.bind(ctx);
|
26 |
-
} else {
|
27 |
-
return function() {
|
28 |
-
fn.apply(ctx, arguments);
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
var agent = window.navigator.userAgent;
|
34 |
-
var browserPrefix = ["-webkit-", "-moz-", "-ms-"];
|
35 |
-
var x,y = 0;
|
36 |
-
|
37 |
-
function GradientSelection($el, opts) {
|
38 |
-
var self = this;
|
39 |
-
|
40 |
-
this.$el = $el;
|
41 |
-
|
42 |
-
this.$presets = this.$el.find('.gradientPicker-pallets');
|
43 |
-
this.$presetsItems = this.$presets.find('.factory-preset-gradient');
|
44 |
-
|
45 |
-
this.$preview = this.$el.find(".gradientPicker-preview");
|
46 |
-
this.$pointsContainer = this.$el.find(".factory-points");
|
47 |
-
|
48 |
-
this.$colorPickerContainer = this.$el.find(".factory-color-picker-container");
|
49 |
-
this.$colorPicker = this.$el.find(".factory-color-picker");
|
50 |
-
this.$colorHex = this.$el.find(".factory-color-hex");
|
51 |
-
this.$opacitySliderContainer = this.$el.find(".factory-slider-container");
|
52 |
-
this.$opacitySlider = this.$el.find(".factory-bar");
|
53 |
-
|
54 |
-
this.$el.css("position", "relative");
|
55 |
-
this.opts = opts;
|
56 |
-
|
57 |
-
this._createPresetGradients();
|
58 |
-
this._createPreview();
|
59 |
-
this._createColorPicker();
|
60 |
-
this._createDirectionDropdown();
|
61 |
-
|
62 |
-
this.controlPoints = [];
|
63 |
-
|
64 |
-
opts.controlPoints = opts.controlPoints || [];
|
65 |
-
for (var i = 0; i < opts.controlPoints.length; ++i) {
|
66 |
-
var ctrlPt = this.createCtrlPt(opts.controlPoints[i]);
|
67 |
-
this.controlPoints.push(ctrlPt);
|
68 |
-
}
|
69 |
-
|
70 |
-
// if the gradient is not specified by default
|
71 |
-
// then we're using the first preset gradient
|
72 |
-
|
73 |
-
if ( this.controlPoints.length === 0 ) {
|
74 |
-
this.controlPoints.push( this.createCtrlPt( this.$presetsItems.data('primary') + " 0% 1" ) );
|
75 |
-
this.controlPoints.push( this.createCtrlPt( this.$presetsItems.data('secondary') + " 100% 1" ) );
|
76 |
-
}
|
77 |
-
|
78 |
-
// hides a color picker on losing the focus
|
79 |
-
$(document).on('click.gp.factory', function(){
|
80 |
-
self.hideColorPicker();
|
81 |
-
});
|
82 |
-
|
83 |
-
// doesn't hide on clicks inside the picker container
|
84 |
-
this.$colorPickerContainer.on('click.gp.factory', function(e){
|
85 |
-
e.stopPropagation();
|
86 |
-
});
|
87 |
-
|
88 |
-
this.$pointsContainer.on('click.gp.factory',function(e){
|
89 |
-
e.stopPropagation();
|
90 |
-
self.placePoint(e);
|
91 |
-
});
|
92 |
-
|
93 |
-
this.updatePreview();
|
94 |
-
}
|
95 |
-
|
96 |
-
GradientSelection.prototype = {
|
97 |
-
|
98 |
-
/* ----------------------------------------------------------------------------- */
|
99 |
-
/* Markup & Events
|
100 |
-
/* ----------------------------------------------------------------------------- */
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Creates a panel with preset gradients.
|
104 |
-
*
|
105 |
-
* @returns void
|
106 |
-
*/
|
107 |
-
_createPresetGradients: function() {
|
108 |
-
var self = this;
|
109 |
-
|
110 |
-
// painting the preset gradients
|
111 |
-
this.$presetsItems.each(function(){
|
112 |
-
var $item = $(this);
|
113 |
-
|
114 |
-
var $secondaryColorWrap = $('<span class="factory-secondary-color-wrap"></span>').appendTo( $item );
|
115 |
-
var $secondaryColor = $('<span class="factory-secondary-color"></span>').appendTo($secondaryColorWrap);
|
116 |
-
|
117 |
-
$item.css("background", $item.data('primary'));
|
118 |
-
$secondaryColor.css("background", $item.data('secondary'));
|
119 |
-
});
|
120 |
-
|
121 |
-
// set gradient on clicl
|
122 |
-
this.$presetsItems.click(function(){
|
123 |
-
var primaryColor = $(this).data('primary');
|
124 |
-
var secondaryColor = $(this).data('secondary');
|
125 |
-
self.setGradient([primaryColor + " 0% 1", secondaryColor + " 100% 1"]);
|
126 |
-
});
|
127 |
-
},
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Creates the gradient preview.
|
131 |
-
* @returns {undefined}
|
132 |
-
*/
|
133 |
-
_createPreview: function() {
|
134 |
-
|
135 |
-
var canvas = this.$preview[0];
|
136 |
-
|
137 |
-
canvas.width = canvas.clientWidth === 0 ? 210 : canvas.clientWidth;
|
138 |
-
canvas.height = canvas.clientHeight === 0 ? 30 : canvas.clientHeight;
|
139 |
-
|
140 |
-
this.g2d = canvas.getContext("2d");
|
141 |
-
},
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Creates a color picker for points.
|
145 |
-
*
|
146 |
-
* @return void
|
147 |
-
*/
|
148 |
-
_createColorPicker: function() {
|
149 |
-
var self = this;
|
150 |
-
|
151 |
-
this.$colorPicker.factoryBootstrap330_iris({
|
152 |
-
width: 217,
|
153 |
-
palettes: ['#16a086', '#27ae61', '#2a80b9', '#8f44ad', '#2d3e50', '#f49c14', '#c1392b', '#bec3c7'],
|
154 |
-
hide: true,
|
155 |
-
change: function(event, ui) {
|
156 |
-
self.currentPoint.updateColor( ui.color.toString() );
|
157 |
-
if ( !self._colorLock ) self.$colorHex.val( ui.color.toString() );
|
158 |
-
}
|
159 |
-
});
|
160 |
-
|
161 |
-
self.$colorHex.on('change paste keyup', function(){
|
162 |
-
self._colorLock = true;
|
163 |
-
self.$colorPicker.factoryBootstrap330_iris('color', self.$colorHex.val());
|
164 |
-
self._cancelColorLock();
|
165 |
-
});
|
166 |
-
|
167 |
-
this.$opacitySlider.noUiSlider({
|
168 |
-
start: 100,
|
169 |
-
range: {'min': 0, 'max': 100 },
|
170 |
-
step: 1
|
171 |
-
});
|
172 |
-
|
173 |
-
this.$opacitySlider.on('slide', function(){
|
174 |
-
var value = parseInt( self.$opacitySlider.val() );
|
175 |
-
var valueWithUnits = value + "%";
|
176 |
-
|
177 |
-
self.$opacitySliderContainer.find(".factory-visible-value").text(valueWithUnits);
|
178 |
-
self.currentPoint.updateOpacity( value / 100 );
|
179 |
-
});
|
180 |
-
|
181 |
-
this.$opacitySlider.on('set', function(){
|
182 |
-
self.$result.val( self.getValue() );
|
183 |
-
self.$result.trigger('change');
|
184 |
-
});
|
185 |
-
},
|
186 |
-
|
187 |
-
/**
|
188 |
-
* The code that allows to a dead loop when editing the hex value directly.
|
189 |
-
*/
|
190 |
-
|
191 |
-
_repeatColorLock: false,
|
192 |
-
_colorLock: false,
|
193 |
-
_colorLockTimer: false,
|
194 |
-
|
195 |
-
_cancelColorLock: function( force ) {
|
196 |
-
var self = this;
|
197 |
-
|
198 |
-
if ( self._colorLockTimer && !force ) {
|
199 |
-
this._repeatColorLock = true;
|
200 |
-
return false;
|
201 |
-
}
|
202 |
-
|
203 |
-
this._colorLockTimer = setTimeout(function(){
|
204 |
-
|
205 |
-
if ( self._repeatColorLock ) {
|
206 |
-
self._repeatColorLock = false;
|
207 |
-
self._cancelColorLock( true );
|
208 |
-
return false;
|
209 |
-
}
|
210 |
-
|
211 |
-
self._colorLock = false;
|
212 |
-
self._colorLockTimer = false;
|
213 |
-
self._repeatColorLock = false;
|
214 |
-
|
215 |
-
}, 500);
|
216 |
-
},
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Creates the gradient direction dropdown.
|
220 |
-
*
|
221 |
-
* @returns void
|
222 |
-
*/
|
223 |
-
_createDirectionDropdown: function() {
|
224 |
-
var self = this;
|
225 |
-
|
226 |
-
var resVertical = factory && factory.res && factory.res.resVertical || 'vertical';
|
227 |
-
var resHorizontal = factory && factory.res && factory.res.resHorizontal || 'horizontal';
|
228 |
-
|
229 |
-
this.$directionDropdown =
|
230 |
-
$('<select class="gradientPicker-filldirection">'+
|
231 |
-
'<option value="vertical"'+ (self.opts.fillDirection === 'top' ? ' selected' : '') +'>' + resVertical + '</option>'+
|
232 |
-
'<option value="horizontal"'+ (self.opts.fillDirection === 'left' ? ' selected' : '') +'>' + resHorizontal + '</option>'+
|
233 |
-
'</select>');
|
234 |
-
|
235 |
-
this.$el.append( this.$directionDropdown );
|
236 |
-
this.$directionDropdown.chosen();
|
237 |
-
|
238 |
-
this.$directionDropdown.change(function(){
|
239 |
-
self.setGradientDirection( $(this).val() );
|
240 |
-
});
|
241 |
-
},
|
242 |
-
|
243 |
-
/* ----------------------------------------------------------------------------- */
|
244 |
-
/* Actions
|
245 |
-
/* ----------------------------------------------------------------------------- */
|
246 |
-
|
247 |
-
/**
|
248 |
-
* Shows a color picker for the given point.
|
249 |
-
*
|
250 |
-
* @param ControlPoint point
|
251 |
-
* @returns void
|
252 |
-
*/
|
253 |
-
showColorPicker: function( point ) {
|
254 |
-
this.currentPoint = point;
|
255 |
-
|
256 |
-
$(".factory-current-point").removeClass('factory-current-point');
|
257 |
-
point.$el.addClass('factory-current-point');
|
258 |
-
|
259 |
-
this.$colorPickerContainer.show();
|
260 |
-
this.$colorPicker.factoryBootstrap330_iris( 'show' );
|
261 |
-
this.$colorPicker.factoryBootstrap330_iris( 'option', 'color', point.color );
|
262 |
-
|
263 |
-
this.$opacitySlider.val( point.opacity * 100 );
|
264 |
-
this.$opacitySlider.trigger('slide');
|
265 |
-
},
|
266 |
-
|
267 |
-
hideColorPicker: function() {
|
268 |
-
$(".factory-current-point").removeClass('factory-current-point');
|
269 |
-
this.currentPoint = false;
|
270 |
-
this.$colorPickerContainer.hide();
|
271 |
-
},
|
272 |
-
|
273 |
-
isColorPickerShown: function() {
|
274 |
-
return this.currentPoint;
|
275 |
-
},
|
276 |
-
|
277 |
-
docClicked: function() {
|
278 |
-
//this.ctrlPtConfig.hide();
|
279 |
-
$('.gradientPicker-iris-wrap').hide();
|
280 |
-
$('.gradientPicker-ctrlPt').removeClass('open');
|
281 |
-
},
|
282 |
-
|
283 |
-
createCtrlPt: function(ctrlPtSetup) {
|
284 |
-
return new ControlPoint(this, ctrlPtSetup, this.opts.orientation)
|
285 |
-
},
|
286 |
-
|
287 |
-
/**
|
288 |
-
* Upadtes given options.
|
289 |
-
*
|
290 |
-
* @param array opts
|
291 |
-
* @param bool recreatPoints
|
292 |
-
* @returns void
|
293 |
-
*/
|
294 |
-
updateOptions: function( opts, recreatPoints ) {
|
295 |
-
$.extend(this.opts, opts);
|
296 |
-
|
297 |
-
if( recreatPoints ) {
|
298 |
-
this.controlPoints = [];
|
299 |
-
this.$pointsContainer.html('');
|
300 |
-
for (var i = 0; i < this.opts.controlPoints.length; ++i) {
|
301 |
-
var ctrlPt = this.createCtrlPt(this.opts.controlPoints[i]);
|
302 |
-
this.controlPoints.push(ctrlPt);
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
this.updatePreview();
|
307 |
-
|
308 |
-
switch ( this.opts.fillDirection ) {
|
309 |
-
case 'top':
|
310 |
-
fillDirectCheck = 'horizontal';
|
311 |
-
break;
|
312 |
-
case 'left':
|
313 |
-
fillDirectCheck = 'vertical';
|
314 |
-
break;
|
315 |
-
default:
|
316 |
-
fillDirectCheck = false;
|
317 |
-
break;
|
318 |
-
}
|
319 |
-
if( fillDirectCheck )
|
320 |
-
$('.gradientPicker-filldirection', this.$el).find('option[value="' + fillDirectCheck + '"]').prop('selected', true);
|
321 |
-
|
322 |
-
|
323 |
-
},
|
324 |
-
|
325 |
-
/**
|
326 |
-
* Refreshes the gradient preview.
|
327 |
-
*
|
328 |
-
* @returns void
|
329 |
-
*/
|
330 |
-
updatePreview: function() {
|
331 |
-
|
332 |
-
var result = [];
|
333 |
-
this.controlPoints.sort(ctrlPtComparator);
|
334 |
-
|
335 |
-
this.g2d.clearRect ( 0, 0, this.g2d.canvas.width , this.g2d.canvas.height );
|
336 |
-
|
337 |
-
if (this.opts.orientation === "horizontal") {
|
338 |
-
var grad = this.g2d.createLinearGradient(0, 0, this.g2d.canvas.width, 0);
|
339 |
-
|
340 |
-
for (var i = 0; i < this.controlPoints.length; ++i) {
|
341 |
-
var pt = this.controlPoints[i];
|
342 |
-
|
343 |
-
grad.addColorStop(pt.position, "rgba(" + hexToRgb(pt.color).r + "," + hexToRgb(pt.color).g + "," + hexToRgb(pt.color).b + ", "+pt.opacity+")");
|
344 |
-
result.push({
|
345 |
-
position: pt.position,
|
346 |
-
color: pt.color,
|
347 |
-
opacity: pt.opacity
|
348 |
-
});
|
349 |
-
}
|
350 |
-
} else {
|
351 |
-
|
352 |
-
}
|
353 |
-
|
354 |
-
this.g2d.fillStyle = grad;
|
355 |
-
this.g2d.fillRect(0, 0, this.g2d.canvas.width, this.g2d.canvas.height);
|
356 |
-
|
357 |
-
if (this.opts.generateStyles)
|
358 |
-
var styles = this._generatePreviewStyles();
|
359 |
-
|
360 |
-
this.opts.change(result, styles);
|
361 |
-
},
|
362 |
-
|
363 |
-
removeControlPoint: function(ctrlPt) {
|
364 |
-
var cpidx = this.controlPoints.indexOf(ctrlPt);
|
365 |
-
|
366 |
-
if (cpidx != -1) {
|
367 |
-
this.controlPoints.splice(cpidx, 1);
|
368 |
-
ctrlPt.$el.remove();
|
369 |
-
}
|
370 |
-
},
|
371 |
-
|
372 |
-
/**
|
373 |
-
* Adds a new point.
|
374 |
-
*/
|
375 |
-
placePoint: function(e) {
|
376 |
-
e.stopPropagation();
|
377 |
-
|
378 |
-
var offset = $(e.target).offset();
|
379 |
-
var x = e.pageX - offset.left;
|
380 |
-
var y = e.pageY - offset.top;
|
381 |
-
|
382 |
-
var imgData = this.g2d.getImageData(x,y,1,1);
|
383 |
-
var colorStr = "rgb(" + imgData.data[0] + "," + imgData.data[1] + "," + imgData.data[2] + ")";
|
384 |
-
var opacity = ( 1 / 255 ) * imgData.data[3];
|
385 |
-
|
386 |
-
var cp = this.createCtrlPt({
|
387 |
-
position: x / this.g2d.canvas.width,
|
388 |
-
color: rgb2hex(colorStr),
|
389 |
-
opacity: opacity
|
390 |
-
});
|
391 |
-
|
392 |
-
this.controlPoints.push(cp);
|
393 |
-
this.controlPoints.sort(ctrlPtComparator);
|
394 |
-
|
395 |
-
this.showColorPicker( cp );
|
396 |
-
},
|
397 |
-
|
398 |
-
setGradient: function( controlPoints ) {
|
399 |
-
this.updateOptions({ controlPoints: controlPoints }, true);
|
400 |
-
this.updatePreview();
|
401 |
-
},
|
402 |
-
|
403 |
-
setGradientDirection: function( direction ){
|
404 |
-
switch ( direction ) {
|
405 |
-
case 'horizontal':
|
406 |
-
this.updateOptions({type: "linear", fillDirection: "top"}, false);
|
407 |
-
break;
|
408 |
-
case 'vertical':
|
409 |
-
this.updateOptions({type: "linear", fillDirection: "left"}, false);
|
410 |
-
break;
|
411 |
-
}
|
412 |
-
},
|
413 |
-
|
414 |
-
_generatePreviewStyles: function() {
|
415 |
-
|
416 |
-
var gradientOption = {};
|
417 |
-
gradientOption['filldirection'] = this.opts.fillDirection;
|
418 |
-
gradientOption['color_points'] = [];
|
419 |
-
|
420 |
-
for (var i = 0; i < this.controlPoints.length; ++i) {
|
421 |
-
var pt = this.controlPoints[i];
|
422 |
-
gradientOption['color_points'].push( pt.color + " " + ((pt.position*100)|0) + "% " + pt.opacity );
|
423 |
-
}
|
424 |
-
|
425 |
-
return JSON.stringify(gradientOption);
|
426 |
-
},
|
427 |
-
|
428 |
-
_genPalletsBackground: function(primaryColor, secondaryColor) {
|
429 |
-
cssRules = 'linear-gradient(90deg, '+primaryColor+' 0%, '+secondaryColor+' 100%)';
|
430 |
-
|
431 |
-
if (agent.indexOf('WebKit') >= 0)
|
432 |
-
crossBrowserRule = browserPrefix[0] + cssRules;
|
433 |
-
else if (agent.indexOf('Mozilla') >= 0)
|
434 |
-
crossBrowserRule = browserPrefix[1] + cssRules;
|
435 |
-
else if (agent.indexOf('Microsoft') >= 0)
|
436 |
-
crossBrowserRule = browserPrefix[2] + cssRules;
|
437 |
-
else
|
438 |
-
crossBrowserRule = cssRules;
|
439 |
-
|
440 |
-
return crossBrowserRule;
|
441 |
-
}
|
442 |
-
};
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Gradient Control Point
|
446 |
-
*/
|
447 |
-
function ControlPoint(parent, initialState, orientation) {
|
448 |
-
var self = this;
|
449 |
-
|
450 |
-
this.parent = parent;
|
451 |
-
this.$container = parent.$pointsContainer;
|
452 |
-
|
453 |
-
this.$el = $('<span class="factory-point"></span>');
|
454 |
-
this.$pointColor = $('<span class="factory-point-color"></span>').appendTo( this.$el );
|
455 |
-
|
456 |
-
this.$container.append( this.$el );
|
457 |
-
|
458 |
-
if (typeof initialState === "string") {
|
459 |
-
initialState = initialState.split(" ");
|
460 |
-
this.position = parseFloat(initialState[1])/100;
|
461 |
-
this.color = initialState[0];
|
462 |
-
this.opacity = initialState[2];
|
463 |
-
} else {
|
464 |
-
this.position = initialState.position;
|
465 |
-
this.color = initialState.color;
|
466 |
-
this.opacity = initialState.opacity;
|
467 |
-
}
|
468 |
-
|
469 |
-
this.outerWidth = this.$el.outerWidth();
|
470 |
-
|
471 |
-
this.$pointColor.css({
|
472 |
-
"background-color": self.color,
|
473 |
-
"opacity": self.opacity
|
474 |
-
});
|
475 |
-
|
476 |
-
if (orientation === "horizontal") {
|
477 |
-
var pxLeft = (self.$container.width() - this.$el.outerWidth()) * (this.position);
|
478 |
-
this.$el.css("left", pxLeft);
|
479 |
-
} else {
|
480 |
-
var pxTop = (self.$container.height() - this.$el.outerHeight()) * (this.position);
|
481 |
-
this.$el.css("top", pxTop);
|
482 |
-
}
|
483 |
-
|
484 |
-
this.drag = bind(this.drag, this);
|
485 |
-
this.stop = bind(this.stop, this);
|
486 |
-
|
487 |
-
this.$el.disableSelection().css('webkit-user-select','none').draggable({
|
488 |
-
axis: (orientation === "horizontal") ? "x" : "y",
|
489 |
-
drag: this.drag,
|
490 |
-
stop: this.stop,
|
491 |
-
containment: self.$container,
|
492 |
-
cancel: null
|
493 |
-
});
|
494 |
-
|
495 |
-
// shows the locker picker on click
|
496 |
-
this.$el.on('click.gp.factory', function(e){
|
497 |
-
if ( self.parent.currentPoint === self ) self.parent.hideColorPicker( self );
|
498 |
-
else self.parent.showColorPicker( self );
|
499 |
-
e.stopPropagation();
|
500 |
-
});
|
501 |
-
}
|
502 |
-
|
503 |
-
ControlPoint.prototype = {
|
504 |
-
|
505 |
-
updateColor: function( color ) {
|
506 |
-
this.color = color;
|
507 |
-
this.$pointColor.css( 'background-color', color );
|
508 |
-
|
509 |
-
this.parent.updatePreview();
|
510 |
-
},
|
511 |
-
|
512 |
-
updateOpacity: function( opacity ) {
|
513 |
-
this.opacity = opacity;
|
514 |
-
this.$pointColor.css( 'opacity', opacity );
|
515 |
-
|
516 |
-
this.parent.updatePreview();
|
517 |
-
},
|
518 |
-
|
519 |
-
drag: function(e, ui) {
|
520 |
-
|
521 |
-
var stopPointPosition = eval( this.$el.parent().offset().top + this.$el.parent().height() + 20 );
|
522 |
-
|
523 |
-
if( e.pageY > stopPointPosition ) {
|
524 |
-
this.remove();
|
525 |
-
}
|
526 |
-
|
527 |
-
// convert position to a %
|
528 |
-
var left = ui.position.left;
|
529 |
-
this.position = (left / (this.$container.width() - this.outerWidth));
|
530 |
-
|
531 |
-
this.parent.updatePreview();
|
532 |
-
},
|
533 |
-
|
534 |
-
stop: function() {
|
535 |
-
this.parent.updatePreview();
|
536 |
-
},
|
537 |
-
|
538 |
-
remove: function() {
|
539 |
-
this.parent.removeControlPoint(this);
|
540 |
-
this.parent.hideColorPicker();
|
541 |
-
this.parent.updatePreview();
|
542 |
-
}
|
543 |
-
};
|
544 |
-
|
545 |
-
var methods = {
|
546 |
-
init: function(opts) {
|
547 |
-
//orientation - Позиция пикера
|
548 |
-
//type - linear, radial
|
549 |
-
//fillDirection - направление градиента
|
550 |
-
opts = $.extend({
|
551 |
-
controlPoints: ["#FFF 0% 1", "#000 100% 1"],
|
552 |
-
orientation: "horizontal",
|
553 |
-
type: "linear",
|
554 |
-
fillDirection: "left",
|
555 |
-
generateStyles: true,
|
556 |
-
change: function() {}
|
557 |
-
}, opts);
|
558 |
-
|
559 |
-
this.each(function() {
|
560 |
-
var $this = $(this);
|
561 |
-
var gradSel = new GradientSelection($this, opts);
|
562 |
-
$this.data("gradientPicker-sel", gradSel);
|
563 |
-
});
|
564 |
-
},
|
565 |
-
|
566 |
-
update: function(opts) {
|
567 |
-
this.each(function() {
|
568 |
-
var $this = $(this);
|
569 |
-
var gradSel = $this.data("gradientPicker-sel");
|
570 |
-
if (gradSel != null) {
|
571 |
-
gradSel.updateOptions(opts, true);
|
572 |
-
}
|
573 |
-
});
|
574 |
-
}
|
575 |
-
};
|
576 |
-
|
577 |
-
$.fn.gradientPicker = function(method, opts) {
|
578 |
-
if (typeof method === "string" && method !== "init") {
|
579 |
-
methods[method].call(this, opts);
|
580 |
-
} else {
|
581 |
-
opts = method;
|
582 |
-
methods.init.call(this, opts);
|
583 |
-
}
|
584 |
-
};
|
585 |
-
})( jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/plugin.iris.js
DELETED
@@ -1,893 +0,0 @@
|
|
1 |
-
/*! Iris Color Picker - v1.0.4 - 2013-11-18
|
2 |
-
* https://github.com/Automattic/Iris
|
3 |
-
* Copyright (c) 2013 Matt Wiebe; Licensed GPLv2 */
|
4 |
-
/* global Color, jQuery */
|
5 |
-
(function( $, undef ){
|
6 |
-
var _html, nonGradientIE, gradientType, vendorPrefixes, _css, Iris, UA, isIE, IEVersion;
|
7 |
-
|
8 |
-
_html = '<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>';
|
9 |
-
// Even IE9 dosen't support gradients. Elaborate sigh.
|
10 |
-
UA = navigator.userAgent.toLowerCase();
|
11 |
-
isIE = navigator.appName === 'Microsoft Internet Explorer';
|
12 |
-
IEVersion = isIE ? parseFloat( UA.match( /msie ([0-9]{1,}[\.0-9]{0,})/ )[1] ) : 0;
|
13 |
-
nonGradientIE = ( isIE && IEVersion < 10 );
|
14 |
-
gradientType = false;
|
15 |
-
// we don't bother with an unprefixed version, as it has a different syntax
|
16 |
-
vendorPrefixes = [ '-moz-', '-webkit-', '-o-', '-ms-' ];
|
17 |
-
// This is manually copied from iris.min.css until I can figure out how to do it without
|
18 |
-
_css = '.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;top:none;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}';
|
19 |
-
// Bail for IE <= 7
|
20 |
-
if ( nonGradientIE && IEVersion <= 7 ) {
|
21 |
-
$.fn.iris = $.noop;
|
22 |
-
$.support.iris = false;
|
23 |
-
return;
|
24 |
-
}
|
25 |
-
|
26 |
-
$.support.factoryBootstrap330_iris = true;
|
27 |
-
|
28 |
-
function testGradientType() {
|
29 |
-
var el, base;
|
30 |
-
|
31 |
-
if ( nonGradientIE ) {
|
32 |
-
gradientType = 'filter';
|
33 |
-
}
|
34 |
-
else {
|
35 |
-
el = $( '<div id="iris-gradtest" />' );
|
36 |
-
base = 'linear-gradient(top,#fff,#000)';
|
37 |
-
$.each( vendorPrefixes, function( i, val ){
|
38 |
-
el.css( 'backgroundImage', val + base );
|
39 |
-
if ( el.css( 'backgroundImage').match( 'gradient' ) ) {
|
40 |
-
gradientType = i;
|
41 |
-
return false;
|
42 |
-
}
|
43 |
-
});
|
44 |
-
// check for legacy webkit gradient syntax
|
45 |
-
if ( gradientType === false ) {
|
46 |
-
el.css( 'background', '-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))' );
|
47 |
-
if ( el.css( 'backgroundImage').match( 'gradient' ) ) {
|
48 |
-
gradientType = 'webkit';
|
49 |
-
}
|
50 |
-
}
|
51 |
-
el.remove();
|
52 |
-
}
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Only for CSS3 gradients. oldIE will use a separate function.
|
58 |
-
*
|
59 |
-
* Accepts as many color stops as necessary from 2nd arg on, or 2nd
|
60 |
-
* arg can be an array of color stops
|
61 |
-
*
|
62 |
-
* @param {string} origin Gradient origin - top or left, defaults to left.
|
63 |
-
* @return {string} Appropriate CSS3 gradient string for use in
|
64 |
-
*/
|
65 |
-
function createGradient( origin, stops ) {
|
66 |
-
origin = ( origin === 'top' ) ? 'top' : 'left';
|
67 |
-
stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 );
|
68 |
-
if ( gradientType === 'webkit' ) {
|
69 |
-
return legacyWebkitGradient( origin, stops );
|
70 |
-
} else {
|
71 |
-
return vendorPrefixes[ gradientType ] + 'linear-gradient(' + origin + ', ' + stops.join(', ') + ')';
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Stupid gradients for a stupid browser.
|
77 |
-
*/
|
78 |
-
function stupidIEGradient( origin, stops ) {
|
79 |
-
var type, self, lastIndex, filter, startPosProp, endPosProp, dimensionProp, template, html;
|
80 |
-
|
81 |
-
origin = ( origin === 'top' ) ? 'top' : 'left';
|
82 |
-
stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 );
|
83 |
-
// 8 hex: AARRGGBB
|
84 |
-
// GradientType: 0 vertical, 1 horizontal
|
85 |
-
type = ( origin === 'top' ) ? 0 : 1;
|
86 |
-
self = $( this );
|
87 |
-
lastIndex = stops.length - 1;
|
88 |
-
filter = 'filter';
|
89 |
-
startPosProp = ( type === 1 ) ? 'left' : 'top';
|
90 |
-
endPosProp = ( type === 1 ) ? 'right' : 'bottom';
|
91 |
-
dimensionProp = ( type === 1 ) ? 'height' : 'width';
|
92 |
-
template = '<div class="iris-ie-gradient-shim" style="position:absolute;' + dimensionProp + ':100%;' + startPosProp + ':%start%;' + endPosProp + ':%end%;' + filter + ':%filter%;" data-color:"%color%"></div>';
|
93 |
-
html = '';
|
94 |
-
// need a positioning context
|
95 |
-
if ( self.css('position') === 'static' ) {
|
96 |
-
self.css( {position: 'relative' } );
|
97 |
-
}
|
98 |
-
|
99 |
-
stops = fillColorStops( stops );
|
100 |
-
$.each(stops, function( i, startColor ) {
|
101 |
-
var endColor, endStop, filterVal;
|
102 |
-
|
103 |
-
// we want two at a time. if we're on the last pair, bail.
|
104 |
-
if ( i === lastIndex ) {
|
105 |
-
return false;
|
106 |
-
}
|
107 |
-
|
108 |
-
endColor = stops[ i + 1 ];
|
109 |
-
//if our pairs are at the same color stop, moving along.
|
110 |
-
if ( startColor.stop === endColor.stop ) {
|
111 |
-
return;
|
112 |
-
}
|
113 |
-
|
114 |
-
endStop = 100 - parseFloat( endColor.stop ) + '%';
|
115 |
-
startColor.octoHex = new Color( startColor.color ).toIEOctoHex();
|
116 |
-
endColor.octoHex = new Color( endColor.color ).toIEOctoHex();
|
117 |
-
|
118 |
-
filterVal = 'progid:DXImageTransform.Microsoft.Gradient(GradientType=' + type + ', StartColorStr=\'' + startColor.octoHex + '\', EndColorStr=\'' + endColor.octoHex + '\')';
|
119 |
-
html += template.replace( '%start%', startColor.stop ).replace( '%end%', endStop ).replace( '%filter%', filterVal );
|
120 |
-
});
|
121 |
-
self.find( '.iris-ie-gradient-shim' ).remove();
|
122 |
-
$( html ).prependTo( self );
|
123 |
-
}
|
124 |
-
|
125 |
-
function legacyWebkitGradient( origin, colorList ) {
|
126 |
-
var stops = [];
|
127 |
-
origin = ( origin === 'top' ) ? '0% 0%,0% 100%,' : '0% 100%,100% 100%,';
|
128 |
-
colorList = fillColorStops( colorList );
|
129 |
-
$.each( colorList, function( i, val ){
|
130 |
-
stops.push( 'color-stop(' + ( parseFloat( val.stop ) / 100 ) + ', ' + val.color + ')' );
|
131 |
-
});
|
132 |
-
return '-webkit-gradient(linear,' + origin + stops.join(',') + ')';
|
133 |
-
}
|
134 |
-
|
135 |
-
function fillColorStops( colorList ) {
|
136 |
-
var colors = [],
|
137 |
-
percs = [],
|
138 |
-
newColorList = [],
|
139 |
-
lastIndex = colorList.length - 1;
|
140 |
-
|
141 |
-
$.each( colorList, function( index, val ) {
|
142 |
-
var color = val,
|
143 |
-
perc = false,
|
144 |
-
match = val.match( /1?[0-9]{1,2}%$/ );
|
145 |
-
|
146 |
-
if ( match ) {
|
147 |
-
color = val.replace( /\s?1?[0-9]{1,2}%$/, '' );
|
148 |
-
perc = match.shift();
|
149 |
-
}
|
150 |
-
colors.push( color );
|
151 |
-
percs.push( perc );
|
152 |
-
});
|
153 |
-
|
154 |
-
// back fill first and last
|
155 |
-
if ( percs[0] === false ) {
|
156 |
-
percs[0] = '0%';
|
157 |
-
}
|
158 |
-
|
159 |
-
if ( percs[lastIndex] === false ) {
|
160 |
-
percs[lastIndex] = '100%';
|
161 |
-
}
|
162 |
-
|
163 |
-
percs = backFillColorStops( percs );
|
164 |
-
|
165 |
-
$.each( percs, function( i ){
|
166 |
-
newColorList[i] = { color: colors[i], stop: percs[i] };
|
167 |
-
});
|
168 |
-
return newColorList;
|
169 |
-
}
|
170 |
-
|
171 |
-
function backFillColorStops( stops ) {
|
172 |
-
var first = 0,
|
173 |
-
last = stops.length - 1,
|
174 |
-
i = 0,
|
175 |
-
foundFirst = false,
|
176 |
-
incr,
|
177 |
-
steps,
|
178 |
-
step,
|
179 |
-
firstVal;
|
180 |
-
|
181 |
-
if ( stops.length <= 2 || $.inArray( false, stops ) < 0 ) {
|
182 |
-
return stops;
|
183 |
-
}
|
184 |
-
while ( i < stops.length - 1 ) {
|
185 |
-
if ( ! foundFirst && stops[i] === false ) {
|
186 |
-
first = i - 1;
|
187 |
-
foundFirst = true;
|
188 |
-
} else if ( foundFirst && stops[i] !== false ) {
|
189 |
-
last = i;
|
190 |
-
i = stops.length;
|
191 |
-
}
|
192 |
-
i++;
|
193 |
-
}
|
194 |
-
steps = last - first;
|
195 |
-
firstVal = parseInt( stops[first].replace('%'), 10 );
|
196 |
-
incr = ( parseFloat( stops[last].replace('%') ) - firstVal ) / steps;
|
197 |
-
i = first + 1;
|
198 |
-
step = 1;
|
199 |
-
while ( i < last ) {
|
200 |
-
stops[i] = ( firstVal + ( step * incr ) ) + '%';
|
201 |
-
step++;
|
202 |
-
i++;
|
203 |
-
}
|
204 |
-
return backFillColorStops( stops );
|
205 |
-
}
|
206 |
-
|
207 |
-
$.fn.factoryBootstrap330_gradient = function() {
|
208 |
-
var args = arguments;
|
209 |
-
return this.each( function() {
|
210 |
-
// this'll be oldishIE
|
211 |
-
if ( nonGradientIE ) {
|
212 |
-
stupidIEGradient.apply( this, args );
|
213 |
-
} else {
|
214 |
-
// new hotness
|
215 |
-
$( this ).css( 'backgroundImage', createGradient.apply( this, args ) );
|
216 |
-
}
|
217 |
-
});
|
218 |
-
};
|
219 |
-
|
220 |
-
$.fn.factoryBootstrap330_raninbowGradient = function( origin, args ) {
|
221 |
-
var opts, template, i, steps;
|
222 |
-
|
223 |
-
origin = origin || 'top';
|
224 |
-
opts = $.extend( {}, { s: 100, l: 50 }, args );
|
225 |
-
template = 'hsl(%h%,' + opts.s + '%,' + opts.l + '%)';
|
226 |
-
i = 0;
|
227 |
-
steps = [];
|
228 |
-
while ( i <= 360 ) {
|
229 |
-
steps.push( template.replace('%h%', i) );
|
230 |
-
i += 30;
|
231 |
-
}
|
232 |
-
return this.each(function() {
|
233 |
-
$(this).factoryBootstrap330_gradient( origin, steps );
|
234 |
-
});
|
235 |
-
};
|
236 |
-
|
237 |
-
// the colorpicker widget def.
|
238 |
-
Iris = {
|
239 |
-
options: {
|
240 |
-
color: false,
|
241 |
-
mode: 'hsl',
|
242 |
-
controls: {
|
243 |
-
horiz: 's', // horizontal defaults to saturation
|
244 |
-
vert: 'l', // vertical defaults to lightness
|
245 |
-
strip: 'h' // right strip defaults to hue
|
246 |
-
},
|
247 |
-
hide: true, // hide the color picker by default
|
248 |
-
border: true, // draw a border around the collection of UI elements
|
249 |
-
target: false, // a DOM element / jQuery selector that the element will be appended within. Only used when called on an input.
|
250 |
-
width: 200, // the width of the collection of UI elements
|
251 |
-
palettes: false // show a palette of basic colors beneath the square.
|
252 |
-
},
|
253 |
-
_color: '',
|
254 |
-
_palettes: [ '#000', '#fff', '#d33', '#d93', '#ee2', '#81d742', '#1e73be', '#8224e3' ],
|
255 |
-
_inited: false,
|
256 |
-
_defaultHSLControls: {
|
257 |
-
horiz: 's',
|
258 |
-
vert: 'l',
|
259 |
-
strip: 'h'
|
260 |
-
},
|
261 |
-
_defaultHSVControls: {
|
262 |
-
horiz: 'h',
|
263 |
-
vert: 'v',
|
264 |
-
strip: 's'
|
265 |
-
},
|
266 |
-
_scale: {
|
267 |
-
h: 360,
|
268 |
-
s: 100,
|
269 |
-
l: 100,
|
270 |
-
v: 100
|
271 |
-
},
|
272 |
-
_create: function() {
|
273 |
-
var self = this,
|
274 |
-
el = self.element,
|
275 |
-
color = self.options.color || el.val();
|
276 |
-
|
277 |
-
if ( gradientType === false ) {
|
278 |
-
testGradientType();
|
279 |
-
}
|
280 |
-
|
281 |
-
if ( el.is( 'input' ) ) {
|
282 |
-
if ( self.options.target ) {
|
283 |
-
self.picker = $( _html ).appendTo( self.options.target );
|
284 |
-
} else {
|
285 |
-
self.picker = $( _html ).insertAfter( el );
|
286 |
-
}
|
287 |
-
|
288 |
-
self._addInputListeners( el );
|
289 |
-
} else {
|
290 |
-
el.append( _html );
|
291 |
-
self.picker = el.find( '.iris-picker' );
|
292 |
-
}
|
293 |
-
|
294 |
-
// Browsers / Versions
|
295 |
-
// Feature detection doesn't work for these, and $.browser is deprecated
|
296 |
-
if ( isIE ) {
|
297 |
-
if ( IEVersion === 9 ) {
|
298 |
-
self.picker.addClass( 'iris-ie-9' );
|
299 |
-
} else if ( IEVersion <= 8 ) {
|
300 |
-
self.picker.addClass( 'iris-ie-lt9' );
|
301 |
-
}
|
302 |
-
} else if ( UA.indexOf('compatible') < 0 && UA.indexOf('khtml') < 0 && UA.match( /mozilla/ ) ) {
|
303 |
-
self.picker.addClass( 'iris-mozilla' );
|
304 |
-
}
|
305 |
-
|
306 |
-
if ( self.options.palettes ) {
|
307 |
-
self._addPalettes();
|
308 |
-
}
|
309 |
-
|
310 |
-
self._color = new Color( color ).setHSpace( self.options.mode );
|
311 |
-
self.options.color = self._color.toString();
|
312 |
-
|
313 |
-
// prep 'em for re-use
|
314 |
-
self.controls = {
|
315 |
-
square: self.picker.find( '.iris-square' ),
|
316 |
-
squareDrag: self.picker.find( '.iris-square-value' ),
|
317 |
-
horiz: self.picker.find( '.iris-square-horiz' ),
|
318 |
-
vert: self.picker.find( '.iris-square-vert' ),
|
319 |
-
strip: self.picker.find( '.iris-strip' ),
|
320 |
-
stripSlider: self.picker.find( '.iris-strip .iris-slider-offset' )
|
321 |
-
};
|
322 |
-
|
323 |
-
// small sanity check - if we chose hsv, change default controls away from hsl
|
324 |
-
if ( self.options.mode === 'hsv' && self._has('l', self.options.controls) ) {
|
325 |
-
self.options.controls = self._defaultHSVControls;
|
326 |
-
} else if ( self.options.mode === 'hsl' && self._has('v', self.options.controls) ) {
|
327 |
-
self.options.controls = self._defaultHSLControls;
|
328 |
-
}
|
329 |
-
|
330 |
-
// store it. HSL gets squirrely
|
331 |
-
self.hue = self._color.h();
|
332 |
-
|
333 |
-
if ( self.options.hide ) {
|
334 |
-
self.picker.hide();
|
335 |
-
}
|
336 |
-
|
337 |
-
if ( self.options.border ) {
|
338 |
-
self.picker.addClass( 'iris-border' );
|
339 |
-
}
|
340 |
-
|
341 |
-
self._initControls();
|
342 |
-
self.active = 'external';
|
343 |
-
self._dimensions();
|
344 |
-
self._change();
|
345 |
-
},
|
346 |
-
_has: function(needle, haystack) {
|
347 |
-
var ret = false;
|
348 |
-
$.each(haystack, function(i,v){
|
349 |
-
if ( needle === v ) {
|
350 |
-
ret = true;
|
351 |
-
// exit the loop
|
352 |
-
return false;
|
353 |
-
}
|
354 |
-
});
|
355 |
-
return ret;
|
356 |
-
},
|
357 |
-
_addPalettes: function () {
|
358 |
-
var container = $( '<div class="iris-palette-container" />' ),
|
359 |
-
palette = $( '<a class="iris-palette" tabindex="0" />' ),
|
360 |
-
colors = $.isArray( this.options.palettes ) ? this.options.palettes : this._palettes;
|
361 |
-
|
362 |
-
// do we have an existing container? Empty and reuse it.
|
363 |
-
if ( this.picker.find( '.iris-palette-container' ).length ) {
|
364 |
-
container = this.picker.find( '.iris-palette-container' ).detach().html( '' );
|
365 |
-
}
|
366 |
-
|
367 |
-
$.each(colors, function(index, val) {
|
368 |
-
palette.clone().data( 'color', val )
|
369 |
-
.css( 'backgroundColor', val ).appendTo( container )
|
370 |
-
.height( 10 ).width( 10 );
|
371 |
-
});
|
372 |
-
|
373 |
-
this.picker.append(container);
|
374 |
-
},
|
375 |
-
_paint: function() {
|
376 |
-
var self = this;
|
377 |
-
self._paintDimension( 'top', 'strip' );
|
378 |
-
self._paintDimension( 'top', 'vert' );
|
379 |
-
self._paintDimension( 'left', 'horiz' );
|
380 |
-
},
|
381 |
-
_paintDimension: function( origin, control ) {
|
382 |
-
var self = this,
|
383 |
-
c = self._color,
|
384 |
-
mode = self.options.mode,
|
385 |
-
color = self._getHSpaceColor(),
|
386 |
-
target = self.controls[ control ],
|
387 |
-
controlOpts = self.options.controls,
|
388 |
-
stops;
|
389 |
-
|
390 |
-
// don't paint the active control
|
391 |
-
if ( control === self.active || ( self.active === 'square' && control !== 'strip' ) ) {
|
392 |
-
return;
|
393 |
-
}
|
394 |
-
|
395 |
-
switch ( controlOpts[ control ] ) {
|
396 |
-
case 'h':
|
397 |
-
if ( mode === 'hsv' ) {
|
398 |
-
color = c.clone();
|
399 |
-
switch ( control ) {
|
400 |
-
case 'horiz':
|
401 |
-
color[controlOpts.vert](100);
|
402 |
-
break;
|
403 |
-
case 'vert':
|
404 |
-
color[controlOpts.horiz](100);
|
405 |
-
break;
|
406 |
-
case 'strip':
|
407 |
-
color.setHSpace('hsl');
|
408 |
-
break;
|
409 |
-
}
|
410 |
-
stops = color.toHsl();
|
411 |
-
} else {
|
412 |
-
if ( control === 'strip' ) {
|
413 |
-
stops = { s: color.s, l: color.l };
|
414 |
-
} else {
|
415 |
-
stops = { s: 100, l: color.l };
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
target.factoryBootstrap330_raninbowGradient( origin, stops );
|
420 |
-
break;
|
421 |
-
case 's':
|
422 |
-
if ( mode === 'hsv' ) {
|
423 |
-
if ( control === 'vert' ) {
|
424 |
-
stops = [ c.clone().a(0).s(0).toCSS('rgba'), c.clone().a(1).s(0).toCSS('rgba') ];
|
425 |
-
} else if ( control === 'strip' ) {
|
426 |
-
stops = [ c.clone().s(100).toCSS('hsl'), c.clone().s(0).toCSS('hsl') ];
|
427 |
-
} else if ( control === 'horiz' ) {
|
428 |
-
stops = [ '#fff', 'hsl(' + color.h + ',100%,50%)' ];
|
429 |
-
}
|
430 |
-
} else { // implicit mode === 'hsl'
|
431 |
-
if ( control === 'vert' && self.options.controls.horiz === 'h' ) {
|
432 |
-
stops = ['hsla(0, 0%, ' + color.l + '%, 0)', 'hsla(0, 0%, ' + color.l + '%, 1)'];
|
433 |
-
} else {
|
434 |
-
stops = ['hsl('+ color.h +',0%,50%)', 'hsl(' + color.h + ',100%,50%)'];
|
435 |
-
}
|
436 |
-
}
|
437 |
-
|
438 |
-
|
439 |
-
target.factoryBootstrap330_gradient( origin, stops );
|
440 |
-
break;
|
441 |
-
case 'l':
|
442 |
-
if ( control === 'strip' ) {
|
443 |
-
stops = ['hsl(' + color.h + ',100%,100%)', 'hsl(' + color.h + ', ' + color.s + '%,50%)', 'hsl('+ color.h +',100%,0%)'];
|
444 |
-
} else {
|
445 |
-
stops = ['#fff', 'rgba(255,255,255,0) 50%', 'rgba(0,0,0,0) 50%', 'rgba(0,0,0,1)'];
|
446 |
-
}
|
447 |
-
target.factoryBootstrap330_gradient( origin, stops );
|
448 |
-
break;
|
449 |
-
case 'v':
|
450 |
-
if ( control === 'strip' ) {
|
451 |
-
stops = [ c.clone().v(100).toCSS(), c.clone().v(0).toCSS() ];
|
452 |
-
} else {
|
453 |
-
stops = ['rgba(0,0,0,0)', '#000'];
|
454 |
-
}
|
455 |
-
target.factoryBootstrap330_gradient( origin, stops );
|
456 |
-
break;
|
457 |
-
default:
|
458 |
-
break;
|
459 |
-
}
|
460 |
-
},
|
461 |
-
|
462 |
-
_getHSpaceColor: function() {
|
463 |
-
return ( this.options.mode === 'hsv' ) ? this._color.toHsv() : this._color.toHsl();
|
464 |
-
},
|
465 |
-
|
466 |
-
_dimensions: function( reset ) {
|
467 |
-
// whatever size
|
468 |
-
var self = this,
|
469 |
-
opts = self.options,
|
470 |
-
controls = self.controls,
|
471 |
-
square = controls.square,
|
472 |
-
strip = self.picker.find( '.iris-strip' ),
|
473 |
-
squareWidth = '77.5%',
|
474 |
-
stripWidth = '12%',
|
475 |
-
totalPadding = 20,
|
476 |
-
innerWidth = opts.border ? opts.width - totalPadding : opts.width,
|
477 |
-
controlsHeight,
|
478 |
-
paletteCount = $.isArray( opts.palettes ) ? opts.palettes.length : self._palettes.length,
|
479 |
-
paletteMargin, paletteWidth, paletteContainerWidth;
|
480 |
-
|
481 |
-
if ( reset ) {
|
482 |
-
square.css( 'width', '' );
|
483 |
-
strip.css( 'width', '' );
|
484 |
-
self.picker.css( {width: '', height: ''} );
|
485 |
-
}
|
486 |
-
|
487 |
-
squareWidth = innerWidth * ( parseFloat( squareWidth ) / 100 );
|
488 |
-
stripWidth = innerWidth * ( parseFloat( stripWidth ) / 100 );
|
489 |
-
controlsHeight = opts.border ? squareWidth + totalPadding : squareWidth;
|
490 |
-
|
491 |
-
square.width( squareWidth ).height( squareWidth );
|
492 |
-
strip.height( squareWidth ).width( stripWidth );
|
493 |
-
self.picker.css( { width: opts.width, height: controlsHeight } );
|
494 |
-
|
495 |
-
if ( ! opts.palettes ) {
|
496 |
-
return self.picker.css( 'paddingBottom', '' );
|
497 |
-
}
|
498 |
-
|
499 |
-
// single margin at 2%
|
500 |
-
paletteMargin = squareWidth * 2 / 100;
|
501 |
-
paletteContainerWidth = squareWidth - ( ( paletteCount - 1 ) * paletteMargin );
|
502 |
-
paletteWidth = paletteContainerWidth / paletteCount;
|
503 |
-
self.picker.find('.iris-palette').each( function( i ) {
|
504 |
-
var margin = i === 0 ? 0 : paletteMargin;
|
505 |
-
$( this ).css({
|
506 |
-
width: paletteWidth,
|
507 |
-
height: paletteWidth,
|
508 |
-
marginLeft: margin
|
509 |
-
});
|
510 |
-
});
|
511 |
-
self.picker.css( 'paddingBottom', paletteWidth + paletteMargin );
|
512 |
-
strip.height( paletteWidth + paletteMargin + squareWidth );
|
513 |
-
},
|
514 |
-
|
515 |
-
_addInputListeners: function( input ) {
|
516 |
-
var self = this,
|
517 |
-
debounceTimeout = 100,
|
518 |
-
callback = function( event ){
|
519 |
-
var color = new Color( input.val() ),
|
520 |
-
val = input.val().replace( /^#/, '' );
|
521 |
-
|
522 |
-
input.removeClass( 'iris-error' );
|
523 |
-
// we gave a bad color
|
524 |
-
if ( color.error ) {
|
525 |
-
// don't error on an empty input - we want those allowed
|
526 |
-
if ( val !== '' ) {
|
527 |
-
input.addClass( 'iris-error' );
|
528 |
-
}
|
529 |
-
} else {
|
530 |
-
if ( color.toString() !== self._color.toString() ) {
|
531 |
-
// let's not do this on keyup for hex shortcodes
|
532 |
-
if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) {
|
533 |
-
self._setOption( 'color', color.toString() );
|
534 |
-
}
|
535 |
-
}
|
536 |
-
}
|
537 |
-
};
|
538 |
-
|
539 |
-
input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) );
|
540 |
-
|
541 |
-
// If we initialized hidden, show on first focus. The rest is up to you.
|
542 |
-
if ( self.options.hide ) {
|
543 |
-
input.one( 'focus', function() {
|
544 |
-
self.show();
|
545 |
-
});
|
546 |
-
}
|
547 |
-
},
|
548 |
-
|
549 |
-
_initControls: function() {
|
550 |
-
var self = this,
|
551 |
-
controls = self.controls,
|
552 |
-
square = controls.square,
|
553 |
-
controlOpts = self.options.controls,
|
554 |
-
stripScale = self._scale[controlOpts.strip];
|
555 |
-
|
556 |
-
controls.stripSlider.slider({
|
557 |
-
orientation: 'vertical',
|
558 |
-
max: stripScale,
|
559 |
-
slide: function( event, ui ) {
|
560 |
-
self.active = 'strip';
|
561 |
-
// "reverse" for hue.
|
562 |
-
if ( controlOpts.strip === 'h' ) {
|
563 |
-
ui.value = stripScale - ui.value;
|
564 |
-
}
|
565 |
-
|
566 |
-
self._color[controlOpts.strip]( ui.value );
|
567 |
-
self._change.apply( self, arguments );
|
568 |
-
}
|
569 |
-
});
|
570 |
-
|
571 |
-
controls.squareDrag.draggable({
|
572 |
-
containment: 'parent',
|
573 |
-
zIndex: 1000,
|
574 |
-
cursor: 'move',
|
575 |
-
drag: function( event, ui ) {
|
576 |
-
self._squareDrag( event, ui );
|
577 |
-
},
|
578 |
-
start: function() {
|
579 |
-
square.addClass( 'iris-dragging' );
|
580 |
-
$(this).addClass( 'ui-state-focus' );
|
581 |
-
},
|
582 |
-
stop: function() {
|
583 |
-
square.removeClass( 'iris-dragging' );
|
584 |
-
$(this).removeClass( 'ui-state-focus' );
|
585 |
-
}
|
586 |
-
}).on( 'mousedown mouseup', function( event ) {
|
587 |
-
var focusClass = 'ui-state-focus';
|
588 |
-
event.preventDefault();
|
589 |
-
if (event.type === 'mousedown' ) {
|
590 |
-
self.picker.find( '.' + focusClass ).removeClass( focusClass ).blur();
|
591 |
-
$(this).addClass( focusClass ).focus();
|
592 |
-
} else {
|
593 |
-
$(this).removeClass( focusClass );
|
594 |
-
}
|
595 |
-
}).on( 'keydown', function( event ) {
|
596 |
-
var container = controls.square,
|
597 |
-
draggable = controls.squareDrag,
|
598 |
-
position = draggable.position(),
|
599 |
-
distance = self.options.width / 100; // Distance in pixels the draggable should be moved: 1 "stop"
|
600 |
-
|
601 |
-
// make alt key go "10"
|
602 |
-
if ( event.altKey ) {
|
603 |
-
distance *= 10;
|
604 |
-
}
|
605 |
-
|
606 |
-
// Reposition if one of the directional keys is pressed
|
607 |
-
switch ( event.keyCode ) {
|
608 |
-
case 37: position.left -= distance; break; // Left
|
609 |
-
case 38: position.top -= distance; break; // Up
|
610 |
-
case 39: position.left += distance; break; // Right
|
611 |
-
case 40: position.top += distance; break; // Down
|
612 |
-
default: return true; // Exit and bubble
|
613 |
-
}
|
614 |
-
|
615 |
-
// Keep draggable within container
|
616 |
-
position.left = Math.max( 0, Math.min( position.left, container.width() ) );
|
617 |
-
position.top = Math.max( 0, Math.min( position.top, container.height() ) );
|
618 |
-
|
619 |
-
draggable.css(position);
|
620 |
-
self._squareDrag( event, { position: position });
|
621 |
-
event.preventDefault();
|
622 |
-
});
|
623 |
-
|
624 |
-
// allow clicking on the square to move there and keep dragging
|
625 |
-
square.mousedown( function( event ) {
|
626 |
-
var squareOffset, pos;
|
627 |
-
// only left click
|
628 |
-
if ( event.which !== 1 ) {
|
629 |
-
return;
|
630 |
-
}
|
631 |
-
|
632 |
-
// prevent bubbling from the handle: no infinite loops
|
633 |
-
if ( ! $( event.target ).is( 'div' ) ) {
|
634 |
-
return;
|
635 |
-
}
|
636 |
-
|
637 |
-
squareOffset = self.controls.square.offset();
|
638 |
-
pos = {
|
639 |
-
top: event.pageY - squareOffset.top,
|
640 |
-
left: event.pageX - squareOffset.left
|
641 |
-
};
|
642 |
-
event.preventDefault();
|
643 |
-
self._squareDrag( event, { position: pos } );
|
644 |
-
event.target = self.controls.squareDrag.get(0);
|
645 |
-
self.controls.squareDrag.css( pos ).trigger( event );
|
646 |
-
});
|
647 |
-
|
648 |
-
// palettes
|
649 |
-
if ( self.options.palettes ) {
|
650 |
-
self._paletteListeners();
|
651 |
-
}
|
652 |
-
},
|
653 |
-
|
654 |
-
_paletteListeners: function() {
|
655 |
-
var self = this;
|
656 |
-
self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function() {
|
657 |
-
self._color.fromCSS( $(this).data('color') );
|
658 |
-
self.active = 'external';
|
659 |
-
self._change();
|
660 |
-
}).on( 'keydown.palette', '.iris-palette', function( event ) {
|
661 |
-
if ( ! ( event.keyCode === 13 || event.keyCode === 32 ) ) {
|
662 |
-
return true;
|
663 |
-
}
|
664 |
-
event.stopPropagation();
|
665 |
-
$( this ).click();
|
666 |
-
});
|
667 |
-
},
|
668 |
-
|
669 |
-
_squareDrag: function( event, ui ) {
|
670 |
-
var self = this,
|
671 |
-
controlOpts = self.options.controls,
|
672 |
-
dimensions = self._squareDimensions(),
|
673 |
-
vertVal = Math.round( ( dimensions.h - ui.position.top ) / dimensions.h * self._scale[controlOpts.vert] ),
|
674 |
-
horizVal = self._scale[controlOpts.horiz] - Math.round( ( dimensions.w - ui.position.left ) / dimensions.w * self._scale[controlOpts.horiz] );
|
675 |
-
|
676 |
-
self._color[controlOpts.horiz]( horizVal )[controlOpts.vert]( vertVal );
|
677 |
-
|
678 |
-
self.active = 'square';
|
679 |
-
self._change.apply( self, arguments );
|
680 |
-
},
|
681 |
-
|
682 |
-
_setOption: function( key, value ) {
|
683 |
-
var self = this,
|
684 |
-
oldValue = self.options[key],
|
685 |
-
doDimensions = false,
|
686 |
-
hexLessColor,
|
687 |
-
newColor,
|
688 |
-
method;
|
689 |
-
|
690 |
-
// ensure the new value is set. We can reset to oldValue if some check wasn't met.
|
691 |
-
self.options[key] = value;
|
692 |
-
|
693 |
-
switch(key) {
|
694 |
-
case 'color':
|
695 |
-
// cast to string in case we have a number
|
696 |
-
value = '' + value;
|
697 |
-
hexLessColor = value.replace( /^#/, '' );
|
698 |
-
newColor = new Color( value ).setHSpace( self.options.mode );
|
699 |
-
if ( newColor.error ) {
|
700 |
-
self.options[key] = oldValue;
|
701 |
-
} else {
|
702 |
-
self._color = newColor;
|
703 |
-
self.options.color = self.options[key] = self._color.toString();
|
704 |
-
self.active = 'external';
|
705 |
-
self._change();
|
706 |
-
}
|
707 |
-
break;
|
708 |
-
case 'palettes':
|
709 |
-
doDimensions = true;
|
710 |
-
|
711 |
-
if ( value ) {
|
712 |
-
self._addPalettes();
|
713 |
-
} else {
|
714 |
-
self.picker.find('.iris-palette-container').remove();
|
715 |
-
}
|
716 |
-
|
717 |
-
// do we need to add events?
|
718 |
-
if ( ! oldValue ) {
|
719 |
-
self._paletteListeners();
|
720 |
-
}
|
721 |
-
break;
|
722 |
-
case 'width':
|
723 |
-
doDimensions = true;
|
724 |
-
break;
|
725 |
-
case 'border':
|
726 |
-
doDimensions = true;
|
727 |
-
method = value ? 'addClass' : 'removeClass';
|
728 |
-
self.picker[method]('iris-border');
|
729 |
-
break;
|
730 |
-
case 'mode':
|
731 |
-
case 'controls':
|
732 |
-
// if nothing's changed, let's bail, since this causes re-rendering the whole widget
|
733 |
-
if ( oldValue === value ) {
|
734 |
-
return;
|
735 |
-
}
|
736 |
-
|
737 |
-
// we're using these poorly named variables because they're already scoped.
|
738 |
-
// method is the element that Iris was called on. oldValue will be the options
|
739 |
-
method = self.element;
|
740 |
-
oldValue = self.options;
|
741 |
-
oldValue.hide = ! self.picker.is( ':visible' );
|
742 |
-
self.destroy();
|
743 |
-
self.picker.remove();
|
744 |
-
return $(self.element).iris(oldValue);
|
745 |
-
}
|
746 |
-
|
747 |
-
// Do we need to recalc dimensions?
|
748 |
-
if ( doDimensions ) {
|
749 |
-
self._dimensions(true);
|
750 |
-
}
|
751 |
-
},
|
752 |
-
|
753 |
-
_squareDimensions: function( forceRefresh ) {
|
754 |
-
var square = this.controls.square,
|
755 |
-
dimensions,
|
756 |
-
control;
|
757 |
-
|
758 |
-
if ( forceRefresh !== undef && square.data('dimensions') ) {
|
759 |
-
return square.data('dimensions');
|
760 |
-
}
|
761 |
-
|
762 |
-
control = this.controls.squareDrag;
|
763 |
-
dimensions = {
|
764 |
-
w: square.width(),
|
765 |
-
h: square.height()
|
766 |
-
};
|
767 |
-
square.data( 'dimensions', dimensions );
|
768 |
-
return dimensions;
|
769 |
-
},
|
770 |
-
|
771 |
-
_isNonHueControl: function( active, type ) {
|
772 |
-
if ( active === 'square' && this.options.controls.strip === 'h' ) {
|
773 |
-
return true;
|
774 |
-
} else if ( type === 'external' || ( type === 'h' && active === 'strip' ) ) {
|
775 |
-
return false;
|
776 |
-
}
|
777 |
-
|
778 |
-
return true;
|
779 |
-
},
|
780 |
-
|
781 |
-
_change: function() {
|
782 |
-
var self = this,
|
783 |
-
controls = self.controls,
|
784 |
-
color = self._getHSpaceColor(),
|
785 |
-
actions = [ 'square', 'strip' ],
|
786 |
-
controlOpts = self.options.controls,
|
787 |
-
type = controlOpts[self.active] || 'external',
|
788 |
-
oldHue = self.hue;
|
789 |
-
|
790 |
-
if ( self.active === 'strip' ) {
|
791 |
-
// take no action on any of the square sliders if we adjusted the strip
|
792 |
-
actions = [];
|
793 |
-
} else if ( self.active !== 'external' ) {
|
794 |
-
// for non-strip, non-external, strip should never change
|
795 |
-
actions.pop(); // conveniently the last item
|
796 |
-
}
|
797 |
-
|
798 |
-
$.each( actions, function(index, item) {
|
799 |
-
var value, dimensions, cssObj;
|
800 |
-
if ( item !== self.active ) {
|
801 |
-
switch ( item ) {
|
802 |
-
case 'strip':
|
803 |
-
// reverse for hue
|
804 |
-
value = ( controlOpts.strip === 'h' ) ? self._scale[controlOpts.strip] - color[controlOpts.strip] : color[controlOpts.strip];
|
805 |
-
controls.stripSlider.slider( 'value', value );
|
806 |
-
break;
|
807 |
-
case 'square':
|
808 |
-
dimensions = self._squareDimensions();
|
809 |
-
cssObj = {
|
810 |
-
left: color[controlOpts.horiz] / self._scale[controlOpts.horiz] * dimensions.w,
|
811 |
-
top: dimensions.h - ( color[controlOpts.vert] / self._scale[controlOpts.vert] * dimensions.h )
|
812 |
-
};
|
813 |
-
|
814 |
-
self.controls.squareDrag.css( cssObj );
|
815 |
-
break;
|
816 |
-
}
|
817 |
-
}
|
818 |
-
});
|
819 |
-
|
820 |
-
// Ensure that we don't change hue if we triggered a hue reset
|
821 |
-
if ( color.h !== oldHue && self._isNonHueControl( self.active, type ) ) {
|
822 |
-
self._color.h(oldHue);
|
823 |
-
}
|
824 |
-
|
825 |
-
// store hue for repeating above check next time
|
826 |
-
self.hue = self._color.h();
|
827 |
-
|
828 |
-
self.options.color = self._color.toString();
|
829 |
-
|
830 |
-
// only run after the first time
|
831 |
-
if ( self._inited ) {
|
832 |
-
self._trigger( 'change', { type: self.active }, { color: self._color } );
|
833 |
-
}
|
834 |
-
|
835 |
-
if ( self.element.is( ':input' ) && ! self._color.error ) {
|
836 |
-
self.element.removeClass( 'iris-error' );
|
837 |
-
if ( self.element.val() !== self._color.toString() ) {
|
838 |
-
self.element.val( self._color.toString() );
|
839 |
-
}
|
840 |
-
}
|
841 |
-
|
842 |
-
self._paint();
|
843 |
-
self._inited = true;
|
844 |
-
self.active = false;
|
845 |
-
},
|
846 |
-
// taken from underscore.js _.debounce method
|
847 |
-
_debounce: function( func, wait, immediate ) {
|
848 |
-
var timeout, result;
|
849 |
-
return function() {
|
850 |
-
var context = this,
|
851 |
-
args = arguments,
|
852 |
-
later,
|
853 |
-
callNow;
|
854 |
-
|
855 |
-
later = function() {
|
856 |
-
timeout = null;
|
857 |
-
if ( ! immediate) {
|
858 |
-
result = func.apply( context, args );
|
859 |
-
}
|
860 |
-
};
|
861 |
-
|
862 |
-
callNow = immediate && !timeout;
|
863 |
-
clearTimeout( timeout );
|
864 |
-
timeout = setTimeout( later, wait );
|
865 |
-
if ( callNow ) {
|
866 |
-
result = func.apply( context, args );
|
867 |
-
}
|
868 |
-
return result;
|
869 |
-
};
|
870 |
-
},
|
871 |
-
show: function() {
|
872 |
-
this.picker.show();
|
873 |
-
},
|
874 |
-
hide: function() {
|
875 |
-
this.picker.hide();
|
876 |
-
},
|
877 |
-
toggle: function() {
|
878 |
-
this.picker.toggle();
|
879 |
-
},
|
880 |
-
color: function(newColor) {
|
881 |
-
if ( newColor === true ) {
|
882 |
-
return this._color.clone();
|
883 |
-
} else if ( newColor === undef ) {
|
884 |
-
return this._color.toString();
|
885 |
-
}
|
886 |
-
this.option('color', newColor);
|
887 |
-
}
|
888 |
-
};
|
889 |
-
// initialize the widget
|
890 |
-
$.widget( 'a8c.factoryBootstrap330_iris', Iris );
|
891 |
-
// add CSS
|
892 |
-
$( '<style id="iris-css">' + _css + '</style>' ).appendTo( 'head' );
|
893 |
-
}( jQuery ));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/plugin.nouislider.js
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
/*! $.noUiSlider - WTFPL - refreshless.com/nouislider/ */
|
2 |
-
(function(e){function h(a){throw new RangeError("noUiSlider: "+a);}function x(a,b,d){(a[b]||a[d])&&a[b]===a[d]&&h("(Link) '"+b+"' can't match '"+d+"'.'")}function t(a){return"number"===typeof a&&!isNaN(a)&&isFinite(a)}function H(a){return e.isArray(a)?a:[a]}function D(a,b){a.addClass(b);setTimeout(function(){a.removeClass(b)},300)}function y(a,b){return 100*b/(a[1]-a[0])}function I(a,b){if(b>=a.d.slice(-1)[0])return 100;for(var d=1,c,g,e;b>=a.d[d];)d++;c=a.d[d-1];g=a.d[d];e=a.c[d-1];c=[c,g];return e+
|
3 |
-
y(c,0>c[0]?b+Math.abs(c[0]):b-c[0])/(100/(a.c[d]-e))}function J(a,b){for(var d=1,c;b>=a.c[d];)d++;if(a.m)return c=a.c[d-1],d=a.c[d],b-c>(d-c)/2?d:c;a.h[d-1]?(c=a.h[d-1],d=a.c[d-1]+Math.round((b-a.c[d-1])/c)*c):d=b;return d}function s(a){void 0===a&&(a={});"object"!==typeof a&&h("(Format) 'format' option must be an object.");var b={};e(K).each(function(d,c){void 0===a[c]?b[c]=z[d]:typeof a[c]===typeof z[d]?("decimals"===c&&(0>a[c]||7<a[c])&&h("(Format) 'format.decimals' option must be between 0 and 7."),
|
4 |
-
b[c]=a[c]):h("(Format) 'format."+c+"' must be a "+typeof z[d]+".")});x(b,"mark","thousand");x(b,"prefix","negative");x(b,"prefix","negativeBefore");this.B=b}function q(a,b){if(!(this instanceof q))throw Error("Link: Don't use Link as a function. Use the 'new' keyword.");if(!a)throw new RangeError("Link: missing parameters.");this.g=a.format||{};this.update=!b;var d=this,c=a.target||function(){},g=a.method,f="string"===typeof c&&0===c.indexOf("-tooltip-"),h="string"===typeof c&&0!==c.indexOf("-"),
|
5 |
-
n="function"===typeof c,r=c instanceof e||e.zepto&&e.zepto.isZ(c),E=r&&c.is("input, select, textarea"),l=r&&"function"===typeof g,s=r&&"string"===typeof g&&c[g];if(f)this.method=g||"html",this.j=e(c.replace("-tooltip-","")||"<div/>")[0];else if(h)this.method="val",this.j=document.createElement("input"),this.j.name=c,this.j.type="hidden";else if(n)this.target=!1,this.method=c;else{if(r){if(g&&(l||s)){this.target=c;this.method=g;return}if(!g&&E){this.method="val";this.target=c;this.target.on("change",
|
6 |
-
function(a){a=e(a.target).val();var b=d.q;d.u.val([b?null:a,b?a:null],{link:d})});return}if(!g&&!E){this.method="html";this.target=c;return}}throw new RangeError("Link: Invalid Link.");}}function L(a,b){t(b)||h("'step' is not numeric.");a.h[0]=b}function M(a,b){("object"!==typeof b||e.isArray(b))&&h("'range' is not an object.");e.each(b,function(b,c){var g;"number"===typeof c&&(c=[c]);e.isArray(c)||h("'range' contains invalid value.");g="min"===b?0:"max"===b?100:parseFloat(b);t(g)&&t(c[0])||h("'range' value isn't numeric.");
|
7 |
-
a.c.push(g);a.d.push(c[0]);g?a.h.push(isNaN(c[1])?!1:c[1]):isNaN(c[1])||(a.h[0]=c[1])});e.each(a.h,function(b,c){if(!c)return!0;a.h[b]=y([a.d[b],a.d[b+1]],c)/(100/(a.c[b+1]-a.c[b]))})}function N(a,b){"number"===typeof b&&(b=[b]);(!e.isArray(b)||!b.length||2<b.length)&&h("'start' option is incorrect.");a.a=b.length;a.start=b}function O(a,b){a.m=b;"boolean"!==typeof b&&h("'snap' option must be a boolean.")}function P(a,b){"lower"===b&&1===a.a?a.i=1:"upper"===b&&1===a.a?a.i=2:!0===b&&2===a.a?a.i=3:!1===
|
8 |
-
b?a.i=0:h("'connect' option was doesn't match handle count.")}function Q(a,b){switch(b){case "horizontal":a.k=0;break;case "vertical":a.k=1;break;default:h("'orientation' option is invalid.")}}function R(a,b){2<a.c.length&&h("'margin' option is only supported on linear sliders.");a.margin=y(a.d,b);t(b)||h("'margin' option must be numeric.")}function S(a,b){switch(b){case "ltr":a.dir=0;break;case "rtl":a.dir=1;a.i=[0,2,1,3][a.i];break;default:h("'direction' option was not recognized.")}}function T(a,
|
9 |
-
b){"string"!==typeof b&&h("'behaviour' must be a string containing options.");var d=0<=b.indexOf("snap");a.n={p:0<=b.indexOf("tap")||d,extend:0<=b.indexOf("extend"),s:0<=b.indexOf("drag"),fixed:0<=b.indexOf("fixed"),m:d}}function U(a,b,d){a.o=[b.lower,b.upper];a.g=new s(b.format);e.each(a.o,function(a,g){e.isArray(g)||h("'serialization."+(a?"upper":"lower")+"' must be an array.");e.each(g,function(){this instanceof q||h("'serialization."+(a?"upper":"lower")+"' can only contain Link instances.");this.q=
|
10 |
-
a;this.u=d;this.scope=this.scope||d;this.g=new s(e.extend({},b.format,this.g))})});a.dir&&1<a.a&&a.o.reverse()}function V(a,b){var d={c:[],d:[],h:[!1],margin:0},c;c={step:{e:!1,f:L},range:{e:!0,f:M},start:{e:!0,f:N},snap:{e:!1,f:O},connect:{e:!0,f:P},orientation:{e:!1,f:Q},margin:{e:!1,f:R},direction:{e:!0,f:S},behaviour:{e:!0,f:T},serialization:{e:!0,f:U}};a=e.extend({connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"},a);a.serialization=e.extend({lower:[],upper:[],format:{}},a.serialization);
|
11 |
-
e.each(c,function(c,e){if(void 0===a[c])if(e.e)h("'"+c+"' is required.");else return!0;e.f(d,a[c],b)});d.style=d.k?"top":"left";return d}function W(a,b){var d=e("<div><div/></div>").addClass(f[2]),c=["-lower","-upper"];a.dir&&c.reverse();d.children().addClass(f[3]+" "+f[3]+c[b]);return d}function X(a,b){b.j&&(b=new q({target:e(b.j).clone().appendTo(a),method:b.method,format:b.g},!0));return b}function Y(a,b){var d,c=[];for(d=0;d<a.a;d++){var e=c,f=d,h=a.o[d],n=b[d].children(),r=void 0,l=[];l.push(new q({format:a.g},
|
12 |
-
!0));for(r=0;r<h.length;r++)l.push(X(n,h[r]));e[f]=l}return c}function Z(a,b,d){switch(a){case 1:b.addClass(f[7]);d[0].addClass(f[6]);break;case 3:d[1].addClass(f[6]);case 2:d[0].addClass(f[7]);case 0:b.addClass(f[6])}}function aa(a,b){var d,c=[];for(d=0;d<a.a;d++)c.push(W(a,d).appendTo(b));return c}function ba(a,b){b.addClass([f[0],f[8+a.dir],f[4+a.k]].join(" "));return e("<div/>").appendTo(b).addClass(f[1])}function ca(a,b,d){function c(){return u[["width","height"][b.k]]()}function g(a){var b,
|
13 |
-
c=[m.val()];for(b=0;b<a.length;b++)m.trigger(a[b],c)}function h(a,c,d){var g=a[0]!==k[0][0]?1:0,p=v[0]+b.margin,F=v[1]-b.margin;d&&1<k.length&&(c=g?Math.max(c,p):Math.min(c,F));100>c&&(c=J(b,c));c=Math.max(Math.min(parseFloat(c.toFixed(7)),100),0);if(c===v[g])return 1===k.length?!1:c===p||c===F?0:!1;a.css(b.style,c+"%");a.is(":first-child")&&a.toggleClass(f[17],50<c);v[g]=c;b.dir&&(c=100-c);e(w[g]).each(function(){this.write(b,c,a.children(),m)});return!0}function q(a,b,c){c||D(m,f[14]);h(a,b,!1);
|
14 |
-
g(["slide","set","change"])}function n(a,c,d,e){a=a.replace(/\s/g,".nui ")+".nui";c.on(a,function(a){var c=m.attr("disabled");if(m.hasClass(f[14])||void 0!==c&&null!==c)return!1;a.preventDefault();var c=0===a.type.indexOf("touch"),g=0===a.type.indexOf("mouse"),B=0===a.type.indexOf("pointer"),A,h,k=a;0===a.type.indexOf("MSPointer")&&(B=!0);a.originalEvent&&(a=a.originalEvent);c&&(A=a.changedTouches[0].pageX,h=a.changedTouches[0].pageY);if(g||B)B||void 0!==window.pageXOffset||(window.pageXOffset=document.documentElement.scrollLeft,
|
15 |
-
window.pageYOffset=document.documentElement.scrollTop),A=a.clientX+window.pageXOffset,h=a.clientY+window.pageYOffset;k.v=[A,h];k.cursor=g;a=k;a.l=a.v[b.k];d(a,e)})}function r(a,b){var d=b.a||k,e,f=!1,f=100*(a.l-b.start)/c(),m=d[0][0]!==k[0][0]?1:0;var n=b.w;e=f+n[0];f+=n[1];1<d.length?(0>e&&(f+=Math.abs(e)),100<f&&(e-=f-100),e=[Math.max(Math.min(e,100),0),Math.max(Math.min(f,100),0)]):e=[e,f];f=h(d[0],e[m],1===d.length);1<d.length&&(f=h(d[1],e[m?0:1],!1)||f);f&&g(["slide"])}function s(a){e("."+f[15]).removeClass(f[15]);
|
16 |
-
a.cursor&&e("body").css("cursor","").off(".nui");C.off(".nui");m.removeClass(f[12]);g(["set","change"])}function t(a,b){1===b.a.length&&b.a[0].children().addClass(f[15]);a.stopPropagation();n(l.move,C,r,{start:a.l,a:b.a,w:[v[0],v[k.length-1]]});n(l.end,C,s,null);a.cursor&&(e("body").css("cursor",e(a.target).css("cursor")),1<k.length&&m.addClass(f[12]),e("body").on("selectstart.nui",!1))}function x(a){var d=a.l,g=0;a.stopPropagation();e.each(k,function(){g+=this.offset()[b.style]});g=d<g/2||1===k.length?
|
17 |
-
0:1;d-=u.offset()[b.style];d=100*d/c();q(k[g],d,b.n.m);b.n.m&&t(a,{a:[k[g]]})}function y(a){var c=(a=a.l<u.offset()[b.style])?0:100;a=a?0:k.length-1;q(k[a],c,!1)}var m=e(a),v=[-1,-1],u,w,k;if(!m.is(":empty"))throw Error("Slider was already initialized.");u=ba(b,m);k=aa(b,u);w=Y(b,k);Z(b.i,m,k);(function(a){var b;if(!a.fixed)for(b=0;b<k.length;b++)n(l.start,k[b].children(),t,{a:[k[b]]});a.p&&n(l.start,u,x,{a:k});a.extend&&(m.addClass(f[16]),a.p&&n(l.start,m,y,{a:k}));a.s&&(b=u.find("."+f[7]).addClass(f[10]),
|
18 |
-
a.fixed&&(b=b.add(u.children().not(b).children())),n(l.start,b,t,{a:k}))})(b.n);a.F=function(a,c,d,n,p){var l;b.dir&&1<b.a&&a.reverse();p&&D(m,f[14]);for(l=0;l<(1<k.length?3:1);l++)p=d||w[l%2][0],p=p.valueOf(a[l%2]),!1!==p&&(p=I(b,p),b.dir&&(p=100-p),!0!==h(k[l%2],p,!0)&&e(w[l%2]).each(function(){this.write(b,v[l%2],k[l%2].children(),m,n)}));!0===c&&g(["set"])};a.D=function(){var a,c=[];for(a=0;a<b.a;a++)c[a]=w[a][0].A;return 1===c.length?c[0]:b.dir&&1<b.a?c.reverse():c};a.r=function(){e.each(w,function(){e.each(this,
|
19 |
-
function(){this.target&&this.target.off(".nui")})});e(this).off(".nui").removeClass(f.join(" ")).empty();return d};m.val(b.start)}function da(a){this.length||h("Can't initialize slider on empty selection.");var b=V(a,this);return this.each(function(){ca(this,b,a)})}function ea(a){return this.each(function(){var b=e(this).val(),d=this.r(),c=e.extend({},d,a);e(this).noUiSlider(c);d.start===c.start&&e(this).val(b)})}var C=e(document),G=e.fn.val,l=window.navigator.G?{start:"pointerdown",move:"pointermove",
|
20 |
-
end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},f="noUi-target noUi-base noUi-origin noUi-handle noUi-horizontal noUi-vertical noUi-background noUi-connect noUi-ltr noUi-rtl noUi-dragable noUi-state-drag noUi-state-tap noUi-active noUi-extended noUi-stacking".split(" "),K="decimals mark thousand prefix postfix encoder decoder negative negativeBefore".split(" "),
|
21 |
-
z=[2,".","","","",function(a){return a},function(a){return a},"-",""];s.prototype.b=function(a){return this.B[a]};s.prototype.C=function(a){function b(a){return a.split("").reverse().join("")}a=this.b("encoder")(a);var d="",c="",e="",f="";0>a&&(d=this.b("negative"),c=this.b("negativeBefore"));a=Math.abs(a).toFixed(this.b("decimals")).toString();a=a.split(".");0===parseFloat(a)&&(a[0]="0");this.b("thousand")?(e=b(a[0]).match(/.{1,3}/g),e=b(e.join(b(this.b("thousand"))))):e=a[0];this.b("mark")&&1<a.length&&
|
22 |
-
(f=this.b("mark")+a[1]);return c+this.b("prefix")+d+e+f+this.b("postfix")};s.prototype.t=function(a){function b(a){return a.replace(/[\-\/\\\^$*+?.()|\[\]{}]/g,"\\$&")}var d;if(null===a||void 0===a)return!1;a=a.toString();d=a.replace(RegExp("^"+b(this.b("negativeBefore"))),"");a!==d?(a=d,d="-"):d="";a=a.replace(RegExp("^"+b(this.b("prefix"))),"");this.b.negative&&(d="",a=a.replace(RegExp("^"+b(this.b("negative"))),"-"));a=a.replace(RegExp(b(this.b("postfix"))+"$"),"").replace(RegExp(b(this.b("thousand")),
|
23 |
-
"g"),"").replace(this.b("mark"),".");a=this.b("decoder")(parseFloat(d+a));return isNaN(a)?!1:a};q.prototype.write=function(a,b,d,c,e){if(!this.update||!1!==e){if(100<=b)b=a.d.slice(-1)[0];else{e=1;for(var f,h,l;b>=a.c[e];)e++;f=a.d[e-1];h=a.d[e];l=a.c[e-1];f=[f,h];b=100/(a.c[e]-l)*(b-l)*(f[1]-f[0])/100+f[0]}this.A=b=this.format(b);if("function"===typeof this.method)this.method.call(this.target[0]||c[0],b,d,c);else this.target[this.method](b,d,c)}};q.prototype.format=function(a){return this.g.C(a)};
|
24 |
-
q.prototype.valueOf=function(a){return this.g.t(a)};e.noUiSlider={Link:q};e.fn.noUiSlider=function(a,b){return(b?ea:da).call(this,a)};e.fn.val=function(){var a=Array.prototype.slice.call(arguments,0),b,d,c,g;if(!a.length)return this.hasClass(f[0])?this[0].D():G.apply(this);"object"===typeof a[1]?(b=a[1].set,d=a[1].link,c=a[1].update,g=a[1].animate):!0===a[1]&&(b=!0);return this.each(function(){e(this).hasClass(f[0])?this.F(H(a[0]),b,d,c,g):G.apply(e(this),a)})}})(window.jQuery||window.Zepto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/bootstrap/assets/js/plugin.paddings-editor.js
DELETED
@@ -1,254 +0,0 @@
|
|
1 |
-
( function( $ ){
|
2 |
-
|
3 |
-
var PaddingsEditor = function (element) {
|
4 |
-
this.$element = $(element);
|
5 |
-
this.$rectangle = this.$element.find(".factory-rectangle");
|
6 |
-
this.$center = this.$element.find(".factory-side-center");
|
7 |
-
this.$bar = this.$element.find(".factory-bar");
|
8 |
-
this.$sides = this.$element.find(".factory-side");
|
9 |
-
this.$result = this.$element.find(".factory-result");
|
10 |
-
|
11 |
-
this.units = this.$element.data('units');
|
12 |
-
this.rangeStart = this.$element.data('range-start');
|
13 |
-
this.rangeEnd = this.$element.data('range-end');
|
14 |
-
this.step = this.$element.data('step');
|
15 |
-
|
16 |
-
this._createCanvas();
|
17 |
-
this._createSlider();
|
18 |
-
this._initMouse();
|
19 |
-
|
20 |
-
this.selectSide('center');
|
21 |
-
};
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Creates canvas for drawing control.
|
25 |
-
*/
|
26 |
-
PaddingsEditor.prototype._createCanvas = function() {
|
27 |
-
var self = this;
|
28 |
-
|
29 |
-
this._recalculateSizes();
|
30 |
-
this.$canvas = $("<canvas width='" + self.elementWidth + "' height='" + self.elementHeight + "'>")
|
31 |
-
.appendTo(this.$rectangle);
|
32 |
-
|
33 |
-
this.canvasContext = this.$canvas.get(0).getContext('2d');
|
34 |
-
|
35 |
-
this._redraw();
|
36 |
-
};
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Creates slider.
|
40 |
-
*/
|
41 |
-
PaddingsEditor.prototype._createSlider = function() {
|
42 |
-
var self = this;
|
43 |
-
|
44 |
-
this.$bar.noUiSlider({
|
45 |
-
start: parseInt( self.$center.data('value') ),
|
46 |
-
range: {'min': self.rangeStart, 'max': self.rangeEnd },
|
47 |
-
step: self.step
|
48 |
-
});
|
49 |
-
|
50 |
-
this.$bar.on('slide', function(){
|
51 |
-
var value = parseInt( self.$bar.val() );
|
52 |
-
var valueWithUnits = value + self.units;
|
53 |
-
|
54 |
-
if ( self.activeSide === 'center' ) {
|
55 |
-
self.$sides.data('value', value);
|
56 |
-
self.$sides.find(".factory-visible-value").text( valueWithUnits );
|
57 |
-
} else {
|
58 |
-
self.$activeSide.data('value', value);
|
59 |
-
self.$activeSide.find(".factory-visible-value").text( valueWithUnits );
|
60 |
-
}
|
61 |
-
});
|
62 |
-
|
63 |
-
this.$bar.on('set', function(){
|
64 |
-
self.$result.val( self.getValue() );
|
65 |
-
self.$result.trigger('change');
|
66 |
-
});
|
67 |
-
};
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Returns a current value.
|
71 |
-
*/
|
72 |
-
PaddingsEditor.prototype.getValue = function() {
|
73 |
-
var topValue = this.$element.find(".factory-side-top").data('value');
|
74 |
-
var rightValue = this.$element.find(".factory-side-right").data('value');
|
75 |
-
var bottomValue = this.$element.find(".factory-side-bottom").data('value');
|
76 |
-
var leftValue = this.$element.find(".factory-side-left").data('value');
|
77 |
-
return topValue + this.units + " " + rightValue + this.units + " " + bottomValue + this.units + " " + leftValue + this.units;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Selects a given side by its name.
|
82 |
-
*/
|
83 |
-
PaddingsEditor.prototype.selectSide = function( side ) {
|
84 |
-
if ( this.activeSide === side ) return;
|
85 |
-
|
86 |
-
this.activeSide = side;
|
87 |
-
this.$activeSide = this.$element.find(".factory-side-" + this.activeSide);
|
88 |
-
|
89 |
-
this.$element.find(".factory-side.factory-active").removeClass("factory-active");
|
90 |
-
this.$activeSide.addClass("factory-active");
|
91 |
-
|
92 |
-
this._redraw();
|
93 |
-
this.$bar.val( this.$activeSide.data('value') );
|
94 |
-
}
|
95 |
-
|
96 |
-
PaddingsEditor.prototype._initMouse = function() {
|
97 |
-
var self = this;
|
98 |
-
|
99 |
-
this._recalculateSizes();
|
100 |
-
|
101 |
-
this.$rectangle.on('mousemove.paddings-editor', function(e){
|
102 |
-
self.hoveredSide = self._getCurrentSide(e.pageX, e.pageY);
|
103 |
-
|
104 |
-
if ( self.hoveredSide === self.lastHoveredSide ) return;
|
105 |
-
self.lastHoveredSide = self.hoveredSide;
|
106 |
-
|
107 |
-
self._redraw();
|
108 |
-
});
|
109 |
-
|
110 |
-
this.$rectangle.on('mouseleave.paddings-editor', function(e){
|
111 |
-
self.hoveredSide = self.lastHoveredSide = null;
|
112 |
-
self._redraw();
|
113 |
-
});
|
114 |
-
|
115 |
-
this.$rectangle.on('click.paddings-editor', function(e){
|
116 |
-
var side = self._getCurrentSide(e.pageX, e.pageY);
|
117 |
-
self.selectSide( side );
|
118 |
-
});
|
119 |
-
};
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Returns a current side by mouse pointer position.
|
123 |
-
*/
|
124 |
-
PaddingsEditor.prototype._getCurrentSide = function(pageX, pageY) {
|
125 |
-
var offset = this.$element.offset();
|
126 |
-
|
127 |
-
var offsetX = pageX - offset.left;
|
128 |
-
var offsetY = pageY - offset.top;
|
129 |
-
|
130 |
-
var dX = offsetX - this.centerX;
|
131 |
-
var dY = offsetY - this.centerY;
|
132 |
-
var dL = Math.sqrt ( Math.pow(dX,2) + Math.pow(dY,2) );
|
133 |
-
if ( dL <= this.centerR ) return "center";
|
134 |
-
|
135 |
-
// for line #1 (from bottom-left corner to top-right conner)
|
136 |
-
var a1 = this.elementHeight;
|
137 |
-
var b1 = this.elementWidth;
|
138 |
-
var c1 = -this.elementWidth * this.elementHeight;
|
139 |
-
|
140 |
-
var resultY1 = - ( c1 + a1 * offsetX ) / b1;
|
141 |
-
|
142 |
-
// for line #2 (from bottom-left corner to top-right conner)
|
143 |
-
var a2 = -this.elementHeight;
|
144 |
-
var b2 = this.elementWidth;
|
145 |
-
var c2 = 0;
|
146 |
-
|
147 |
-
var resultY2 = - ( c2 + a2 * offsetX ) / b2;
|
148 |
-
|
149 |
-
if ( resultY1 < offsetY && resultY2 > offsetY ) return "right";
|
150 |
-
if ( resultY1 > offsetY && resultY2 < offsetY ) return "left";
|
151 |
-
if ( resultY1 > offsetY && resultY2 > offsetY ) return "top";
|
152 |
-
if ( resultY1 < offsetY && resultY2 < offsetY ) return "bottom";
|
153 |
-
return null;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Redraws the canvas.
|
158 |
-
*/
|
159 |
-
PaddingsEditor.prototype._redraw = function() {
|
160 |
-
this.canvasContext.clearRect ( 0, 0, this.elementWidth, this.elementHeight );
|
161 |
-
|
162 |
-
this._highlightSide('top', '#a6b6b6');
|
163 |
-
this._highlightSide('bottom', '#a6b6b6');
|
164 |
-
this._highlightSide('left', '#aec0c0');
|
165 |
-
this._highlightSide('right', '#aec0c0');
|
166 |
-
|
167 |
-
this._highlightSide(this.hoveredSide, '#c0cece');
|
168 |
-
if ( this.activeSide ) this._highlightSide(this.activeSide, '#829595');
|
169 |
-
}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* Hightlights hovered area.
|
173 |
-
*/
|
174 |
-
PaddingsEditor.prototype._highlightSide = function( side, style ) {
|
175 |
-
|
176 |
-
if ( !side ) return;
|
177 |
-
if ( side === 'center' ) return;
|
178 |
-
|
179 |
-
this.canvasContext.fillStyle = style;
|
180 |
-
this.canvasContext.beginPath();
|
181 |
-
|
182 |
-
if ( 'top' === side ) {
|
183 |
-
|
184 |
-
this.canvasContext.moveTo(0, 0);
|
185 |
-
this.canvasContext.lineTo(this.centerX, this.centerY);
|
186 |
-
this.canvasContext.lineTo(this.elementWidth, 0);
|
187 |
-
|
188 |
-
} else if ( 'bottom' === side ) {
|
189 |
-
|
190 |
-
this.canvasContext.moveTo(0, this.elementHeight);
|
191 |
-
this.canvasContext.lineTo(this.centerX, this.centerY);
|
192 |
-
this.canvasContext.lineTo(this.elementWidth, this.elementHeight);
|
193 |
-
|
194 |
-
} else if ( 'left' === side ) {
|
195 |
-
|
196 |
-
this.canvasContext.moveTo(0, 0);
|
197 |
-
this.canvasContext.lineTo(this.centerX, this.centerY);
|
198 |
-
this.canvasContext.lineTo(0, this.elementHeight);
|
199 |
-
|
200 |
-
} else if ( 'right' === side ) {
|
201 |
-
|
202 |
-
this.canvasContext.moveTo(this.elementWidth, 0);
|
203 |
-
this.canvasContext.lineTo(this.centerX, this.centerY);
|
204 |
-
this.canvasContext.lineTo(this.elementWidth, this.elementHeight);
|
205 |
-
}
|
206 |
-
|
207 |
-
this.canvasContext.closePath();
|
208 |
-
this.canvasContext.fill();
|
209 |
-
};
|
210 |
-
|
211 |
-
PaddingsEditor.prototype._recalculateSizes = function() {
|
212 |
-
|
213 |
-
this.elementOffset = this.$element.offset();
|
214 |
-
this.elementWidth = this.$rectangle.innerWidth();
|
215 |
-
this.elementHeight = this.$rectangle.innerHeight();
|
216 |
-
this.centerSize = this.$center.innerWidth();
|
217 |
-
|
218 |
-
this.centerR = this.centerSize / 2;
|
219 |
-
this.centerX = this.elementWidth / 2;
|
220 |
-
this.centerY = this.elementHeight / 2;
|
221 |
-
}
|
222 |
-
|
223 |
-
// INTEGER CONTROL DEFINITION
|
224 |
-
// ================================
|
225 |
-
|
226 |
-
$.fn.factoryBootstrap330_paddingsEditor = function (option) {
|
227 |
-
|
228 |
-
// call an method
|
229 |
-
if ( typeof option === "string" ) {
|
230 |
-
var data = $(this).data('factory.paddings-editor');
|
231 |
-
if ( !data ) return null;
|
232 |
-
return data[option]();
|
233 |
-
}
|
234 |
-
|
235 |
-
// creating an object
|
236 |
-
else {
|
237 |
-
return this.each(function () {
|
238 |
-
var $this = $(this);
|
239 |
-
var data = $this.data('factory.paddings-editor');
|
240 |
-
if (!data) $this.data('factory.paddings-editor', (data = new PaddingsEditor(this)));
|
241 |
-
});
|
242 |
-
}
|
243 |
-
};
|
244 |
-
|
245 |
-
$.fn.factoryBootstrap330_paddingsEditor.Constructor = PaddingsEditor;
|
246 |
-
|
247 |
-
// AUTO CREATING
|
248 |
-
// ================================
|
249 |
-
|
250 |
-
$(function(){
|
251 |
-
$(".factory-bootstrap-330 .factory-paddings-editor").factoryBootstrap330_paddingsEditor();
|
252 |
-
});
|
253 |
-
|
254 |
-
}( jQuery ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/factory/clearfy/boot.php
CHANGED
@@ -9,24 +9,24 @@
|
|
9 |
* @since 1.0.0
|
10 |
*/
|
11 |
|
12 |
-
if( defined('
|
13 |
return;
|
14 |
}
|
15 |
-
define('
|
16 |
|
17 |
-
define('
|
18 |
-
define('
|
19 |
|
20 |
-
load_plugin_textdomain('
|
21 |
|
22 |
-
require(
|
23 |
-
require(
|
24 |
|
25 |
// module provides function only for the admin area
|
26 |
if( !is_admin() ) {
|
27 |
return;
|
28 |
}
|
29 |
|
30 |
-
if( defined('
|
31 |
-
require(
|
32 |
}
|
9 |
* @since 1.0.0
|
10 |
*/
|
11 |
|
12 |
+
if( defined('FACTORY_CLEARFY_102_LOADED') ) {
|
13 |
return;
|
14 |
}
|
15 |
+
define('FACTORY_CLEARFY_102_LOADED', true);
|
16 |
|
17 |
+
define('FACTORY_CLEARFY_102_DIR', dirname(__FILE__));
|
18 |
+
define('FACTORY_CLEARFY_102_URL', plugins_url(null, __FILE__));
|
19 |
|
20 |
+
load_plugin_textdomain('factory_clearfy_102', false, dirname(plugin_basename(__FILE__)) . '/langs');
|
21 |
|
22 |
+
require(FACTORY_CLEARFY_102_DIR . '/includes/functions.php');
|
23 |
+
require(FACTORY_CLEARFY_102_DIR . '/includes/class.configurate.php');
|
24 |
|
25 |
// module provides function only for the admin area
|
26 |
if( !is_admin() ) {
|
27 |
return;
|
28 |
}
|
29 |
|
30 |
+
if( defined('FACTORY_PAGES_324_LOADED') ) {
|
31 |
+
require(FACTORY_CLEARFY_102_DIR . '/pages/more-features.php');
|
32 |
}
|
libs/factory/clearfy/includes/class.configurate.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Core plugin
|
5 |
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
@@ -7,7 +7,7 @@
|
|
7 |
* @version 1.0
|
8 |
*/
|
9 |
abstract class WbcrFactoryClearfy_Configurate {
|
10 |
-
|
11 |
public function __construct(Factory326_Plugin $plugin)
|
12 |
{
|
13 |
$this->plugin = $plugin;
|
@@ -30,4 +30,4 @@
|
|
30 |
{
|
31 |
return get_option($this->plugin->pluginName . '_' . $option_name, $default);
|
32 |
}
|
33 |
-
}
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Core plugin
|
5 |
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
7 |
* @version 1.0
|
8 |
*/
|
9 |
abstract class WbcrFactoryClearfy_Configurate {
|
10 |
+
|
11 |
public function __construct(Factory326_Plugin $plugin)
|
12 |
{
|
13 |
$this->plugin = $plugin;
|
30 |
{
|
31 |
return get_option($this->plugin->pluginName . '_' . $option_name, $default);
|
32 |
}
|
33 |
+
}
|
libs/factory/clearfy/langs/{factory_clearfy_101-fr-FR.mo → factory_clearfy_102-fr-FR.mo}
RENAMED
File without changes
|
libs/factory/clearfy/langs/{factory_clearfy_101-fr-FR.po → factory_clearfy_102-fr-FR.po}
RENAMED
File without changes
|
libs/factory/clearfy/langs/{factory_clearfy_101-ru_RU.mo → factory_clearfy_102-ru_RU.mo}
RENAMED
File without changes
|
libs/factory/clearfy/langs/{factory_clearfy_101-ru_RU.po → factory_clearfy_102-ru_RU.po}
RENAMED
File without changes
|
libs/factory/clearfy/pages/more-features.php
CHANGED
@@ -5,13 +5,13 @@
|
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
/**
|
11 |
* The id of the page in the admin menu.
|
12 |
*
|
13 |
* Mainly used to navigate between pages.
|
14 |
-
* @see
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
* @var string
|
@@ -26,14 +26,14 @@
|
|
26 |
|
27 |
public function __construct(Factory326_Plugin $plugin)
|
28 |
{
|
29 |
-
$this->menuTitle = __('More features (<b>free</b>)', '
|
30 |
|
31 |
parent::__construct($plugin);
|
32 |
}
|
33 |
|
34 |
public function getPageTitle()
|
35 |
{
|
36 |
-
return __('install the ultimate version of the plugin for free!', '
|
37 |
}
|
38 |
|
39 |
public function showPageContent()
|
@@ -44,90 +44,90 @@
|
|
44 |
<div class="wbcr-factory-feature-box">
|
45 |
<span class="dashicons dashicons-yes"></span>
|
46 |
|
47 |
-
<h3><?php _e('Code cleaning', '
|
48 |
|
49 |
-
<p><?php _e('Clears the source code of the page from unused code.', '
|
50 |
</div>
|
51 |
</div>
|
52 |
<div class="col-sm-4">
|
53 |
<div class="wbcr-factory-feature-box">
|
54 |
<span class="dashicons dashicons-chart-bar"></span>
|
55 |
|
56 |
-
<h3><?php _e('Improve SEO', '
|
57 |
|
58 |
-
<p><?php _e('Removes duplicate pages, closes external links, changes the headers of the server.', '
|
59 |
</div>
|
60 |
</div>
|
61 |
<div class="col-sm-4">
|
62 |
<div class="wbcr-factory-feature-box">
|
63 |
<span class="dashicons dashicons-shield-alt"></span>
|
64 |
|
65 |
-
<h3><?php _e('Site ptotection', '
|
66 |
|
67 |
-
<p><?php _e('Enables and disables features that improve the protection of your site.', '
|
68 |
</div>
|
69 |
</div>
|
70 |
<div class="col-sm-4">
|
71 |
<div class="wbcr-factory-feature-box">
|
72 |
<span class="dashicons dashicons-welcome-comments"></span>
|
73 |
|
74 |
-
<h3><?php _e('Disable comments', '
|
75 |
|
76 |
-
<p><?php _e('Disables comments on the entire site or on specific pages.', '
|
77 |
</div>
|
78 |
</div>
|
79 |
<div class="col-sm-4">
|
80 |
<div class="wbcr-factory-feature-box">
|
81 |
<span class="dashicons dashicons-update"></span>
|
82 |
|
83 |
-
<h3><?php _e('Manage updates', '
|
84 |
|
85 |
<p><?php _e('Enables or disables automatically updates for plugins, themes and core. It is also possible
|
86 |
-
to disable all updates.', '
|
87 |
</div>
|
88 |
</div>
|
89 |
<div class="col-sm-4">
|
90 |
<div class="wbcr-factory-feature-box">
|
91 |
<span class="dashicons dashicons-admin-plugins"></span>
|
92 |
|
93 |
-
<h3><?php _e('Manage widgets', '
|
94 |
|
95 |
-
<p><?php _e('Allows you to remove unused widgets.', '
|
96 |
</div>
|
97 |
</div>
|
98 |
<div class="col-sm-4">
|
99 |
<div class="wbcr-factory-feature-box">
|
100 |
<span class="dashicons dashicons-dashboard"></span>
|
101 |
|
102 |
-
<h3><?php _e('Speed Optimization', '
|
103 |
|
104 |
-
<p><?php _e('Increases performance by disabling unused functions and reducing the number of requests.', '
|
105 |
</div>
|
106 |
</div>
|
107 |
<div class="col-sm-4">
|
108 |
<div class="wbcr-factory-feature-box">
|
109 |
<span class="dashicons dashicons-visibility"></span>
|
110 |
|
111 |
-
<h3><?php _e('Site privacy', '
|
112 |
|
113 |
<p><?php _e('Allows you to hide the version of the site and plugins. Allows you to hide your
|
114 |
-
WordPress.', '
|
115 |
</div>
|
116 |
</div>
|
117 |
<div class="col-sm-4">
|
118 |
<div class="wbcr-factory-feature-box">
|
119 |
<span class="dashicons dashicons-admin-settings"></span>
|
120 |
|
121 |
-
<h3><?php _e('Easy setup', '
|
122 |
|
123 |
-
<p><?php _e('In quick mode, you can easily configure the plugin according to your needs.', '
|
124 |
</div>
|
125 |
</div>
|
126 |
</div>
|
127 |
|
128 |
<div class="wbcr-factory-buttons-wrap">
|
129 |
<a href="https://goo.gl/TcMcS4" class="wbcr-factory-premium-button" target="_blank">
|
130 |
-
<?php _e('Get the ultimate plugin 100% FREE', '
|
131 |
</a>
|
132 |
</div>
|
133 |
<?php
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
+
class FactoryClearfy102_MoreFeaturesPage extends FactoryPages324_ImpressiveThemplate {
|
9 |
|
10 |
/**
|
11 |
* The id of the page in the admin menu.
|
12 |
*
|
13 |
* Mainly used to navigate between pages.
|
14 |
+
* @see FactoryPages324_AdminPage
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
* @var string
|
26 |
|
27 |
public function __construct(Factory326_Plugin $plugin)
|
28 |
{
|
29 |
+
$this->menuTitle = __('More features (<b>free</b>)', 'factory_clearfy_102');
|
30 |
|
31 |
parent::__construct($plugin);
|
32 |
}
|
33 |
|
34 |
public function getPageTitle()
|
35 |
{
|
36 |
+
return __('install the ultimate version of the plugin for free!', 'factory_clearfy_102');
|
37 |
}
|
38 |
|
39 |
public function showPageContent()
|
44 |
<div class="wbcr-factory-feature-box">
|
45 |
<span class="dashicons dashicons-yes"></span>
|
46 |
|
47 |
+
<h3><?php _e('Code cleaning', 'factory_clearfy_102')?></h3>
|
48 |
|
49 |
+
<p><?php _e('Clears the source code of the page from unused code.', 'factory_clearfy_102')?></p>
|
50 |
</div>
|
51 |
</div>
|
52 |
<div class="col-sm-4">
|
53 |
<div class="wbcr-factory-feature-box">
|
54 |
<span class="dashicons dashicons-chart-bar"></span>
|
55 |
|
56 |
+
<h3><?php _e('Improve SEO', 'factory_clearfy_102')?></h3>
|
57 |
|
58 |
+
<p><?php _e('Removes duplicate pages, closes external links, changes the headers of the server.', 'factory_clearfy_102')?></p>
|
59 |
</div>
|
60 |
</div>
|
61 |
<div class="col-sm-4">
|
62 |
<div class="wbcr-factory-feature-box">
|
63 |
<span class="dashicons dashicons-shield-alt"></span>
|
64 |
|
65 |
+
<h3><?php _e('Site ptotection', 'factory_clearfy_102')?></h3>
|
66 |
|
67 |
+
<p><?php _e('Enables and disables features that improve the protection of your site.', 'factory_clearfy_102')?></p>
|
68 |
</div>
|
69 |
</div>
|
70 |
<div class="col-sm-4">
|
71 |
<div class="wbcr-factory-feature-box">
|
72 |
<span class="dashicons dashicons-welcome-comments"></span>
|
73 |
|
74 |
+
<h3><?php _e('Disable comments', 'factory_clearfy_102')?></h3>
|
75 |
|
76 |
+
<p><?php _e('Disables comments on the entire site or on specific pages.', 'factory_clearfy_102')?></p>
|
77 |
</div>
|
78 |
</div>
|
79 |
<div class="col-sm-4">
|
80 |
<div class="wbcr-factory-feature-box">
|
81 |
<span class="dashicons dashicons-update"></span>
|
82 |
|
83 |
+
<h3><?php _e('Manage updates', 'factory_clearfy_102')?></h3>
|
84 |
|
85 |
<p><?php _e('Enables or disables automatically updates for plugins, themes and core. It is also possible
|
86 |
+
to disable all updates.', 'factory_clearfy_102')?></p>
|
87 |
</div>
|
88 |
</div>
|
89 |
<div class="col-sm-4">
|
90 |
<div class="wbcr-factory-feature-box">
|
91 |
<span class="dashicons dashicons-admin-plugins"></span>
|
92 |
|
93 |
+
<h3><?php _e('Manage widgets', 'factory_clearfy_102')?></h3>
|
94 |
|
95 |
+
<p><?php _e('Allows you to remove unused widgets.', 'factory_clearfy_102')?></p>
|
96 |
</div>
|
97 |
</div>
|
98 |
<div class="col-sm-4">
|
99 |
<div class="wbcr-factory-feature-box">
|
100 |
<span class="dashicons dashicons-dashboard"></span>
|
101 |
|
102 |
+
<h3><?php _e('Speed Optimization', 'factory_clearfy_102')?></h3>
|
103 |
|
104 |
+
<p><?php _e('Increases performance by disabling unused functions and reducing the number of requests.', 'factory_clearfy_102')?></p>
|
105 |
</div>
|
106 |
</div>
|
107 |
<div class="col-sm-4">
|
108 |
<div class="wbcr-factory-feature-box">
|
109 |
<span class="dashicons dashicons-visibility"></span>
|
110 |
|
111 |
+
<h3><?php _e('Site privacy', 'factory_clearfy_102')?></h3>
|
112 |
|
113 |
<p><?php _e('Allows you to hide the version of the site and plugins. Allows you to hide your
|
114 |
+
WordPress.', 'factory_clearfy_102')?></p>
|
115 |
</div>
|
116 |
</div>
|
117 |
<div class="col-sm-4">
|
118 |
<div class="wbcr-factory-feature-box">
|
119 |
<span class="dashicons dashicons-admin-settings"></span>
|
120 |
|
121 |
+
<h3><?php _e('Easy setup', 'factory_clearfy_102')?></h3>
|
122 |
|
123 |
+
<p><?php _e('In quick mode, you can easily configure the plugin according to your needs.', 'factory_clearfy_102')?></p>
|
124 |
</div>
|
125 |
</div>
|
126 |
</div>
|
127 |
|
128 |
<div class="wbcr-factory-buttons-wrap">
|
129 |
<a href="https://goo.gl/TcMcS4" class="wbcr-factory-premium-button" target="_blank">
|
130 |
+
<?php _e('Get the ultimate plugin 100% FREE', 'factory_clearfy_102')?>
|
131 |
</a>
|
132 |
</div>
|
133 |
<?php
|
libs/factory/forms/boot.php
CHANGED
@@ -119,6 +119,16 @@
|
|
119 |
'class' => 'FactoryForms329_TextboxControl',
|
120 |
'include' => FACTORY_FORMS_329_DIR . '/controls/textbox.php'
|
121 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
array(
|
123 |
'type' => 'url',
|
124 |
'class' => 'FactoryForms329_UrlControl',
|
119 |
'class' => 'FactoryForms329_TextboxControl',
|
120 |
'include' => FACTORY_FORMS_329_DIR . '/controls/textbox.php'
|
121 |
),
|
122 |
+
array(
|
123 |
+
'type' => 'multiple-textbox',
|
124 |
+
'class' => 'FactoryForms329_MultipleTextboxControl',
|
125 |
+
'include' => FACTORY_FORMS_329_DIR . '/controls/multiple-textbox.php'
|
126 |
+
),
|
127 |
+
array(
|
128 |
+
'type' => 'datetimepicker-range',
|
129 |
+
'class' => 'FactoryForms329_DatepickerRangeControl',
|
130 |
+
'include' => FACTORY_FORMS_329_DIR . '/controls/datepicker-range.php'
|
131 |
+
),
|
132 |
array(
|
133 |
'type' => 'url',
|
134 |
'class' => 'FactoryForms329_UrlControl',
|
libs/factory/forms/controls/customs/html.php
CHANGED
@@ -1,38 +1,37 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
-
* Html Markup
|
4 |
-
*
|
5 |
-
* @author Paul Kashtanoff <paul@byonepress.com>
|
6 |
-
* @copyright (c) 2013, OnePress Ltd
|
7 |
-
*
|
8 |
-
* @package factory-forms
|
9 |
-
* @since 1.0.0
|
10 |
-
*/
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
public function html( ) {
|
23 |
-
$html = $this->getOption('html', '');
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
/**
|
4 |
+
* Html Markup
|
5 |
+
*
|
6 |
+
* @author Paul Kashtanoff <paul@byonepress.com>
|
7 |
+
* @copyright (c) 2013, OnePress Ltd
|
8 |
+
*
|
9 |
+
* @package factory-forms
|
10 |
+
* @since 1.0.0
|
11 |
+
*/
|
12 |
+
class FactoryForms329_Html extends FactoryForms329_CustomElement {
|
|
|
|
|
13 |
|
14 |
+
public $type = 'html';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Shows the html markup of the element.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function html()
|
23 |
+
{
|
24 |
+
$html = $this->getOption('html', '');
|
25 |
+
|
26 |
+
// if the data options is a valid callback for an object method
|
27 |
+
if( (is_array($html) && count($html) == 2 && gettype($html[0]) == 'object') || function_exists($html) ) {
|
28 |
+
|
29 |
+
call_user_func($html, $this);
|
30 |
+
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
// if the data options is an array of values
|
35 |
+
echo $html;
|
36 |
+
}
|
37 |
+
}
|
libs/factory/forms/controls/datepicker-range.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Datepicker range control
|
5 |
+
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
6 |
+
* @copyright (c) 22.11.2017, Webcraftic
|
7 |
+
*
|
8 |
+
* Example:
|
9 |
+
* 'type' => 'datetimepicker-range',
|
10 |
+
* 'name' => 'facebook_start_date_filter',
|
11 |
+
* 'range_1' => array(
|
12 |
+
* 'format' => 'YYYY/MM/DD HH:mm',
|
13 |
+
* 'default' => date('Y/m/d H:i', strtotime('-1 week'))
|
14 |
+
* ),
|
15 |
+
* 'range_2' => array(
|
16 |
+
* 'format' => 'YYYY/MM/DD HH:mm',
|
17 |
+
* 'default' => date('Y/m/d H:i')
|
18 |
+
* ),
|
19 |
+
* 'title' => __('Выберите период', 'wpcr-scrapes'),
|
20 |
+
* 'hint' => __('Если Вкл., вы сможете установить настройки выбора записей за установленный период времени.', 'wpcr-scrapes')
|
21 |
+
*
|
22 |
+
* @package factory-forms
|
23 |
+
* @since 1.0.0
|
24 |
+
*/
|
25 |
+
class FactoryForms329_DatepickerRangeControl extends FactoryForms329_ComplexControl {
|
26 |
+
|
27 |
+
public $type = 'datetimepicker-range';
|
28 |
+
|
29 |
+
public function __construct($options, $form, $provider = null)
|
30 |
+
{
|
31 |
+
parent::__construct($options, $form, $provider);
|
32 |
+
|
33 |
+
if( !isset($options['range_1']) ) {
|
34 |
+
$options['range_1'] = array();
|
35 |
+
}
|
36 |
+
|
37 |
+
$options['range_1'] = array_merge(array(
|
38 |
+
'scope' => isset($options['scope'])
|
39 |
+
? $options['scope']
|
40 |
+
: 'factory',
|
41 |
+
'name' => $this->options['name'] . '__range_1',
|
42 |
+
'format' => 'YYYY/MM/DD HH:mm',
|
43 |
+
'default' => date('Y/m/d H:i')
|
44 |
+
), $options['range_1']);
|
45 |
+
|
46 |
+
if( !isset($options['range_2']) ) {
|
47 |
+
$options['range_2'] = array();
|
48 |
+
}
|
49 |
+
|
50 |
+
$options['range_2'] = array_merge(array(
|
51 |
+
'scope' => isset($options['scope'])
|
52 |
+
? $options['scope']
|
53 |
+
: 'factory',
|
54 |
+
'name' => $this->options['name'] . '__range_2',
|
55 |
+
'format' => 'YYYY/MM/DD HH:mm',
|
56 |
+
'default' => date('Y/m/d H:i', strtotime("+1 month"))
|
57 |
+
), $options['range_2']);
|
58 |
+
|
59 |
+
$this->range_1 = new FactoryForms329_TextboxControl($options['range_1'], $form, $provider);
|
60 |
+
$this->range_2 = new FactoryForms329_TextboxControl($options['range_2'], $form, $provider);
|
61 |
+
$this->innerControls = array($this->range_1, $this->range_2);
|
62 |
+
|
63 |
+
foreach($this->innerControls as $key => $control) {
|
64 |
+
$control->addCssClass('factory-datetimepicker-range-' . $key);
|
65 |
+
$control->addHtmlAttr('data-date-show-today-button', 'true');
|
66 |
+
$control->addHtmlAttr('data-date-show-clear', 'true');
|
67 |
+
|
68 |
+
$format = $control->getOption('format');
|
69 |
+
|
70 |
+
if( !empty($format) ) {
|
71 |
+
//'YYYY/MM/DD HH:mm'
|
72 |
+
$control->addHtmlAttr('data-date-format', $format);
|
73 |
+
}
|
74 |
+
|
75 |
+
$locale_parts = explode('_', get_locale());
|
76 |
+
|
77 |
+
$locale = isset($locale_parts[0])
|
78 |
+
? $locale_parts[0]
|
79 |
+
: 'en';
|
80 |
+
|
81 |
+
$control->addHtmlAttr('data-date-locale', $locale);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
public function render()
|
86 |
+
{
|
87 |
+
?>
|
88 |
+
<div class='input-group date factory-datetimepicker-input-group' style="display:inline-block; width: 200px">
|
89 |
+
<?php $this->range_1->render(); ?>
|
90 |
+
</div>
|
91 |
+
<div class='input-group date factory-datetimepicker-input-group' style="display:inline-block; width: 200px">
|
92 |
+
<?php $this->range_2->render(); ?>
|
93 |
+
</div>
|
94 |
+
<?php
|
95 |
+
}
|
96 |
+
}
|
libs/factory/forms/controls/multiple-textbox.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Control multiple textbox
|
5 |
+
* @author Webcraftic <wordpress.webraftic@gmail.com>
|
6 |
+
* @copyright (c) 22.11.2017, Webcraftic
|
7 |
+
*
|
8 |
+
* @package factory-forms
|
9 |
+
* @since 1.0.0
|
10 |
+
*/
|
11 |
+
class FactoryForms329_MultipleTextboxControl extends FactoryForms329_Control {
|
12 |
+
|
13 |
+
public $type = 'multiple-textbox';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Preparing html attributes before rendering html of the control.
|
17 |
+
*
|
18 |
+
* @since 1.0.0
|
19 |
+
* @return void
|
20 |
+
*/
|
21 |
+
protected function beforeHtml()
|
22 |
+
{
|
23 |
+
|
24 |
+
$nameOnForm = $this->getNameOnForm();
|
25 |
+
|
26 |
+
if( $this->getOption('maxLength', false) ) {
|
27 |
+
$this->addHtmlAttr('maxlength', intval($this->getOption('maxLength')));
|
28 |
+
}
|
29 |
+
|
30 |
+
if( $this->getOption('placeholder', false) ) {
|
31 |
+
$this->addHtmlAttr('placeholder', $this->getOption('placeholder'));
|
32 |
+
}
|
33 |
+
|
34 |
+
$this->addCssClass('form-control');
|
35 |
+
$this->addHtmlAttr('type', 'text');
|
36 |
+
//$this->addHtmlAttr('id', $nameOnForm);
|
37 |
+
$this->addCssClass(str_replace('_', '-', $nameOnForm));
|
38 |
+
$this->addHtmlAttr('name', $nameOnForm . '[]');
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Shows the html markup of the control.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
public function html()
|
48 |
+
{
|
49 |
+
|
50 |
+
$values = $this->getValue();
|
51 |
+
|
52 |
+
if( !empty($values) ) {
|
53 |
+
$values = explode('{%spr%}', $values);
|
54 |
+
} else {
|
55 |
+
$values = array();
|
56 |
+
}
|
57 |
+
|
58 |
+
?>
|
59 |
+
<div class="factory-multiple-textbox-group">
|
60 |
+
<div class="factory-mtextbox-items">
|
61 |
+
<?php if( empty($values) ): ?>
|
62 |
+
<div class="factory-mtextbox-item">
|
63 |
+
<input <?php $this->attrs() ?>/>
|
64 |
+
</div>
|
65 |
+
<?php else: ?>
|
66 |
+
<?php $counter = 0; ?>
|
67 |
+
<?php foreach($values as $value): ?>
|
68 |
+
<div class="factory-mtextbox-item">
|
69 |
+
<input value="<?= esc_attr($value) ?>"<?php $this->attrs() ?>/>
|
70 |
+
<?php if( $counter >= 1 ): ?>
|
71 |
+
<button class="btn btn-default btn-small factory-mtextbox-remove-item">
|
72 |
+
<i class="fa fa-times" aria-hidden="true"></i></button>
|
73 |
+
<?php endif; ?>
|
74 |
+
</div>
|
75 |
+
<?php $counter++; ?>
|
76 |
+
<?php endforeach; ?>
|
77 |
+
<?php endif; ?>
|
78 |
+
</div>
|
79 |
+
<button class="btn btn-default btn-small factory-mtextbox-add-item">
|
80 |
+
<i class="fa fa-plus" aria-hidden="true"></i> <?php _e('Add new', 'factory_forms_329') ?>
|
81 |
+
</button>
|
82 |
+
</div>
|
83 |
+
|
84 |
+
<?php
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Returns a submit value of the control by a given name.
|
89 |
+
*
|
90 |
+
* @since 1.0.0
|
91 |
+
* @return mixed
|
92 |
+
*/
|
93 |
+
public function getSubmitValue($name, $subName)
|
94 |
+
{
|
95 |
+
$nameOnForm = $this->getNameOnForm($name);
|
96 |
+
$value = isset($_POST[$nameOnForm])
|
97 |
+
? $_POST[$nameOnForm]
|
98 |
+
: null;
|
99 |
+
if( is_array($value) ) {
|
100 |
+
$value = array_map('sanitize_text_field', $value);
|
101 |
+
$value = implode('{%spr%}', $value);
|
102 |
+
}
|
103 |
+
|
104 |
+
$value = sanitize_text_field($value);
|
105 |
+
|
106 |
+
return $value;
|
107 |
+
}
|
108 |
+
}
|
libs/factory/forms/includes/form-element.class.php
CHANGED
@@ -353,6 +353,17 @@
|
|
353 |
echo $this->getName();
|
354 |
}
|
355 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
/**
|
357 |
* Returns an element type.
|
358 |
*
|
353 |
echo $this->getName();
|
354 |
}
|
355 |
|
356 |
+
/**
|
357 |
+
* Returns a form name
|
358 |
+
*
|
359 |
+
* @since 1.0.0
|
360 |
+
* @return string
|
361 |
+
*/
|
362 |
+
public function getFormName()
|
363 |
+
{
|
364 |
+
return $this->form->name;
|
365 |
+
}
|
366 |
+
|
367 |
/**
|
368 |
* Returns an element type.
|
369 |
*
|
libs/factory/pages/boot.php
CHANGED
@@ -14,23 +14,23 @@
|
|
14 |
return;
|
15 |
}
|
16 |
|
17 |
-
if( defined('
|
18 |
return;
|
19 |
}
|
20 |
-
define('
|
21 |
|
22 |
-
define('
|
23 |
-
define('
|
24 |
|
25 |
if( !defined('FACTORY_FLAT_ADMIN') ) {
|
26 |
define('FACTORY_FLAT_ADMIN', true);
|
27 |
}
|
28 |
|
29 |
-
load_plugin_textdomain('
|
30 |
|
31 |
-
require(
|
32 |
-
require(
|
33 |
-
require(
|
34 |
-
require(
|
35 |
-
require(
|
36 |
|
14 |
return;
|
15 |
}
|
16 |
|
17 |
+
if( defined('FACTORY_PAGES_324_LOADED') ) {
|
18 |
return;
|
19 |
}
|
20 |
+
define('FACTORY_PAGES_324_LOADED', true);
|
21 |
|
22 |
+
define('FACTORY_PAGES_324_DIR', dirname(__FILE__));
|
23 |
+
define('FACTORY_PAGES_324_URL', plugins_url(null, __FILE__));
|
24 |
|
25 |
if( !defined('FACTORY_FLAT_ADMIN') ) {
|
26 |
define('FACTORY_FLAT_ADMIN', true);
|
27 |
}
|
28 |
|
29 |
+
load_plugin_textdomain('factory_pages_324', false, dirname(plugin_basename(__FILE__)) . '/langs');
|
30 |
|
31 |
+
require(FACTORY_PAGES_324_DIR . '/pages.php');
|
32 |
+
require(FACTORY_PAGES_324_DIR . '/includes/request.class.php');
|
33 |
+
require(FACTORY_PAGES_324_DIR . '/includes/page.class.php');
|
34 |
+
require(FACTORY_PAGES_324_DIR . '/includes/admin-page.class.php');
|
35 |
+
require(FACTORY_PAGES_324_DIR . '/templates/impressive-page.class.php');
|
36 |
|
libs/factory/pages/includes/admin-page.class.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
|
5 |
/**
|
6 |
* Visible page title.
|
@@ -139,13 +139,21 @@
|
|
139 |
$this->styles->connect();
|
140 |
}
|
141 |
|
142 |
-
|
|
|
|
|
|
|
|
|
143 |
{
|
|
|
|
|
|
|
|
|
144 |
if( $this->plugin ) {
|
145 |
-
return $
|
146 |
}
|
147 |
|
148 |
-
return $
|
149 |
}
|
150 |
|
151 |
/**
|
1 |
<?php
|
2 |
|
3 |
+
class FactoryPages324_AdminPage extends FactoryPages324_Page {
|
4 |
|
5 |
/**
|
6 |
* Visible page title.
|
139 |
$this->styles->connect();
|
140 |
}
|
141 |
|
142 |
+
/**
|
143 |
+
* @param null $id
|
144 |
+
* @return mixed|string
|
145 |
+
*/
|
146 |
+
public function getResultId($id = null)
|
147 |
{
|
148 |
+
$id = !empty($id)
|
149 |
+
? $id
|
150 |
+
: $this->id;
|
151 |
+
|
152 |
if( $this->plugin ) {
|
153 |
+
return $id . '-' . $this->plugin->pluginName;
|
154 |
}
|
155 |
|
156 |
+
return $id;
|
157 |
}
|
158 |
|
159 |
/**
|
libs/factory/pages/includes/page.class.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
|
5 |
/**
|
6 |
* Current Factory Plugin.
|
@@ -17,7 +17,7 @@
|
|
17 |
public function __construct($plugin = null)
|
18 |
{
|
19 |
$this->plugin = $plugin;
|
20 |
-
$this->request = new
|
21 |
|
22 |
if( $plugin ) {
|
23 |
$this->scripts = $this->plugin->newScriptList();
|
1 |
<?php
|
2 |
|
3 |
+
class FactoryPages324_Page {
|
4 |
|
5 |
/**
|
6 |
* Current Factory Plugin.
|
17 |
public function __construct($plugin = null)
|
18 |
{
|
19 |
$this->plugin = $plugin;
|
20 |
+
$this->request = new FactoryPages324_Request();
|
21 |
|
22 |
if( $plugin ) {
|
23 |
$this->scripts = $this->plugin->newScriptList();
|
libs/factory/pages/includes/request.class.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
|
5 |
/**
|
6 |
* @param null $param
|
@@ -33,9 +33,15 @@
|
|
33 |
|
34 |
if( !empty($param) ) {
|
35 |
if( isset($method[$param]) && !empty($method[$param]) ) {
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
return $default;
|
1 |
<?php
|
2 |
|
3 |
+
class FactoryPages324_Request {
|
4 |
|
5 |
/**
|
6 |
* @param null $param
|
33 |
|
34 |
if( !empty($param) ) {
|
35 |
if( isset($method[$param]) && !empty($method[$param]) ) {
|
36 |
+
if( is_array($method[$param]) ) {
|
37 |
+
return !empty($sanitize)
|
38 |
+
? array_map($sanitize_function_name, $method[$param])
|
39 |
+
: $method[$param];
|
40 |
+
} else {
|
41 |
+
return !empty($sanitize)
|
42 |
+
? call_user_func($sanitize_function_name, $method[$param])
|
43 |
+
: $method[$param];
|
44 |
+
}
|
45 |
}
|
46 |
|
47 |
return $default;
|
libs/factory/pages/langs/{factory_pages_322-fr_FR.mo → factory_pages_324-fr_FR.mo}
RENAMED
File without changes
|
libs/factory/pages/langs/{factory_pages_322-fr_FR.po → factory_pages_324-fr_FR.po}
RENAMED
File without changes
|
libs/factory/pages/langs/{factory_pages_322-ru_RU.mo → factory_pages_324-ru_RU.mo}
RENAMED
File without changes
|
libs/factory/pages/langs/{factory_pages_322-ru_RU.po → factory_pages_324-ru_RU.po}
RENAMED
File without changes
|
libs/factory/pages/pages.php
CHANGED
@@ -9,14 +9,14 @@
|
|
9 |
* @since 1.0.0
|
10 |
*/
|
11 |
|
12 |
-
add_action('admin_menu', '
|
13 |
|
14 |
/**
|
15 |
* A base class to manage pages.
|
16 |
*
|
17 |
* @since 1.0.0
|
18 |
*/
|
19 |
-
class
|
20 |
|
21 |
private static $pages = array();
|
22 |
|
@@ -44,6 +44,6 @@ class FactoryPages322 {
|
|
44 |
}
|
45 |
}
|
46 |
|
47 |
-
function
|
48 |
return $pureId . '-' . $plugin->pluginName;
|
49 |
}
|
9 |
* @since 1.0.0
|
10 |
*/
|
11 |
|
12 |
+
add_action('admin_menu', 'FactoryPages324::actionAdminMenu');
|
13 |
|
14 |
/**
|
15 |
* A base class to manage pages.
|
16 |
*
|
17 |
* @since 1.0.0
|
18 |
*/
|
19 |
+
class FactoryPages324 {
|
20 |
|
21 |
private static $pages = array();
|
22 |
|
44 |
}
|
45 |
}
|
46 |
|
47 |
+
function factory_pages_324_get_page_id( $plugin, $pureId ) {
|
48 |
return $pureId . '-' . $plugin->pluginName;
|
49 |
}
|
libs/factory/pages/templates/assets/css/impressive.page.template.css
CHANGED
@@ -66,10 +66,29 @@
|
|
66 |
}
|
67 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap {
|
68 |
margin-left: 230px;
|
69 |
-
padding:
|
70 |
vertical-align: top;
|
71 |
background: #fff;
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header {
|
74 |
position: absolute;
|
75 |
z-index: 13;
|
@@ -206,6 +225,15 @@
|
|
206 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-content-section.wbcr-fullwidth {
|
207 |
width: 100%;
|
208 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-right-sidebar-section {
|
210 |
width: 40%;
|
211 |
padding: 20px;
|
66 |
}
|
67 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap {
|
68 |
margin-left: 230px;
|
69 |
+
padding: 80px 0 0 0;
|
70 |
vertical-align: top;
|
71 |
background: #fff;
|
72 |
}
|
73 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap .nav-tab-wrapper,
|
74 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap h2.nav-tab-wrapper,
|
75 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap h1.nav-tab-wrapper {
|
76 |
+
border: 0;
|
77 |
+
}
|
78 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap .nav-tab-active {
|
79 |
+
background: #f7f7f7;
|
80 |
+
}
|
81 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap .nav-tab:first-child {
|
82 |
+
margin-left: 80px;
|
83 |
+
}
|
84 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap .nav-tab:hover {
|
85 |
+
background: #f7f7f7;
|
86 |
+
}
|
87 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap .nav-tab:active,
|
88 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap .nav-tab:focus {
|
89 |
+
box-shadow: none;
|
90 |
+
outline: none;
|
91 |
+
}
|
92 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header {
|
93 |
position: absolute;
|
94 |
z-index: 13;
|
225 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-content-section.wbcr-fullwidth {
|
226 |
width: 100%;
|
227 |
}
|
228 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-content-section .nav-tab-wrapper {
|
229 |
+
margin-top: 15px;
|
230 |
+
}
|
231 |
+
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-content-section .wbcr-factory-content {
|
232 |
+
background: #f7f7f7;
|
233 |
+
padding: 40px 20px;
|
234 |
+
border: 1px solid #dad8d8;
|
235 |
+
box-shadow: -1px 0px 1px rgba(0, 0, 0, 0.1);
|
236 |
+
}
|
237 |
#WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-right-sidebar-section {
|
238 |
width: 40%;
|
239 |
padding: 20px;
|
libs/factory/pages/templates/assets/css/impressive.page.template.less
CHANGED
@@ -89,11 +89,29 @@
|
|
89 |
//display: inline-block;
|
90 |
//min-height: 800px;
|
91 |
margin-left: 230px;
|
92 |
-
padding: 120px 0 20px 20px;
|
|
|
93 |
vertical-align: top;
|
94 |
background: #fff;
|
95 |
//min-height: 800px;
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
|
99 |
.wbcr-factory-page-header {
|
@@ -244,6 +262,15 @@
|
|
244 |
&.wbcr-fullwidth {
|
245 |
width: 100%;
|
246 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
}
|
248 |
|
249 |
.wbcr-factory-right-sidebar-section {
|
89 |
//display: inline-block;
|
90 |
//min-height: 800px;
|
91 |
margin-left: 230px;
|
92 |
+
//padding: 120px 0 20px 20px;
|
93 |
+
padding: 80px 0 0 0;
|
94 |
vertical-align: top;
|
95 |
background: #fff;
|
96 |
//min-height: 800px;
|
97 |
+
.nav-tab-wrapper, h2.nav-tab-wrapper, h1.nav-tab-wrapper {
|
98 |
+
border: 0;
|
99 |
+
}
|
100 |
+
.nav-tab-active {
|
101 |
+
background: #f7f7f7;
|
102 |
+
}
|
103 |
+
.nav-tab:first-child {
|
104 |
+
margin-left: 80px;
|
105 |
+
}
|
106 |
+
.nav-tab:hover {
|
107 |
+
background: #f7f7f7;
|
108 |
+
}
|
109 |
+
.nav-tab {
|
110 |
+
&:active, &:focus {
|
111 |
+
box-shadow: none;
|
112 |
+
outline: none;
|
113 |
+
}
|
114 |
+
}
|
115 |
}
|
116 |
|
117 |
.wbcr-factory-page-header {
|
262 |
&.wbcr-fullwidth {
|
263 |
width: 100%;
|
264 |
}
|
265 |
+
.nav-tab-wrapper {
|
266 |
+
margin-top: 15px;
|
267 |
+
}
|
268 |
+
.wbcr-factory-content {
|
269 |
+
background: #f7f7f7;
|
270 |
+
padding: 40px 20px;
|
271 |
+
border: 1px solid #dad8d8;
|
272 |
+
box-shadow: -1px 0px 1px rgba(0, 0, 0, 0.1);
|
273 |
+
}
|
274 |
}
|
275 |
|
276 |
.wbcr-factory-right-sidebar-section {
|
libs/factory/pages/templates/impressive-page.class.php
CHANGED
@@ -5,13 +5,13 @@
|
|
5 |
* Author: Webcraftic <wordpress.webraftic@gmail.com>
|
6 |
* Version: 1.0.0
|
7 |
*/
|
8 |
-
abstract class
|
9 |
|
10 |
/**
|
11 |
* The id of the page in the admin menu.
|
12 |
*
|
13 |
* Mainly used to navigate between pages.
|
14 |
-
* @see
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
* @var string
|
@@ -22,8 +22,10 @@
|
|
22 |
public $internal = true;
|
23 |
|
24 |
public $type = 'options';
|
|
|
|
|
25 |
|
26 |
-
public $page_menu_dashicon
|
27 |
|
28 |
public $page_menu_position = 10;
|
29 |
|
@@ -36,7 +38,7 @@
|
|
36 |
public function __construct(Factory326_Plugin $plugin)
|
37 |
{
|
38 |
|
39 |
-
$this->menuIcon =
|
40 |
|
41 |
parent::__construct($plugin);
|
42 |
|
@@ -46,18 +48,19 @@
|
|
46 |
? ' ' . $this->page_menu_dashicon
|
47 |
: '';
|
48 |
|
49 |
-
$this->titlePluginActionLink = __('Settings', '
|
50 |
|
51 |
//if( $this->type == 'options' ) {
|
52 |
//$this->show_right_sidebar_in_options = true;
|
53 |
//$this->show_bottom_sidebar = false;
|
54 |
//}
|
55 |
-
|
56 |
$factory_impressive_page_menu[$plugin->pluginName][$this->getResultId()] = array(
|
57 |
'type' => $this->type, // page, options
|
58 |
'url' => $this->getBaseUrl(),
|
59 |
'title' => '<span class="dashicons' . $dashicon . '"></span> ' . $this->getMenuTitle(),
|
60 |
-
'position' => $this->page_menu_position
|
|
|
61 |
);
|
62 |
}
|
63 |
|
@@ -82,7 +85,7 @@
|
|
82 |
/**
|
83 |
* Requests assets (js and css) for the page.
|
84 |
*
|
85 |
-
* @see
|
86 |
*
|
87 |
* @since 1.0.0
|
88 |
* @return void
|
@@ -95,22 +98,18 @@
|
|
95 |
$this->scripts->request(array(
|
96 |
'control.checkbox',
|
97 |
'control.dropdown',
|
98 |
-
'bootstrap.tooltip'
|
99 |
-
'holder.more-link',
|
100 |
-
'bootstrap.tab',
|
101 |
), 'bootstrap');
|
102 |
|
103 |
$this->styles->request(array(
|
104 |
'bootstrap.core',
|
105 |
'bootstrap.form-group',
|
106 |
'bootstrap.separator',
|
107 |
-
'bootstrap.tab',
|
108 |
-
'holder.more-link',
|
109 |
'control.dropdown',
|
110 |
'control.checkbox'
|
111 |
), 'bootstrap');
|
112 |
|
113 |
-
$this->styles->add(
|
114 |
//$this->styles->add('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
|
115 |
}
|
116 |
|
@@ -177,7 +176,7 @@
|
|
177 |
public function warningNotice()
|
178 |
{
|
179 |
/*if( WP_CACHE ) {
|
180 |
-
$this->printWarningNotice(__("It seems that a caching/performance plugin is active on this site. Please manually invalidate that plugin's cache after making any changes to the settings below.", '
|
181 |
}*/
|
182 |
}
|
183 |
|
@@ -194,13 +193,13 @@
|
|
194 |
$this->plugin->pluginName . '_saved' => '1'
|
195 |
),
|
196 |
'type' => 'success',
|
197 |
-
'message' => __('The settings have been updated successfully!', '
|
198 |
-
? '<br>' . __("It seems that a caching/performance plugin is active on this site. Please manually invalidate that plugin's cache after making any changes to the settings below.", '
|
199 |
: '')
|
200 |
)
|
201 |
);
|
202 |
|
203 |
-
$notices = apply_filters('wbcr_factory_imppage_actions_notice', $notices);
|
204 |
|
205 |
foreach($notices as $key => $notice) {
|
206 |
$show_message = true;
|
@@ -230,25 +229,109 @@
|
|
230 |
protected function showPageMenu()
|
231 |
{
|
232 |
global $factory_impressive_page_menu;
|
233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
function factory_page_menu_sort($a, $b)
|
235 |
{
|
236 |
return $a['position'] < $b['position'];
|
237 |
}
|
238 |
|
239 |
-
uasort($
|
240 |
|
241 |
?>
|
242 |
<ul>
|
243 |
-
<?php foreach($
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
</ul>
|
250 |
<?php
|
251 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
|
253 |
protected function showHeader()
|
254 |
{
|
@@ -265,7 +348,7 @@
|
|
265 |
<?php endif; ?>
|
266 |
<?php if( $this->type == 'options' ): ?>
|
267 |
<div class="wbcr-factory-control">
|
268 |
-
<input name="<?= $this->plugin->pluginName ?>_save_action" class="wbcr-factory-type-save" type="submit" value="<?php _e('Save settings', '
|
269 |
<?php wp_nonce_field('wbcr_factory_save_action', 'wbcr_factory_save'); ?>
|
270 |
</div><?php endif; ?>
|
271 |
</div>
|
@@ -368,7 +451,7 @@
|
|
368 |
if( isset($_POST[$this->plugin->pluginName . '_save_action']) && isset($_POST['wbcr_factory_save']) ) {
|
369 |
|
370 |
if( !wp_verify_nonce($_POST['wbcr_factory_save'], 'wbcr_factory_save_action') || !current_user_can('manage_options') ) {
|
371 |
-
wp_die(__('You do not have permission to edit page.', '
|
372 |
exit;
|
373 |
}
|
374 |
|
@@ -406,15 +489,23 @@
|
|
406 |
<?php $this->showPageMenu() ?>
|
407 |
</div>
|
408 |
<?php
|
409 |
-
$min_height =
|
|
|
|
|
|
|
|
|
|
|
410 |
?>
|
411 |
-
<div class="wbcr-factory-page-inner-wrap"
|
412 |
<div class="wbcr-factory-content-section<?php if( !$this->show_right_sidebar_in_options ): echo ' wbcr-fullwidth'; endif ?>">
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
|
|
|
|
|
|
418 |
</div>
|
419 |
<?php if( $this->show_right_sidebar_in_options ): ?>
|
420 |
<div class="wbcr-factory-right-sidebar-section">
|
@@ -439,17 +530,31 @@
|
|
439 |
|
440 |
protected function showPage()
|
441 |
{
|
|
|
442 |
?>
|
443 |
<div id="WBCR" class="wrap">
|
444 |
<div class="wbcr-factory-impressive-page-template-000 factory-bootstrap-330 factory-fontawesome-000">
|
445 |
<div class="wbcr-factory-page wbcr-factory-page-<?= $this->id ?>">
|
446 |
<?php $this->showHeader(); ?>
|
447 |
-
|
448 |
<div class="wbcr-factory-left-navigation-bar">
|
449 |
<?php $this->showPageMenu() ?>
|
450 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
<div class="wbcr-factory-page-inner-wrap">
|
452 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
453 |
</div>
|
454 |
</div>
|
455 |
<div class="clearfix"></div>
|
@@ -469,24 +574,24 @@
|
|
469 |
<span class="wbcr-factory-hint-icon-simple wbcr-factory-simple-red">
|
470 |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt=""/>
|
471 |
</span>
|
472 |
-
- <?php _e('A neutral setting that can not harm your site, but you must be sure that you need to use it.', '
|
473 |
</li>
|
474 |
<li>
|
475 |
<span class="wbcr-factory-hint-icon-simple wbcr-factory-simple-grey">
|
476 |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt=""/>
|
477 |
</span>
|
478 |
-
- <?php _e('When set this option, you must be careful. Plugins and themes may depend on this function. You must be sure that you can disable this feature for the site.', '
|
479 |
</li>
|
480 |
<li>
|
481 |
<span class="wbcr-factory-hint-icon-simple wbcr-factory-simple-green">
|
482 |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt=""/>
|
483 |
</span>
|
484 |
-
- <?php _e('Absolutely safe setting, We recommend to use.', '
|
485 |
</li>
|
486 |
</ul>
|
487 |
----------<br>
|
488 |
|
489 |
-
<p><?php _e('Hover to the icon to get help for the feature you selected.', '
|
490 |
</div>
|
491 |
<?php
|
492 |
}
|
@@ -498,21 +603,23 @@
|
|
498 |
} else {
|
499 |
$page_url = $args[0];
|
500 |
}
|
|
|
|
|
501 |
|
502 |
?>
|
503 |
<div class="wbcr-factory-sidebar-widget">
|
504 |
<p>
|
505 |
-
<strong><?php _e('Do you want the plugin to improved and update?', '
|
506 |
</p>
|
507 |
|
508 |
-
<p><?php _e('Help the author, leave a review on wordpress.org. Thanks to feedback, I will know that the plugin is really useful to you and is needed.', '
|
509 |
|
510 |
-
<p><?php _e('And also write your ideas on how to extend or improve the plugin.', '
|
511 |
|
512 |
<p>
|
513 |
<i class="wbcr-factory-icon-5stars"></i>
|
514 |
<a href="<?= $page_url ?>" title="Go rate us" target="_blank">
|
515 |
-
<strong><?php _e('Go rate us and push ideas', '
|
516 |
</a>
|
517 |
</p>
|
518 |
</div>
|
@@ -524,7 +631,7 @@
|
|
524 |
?>
|
525 |
<div class="wbcr-factory-sidebar-widget">
|
526 |
<p>
|
527 |
-
<strong><?php _e('Donation for plugin development', '
|
528 |
</p>
|
529 |
|
530 |
<?php if( get_locale() !== 'ru_RU' ): ?>
|
@@ -533,7 +640,7 @@
|
|
533 |
<input type="hidden" name="hosted_button_id" value="VDX7JNTQPNPFW">
|
534 |
|
535 |
<div class="wbcr-factory-donation-price">5$</div>
|
536 |
-
<input type="image" src="<?=
|
537 |
</form>
|
538 |
<?php else: ?>
|
539 |
<iframe frameborder="0" allowtransparency="true" scrolling="no" src="https://money.yandex.ru/embed/donate.xml?account=410011242846510&quickpay=donate&payment-type-choice=on&mobile-payment-type-choice=on&default-sum=300&targets=%D0%9D%D0%B0+%D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%BA%D1%83+%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD%D0%B0+%D0%B8+%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D1%83+%D0%BD%D0%BE%D0%B2%D1%8B%D1%85+%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B9.+&target-visibility=on&project-name=Webcraftic&project-site=&button-text=05&comment=on&hint=%D0%9A%D0%B0%D0%BA%D1%83%D1%8E+%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8E+%D0%BD%D1%83%D0%B6%D0%BD%D0%BE+%D0%B4%D0%BE%D0%B1%D0%B0%D0%B2%D0%B8%D1%82%D1%8C+%D0%B2+%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD%3F&mail=on&successURL=" width="508" height="187"></iframe>
|
5 |
* Author: Webcraftic <wordpress.webraftic@gmail.com>
|
6 |
* Version: 1.0.0
|
7 |
*/
|
8 |
+
abstract class FactoryPages324_ImpressiveThemplate extends FactoryPages324_AdminPage {
|
9 |
|
10 |
/**
|
11 |
* The id of the page in the admin menu.
|
12 |
*
|
13 |
* Mainly used to navigate between pages.
|
14 |
+
* @see FactoryPages324_AdminPage
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
* @var string
|
22 |
public $internal = true;
|
23 |
|
24 |
public $type = 'options';
|
25 |
+
|
26 |
+
public $page_parent_page;
|
27 |
|
28 |
+
public $page_menu_dashicon;
|
29 |
|
30 |
public $page_menu_position = 10;
|
31 |
|
38 |
public function __construct(Factory326_Plugin $plugin)
|
39 |
{
|
40 |
|
41 |
+
$this->menuIcon = FACTORY_PAGES_324_URL . '/templates/assets/img/webcraftic-plugin-icon.png';
|
42 |
|
43 |
parent::__construct($plugin);
|
44 |
|
48 |
? ' ' . $this->page_menu_dashicon
|
49 |
: '';
|
50 |
|
51 |
+
$this->titlePluginActionLink = __('Settings', 'factory_pages_324');
|
52 |
|
53 |
//if( $this->type == 'options' ) {
|
54 |
//$this->show_right_sidebar_in_options = true;
|
55 |
//$this->show_bottom_sidebar = false;
|
56 |
//}
|
57 |
+
|
58 |
$factory_impressive_page_menu[$plugin->pluginName][$this->getResultId()] = array(
|
59 |
'type' => $this->type, // page, options
|
60 |
'url' => $this->getBaseUrl(),
|
61 |
'title' => '<span class="dashicons' . $dashicon . '"></span> ' . $this->getMenuTitle(),
|
62 |
+
'position' => $this->page_menu_position,
|
63 |
+
'parent' => $this->page_parent_page
|
64 |
);
|
65 |
}
|
66 |
|
85 |
/**
|
86 |
* Requests assets (js and css) for the page.
|
87 |
*
|
88 |
+
* @see FactoryPages324_AdminPage
|
89 |
*
|
90 |
* @since 1.0.0
|
91 |
* @return void
|
98 |
$this->scripts->request(array(
|
99 |
'control.checkbox',
|
100 |
'control.dropdown',
|
101 |
+
'bootstrap.tooltip'
|
|
|
|
|
102 |
), 'bootstrap');
|
103 |
|
104 |
$this->styles->request(array(
|
105 |
'bootstrap.core',
|
106 |
'bootstrap.form-group',
|
107 |
'bootstrap.separator',
|
|
|
|
|
108 |
'control.dropdown',
|
109 |
'control.checkbox'
|
110 |
), 'bootstrap');
|
111 |
|
112 |
+
$this->styles->add(FACTORY_PAGES_324_URL . '/templates/assets/css/impressive.page.template.css');
|
113 |
//$this->styles->add('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
|
114 |
}
|
115 |
|
176 |
public function warningNotice()
|
177 |
{
|
178 |
/*if( WP_CACHE ) {
|
179 |
+
$this->printWarningNotice(__("It seems that a caching/performance plugin is active on this site. Please manually invalidate that plugin's cache after making any changes to the settings below.", 'factory_pages_324'));
|
180 |
}*/
|
181 |
}
|
182 |
|
193 |
$this->plugin->pluginName . '_saved' => '1'
|
194 |
),
|
195 |
'type' => 'success',
|
196 |
+
'message' => __('The settings have been updated successfully!', 'factory_pages_324') . (WP_CACHE
|
197 |
+
? '<br>' . __("It seems that a caching/performance plugin is active on this site. Please manually invalidate that plugin's cache after making any changes to the settings below.", 'factory_pages_324')
|
198 |
: '')
|
199 |
)
|
200 |
);
|
201 |
|
202 |
+
$notices = apply_filters('wbcr_factory_imppage_actions_notice', $notices, $this->plugin, $this->id);
|
203 |
|
204 |
foreach($notices as $key => $notice) {
|
205 |
$show_message = true;
|
229 |
protected function showPageMenu()
|
230 |
{
|
231 |
global $factory_impressive_page_menu;
|
232 |
+
|
233 |
+
$page_menu = $factory_impressive_page_menu[$this->plugin->pluginName];
|
234 |
+
$self_page_id = $this->getResultId();
|
235 |
+
$current_page = isset($page_menu[$self_page_id])
|
236 |
+
? $page_menu[$self_page_id]
|
237 |
+
: null;
|
238 |
+
|
239 |
+
$parent_page_id = !empty($current_page['parent'])
|
240 |
+
? $this->getResultId($current_page['parent'])
|
241 |
+
: null;
|
242 |
+
|
243 |
function factory_page_menu_sort($a, $b)
|
244 |
{
|
245 |
return $a['position'] < $b['position'];
|
246 |
}
|
247 |
|
248 |
+
uasort($page_menu, 'factory_page_menu_sort');
|
249 |
|
250 |
?>
|
251 |
<ul>
|
252 |
+
<?php foreach($page_menu as $page_screen => $page): ?>
|
253 |
+
<?php
|
254 |
+
if( !empty($page['parent']) ) {
|
255 |
+
continue;
|
256 |
+
}
|
257 |
+
$active_tab = '';
|
258 |
+
if( $page_screen == $self_page_id || $page_screen == $parent_page_id ) {
|
259 |
+
$active_tab = ' wbcr-factory-active-tab';
|
260 |
+
}
|
261 |
+
?>
|
262 |
+
<li class="wbcr-factory-nav-tab<?= $active_tab ?>">
|
263 |
+
<a href="<?php echo $page['url'] ?>" id="<?= $page_screen ?>-tab"><?php echo $page['title'] ?></a>
|
264 |
+
</li>
|
265 |
+
<?php endforeach; ?>
|
266 |
</ul>
|
267 |
<?php
|
268 |
}
|
269 |
+
|
270 |
+
protected function showPageSubMenu()
|
271 |
+
{
|
272 |
+
global $factory_impressive_page_menu;
|
273 |
+
$self_page_id = $this->getResultId();
|
274 |
+
$page_menu = $factory_impressive_page_menu[$this->plugin->pluginName];
|
275 |
+
$current_page = isset($page_menu[$self_page_id])
|
276 |
+
? $page_menu[$self_page_id]
|
277 |
+
: null;
|
278 |
+
|
279 |
+
$page_submenu = array();
|
280 |
+
foreach($page_menu as $page_screen => $page) {
|
281 |
+
if( !empty($page['parent']) ) {
|
282 |
+
$page_parent_id = $this->getResultId($page['parent']);
|
283 |
+
|
284 |
+
if( isset($page_menu[$page_parent_id]) ) {
|
285 |
+
$page['title'] = strip_tags($page['title']);
|
286 |
+
$page_submenu[$page_parent_id][$page_screen] = $page;
|
287 |
+
}
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
if( empty($page_submenu) ) {
|
292 |
+
return;
|
293 |
+
}
|
294 |
+
|
295 |
+
$get_menu_id = null;
|
296 |
+
$has_parent = !empty($current_page) && !empty($current_page['parent']);
|
297 |
+
$parent_page_id = $has_parent
|
298 |
+
? $this->getResultId($current_page['parent'])
|
299 |
+
: null;
|
300 |
+
|
301 |
+
if( ($has_parent && isset($page_submenu[$parent_page_id])) ) {
|
302 |
+
$get_menu_id = $parent_page_id;
|
303 |
+
} else if( !$has_parent && isset($page_submenu[$self_page_id]) ) {
|
304 |
+
$get_menu_id = $self_page_id;
|
305 |
+
}
|
306 |
+
|
307 |
+
if( !isset($page_submenu[$get_menu_id]) ) {
|
308 |
+
return;
|
309 |
+
}
|
310 |
+
|
311 |
+
$unshift = array();
|
312 |
+
if( isset($page_menu[$get_menu_id]) ) {
|
313 |
+
$page_menu[$get_menu_id]['title'] = strip_tags($page_menu[$get_menu_id]['title']);
|
314 |
+
|
315 |
+
$unshift[$get_menu_id][$get_menu_id] = $page_menu[$get_menu_id];
|
316 |
+
$page_submenu[$get_menu_id] = $unshift[$get_menu_id] + $page_submenu[$get_menu_id];
|
317 |
+
}
|
318 |
+
|
319 |
+
?>
|
320 |
+
<h2 class="nav-tab-wrapper wp-clearfix">
|
321 |
+
<?php foreach((array)$page_submenu[$get_menu_id] as $page_screen => $page): ?>
|
322 |
+
<?php
|
323 |
+
$active_tab = '';
|
324 |
+
if( $page_screen == $this->getResultId() ) {
|
325 |
+
$active_tab = ' nav-tab-active';
|
326 |
+
}
|
327 |
+
?>
|
328 |
+
<a href="<?php echo $page['url'] ?>" id="<?= $page_screen ?>-tab" class="nav-tab<?= $active_tab ?>">
|
329 |
+
<?php echo $page['title'] ?>
|
330 |
+
</a>
|
331 |
+
<?php endforeach; ?>
|
332 |
+
</h2>
|
333 |
+
<?php
|
334 |
+
}
|
335 |
|
336 |
protected function showHeader()
|
337 |
{
|
348 |
<?php endif; ?>
|
349 |
<?php if( $this->type == 'options' ): ?>
|
350 |
<div class="wbcr-factory-control">
|
351 |
+
<input name="<?= $this->plugin->pluginName ?>_save_action" class="wbcr-factory-type-save" type="submit" value="<?php _e('Save settings', 'factory_pages_324'); ?>">
|
352 |
<?php wp_nonce_field('wbcr_factory_save_action', 'wbcr_factory_save'); ?>
|
353 |
</div><?php endif; ?>
|
354 |
</div>
|
451 |
if( isset($_POST[$this->plugin->pluginName . '_save_action']) && isset($_POST['wbcr_factory_save']) ) {
|
452 |
|
453 |
if( !wp_verify_nonce($_POST['wbcr_factory_save'], 'wbcr_factory_save_action') || !current_user_can('manage_options') ) {
|
454 |
+
wp_die(__('You do not have permission to edit page.', 'factory_pages_324'));
|
455 |
exit;
|
456 |
}
|
457 |
|
489 |
<?php $this->showPageMenu() ?>
|
490 |
</div>
|
491 |
<?php
|
492 |
+
$min_height = 0;
|
493 |
+
foreach($factory_impressive_page_menu[$this->plugin->pluginName] as $page) {
|
494 |
+
if( !isset($page['parent']) || empty($page['parent']) ) {
|
495 |
+
$min_height += 61;
|
496 |
+
}
|
497 |
+
}
|
498 |
?>
|
499 |
+
<div class="wbcr-factory-page-inner-wrap">
|
500 |
<div class="wbcr-factory-content-section<?php if( !$this->show_right_sidebar_in_options ): echo ' wbcr-fullwidth'; endif ?>">
|
501 |
+
<?php $this->showPageSubMenu() ?>
|
502 |
+
<div class="wbcr-factory-content" style="min-height:<?= $min_height ?>px">
|
503 |
+
<form method="post" class="form-horizontal">
|
504 |
+
<?php $this->showHeader(); ?>
|
505 |
+
<?php $this->showActionsNotice(); ?>
|
506 |
+
<?php $form->html(); ?>
|
507 |
+
</form>
|
508 |
+
</div>
|
509 |
</div>
|
510 |
<?php if( $this->show_right_sidebar_in_options ): ?>
|
511 |
<div class="wbcr-factory-right-sidebar-section">
|
530 |
|
531 |
protected function showPage()
|
532 |
{
|
533 |
+
global $factory_impressive_page_menu;
|
534 |
?>
|
535 |
<div id="WBCR" class="wrap">
|
536 |
<div class="wbcr-factory-impressive-page-template-000 factory-bootstrap-330 factory-fontawesome-000">
|
537 |
<div class="wbcr-factory-page wbcr-factory-page-<?= $this->id ?>">
|
538 |
<?php $this->showHeader(); ?>
|
539 |
+
|
540 |
<div class="wbcr-factory-left-navigation-bar">
|
541 |
<?php $this->showPageMenu() ?>
|
542 |
</div>
|
543 |
+
<?php
|
544 |
+
$min_height = 0;
|
545 |
+
foreach($factory_impressive_page_menu[$this->plugin->pluginName] as $page) {
|
546 |
+
if( !isset($page['parent']) || empty($page['parent']) ) {
|
547 |
+
$min_height += 61;
|
548 |
+
}
|
549 |
+
}
|
550 |
+
?>
|
551 |
<div class="wbcr-factory-page-inner-wrap">
|
552 |
+
<div class="wbcr-factory-content-section<?php if( !$this->show_right_sidebar_in_options ): echo ' wbcr-fullwidth'; endif ?>">
|
553 |
+
<?php $this->showPageSubMenu() ?>
|
554 |
+
<div class="wbcr-factory-content" style="min-height:<?= $min_height ?>px">
|
555 |
+
<?php $this->showPageContent() ?>
|
556 |
+
</div>
|
557 |
+
</div>
|
558 |
</div>
|
559 |
</div>
|
560 |
<div class="clearfix"></div>
|
574 |
<span class="wbcr-factory-hint-icon-simple wbcr-factory-simple-red">
|
575 |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt=""/>
|
576 |
</span>
|
577 |
+
- <?php _e('A neutral setting that can not harm your site, but you must be sure that you need to use it.', 'factory_pages_324'); ?>
|
578 |
</li>
|
579 |
<li>
|
580 |
<span class="wbcr-factory-hint-icon-simple wbcr-factory-simple-grey">
|
581 |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt=""/>
|
582 |
</span>
|
583 |
+
- <?php _e('When set this option, you must be careful. Plugins and themes may depend on this function. You must be sure that you can disable this feature for the site.', 'factory_pages_324'); ?>
|
584 |
</li>
|
585 |
<li>
|
586 |
<span class="wbcr-factory-hint-icon-simple wbcr-factory-simple-green">
|
587 |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt=""/>
|
588 |
</span>
|
589 |
+
- <?php _e('Absolutely safe setting, We recommend to use.', 'factory_pages_324'); ?>
|
590 |
</li>
|
591 |
</ul>
|
592 |
----------<br>
|
593 |
|
594 |
+
<p><?php _e('Hover to the icon to get help for the feature you selected.', 'factory_pages_324'); ?></p>
|
595 |
</div>
|
596 |
<?php
|
597 |
}
|
603 |
} else {
|
604 |
$page_url = $args[0];
|
605 |
}
|
606 |
+
|
607 |
+
$page_url = apply_filters('wbcr_factory_imppage_rating_widget_url', $page_url, $this->plugin->pluginName, $this->getResultId());
|
608 |
|
609 |
?>
|
610 |
<div class="wbcr-factory-sidebar-widget">
|
611 |
<p>
|
612 |
+
<strong><?php _e('Do you want the plugin to improved and update?', 'factory_pages_324'); ?></strong>
|
613 |
</p>
|
614 |
|
615 |
+
<p><?php _e('Help the author, leave a review on wordpress.org. Thanks to feedback, I will know that the plugin is really useful to you and is needed.', 'factory_pages_324'); ?></p>
|
616 |
|
617 |
+
<p><?php _e('And also write your ideas on how to extend or improve the plugin.', 'factory_pages_324'); ?></p>
|
618 |
|
619 |
<p>
|
620 |
<i class="wbcr-factory-icon-5stars"></i>
|
621 |
<a href="<?= $page_url ?>" title="Go rate us" target="_blank">
|
622 |
+
<strong><?php _e('Go rate us and push ideas', 'factory_pages_324'); ?></strong>
|
623 |
</a>
|
624 |
</p>
|
625 |
</div>
|
631 |
?>
|
632 |
<div class="wbcr-factory-sidebar-widget">
|
633 |
<p>
|
634 |
+
<strong><?php _e('Donation for plugin development', 'factory_pages_324'); ?></strong>
|
635 |
</p>
|
636 |
|
637 |
<?php if( get_locale() !== 'ru_RU' ): ?>
|
640 |
<input type="hidden" name="hosted_button_id" value="VDX7JNTQPNPFW">
|
641 |
|
642 |
<div class="wbcr-factory-donation-price">5$</div>
|
643 |
+
<input type="image" src="<?= FACTORY_PAGES_324_URL ?>/templates/assets/img/paypal-donate.png" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
|
644 |
</form>
|
645 |
<?php else: ?>
|
646 |
<iframe frameborder="0" allowtransparency="true" scrolling="no" src="https://money.yandex.ru/embed/donate.xml?account=410011242846510&quickpay=donate&payment-type-choice=on&mobile-payment-type-choice=on&default-sum=300&targets=%D0%9D%D0%B0+%D0%BF%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%BA%D1%83+%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD%D0%B0+%D0%B8+%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D1%83+%D0%BD%D0%BE%D0%B2%D1%8B%D1%85+%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B9.+&target-visibility=on&project-name=Webcraftic&project-site=&button-text=05&comment=on&hint=%D0%9A%D0%B0%D0%BA%D1%83%D1%8E+%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8E+%D0%BD%D1%83%D0%B6%D0%BD%D0%BE+%D0%B4%D0%BE%D0%B1%D0%B0%D0%B2%D0%B8%D1%82%D1%8C+%D0%B2+%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD%3F&mail=on&successURL=" width="508" height="187"></iframe>
|
readme.txt
CHANGED
@@ -52,5 +52,9 @@ If you want to help with the translation, please contact me through this site or
|
|
52 |
3. Notifications panel (optional)
|
53 |
|
54 |
== Changelog ==
|
|
|
|
|
|
|
|
|
55 |
= 1.0.0 =
|
56 |
* Plugin release
|
52 |
3. Notifications panel (optional)
|
53 |
|
54 |
== Changelog ==
|
55 |
+
= 1.0.2 =
|
56 |
+
* Updated styles for the "Hide notification forever" link
|
57 |
+
* Compatibility with plugins from webcraftic is updated
|
58 |
+
|
59 |
= 1.0.0 =
|
60 |
* Plugin release
|