Disable admin notices individually - Version 1.0.0

Version Description

  • Plugin release
Download this release

Release Info

Developer webcraftic
Plugin Icon 128x128 Disable admin notices individually
Version 1.0.0
Comparing to
See all releases

Version 1.0.0

Files changed (173) hide show
  1. admin/ajax/hide-notice.php +51 -0
  2. admin/assets/css/notifications-panel.css +49 -0
  3. admin/assets/css/notifications-panel.less +59 -0
  4. admin/assets/js/general.js +203 -0
  5. admin/boot.php +84 -0
  6. admin/pages/more-features.php +12 -0
  7. admin/pages/notices.php +154 -0
  8. disable-admin-notices.php +85 -0
  9. includes/classes/class.configurate-notices.php +242 -0
  10. languages/disable-admin-notices-ru_RU.mo +0 -0
  11. languages/disable-admin-notices-ru_RU.po +381 -0
  12. languages/hide-admin-notices-ru_RU.mo +0 -0
  13. languages/hide-admin-notices-ru_RU.po +381 -0
  14. libs/factory/bootstrap/assets/flat/css/bootstrap.accordion.css +33 -0
  15. libs/factory/bootstrap/assets/flat/css/bootstrap.blue.css +48 -0
  16. libs/factory/bootstrap/assets/flat/css/bootstrap.coffee.css +48 -0
  17. libs/factory/bootstrap/assets/flat/css/bootstrap.core.css +7810 -0
  18. libs/factory/bootstrap/assets/flat/css/bootstrap.datepicker.css +782 -0
  19. libs/factory/bootstrap/assets/flat/css/bootstrap.ectoplasm.css +48 -0
  20. libs/factory/bootstrap/assets/flat/css/bootstrap.form-group.css +59 -0
  21. libs/factory/bootstrap/assets/flat/css/bootstrap.form-metabox.css +56 -0
  22. libs/factory/bootstrap/assets/flat/css/bootstrap.light.css +48 -0
  23. libs/factory/bootstrap/assets/flat/css/bootstrap.midnight.css +48 -0
  24. libs/factory/bootstrap/assets/flat/css/bootstrap.ocean.css +48 -0
  25. libs/factory/bootstrap/assets/flat/css/bootstrap.separator.css +8 -0
  26. libs/factory/bootstrap/assets/flat/css/bootstrap.sunrise.css +48 -0
  27. libs/factory/bootstrap/assets/flat/css/bootstrap.tab.css +112 -0
  28. libs/factory/bootstrap/assets/flat/css/bootstrap.wp-editor.css +28 -0
  29. libs/factory/bootstrap/assets/flat/css/control.checkbox.css +102 -0
  30. libs/factory/bootstrap/assets/flat/css/control.color-and-opacity.css +24 -0
  31. libs/factory/bootstrap/assets/flat/css/control.color.css +44 -0
  32. libs/factory/bootstrap/assets/flat/css/control.dropdown-and-colors.css +16 -0
  33. libs/factory/bootstrap/assets/flat/css/control.dropdown.css +92 -0
  34. libs/factory/bootstrap/assets/flat/css/control.fonts.css +24 -0
  35. libs/factory/bootstrap/assets/flat/css/control.integer.css +1 -0
  36. libs/factory/bootstrap/assets/flat/css/control.list.css +67 -0
  37. libs/factory/bootstrap/assets/flat/css/control.pattern.css +187 -0
  38. libs/factory/bootstrap/assets/flat/css/control.radio-colors.css +39 -0
  39. libs/factory/bootstrap/assets/flat/css/holder.conrol-group.css +32 -0
  40. libs/factory/bootstrap/assets/flat/css/holder.more-link.css +32 -0
  41. libs/factory/bootstrap/assets/flat/css/plugin.chosen.css +494 -0
  42. libs/factory/bootstrap/assets/flat/css/plugin.gradient-picker.css +149 -0
  43. libs/factory/bootstrap/assets/flat/css/plugin.nouislider.css +1 -0
  44. libs/factory/bootstrap/assets/flat/css/plugin.paddings-editor.css +109 -0
  45. libs/factory/bootstrap/assets/images/chosen-sprite.png +0 -0
  46. libs/factory/bootstrap/assets/images/chosen-sprite@2x.png +0 -0
  47. libs/factory/bootstrap/assets/images/color_picker_pattern.jpg +0 -0
  48. libs/factory/bootstrap/assets/images/drop-menu_arrow.png +0 -0
  49. libs/factory/bootstrap/assets/images/loader-sm-f6f6f6.gif +0 -0
  50. libs/factory/bootstrap/assets/images/loader-sm-tr.gif +0 -0
  51. libs/factory/bootstrap/assets/images/no-pattern-background-control.png +0 -0
  52. libs/factory/bootstrap/assets/js/bootstrap.accordion.js +49 -0
  53. libs/factory/bootstrap/assets/js/bootstrap.affix.js +127 -0
  54. libs/factory/bootstrap/assets/js/bootstrap.alert.js +98 -0
  55. libs/factory/bootstrap/assets/js/bootstrap.button.js +115 -0
  56. libs/factory/bootstrap/assets/js/bootstrap.carousel.js +217 -0
  57. libs/factory/bootstrap/assets/js/bootstrap.collapse.js +167 -0
  58. libs/factory/bootstrap/assets/js/bootstrap.datepicker.js +1966 -0
  59. libs/factory/bootstrap/assets/js/bootstrap.dropdown.js +143 -0
  60. libs/factory/bootstrap/assets/js/bootstrap.modal.js +246 -0
  61. libs/factory/bootstrap/assets/js/bootstrap.popover.js +117 -0
  62. libs/factory/bootstrap/assets/js/bootstrap.scrollspy.js +158 -0
  63. libs/factory/bootstrap/assets/js/bootstrap.tab.js +135 -0
  64. libs/factory/bootstrap/assets/js/bootstrap.tooltip.js +455 -0
  65. libs/factory/bootstrap/assets/js/bootstrap.transition.js +63 -0
  66. libs/factory/bootstrap/assets/js/control.checkbox.js +290 -0
  67. libs/factory/bootstrap/assets/js/control.color-and-opacity.js +32 -0
  68. libs/factory/bootstrap/assets/js/control.color.js +88 -0
  69. libs/factory/bootstrap/assets/js/control.dropdown-and-colors.js +61 -0
  70. libs/factory/bootstrap/assets/js/control.dropdown.js +355 -0
  71. libs/factory/bootstrap/assets/js/control.fonts.js +196 -0
  72. libs/factory/bootstrap/assets/js/control.gradient.js +51 -0
  73. libs/factory/bootstrap/assets/js/control.integer.js +102 -0
  74. libs/factory/bootstrap/assets/js/control.list.js +141 -0
  75. libs/factory/bootstrap/assets/js/control.pattern.js +218 -0
  76. libs/factory/bootstrap/assets/js/global.color-functions.js +28 -0
  77. libs/factory/bootstrap/assets/js/holder.conrol-group.js +20 -0
  78. libs/factory/bootstrap/assets/js/holder.more-link.js +37 -0
  79. libs/factory/bootstrap/assets/js/plugin.chosen.js +1211 -0
  80. libs/factory/bootstrap/assets/js/plugin.color.js +595 -0
  81. libs/factory/bootstrap/assets/js/plugin.ddslick.js +1 -0
  82. libs/factory/bootstrap/assets/js/plugin.gradient-picker.js +585 -0
  83. libs/factory/bootstrap/assets/js/plugin.iris.js +893 -0
  84. libs/factory/bootstrap/assets/js/plugin.nouislider.js +24 -0
  85. libs/factory/bootstrap/assets/js/plugin.paddings-editor.js +254 -0
  86. libs/factory/bootstrap/boot.php +31 -0
  87. libs/factory/bootstrap/includes/functions.php +296 -0
  88. libs/factory/bootstrap/includes/load-scripts.php +91 -0
  89. libs/factory/bootstrap/includes/load-styles.php +90 -0
  90. libs/factory/clearfy/boot.php +32 -0
  91. libs/factory/clearfy/includes/class.configurate.php +33 -0
  92. libs/factory/clearfy/includes/functions.php +69 -0
  93. libs/factory/clearfy/langs/factory_clearfy_101-fr-FR.mo +0 -0
  94. libs/factory/clearfy/langs/factory_clearfy_101-fr-FR.po +129 -0
  95. libs/factory/clearfy/langs/factory_clearfy_101-ru_RU.mo +0 -0
  96. libs/factory/clearfy/langs/factory_clearfy_101-ru_RU.po +124 -0
  97. libs/factory/clearfy/pages/more-features.php +135 -0
  98. libs/factory/core/boot.php +32 -0
  99. libs/factory/core/includes/activation/activator.class.php +149 -0
  100. libs/factory/core/includes/activation/update.class.php +30 -0
  101. libs/factory/core/includes/assets-managment/assets-list.class.php +157 -0
  102. libs/factory/core/includes/assets-managment/script-list.class.php +84 -0
  103. libs/factory/core/includes/assets-managment/style-list.class.php +43 -0
  104. libs/factory/core/includes/functions.php +396 -0
  105. libs/factory/core/includes/plugin.class.php +730 -0
  106. libs/factory/forms/assets/css/editor.css +12 -0
  107. libs/factory/forms/assets/standard-controls.js +146 -0
  108. libs/factory/forms/boot.php +261 -0
  109. libs/factory/forms/controls/checkbox.php +168 -0
  110. libs/factory/forms/controls/color-and-opacity.php +67 -0
  111. libs/factory/forms/controls/color.php +50 -0
  112. libs/factory/forms/controls/customs/html.php +38 -0
  113. libs/factory/forms/controls/customs/separator.php +27 -0
  114. libs/factory/forms/controls/dropdown-and-colors.php +107 -0
  115. libs/factory/forms/controls/dropdown.php +379 -0
  116. libs/factory/forms/controls/font.php +255 -0
  117. libs/factory/forms/controls/google-font.php +123 -0
  118. libs/factory/forms/controls/gradient.php +95 -0
  119. libs/factory/forms/controls/hidden.php +41 -0
  120. libs/factory/forms/controls/holders/accordion-item.php +53 -0
  121. libs/factory/forms/controls/holders/accordion.php +50 -0
  122. libs/factory/forms/controls/holders/columns.php +85 -0
  123. libs/factory/forms/controls/holders/control-group-item.php +64 -0
  124. libs/factory/forms/controls/holders/control-group.php +80 -0
  125. libs/factory/forms/controls/holders/div.php +54 -0
  126. libs/factory/forms/controls/holders/form-group.php +62 -0
  127. libs/factory/forms/controls/holders/more-link.php +62 -0
  128. libs/factory/forms/controls/holders/tab-item.php +57 -0
  129. libs/factory/forms/controls/holders/tab.php +112 -0
  130. libs/factory/forms/controls/integer.php +147 -0
  131. libs/factory/forms/controls/list.php +211 -0
  132. libs/factory/forms/controls/paddings-editor.php +64 -0
  133. libs/factory/forms/controls/pattern.php +166 -0
  134. libs/factory/forms/controls/radio-colors.php +106 -0
  135. libs/factory/forms/controls/radio.php +80 -0
  136. libs/factory/forms/controls/textarea.php +69 -0
  137. libs/factory/forms/controls/textbox.php +83 -0
  138. libs/factory/forms/controls/url.php +33 -0
  139. libs/factory/forms/controls/wp-editor.php +83 -0
  140. libs/factory/forms/helpers.php +101 -0
  141. libs/factory/forms/includes/complex-control.class.php +117 -0
  142. libs/factory/forms/includes/control-holder.class.php +152 -0
  143. libs/factory/forms/includes/control.class.php +383 -0
  144. libs/factory/forms/includes/custom-element.class.php +35 -0
  145. libs/factory/forms/includes/form-element.class.php +405 -0
  146. libs/factory/forms/includes/form-layout.class.php +102 -0
  147. libs/factory/forms/includes/form.class.php +686 -0
  148. libs/factory/forms/includes/holder.class.php +149 -0
  149. libs/factory/forms/includes/html-builder.class.php +122 -0
  150. libs/factory/forms/includes/providers/meta-value-provider.class.php +228 -0
  151. libs/factory/forms/includes/providers/options-value-provider.class.php +73 -0
  152. libs/factory/forms/includes/providers/value-provider.interface.php +56 -0
  153. libs/factory/forms/langs/factory_forms_329-fr-FR.mo +0 -0
  154. libs/factory/forms/langs/factory_forms_329-fr-FR.po +104 -0
  155. libs/factory/forms/langs/factory_forms_329-ru_RU.mo +0 -0
  156. libs/factory/forms/langs/factory_forms_329-ru_RU.po +95 -0
  157. libs/factory/forms/layouts/bootstrap-2/bootstrap-2.php +92 -0
  158. libs/factory/forms/layouts/bootstrap-3/bootstrap-3.php +191 -0
  159. libs/factory/pages/boot.php +36 -0
  160. libs/factory/pages/includes/admin-page.class.php +413 -0
  161. libs/factory/pages/includes/page.class.php +135 -0
  162. libs/factory/pages/includes/request.class.php +111 -0
  163. libs/factory/pages/langs/factory_pages_322-fr_FR.mo +0 -0
  164. libs/factory/pages/langs/factory_pages_322-fr_FR.po +99 -0
  165. libs/factory/pages/langs/factory_pages_322-ru_RU.mo +0 -0
  166. libs/factory/pages/langs/factory_pages_322-ru_RU.po +99 -0
  167. libs/factory/pages/pages.php +49 -0
  168. libs/factory/pages/templates/assets/css/impressive.page.template.css +355 -0
  169. libs/factory/pages/templates/assets/css/impressive.page.template.less +428 -0
  170. libs/factory/pages/templates/assets/img/5-stars22.png +0 -0
  171. libs/factory/pages/templates/assets/img/paypal-donate.png +0 -0
  172. libs/factory/pages/templates/assets/img/webcraftic-plugin-icon.png +0 -0
  173. libs/factory/pages/templates/impressive-page.class.php +420 -0
admin/ajax/hide-notice.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Hides notifications
4
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
5
+ * @copyright (c) 12.01.2018, Webcraftic
6
+ * @version 1.0
7
+ */
8
+
9
+ function wbcr_clearfy_ajax_hide_notices()
10
+ {
11
+ global $wbcr_dan_plugin;
12
+
13
+ check_ajax_referer($wbcr_dan_plugin->pluginName . '_ajax_hide_notices_nonce', 'security');
14
+
15
+ if( !current_user_can('manage_options') ) {
16
+ echo json_encode(array('error' => __('You don\'t have enough capability to edit this information.', 'disable-admin-notices')));
17
+ exit;
18
+ }
19
+
20
+ $notice_id = isset($_POST['notice_id'])
21
+ ? sanitize_text_field($_POST['notice_id'])
22
+ : null;
23
+
24
+ $notice_html = isset($_POST['notice_html'])
25
+ ? wp_kses($_POST['notice_html'], array(
26
+ 'a' => array(
27
+ 'href' => array()
28
+ )
29
+ ))
30
+ : null;
31
+
32
+ if( empty($notice_id) ) {
33
+ echo json_encode(array('error' => __('Undefinded notice id.', 'disable-admin-notices')));
34
+ exit;
35
+ }
36
+
37
+ $get_hidden_notices = get_option($wbcr_dan_plugin->pluginName . '_hidden_notices');
38
+
39
+ if( !is_array($get_hidden_notices) ) {
40
+ $get_hidden_notices = array();
41
+ }
42
+
43
+ $get_hidden_notices[$notice_id] = rtrim(trim($notice_html));
44
+
45
+ update_option($wbcr_dan_plugin->pluginName . '_hidden_notices', $get_hidden_notices);
46
+
47
+ echo json_encode(array('success' => __('Success', 'disable-admin-notices')));
48
+ exit;
49
+ }
50
+
51
+ add_action('wp_ajax_wbcr_clearfy_hide_notices', 'wbcr_clearfy_ajax_hide_notices');
admin/assets/css/notifications-panel.css ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Notification panel in admin bar
3
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
+ * @copyright Alex Kovalev 23.08.2017
5
+ */
6
+ #wp-admin-bar-wbcr-han-notify-panel .wbcr-han-adminbar-counter {
7
+ background-color: #0073aa;
8
+ border-radius: 50%;
9
+ color: #fff;
10
+ font-weight: bold;
11
+ padding: 2px 6px;
12
+ font-size: 0.85em;
13
+ margin-left: 5px;
14
+ }
15
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper {
16
+ max-height: 500px;
17
+ overflow-y: scroll;
18
+ }
19
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper ul.ab-submenu {
20
+ width: 400px;
21
+ padding: 0;
22
+ }
23
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper ul.ab-submenu > li {
24
+ border-left: 4px solid #32373c;
25
+ padding: 0;
26
+ }
27
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper ul.ab-submenu > li.wpnc-updated {
28
+ border-left-color: #7ad03a;
29
+ }
30
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper ul.ab-submenu > li.wpnc-update-nag {
31
+ border-left-color: #ffba00;
32
+ }
33
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper ul.ab-submenu > li.wpnc-error {
34
+ border-left-color: #dd3d36;
35
+ }
36
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper ul.ab-submenu > li .ab-item {
37
+ height: 100% !important;
38
+ white-space: normal !important;
39
+ padding: .5em 1em;
40
+ border-bottom: 1px solid #4a4f55;
41
+ line-height: .5em;
42
+ }
43
+ #wp-admin-bar-wbcr-han-notify-panel .ab-sub-wrapper ul.ab-submenu > li .ab-item a {
44
+ display: inline;
45
+ padding: 0;
46
+ margin: 0;
47
+ text-decoration: underline;
48
+ line-height: .5em;
49
+ }
admin/assets/css/notifications-panel.less ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Notification panel in admin bar
3
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
+ * @copyright Alex Kovalev 23.08.2017
5
+ */
6
+
7
+ #wp-admin-bar-wbcr-han-notify-panel {
8
+ .wbcr-han-adminbar-counter {
9
+ background-color: #0073aa;
10
+ border-radius: 50%;
11
+ color: #fff;
12
+ font-weight: bold;
13
+ padding: 2px 6px;
14
+ font-size: 0.85em;
15
+ margin-left: 5px;
16
+ }
17
+
18
+ .ab-sub-wrapper {
19
+
20
+ max-height: 500px;
21
+ overflow-y: scroll;
22
+
23
+ ul.ab-submenu {
24
+ width: 400px;
25
+ padding: 0;
26
+
27
+ & > li {
28
+ border-left: 4px solid #32373c;
29
+ padding: 0;
30
+
31
+ &.wpnc-updated {
32
+ border-left-color: #7ad03a;
33
+ }
34
+ &.wpnc-update-nag {
35
+ border-left-color: #ffba00;;
36
+ }
37
+ &.wpnc-error {
38
+ border-left-color: #dd3d36;
39
+ }
40
+
41
+ .ab-item {
42
+ height: 100% !important;
43
+ white-space: normal !important;
44
+ padding: .5em 1em;
45
+ border-bottom: 1px solid #4a4f55;
46
+ line-height: .5em;
47
+ a {
48
+ display: inline;
49
+ padding: 0;
50
+ margin: 0;
51
+ text-decoration: underline;
52
+ line-height: .5em;
53
+ }
54
+ }
55
+
56
+ }
57
+ }
58
+ }
59
+ }
admin/assets/js/general.js ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * General
3
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
4
+ * @copyright (c) 10.09.2017, Webcraftic
5
+ * @version 1.0
6
+ */
7
+
8
+
9
+ (function($) {
10
+ 'use strict';
11
+
12
+ var general = {
13
+ init: function() {
14
+ this.qickStartAssistent();
15
+ this.importOptions();
16
+ },
17
+ qickStartAssistent: function() {
18
+ var self = this;
19
+
20
+ $('.wbcr-clearfy-switch').click(function() {
21
+
22
+ var modeName = $(this).data('mode'),
23
+ modeOptions = $(this).data('mode-options');
24
+
25
+ self.showConfirmationPopup(modeName, modeOptions);
26
+ return false;
27
+ });
28
+
29
+ $('.wbcr-clearfy-popup-button-cancel').click(function() {
30
+ self.hideConfirmationPopup();
31
+ });
32
+
33
+ $('.wbcr-clearfy-cancel-mode').click(function() {
34
+ var $this = $(this), modeName = $(this).closest('.wbcr-clearfy-switch').data('mode'),
35
+ switcher = $(this).closest('.wbcr-clearfy-switch');
36
+
37
+ switcher.addClass('wbcr-clearfy-loading');
38
+
39
+ self.sendRequest({
40
+ action: 'wbcr_clearfy_configurate',
41
+ mode: modeName,
42
+ cancel_mode: true
43
+ }, function(data) {
44
+ switcher.removeClass('wbcr-clearfy-loading');
45
+
46
+ if( data && data.export_options ) {
47
+ $('#wbcr-clearfy-import-export').html(data.export_options);
48
+ }
49
+ },
50
+ function() {
51
+ if( modeName != 'reset' ) {
52
+ switcher.removeClass('wbcr-clearfy-active');
53
+ }
54
+ });
55
+ return false;
56
+ });
57
+
58
+ $('.wbcr-clearfy-popup-button-ok').click(function() {
59
+ var $this = $(this), modeName = $(this).closest('.wbcr-clearfy-confirm-popup').data('mode'),
60
+ switcher = $('div[data-mode="' + modeName + '"]', '#wbcr-clearfy-quick-mode-board');
61
+
62
+ self.hideConfirmationPopup();
63
+ switcher.addClass('wbcr-clearfy-loading');
64
+
65
+ self.sendRequest({
66
+ action: 'wbcr_clearfy_configurate',
67
+ mode: modeName
68
+ }, function(data) {
69
+ switcher.removeClass('wbcr-clearfy-loading');
70
+
71
+ if( data && data.export_options ) {
72
+ $('#wbcr-clearfy-import-export').html(data.export_options);
73
+ }
74
+ },
75
+ function() {
76
+ if( modeName != 'reset' ) {
77
+ switcher.addClass('wbcr-clearfy-active');
78
+ return;
79
+ }
80
+
81
+ $('.wbcr-clearfy-switch').removeClass('wbcr-clearfy-active');
82
+ });
83
+
84
+ return false;
85
+ });
86
+ },
87
+
88
+ showConfirmationPopup: function(modeName, options) {
89
+ var self = this;
90
+
91
+ $('.wbcr-clearfy-layer').fadeIn();
92
+
93
+ var popupElem = $('.wbcr-clearfy-confirm-popup');
94
+ popupElem.data('mode', modeName);
95
+ popupElem.fadeIn();
96
+
97
+ if( modeName != 'reset' ) {
98
+ var printOptTitles = '';
99
+
100
+ if( options ) {
101
+ for( var opt in options ) {
102
+ if( !options.hasOwnProperty(opt) ) {
103
+ continue;
104
+ }
105
+ printOptTitles += '<li>' + options[opt] + '</li>';
106
+
107
+ }
108
+ $('.wbcr-clearfy-list-options').html(printOptTitles);
109
+ popupElem.addClass('wbcr-clearfy-default-warning-options');
110
+ }
111
+ return;
112
+ }
113
+
114
+ popupElem.addClass('wbcr-clearfy-reset-warning-options');
115
+ },
116
+
117
+ hideConfirmationPopup: function() {
118
+ $('.wbcr-clearfy-layer').fadeOut(100);
119
+ var popupElem = $('.wbcr-clearfy-confirm-popup');
120
+
121
+ popupElem.fadeOut(100, function() {
122
+ popupElem.removeClass('wbcr-clearfy-default-warning-options');
123
+ popupElem.removeClass('wbcr-clearfy-reset-warning-options');
124
+ });
125
+
126
+ },
127
+
128
+ importOptions: function() {
129
+ var self = this;
130
+
131
+ $('.wbcr-clearfy-import-options-button').click(function() {
132
+ var settings = $('#wbcr-clearfy-import-export').val(),
133
+ $this = $(this);
134
+
135
+ if( !settings ) {
136
+ return;
137
+ }
138
+
139
+ $(this).prop('disabled', true);
140
+
141
+ self.sendRequest({
142
+ action: 'wbcr_clearfy_import_settings',
143
+ settings: settings
144
+ }, function(data) {
145
+ //console.log(data);
146
+ $this.prop('disabled', false);
147
+ });
148
+
149
+ return false;
150
+ });
151
+ },
152
+ sendRequest: function(data, beforeValidateCallback, successCallback) {
153
+
154
+ var errorContanier = $('.wbcr-clearfy-switch-error-message'),
155
+ defaultErrorMessage = errorContanier.text();
156
+
157
+ if( wbcr_clearfy_ajax === undefined ) {
158
+ console.log('Undefinded wbcr_clearfy_ajax object.');
159
+ return;
160
+ }
161
+
162
+ var ajaxUrl = wbcr_clearfy_ajax ? wbcr_clearfy_ajax.ajaxurl : ajaxurl;
163
+
164
+ if( typeof data === 'object' ) {
165
+ data.security = wbcr_clearfy_ajax.ajax_nonce;
166
+ }
167
+
168
+ $.ajax(ajaxurl, {
169
+ type: 'post',
170
+ dataType: 'json',
171
+ data: data,
172
+ success: function(data, textStatus, jqXHR) {
173
+
174
+ beforeValidateCallback && beforeValidateCallback(data);
175
+
176
+ if( !data || data.error ) {
177
+ if( data ) {
178
+ console.log(data.error);
179
+ if( !errorContanier.is(':visible') ) {
180
+ errorContanier.html(defaultErrorMessage + '<br>' + data.error);
181
+ }
182
+ }
183
+
184
+ if( !errorContanier.is(':visible') ) {
185
+ errorContanier.fadeIn(600).delay(10000).fadeOut(600);
186
+ }
187
+ return;
188
+ }
189
+
190
+ successCallback && successCallback();
191
+
192
+ $('.wbcr-clearfy-switch-success-message').fadeIn(600).delay(3000).fadeOut(600);
193
+
194
+ }
195
+ });
196
+ }
197
+ };
198
+
199
+ $(document).ready(function() {
200
+ general.init();
201
+ });
202
+
203
+ })(jQuery);
admin/boot.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin boot
4
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
5
+ * @copyright Webcraftic 25.05.2017
6
+ * @version 1.0
7
+ */
8
+
9
+ require(WBCR_DAN_PLUGIN_DIR . '/admin/pages/notices.php');
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' => 'disable_comments',
23
+ 'title' => __('Disable comments on the entire site', 'disable-admin-notices'),
24
+ 'tags' => array('disable_all_comments'),
25
+ 'values' => array('disable_all_comments' => 'disable_comments')
26
+ );
27
+ $options[] = array(
28
+ 'name' => 'disable_comments_for_post_types',
29
+ 'title' => __('Select post types', 'disable-admin-notices'),
30
+ 'tags' => array()
31
+ );
32
+ $options[] = array(
33
+ 'name' => 'comment_text_convert_links_pseudo',
34
+ 'title' => __('Replace external links in comments on the JavaScript code', 'disable-admin-notices'),
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 ) {
73
+ $links[] = '<a href="https://goo.gl/TcMcS4" style="color: #FF5722;font-weight: bold;" target="_blank">' . __('Get ultimate plugin free', 'disable-admin-notices') . '</a>';
74
+ }
75
+
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
+ }
82
+
83
+
84
+
admin/pages/more-features.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The page Settings.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ class WbcrHan_MoreFeaturesPage extends FactoryClearfy101_MoreFeaturesPage {
9
+
10
+ }
11
+
12
+ FactoryPages322::register($wbcr_dan_plugin, 'WbcrHan_MoreFeaturesPage');
admin/pages/notices.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The page Settings.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ class WbcrHan_NoticesPage extends FactoryPages322_ImpressiveThemplate {
9
+
10
+ /**
11
+ * The id of the page in the admin menu.
12
+ *
13
+ * Mainly used to navigate between pages.
14
+ * @see FactoryPages322_AdminPage
15
+ *
16
+ * @since 1.0.0
17
+ * @var string
18
+ */
19
+ public $id = "notices";
20
+ public $page_menu_dashicon = 'dashicons-testimonial';
21
+
22
+ public function __construct(Factory326_Plugin $plugin)
23
+ {
24
+ $this->menuTitle = __('Hide admin notices', 'disable-admin-notices');
25
+
26
+ if( !defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
27
+ $this->internal = false;
28
+ $this->menuTarget = 'options-general.php';
29
+ $this->addLinkToPluginActions = true;
30
+ }
31
+
32
+ add_filter('wbcr_factory_imppage_actions_notice', array($this, 'actionsNotice'));
33
+
34
+ parent::__construct($plugin);
35
+ }
36
+
37
+ public function getMenuTitle()
38
+ {
39
+ return defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON')
40
+ ? __('Comments', 'disable-admin-notices')
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
54
+ ),
55
+ 'type' => 'success',
56
+ 'message' => __('Hidden notices are successfully reset, now you can see them again!', 'disable-admin-notices')
57
+ );
58
+
59
+ /*$notices[] = array(
60
+ 'conditions' => array(
61
+ 'wbcr_dan_clear_comments_error' => 1,
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.', 'factory_pages_322')
66
+ );*/
67
+
68
+ return $notices;
69
+ }
70
+
71
+ /**
72
+ * Permalinks options.
73
+ *
74
+ * @since 1.0.0
75
+ * @return mixed[]
76
+ */
77
+ public function getOptions()
78
+ {
79
+ $options = array();
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
+
138
+ $formOptions[] = array(
139
+ 'type' => 'form-group',
140
+ 'items' => $options,
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
+ FactoryPages322::register($wbcr_dan_plugin, 'WbcrHan_NoticesPage');
disable-admin-notices.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.0
8
+ * Text Domain: disable-admin-notices
9
+ * Domain Path: /languages/
10
+ */
11
+
12
+ if( defined('WBCR_DAN_PLUGIN_ACTIVE') || (defined('WBCR_CLEARFY_PLUGIN_ACTIVE') && !defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON')) ) {
13
+ function wbcr_dan_admin_notice_error()
14
+ {
15
+ ?>
16
+ <div class="notice notice-error">
17
+ <p><?php _e('We found that you have the "Clearfy - disable unused features" plugin installed, this plugin already has disable comments functions, so you can deactivate plugin "Disable admin notices"!'); ?></p>
18
+ </div>
19
+ <?php
20
+ }
21
+
22
+ add_action('admin_notices', 'wbcr_dan_admin_notice_error');
23
+
24
+ return;
25
+ } else {
26
+
27
+ define('WBCR_DAN_PLUGIN_ACTIVE', true);
28
+
29
+ define('WBCR_DAN_PLUGIN_DIR', dirname(__FILE__));
30
+ define('WBCR_DAN_PLUGIN_BASE', plugin_basename(__FILE__));
31
+ define('WBCR_DAN_PLUGIN_URL', plugins_url(null, __FILE__));
32
+
33
+
34
+
35
+ if( !defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
36
+ require_once(WBCR_DAN_PLUGIN_DIR . '/libs/factory/core/boot.php');
37
+ }
38
+
39
+ function wbcr_dan_plugin_init()
40
+ {
41
+ global $wbcr_dan_plugin;
42
+
43
+ // Localization plugin
44
+ load_plugin_textdomain('disable-admin-notices', false, dirname(WBCR_DAN_PLUGIN_BASE) . '/languages/');
45
+
46
+ if( defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
47
+ //return;
48
+ global $wbcr_clearfy_plugin;
49
+ $wbcr_dan_plugin = $wbcr_clearfy_plugin;
50
+ } else {
51
+
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.0',
56
+ 'host' => 'wordpress.org',
57
+ 'url' => 'https://wordpress.org/plugins/disable-admin-notices/',
58
+ 'assembly' => 'free',
59
+ 'updates' => WBCR_DAN_PLUGIN_DIR . '/updates/'
60
+ ));
61
+
62
+ // requires factory modules
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_322', 'admin'),
67
+ array('libs/factory/clearfy', 'factory_clearfy_101', 'all')
68
+ ));
69
+ }
70
+
71
+ // loading other files
72
+ if( is_admin() ) {
73
+ require(WBCR_DAN_PLUGIN_DIR . '/admin/boot.php');
74
+ }
75
+
76
+ require(WBCR_DAN_PLUGIN_DIR . '/includes/classes/class.configurate-notices.php');
77
+ new WbcrHan_ConfigHideNotices($wbcr_dan_plugin);
78
+ }
79
+
80
+ if( defined('LOADING_DISABLE_ADMIN_NOTICES_AS_ADDON') ) {
81
+ wbcr_dan_plugin_init();
82
+ } else {
83
+ add_action('plugins_loaded', 'wbcr_dan_plugin_init');
84
+ }
85
+ }
includes/classes/class.configurate-notices.php ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class configures hide admin notices
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ class WbcrHan_ConfigHideNotices extends WbcrFactoryClearfy_Configurate {
10
+
11
+ public function registerActionsAndFilters()
12
+ {
13
+ if( is_admin() ) {
14
+ $hide_notices_type = $this->getOption('hide_admin_notices');
15
+ if( $hide_notices_type != 'not_hide' ) {
16
+ add_action('admin_print_scripts', array($this, 'catchNotices'), 999);
17
+
18
+ if( empty($hide_notices_type) || $hide_notices_type == 'only_selected' ) {
19
+ add_action('admin_head', array($this, 'printNotices'), 999);
20
+ }
21
+
22
+ if( !empty($hide_notices_type) && $this->getOption('show_notices_in_adminbar') ) {
23
+ add_action('admin_bar_menu', array($this, 'notificationsPanel'), 999);
24
+ add_action('admin_enqueue_scripts', array($this, 'notificationsPanelStyles'));
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ public function notificationsPanelStyles()
31
+ {
32
+ global $wbcr_dan_plugin;
33
+ wp_enqueue_style('wpcm_admin', WBCR_DAN_PLUGIN_URL . '/admin/assets/css/notifications-panel.css', array(), $wbcr_dan_plugin->version);
34
+ }
35
+
36
+ public function notificationsPanel(&$wp_admin_bar)
37
+ {
38
+ global $wbcr_dan_plugin;
39
+
40
+ $notifications = $this->getOption('hidden_notices');
41
+
42
+ if( empty($notifications) ) {
43
+ return;
44
+ }
45
+
46
+ $cont_notifications = sizeof($notifications);
47
+
48
+ // Add top menu
49
+ $wp_admin_bar->add_menu(array(
50
+ 'id' => 'wbcr-han-notify-panel',
51
+ 'parent' => 'top-secondary',
52
+ 'title' => sprintf(__('Notifications %s', 'disable-admin-notices'), '<span class="wbcr-han-adminbar-counter">' . $cont_notifications . '</span>'),
53
+ 'href' => false
54
+ ));
55
+
56
+ // loop
57
+ if( !empty($notifications) ) {
58
+ $i = 0;
59
+ foreach($notifications as $notification) {
60
+ $wp_admin_bar->add_menu(array(
61
+ 'id' => 'wbcr-han-notify-panel-item-' . $i,
62
+ 'parent' => 'wbcr-han-notify-panel',
63
+ 'title' => $notification,
64
+ 'href' => false,
65
+ 'meta' => array(
66
+ 'class' => ''
67
+ )
68
+ ));
69
+
70
+ $i++;
71
+ }
72
+ }
73
+ }
74
+
75
+ public function printNotices()
76
+ {
77
+ add_action('admin_notices', array($this, 'noticesCollection'));
78
+ }
79
+
80
+ public function noticesCollection()
81
+ {
82
+ global $wbcr_dan_plugin_all_notices;
83
+
84
+ if( empty($wbcr_dan_plugin_all_notices) ) {
85
+ return;
86
+ }
87
+ ?>
88
+ <style>
89
+ .wbcr-clearfy-hide-notices {
90
+ position: relative;
91
+ padding: 5px 5px 0;
92
+ background: #fff;
93
+ }
94
+
95
+ .wbcr-clearfy-hide-notices > div {
96
+ margin: 0 !important;
97
+ }
98
+
99
+ .wbcr-clearfy-hide-notice-link {
100
+ display: block;
101
+ text-align: right;
102
+ right: 0;
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;
112
+ }
113
+ </style>
114
+ <script>
115
+ var wbcr_clearfy_ajax_nonce = "<?=wp_create_nonce($this->plugin->pluginName . '_ajax_hide_notices_nonce')?>";
116
+ var wbcr_clearfy_ajax_url = "<?=admin_url('admin-ajax.php')?>";
117
+
118
+ jQuery(function() {
119
+ jQuery(document).on('click', '.wbcr-clearfy-hide-notice-link', function() {
120
+ var self = jQuery(this),
121
+ noticeID = jQuery(this).data('notice-id'),
122
+ noticeHtml = jQuery(this).closest('.wbcr-clearfy-hide-notices').clone();
123
+
124
+ noticeHtml.find('.wbcr-clearfy-hide-notice-link').remove();
125
+
126
+ if( !noticeID ) {
127
+ alert('Undefinded error. Please report the bug to our support forum.');
128
+ }
129
+
130
+ jQuery.ajax(wbcr_clearfy_ajax_url, {
131
+ type: 'post',
132
+ dataType: 'json',
133
+ data: {
134
+ action: 'wbcr_clearfy_hide_notices',
135
+ security: wbcr_clearfy_ajax_nonce,
136
+ notice_id: noticeID,
137
+ notice_html: noticeHtml.html()
138
+ },
139
+ success: function(data, textStatus, jqXHR) {
140
+ if( data == 'error' && data.error ) {
141
+ alert(data.error);
142
+ return;
143
+ }
144
+
145
+ self.closest('.wbcr-clearfy-hide-notices').parent().hide();
146
+ }
147
+ });
148
+ });
149
+ });
150
+ </script>
151
+ <?php
152
+ foreach($wbcr_dan_plugin_all_notices as $val) {
153
+ echo $val;
154
+ }
155
+ }
156
+
157
+ public function catchNotices()
158
+ {
159
+ global $wp_filter, $wbcr_dan_plugin_all_notices;
160
+
161
+ $hide_notices_type = $this->getOption('hide_admin_notices');
162
+
163
+ if( empty($hide_notices_type) || $hide_notices_type == 'only_selected' ) {
164
+ $get_hidden_notices = $this->getOption('hidden_notices');
165
+
166
+ $content = array();
167
+ foreach($wp_filter['admin_notices']->callbacks as $filters) {
168
+ foreach($filters as $callback_name => $callback) {
169
+
170
+ if( 'usof_hide_admin_notices_start' == $callback_name || 'usof_hide_admin_notices_end' == $callback_name ) {
171
+ continue;
172
+ }
173
+
174
+ ob_start();
175
+ call_user_func_array($callback['function'], array());
176
+ $cont = ob_get_clean();
177
+
178
+ if( empty($cont) ) {
179
+ continue;
180
+ }
181
+
182
+ $uniq_id1 = md5($cont);
183
+ $uniq_id2 = md5($callback_name);
184
+
185
+ if( is_array($callback['function']) && sizeof($callback['function']) == 2 ) {
186
+ $class = $callback['function'][0];
187
+ if( is_object($class) ) {
188
+ $class_name = get_class($class);
189
+ $method_name = $callback['function'][1];
190
+ $uniq_id2 = md5($class_name . ':' . $method_name);
191
+ }
192
+ }
193
+
194
+ if( !empty($get_hidden_notices) ) {
195
+
196
+ $skip_notice = true;
197
+ foreach((array)$get_hidden_notices as $key => $notice) {
198
+ $splited_notice_id = explode('_', $key);
199
+ if( empty($splited_notice_id) || sizeof($splited_notice_id) < 2 ) {
200
+ continue;
201
+ }
202
+ $compare_notice_id_1 = $splited_notice_id[0];
203
+ $compare_notice_id_2 = $splited_notice_id[1];
204
+
205
+ if( $compare_notice_id_1 == $uniq_id1 || $compare_notice_id_2 == $uniq_id2 ) {
206
+ $skip_notice = false;
207
+ }
208
+ }
209
+
210
+ if( !$skip_notice ) {
211
+ continue;
212
+ }
213
+ }
214
+
215
+ $hide_link = '<a href="#" data-notice-id="' . $uniq_id1 . '_' . $uniq_id2 . '" class="wbcr-clearfy-hide-notice-link">[' . __('Hide notification forever', 'disable-admin-notices') . ']</a>';
216
+
217
+ $cont = preg_replace('/<(script|style)([^>]+)?>(.*?)<\/(script|style)>/is', '', $cont);
218
+ $cont = rtrim(trim($cont));
219
+ $cont = preg_replace('/^(<div[^>]+>)(.*?)(<\/div>)$/is', '$1<div class="wbcr-clearfy-hide-notices">$2' . $hide_link . '</div>$3', $cont);
220
+
221
+ if( empty($cont) ) {
222
+ continue;
223
+ }
224
+ $content[] = $cont;
225
+ }
226
+ }
227
+
228
+ $wbcr_dan_plugin_all_notices = $content;
229
+ }
230
+
231
+ if( is_user_admin() ) {
232
+ if( isset($wp_filter['user_admin_notices']) ) {
233
+ unset($wp_filter['user_admin_notices']);
234
+ }
235
+ } elseif( isset($wp_filter['admin_notices']) ) {
236
+ unset($wp_filter['admin_notices']);
237
+ }
238
+ if( isset($wp_filter['all_admin_notices']) ) {
239
+ unset($wp_filter['all_admin_notices']);
240
+ }
241
+ }
242
+ }
languages/disable-admin-notices-ru_RU.mo ADDED
Binary file
languages/disable-admin-notices-ru_RU.po ADDED
@@ -0,0 +1,381 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 отключить комментарии"
languages/hide-admin-notices-ru_RU.mo ADDED
Binary file
languages/hide-admin-notices-ru_RU.po ADDED
@@ -0,0 +1,381 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.core.css ADDED
@@ -0,0 +1,7810 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Factory Bootstrap CSS
3
+ *
4
+ * The code is based on Bootstrap v2.1.1
5
+ *
6
+ * Bootstrap v3.0.3 (http://getbootstrap.com)
7
+ * Copyright 2013 Twitter, Inc.
8
+ * Licensed under http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * @author Paul Kashtanoff <paul@byonepress.com>
11
+ * @copyright (c) 2013, OnePress Ltd
12
+ *
13
+ * @package factory-bootstrap
14
+ * @since 1.0.0
15
+ */
16
+
17
+ .factory-bootstrap-330 article,
18
+ .factory-bootstrap-330 aside,
19
+ .factory-bootstrap-330 details,
20
+ .factory-bootstrap-330 figcaption,
21
+ .factory-bootstrap-330 figure,
22
+ .factory-bootstrap-330 footer,
23
+ .factory-bootstrap-330 header,
24
+ .factory-bootstrap-330 hgroup,
25
+ .factory-bootstrap-330 main,
26
+ .factory-bootstrap-330 nav,
27
+ .factory-bootstrap-330 section,
28
+ .factory-bootstrap-330 summary {
29
+ display: block;
30
+ }
31
+
32
+ .factory-bootstrap-330 audio,
33
+ .factory-bootstrap-330 canvas,
34
+ .factory-bootstrap-330 video {
35
+ display: inline-block;
36
+ }
37
+
38
+ .factory-bootstrap-330 audio:not([controls]) {
39
+ display: none;
40
+ height: 0;
41
+ }
42
+
43
+ .factory-bootstrap-330 [hidden],
44
+ .factory-bootstrap-330 template {
45
+ display: none;
46
+ }
47
+
48
+ .factory-bootstrap-330 body {
49
+ margin: 0;
50
+ }
51
+
52
+ .factory-bootstrap-330 a {
53
+ background: transparent;
54
+ }
55
+
56
+ .factory-bootstrap-330 a:focus {
57
+ outline: thin dotted;
58
+ }
59
+
60
+ .factory-bootstrap-330 a:active,
61
+ .factory-bootstrap-330 a:hover {
62
+ outline: 0;
63
+ }
64
+
65
+ .factory-bootstrap-330 h1 {
66
+ margin: 0.67em 0;
67
+ font-size: 2em;
68
+ }
69
+
70
+ .factory-bootstrap-330 abbr[title] {
71
+ border-bottom: 1px dotted;
72
+ }
73
+
74
+ .factory-bootstrap-330 b,
75
+ .factory-bootstrap-330 strong {
76
+ font-weight: bold;
77
+ }
78
+
79
+ .factory-bootstrap-330 dfn {
80
+ font-style: italic;
81
+ }
82
+
83
+ .factory-bootstrap-330 hr {
84
+ height: 0;
85
+ -moz-box-sizing: content-box;
86
+ box-sizing: content-box;
87
+ }
88
+
89
+ .factory-bootstrap-330 mark {
90
+ color: #000;
91
+ background: #ff0;
92
+ }
93
+
94
+ .factory-bootstrap-330 code,
95
+ .factory-bootstrap-330 kbd,
96
+ .factory-bootstrap-330 pre,
97
+ .factory-bootstrap-330 samp {
98
+ font-family: monospace, serif;
99
+ font-size: 1em;
100
+ }
101
+
102
+ .factory-bootstrap-330 pre {
103
+ white-space: pre-wrap;
104
+ }
105
+
106
+ .factory-bootstrap-330 q {
107
+ quotes: "\201C" "\201D" "\2018" "\2019";
108
+ }
109
+
110
+ .factory-bootstrap-330 small {
111
+ font-size: 80%;
112
+ }
113
+
114
+ .factory-bootstrap-330 sub,
115
+ .factory-bootstrap-330 sup {
116
+ position: relative;
117
+ font-size: 75%;
118
+ line-height: 0;
119
+ vertical-align: baseline;
120
+ }
121
+
122
+ .factory-bootstrap-330 sup {
123
+ top: -0.5em;
124
+ }
125
+
126
+ .factory-bootstrap-330 sub {
127
+ bottom: -0.25em;
128
+ }
129
+
130
+ .factory-bootstrap-330 img {
131
+ border: 0;
132
+ }
133
+
134
+ .factory-bootstrap-330 svg:not(:root) {
135
+ overflow: hidden;
136
+ }
137
+
138
+ .factory-bootstrap-330 figure {
139
+ margin: 0;
140
+ }
141
+
142
+ .factory-bootstrap-330 fieldset {
143
+ padding: 0.35em 0.625em 0.75em;
144
+ margin: 0 2px;
145
+ border: 1px solid #c0c0c0;
146
+ }
147
+
148
+ .factory-bootstrap-330 legend {
149
+ padding: 0;
150
+ border: 0;
151
+ }
152
+
153
+ .factory-bootstrap-330 button,
154
+ .factory-bootstrap-330 input,
155
+ .factory-bootstrap-330 select,
156
+ .factory-bootstrap-330 textarea {
157
+ margin: 0;
158
+ font-family: inherit;
159
+ font-size: 100%;
160
+ }
161
+
162
+ .factory-bootstrap-330 button,
163
+ .factory-bootstrap-330 input {
164
+ line-height: normal;
165
+ }
166
+
167
+ .factory-bootstrap-330 button,
168
+ .factory-bootstrap-330 select {
169
+ text-transform: none;
170
+ }
171
+
172
+ .factory-bootstrap-330 select {
173
+ padding-right: 4px !important;
174
+ }
175
+
176
+ .factory-bootstrap-330 button,
177
+ html .factory-bootstrap-330 input[type="button"],
178
+ .factory-bootstrap-330 input[type="reset"],
179
+ .factory-bootstrap-330 input[type="submit"] {
180
+ cursor: pointer;
181
+ -webkit-appearance: button;
182
+ }
183
+
184
+ .factory-bootstrap-330 button[disabled],
185
+ html .factory-bootstrap-330 input[disabled] {
186
+ cursor: default;
187
+ }
188
+
189
+ .factory-bootstrap-330 input[type="checkbox"],
190
+ .factory-bootstrap-330 input[type="radio"] {
191
+ padding: 0;
192
+ box-sizing: border-box;
193
+ }
194
+
195
+ .factory-bootstrap-330 input[type="search"] {
196
+ -webkit-box-sizing: content-box;
197
+ -moz-box-sizing: content-box;
198
+ box-sizing: content-box;
199
+ -webkit-appearance: textfield;
200
+ }
201
+
202
+ .factory-bootstrap-330 input[type="search"]::-webkit-search-cancel-button,
203
+ .factory-bootstrap-330 input[type="search"]::-webkit-search-decoration {
204
+ -webkit-appearance: none;
205
+ }
206
+
207
+ .factory-bootstrap-330 button::-moz-focus-inner,
208
+ .factory-bootstrap-330 input::-moz-focus-inner {
209
+ padding: 0;
210
+ border: 0;
211
+ }
212
+
213
+ .factory-bootstrap-330 textarea {
214
+ overflow: auto;
215
+ vertical-align: top;
216
+ }
217
+
218
+ .factory-bootstrap-330 table {
219
+ border-collapse: collapse;
220
+ border-spacing: 0;
221
+ }
222
+
223
+ @media print {
224
+ .factory-bootstrap-330 * {
225
+ color: #000 !important;
226
+ text-shadow: none !important;
227
+ background: transparent !important;
228
+ box-shadow: none !important;
229
+ }
230
+
231
+ .factory-bootstrap-330 a,
232
+ .factory-bootstrap-330 a:visited {
233
+ text-decoration: underline;
234
+ }
235
+
236
+ .factory-bootstrap-330 a[href]:after {
237
+ content: " (" attr(href) ")";
238
+ }
239
+
240
+ .factory-bootstrap-330 abbr[title]:after {
241
+ content: " (" attr(title) ")";
242
+ }
243
+
244
+ .factory-bootstrap-330 a[href^="javascript:"]:after,
245
+ .factory-bootstrap-330 a[href^="#"]:after {
246
+ content: "";
247
+ }
248
+
249
+ .factory-bootstrap-330 pre,
250
+ .factory-bootstrap-330 blockquote {
251
+ border: 1px solid #999;
252
+ page-break-inside: avoid;
253
+ }
254
+
255
+ .factory-bootstrap-330 thead {
256
+ display: table-header-group;
257
+ }
258
+
259
+ .factory-bootstrap-330 tr,
260
+ .factory-bootstrap-330 img {
261
+ page-break-inside: avoid;
262
+ }
263
+
264
+ .factory-bootstrap-330 img {
265
+ max-width: 100% !important;
266
+ }
267
+
268
+ @page {
269
+ margin: 2cm .5cm;
270
+ }
271
+
272
+ .factory-bootstrap-330 p,
273
+ .factory-bootstrap-330 h2,
274
+ .factory-bootstrap-330 h3 {
275
+ orphans: 3;
276
+ widows: 3;
277
+ }
278
+
279
+ .factory-bootstrap-330 h2,
280
+ .factory-bootstrap-330 h3 {
281
+ page-break-after: avoid;
282
+ }
283
+
284
+ .factory-bootstrap-330 select {
285
+ background: #fff !important;
286
+ }
287
+
288
+ .factory-bootstrap-330 .navbar {
289
+ display: none;
290
+ }
291
+
292
+ .factory-bootstrap-330 .table td,
293
+ .factory-bootstrap-330 .table th {
294
+ background-color: #fff !important;
295
+ }
296
+
297
+ .factory-bootstrap-330 .btn > .caret,
298
+ .factory-bootstrap-330 .dropup > .btn > .caret {
299
+ border-top-color: #000 !important;
300
+ }
301
+
302
+ .factory-bootstrap-330 .label {
303
+ border: 1px solid #000;
304
+ }
305
+
306
+ .factory-bootstrap-330 .table {
307
+ border-collapse: collapse !important;
308
+ }
309
+
310
+ .factory-bootstrap-330 .table-bordered th,
311
+ .factory-bootstrap-330 .table-bordered td {
312
+ border: 1px solid #ddd !important;
313
+ }
314
+ }
315
+
316
+ .factory-bootstrap-330 *,
317
+ .factory-bootstrap-330 *:before,
318
+ .factory-bootstrap-330 *:after {
319
+ -webkit-box-sizing: border-box;
320
+ -moz-box-sizing: border-box;
321
+ box-sizing: border-box;
322
+ }
323
+
324
+ html .factory-bootstrap-330 {
325
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
326
+ }
327
+
328
+ .factory-bootstrap-330 body {
329
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
330
+ font-size: 14px;
331
+ line-height: 1.428571429;
332
+ color: #333333;
333
+ background-color: #ffffff;
334
+ }
335
+
336
+ .factory-bootstrap-330 input,
337
+ .factory-bootstrap-330 button,
338
+ .factory-bootstrap-330 select,
339
+ .factory-bootstrap-330 textarea {
340
+ font-family: inherit;
341
+ font-size: inherit;
342
+ line-height: inherit;
343
+ }
344
+
345
+ .factory-bootstrap-330 img {
346
+ vertical-align: middle;
347
+ }
348
+
349
+ .factory-bootstrap-330 .img-responsive {
350
+ display: block;
351
+ height: auto;
352
+ max-width: 100%;
353
+ }
354
+
355
+ .factory-bootstrap-330 .img-rounded {
356
+ border-radius: 6px;
357
+ }
358
+
359
+ .factory-bootstrap-330 .img-thumbnail {
360
+ display: inline-block;
361
+ height: auto;
362
+ max-width: 100%;
363
+ padding: 4px;
364
+ line-height: 1.428571429;
365
+ background-color: #ffffff;
366
+ border: 1px solid #dddddd;
367
+ border-radius: 4px;
368
+ -webkit-transition: all 0.2s ease-in-out;
369
+ transition: all 0.2s ease-in-out;
370
+ }
371
+
372
+ .factory-bootstrap-330 .img-circle {
373
+ border-radius: 50%;
374
+ }
375
+
376
+ .factory-bootstrap-330 hr {
377
+ margin-top: 20px;
378
+ margin-bottom: 20px;
379
+ border: 0;
380
+ border-top: 1px solid #eeeeee;
381
+ }
382
+
383
+ .factory-bootstrap-330 .sr-only {
384
+ position: absolute;
385
+ width: 1px;
386
+ height: 1px;
387
+ padding: 0;
388
+ margin: -1px;
389
+ overflow: hidden;
390
+ clip: rect(0, 0, 0, 0);
391
+ border: 0;
392
+ }
393
+
394
+ .factory-bootstrap-330 h1,
395
+ .factory-bootstrap-330 h2,
396
+ .factory-bootstrap-330 h3,
397
+ .factory-bootstrap-330 h4,
398
+ .factory-bootstrap-330 h5,
399
+ .factory-bootstrap-330 h6,
400
+ .factory-bootstrap-330 .h1,
401
+ .factory-bootstrap-330 .h2,
402
+ .factory-bootstrap-330 .h3,
403
+ .factory-bootstrap-330 .h4,
404
+ .factory-bootstrap-330 .h5,
405
+ .factory-bootstrap-330 .h6 {
406
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
407
+ font-weight: 500;
408
+ line-height: 1.1;
409
+ color: inherit;
410
+ }
411
+
412
+ .factory-bootstrap-330 h1 small,
413
+ .factory-bootstrap-330 h2 small,
414
+ .factory-bootstrap-330 h3 small,
415
+ .factory-bootstrap-330 h4 small,
416
+ .factory-bootstrap-330 h5 small,
417
+ .factory-bootstrap-330 h6 small,
418
+ .factory-bootstrap-330 .h1 small,
419
+ .factory-bootstrap-330 .h2 small,
420
+ .factory-bootstrap-330 .h3 small,
421
+ .factory-bootstrap-330 .h4 small,
422
+ .factory-bootstrap-330 .h5 small,
423
+ .factory-bootstrap-330 .h6 small,
424
+ .factory-bootstrap-330 h1 .small,
425
+ .factory-bootstrap-330 h2 .small,
426
+ .factory-bootstrap-330 h3 .small,
427
+ .factory-bootstrap-330 h4 .small,
428
+ .factory-bootstrap-330 h5 .small,
429
+ .factory-bootstrap-330 h6 .small,
430
+ .factory-bootstrap-330 .h1 .small,
431
+ .factory-bootstrap-330 .h2 .small,
432
+ .factory-bootstrap-330 .h3 .small,
433
+ .factory-bootstrap-330 .h4 .small,
434
+ .factory-bootstrap-330 .h5 .small,
435
+ .factory-bootstrap-330 .h6 .small {
436
+ font-weight: normal;
437
+ line-height: 1;
438
+ color: #999999;
439
+ }
440
+
441
+ .factory-bootstrap-330 h1,
442
+ .factory-bootstrap-330 h2,
443
+ .factory-bootstrap-330 h3 {
444
+ margin-top: 20px;
445
+ margin-bottom: 10px;
446
+ }
447
+
448
+ .factory-bootstrap-330 h1 small,
449
+ .factory-bootstrap-330 h2 small,
450
+ .factory-bootstrap-330 h3 small,
451
+ .factory-bootstrap-330 h1 .small,
452
+ .factory-bootstrap-330 h2 .small,
453
+ .factory-bootstrap-330 h3 .small {
454
+ font-size: 65%;
455
+ }
456
+
457
+ .factory-bootstrap-330 h4,
458
+ .factory-bootstrap-330 h5,
459
+ .factory-bootstrap-330 h6 {
460
+ margin-top: 10px;
461
+ margin-bottom: 10px;
462
+ }
463
+
464
+ .factory-bootstrap-330 h4 small,
465
+ .factory-bootstrap-330 h5 small,
466
+ .factory-bootstrap-330 h6 small,
467
+ .factory-bootstrap-330 h4 .small,
468
+ .factory-bootstrap-330 h5 .small,
469
+ .factory-bootstrap-330 h6 .small {
470
+ font-size: 75%;
471
+ }
472
+
473
+ .factory-bootstrap-330 h1,
474
+ .factory-bootstrap-330 .h1 {
475
+ font-size: 36px;
476
+ }
477
+
478
+ .factory-bootstrap-330 h2,
479
+ .factory-bootstrap-330 .h2 {
480
+ font-size: 30px;
481
+ }
482
+
483
+ .factory-bootstrap-330 h3,
484
+ .factory-bootstrap-330 .h3 {
485
+ font-size: 24px;
486
+ }
487
+
488
+ .factory-bootstrap-330 h4,
489
+ .factory-bootstrap-330 .h4 {
490
+ font-size: 18px;
491
+ }
492
+
493
+ .factory-bootstrap-330 h5,
494
+ .factory-bootstrap-330 .h5 {
495
+ font-size: 14px;
496
+ }
497
+
498
+ .factory-bootstrap-330 h6,
499
+ .factory-bootstrap-330 .h6 {
500
+ font-size: 12px;
501
+ }
502
+
503
+ .factory-bootstrap-330 p {
504
+ margin: 0 0 10px;
505
+ }
506
+
507
+ .factory-bootstrap-330 .lead {
508
+ margin-bottom: 20px;
509
+ font-size: 16px;
510
+ font-weight: 200;
511
+ line-height: 1.4;
512
+ }
513
+
514
+ @media (min-width: 768px) {
515
+ .lead {
516
+ font-size: 21px;
517
+ }
518
+ }
519
+
520
+ .factory-bootstrap-330 small,
521
+ .factory-bootstrap-330 .small {
522
+ font-size: 85%;
523
+ }
524
+
525
+ .factory-bootstrap-330 cite {
526
+ font-style: normal;
527
+ }
528
+
529
+ .factory-bootstrap-330 .text-muted {
530
+ color: #999999;
531
+ }
532
+
533
+ .factory-bootstrap-330 .text-primary {
534
+ color: #428bca;
535
+ }
536
+
537
+ .factory-bootstrap-330 .text-primary:hover {
538
+ color: #3071a9;
539
+ }
540
+
541
+ .factory-bootstrap-330 .text-warning {
542
+ color: #8a6d3b;
543
+ }
544
+
545
+ .factory-bootstrap-330 .text-warning:hover {
546
+ color: #66512c;
547
+ }
548
+
549
+ .factory-bootstrap-330 .text-danger {
550
+ color: #a94442;
551
+ }
552
+
553
+ .factory-bootstrap-330 .text-danger:hover {
554
+ color: #843534;
555
+ }
556
+
557
+ .factory-bootstrap-330 .text-success {
558
+ color: #3c763d;
559
+ }
560
+
561
+ .factory-bootstrap-330 .text-success:hover {
562
+ color: #2b542c;
563
+ }
564
+
565
+ .factory-bootstrap-330 .text-info {
566
+ color: #31708f;
567
+ }
568
+
569
+ .factory-bootstrap-330 .text-info:hover {
570
+ color: #245269;
571
+ }
572
+
573
+ .factory-bootstrap-330 .text-left {
574
+ text-align: left;
575
+ }
576
+
577
+ .factory-bootstrap-330 .text-right {
578
+ text-align: right;
579
+ }
580
+
581
+ .factory-bootstrap-330 .text-center {
582
+ text-align: center;
583
+ }
584
+
585
+ .factory-bootstrap-330 .page-header {
586
+ padding-bottom: 9px;
587
+ margin: 40px 0 20px;
588
+ border-bottom: 1px solid #eeeeee;
589
+ }
590
+
591
+ .factory-bootstrap-330 ul,
592
+ .factory-bootstrap-330 ol {
593
+ margin-top: 0;
594
+ margin-bottom: 10px;
595
+ }
596
+
597
+ .factory-bootstrap-330 ul ul,
598
+ .factory-bootstrap-330 ol ul,
599
+ .factory-bootstrap-330 ul ol,
600
+ .factory-bootstrap-330 ol ol {
601
+ margin-bottom: 0;
602
+ }
603
+
604
+ .factory-bootstrap-330 .list-unstyled {
605
+ padding-left: 0;
606
+ list-style: none;
607
+ }
608
+
609
+ .factory-bootstrap-330 .list-inline {
610
+ padding-left: 0;
611
+ list-style: none;
612
+ }
613
+
614
+ .factory-bootstrap-330 .list-inline > li {
615
+ display: inline-block;
616
+ padding-right: 5px;
617
+ padding-left: 5px;
618
+ }
619
+
620
+ .factory-bootstrap-330 .list-inline > li:first-child {
621
+ padding-left: 0;
622
+ }
623
+
624
+ .factory-bootstrap-330 dl {
625
+ margin-top: 0;
626
+ margin-bottom: 20px;
627
+ }
628
+
629
+ .factory-bootstrap-330 dt,
630
+ .factory-bootstrap-330 dd {
631
+ line-height: 1.428571429;
632
+ }
633
+
634
+ .factory-bootstrap-330 dt {
635
+ font-weight: bold;
636
+ }
637
+
638
+ .factory-bootstrap-330 dd {
639
+ margin-left: 0;
640
+ }
641
+
642
+ @media (min-width: 768px) {
643
+ .dl-horizontal dt {
644
+ float: left;
645
+ width: 160px;
646
+ overflow: hidden;
647
+ clear: left;
648
+ text-align: right;
649
+ text-overflow: ellipsis;
650
+ white-space: nowrap;
651
+ }
652
+
653
+ .dl-horizontal dd {
654
+ margin-left: 180px;
655
+ }
656
+
657
+ .dl-horizontal dd:before,
658
+ .dl-horizontal dd:after {
659
+ display: table;
660
+ content: " ";
661
+ }
662
+
663
+ .dl-horizontal dd:after {
664
+ clear: both;
665
+ }
666
+
667
+ .dl-horizontal dd:before,
668
+ .dl-horizontal dd:after {
669
+ display: table;
670
+ content: " ";
671
+ }
672
+
673
+ .dl-horizontal dd:after {
674
+ clear: both;
675
+ }
676
+ }
677
+
678
+ .factory-bootstrap-330 abbr[title],
679
+ .factory-bootstrap-330 abbr[data-original-title] {
680
+ cursor: help;
681
+ border-bottom: 1px dotted #999999;
682
+ }
683
+
684
+ .factory-bootstrap-330 .initialism {
685
+ font-size: 90%;
686
+ text-transform: uppercase;
687
+ }
688
+
689
+ .factory-bootstrap-330 blockquote {
690
+ padding: 10px 20px;
691
+ margin: 0 0 20px;
692
+ border-left: 5px solid #eeeeee;
693
+ }
694
+
695
+ .factory-bootstrap-330 blockquote p {
696
+ font-size: 17.5px;
697
+ font-weight: 300;
698
+ line-height: 1.25;
699
+ }
700
+
701
+ .factory-bootstrap-330 blockquote p:last-child {
702
+ margin-bottom: 0;
703
+ }
704
+
705
+ .factory-bootstrap-330 blockquote small,
706
+ .factory-bootstrap-330 blockquote .small {
707
+ display: block;
708
+ line-height: 1.428571429;
709
+ color: #999999;
710
+ }
711
+
712
+ .factory-bootstrap-330 blockquote small:before,
713
+ .factory-bootstrap-330 blockquote .small:before {
714
+ content: '\2014 \00A0';
715
+ }
716
+
717
+ .factory-bootstrap-330 blockquote.pull-right {
718
+ padding-right: 15px;
719
+ padding-left: 0;
720
+ border-right: 5px solid #eeeeee;
721
+ border-left: 0;
722
+ }
723
+
724
+ .factory-bootstrap-330 blockquote.pull-right p,
725
+ .factory-bootstrap-330 blockquote.pull-right small,
726
+ .factory-bootstrap-330 blockquote.pull-right .small {
727
+ text-align: right;
728
+ }
729
+
730
+ .factory-bootstrap-330 blockquote.pull-right small:before,
731
+ .factory-bootstrap-330 blockquote.pull-right .small:before {
732
+ content: '';
733
+ }
734
+
735
+ .factory-bootstrap-330 blockquote.pull-right small:after,
736
+ .factory-bootstrap-330 blockquote.pull-right .small:after {
737
+ content: '\00A0 \2014';
738
+ }
739
+
740
+ .factory-bootstrap-330 blockquote:before,
741
+ .factory-bootstrap-330 blockquote:after {
742
+ content: "";
743
+ }
744
+
745
+ .factory-bootstrap-330 address {
746
+ margin-bottom: 20px;
747
+ font-style: normal;
748
+ line-height: 1.428571429;
749
+ }
750
+
751
+ .factory-bootstrap-330 code,
752
+ .factory-bootstrap-330 kbd,
753
+ .factory-bootstrap-330 pre,
754
+ .factory-bootstrap-330 samp {
755
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
756
+ }
757
+
758
+ .factory-bootstrap-330 code {
759
+ padding: 2px 4px;
760
+ font-size: 90%;
761
+ color: #c7254e;
762
+ white-space: nowrap;
763
+ background-color: #f9f2f4;
764
+ border-radius: 4px;
765
+ }
766
+
767
+ .factory-bootstrap-330 pre {
768
+ display: block;
769
+ padding: 9.5px;
770
+ margin: 0 0 10px;
771
+ font-size: 13px;
772
+ line-height: 1.428571429;
773
+ color: #333333;
774
+ word-break: break-all;
775
+ word-wrap: break-word;
776
+ background-color: #f5f5f5;
777
+ border: 1px solid #cccccc;
778
+ border-radius: 4px;
779
+ }
780
+
781
+ .factory-bootstrap-330 pre code {
782
+ padding: 0;
783
+ font-size: inherit;
784
+ color: inherit;
785
+ white-space: pre-wrap;
786
+ background-color: transparent;
787
+ border-radius: 0;
788
+ }
789
+
790
+ .factory-bootstrap-330 .pre-scrollable {
791
+ max-height: 340px;
792
+ overflow-y: scroll;
793
+ }
794
+
795
+ .factory-bootstrap-330 .container {
796
+ padding-right: 15px;
797
+ padding-left: 15px;
798
+ margin-right: auto;
799
+ margin-left: auto;
800
+ }
801
+
802
+ .factory-bootstrap-330 .container:before,
803
+ .factory-bootstrap-330 .container:after {
804
+ display: table;
805
+ content: " ";
806
+ }
807
+
808
+ .factory-bootstrap-330 .container:after {
809
+ clear: both;
810
+ }
811
+
812
+ .factory-bootstrap-330 .container:before,
813
+ .factory-bootstrap-330 .container:after {
814
+ display: table;
815
+ content: " ";
816
+ }
817
+
818
+ .factory-bootstrap-330 .container:after {
819
+ clear: both;
820
+ }
821
+
822
+ @media (min-width: 768px) {
823
+ .container {
824
+ width: 750px;
825
+ }
826
+ }
827
+
828
+ @media (min-width: 992px) {
829
+ .container {
830
+ width: 970px;
831
+ }
832
+ }
833
+
834
+ @media (min-width: 1200px) {
835
+ .container {
836
+ width: 1170px;
837
+ }
838
+ }
839
+
840
+ .factory-bootstrap-330 .row {
841
+ margin-right: -15px;
842
+ margin-left: -15px;
843
+ }
844
+
845
+ .factory-bootstrap-330 .row:before,
846
+ .factory-bootstrap-330 .row:after {
847
+ display: table;
848
+ content: " ";
849
+ }
850
+
851
+ .factory-bootstrap-330 .row:after {
852
+ clear: both;
853
+ }
854
+
855
+ .factory-bootstrap-330 .row:before,
856
+ .factory-bootstrap-330 .row:after {
857
+ display: table;
858
+ content: " ";
859
+ }
860
+
861
+ .factory-bootstrap-330 .row:after {
862
+ clear: both;
863
+ }
864
+
865
+ .factory-bootstrap-330 .col-xs-1,
866
+ .factory-bootstrap-330 .col-sm-1,
867
+ .factory-bootstrap-330 .col-md-1,
868
+ .factory-bootstrap-330 .col-lg-1,
869
+ .factory-bootstrap-330 .col-xs-2,
870
+ .factory-bootstrap-330 .col-sm-2,
871
+ .factory-bootstrap-330 .col-md-2,
872
+ .factory-bootstrap-330 .col-lg-2,
873
+ .factory-bootstrap-330 .col-xs-3,
874
+ .factory-bootstrap-330 .col-sm-3,
875
+ .factory-bootstrap-330 .col-md-3,
876
+ .factory-bootstrap-330 .col-lg-3,
877
+ .factory-bootstrap-330 .col-xs-4,
878
+ .factory-bootstrap-330 .col-sm-4,
879
+ .factory-bootstrap-330 .col-md-4,
880
+ .factory-bootstrap-330 .col-lg-4,
881
+ .factory-bootstrap-330 .col-xs-5,
882
+ .factory-bootstrap-330 .col-sm-5,
883
+ .factory-bootstrap-330 .col-md-5,
884
+ .factory-bootstrap-330 .col-lg-5,
885
+ .factory-bootstrap-330 .col-xs-6,
886
+ .factory-bootstrap-330 .col-sm-6,
887
+ .factory-bootstrap-330 .col-md-6,
888
+ .factory-bootstrap-330 .col-lg-6,
889
+ .factory-bootstrap-330 .col-xs-7,
890
+ .factory-bootstrap-330 .col-sm-7,
891
+ .factory-bootstrap-330 .col-md-7,
892
+ .factory-bootstrap-330 .col-lg-7,
893
+ .factory-bootstrap-330 .col-xs-8,
894
+ .factory-bootstrap-330 .col-sm-8,
895
+ .factory-bootstrap-330 .col-md-8,
896
+ .factory-bootstrap-330 .col-lg-8,
897
+ .factory-bootstrap-330 .col-xs-9,
898
+ .factory-bootstrap-330 .col-sm-9,
899
+ .factory-bootstrap-330 .col-md-9,
900
+ .factory-bootstrap-330 .col-lg-9,
901
+ .factory-bootstrap-330 .col-xs-10,
902
+ .factory-bootstrap-330 .col-sm-10,
903
+ .factory-bootstrap-330 .col-md-10,
904
+ .factory-bootstrap-330 .col-lg-10,
905
+ .factory-bootstrap-330 .col-xs-11,
906
+ .factory-bootstrap-330 .col-sm-11,
907
+ .factory-bootstrap-330 .col-md-11,
908
+ .factory-bootstrap-330 .col-lg-11,
909
+ .factory-bootstrap-330 .col-xs-12,
910
+ .factory-bootstrap-330 .col-sm-12,
911
+ .factory-bootstrap-330 .col-md-12,
912
+ .factory-bootstrap-330 .col-lg-12 {
913
+ position: relative;
914
+ min-height: 1px;
915
+ padding-right: 15px;
916
+ padding-left: 15px;
917
+ }
918
+
919
+ .factory-bootstrap-330 .col-xs-1,
920
+ .factory-bootstrap-330 .col-xs-2,
921
+ .factory-bootstrap-330 .col-xs-3,
922
+ .factory-bootstrap-330 .col-xs-4,
923
+ .factory-bootstrap-330 .col-xs-5,
924
+ .factory-bootstrap-330 .col-xs-6,
925
+ .factory-bootstrap-330 .col-xs-7,
926
+ .factory-bootstrap-330 .col-xs-8,
927
+ .factory-bootstrap-330 .col-xs-9,
928
+ .factory-bootstrap-330 .col-xs-10,
929
+ .factory-bootstrap-330 .col-xs-11,
930
+ .factory-bootstrap-330 .col-xs-12 {
931
+ float: left;
932
+ }
933
+
934
+ .factory-bootstrap-330 .col-xs-12 {
935
+ width: 100%;
936
+ }
937
+
938
+ .factory-bootstrap-330 .col-xs-11 {
939
+ width: 91.66666666666666%;
940
+ }
941
+
942
+ .factory-bootstrap-330 .col-xs-10 {
943
+ width: 83.33333333333334%;
944
+ }
945
+
946
+ .factory-bootstrap-330 .col-xs-9 {
947
+ width: 75%;
948
+ }
949
+
950
+ .factory-bootstrap-330 .col-xs-8 {
951
+ width: 66.66666666666666%;
952
+ }
953
+
954
+ .factory-bootstrap-330 .col-xs-7 {
955
+ width: 58.333333333333336%;
956
+ }
957
+
958
+ .factory-bootstrap-330 .col-xs-6 {
959
+ width: 50%;
960
+ }
961
+
962
+ .factory-bootstrap-330 .col-xs-5 {
963
+ width: 41.66666666666667%;
964
+ }
965
+
966
+ .factory-bootstrap-330 .col-xs-4 {
967
+ width: 33.33333333333333%;
968
+ }
969
+
970
+ .factory-bootstrap-330 .col-xs-3 {
971
+ width: 25%;
972
+ }
973
+
974
+ .factory-bootstrap-330 .col-xs-2 {
975
+ width: 16.666666666666664%;
976
+ }
977
+
978
+ .factory-bootstrap-330 .col-xs-1 {
979
+ width: 8.333333333333332%;
980
+ }
981
+
982
+ .factory-bootstrap-330 .col-xs-pull-12 {
983
+ right: 100%;
984
+ }
985
+
986
+ .factory-bootstrap-330 .col-xs-pull-11 {
987
+ right: 91.66666666666666%;
988
+ }
989
+
990
+ .factory-bootstrap-330 .col-xs-pull-10 {
991
+ right: 83.33333333333334%;
992
+ }
993
+
994
+ .factory-bootstrap-330 .col-xs-pull-9 {
995
+ right: 75%;
996
+ }
997
+
998
+ .factory-bootstrap-330 .col-xs-pull-8 {
999
+ right: 66.66666666666666%;
1000
+ }
1001
+
1002
+ .factory-bootstrap-330 .col-xs-pull-7 {
1003
+ right: 58.333333333333336%;
1004
+ }
1005
+
1006
+ .factory-bootstrap-330 .col-xs-pull-6 {
1007
+ right: 50%;
1008
+ }
1009
+
1010
+ .factory-bootstrap-330 .col-xs-pull-5 {
1011
+ right: 41.66666666666667%;
1012
+ }
1013
+
1014
+ .factory-bootstrap-330 .col-xs-pull-4 {
1015
+ right: 33.33333333333333%;
1016
+ }
1017
+
1018
+ .factory-bootstrap-330 .col-xs-pull-3 {
1019
+ right: 25%;
1020
+ }
1021
+
1022
+ .factory-bootstrap-330 .col-xs-pull-2 {
1023
+ right: 16.666666666666664%;
1024
+ }
1025
+
1026
+ .factory-bootstrap-330 .col-xs-pull-1 {
1027
+ right: 8.333333333333332%;
1028
+ }
1029
+
1030
+ .factory-bootstrap-330 .col-xs-pull-0 {
1031
+ right: 0;
1032
+ }
1033
+
1034
+ .factory-bootstrap-330 .col-xs-push-12 {
1035
+ left: 100%;
1036
+ }
1037
+
1038
+ .factory-bootstrap-330 .col-xs-push-11 {
1039
+ left: 91.66666666666666%;
1040
+ }
1041
+
1042
+ .factory-bootstrap-330 .col-xs-push-10 {
1043
+ left: 83.33333333333334%;
1044
+ }
1045
+
1046
+ .factory-bootstrap-330 .col-xs-push-9 {
1047
+ left: 75%;
1048
+ }
1049
+
1050
+ .factory-bootstrap-330 .col-xs-push-8 {
1051
+ left: 66.66666666666666%;
1052
+ }
1053
+
1054
+ .factory-bootstrap-330 .col-xs-push-7 {
1055
+ left: 58.333333333333336%;
1056
+ }
1057
+
1058
+ .factory-bootstrap-330 .col-xs-push-6 {
1059
+ left: 50%;
1060
+ }
1061
+
1062
+ .factory-bootstrap-330 .col-xs-push-5 {
1063
+ left: 41.66666666666667%;
1064
+ }
1065
+
1066
+ .factory-bootstrap-330 .col-xs-push-4 {
1067
+ left: 33.33333333333333%;
1068
+ }
1069
+
1070
+ .factory-bootstrap-330 .col-xs-push-3 {
1071
+ left: 25%;
1072
+ }
1073
+
1074
+ .factory-bootstrap-330 .col-xs-push-2 {
1075
+ left: 16.666666666666664%;
1076
+ }
1077
+
1078
+ .factory-bootstrap-330 .col-xs-push-1 {
1079
+ left: 8.333333333333332%;
1080
+ }
1081
+
1082
+ .factory-bootstrap-330 .col-xs-push-0 {
1083
+ left: 0;
1084
+ }
1085
+
1086
+ .factory-bootstrap-330 .col-xs-offset-12 {
1087
+ margin-left: 100%;
1088
+ }
1089
+
1090
+ .factory-bootstrap-330 .col-xs-offset-11 {
1091
+ margin-left: 91.66666666666666%;
1092
+ }
1093
+
1094
+ .factory-bootstrap-330 .col-xs-offset-10 {
1095
+ margin-left: 83.33333333333334%;
1096
+ }
1097
+
1098
+ .factory-bootstrap-330 .col-xs-offset-9 {
1099
+ margin-left: 75%;
1100
+ }
1101
+
1102
+ .factory-bootstrap-330 .col-xs-offset-8 {
1103
+ margin-left: 66.66666666666666%;
1104
+ }
1105
+
1106
+ .factory-bootstrap-330 .col-xs-offset-7 {
1107
+ margin-left: 58.333333333333336%;
1108
+ }
1109
+
1110
+ .factory-bootstrap-330 .col-xs-offset-6 {
1111
+ margin-left: 50%;
1112
+ }
1113
+
1114
+ .factory-bootstrap-330 .col-xs-offset-5 {
1115
+ margin-left: 41.66666666666667%;
1116
+ }
1117
+
1118
+ .factory-bootstrap-330 .col-xs-offset-4 {
1119
+ margin-left: 33.33333333333333%;
1120
+ }
1121
+
1122
+ .factory-bootstrap-330 .col-xs-offset-3 {
1123
+ margin-left: 25%;
1124
+ }
1125
+
1126
+ .factory-bootstrap-330 .col-xs-offset-2 {
1127
+ margin-left: 16.666666666666664%;
1128
+ }
1129
+
1130
+ .factory-bootstrap-330 .col-xs-offset-1 {
1131
+ margin-left: 8.333333333333332%;
1132
+ }
1133
+
1134
+ .factory-bootstrap-330 .col-xs-offset-0 {
1135
+ margin-left: 0;
1136
+ }
1137
+
1138
+ @media (min-width: 768px) {
1139
+ .col-sm-1,
1140
+ .col-sm-2,
1141
+ .col-sm-3,
1142
+ .col-sm-4,
1143
+ .col-sm-5,
1144
+ .col-sm-6,
1145
+ .col-sm-7,
1146
+ .col-sm-8,
1147
+ .col-sm-9,
1148
+ .col-sm-10,
1149
+ .col-sm-11,
1150
+ .col-sm-12 {
1151
+ float: left;
1152
+ }
1153
+
1154
+ .col-sm-12 {
1155
+ width: 100%;
1156
+ }
1157
+
1158
+ .col-sm-11 {
1159
+ width: 91.66666666666666%;
1160
+ }
1161
+
1162
+ .col-sm-10 {
1163
+ width: 83.33333333333334%;
1164
+ }
1165
+
1166
+ .col-sm-9 {
1167
+ width: 75%;
1168
+ }
1169
+
1170
+ .col-sm-8 {
1171
+ width: 66.66666666666666%;
1172
+ }
1173
+
1174
+ .col-sm-7 {
1175
+ width: 58.333333333333336%;
1176
+ }
1177
+
1178
+ .col-sm-6 {
1179
+ width: 50%;
1180
+ }
1181
+
1182
+ .col-sm-5 {
1183
+ width: 41.66666666666667%;
1184
+ }
1185
+
1186
+ .col-sm-4 {
1187
+ width: 33.33333333333333%;
1188
+ }
1189
+
1190
+ .col-sm-3 {
1191
+ width: 25%;
1192
+ }
1193
+
1194
+ .col-sm-2 {
1195
+ width: 16.666666666666664%;
1196
+ }
1197
+
1198
+ .col-sm-1 {
1199
+ width: 8.333333333333332%;
1200
+ }
1201
+
1202
+ .col-sm-pull-12 {
1203
+ right: 100%;
1204
+ }
1205
+
1206
+ .col-sm-pull-11 {
1207
+ right: 91.66666666666666%;
1208
+ }
1209
+
1210
+ .col-sm-pull-10 {
1211
+ right: 83.33333333333334%;
1212
+ }
1213
+
1214
+ .col-sm-pull-9 {
1215
+ right: 75%;
1216
+ }
1217
+
1218
+ .col-sm-pull-8 {
1219
+ right: 66.66666666666666%;
1220
+ }
1221
+
1222
+ .col-sm-pull-7 {
1223
+ right: 58.333333333333336%;
1224
+ }
1225
+
1226
+ .col-sm-pull-6 {
1227
+ right: 50%;
1228
+ }
1229
+
1230
+ .col-sm-pull-5 {
1231
+ right: 41.66666666666667%;
1232
+ }
1233
+
1234
+ .col-sm-pull-4 {
1235
+ right: 33.33333333333333%;
1236
+ }
1237
+
1238
+ .col-sm-pull-3 {
1239
+ right: 25%;
1240
+ }
1241
+
1242
+ .col-sm-pull-2 {
1243
+ right: 16.666666666666664%;
1244
+ }
1245
+
1246
+ .col-sm-pull-1 {
1247
+ right: 8.333333333333332%;
1248
+ }
1249
+
1250
+ .col-sm-pull-0 {
1251
+ right: 0;
1252
+ }
1253
+
1254
+ .col-sm-push-12 {
1255
+ left: 100%;
1256
+ }
1257
+
1258
+ .col-sm-push-11 {
1259
+ left: 91.66666666666666%;
1260
+ }
1261
+
1262
+ .col-sm-push-10 {
1263
+ left: 83.33333333333334%;
1264
+ }
1265
+
1266
+ .col-sm-push-9 {
1267
+ left: 75%;
1268
+ }
1269
+
1270
+ .col-sm-push-8 {
1271
+ left: 66.66666666666666%;
1272
+ }
1273
+
1274
+ .col-sm-push-7 {
1275
+ left: 58.333333333333336%;
1276
+ }
1277
+
1278
+ .col-sm-push-6 {
1279
+ left: 50%;
1280
+ }
1281
+
1282
+ .col-sm-push-5 {
1283
+ left: 41.66666666666667%;
1284
+ }
1285
+
1286
+ .col-sm-push-4 {
1287
+ left: 33.33333333333333%;
1288
+ }
1289
+
1290
+ .col-sm-push-3 {
1291
+ left: 25%;
1292
+ }
1293
+
1294
+ .col-sm-push-2 {
1295
+ left: 16.666666666666664%;
1296
+ }
1297
+
1298
+ .col-sm-push-1 {
1299
+ left: 8.333333333333332%;
1300
+ }
1301
+
1302
+ .col-sm-push-0 {
1303
+ left: 0;
1304
+ }
1305
+
1306
+ .col-sm-offset-12 {
1307
+ margin-left: 100%;
1308
+ }
1309
+
1310
+ .col-sm-offset-11 {
1311
+ margin-left: 91.66666666666666%;
1312
+ }
1313
+
1314
+ .col-sm-offset-10 {
1315
+ margin-left: 83.33333333333334%;
1316
+ }
1317
+
1318
+ .col-sm-offset-9 {
1319
+ margin-left: 75%;
1320
+ }
1321
+
1322
+ .col-sm-offset-8 {
1323
+ margin-left: 66.66666666666666%;
1324
+ }
1325
+
1326
+ .col-sm-offset-7 {
1327
+ margin-left: 58.333333333333336%;
1328
+ }
1329
+
1330
+ .col-sm-offset-6 {
1331
+ margin-left: 50%;
1332
+ }
1333
+
1334
+ .col-sm-offset-5 {
1335
+ margin-left: 41.66666666666667%;
1336
+ }
1337
+
1338
+ .col-sm-offset-4 {
1339
+ margin-left: 33.33333333333333%;
1340
+ }
1341
+
1342
+ .col-sm-offset-3 {
1343
+ margin-left: 25%;
1344
+ }
1345
+
1346
+ .col-sm-offset-2 {
1347
+ margin-left: 16.666666666666664%;
1348
+ }
1349
+
1350
+ .col-sm-offset-1 {
1351
+ margin-left: 8.333333333333332%;
1352
+ }
1353
+
1354
+ .col-sm-offset-0 {
1355
+ margin-left: 0;
1356
+ }
1357
+ }
1358
+
1359
+ @media (min-width: 992px) {
1360
+ .col-md-1,
1361
+ .col-md-2,
1362
+ .col-md-3,
1363
+ .col-md-4,
1364
+ .col-md-5,
1365
+ .col-md-6,
1366
+ .col-md-7,
1367
+ .col-md-8,
1368
+ .col-md-9,
1369
+ .col-md-10,
1370
+ .col-md-11,
1371
+ .col-md-12 {
1372
+ float: left;
1373
+ }
1374
+
1375
+ .col-md-12 {
1376
+ width: 100%;
1377
+ }
1378
+
1379
+ .col-md-11 {
1380
+ width: 91.66666666666666%;
1381
+ }
1382
+
1383
+ .col-md-10 {
1384
+ width: 83.33333333333334%;
1385
+ }
1386
+
1387
+ .col-md-9 {
1388
+ width: 75%;
1389
+ }
1390
+
1391
+ .col-md-8 {
1392
+ width: 66.66666666666666%;
1393
+ }
1394
+
1395
+ .col-md-7 {
1396
+ width: 58.333333333333336%;
1397
+ }
1398
+
1399
+ .col-md-6 {
1400
+ width: 50%;
1401
+ }
1402
+
1403
+ .col-md-5 {
1404
+ width: 41.66666666666667%;
1405
+ }
1406
+
1407
+ .col-md-4 {
1408
+ width: 33.33333333333333%;
1409
+ }
1410
+
1411
+ .col-md-3 {
1412
+ width: 25%;
1413
+ }
1414
+
1415
+ .col-md-2 {
1416
+ width: 16.666666666666664%;
1417
+ }
1418
+
1419
+ .col-md-1 {
1420
+ width: 8.333333333333332%;
1421
+ }
1422
+
1423
+ .col-md-pull-12 {
1424
+ right: 100%;
1425
+ }
1426
+
1427
+ .col-md-pull-11 {
1428
+ right: 91.66666666666666%;
1429
+ }
1430
+
1431
+ .col-md-pull-10 {
1432
+ right: 83.33333333333334%;
1433
+ }
1434
+
1435
+ .col-md-pull-9 {
1436
+ right: 75%;
1437
+ }
1438
+
1439
+ .col-md-pull-8 {
1440
+ right: 66.66666666666666%;
1441
+ }
1442
+
1443
+ .col-md-pull-7 {
1444
+ right: 58.333333333333336%;
1445
+ }
1446
+
1447
+ .col-md-pull-6 {
1448
+ right: 50%;
1449
+ }
1450
+
1451
+ .col-md-pull-5 {
1452
+ right: 41.66666666666667%;
1453
+ }
1454
+
1455
+ .col-md-pull-4 {
1456
+ right: 33.33333333333333%;
1457
+ }
1458
+
1459
+ .col-md-pull-3 {
1460
+ right: 25%;
1461
+ }
1462
+
1463
+ .col-md-pull-2 {
1464
+ right: 16.666666666666664%;
1465
+ }
1466
+
1467
+ .col-md-pull-1 {
1468
+ right: 8.333333333333332%;
1469
+ }
1470
+
1471
+ .col-md-pull-0 {
1472
+ right: 0;
1473
+ }
1474
+
1475
+ .col-md-push-12 {
1476
+ left: 100%;
1477
+ }
1478
+
1479
+ .col-md-push-11 {
1480
+ left: 91.66666666666666%;
1481
+ }
1482
+
1483
+ .col-md-push-10 {
1484
+ left: 83.33333333333334%;
1485
+ }
1486
+
1487
+ .col-md-push-9 {
1488
+ left: 75%;
1489
+ }
1490
+
1491
+ .col-md-push-8 {
1492
+ left: 66.66666666666666%;
1493
+ }
1494
+
1495
+ .col-md-push-7 {
1496
+ left: 58.333333333333336%;
1497
+ }
1498
+
1499
+ .col-md-push-6 {
1500
+ left: 50%;
1501
+ }
1502
+
1503
+ .col-md-push-5 {
1504
+ left: 41.66666666666667%;
1505
+ }
1506
+
1507
+ .col-md-push-4 {
1508
+ left: 33.33333333333333%;
1509
+ }
1510
+
1511
+ .col-md-push-3 {
1512
+ left: 25%;
1513
+ }
1514
+
1515
+ .col-md-push-2 {
1516
+ left: 16.666666666666664%;
1517
+ }
1518
+
1519
+ .col-md-push-1 {
1520
+ left: 8.333333333333332%;
1521
+ }
1522
+
1523
+ .col-md-push-0 {
1524
+ left: 0;
1525
+ }
1526
+
1527
+ .col-md-offset-12 {
1528
+ margin-left: 100%;
1529
+ }
1530
+
1531
+ .col-md-offset-11 {
1532
+ margin-left: 91.66666666666666%;
1533
+ }
1534
+
1535
+ .col-md-offset-10 {
1536
+ margin-left: 83.33333333333334%;
1537
+ }
1538
+
1539
+ .col-md-offset-9 {
1540
+ margin-left: 75%;
1541
+ }
1542
+
1543
+ .col-md-offset-8 {
1544
+ margin-left: 66.66666666666666%;
1545
+ }
1546
+
1547
+ .col-md-offset-7 {
1548
+ margin-left: 58.333333333333336%;
1549
+ }
1550
+
1551
+ .col-md-offset-6 {
1552
+ margin-left: 50%;
1553
+ }
1554
+
1555
+ .col-md-offset-5 {
1556
+ margin-left: 41.66666666666667%;
1557
+ }
1558
+
1559
+ .col-md-offset-4 {
1560
+ margin-left: 33.33333333333333%;
1561
+ }
1562
+
1563
+ .col-md-offset-3 {
1564
+ margin-left: 25%;
1565
+ }
1566
+
1567
+ .col-md-offset-2 {
1568
+ margin-left: 16.666666666666664%;
1569
+ }
1570
+
1571
+ .col-md-offset-1 {
1572
+ margin-left: 8.333333333333332%;
1573
+ }
1574
+
1575
+ .col-md-offset-0 {
1576
+ margin-left: 0;
1577
+ }
1578
+ }
1579
+
1580
+ @media (min-width: 1200px) {
1581
+ .col-lg-1,
1582
+ .col-lg-2,
1583
+ .col-lg-3,
1584
+ .col-lg-4,
1585
+ .col-lg-5,
1586
+ .col-lg-6,
1587
+ .col-lg-7,
1588
+ .col-lg-8,
1589
+ .col-lg-9,
1590
+ .col-lg-10,
1591
+ .col-lg-11,
1592
+ .col-lg-12 {
1593
+ float: left;
1594
+ }
1595
+
1596
+ .col-lg-12 {
1597
+ width: 100%;
1598
+ }
1599
+
1600
+ .col-lg-11 {
1601
+ width: 91.66666666666666%;
1602
+ }
1603
+
1604
+ .col-lg-10 {
1605
+ width: 83.33333333333334%;
1606
+ }
1607
+
1608
+ .col-lg-9 {
1609
+ width: 75%;
1610
+ }
1611
+
1612
+ .col-lg-8 {
1613
+ width: 66.66666666666666%;
1614
+ }
1615
+
1616
+ .col-lg-7 {
1617
+ width: 58.333333333333336%;
1618
+ }
1619
+
1620
+ .col-lg-6 {
1621
+ width: 50%;
1622
+ }
1623
+
1624
+ .col-lg-5 {
1625
+ width: 41.66666666666667%;
1626
+ }
1627
+
1628
+ .col-lg-4 {
1629
+ width: 33.33333333333333%;
1630
+ }
1631
+
1632
+ .col-lg-3 {
1633
+ width: 25%;
1634
+ }
1635
+
1636
+ .col-lg-2 {
1637
+ width: 16.666666666666664%;
1638
+ }
1639
+
1640
+ .col-lg-1 {
1641
+ width: 8.333333333333332%;
1642
+ }
1643
+
1644
+ .col-lg-pull-12 {
1645
+ right: 100%;
1646
+ }
1647
+
1648
+ .col-lg-pull-11 {
1649
+ right: 91.66666666666666%;
1650
+ }
1651
+
1652
+ .col-lg-pull-10 {
1653
+ right: 83.33333333333334%;
1654
+ }
1655
+
1656
+ .col-lg-pull-9 {
1657
+ right: 75%;
1658
+ }
1659
+
1660
+ .col-lg-pull-8 {
1661
+ right: 66.66666666666666%;
1662
+ }
1663
+
1664
+ .col-lg-pull-7 {
1665
+ right: 58.333333333333336%;
1666
+ }
1667
+
1668
+ .col-lg-pull-6 {
1669
+ right: 50%;
1670
+ }
1671
+
1672
+ .col-lg-pull-5 {
1673
+ right: 41.66666666666667%;
1674
+ }
1675
+
1676
+ .col-lg-pull-4 {
1677
+ right: 33.33333333333333%;
1678
+ }
1679
+
1680
+ .col-lg-pull-3 {
1681
+ right: 25%;
1682
+ }
1683
+
1684
+ .col-lg-pull-2 {
1685
+ right: 16.666666666666664%;
1686
+ }
1687
+
1688
+ .col-lg-pull-1 {
1689
+ right: 8.333333333333332%;
1690
+ }
1691
+
1692
+ .col-lg-pull-0 {
1693
+ right: 0;
1694
+ }
1695
+
1696
+ .col-lg-push-12 {
1697
+ left: 100%;
1698
+ }
1699
+
1700
+ .col-lg-push-11 {
1701
+ left: 91.66666666666666%;
1702
+ }
1703
+
1704
+ .col-lg-push-10 {
1705
+ left: 83.33333333333334%;
1706
+ }
1707
+
1708
+ .col-lg-push-9 {
1709
+ left: 75%;
1710
+ }
1711
+
1712
+ .col-lg-push-8 {
1713
+ left: 66.66666666666666%;
1714
+ }
1715
+
1716
+ .col-lg-push-7 {
1717
+ left: 58.333333333333336%;
1718
+ }
1719
+
1720
+ .col-lg-push-6 {
1721
+ left: 50%;
1722
+ }
1723
+
1724
+ .col-lg-push-5 {
1725
+ left: 41.66666666666667%;
1726
+ }
1727
+
1728
+ .col-lg-push-4 {
1729
+ left: 33.33333333333333%;
1730
+ }
1731
+
1732
+ .col-lg-push-3 {
1733
+ left: 25%;
1734
+ }
1735
+
1736
+ .col-lg-push-2 {
1737
+ left: 16.666666666666664%;
1738
+ }
1739
+
1740
+ .col-lg-push-1 {
1741
+ left: 8.333333333333332%;
1742
+ }
1743
+
1744
+ .col-lg-push-0 {
1745
+ left: 0;
1746
+ }
1747
+
1748
+ .col-lg-offset-12 {
1749
+ margin-left: 100%;
1750
+ }
1751
+
1752
+ .col-lg-offset-11 {
1753
+ margin-left: 91.66666666666666%;
1754
+ }
1755
+
1756
+ .col-lg-offset-10 {
1757
+ margin-left: 83.33333333333334%;
1758
+ }
1759
+
1760
+ .col-lg-offset-9 {
1761
+ margin-left: 75%;
1762
+ }
1763
+
1764
+ .col-lg-offset-8 {
1765
+ margin-left: 66.66666666666666%;
1766
+ }
1767
+
1768
+ .col-lg-offset-7 {
1769
+ margin-left: 58.333333333333336%;
1770
+ }
1771
+
1772
+ .col-lg-offset-6 {
1773
+ margin-left: 50%;
1774
+ }
1775
+
1776
+ .col-lg-offset-5 {
1777
+ margin-left: 41.66666666666667%;
1778
+ }
1779
+
1780
+ .col-lg-offset-4 {
1781
+ margin-left: 33.33333333333333%;
1782
+ }
1783
+
1784
+ .col-lg-offset-3 {
1785
+ margin-left: 25%;
1786
+ }
1787
+
1788
+ .col-lg-offset-2 {
1789
+ margin-left: 16.666666666666664%;
1790
+ }
1791
+
1792
+ .col-lg-offset-1 {
1793
+ margin-left: 8.333333333333332%;
1794
+ }
1795
+
1796
+ .col-lg-offset-0 {
1797
+ margin-left: 0;
1798
+ }
1799
+ }
1800
+
1801
+ .factory-bootstrap-330 table {
1802
+ max-width: 100%;
1803
+ background-color: transparent;
1804
+ }
1805
+
1806
+ .factory-bootstrap-330 th {
1807
+ text-align: left;
1808
+ }
1809
+
1810
+ .factory-bootstrap-330 .table {
1811
+ width: 100%;
1812
+ margin-bottom: 20px;
1813
+ }
1814
+
1815
+ .factory-bootstrap-330 .table > thead > tr > th,
1816
+ .factory-bootstrap-330 .table > tbody > tr > th,
1817
+ .factory-bootstrap-330 .table > tfoot > tr > th,
1818
+ .factory-bootstrap-330 .table > thead > tr > td,
1819
+ .factory-bootstrap-330 .table > tbody > tr > td,
1820
+ .factory-bootstrap-330 .table > tfoot > tr > td {
1821
+ padding: 8px;
1822
+ line-height: 1.428571429;
1823
+ vertical-align: top;
1824
+ border-top: 1px solid #dddddd;
1825
+ }
1826
+
1827
+ .factory-bootstrap-330 .table > thead > tr > th {
1828
+ vertical-align: bottom;
1829
+ border-bottom: 2px solid #dddddd;
1830
+ }
1831
+
1832
+ .factory-bootstrap-330 .table > caption + thead > tr:first-child > th,
1833
+ .factory-bootstrap-330 .table > colgroup + thead > tr:first-child > th,
1834
+ .factory-bootstrap-330 .table > thead:first-child > tr:first-child > th,
1835
+ .factory-bootstrap-330 .table > caption + thead > tr:first-child > td,
1836
+ .factory-bootstrap-330 .table > colgroup + thead > tr:first-child > td,
1837
+ .factory-bootstrap-330 .table > thead:first-child > tr:first-child > td {
1838
+ border-top: 0;
1839
+ }
1840
+
1841
+ .factory-bootstrap-330 .table > tbody + tbody {
1842
+ border-top: 2px solid #dddddd;
1843
+ }
1844
+
1845
+ .factory-bootstrap-330 .table .table {
1846
+ background-color: #ffffff;
1847
+ }
1848
+
1849
+ .factory-bootstrap-330 .table-condensed > thead > tr > th,
1850
+ .factory-bootstrap-330 .table-condensed > tbody > tr > th,
1851
+ .factory-bootstrap-330 .table-condensed > tfoot > tr > th,
1852
+ .factory-bootstrap-330 .table-condensed > thead > tr > td,
1853
+ .factory-bootstrap-330 .table-condensed > tbody > tr > td,
1854
+ .factory-bootstrap-330 .table-condensed > tfoot > tr > td {
1855
+ padding: 5px;
1856
+ }
1857
+
1858
+ .factory-bootstrap-330 .table-bordered {
1859
+ border: 1px solid #dddddd;
1860
+ }
1861
+
1862
+ .factory-bootstrap-330 .table-bordered > thead > tr > th,
1863
+ .factory-bootstrap-330 .table-bordered > tbody > tr > th,
1864
+ .factory-bootstrap-330 .table-bordered > tfoot > tr > th,
1865
+ .factory-bootstrap-330 .table-bordered > thead > tr > td,
1866
+ .factory-bootstrap-330 .table-bordered > tbody > tr > td,
1867
+ .factory-bootstrap-330 .table-bordered > tfoot > tr > td {
1868
+ border: 1px solid #dddddd;
1869
+ }
1870
+
1871
+ .factory-bootstrap-330 .table-bordered > thead > tr > th,
1872
+ .factory-bootstrap-330 .table-bordered > thead > tr > td {
1873
+ border-bottom-width: 2px;
1874
+ }
1875
+
1876
+ .factory-bootstrap-330 .table-striped > tbody > tr:nth-child(odd) > td,
1877
+ .factory-bootstrap-330 .table-striped > tbody > tr:nth-child(odd) > th {
1878
+ background-color: #f9f9f9;
1879
+ }
1880
+
1881
+ .factory-bootstrap-330 .table-hover > tbody > tr:hover > td,
1882
+ .factory-bootstrap-330 .table-hover > tbody > tr:hover > th {
1883
+ background-color: #f5f5f5;
1884
+ }
1885
+
1886
+ .factory-bootstrap-330 table col[class*="col-"] {
1887
+ position: static;
1888
+ display: table-column;
1889
+ float: none;
1890
+ }
1891
+
1892
+ .factory-bootstrap-330 table td[class*="col-"],
1893
+ .factory-bootstrap-330 table th[class*="col-"] {
1894
+ display: table-cell;
1895
+ float: none;
1896
+ }
1897
+
1898
+ .factory-bootstrap-330 .table > thead > tr > .active,
1899
+ .factory-bootstrap-330 .table > tbody > tr > .active,
1900
+ .factory-bootstrap-330 .table > tfoot > tr > .active,
1901
+ .factory-bootstrap-330 .table > thead > .active > td,
1902
+ .factory-bootstrap-330 .table > tbody > .active > td,
1903
+ .factory-bootstrap-330 .table > tfoot > .active > td,
1904
+ .factory-bootstrap-330 .table > thead > .active > th,
1905
+ .factory-bootstrap-330 .table > tbody > .active > th,
1906
+ .factory-bootstrap-330 .table > tfoot > .active > th {
1907
+ background-color: #f5f5f5;
1908
+ }
1909
+
1910
+ .factory-bootstrap-330 .table-hover > tbody > tr > .active:hover,
1911
+ .factory-bootstrap-330 .table-hover > tbody > .active:hover > td,
1912
+ .factory-bootstrap-330 .table-hover > tbody > .active:hover > th {
1913
+ background-color: #e8e8e8;
1914
+ }
1915
+
1916
+ .factory-bootstrap-330 .table > thead > tr > .success,
1917
+ .factory-bootstrap-330 .table > tbody > tr > .success,
1918
+ .factory-bootstrap-330 .table > tfoot > tr > .success,
1919
+ .factory-bootstrap-330 .table > thead > .success > td,
1920
+ .factory-bootstrap-330 .table > tbody > .success > td,
1921
+ .factory-bootstrap-330 .table > tfoot > .success > td,
1922
+ .factory-bootstrap-330 .table > thead > .success > th,
1923
+ .factory-bootstrap-330 .table > tbody > .success > th,
1924
+ .factory-bootstrap-330 .table > tfoot > .success > th {
1925
+ background-color: #dff0d8;
1926
+ }
1927
+
1928
+ .factory-bootstrap-330 .table-hover > tbody > tr > .success:hover,
1929
+ .factory-bootstrap-330 .table-hover > tbody > .success:hover > td,
1930
+ .factory-bootstrap-330 .table-hover > tbody > .success:hover > th {
1931
+ background-color: #d0e9c6;
1932
+ }
1933
+
1934
+ .factory-bootstrap-330 .table > thead > tr > .danger,
1935
+ .factory-bootstrap-330 .table > tbody > tr > .danger,
1936
+ .factory-bootstrap-330 .table > tfoot > tr > .danger,
1937
+ .factory-bootstrap-330 .table > thead > .danger > td,
1938
+ .factory-bootstrap-330 .table > tbody > .danger > td,
1939
+ .factory-bootstrap-330 .table > tfoot > .danger > td,
1940
+ .factory-bootstrap-330 .table > thead > .danger > th,
1941
+ .factory-bootstrap-330 .table > tbody > .danger > th,
1942
+ .factory-bootstrap-330 .table > tfoot > .danger > th {
1943
+ background-color: #f2dede;
1944
+ }
1945
+
1946
+ .factory-bootstrap-330 .table-hover > tbody > tr > .danger:hover,
1947
+ .factory-bootstrap-330 .table-hover > tbody > .danger:hover > td,
1948
+ .factory-bootstrap-330 .table-hover > tbody > .danger:hover > th {
1949
+ background-color: #ebcccc;
1950
+ }
1951
+
1952
+ .factory-bootstrap-330 .table > thead > tr > .warning,
1953
+ .factory-bootstrap-330 .table > tbody > tr > .warning,
1954
+ .factory-bootstrap-330 .table > tfoot > tr > .warning,
1955
+ .factory-bootstrap-330 .table > thead > .warning > td,
1956
+ .factory-bootstrap-330 .table > tbody > .warning > td,
1957
+ .factory-bootstrap-330 .table > tfoot > .warning > td,
1958
+ .factory-bootstrap-330 .table > thead > .warning > th,
1959
+ .factory-bootstrap-330 .table > tbody > .warning > th,
1960
+ .factory-bootstrap-330 .table > tfoot > .warning > th {
1961
+ background-color: #fcf8e3;
1962
+ }
1963
+
1964
+ .factory-bootstrap-330 .table-hover > tbody > tr > .warning:hover,
1965
+ .factory-bootstrap-330 .table-hover > tbody > .warning:hover > td,
1966
+ .factory-bootstrap-330 .table-hover > tbody > .warning:hover > th {
1967
+ background-color: #faf2cc;
1968
+ }
1969
+
1970
+ @media (max-width: 767px) {
1971
+ .table-responsive {
1972
+ width: 100%;
1973
+ margin-bottom: 15px;
1974
+ overflow-x: scroll;
1975
+ overflow-y: hidden;
1976
+ border: 1px solid #dddddd;
1977
+ -ms-overflow-style: -ms-autohiding-scrollbar;
1978
+ -webkit-overflow-scrolling: touch;
1979
+ }
1980
+
1981
+ .table-responsive > .table {
1982
+ margin-bottom: 0;
1983
+ }
1984
+
1985
+ .table-responsive > .table > thead > tr > th,
1986
+ .table-responsive > .table > tbody > tr > th,
1987
+ .table-responsive > .table > tfoot > tr > th,
1988
+ .table-responsive > .table > thead > tr > td,
1989
+ .table-responsive > .table > tbody > tr > td,
1990
+ .table-responsive > .table > tfoot > tr > td {
1991
+ white-space: nowrap;
1992
+ }
1993
+
1994
+ .table-responsive > .table-bordered {
1995
+ border: 0;
1996
+ }
1997
+
1998
+ .table-responsive > .table-bordered > thead > tr > th:first-child,
1999
+ .table-responsive > .table-bordered > tbody > tr > th:first-child,
2000
+ .table-responsive > .table-bordered > tfoot > tr > th:first-child,
2001
+ .table-responsive > .table-bordered > thead > tr > td:first-child,
2002
+ .table-responsive > .table-bordered > tbody > tr > td:first-child,
2003
+ .table-responsive > .table-bordered > tfoot > tr > td:first-child {
2004
+ border-left: 0;
2005
+ }
2006
+
2007
+ .table-responsive > .table-bordered > thead > tr > th:last-child,
2008
+ .table-responsive > .table-bordered > tbody > tr > th:last-child,
2009
+ .table-responsive > .table-bordered > tfoot > tr > th:last-child,
2010
+ .table-responsive > .table-bordered > thead > tr > td:last-child,
2011
+ .table-responsive > .table-bordered > tbody > tr > td:last-child,
2012
+ .table-responsive > .table-bordered > tfoot > tr > td:last-child {
2013
+ border-right: 0;
2014
+ }
2015
+
2016
+ .table-responsive > .table-bordered > tbody > tr:last-child > th,
2017
+ .table-responsive > .table-bordered > tfoot > tr:last-child > th,
2018
+ .table-responsive > .table-bordered > tbody > tr:last-child > td,
2019
+ .table-responsive > .table-bordered > tfoot > tr:last-child > td {
2020
+ border-bottom: 0;
2021
+ }
2022
+ }
2023
+
2024
+ .factory-bootstrap-330 fieldset {
2025
+ padding: 0;
2026
+ margin: 0;
2027
+ border: 0;
2028
+ }
2029
+
2030
+ .factory-bootstrap-330 legend {
2031
+ display: block;
2032
+ width: 100%;
2033
+ padding: 0;
2034
+ margin-bottom: 20px;
2035
+ font-size: 21px;
2036
+ line-height: inherit;
2037
+ color: #333333;
2038
+ border: 0;
2039
+ border-bottom: 1px solid #e5e5e5;
2040
+ -moz-box-sizing: content-box;
2041
+ box-sizing: content-box;
2042
+ }
2043
+
2044
+ .factory-bootstrap-330 label {
2045
+ display: inline-block;
2046
+ margin-bottom: 5px;
2047
+ font-weight: bold;
2048
+ }
2049
+
2050
+ .factory-bootstrap-330 input[type="search"] {
2051
+ -webkit-box-sizing: border-box;
2052
+ -moz-box-sizing: border-box;
2053
+ box-sizing: border-box;
2054
+ }
2055
+
2056
+ .factory-bootstrap-330 input[type="radio"],
2057
+ .factory-bootstrap-330 input[type="checkbox"] {
2058
+ margin: 4px 0 0;
2059
+ margin-top: 1px \9;
2060
+ /* IE8-9 */
2061
+
2062
+ line-height: normal;
2063
+ }
2064
+
2065
+ .factory-bootstrap-330 input[type="file"] {
2066
+ display: block;
2067
+ }
2068
+
2069
+ .factory-bootstrap-330 select[multiple],
2070
+ .factory-bootstrap-330 select[size] {
2071
+ height: auto;
2072
+ }
2073
+
2074
+ .factory-bootstrap-330 select optgroup {
2075
+ font-family: inherit;
2076
+ font-size: inherit;
2077
+ font-style: inherit;
2078
+ }
2079
+
2080
+ .factory-bootstrap-330 input[type="file"]:focus,
2081
+ .factory-bootstrap-330 input[type="radio"]:focus,
2082
+ .factory-bootstrap-330 input[type="checkbox"]:focus {
2083
+ outline: thin dotted;
2084
+ outline: 5px auto -webkit-focus-ring-color;
2085
+ outline-offset: -2px;
2086
+ }
2087
+
2088
+ .factory-bootstrap-330 input[type="number"]::-webkit-outer-spin-button,
2089
+ .factory-bootstrap-330 input[type="number"]::-webkit-inner-spin-button {
2090
+ height: auto;
2091
+ }
2092
+
2093
+ .factory-bootstrap-330 output {
2094
+ display: block;
2095
+ padding-top: 7px;
2096
+ font-size: 14px;
2097
+ line-height: 1.428571429;
2098
+ color: #555555;
2099
+ vertical-align: middle;
2100
+ }
2101
+
2102
+ .factory-bootstrap-330 .form-control {
2103
+ display: block;
2104
+ width: 100%;
2105
+ height: 34px;
2106
+ padding: 6px 12px;
2107
+ font-size: 14px;
2108
+ line-height: 1.428571429;
2109
+ color: #555555;
2110
+ vertical-align: middle;
2111
+ background-color: #ffffff;
2112
+ background-image: none;
2113
+ border: 1px solid #cccccc;
2114
+ border-radius: 3px;
2115
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2116
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2117
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
2118
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
2119
+ }
2120
+
2121
+ .factory-bootstrap-330 .form-control:focus {
2122
+ border-color: #66afe9;
2123
+ outline: 0;
2124
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2125
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2126
+ }
2127
+
2128
+ .factory-bootstrap-330 .form-control:-moz-placeholder {
2129
+ color: #999999;
2130
+ }
2131
+
2132
+ .factory-bootstrap-330 .form-control::-moz-placeholder {
2133
+ color: #999999;
2134
+ opacity: 1;
2135
+ }
2136
+
2137
+ .factory-bootstrap-330 .form-control:-ms-input-placeholder {
2138
+ color: #999999;
2139
+ }
2140
+
2141
+ .factory-bootstrap-330 .form-control::-webkit-input-placeholder {
2142
+ color: #999999;
2143
+ }
2144
+
2145
+ .factory-bootstrap-330 .form-control[disabled],
2146
+ .factory-bootstrap-330 .form-control[readonly],
2147
+ .factory-bootstrap-330 fieldset[disabled] .form-control {
2148
+ cursor: not-allowed;
2149
+ background-color: #eeeeee;
2150
+ }
2151
+
2152
+ .factory-bootstrap-330 textarea.form-control {
2153
+ height: auto;
2154
+ }
2155
+
2156
+ .factory-bootstrap-330 .form-group {
2157
+ margin-bottom: 15px;
2158
+ }
2159
+
2160
+ .factory-bootstrap-330 .radio,
2161
+ .factory-bootstrap-330 .checkbox {
2162
+ display: block;
2163
+ min-height: 20px;
2164
+ padding-left: 20px;
2165
+ margin-top: 10px;
2166
+ margin-bottom: 10px;
2167
+ vertical-align: middle;
2168
+ }
2169
+
2170
+ .factory-bootstrap-330 .radio label,
2171
+ .factory-bootstrap-330 .checkbox label {
2172
+ display: inline;
2173
+ margin-bottom: 0;
2174
+ font-weight: normal;
2175
+ cursor: pointer;
2176
+ }
2177
+
2178
+ .factory-bootstrap-330 .radio input[type="radio"],
2179
+ .factory-bootstrap-330 .radio-inline input[type="radio"],
2180
+ .factory-bootstrap-330 .checkbox input[type="checkbox"],
2181
+ .factory-bootstrap-330 .checkbox-inline input[type="checkbox"] {
2182
+ float: left;
2183
+ margin-left: -20px;
2184
+ }
2185
+
2186
+ .factory-bootstrap-330 .radio + .radio,
2187
+ .factory-bootstrap-330 .checkbox + .checkbox {
2188
+ margin-top: -5px;
2189
+ }
2190
+
2191
+ .factory-bootstrap-330 .radio-inline,
2192
+ .factory-bootstrap-330 .checkbox-inline {
2193
+ display: inline-block;
2194
+ padding-left: 20px;
2195
+ margin-bottom: 0;
2196
+ font-weight: normal;
2197
+ vertical-align: middle;
2198
+ cursor: pointer;
2199
+ }
2200
+
2201
+ .factory-bootstrap-330 .radio-inline + .radio-inline,
2202
+ .factory-bootstrap-330 .checkbox-inline + .checkbox-inline {
2203
+ margin-top: 0;
2204
+ margin-left: 10px;
2205
+ }
2206
+
2207
+ .factory-bootstrap-330 input[type="radio"][disabled],
2208
+ .factory-bootstrap-330 input[type="checkbox"][disabled],
2209
+ .factory-bootstrap-330 .radio[disabled],
2210
+ .factory-bootstrap-330 .radio-inline[disabled],
2211
+ .factory-bootstrap-330 .checkbox[disabled],
2212
+ .factory-bootstrap-330 .checkbox-inline[disabled],
2213
+ .factory-bootstrap-330 fieldset[disabled] input[type="radio"],
2214
+ .factory-bootstrap-330 fieldset[disabled] input[type="checkbox"],
2215
+ .factory-bootstrap-330 fieldset[disabled] .radio,
2216
+ .factory-bootstrap-330 fieldset[disabled] .radio-inline,
2217
+ .factory-bootstrap-330 fieldset[disabled] .checkbox,
2218
+ .factory-bootstrap-330 fieldset[disabled] .checkbox-inline {
2219
+ cursor: not-allowed;
2220
+ }
2221
+
2222
+ .factory-bootstrap-330 .input-sm {
2223
+ height: 30px;
2224
+ padding: 5px 10px;
2225
+ font-size: 12px;
2226
+ line-height: 1.5;
2227
+ border-radius: 3px;
2228
+ }
2229
+
2230
+ .factory-bootstrap-330 select.input-sm {
2231
+ height: 30px;
2232
+ line-height: 30px;
2233
+ }
2234
+
2235
+ .factory-bootstrap-330 textarea.input-sm {
2236
+ height: auto;
2237
+ }
2238
+
2239
+ .factory-bootstrap-330 .input-lg {
2240
+ height: 46px;
2241
+ padding: 10px 16px;
2242
+ font-size: 18px;
2243
+ line-height: 1.33;
2244
+ border-radius: 6px;
2245
+ }
2246
+
2247
+ .factory-bootstrap-330 select.input-lg {
2248
+ height: 46px;
2249
+ line-height: 46px;
2250
+ }
2251
+
2252
+ .factory-bootstrap-330 textarea.input-lg {
2253
+ height: auto;
2254
+ }
2255
+
2256
+ .factory-bootstrap-330 .has-warning .help-block,
2257
+ .factory-bootstrap-330 .has-warning .control-label,
2258
+ .factory-bootstrap-330 .has-warning .radio,
2259
+ .factory-bootstrap-330 .has-warning .checkbox,
2260
+ .factory-bootstrap-330 .has-warning .radio-inline,
2261
+ .factory-bootstrap-330 .has-warning .checkbox-inline {
2262
+ color: #8a6d3b;
2263
+ }
2264
+
2265
+ .factory-bootstrap-330 .has-warning .form-control {
2266
+ border-color: #8a6d3b;
2267
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2268
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2269
+ }
2270
+
2271
+ .factory-bootstrap-330 .has-warning .form-control:focus {
2272
+ border-color: #66512c;
2273
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
2274
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
2275
+ }
2276
+
2277
+ .factory-bootstrap-330 .has-warning .input-group-addon {
2278
+ color: #8a6d3b;
2279
+ background-color: #fcf8e3;
2280
+ border-color: #8a6d3b;
2281
+ }
2282
+
2283
+ .factory-bootstrap-330 .has-error .help-block,
2284
+ .factory-bootstrap-330 .has-error .control-label,
2285
+ .factory-bootstrap-330 .has-error .radio,
2286
+ .factory-bootstrap-330 .has-error .checkbox,
2287
+ .factory-bootstrap-330 .has-error .radio-inline,
2288
+ .factory-bootstrap-330 .has-error .checkbox-inline {
2289
+ color: #a94442;
2290
+ }
2291
+
2292
+ .factory-bootstrap-330 .controls {
2293
+ display: block;
2294
+ }
2295
+
2296
+ .factory-bootstrap-330 .has-error .form-control {
2297
+ border-color: #a94442;
2298
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2299
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2300
+ }
2301
+
2302
+ .factory-bootstrap-330 .has-error .form-control:focus {
2303
+ border-color: #843534;
2304
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
2305
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
2306
+ }
2307
+
2308
+ .factory-bootstrap-330 .has-error .input-group-addon {
2309
+ color: #a94442;
2310
+ background-color: #f2dede;
2311
+ border-color: #a94442;
2312
+ }
2313
+
2314
+ .factory-bootstrap-330 .has-success .help-block,
2315
+ .factory-bootstrap-330 .has-success .control-label,
2316
+ .factory-bootstrap-330 .has-success .radio,
2317
+ .factory-bootstrap-330 .has-success .checkbox,
2318
+ .factory-bootstrap-330 .has-success .radio-inline,
2319
+ .factory-bootstrap-330 .has-success .checkbox-inline {
2320
+ color: #3c763d;
2321
+ }
2322
+
2323
+ .factory-bootstrap-330 .has-success .form-control {
2324
+ border-color: #3c763d;
2325
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2326
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2327
+ }
2328
+
2329
+ .factory-bootstrap-330 .has-success .form-control:focus {
2330
+ border-color: #2b542c;
2331
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
2332
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
2333
+ }
2334
+
2335
+ .factory-bootstrap-330 .has-success .input-group-addon {
2336
+ color: #3c763d;
2337
+ background-color: #dff0d8;
2338
+ border-color: #3c763d;
2339
+ }
2340
+
2341
+ .factory-bootstrap-330 .form-control-static {
2342
+ margin-bottom: 0;
2343
+ }
2344
+
2345
+ .factory-bootstrap-330 .help-block {
2346
+ display: block;
2347
+ margin-top: 5px;
2348
+ margin-bottom: 10px;
2349
+ color: #737373;
2350
+ font-weight: normal;
2351
+ }
2352
+
2353
+ @media (min-width: 768px) {
2354
+ .form-inline .form-group {
2355
+ display: inline-block;
2356
+ margin-bottom: 0;
2357
+ vertical-align: middle;
2358
+ }
2359
+
2360
+ .form-inline .form-control {
2361
+ display: inline-block;
2362
+ }
2363
+
2364
+ .form-inline select.form-control {
2365
+ width: auto;
2366
+ }
2367
+
2368
+ .form-inline .radio,
2369
+ .form-inline .checkbox {
2370
+ display: inline-block;
2371
+ padding-left: 0;
2372
+ margin-top: 0;
2373
+ margin-bottom: 0;
2374
+ }
2375
+
2376
+ .form-inline .radio input[type="radio"],
2377
+ .form-inline .checkbox input[type="checkbox"] {
2378
+ float: none;
2379
+ margin-left: 0;
2380
+ }
2381
+ }
2382
+
2383
+ .factory-bootstrap-330 .form-horizontal .control-label,
2384
+ .factory-bootstrap-330 .form-horizontal .radio,
2385
+ .factory-bootstrap-330 .form-horizontal .checkbox,
2386
+ .factory-bootstrap-330 .form-horizontal .radio-inline,
2387
+ .factory-bootstrap-330 .form-horizontal .checkbox-inline {
2388
+ position: relative;
2389
+ padding-top: 7px;
2390
+ margin-top: 0;
2391
+ margin-bottom: 0;
2392
+ }
2393
+
2394
+ .factory-bootstrap-330 .form-horizontal .control-label {
2395
+ max-width: 200px;
2396
+ }
2397
+
2398
+ .factory-bootstrap-330 .form-horizontal .radio,
2399
+ .factory-bootstrap-330 .form-horizontal .checkbox {
2400
+ min-height: 27px;
2401
+ }
2402
+
2403
+ .factory-bootstrap-330 .form-horizontal .form-group {
2404
+ margin-right: -15px;
2405
+ margin-left: -15px;
2406
+ }
2407
+
2408
+ .factory-bootstrap-330 .form-horizontal .form-group:before,
2409
+ .factory-bootstrap-330 .form-horizontal .form-group:after {
2410
+ display: table;
2411
+ content: " ";
2412
+ }
2413
+
2414
+ .factory-bootstrap-330 .form-horizontal .form-group:after {
2415
+ clear: both;
2416
+ }
2417
+
2418
+ .factory-bootstrap-330 .form-horizontal .form-group:before,
2419
+ .factory-bootstrap-330 .form-horizontal .form-group:after {
2420
+ display: table;
2421
+ content: " ";
2422
+ }
2423
+
2424
+ .factory-bootstrap-330 .form-horizontal .form-group:after {
2425
+ clear: both;
2426
+ }
2427
+
2428
+ .factory-bootstrap-330 .form-horizontal .form-control-static {
2429
+ padding-top: 7px;
2430
+ }
2431
+
2432
+ @media (min-width: 768px) {
2433
+ .form-horizontal .control-label {
2434
+ text-align: right;
2435
+ }
2436
+ }
2437
+
2438
+ .factory-bootstrap-330 .btn {
2439
+ display: inline-block;
2440
+ padding: 5px 12px 5px 12px;
2441
+ margin-bottom: 0;
2442
+ font-size: 13px;
2443
+ font-weight: normal;
2444
+ line-height: 1.428571429;
2445
+ text-align: center;
2446
+ white-space: nowrap;
2447
+ vertical-align: middle;
2448
+ cursor: pointer;
2449
+ background-image: none;
2450
+ border: 1px solid transparent;
2451
+ border-radius: 3px;
2452
+ -webkit-user-select: none;
2453
+ -moz-user-select: none;
2454
+ -ms-user-select: none;
2455
+ -o-user-select: none;
2456
+ user-select: none;
2457
+ }
2458
+
2459
+ .factory-bootstrap-330 .btn:focus {
2460
+ outline: thin dotted;
2461
+ outline: 5px auto -webkit-focus-ring-color;
2462
+ outline-offset: -2px;
2463
+ }
2464
+
2465
+ .factory-bootstrap-330 .btn {
2466
+ text-decoration: none;
2467
+ }
2468
+
2469
+ .factory-bootstrap-330 .btn:hover,
2470
+ .factory-bootstrap-330 .btn:focus {
2471
+ color: #333333;
2472
+ text-decoration: none;
2473
+ }
2474
+
2475
+ .factory-bootstrap-330 .btn.disabled,
2476
+ .factory-bootstrap-330 .btn[disabled],
2477
+ .factory-bootstrap-330 fieldset[disabled] .btn {
2478
+ pointer-events: none;
2479
+ cursor: not-allowed;
2480
+ opacity: 0.65;
2481
+ filter: alpha(opacity=65);
2482
+ -webkit-box-shadow: none;
2483
+ box-shadow: none;
2484
+ }
2485
+
2486
+ .factory-bootstrap-330 .btn-default {
2487
+ color: #333333;
2488
+ background-color: #ffffff;
2489
+ border-color: #cccccc;
2490
+ }
2491
+
2492
+ .factory-bootstrap-330 .btn-default:hover,
2493
+ .factory-bootstrap-330 .btn-default:focus,
2494
+ .factory-bootstrap-330 .btn-default:active,
2495
+ .factory-bootstrap-330 .btn-default.active,
2496
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-default {
2497
+ background: #fafafa;
2498
+ border-color: #999;
2499
+ color: #222;
2500
+ }
2501
+
2502
+ .factory-bootstrap-330 .btn-default:active,
2503
+ .factory-bootstrap-330 .btn-default.active,
2504
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-default {
2505
+ background-image: none;
2506
+ }
2507
+
2508
+ .factory-bootstrap-330 .btn-default.disabled,
2509
+ .factory-bootstrap-330 .btn-default[disabled],
2510
+ .factory-bootstrap-330 fieldset[disabled] .btn-default,
2511
+ .factory-bootstrap-330 .btn-default.disabled:hover,
2512
+ .factory-bootstrap-330 .btn-default[disabled]:hover,
2513
+ .factory-bootstrap-330 fieldset[disabled] .btn-default:hover,
2514
+ .factory-bootstrap-330 .btn-default.disabled:focus,
2515
+ .factory-bootstrap-330 .btn-default[disabled]:focus,
2516
+ .factory-bootstrap-330 fieldset[disabled] .btn-default:focus,
2517
+ .factory-bootstrap-330 .btn-default.disabled:active,
2518
+ .factory-bootstrap-330 .btn-default[disabled]:active,
2519
+ .factory-bootstrap-330 fieldset[disabled] .btn-default:active,
2520
+ .factory-bootstrap-330 .btn-default.disabled.active,
2521
+ .factory-bootstrap-330 .btn-default[disabled].active,
2522
+ .factory-bootstrap-330 fieldset[disabled] .btn-default.active {
2523
+ background-color: #ffffff;
2524
+ border-color: #cccccc;
2525
+ }
2526
+
2527
+ .factory-bootstrap-330 .btn-default .badge {
2528
+ color: #ffffff;
2529
+ background-color: #fff;
2530
+ }
2531
+
2532
+ .factory-bootstrap-330 .btn-primary {
2533
+ color: #ffffff;
2534
+ background-color: #428bca;
2535
+ border-color: #357ebd;
2536
+ }
2537
+
2538
+ .factory-bootstrap-330 .btn-primary:hover,
2539
+ .factory-bootstrap-330 .btn-primary:focus,
2540
+ .factory-bootstrap-330 .btn-primary:active,
2541
+ .factory-bootstrap-330 .btn-primary.active,
2542
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-primary {
2543
+ color: #ffffff;
2544
+ background-color: #3276b1;
2545
+ border-color: #285e8e;
2546
+ }
2547
+
2548
+ .factory-bootstrap-330 .btn-primary:active,
2549
+ .factory-bootstrap-330 .btn-primary.active,
2550
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-primary {
2551
+ background-image: none;
2552
+ }
2553
+
2554
+ .factory-bootstrap-330 .btn-primary.disabled,
2555
+ .factory-bootstrap-330 .btn-primary[disabled],
2556
+ .factory-bootstrap-330 fieldset[disabled] .btn-primary,
2557
+ .factory-bootstrap-330 .btn-primary.disabled:hover,
2558
+ .factory-bootstrap-330 .btn-primary[disabled]:hover,
2559
+ .factory-bootstrap-330 fieldset[disabled] .btn-primary:hover,
2560
+ .factory-bootstrap-330 .btn-primary.disabled:focus,
2561
+ .factory-bootstrap-330 .btn-primary[disabled]:focus,
2562
+ .factory-bootstrap-330 fieldset[disabled] .btn-primary:focus,
2563
+ .factory-bootstrap-330 .btn-primary.disabled:active,
2564
+ .factory-bootstrap-330 .btn-primary[disabled]:active,
2565
+ .factory-bootstrap-330 fieldset[disabled] .btn-primary:active,
2566
+ .factory-bootstrap-330 .btn-primary.disabled.active,
2567
+ .factory-bootstrap-330 .btn-primary[disabled].active,
2568
+ .factory-bootstrap-330 fieldset[disabled] .btn-primary.active {
2569
+ background-color: #428bca;
2570
+ border-color: #357ebd;
2571
+ }
2572
+
2573
+ .factory-bootstrap-330 .btn-primary .badge {
2574
+ color: #428bca;
2575
+ background-color: #fff;
2576
+ }
2577
+
2578
+ .factory-bootstrap-330 .btn-warning {
2579
+ color: #ffffff;
2580
+ background-color: #f0ad4e;
2581
+ border-color: #eea236;
2582
+ }
2583
+
2584
+ .factory-bootstrap-330 .btn-warning:hover,
2585
+ .factory-bootstrap-330 .btn-warning:focus,
2586
+ .factory-bootstrap-330 .btn-warning:active,
2587
+ .factory-bootstrap-330 .btn-warning.active,
2588
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-warning {
2589
+ color: #ffffff;
2590
+ background-color: #ed9c28;
2591
+ border-color: #d58512;
2592
+ }
2593
+
2594
+ .factory-bootstrap-330 .btn-warning:active,
2595
+ .factory-bootstrap-330 .btn-warning.active,
2596
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-warning {
2597
+ background-image: none;
2598
+ }
2599
+
2600
+ .factory-bootstrap-330 .btn-warning.disabled,
2601
+ .factory-bootstrap-330 .btn-warning[disabled],
2602
+ .factory-bootstrap-330 fieldset[disabled] .btn-warning,
2603
+ .factory-bootstrap-330 .btn-warning.disabled:hover,
2604
+ .factory-bootstrap-330 .btn-warning[disabled]:hover,
2605
+ .factory-bootstrap-330 fieldset[disabled] .btn-warning:hover,
2606
+ .factory-bootstrap-330 .btn-warning.disabled:focus,
2607
+ .factory-bootstrap-330 .btn-warning[disabled]:focus,
2608
+ .factory-bootstrap-330 fieldset[disabled] .btn-warning:focus,
2609
+ .factory-bootstrap-330 .btn-warning.disabled:active,
2610
+ .factory-bootstrap-330 .btn-warning[disabled]:active,
2611
+ .factory-bootstrap-330 fieldset[disabled] .btn-warning:active,
2612
+ .factory-bootstrap-330 .btn-warning.disabled.active,
2613
+ .factory-bootstrap-330 .btn-warning[disabled].active,
2614
+ .factory-bootstrap-330 fieldset[disabled] .btn-warning.active {
2615
+ background-color: #f0ad4e;
2616
+ border-color: #eea236;
2617
+ }
2618
+
2619
+ .factory-bootstrap-330 .btn-warning .badge {
2620
+ color: #f0ad4e;
2621
+ background-color: #fff;
2622
+ }
2623
+
2624
+ .factory-bootstrap-330 .btn-success {
2625
+ color: #ffffff;
2626
+ background-color: #5cb85c;
2627
+ border-color: #4cae4c;
2628
+ }
2629
+
2630
+ .factory-bootstrap-330 .btn-success:hover,
2631
+ .factory-bootstrap-330 .btn-success:focus,
2632
+ .factory-bootstrap-330 .btn-success:active,
2633
+ .factory-bootstrap-330 .btn-success.active,
2634
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-success {
2635
+ color: #ffffff;
2636
+ background-color: #47a447;
2637
+ border-color: #398439;
2638
+ }
2639
+
2640
+ .factory-bootstrap-330 .btn-success:active,
2641
+ .factory-bootstrap-330 .btn-success.active,
2642
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-success {
2643
+ background-image: none;
2644
+ }
2645
+
2646
+ .factory-bootstrap-330 .btn-success.disabled,
2647
+ .factory-bootstrap-330 .btn-success[disabled],
2648
+ .factory-bootstrap-330 fieldset[disabled] .btn-success,
2649
+ .factory-bootstrap-330 .btn-success.disabled:hover,
2650
+ .factory-bootstrap-330 .btn-success[disabled]:hover,
2651
+ .factory-bootstrap-330 fieldset[disabled] .btn-success:hover,
2652
+ .factory-bootstrap-330 .btn-success.disabled:focus,
2653
+ .factory-bootstrap-330 .btn-success[disabled]:focus,
2654
+ .factory-bootstrap-330 fieldset[disabled] .btn-success:focus,
2655
+ .factory-bootstrap-330 .btn-success.disabled:active,
2656
+ .factory-bootstrap-330 .btn-success[disabled]:active,
2657
+ .factory-bootstrap-330 fieldset[disabled] .btn-success:active,
2658
+ .factory-bootstrap-330 .btn-success.disabled.active,
2659
+ .factory-bootstrap-330 .btn-success[disabled].active,
2660
+ .factory-bootstrap-330 fieldset[disabled] .btn-success.active {
2661
+ background-color: #5cb85c;
2662
+ border-color: #4cae4c;
2663
+ }
2664
+
2665
+ .factory-bootstrap-330 .btn-success .badge {
2666
+ color: #5cb85c;
2667
+ background-color: #fff;
2668
+ }
2669
+
2670
+ .factory-bootstrap-330 .btn-info {
2671
+ color: #ffffff;
2672
+ background-color: #5bc0de;
2673
+ border-color: #46b8da;
2674
+ }
2675
+
2676
+ .factory-bootstrap-330 .btn-info:hover,
2677
+ .factory-bootstrap-330 .btn-info:focus,
2678
+ .factory-bootstrap-330 .btn-info:active,
2679
+ .factory-bootstrap-330 .btn-info.active,
2680
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-info {
2681
+ color: #ffffff;
2682
+ background-color: #39b3d7;
2683
+ border-color: #269abc;
2684
+ }
2685
+
2686
+ .factory-bootstrap-330 .btn-info:active,
2687
+ .factory-bootstrap-330 .btn-info.active,
2688
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-info {
2689
+ background-image: none;
2690
+ }
2691
+
2692
+ .factory-bootstrap-330 .btn-info.disabled,
2693
+ .factory-bootstrap-330 .btn-info[disabled],
2694
+ .factory-bootstrap-330 fieldset[disabled] .btn-info,
2695
+ .factory-bootstrap-330 .btn-info.disabled:hover,
2696
+ .factory-bootstrap-330 .btn-info[disabled]:hover,
2697
+ .factory-bootstrap-330 fieldset[disabled] .btn-info:hover,
2698
+ .factory-bootstrap-330 .btn-info.disabled:focus,
2699
+ .factory-bootstrap-330 .btn-info[disabled]:focus,
2700
+ .factory-bootstrap-330 fieldset[disabled] .btn-info:focus,
2701
+ .factory-bootstrap-330 .btn-info.disabled:active,
2702
+ .factory-bootstrap-330 .btn-info[disabled]:active,
2703
+ .factory-bootstrap-330 fieldset[disabled] .btn-info:active,
2704
+ .factory-bootstrap-330 .btn-info.disabled.active,
2705
+ .factory-bootstrap-330 .btn-info[disabled].active,
2706
+ .factory-bootstrap-330 fieldset[disabled] .btn-info.active {
2707
+ background-color: #5bc0de;
2708
+ border-color: #46b8da;
2709
+ }
2710
+
2711
+ .factory-bootstrap-330 .btn-info .badge {
2712
+ color: #5bc0de;
2713
+ background-color: #fff;
2714
+ }
2715
+
2716
+ .factory-bootstrap-330 .btn-link {
2717
+ font-weight: normal;
2718
+ color: #428bca;
2719
+ cursor: pointer;
2720
+ border-radius: 0;
2721
+ }
2722
+
2723
+ .factory-bootstrap-330 .btn-link,
2724
+ .factory-bootstrap-330 .btn-link:active,
2725
+ .factory-bootstrap-330 .btn-link[disabled],
2726
+ .factory-bootstrap-330 fieldset[disabled] .btn-link {
2727
+ background-color: transparent;
2728
+ -webkit-box-shadow: none;
2729
+ box-shadow: none;
2730
+ }
2731
+
2732
+ .factory-bootstrap-330 .btn-link,
2733
+ .factory-bootstrap-330 .btn-link:hover,
2734
+ .factory-bootstrap-330 .btn-link:focus,
2735
+ .factory-bootstrap-330 .btn-link:active {
2736
+ border-color: transparent;
2737
+ }
2738
+
2739
+ .factory-bootstrap-330 .btn-link:hover,
2740
+ .factory-bootstrap-330 .btn-link:focus {
2741
+ color: #2a6496;
2742
+ text-decoration: underline;
2743
+ background-color: transparent;
2744
+ }
2745
+
2746
+ .factory-bootstrap-330 .btn-link[disabled]:hover,
2747
+ .factory-bootstrap-330 fieldset[disabled] .btn-link:hover,
2748
+ .factory-bootstrap-330 .btn-link[disabled]:focus,
2749
+ .factory-bootstrap-330 fieldset[disabled] .btn-link:focus {
2750
+ color: #999999;
2751
+ text-decoration: none;
2752
+ }
2753
+
2754
+ .factory-bootstrap-330 .btn-lg {
2755
+ padding: 10px 16px;
2756
+ font-size: 18px;
2757
+ line-height: 1.33;
2758
+ border-radius: 6px;
2759
+ }
2760
+
2761
+ .factory-bootstrap-330 .btn-sm {
2762
+ padding: 5px 10px;
2763
+ font-size: 12px;
2764
+ line-height: 1.5;
2765
+ border-radius: 3px;
2766
+ }
2767
+
2768
+ .factory-bootstrap-330 .btn-xs {
2769
+ padding: 1px 5px;
2770
+ font-size: 12px;
2771
+ line-height: 1.5;
2772
+ border-radius: 3px;
2773
+ }
2774
+
2775
+ .factory-bootstrap-330 .btn-block {
2776
+ display: block;
2777
+ width: 100%;
2778
+ padding-right: 0;
2779
+ padding-left: 0;
2780
+ }
2781
+
2782
+ .factory-bootstrap-330 .btn-block + .btn-block {
2783
+ margin-top: 5px;
2784
+ }
2785
+
2786
+ .factory-bootstrap-330 input[type="submit"].btn-block,
2787
+ .factory-bootstrap-330 input[type="reset"].btn-block,
2788
+ .factory-bootstrap-330 input[type="button"].btn-block {
2789
+ width: 100%;
2790
+ }
2791
+
2792
+ .factory-bootstrap-330 .fade {
2793
+ opacity: 0;
2794
+ -webkit-transition: opacity 0.15s linear;
2795
+ transition: opacity 0.15s linear;
2796
+ }
2797
+
2798
+ .factory-bootstrap-330 .fade.in {
2799
+ opacity: 1;
2800
+ }
2801
+
2802
+ .factory-bootstrap-330 .collapse {
2803
+ display: none;
2804
+ }
2805
+
2806
+ .factory-bootstrap-330 .collapse.in {
2807
+ display: block;
2808
+ }
2809
+
2810
+ .factory-bootstrap-330 .collapsing {
2811
+ position: relative;
2812
+ height: 0;
2813
+ overflow: hidden;
2814
+ -webkit-transition: height 0.35s ease;
2815
+ transition: height 0.35s ease;
2816
+ }
2817
+
2818
+ @font-face {
2819
+ font-family: 'Glyphicons Halflings';
2820
+ src: url('../fonts/glyphicons-halflings-regular.eot');
2821
+ src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
2822
+ }
2823
+
2824
+ .factory-bootstrap-330 .glyphicon {
2825
+ position: relative;
2826
+ top: 1px;
2827
+ display: inline-block;
2828
+ font-family: 'Glyphicons Halflings';
2829
+ -webkit-font-smoothing: antialiased;
2830
+ font-style: normal;
2831
+ font-weight: normal;
2832
+ line-height: 1;
2833
+ -moz-osx-font-smoothing: grayscale;
2834
+ }
2835
+
2836
+ .factory-bootstrap-330 .glyphicon:empty {
2837
+ width: 1em;
2838
+ }
2839
+
2840
+ .factory-bootstrap-330 .glyphicon-asterisk:before {
2841
+ content: "\2a";
2842
+ }
2843
+
2844
+ .factory-bootstrap-330 .glyphicon-plus:before {
2845
+ content: "\2b";
2846
+ }
2847
+
2848
+ .factory-bootstrap-330 .glyphicon-euro:before {
2849
+ content: "\20ac";
2850
+ }
2851
+
2852
+ .factory-bootstrap-330 .glyphicon-minus:before {
2853
+ content: "\2212";
2854
+ }
2855
+
2856
+ .factory-bootstrap-330 .glyphicon-cloud:before {
2857
+ content: "\2601";
2858
+ }
2859
+
2860
+ .factory-bootstrap-330 .glyphicon-envelope:before {
2861
+ content: "\2709";
2862
+ }
2863
+
2864
+ .factory-bootstrap-330 .glyphicon-pencil:before {
2865
+ content: "\270f";
2866
+ }
2867
+
2868
+ .factory-bootstrap-330 .glyphicon-glass:before {
2869
+ content: "\e001";
2870
+ }
2871
+
2872
+ .factory-bootstrap-330 .glyphicon-music:before {
2873
+ content: "\e002";
2874
+ }
2875
+
2876
+ .factory-bootstrap-330 .glyphicon-search:before {
2877
+ content: "\e003";
2878
+ }
2879
+
2880
+ .factory-bootstrap-330 .glyphicon-heart:before {
2881
+ content: "\e005";
2882
+ }
2883
+
2884
+ .factory-bootstrap-330 .glyphicon-star:before {
2885
+ content: "\e006";
2886
+ }
2887
+
2888
+ .factory-bootstrap-330 .glyphicon-star-empty:before {
2889
+ content: "\e007";
2890
+ }
2891
+
2892
+ .factory-bootstrap-330 .glyphicon-user:before {
2893
+ content: "\e008";
2894
+ }
2895
+
2896
+ .factory-bootstrap-330 .glyphicon-film:before {
2897
+ content: "\e009";
2898
+ }
2899
+
2900
+ .factory-bootstrap-330 .glyphicon-th-large:before {
2901
+ content: "\e010";
2902
+ }
2903
+
2904
+ .factory-bootstrap-330 .glyphicon-th:before {
2905
+ content: "\e011";
2906
+ }
2907
+
2908
+ .factory-bootstrap-330 .glyphicon-th-list:before {
2909
+ content: "\e012";
2910
+ }
2911
+
2912
+ .factory-bootstrap-330 .glyphicon-ok:before {
2913
+ content: "\e013";
2914
+ }
2915
+
2916
+ .factory-bootstrap-330 .glyphicon-remove:before {
2917
+ content: "\e014";
2918
+ }
2919
+
2920
+ .factory-bootstrap-330 .glyphicon-zoom-in:before {
2921
+ content: "\e015";
2922
+ }
2923
+
2924
+ .factory-bootstrap-330 .glyphicon-zoom-out:before {
2925
+ content: "\e016";
2926
+ }
2927
+
2928
+ .factory-bootstrap-330 .glyphicon-off:before {
2929
+ content: "\e017";
2930
+ }
2931
+
2932
+ .factory-bootstrap-330 .glyphicon-signal:before {
2933
+ content: "\e018";
2934
+ }
2935
+
2936
+ .factory-bootstrap-330 .glyphicon-cog:before {
2937
+ content: "\e019";
2938
+ }
2939
+
2940
+ .factory-bootstrap-330 .glyphicon-trash:before {
2941
+ content: "\e020";
2942
+ }
2943
+
2944
+ .factory-bootstrap-330 .glyphicon-home:before {
2945
+ content: "\e021";
2946
+ }
2947
+
2948
+ .factory-bootstrap-330 .glyphicon-file:before {
2949
+ content: "\e022";
2950
+ }
2951
+
2952
+ .factory-bootstrap-330 .glyphicon-time:before {
2953
+ content: "\e023";
2954
+ }
2955
+
2956
+ .factory-bootstrap-330 .glyphicon-road:before {
2957
+ content: "\e024";
2958
+ }
2959
+
2960
+ .factory-bootstrap-330 .glyphicon-download-alt:before {
2961
+ content: "\e025";
2962
+ }
2963
+
2964
+ .factory-bootstrap-330 .glyphicon-download:before {
2965
+ content: "\e026";
2966
+ }
2967
+
2968
+ .factory-bootstrap-330 .glyphicon-upload:before {
2969
+ content: "\e027";
2970
+ }
2971
+
2972
+ .factory-bootstrap-330 .glyphicon-inbox:before {
2973
+ content: "\e028";
2974
+ }
2975
+
2976
+ .factory-bootstrap-330 .glyphicon-play-circle:before {
2977
+ content: "\e029";
2978
+ }
2979
+
2980
+ .factory-bootstrap-330 .glyphicon-repeat:before {
2981
+ content: "\e030";
2982
+ }
2983
+
2984
+ .factory-bootstrap-330 .glyphicon-refresh:before {
2985
+ content: "\e031";
2986
+ }
2987
+
2988
+ .factory-bootstrap-330 .glyphicon-list-alt:before {
2989
+ content: "\e032";
2990
+ }
2991
+
2992
+ .factory-bootstrap-330 .glyphicon-lock:before {
2993
+ content: "\e033";
2994
+ }
2995
+
2996
+ .factory-bootstrap-330 .glyphicon-flag:before {
2997
+ content: "\e034";
2998
+ }
2999
+
3000
+ .factory-bootstrap-330 .glyphicon-headphones:before {
3001
+ content: "\e035";
3002
+ }
3003
+
3004
+ .factory-bootstrap-330 .glyphicon-volume-off:before {
3005
+ content: "\e036";
3006
+ }
3007
+
3008
+ .factory-bootstrap-330 .glyphicon-volume-down:before {
3009
+ content: "\e037";
3010
+ }
3011
+
3012
+ .factory-bootstrap-330 .glyphicon-volume-up:before {
3013
+ content: "\e038";
3014
+ }
3015
+
3016
+ .factory-bootstrap-330 .glyphicon-qrcode:before {
3017
+ content: "\e039";
3018
+ }
3019
+
3020
+ .factory-bootstrap-330 .glyphicon-barcode:before {
3021
+ content: "\e040";
3022
+ }
3023
+
3024
+ .factory-bootstrap-330 .glyphicon-tag:before {
3025
+ content: "\e041";
3026
+ }
3027
+
3028
+ .factory-bootstrap-330 .glyphicon-tags:before {
3029
+ content: "\e042";
3030
+ }
3031
+
3032
+ .factory-bootstrap-330 .glyphicon-book:before {
3033
+ content: "\e043";
3034
+ }
3035
+
3036
+ .factory-bootstrap-330 .glyphicon-bookmark:before {
3037
+ content: "\e044";
3038
+ }
3039
+
3040
+ .factory-bootstrap-330 .glyphicon-print:before {
3041
+ content: "\e045";
3042
+ }
3043
+
3044
+ .factory-bootstrap-330 .glyphicon-camera:before {
3045
+ content: "\e046";
3046
+ }
3047
+
3048
+ .factory-bootstrap-330 .glyphicon-font:before {
3049
+ content: "\e047";
3050
+ }
3051
+
3052
+ .factory-bootstrap-330 .glyphicon-bold:before {
3053
+ content: "\e048";
3054
+ }
3055
+
3056
+ .factory-bootstrap-330 .glyphicon-italic:before {
3057
+ content: "\e049";
3058
+ }
3059
+
3060
+ .factory-bootstrap-330 .glyphicon-text-height:before {
3061
+ content: "\e050";
3062
+ }
3063
+
3064
+ .factory-bootstrap-330 .glyphicon-text-width:before {
3065
+ content: "\e051";
3066
+ }
3067
+
3068
+ .factory-bootstrap-330 .glyphicon-align-left:before {
3069
+ content: "\e052";
3070
+ }
3071
+
3072
+ .factory-bootstrap-330 .glyphicon-align-center:before {
3073
+ content: "\e053";
3074
+ }
3075
+
3076
+ .factory-bootstrap-330 .glyphicon-align-right:before {
3077
+ content: "\e054";
3078
+ }
3079
+
3080
+ .factory-bootstrap-330 .glyphicon-align-justify:before {
3081
+ content: "\e055";
3082
+ }
3083
+
3084
+ .factory-bootstrap-330 .glyphicon-list:before {
3085
+ content: "\e056";
3086
+ }
3087
+
3088
+ .factory-bootstrap-330 .glyphicon-indent-left:before {
3089
+ content: "\e057";
3090
+ }
3091
+
3092
+ .factory-bootstrap-330 .glyphicon-indent-right:before {
3093
+ content: "\e058";
3094
+ }
3095
+
3096
+ .factory-bootstrap-330 .glyphicon-facetime-video:before {
3097
+ content: "\e059";
3098
+ }
3099
+
3100
+ .factory-bootstrap-330 .glyphicon-picture:before {
3101
+ content: "\e060";
3102
+ }
3103
+
3104
+ .factory-bootstrap-330 .glyphicon-map-marker:before {
3105
+ content: "\e062";
3106
+ }
3107
+
3108
+ .factory-bootstrap-330 .glyphicon-adjust:before {
3109
+ content: "\e063";
3110
+ }
3111
+
3112
+ .factory-bootstrap-330 .glyphicon-tint:before {
3113
+ content: "\e064";
3114
+ }
3115
+
3116
+ .factory-bootstrap-330 .glyphicon-edit:before {
3117
+ content: "\e065";
3118
+ }
3119
+
3120
+ .factory-bootstrap-330 .glyphicon-share:before {
3121
+ content: "\e066";
3122
+ }
3123
+
3124
+ .factory-bootstrap-330 .glyphicon-check:before {
3125
+ content: "\e067";
3126
+ }
3127
+
3128
+ .factory-bootstrap-330 .glyphicon-move:before {
3129
+ content: "\e068";
3130
+ }
3131
+
3132
+ .factory-bootstrap-330 .glyphicon-step-backward:before {
3133
+ content: "\e069";
3134
+ }
3135
+
3136
+ .factory-bootstrap-330 .glyphicon-fast-backward:before {
3137
+ content: "\e070";
3138
+ }
3139
+
3140
+ .factory-bootstrap-330 .glyphicon-backward:before {
3141
+ content: "\e071";
3142
+ }
3143
+
3144
+ .factory-bootstrap-330 .glyphicon-play:before {
3145
+ content: "\e072";
3146
+ }
3147
+
3148
+ .factory-bootstrap-330 .glyphicon-pause:before {
3149
+ content: "\e073";
3150
+ }
3151
+
3152
+ .factory-bootstrap-330 .glyphicon-stop:before {
3153
+ content: "\e074";
3154
+ }
3155
+
3156
+ .factory-bootstrap-330 .glyphicon-forward:before {
3157
+ content: "\e075";
3158
+ }
3159
+
3160
+ .factory-bootstrap-330 .glyphicon-fast-forward:before {
3161
+ content: "\e076";
3162
+ }
3163
+
3164
+ .factory-bootstrap-330 .glyphicon-step-forward:before {
3165
+ content: "\e077";
3166
+ }
3167
+
3168
+ .factory-bootstrap-330 .glyphicon-eject:before {
3169
+ content: "\e078";
3170
+ }
3171
+
3172
+ .factory-bootstrap-330 .glyphicon-chevron-left:before {
3173
+ content: "\e079";
3174
+ }
3175
+
3176
+ .factory-bootstrap-330 .glyphicon-chevron-right:before {
3177
+ content: "\e080";
3178
+ }
3179
+
3180
+ .factory-bootstrap-330 .glyphicon-plus-sign:before {
3181
+ content: "\e081";
3182
+ }
3183
+
3184
+ .factory-bootstrap-330 .glyphicon-minus-sign:before {
3185
+ content: "\e082";
3186
+ }
3187
+
3188
+ .factory-bootstrap-330 .glyphicon-remove-sign:before {
3189
+ content: "\e083";
3190
+ }
3191
+
3192
+ .factory-bootstrap-330 .glyphicon-ok-sign:before {
3193
+ content: "\e084";
3194
+ }
3195
+
3196
+ .factory-bootstrap-330 .glyphicon-question-sign:before {
3197
+ content: "\e085";
3198
+ }
3199
+
3200
+ .factory-bootstrap-330 .glyphicon-info-sign:before {
3201
+ content: "\e086";
3202
+ }
3203
+
3204
+ .factory-bootstrap-330 .glyphicon-screenshot:before {
3205
+ content: "\e087";
3206
+ }
3207
+
3208
+ .factory-bootstrap-330 .glyphicon-remove-circle:before {
3209
+ content: "\e088";
3210
+ }
3211
+
3212
+ .factory-bootstrap-330 .glyphicon-ok-circle:before {
3213
+ content: "\e089";
3214
+ }
3215
+
3216
+ .factory-bootstrap-330 .glyphicon-ban-circle:before {
3217
+ content: "\e090";
3218
+ }
3219
+
3220
+ .factory-bootstrap-330 .glyphicon-arrow-left:before {
3221
+ content: "\e091";
3222
+ }
3223
+
3224
+ .factory-bootstrap-330 .glyphicon-arrow-right:before {
3225
+ content: "\e092";
3226
+ }
3227
+
3228
+ .factory-bootstrap-330 .glyphicon-arrow-up:before {
3229
+ content: "\e093";
3230
+ }
3231
+
3232
+ .factory-bootstrap-330 .glyphicon-arrow-down:before {
3233
+ content: "\e094";
3234
+ }
3235
+
3236
+ .factory-bootstrap-330 .glyphicon-share-alt:before {
3237
+ content: "\e095";
3238
+ }
3239
+
3240
+ .factory-bootstrap-330 .glyphicon-resize-full:before {
3241
+ content: "\e096";
3242
+ }
3243
+
3244
+ .factory-bootstrap-330 .glyphicon-resize-small:before {
3245
+ content: "\e097";
3246
+ }
3247
+
3248
+ .factory-bootstrap-330 .glyphicon-exclamation-sign:before {
3249
+ content: "\e101";
3250
+ }
3251
+
3252
+ .factory-bootstrap-330 .glyphicon-gift:before {
3253
+ content: "\e102";
3254
+ }
3255
+
3256
+ .factory-bootstrap-330 .glyphicon-leaf:before {
3257
+ content: "\e103";
3258
+ }
3259
+
3260
+ .factory-bootstrap-330 .glyphicon-fire:before {
3261
+ content: "\e104";
3262
+ }
3263
+
3264
+ .factory-bootstrap-330 .glyphicon-eye-open:before {
3265
+ content: "\e105";
3266
+ }
3267
+
3268
+ .factory-bootstrap-330 .glyphicon-eye-close:before {
3269
+ content: "\e106";
3270
+ }
3271
+
3272
+ .factory-bootstrap-330 .glyphicon-warning-sign:before {
3273
+ content: "\e107";
3274
+ }
3275
+
3276
+ .factory-bootstrap-330 .glyphicon-plane:before {
3277
+ content: "\e108";
3278
+ }
3279
+
3280
+ .factory-bootstrap-330 .glyphicon-calendar:before {
3281
+ content: "\e109";
3282
+ }
3283
+
3284
+ .factory-bootstrap-330 .glyphicon-random:before {
3285
+ content: "\e110";
3286
+ }
3287
+
3288
+ .factory-bootstrap-330 .glyphicon-comment:before {
3289
+ content: "\e111";
3290
+ }
3291
+
3292
+ .factory-bootstrap-330 .glyphicon-magnet:before {
3293
+ content: "\e112";
3294
+ }
3295
+
3296
+ .factory-bootstrap-330 .glyphicon-chevron-up:before {
3297
+ content: "\e113";
3298
+ }
3299
+
3300
+ .factory-bootstrap-330 .glyphicon-chevron-down:before {
3301
+ content: "\e114";
3302
+ }
3303
+
3304
+ .factory-bootstrap-330 .glyphicon-retweet:before {
3305
+ content: "\e115";
3306
+ }
3307
+
3308
+ .factory-bootstrap-330 .glyphicon-shopping-cart:before {
3309
+ content: "\e116";
3310
+ }
3311
+
3312
+ .factory-bootstrap-330 .glyphicon-folder-close:before {
3313
+ content: "\e117";
3314
+ }
3315
+
3316
+ .factory-bootstrap-330 .glyphicon-folder-open:before {
3317
+ content: "\e118";
3318
+ }
3319
+
3320
+ .factory-bootstrap-330 .glyphicon-resize-vertical:before {
3321
+ content: "\e119";
3322
+ }
3323
+
3324
+ .factory-bootstrap-330 .glyphicon-resize-horizontal:before {
3325
+ content: "\e120";
3326
+ }
3327
+
3328
+ .factory-bootstrap-330 .glyphicon-hdd:before {
3329
+ content: "\e121";
3330
+ }
3331
+
3332
+ .factory-bootstrap-330 .glyphicon-bullhorn:before {
3333
+ content: "\e122";
3334
+ }
3335
+
3336
+ .factory-bootstrap-330 .glyphicon-bell:before {
3337
+ content: "\e123";
3338
+ }
3339
+
3340
+ .factory-bootstrap-330 .glyphicon-certificate:before {
3341
+ content: "\e124";
3342
+ }
3343
+
3344
+ .factory-bootstrap-330 .glyphicon-thumbs-up:before {
3345
+ content: "\e125";
3346
+ }
3347
+
3348
+ .factory-bootstrap-330 .glyphicon-thumbs-down:before {
3349
+ content: "\e126";
3350
+ }
3351
+
3352
+ .factory-bootstrap-330 .glyphicon-hand-right:before {
3353
+ content: "\e127";
3354
+ }
3355
+
3356
+ .factory-bootstrap-330 .glyphicon-hand-left:before {
3357
+ content: "\e128";
3358
+ }
3359
+
3360
+ .factory-bootstrap-330 .glyphicon-hand-up:before {
3361
+ content: "\e129";
3362
+ }
3363
+
3364
+ .factory-bootstrap-330 .glyphicon-hand-down:before {
3365
+ content: "\e130";
3366
+ }
3367
+
3368
+ .factory-bootstrap-330 .glyphicon-circle-arrow-right:before {
3369
+ content: "\e131";
3370
+ }
3371
+
3372
+ .factory-bootstrap-330 .glyphicon-circle-arrow-left:before {
3373
+ content: "\e132";
3374
+ }
3375
+
3376
+ .factory-bootstrap-330 .glyphicon-circle-arrow-up:before {
3377
+ content: "\e133";
3378
+ }
3379
+
3380
+ .factory-bootstrap-330 .glyphicon-circle-arrow-down:before {
3381
+ content: "\e134";
3382
+ }
3383
+
3384
+ .factory-bootstrap-330 .glyphicon-globe:before {
3385
+ content: "\e135";
3386
+ }
3387
+
3388
+ .factory-bootstrap-330 .glyphicon-wrench:before {
3389
+ content: "\e136";
3390
+ }
3391
+
3392
+ .factory-bootstrap-330 .glyphicon-tasks:before {
3393
+ content: "\e137";
3394
+ }
3395
+
3396
+ .factory-bootstrap-330 .glyphicon-filter:before {
3397
+ content: "\e138";
3398
+ }
3399
+
3400
+ .factory-bootstrap-330 .glyphicon-briefcase:before {
3401
+ content: "\e139";
3402
+ }
3403
+
3404
+ .factory-bootstrap-330 .glyphicon-fullscreen:before {
3405
+ content: "\e140";
3406
+ }
3407
+
3408
+ .factory-bootstrap-330 .glyphicon-dashboard:before {
3409
+ content: "\e141";
3410
+ }
3411
+
3412
+ .factory-bootstrap-330 .glyphicon-paperclip:before {
3413
+ content: "\e142";
3414
+ }
3415
+
3416
+ .factory-bootstrap-330 .glyphicon-heart-empty:before {
3417
+ content: "\e143";
3418
+ }
3419
+
3420
+ .factory-bootstrap-330 .glyphicon-link:before {
3421
+ content: "\e144";
3422
+ }
3423
+
3424
+ .factory-bootstrap-330 .glyphicon-phone:before {
3425
+ content: "\e145";
3426
+ }
3427
+
3428
+ .factory-bootstrap-330 .glyphicon-pushpin:before {
3429
+ content: "\e146";
3430
+ }
3431
+
3432
+ .factory-bootstrap-330 .glyphicon-usd:before {
3433
+ content: "\e148";
3434
+ }
3435
+
3436
+ .factory-bootstrap-330 .glyphicon-gbp:before {
3437
+ content: "\e149";
3438
+ }
3439
+
3440
+ .factory-bootstrap-330 .glyphicon-sort:before {
3441
+ content: "\e150";
3442
+ }
3443
+
3444
+ .factory-bootstrap-330 .glyphicon-sort-by-alphabet:before {
3445
+ content: "\e151";
3446
+ }
3447
+
3448
+ .factory-bootstrap-330 .glyphicon-sort-by-alphabet-alt:before {
3449
+ content: "\e152";
3450
+ }
3451
+
3452
+ .factory-bootstrap-330 .glyphicon-sort-by-order:before {
3453
+ content: "\e153";
3454
+ }
3455
+
3456
+ .factory-bootstrap-330 .glyphicon-sort-by-order-alt:before {
3457
+ content: "\e154";
3458
+ }
3459
+
3460
+ .factory-bootstrap-330 .glyphicon-sort-by-attributes:before {
3461
+ content: "\e155";
3462
+ }
3463
+
3464
+ .factory-bootstrap-330 .glyphicon-sort-by-attributes-alt:before {
3465
+ content: "\e156";
3466
+ }
3467
+
3468
+ .factory-bootstrap-330 .glyphicon-unchecked:before {
3469
+ content: "\e157";
3470
+ }
3471
+
3472
+ .factory-bootstrap-330 .glyphicon-expand:before {
3473
+ content: "\e158";
3474
+ }
3475
+
3476
+ .factory-bootstrap-330 .glyphicon-collapse-down:before {
3477
+ content: "\e159";
3478
+ }
3479
+
3480
+ .factory-bootstrap-330 .glyphicon-collapse-up:before {
3481
+ content: "\e160";
3482
+ }
3483
+
3484
+ .factory-bootstrap-330 .glyphicon-log-in:before {
3485
+ content: "\e161";
3486
+ }
3487
+
3488
+ .factory-bootstrap-330 .glyphicon-flash:before {
3489
+ content: "\e162";
3490
+ }
3491
+
3492
+ .factory-bootstrap-330 .glyphicon-log-out:before {
3493
+ content: "\e163";
3494
+ }
3495
+
3496
+ .factory-bootstrap-330 .glyphicon-new-window:before {
3497
+ content: "\e164";
3498
+ }
3499
+
3500
+ .factory-bootstrap-330 .glyphicon-record:before {
3501
+ content: "\e165";
3502
+ }
3503
+
3504
+ .factory-bootstrap-330 .glyphicon-save:before {
3505
+ content: "\e166";
3506
+ }
3507
+
3508
+ .factory-bootstrap-330 .glyphicon-open:before {
3509
+ content: "\e167";
3510
+ }
3511
+
3512
+ .factory-bootstrap-330 .glyphicon-saved:before {
3513
+ content: "\e168";
3514
+ }
3515
+
3516
+ .factory-bootstrap-330 .glyphicon-import:before {
3517
+ content: "\e169";
3518
+ }
3519
+
3520
+ .factory-bootstrap-330 .glyphicon-export:before {
3521
+ content: "\e170";
3522
+ }
3523
+
3524
+ .factory-bootstrap-330 .glyphicon-send:before {
3525
+ content: "\e171";
3526
+ }
3527
+
3528
+ .factory-bootstrap-330 .glyphicon-floppy-disk:before {
3529
+ content: "\e172";
3530
+ }
3531
+
3532
+ .factory-bootstrap-330 .glyphicon-floppy-saved:before {
3533
+ content: "\e173";
3534
+ }
3535
+
3536
+ .factory-bootstrap-330 .glyphicon-floppy-remove:before {
3537
+ content: "\e174";
3538
+ }
3539
+
3540
+ .factory-bootstrap-330 .glyphicon-floppy-save:before {
3541
+ content: "\e175";
3542
+ }
3543
+
3544
+ .factory-bootstrap-330 .glyphicon-floppy-open:before {
3545
+ content: "\e176";
3546
+ }
3547
+
3548
+ .factory-bootstrap-330 .glyphicon-credit-card:before {
3549
+ content: "\e177";
3550
+ }
3551
+
3552
+ .factory-bootstrap-330 .glyphicon-transfer:before {
3553
+ content: "\e178";
3554
+ }
3555
+
3556
+ .factory-bootstrap-330 .glyphicon-cutlery:before {
3557
+ content: "\e179";
3558
+ }
3559
+
3560
+ .factory-bootstrap-330 .glyphicon-header:before {
3561
+ content: "\e180";
3562
+ }
3563
+
3564
+ .factory-bootstrap-330 .glyphicon-compressed:before {
3565
+ content: "\e181";
3566
+ }
3567
+
3568
+ .factory-bootstrap-330 .glyphicon-earphone:before {
3569
+ content: "\e182";
3570
+ }
3571
+
3572
+ .factory-bootstrap-330 .glyphicon-phone-alt:before {
3573
+ content: "\e183";
3574
+ }
3575
+
3576
+ .factory-bootstrap-330 .glyphicon-tower:before {
3577
+ content: "\e184";
3578
+ }
3579
+
3580
+ .factory-bootstrap-330 .glyphicon-stats:before {
3581
+ content: "\e185";
3582
+ }
3583
+
3584
+ .factory-bootstrap-330 .glyphicon-sd-video:before {
3585
+ content: "\e186";
3586
+ }
3587
+
3588
+ .factory-bootstrap-330 .glyphicon-hd-video:before {
3589
+ content: "\e187";
3590
+ }
3591
+
3592
+ .factory-bootstrap-330 .glyphicon-subtitles:before {
3593
+ content: "\e188";
3594
+ }
3595
+
3596
+ .factory-bootstrap-330 .glyphicon-sound-stereo:before {
3597
+ content: "\e189";
3598
+ }
3599
+
3600
+ .factory-bootstrap-330 .glyphicon-sound-dolby:before {
3601
+ content: "\e190";
3602
+ }
3603
+
3604
+ .factory-bootstrap-330 .glyphicon-sound-5-1:before {
3605
+ content: "\e191";
3606
+ }
3607
+
3608
+ .factory-bootstrap-330 .glyphicon-sound-6-1:before {
3609
+ content: "\e192";
3610
+ }
3611
+
3612
+ .factory-bootstrap-330 .glyphicon-sound-7-1:before {
3613
+ content: "\e193";
3614
+ }
3615
+
3616
+ .factory-bootstrap-330 .glyphicon-copyright-mark:before {
3617
+ content: "\e194";
3618
+ }
3619
+
3620
+ .factory-bootstrap-330 .glyphicon-registration-mark:before {
3621
+ content: "\e195";
3622
+ }
3623
+
3624
+ .factory-bootstrap-330 .glyphicon-cloud-download:before {
3625
+ content: "\e197";
3626
+ }
3627
+
3628
+ .factory-bootstrap-330 .glyphicon-cloud-upload:before {
3629
+ content: "\e198";
3630
+ }
3631
+
3632
+ .factory-bootstrap-330 .glyphicon-tree-conifer:before {
3633
+ content: "\e199";
3634
+ }
3635
+
3636
+ .factory-bootstrap-330 .glyphicon-tree-deciduous:before {
3637
+ content: "\e200";
3638
+ }
3639
+
3640
+ .factory-bootstrap-330 .caret {
3641
+ display: inline-block;
3642
+ width: 0;
3643
+ height: 0;
3644
+ margin-left: 2px;
3645
+ vertical-align: middle;
3646
+ border-top: 4px solid;
3647
+ border-right: 4px solid transparent;
3648
+ border-left: 4px solid transparent;
3649
+ }
3650
+
3651
+ .factory-bootstrap-330 .dropdown {
3652
+ position: relative;
3653
+ }
3654
+
3655
+ .factory-bootstrap-330 .dropdown-toggle:focus {
3656
+ outline: 0;
3657
+ }
3658
+
3659
+ .factory-bootstrap-330 .dropdown-menu {
3660
+ position: absolute;
3661
+ top: 100%;
3662
+ left: 0;
3663
+ z-index: 1000;
3664
+ display: none;
3665
+ float: left;
3666
+ min-width: 160px;
3667
+ padding: 5px 0;
3668
+ margin: 2px 0 0;
3669
+ font-size: 14px;
3670
+ list-style: none;
3671
+ background-color: #ffffff;
3672
+ border: 1px solid #cccccc;
3673
+ border: 1px solid rgba(0, 0, 0, 0.15);
3674
+ border-radius: 4px;
3675
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
3676
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
3677
+ background-clip: padding-box;
3678
+ }
3679
+
3680
+ .factory-bootstrap-330 .dropdown-menu.pull-right {
3681
+ right: 0;
3682
+ left: auto;
3683
+ }
3684
+
3685
+ .factory-bootstrap-330 .dropdown-menu .divider {
3686
+ height: 1px;
3687
+ margin: 9px 0;
3688
+ overflow: hidden;
3689
+ background-color: #e5e5e5;
3690
+ }
3691
+
3692
+ .factory-bootstrap-330 .dropdown-menu > li > a {
3693
+ display: block;
3694
+ padding: 3px 20px;
3695
+ clear: both;
3696
+ font-weight: normal;
3697
+ line-height: 1.428571429;
3698
+ color: #333333;
3699
+ white-space: nowrap;
3700
+ }
3701
+
3702
+ .factory-bootstrap-330 .dropdown-menu > li > a:hover,
3703
+ .factory-bootstrap-330 .dropdown-menu > li > a:focus {
3704
+ color: #262626;
3705
+ text-decoration: none;
3706
+ background-color: #f5f5f5;
3707
+ }
3708
+
3709
+ .factory-bootstrap-330 .dropdown-menu > .active > a,
3710
+ .factory-bootstrap-330 .dropdown-menu > .active > a:hover,
3711
+ .factory-bootstrap-330 .dropdown-menu > .active > a:focus {
3712
+ color: #ffffff;
3713
+ text-decoration: none;
3714
+ background-color: #428bca;
3715
+ outline: 0;
3716
+ }
3717
+
3718
+ .factory-bootstrap-330 .dropdown-menu > .disabled > a,
3719
+ .factory-bootstrap-330 .dropdown-menu > .disabled > a:hover,
3720
+ .factory-bootstrap-330 .dropdown-menu > .disabled > a:focus {
3721
+ color: #999999;
3722
+ }
3723
+
3724
+ .factory-bootstrap-330 .dropdown-menu > .disabled > a:hover,
3725
+ .factory-bootstrap-330 .dropdown-menu > .disabled > a:focus {
3726
+ text-decoration: none;
3727
+ cursor: not-allowed;
3728
+ background-color: transparent;
3729
+ background-image: none;
3730
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
3731
+ }
3732
+
3733
+ .factory-bootstrap-330 .open > .dropdown-menu {
3734
+ display: block;
3735
+ }
3736
+
3737
+ .factory-bootstrap-330 .open > a {
3738
+ outline: 0;
3739
+ }
3740
+
3741
+ .factory-bootstrap-330 .dropdown-header {
3742
+ display: block;
3743
+ padding: 3px 20px;
3744
+ font-size: 12px;
3745
+ line-height: 1.428571429;
3746
+ color: #999999;
3747
+ }
3748
+
3749
+ .factory-bootstrap-330 .dropdown-backdrop {
3750
+ position: fixed;
3751
+ top: 0;
3752
+ right: 0;
3753
+ bottom: 0;
3754
+ left: 0;
3755
+ z-index: 990;
3756
+ }
3757
+
3758
+ .factory-bootstrap-330 .pull-right > .dropdown-menu {
3759
+ right: 0;
3760
+ left: auto;
3761
+ }
3762
+
3763
+ .factory-bootstrap-330 .dropup .caret,
3764
+ .factory-bootstrap-330 .navbar-fixed-bottom .dropdown .caret {
3765
+ border-top: 0;
3766
+ border-bottom: 4px solid;
3767
+ content: "";
3768
+ }
3769
+
3770
+ .factory-bootstrap-330 .dropup .dropdown-menu,
3771
+ .factory-bootstrap-330 .navbar-fixed-bottom .dropdown .dropdown-menu {
3772
+ top: auto;
3773
+ bottom: 100%;
3774
+ margin-bottom: 1px;
3775
+ }
3776
+
3777
+ @media (min-width: 768px) {
3778
+ .navbar-right .dropdown-menu {
3779
+ right: 0;
3780
+ left: auto;
3781
+ }
3782
+ }
3783
+
3784
+ .factory-bootstrap-330 .btn-group,
3785
+ .factory-bootstrap-330 .btn-group-vertical {
3786
+ position: relative;
3787
+ display: inline-block;
3788
+ vertical-align: middle;
3789
+ }
3790
+
3791
+ .factory-bootstrap-330 .btn-group > .btn,
3792
+ .factory-bootstrap-330 .btn-group-vertical > .btn {
3793
+ position: relative;
3794
+ float: left;
3795
+ }
3796
+
3797
+ .factory-bootstrap-330 .btn-group > .btn:hover,
3798
+ .factory-bootstrap-330 .btn-group-vertical > .btn:hover,
3799
+ .factory-bootstrap-330 .btn-group > .btn:focus,
3800
+ .factory-bootstrap-330 .btn-group-vertical > .btn:focus,
3801
+ .factory-bootstrap-330 .btn-group > .btn:active,
3802
+ .factory-bootstrap-330 .btn-group-vertical > .btn:active,
3803
+ .factory-bootstrap-330 .btn-group > .btn.active,
3804
+ .factory-bootstrap-330 .btn-group-vertical > .btn.active {
3805
+ z-index: 2;
3806
+ }
3807
+
3808
+ .factory-bootstrap-330 .btn-group > .btn:focus,
3809
+ .factory-bootstrap-330 .btn-group-vertical > .btn:focus {
3810
+ outline: none;
3811
+ }
3812
+
3813
+ .factory-bootstrap-330 .btn-group .btn + .btn,
3814
+ .factory-bootstrap-330 .btn-group .btn + .btn-group,
3815
+ .factory-bootstrap-330 .btn-group .btn-group + .btn,
3816
+ .factory-bootstrap-330 .btn-group .btn-group + .btn-group {
3817
+ margin-left: -1px;
3818
+ }
3819
+
3820
+ .factory-bootstrap-330 .btn-toolbar:before,
3821
+ .factory-bootstrap-330 .btn-toolbar:after {
3822
+ display: table;
3823
+ content: " ";
3824
+ }
3825
+
3826
+ .factory-bootstrap-330 .btn-toolbar:after {
3827
+ clear: both;
3828
+ }
3829
+
3830
+ .factory-bootstrap-330 .btn-toolbar:before,
3831
+ .factory-bootstrap-330 .btn-toolbar:after {
3832
+ display: table;
3833
+ content: " ";
3834
+ }
3835
+
3836
+ .factory-bootstrap-330 .btn-toolbar:after {
3837
+ clear: both;
3838
+ }
3839
+
3840
+ .factory-bootstrap-330 .btn-toolbar .btn-group {
3841
+ float: left;
3842
+ }
3843
+
3844
+ .factory-bootstrap-330 .btn-toolbar > .btn + .btn,
3845
+ .factory-bootstrap-330 .btn-toolbar > .btn-group + .btn,
3846
+ .factory-bootstrap-330 .btn-toolbar > .btn + .btn-group,
3847
+ .factory-bootstrap-330 .btn-toolbar > .btn-group + .btn-group {
3848
+ margin-left: 5px;
3849
+ }
3850
+
3851
+ .factory-bootstrap-330 .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
3852
+ border-radius: 0;
3853
+ }
3854
+
3855
+ .factory-bootstrap-330 .btn-group > .btn:first-child {
3856
+ margin-left: 0;
3857
+ }
3858
+
3859
+ .factory-bootstrap-330 .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
3860
+ border-top-right-radius: 0;
3861
+ border-bottom-right-radius: 0;
3862
+ }
3863
+
3864
+ .factory-bootstrap-330 .btn-group > .btn:last-child:not(:first-child),
3865
+ .factory-bootstrap-330 .btn-group > .dropdown-toggle:not(:first-child) {
3866
+ border-bottom-left-radius: 0;
3867
+ border-top-left-radius: 0;
3868
+ }
3869
+
3870
+ .factory-bootstrap-330 .btn-group > .btn-group {
3871
+ float: left;
3872
+ }
3873
+
3874
+ .factory-bootstrap-330 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
3875
+ border-radius: 0;
3876
+ }
3877
+
3878
+ .factory-bootstrap-330 .btn-group > .btn-group:first-child > .btn:last-child,
3879
+ .factory-bootstrap-330 .btn-group > .btn-group:first-child > .dropdown-toggle {
3880
+ border-top-right-radius: 0;
3881
+ border-bottom-right-radius: 0;
3882
+ }
3883
+
3884
+ .factory-bootstrap-330 .btn-group > .btn-group:last-child > .btn:first-child {
3885
+ border-bottom-left-radius: 0;
3886
+ border-top-left-radius: 0;
3887
+ }
3888
+
3889
+ .factory-bootstrap-330 .btn-group .dropdown-toggle:active,
3890
+ .factory-bootstrap-330 .btn-group.open .dropdown-toggle {
3891
+ outline: 0;
3892
+ }
3893
+
3894
+ .factory-bootstrap-330 .btn-group-xs > .btn {
3895
+ padding: 1px 5px;
3896
+ font-size: 12px;
3897
+ line-height: 1.5;
3898
+ border-radius: 3px;
3899
+ }
3900
+
3901
+ .factory-bootstrap-330 .btn-group-sm > .btn {
3902
+ padding: 5px 10px;
3903
+ font-size: 12px;
3904
+ line-height: 1.5;
3905
+ border-radius: 3px;
3906
+ }
3907
+
3908
+ .factory-bootstrap-330 .btn-group-lg > .btn {
3909
+ padding: 10px 16px;
3910
+ font-size: 18px;
3911
+ line-height: 1.33;
3912
+ border-radius: 6px;
3913
+ }
3914
+
3915
+ .factory-bootstrap-330 .btn-group > .btn + .dropdown-toggle {
3916
+ padding-right: 8px;
3917
+ padding-left: 8px;
3918
+ }
3919
+
3920
+ .factory-bootstrap-330 .btn-group > .btn-lg + .dropdown-toggle {
3921
+ padding-right: 12px;
3922
+ padding-left: 12px;
3923
+ }
3924
+
3925
+ .factory-bootstrap-330 .btn-group.open .dropdown-toggle {
3926
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
3927
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
3928
+ }
3929
+
3930
+ .factory-bootstrap-330 .btn-group.open .dropdown-toggle.btn-link {
3931
+ -webkit-box-shadow: none;
3932
+ box-shadow: none;
3933
+ }
3934
+
3935
+ .factory-bootstrap-330 .btn-group {
3936
+ border: 4px solid #f9f9f9;
3937
+ border-radius: 4px;
3938
+ }
3939
+
3940
+ .factory-bootstrap-330 .btn-group .btn.active.value {
3941
+ text-shadow: none;
3942
+ color: #fff;
3943
+ background-color: #33aad5;
3944
+ -webkit-box-shadow: inset 0 1px 1px #0074a2;
3945
+ box-shadow: inset 0 1px 3px #0074a2;
3946
+ border-top: 1px solid #0074a2;
3947
+ border-bottom: 1px solid #0074a2;
3948
+ border-left: 1px solid #0074a2;
3949
+ }
3950
+
3951
+ .factory-bootstrap-330 .btn .caret {
3952
+ margin-left: 0;
3953
+ }
3954
+
3955
+ .factory-bootstrap-330 .btn-lg .caret {
3956
+ border-width: 5px 5px 0;
3957
+ border-bottom-width: 0;
3958
+ }
3959
+
3960
+ .factory-bootstrap-330 .dropup .btn-lg .caret {
3961
+ border-width: 0 5px 5px;
3962
+ }
3963
+
3964
+ .factory-bootstrap-330 .btn-group-vertical > .btn,
3965
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group,
3966
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group > .btn {
3967
+ display: block;
3968
+ float: none;
3969
+ width: 100%;
3970
+ max-width: 100%;
3971
+ }
3972
+
3973
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:before,
3974
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:after {
3975
+ display: table;
3976
+ content: " ";
3977
+ }
3978
+
3979
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:after {
3980
+ clear: both;
3981
+ }
3982
+
3983
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:before,
3984
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:after {
3985
+ display: table;
3986
+ content: " ";
3987
+ }
3988
+
3989
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:after {
3990
+ clear: both;
3991
+ }
3992
+
3993
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group > .btn {
3994
+ float: none;
3995
+ }
3996
+
3997
+ .factory-bootstrap-330 .btn-group-vertical > .btn + .btn,
3998
+ .factory-bootstrap-330 .btn-group-vertical > .btn + .btn-group,
3999
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group + .btn,
4000
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group + .btn-group {
4001
+ margin-top: -1px;
4002
+ margin-left: 0;
4003
+ }
4004
+
4005
+ .factory-bootstrap-330 .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
4006
+ border-radius: 0;
4007
+ }
4008
+
4009
+ .factory-bootstrap-330 .btn-group-vertical > .btn:first-child:not(:last-child) {
4010
+ border-top-right-radius: 4px;
4011
+ border-bottom-right-radius: 0;
4012
+ border-bottom-left-radius: 0;
4013
+ }
4014
+
4015
+ .factory-bootstrap-330 .btn-group-vertical > .btn:last-child:not(:first-child) {
4016
+ border-top-right-radius: 0;
4017
+ border-bottom-left-radius: 4px;
4018
+ border-top-left-radius: 0;
4019
+ }
4020
+
4021
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
4022
+ border-radius: 0;
4023
+ }
4024
+
4025
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:first-child > .btn:last-child,
4026
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:first-child > .dropdown-toggle {
4027
+ border-bottom-right-radius: 0;
4028
+ border-bottom-left-radius: 0;
4029
+ }
4030
+
4031
+ .factory-bootstrap-330 .btn-group-vertical > .btn-group:last-child > .btn:first-child {
4032
+ border-top-right-radius: 0;
4033
+ border-top-left-radius: 0;
4034
+ }
4035
+
4036
+ .factory-bootstrap-330 .btn-group-justified {
4037
+ display: table;
4038
+ width: 100%;
4039
+ border-collapse: separate;
4040
+ table-layout: fixed;
4041
+ }
4042
+
4043
+ .factory-bootstrap-330 .btn-group-justified > .btn,
4044
+ .factory-bootstrap-330 .btn-group-justified > .btn-group {
4045
+ display: table-cell;
4046
+ float: none;
4047
+ width: 1%;
4048
+ }
4049
+
4050
+ .factory-bootstrap-330 .btn-group-justified > .btn-group .btn {
4051
+ width: 100%;
4052
+ }
4053
+
4054
+ [data-toggle="buttons"] > .btn > input[type="radio"],
4055
+ [data-toggle="buttons"] > .btn > input[type="checkbox"] {
4056
+ display: none;
4057
+ }
4058
+
4059
+ .factory-bootstrap-330 .input-group {
4060
+ position: relative;
4061
+ display: table;
4062
+ border-collapse: separate;
4063
+ }
4064
+
4065
+ .factory-bootstrap-330 .input-group[class*="col-"] {
4066
+ float: none;
4067
+ padding-right: 0;
4068
+ padding-left: 0;
4069
+ }
4070
+
4071
+ .factory-bootstrap-330 .input-group .form-control {
4072
+ width: 100%;
4073
+ margin-bottom: 0;
4074
+ }
4075
+
4076
+ .factory-bootstrap-330 .input-group-lg > .form-control,
4077
+ .factory-bootstrap-330 .input-group-lg > .input-group-addon,
4078
+ .factory-bootstrap-330 .input-group-lg > .input-group-btn > .btn {
4079
+ height: 46px;
4080
+ padding: 10px 16px;
4081
+ font-size: 18px;
4082
+ line-height: 1.33;
4083
+ border-radius: 6px;
4084
+ }
4085
+
4086
+ .factory-bootstrap-330 select.input-group-lg > .form-control,
4087
+ .factory-bootstrap-330 select.input-group-lg > .input-group-addon,
4088
+ .factory-bootstrap-330 select.input-group-lg > .input-group-btn > .btn {
4089
+ height: 46px;
4090
+ line-height: 46px;
4091
+ }
4092
+
4093
+ .factory-bootstrap-330 textarea.input-group-lg > .form-control,
4094
+ .factory-bootstrap-330 textarea.input-group-lg > .input-group-addon,
4095
+ .factory-bootstrap-330 textarea.input-group-lg > .input-group-btn > .btn {
4096
+ height: auto;
4097
+ }
4098
+
4099
+ .factory-bootstrap-330 .input-group-sm > .form-control,
4100
+ .factory-bootstrap-330 .input-group-sm > .input-group-addon,
4101
+ .factory-bootstrap-330 .input-group-sm > .input-group-btn > .btn {
4102
+ height: 30px;
4103
+ padding: 5px 10px;
4104
+ font-size: 12px;
4105
+ line-height: 1.5;
4106
+ border-radius: 3px;
4107
+ }
4108
+
4109
+ .factory-bootstrap-330 select.input-group-sm > .form-control,
4110
+ .factory-bootstrap-330 select.input-group-sm > .input-group-addon,
4111
+ .factory-bootstrap-330 select.input-group-sm > .input-group-btn > .btn {
4112
+ height: 30px;
4113
+ line-height: 30px;
4114
+ }
4115
+
4116
+ .factory-bootstrap-330 textarea.input-group-sm > .form-control,
4117
+ .factory-bootstrap-330 textarea.input-group-sm > .input-group-addon,
4118
+ .factory-bootstrap-330 textarea.input-group-sm > .input-group-btn > .btn {
4119
+ height: auto;
4120
+ }
4121
+
4122
+ .factory-bootstrap-330 .input-group-addon,
4123
+ .factory-bootstrap-330 .input-group-btn,
4124
+ .factory-bootstrap-330 .input-group .form-control {
4125
+ display: table-cell;
4126
+ }
4127
+
4128
+ .factory-bootstrap-330 .input-group-addon:not(:first-child):not(:last-child),
4129
+ .factory-bootstrap-330 .input-group-btn:not(:first-child):not(:last-child),
4130
+ .factory-bootstrap-330 .input-group .form-control:not(:first-child):not(:last-child) {
4131
+ border-radius: 0;
4132
+ }
4133
+
4134
+ .factory-bootstrap-330 .input-group-addon,
4135
+ .factory-bootstrap-330 .input-group-btn {
4136
+ width: 1%;
4137
+ white-space: nowrap;
4138
+ vertical-align: middle;
4139
+ }
4140
+
4141
+ .factory-bootstrap-330 .input-group-addon {
4142
+ padding: 6px 12px;
4143
+ font-size: 14px;
4144
+ font-weight: normal;
4145
+ line-height: 1;
4146
+ color: #555555;
4147
+ text-align: center;
4148
+ background-color: #eeeeee;
4149
+ border: 1px solid #cccccc;
4150
+ border-radius: 4px;
4151
+ }
4152
+
4153
+ .factory-bootstrap-330 .input-group-addon.input-sm {
4154
+ padding: 5px 10px;
4155
+ font-size: 12px;
4156
+ border-radius: 3px;
4157
+ }
4158
+
4159
+ .factory-bootstrap-330 .input-group-addon.input-lg {
4160
+ padding: 10px 16px;
4161
+ font-size: 18px;
4162
+ border-radius: 6px;
4163
+ }
4164
+
4165
+ .factory-bootstrap-330 .input-group-addon input[type="radio"],
4166
+ .factory-bootstrap-330 .input-group-addon input[type="checkbox"] {
4167
+ margin-top: 0;
4168
+ }
4169
+
4170
+ .factory-bootstrap-330 .input-group .form-control:first-child,
4171
+ .factory-bootstrap-330 .input-group-addon:first-child,
4172
+ .factory-bootstrap-330 .input-group-btn:first-child > .btn,
4173
+ .factory-bootstrap-330 .input-group-btn:first-child > .dropdown-toggle,
4174
+ .factory-bootstrap-330 .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
4175
+ border-top-right-radius: 0;
4176
+ border-bottom-right-radius: 0;
4177
+ }
4178
+
4179
+ .factory-bootstrap-330 .input-group-addon:first-child {
4180
+ border-right: 0;
4181
+ }
4182
+
4183
+ .factory-bootstrap-330 .input-group .form-control:last-child,
4184
+ .factory-bootstrap-330 .input-group-addon:last-child,
4185
+ .factory-bootstrap-330 .input-group-btn:last-child > .btn,
4186
+ .factory-bootstrap-330 .input-group-btn:last-child > .dropdown-toggle,
4187
+ .factory-bootstrap-330 .input-group-btn:first-child > .btn:not(:first-child) {
4188
+ border-bottom-left-radius: 0;
4189
+ border-top-left-radius: 0;
4190
+ }
4191
+
4192
+ .factory-bootstrap-330 .input-group-addon:last-child {
4193
+ border-left: 0;
4194
+ }
4195
+
4196
+ .factory-bootstrap-330 .input-group-btn {
4197
+ position: relative;
4198
+ white-space: nowrap;
4199
+ }
4200
+
4201
+ .factory-bootstrap-330 .input-group-btn:first-child > .btn {
4202
+ margin-right: -1px;
4203
+ }
4204
+
4205
+ .factory-bootstrap-330 .input-group-btn:last-child > .btn {
4206
+ margin-left: -1px;
4207
+ }
4208
+
4209
+ .factory-bootstrap-330 .input-group-btn > .btn {
4210
+ position: relative;
4211
+ }
4212
+
4213
+ .factory-bootstrap-330 .input-group-btn > .btn + .btn {
4214
+ margin-left: -4px;
4215
+ }
4216
+
4217
+ .factory-bootstrap-330 .input-group-btn > .btn:hover,
4218
+ .factory-bootstrap-330 .input-group-btn > .btn:active {
4219
+ z-index: 2;
4220
+ }
4221
+
4222
+ .factory-bootstrap-330 .nav {
4223
+ padding-left: 0;
4224
+ margin-bottom: 0;
4225
+ list-style: none;
4226
+ }
4227
+
4228
+ .factory-bootstrap-330 .nav:before,
4229
+ .factory-bootstrap-330 .nav:after {
4230
+ display: table;
4231
+ content: " ";
4232
+ }
4233
+
4234
+ .factory-bootstrap-330 .nav:after {
4235
+ clear: both;
4236
+ }
4237
+
4238
+ .factory-bootstrap-330 .nav:before,
4239
+ .factory-bootstrap-330 .nav:after {
4240
+ display: table;
4241
+ content: " ";
4242
+ }
4243
+
4244
+ .factory-bootstrap-330 .nav:after {
4245
+ clear: both;
4246
+ }
4247
+
4248
+ .factory-bootstrap-330 .nav > li {
4249
+ position: relative;
4250
+ display: block;
4251
+ }
4252
+
4253
+ .factory-bootstrap-330 .nav > li > a {
4254
+ position: relative;
4255
+ display: block;
4256
+ padding: 10px 15px;
4257
+ }
4258
+
4259
+ .factory-bootstrap-330 .nav > li > a:hover,
4260
+ .factory-bootstrap-330 .nav > li > a:focus {
4261
+ text-decoration: none;
4262
+ background-color: #eeeeee;
4263
+ }
4264
+
4265
+ .factory-bootstrap-330 .nav > li.disabled > a {
4266
+ color: #999999;
4267
+ }
4268
+
4269
+ .factory-bootstrap-330 .nav > li.disabled > a:hover,
4270
+ .factory-bootstrap-330 .nav > li.disabled > a:focus {
4271
+ color: #999999;
4272
+ text-decoration: none;
4273
+ cursor: not-allowed;
4274
+ background-color: transparent;
4275
+ }
4276
+
4277
+ .factory-bootstrap-330 .nav .open > a,
4278
+ .factory-bootstrap-330 .nav .open > a:hover,
4279
+ .factory-bootstrap-330 .nav .open > a:focus {
4280
+ background-color: #eeeeee;
4281
+ border-color: #428bca;
4282
+ }
4283
+
4284
+ .factory-bootstrap-330 .nav .nav-divider {
4285
+ height: 1px;
4286
+ margin: 9px 0;
4287
+ overflow: hidden;
4288
+ background-color: #e5e5e5;
4289
+ }
4290
+
4291
+ .factory-bootstrap-330 .nav > li > a > img {
4292
+ max-width: none;
4293
+ }
4294
+
4295
+ .factory-bootstrap-330 .nav-tabs {
4296
+ border-bottom: 1px solid #dddddd;
4297
+ }
4298
+
4299
+ .factory-bootstrap-330 .nav-tabs > li {
4300
+ float: left;
4301
+ margin-bottom: -1px;
4302
+ }
4303
+
4304
+ .factory-bootstrap-330 .nav-tabs > li > a {
4305
+ margin-right: 2px;
4306
+ line-height: 1.428571429;
4307
+ border: 1px solid transparent;
4308
+ border-radius: 4px 4px 0 0;
4309
+ }
4310
+
4311
+ .factory-bootstrap-330 .nav-tabs > li > a:hover {
4312
+ border-color: #eeeeee #eeeeee #dddddd;
4313
+ }
4314
+
4315
+ .factory-bootstrap-330 .nav-tabs > li.active > a,
4316
+ .factory-bootstrap-330 .nav-tabs > li.active > a:hover,
4317
+ .factory-bootstrap-330 .nav-tabs > li.active > a:focus {
4318
+ color: #555555;
4319
+ cursor: default;
4320
+ background-color: #ffffff;
4321
+ border: 1px solid #dddddd;
4322
+ border-bottom-color: transparent;
4323
+ }
4324
+
4325
+ .factory-bootstrap-330 .nav-tabs.nav-justified {
4326
+ width: 100%;
4327
+ border-bottom: 0;
4328
+ }
4329
+
4330
+ .factory-bootstrap-330 .nav-tabs.nav-justified > li {
4331
+ float: none;
4332
+ }
4333
+
4334
+ .factory-bootstrap-330 .nav-tabs.nav-justified > li > a {
4335
+ margin-bottom: 5px;
4336
+ text-align: center;
4337
+ }
4338
+
4339
+ .factory-bootstrap-330 .nav-tabs.nav-justified > .dropdown .dropdown-menu {
4340
+ top: auto;
4341
+ left: auto;
4342
+ }
4343
+
4344
+ @media (min-width: 768px) {
4345
+ .nav-tabs.nav-justified > li {
4346
+ display: table-cell;
4347
+ width: 1%;
4348
+ }
4349
+
4350
+ .nav-tabs.nav-justified > li > a {
4351
+ margin-bottom: 0;
4352
+ }
4353
+ }
4354
+
4355
+ .factory-bootstrap-330 .nav-tabs.nav-justified > li > a {
4356
+ margin-right: 0;
4357
+ border-radius: 4px;
4358
+ }
4359
+
4360
+ .factory-bootstrap-330 .nav-tabs.nav-justified > .active > a,
4361
+ .factory-bootstrap-330 .nav-tabs.nav-justified > .active > a:hover,
4362
+ .factory-bootstrap-330 .nav-tabs.nav-justified > .active > a:focus {
4363
+ border: 1px solid #dddddd;
4364
+ }
4365
+
4366
+ @media (min-width: 768px) {
4367
+ .nav-tabs.nav-justified > li > a {
4368
+ border-bottom: 1px solid #dddddd;
4369
+ border-radius: 4px 4px 0 0;
4370
+ }
4371
+
4372
+ .nav-tabs.nav-justified > .active > a,
4373
+ .nav-tabs.nav-justified > .active > a:hover,
4374
+ .nav-tabs.nav-justified > .active > a:focus {
4375
+ border-bottom-color: #ffffff;
4376
+ }
4377
+ }
4378
+
4379
+ .factory-bootstrap-330 .nav-pills > li {
4380
+ float: left;
4381
+ }
4382
+
4383
+ .factory-bootstrap-330 .nav-pills > li > a {
4384
+ border-radius: 4px;
4385
+ }
4386
+
4387
+ .factory-bootstrap-330 .nav-pills > li + li {
4388
+ margin-left: 2px;
4389
+ }
4390
+
4391
+ .factory-bootstrap-330 .nav-pills > li.active > a,
4392
+ .factory-bootstrap-330 .nav-pills > li.active > a:hover,
4393
+ .factory-bootstrap-330 .nav-pills > li.active > a:focus {
4394
+ color: #ffffff;
4395
+ background-color: #428bca;
4396
+ }
4397
+
4398
+ .factory-bootstrap-330 .nav-stacked > li {
4399
+ float: none;
4400
+ }
4401
+
4402
+ .factory-bootstrap-330 .nav-stacked > li + li {
4403
+ margin-top: 2px;
4404
+ margin-left: 0;
4405
+ }
4406
+
4407
+ .factory-bootstrap-330 .nav-justified {
4408
+ width: 100%;
4409
+ }
4410
+
4411
+ .factory-bootstrap-330 .nav-justified > li {
4412
+ float: none;
4413
+ }
4414
+
4415
+ .factory-bootstrap-330 .nav-justified > li > a {
4416
+ margin-bottom: 5px;
4417
+ text-align: center;
4418
+ }
4419
+
4420
+ .factory-bootstrap-330 .nav-justified > .dropdown .dropdown-menu {
4421
+ top: auto;
4422
+ left: auto;
4423
+ }
4424
+
4425
+ @media (min-width: 768px) {
4426
+ .nav-justified > li {
4427
+ display: table-cell;
4428
+ width: 1%;
4429
+ }
4430
+
4431
+ .nav-justified > li > a {
4432
+ margin-bottom: 0;
4433
+ }
4434
+ }
4435
+
4436
+ .factory-bootstrap-330 .nav-tabs-justified {
4437
+ border-bottom: 0;
4438
+ }
4439
+
4440
+ .factory-bootstrap-330 .nav-tabs-justified > li > a {
4441
+ margin-right: 0;
4442
+ border-radius: 4px;
4443
+ }
4444
+
4445
+ .factory-bootstrap-330 .nav-tabs-justified > .active > a,
4446
+ .factory-bootstrap-330 .nav-tabs-justified > .active > a:hover,
4447
+ .factory-bootstrap-330 .nav-tabs-justified > .active > a:focus {
4448
+ border: 1px solid #dddddd;
4449
+ }
4450
+
4451
+ @media (min-width: 768px) {
4452
+ .nav-tabs-justified > li > a {
4453
+ border-bottom: 1px solid #dddddd;
4454
+ border-radius: 4px 4px 0 0;
4455
+ }
4456
+
4457
+ .nav-tabs-justified > .active > a,
4458
+ .nav-tabs-justified > .active > a:hover,
4459
+ .nav-tabs-justified > .active > a:focus {
4460
+ border-bottom-color: #ffffff;
4461
+ }
4462
+ }
4463
+
4464
+ .factory-bootstrap-330 .tab-content > .tab-pane {
4465
+ display: none;
4466
+ }
4467
+
4468
+ .factory-bootstrap-330 .tab-content > .active {
4469
+ display: block;
4470
+ }
4471
+
4472
+ .factory-bootstrap-330 .nav-tabs .dropdown-menu {
4473
+ margin-top: -1px;
4474
+ border-top-right-radius: 0;
4475
+ border-top-left-radius: 0;
4476
+ }
4477
+
4478
+ .factory-bootstrap-330 .navbar {
4479
+ position: relative;
4480
+ min-height: 50px;
4481
+ margin-bottom: 20px;
4482
+ border: 1px solid transparent;
4483
+ }
4484
+
4485
+ .factory-bootstrap-330 .navbar:before,
4486
+ .factory-bootstrap-330 .navbar:after {
4487
+ display: table;
4488
+ content: " ";
4489
+ }
4490
+
4491
+ .factory-bootstrap-330 .navbar:after {
4492
+ clear: both;
4493
+ }
4494
+
4495
+ .factory-bootstrap-330 .navbar:before,
4496
+ .factory-bootstrap-330 .navbar:after {
4497
+ display: table;
4498
+ content: " ";
4499
+ }
4500
+
4501
+ .factory-bootstrap-330 .navbar:after {
4502
+ clear: both;
4503
+ }
4504
+
4505
+ @media (min-width: 768px) {
4506
+ .navbar {
4507
+ border-radius: 4px;
4508
+ }
4509
+ }
4510
+
4511
+ .factory-bootstrap-330 .navbar-header:before,
4512
+ .factory-bootstrap-330 .navbar-header:after {
4513
+ display: table;
4514
+ content: " ";
4515
+ }
4516
+
4517
+ .factory-bootstrap-330 .navbar-header:after {
4518
+ clear: both;
4519
+ }
4520
+
4521
+ .factory-bootstrap-330 .navbar-header:before,
4522
+ .factory-bootstrap-330 .navbar-header:after {
4523
+ display: table;
4524
+ content: " ";
4525
+ }
4526
+
4527
+ .factory-bootstrap-330 .navbar-header:after {
4528
+ clear: both;
4529
+ }
4530
+
4531
+ @media (min-width: 768px) {
4532
+ .navbar-header {
4533
+ float: left;
4534
+ }
4535
+ }
4536
+
4537
+ .factory-bootstrap-330 .navbar-collapse {
4538
+ max-height: 340px;
4539
+ padding-right: 15px;
4540
+ padding-left: 15px;
4541
+ overflow-x: visible;
4542
+ border-top: 1px solid transparent;
4543
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
4544
+ -webkit-overflow-scrolling: touch;
4545
+ }
4546
+
4547
+ .factory-bootstrap-330 .navbar-collapse:before,
4548
+ .factory-bootstrap-330 .navbar-collapse:after {
4549
+ display: table;
4550
+ content: " ";
4551
+ }
4552
+
4553
+ .factory-bootstrap-330 .navbar-collapse:after {
4554
+ clear: both;
4555
+ }
4556
+
4557
+ .factory-bootstrap-330 .navbar-collapse:before,
4558
+ .factory-bootstrap-330 .navbar-collapse:after {
4559
+ display: table;
4560
+ content: " ";
4561
+ }
4562
+
4563
+ .factory-bootstrap-330 .navbar-collapse:after {
4564
+ clear: both;
4565
+ }
4566
+
4567
+ .factory-bootstrap-330 .navbar-collapse.in {
4568
+ overflow-y: auto;
4569
+ }
4570
+
4571
+ @media (min-width: 768px) {
4572
+ .navbar-collapse {
4573
+ width: auto;
4574
+ border-top: 0;
4575
+ box-shadow: none;
4576
+ }
4577
+
4578
+ .navbar-collapse.collapse {
4579
+ display: block !important;
4580
+ height: auto !important;
4581
+ padding-bottom: 0;
4582
+ overflow: visible !important;
4583
+ }
4584
+
4585
+ .navbar-collapse.in {
4586
+ overflow-y: visible;
4587
+ }
4588
+
4589
+ .navbar-fixed-top .navbar-collapse,
4590
+ .navbar-static-top .navbar-collapse,
4591
+ .navbar-fixed-bottom .navbar-collapse {
4592
+ padding-right: 0;
4593
+ padding-left: 0;
4594
+ }
4595
+ }
4596
+
4597
+ .factory-bootstrap-330 .container > .navbar-header,
4598
+ .factory-bootstrap-330 .container > .navbar-collapse {
4599
+ margin-right: -15px;
4600
+ margin-left: -15px;
4601
+ }
4602
+
4603
+ @media (min-width: 768px) {
4604
+ .container > .navbar-header,
4605
+ .container > .navbar-collapse {
4606
+ margin-right: 0;
4607
+ margin-left: 0;
4608
+ }
4609
+ }
4610
+
4611
+ .factory-bootstrap-330 .navbar-static-top {
4612
+ z-index: 1000;
4613
+ border-width: 0 0 1px;
4614
+ }
4615
+
4616
+ @media (min-width: 768px) {
4617
+ .navbar-static-top {
4618
+ border-radius: 0;
4619
+ }
4620
+ }
4621
+
4622
+ .factory-bootstrap-330 .navbar-fixed-top,
4623
+ .factory-bootstrap-330 .navbar-fixed-bottom {
4624
+ position: fixed;
4625
+ right: 0;
4626
+ left: 0;
4627
+ z-index: 1030;
4628
+ }
4629
+
4630
+ @media (min-width: 768px) {
4631
+ .navbar-fixed-top,
4632
+ .navbar-fixed-bottom {
4633
+ border-radius: 0;
4634
+ }
4635
+ }
4636
+
4637
+ .factory-bootstrap-330 .navbar-fixed-top {
4638
+ top: 0;
4639
+ border-width: 0 0 1px;
4640
+ }
4641
+
4642
+ .factory-bootstrap-330 .navbar-fixed-bottom {
4643
+ bottom: 0;
4644
+ margin-bottom: 0;
4645
+ border-width: 1px 0 0;
4646
+ }
4647
+
4648
+ .factory-bootstrap-330 .navbar-brand {
4649
+ float: left;
4650
+ padding: 15px 15px;
4651
+ font-size: 18px;
4652
+ line-height: 20px;
4653
+ }
4654
+
4655
+ .factory-bootstrap-330 .navbar-brand:hover,
4656
+ .factory-bootstrap-330 .navbar-brand:focus {
4657
+ text-decoration: none;
4658
+ }
4659
+
4660
+ @media (min-width: 768px) {
4661
+ .navbar > .container .navbar-brand {
4662
+ margin-left: -15px;
4663
+ }
4664
+ }
4665
+
4666
+ .factory-bootstrap-330 .navbar-toggle {
4667
+ position: relative;
4668
+ float: right;
4669
+ padding: 9px 10px;
4670
+ margin-top: 8px;
4671
+ margin-right: 15px;
4672
+ margin-bottom: 8px;
4673
+ background-color: transparent;
4674
+ background-image: none;
4675
+ border: 1px solid transparent;
4676
+ border-radius: 4px;
4677
+ }
4678
+
4679
+ .factory-bootstrap-330 .navbar-toggle .icon-bar {
4680
+ display: block;
4681
+ width: 22px;
4682
+ height: 2px;
4683
+ border-radius: 1px;
4684
+ }
4685
+
4686
+ .factory-bootstrap-330 .navbar-toggle .icon-bar + .icon-bar {
4687
+ margin-top: 4px;
4688
+ }
4689
+
4690
+ @media (min-width: 768px) {
4691
+ .navbar-toggle {
4692
+ display: none;
4693
+ }
4694
+ }
4695
+
4696
+ .factory-bootstrap-330 .navbar-nav {
4697
+ margin: 7.5px -15px;
4698
+ }
4699
+
4700
+ .factory-bootstrap-330 .navbar-nav > li > a {
4701
+ padding-top: 10px;
4702
+ padding-bottom: 10px;
4703
+ line-height: 20px;
4704
+ }
4705
+
4706
+ @media (max-width: 767px) {
4707
+ .navbar-nav .open .dropdown-menu {
4708
+ position: static;
4709
+ float: none;
4710
+ width: auto;
4711
+ margin-top: 0;
4712
+ background-color: transparent;
4713
+ border: 0;
4714
+ box-shadow: none;
4715
+ }
4716
+
4717
+ .navbar-nav .open .dropdown-menu > li > a,
4718
+ .navbar-nav .open .dropdown-menu .dropdown-header {
4719
+ padding: 5px 15px 5px 25px;
4720
+ }
4721
+
4722
+ .navbar-nav .open .dropdown-menu > li > a {
4723
+ line-height: 20px;
4724
+ }
4725
+
4726
+ .navbar-nav .open .dropdown-menu > li > a:hover,
4727
+ .navbar-nav .open .dropdown-menu > li > a:focus {
4728
+ background-image: none;
4729
+ }
4730
+ }
4731
+
4732
+ @media (min-width: 768px) {
4733
+ .navbar-nav {
4734
+ float: left;
4735
+ margin: 0;
4736
+ }
4737
+
4738
+ .navbar-nav > li {
4739
+ float: left;
4740
+ }
4741
+
4742
+ .navbar-nav > li > a {
4743
+ padding-top: 15px;
4744
+ padding-bottom: 15px;
4745
+ }
4746
+
4747
+ .navbar-nav.navbar-right:last-child {
4748
+ margin-right: -15px;
4749
+ }
4750
+ }
4751
+
4752
+ @media (min-width: 768px) {
4753
+ .navbar-left {
4754
+ float: left !important;
4755
+ }
4756
+
4757
+ .navbar-right {
4758
+ float: right !important;
4759
+ }
4760
+ }
4761
+
4762
+ .factory-bootstrap-330 .navbar-form {
4763
+ padding: 10px 15px;
4764
+ margin-top: 8px;
4765
+ margin-right: -15px;
4766
+ margin-bottom: 8px;
4767
+ margin-left: -15px;
4768
+ border-top: 1px solid transparent;
4769
+ border-bottom: 1px solid transparent;
4770
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
4771
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
4772
+ }
4773
+
4774
+ @media (min-width: 768px) {
4775
+ .navbar-form .form-group {
4776
+ display: inline-block;
4777
+ margin-bottom: 0;
4778
+ vertical-align: middle;
4779
+ }
4780
+
4781
+ .navbar-form .form-control {
4782
+ display: inline-block;
4783
+ }
4784
+
4785
+ .navbar-form select.form-control {
4786
+ width: auto;
4787
+ }
4788
+
4789
+ .navbar-form .radio,
4790
+ .navbar-form .checkbox {
4791
+ display: inline-block;
4792
+ padding-left: 0;
4793
+ margin-top: 0;
4794
+ margin-bottom: 0;
4795
+ }
4796
+
4797
+ .navbar-form .radio input[type="radio"],
4798
+ .navbar-form .checkbox input[type="checkbox"] {
4799
+ float: none;
4800
+ margin-left: 0;
4801
+ }
4802
+ }
4803
+
4804
+ @media (max-width: 767px) {
4805
+ .navbar-form .form-group {
4806
+ margin-bottom: 5px;
4807
+ }
4808
+ }
4809
+
4810
+ @media (min-width: 768px) {
4811
+ .navbar-form {
4812
+ width: auto;
4813
+ padding-top: 0;
4814
+ padding-bottom: 0;
4815
+ margin-right: 0;
4816
+ margin-left: 0;
4817
+ border: 0;
4818
+ -webkit-box-shadow: none;
4819
+ box-shadow: none;
4820
+ }
4821
+
4822
+ .navbar-form.navbar-right:last-child {
4823
+ margin-right: -15px;
4824
+ }
4825
+ }
4826
+
4827
+ .factory-bootstrap-330 .navbar-nav > li > .dropdown-menu {
4828
+ margin-top: 0;
4829
+ border-top-right-radius: 0;
4830
+ border-top-left-radius: 0;
4831
+ }
4832
+
4833
+ .factory-bootstrap-330 .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
4834
+ border-bottom-right-radius: 0;
4835
+ border-bottom-left-radius: 0;
4836
+ }
4837
+
4838
+ .factory-bootstrap-330 .navbar-nav.pull-right > li > .dropdown-menu,
4839
+ .factory-bootstrap-330 .navbar-nav > li > .dropdown-menu.pull-right {
4840
+ right: 0;
4841
+ left: auto;
4842
+ }
4843
+
4844
+ .factory-bootstrap-330 .navbar-btn {
4845
+ margin-top: 8px;
4846
+ margin-bottom: 8px;
4847
+ }
4848
+
4849
+ .factory-bootstrap-330 .navbar-btn.btn-sm {
4850
+ margin-top: 10px;
4851
+ margin-bottom: 10px;
4852
+ }
4853
+
4854
+ .factory-bootstrap-330 .navbar-btn.btn-xs {
4855
+ margin-top: 14px;
4856
+ margin-bottom: 14px;
4857
+ }
4858
+
4859
+ .factory-bootstrap-330 .navbar-text {
4860
+ margin-top: 15px;
4861
+ margin-bottom: 15px;
4862
+ }
4863
+
4864
+ @media (min-width: 768px) {
4865
+ .navbar-text {
4866
+ float: left;
4867
+ margin-right: 15px;
4868
+ margin-left: 15px;
4869
+ }
4870
+
4871
+ .navbar-text.navbar-right:last-child {
4872
+ margin-right: 0;
4873
+ }
4874
+ }
4875
+
4876
+ .factory-bootstrap-330 .navbar-default {
4877
+ background-color: #f8f8f8;
4878
+ border-color: #e7e7e7;
4879
+ }
4880
+
4881
+ .factory-bootstrap-330 .navbar-default .navbar-brand {
4882
+ color: #777777;
4883
+ }
4884
+
4885
+ .factory-bootstrap-330 .navbar-default .navbar-brand:hover,
4886
+ .factory-bootstrap-330 .navbar-default .navbar-brand:focus {
4887
+ color: #5e5e5e;
4888
+ background-color: transparent;
4889
+ }
4890
+
4891
+ .factory-bootstrap-330 .navbar-default .navbar-text {
4892
+ color: #777777;
4893
+ }
4894
+
4895
+ .factory-bootstrap-330 .navbar-default .navbar-nav > li > a {
4896
+ color: #777777;
4897
+ }
4898
+
4899
+ .factory-bootstrap-330 .navbar-default .navbar-nav > li > a:hover,
4900
+ .factory-bootstrap-330 .navbar-default .navbar-nav > li > a:focus {
4901
+ color: #333333;
4902
+ background-color: transparent;
4903
+ }
4904
+
4905
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .active > a,
4906
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .active > a:hover,
4907
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .active > a:focus {
4908
+ color: #555555;
4909
+ background-color: #e7e7e7;
4910
+ }
4911
+
4912
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .disabled > a,
4913
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .disabled > a:hover,
4914
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .disabled > a:focus {
4915
+ color: #cccccc;
4916
+ background-color: transparent;
4917
+ }
4918
+
4919
+ .factory-bootstrap-330 .navbar-default .navbar-toggle {
4920
+ border-color: #dddddd;
4921
+ }
4922
+
4923
+ .factory-bootstrap-330 .navbar-default .navbar-toggle:hover,
4924
+ .factory-bootstrap-330 .navbar-default .navbar-toggle:focus {
4925
+ background-color: #dddddd;
4926
+ }
4927
+
4928
+ .factory-bootstrap-330 .navbar-default .navbar-toggle .icon-bar {
4929
+ background-color: #cccccc;
4930
+ }
4931
+
4932
+ .factory-bootstrap-330 .navbar-default .navbar-collapse,
4933
+ .factory-bootstrap-330 .navbar-default .navbar-form {
4934
+ border-color: #e7e7e7;
4935
+ }
4936
+
4937
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .open > a,
4938
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .open > a:hover,
4939
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .open > a:focus {
4940
+ color: #555555;
4941
+ background-color: #e7e7e7;
4942
+ }
4943
+
4944
+ @media (max-width: 767px) {
4945
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
4946
+ color: #777777;
4947
+ }
4948
+
4949
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
4950
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
4951
+ color: #333333;
4952
+ background-color: transparent;
4953
+ }
4954
+
4955
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
4956
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
4957
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
4958
+ color: #555555;
4959
+ background-color: #e7e7e7;
4960
+ }
4961
+
4962
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
4963
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
4964
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
4965
+ color: #cccccc;
4966
+ background-color: transparent;
4967
+ }
4968
+ }
4969
+
4970
+ .factory-bootstrap-330 .navbar-default .navbar-link {
4971
+ color: #777777;
4972
+ }
4973
+
4974
+ .factory-bootstrap-330 .navbar-default .navbar-link:hover {
4975
+ color: #333333;
4976
+ }
4977
+
4978
+ .factory-bootstrap-330 .navbar-inverse {
4979
+ background-color: #222222;
4980
+ border-color: #080808;
4981
+ }
4982
+
4983
+ .factory-bootstrap-330 .navbar-inverse .navbar-brand {
4984
+ color: #999999;
4985
+ }
4986
+
4987
+ .factory-bootstrap-330 .navbar-inverse .navbar-brand:hover,
4988
+ .factory-bootstrap-330 .navbar-inverse .navbar-brand:focus {
4989
+ color: #ffffff;
4990
+ background-color: transparent;
4991
+ }
4992
+
4993
+ .factory-bootstrap-330 .navbar-inverse .navbar-text {
4994
+ color: #999999;
4995
+ }
4996
+
4997
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > li > a {
4998
+ color: #999999;
4999
+ }
5000
+
5001
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > li > a:hover,
5002
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > li > a:focus {
5003
+ color: #ffffff;
5004
+ background-color: transparent;
5005
+ }
5006
+
5007
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .active > a,
5008
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .active > a:hover,
5009
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .active > a:focus {
5010
+ color: #ffffff;
5011
+ background-color: #080808;
5012
+ }
5013
+
5014
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .disabled > a,
5015
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .disabled > a:hover,
5016
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .disabled > a:focus {
5017
+ color: #444444;
5018
+ background-color: transparent;
5019
+ }
5020
+
5021
+ .factory-bootstrap-330 .navbar-inverse .navbar-toggle {
5022
+ border-color: #333333;
5023
+ }
5024
+
5025
+ .factory-bootstrap-330 .navbar-inverse .navbar-toggle:hover,
5026
+ .factory-bootstrap-330 .navbar-inverse .navbar-toggle:focus {
5027
+ background-color: #333333;
5028
+ }
5029
+
5030
+ .factory-bootstrap-330 .navbar-inverse .navbar-toggle .icon-bar {
5031
+ background-color: #ffffff;
5032
+ }
5033
+
5034
+ .factory-bootstrap-330 .navbar-inverse .navbar-collapse,
5035
+ .factory-bootstrap-330 .navbar-inverse .navbar-form {
5036
+ border-color: #101010;
5037
+ }
5038
+
5039
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .open > a,
5040
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .open > a:hover,
5041
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .open > a:focus {
5042
+ color: #ffffff;
5043
+ background-color: #080808;
5044
+ }
5045
+
5046
+ @media (max-width: 767px) {
5047
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
5048
+ border-color: #080808;
5049
+ }
5050
+
5051
+ .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
5052
+ background-color: #080808;
5053
+ }
5054
+
5055
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
5056
+ color: #999999;
5057
+ }
5058
+
5059
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
5060
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
5061
+ color: #ffffff;
5062
+ background-color: transparent;
5063
+ }
5064
+
5065
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
5066
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
5067
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
5068
+ color: #ffffff;
5069
+ background-color: #080808;
5070
+ }
5071
+
5072
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
5073
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
5074
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
5075
+ color: #444444;
5076
+ background-color: transparent;
5077
+ }
5078
+ }
5079
+
5080
+ .factory-bootstrap-330 .navbar-inverse .navbar-link {
5081
+ color: #999999;
5082
+ }
5083
+
5084
+ .factory-bootstrap-330 .navbar-inverse .navbar-link:hover {
5085
+ color: #ffffff;
5086
+ }
5087
+
5088
+ .factory-bootstrap-330 .breadcrumb {
5089
+ padding: 8px 15px;
5090
+ margin-bottom: 20px;
5091
+ list-style: none;
5092
+ background-color: #f5f5f5;
5093
+ border-radius: 4px;
5094
+ }
5095
+
5096
+ .factory-bootstrap-330 .breadcrumb > li {
5097
+ display: inline-block;
5098
+ }
5099
+
5100
+ .factory-bootstrap-330 .breadcrumb > li + li:before {
5101
+ padding: 0 5px;
5102
+ color: #cccccc;
5103
+ content: "/\00a0";
5104
+ }
5105
+
5106
+ .factory-bootstrap-330 .breadcrumb > .active {
5107
+ color: #999999;
5108
+ }
5109
+
5110
+ .factory-bootstrap-330 .pagination {
5111
+ display: inline-block;
5112
+ padding-left: 0;
5113
+ margin: 20px 0;
5114
+ border-radius: 4px;
5115
+ }
5116
+
5117
+ .factory-bootstrap-330 .pagination > li {
5118
+ display: inline;
5119
+ }
5120
+
5121
+ .factory-bootstrap-330 .pagination > li > a,
5122
+ .factory-bootstrap-330 .pagination > li > span {
5123
+ position: relative;
5124
+ float: left;
5125
+ padding: 6px 12px;
5126
+ margin-left: -1px;
5127
+ line-height: 1.428571429;
5128
+ text-decoration: none;
5129
+ background-color: #ffffff;
5130
+ border: 1px solid #dddddd;
5131
+ }
5132
+
5133
+ .factory-bootstrap-330 .pagination > li:first-child > a,
5134
+ .factory-bootstrap-330 .pagination > li:first-child > span {
5135
+ margin-left: 0;
5136
+ border-bottom-left-radius: 4px;
5137
+ border-top-left-radius: 4px;
5138
+ }
5139
+
5140
+ .factory-bootstrap-330 .pagination > li:last-child > a,
5141
+ .factory-bootstrap-330 .pagination > li:last-child > span {
5142
+ border-top-right-radius: 4px;
5143
+ border-bottom-right-radius: 4px;
5144
+ }
5145
+
5146
+ .factory-bootstrap-330 .pagination > li > a:hover,
5147
+ .factory-bootstrap-330 .pagination > li > span:hover,
5148
+ .factory-bootstrap-330 .pagination > li > a:focus,
5149
+ .factory-bootstrap-330 .pagination > li > span:focus {
5150
+ background-color: #eeeeee;
5151
+ }
5152
+
5153
+ .factory-bootstrap-330 .pagination > .active > a,
5154
+ .factory-bootstrap-330 .pagination > .active > span,
5155
+ .factory-bootstrap-330 .pagination > .active > a:hover,
5156
+ .factory-bootstrap-330 .pagination > .active > span:hover,
5157
+ .factory-bootstrap-330 .pagination > .active > a:focus,
5158
+ .factory-bootstrap-330 .pagination > .active > span:focus {
5159
+ z-index: 2;
5160
+ color: #ffffff;
5161
+ cursor: default;
5162
+ background-color: #1e8cbe;
5163
+ border-color: #0074a2;
5164
+ }
5165
+
5166
+ .factory-bootstrap-330 .pagination > .disabled > span,
5167
+ .factory-bootstrap-330 .pagination > .disabled > span:hover,
5168
+ .factory-bootstrap-330 .pagination > .disabled > span:focus,
5169
+ .factory-bootstrap-330 .pagination > .disabled > a,
5170
+ .factory-bootstrap-330 .pagination > .disabled > a:hover,
5171
+ .factory-bootstrap-330 .pagination > .disabled > a:focus {
5172
+ color: #999999;
5173
+ cursor: not-allowed;
5174
+ background-color: #ffffff;
5175
+ border-color: #dddddd;
5176
+ }
5177
+
5178
+ .factory-bootstrap-330 .pagination-lg > li > a,
5179
+ .factory-bootstrap-330 .pagination-lg > li > span {
5180
+ padding: 10px 16px;
5181
+ font-size: 18px;
5182
+ }
5183
+
5184
+ .factory-bootstrap-330 .pagination-lg > li:first-child > a,
5185
+ .factory-bootstrap-330 .pagination-lg > li:first-child > span {
5186
+ border-bottom-left-radius: 6px;
5187
+ border-top-left-radius: 6px;
5188
+ }
5189
+
5190
+ .factory-bootstrap-330 .pagination-lg > li:last-child > a,
5191
+ .factory-bootstrap-330 .pagination-lg > li:last-child > span {
5192
+ border-top-right-radius: 6px;
5193
+ border-bottom-right-radius: 6px;
5194
+ }
5195
+
5196
+ .factory-bootstrap-330 .pagination-sm > li > a,
5197
+ .factory-bootstrap-330 .pagination-sm > li > span {
5198
+ padding: 5px 10px;
5199
+ font-size: 12px;
5200
+ }
5201
+
5202
+ .factory-bootstrap-330 .pagination-sm > li:first-child > a,
5203
+ .factory-bootstrap-330 .pagination-sm > li:first-child > span {
5204
+ border-bottom-left-radius: 3px;
5205
+ border-top-left-radius: 3px;
5206
+ }
5207
+
5208
+ .factory-bootstrap-330 .pagination-sm > li:last-child > a,
5209
+ .factory-bootstrap-330 .pagination-sm > li:last-child > span {
5210
+ border-top-right-radius: 3px;
5211
+ border-bottom-right-radius: 3px;
5212
+ }
5213
+
5214
+ .factory-bootstrap-330 .pager {
5215
+ padding-left: 0;
5216
+ margin: 20px 0;
5217
+ text-align: center;
5218
+ list-style: none;
5219
+ }
5220
+
5221
+ .factory-bootstrap-330 .pager:before,
5222
+ .factory-bootstrap-330 .pager:after {
5223
+ display: table;
5224
+ content: " ";
5225
+ }
5226
+
5227
+ .factory-bootstrap-330 .pager:after {
5228
+ clear: both;
5229
+ }
5230
+
5231
+ .factory-bootstrap-330 .pager:before,
5232
+ .factory-bootstrap-330 .pager:after {
5233
+ display: table;
5234
+ content: " ";
5235
+ }
5236
+
5237
+ .factory-bootstrap-330 .pager:after {
5238
+ clear: both;
5239
+ }
5240
+
5241
+ .factory-bootstrap-330 .pager li {
5242
+ display: inline;
5243
+ }
5244
+
5245
+ .factory-bootstrap-330 .pager li > a,
5246
+ .factory-bootstrap-330 .pager li > span {
5247
+ display: inline-block;
5248
+ padding: 5px 14px;
5249
+ background-color: #ffffff;
5250
+ border: 1px solid #dddddd;
5251
+ border-radius: 15px;
5252
+ }
5253
+
5254
+ .factory-bootstrap-330 .pager li > a:hover,
5255
+ .factory-bootstrap-330 .pager li > a:focus {
5256
+ text-decoration: none;
5257
+ background-color: #eeeeee;
5258
+ }
5259
+
5260
+ .factory-bootstrap-330 .pager .next > a,
5261
+ .factory-bootstrap-330 .pager .next > span {
5262
+ float: right;
5263
+ }
5264
+
5265
+ .factory-bootstrap-330 .pager .previous > a,
5266
+ .factory-bootstrap-330 .pager .previous > span {
5267
+ float: left;
5268
+ }
5269
+
5270
+ .factory-bootstrap-330 .pager .disabled > a,
5271
+ .factory-bootstrap-330 .pager .disabled > a:hover,
5272
+ .factory-bootstrap-330 .pager .disabled > a:focus,
5273
+ .factory-bootstrap-330 .pager .disabled > span {
5274
+ color: #999999;
5275
+ cursor: not-allowed;
5276
+ background-color: #ffffff;
5277
+ }
5278
+
5279
+ .factory-bootstrap-330 .label {
5280
+ display: inline;
5281
+ padding: .2em .6em .3em;
5282
+ font-size: 75%;
5283
+ font-weight: bold;
5284
+ line-height: 1;
5285
+ color: #ffffff;
5286
+ text-align: center;
5287
+ white-space: nowrap;
5288
+ vertical-align: baseline;
5289
+ border-radius: .25em;
5290
+ }
5291
+
5292
+ .factory-bootstrap-330 .label[href]:hover,
5293
+ .factory-bootstrap-330 .label[href]:focus {
5294
+ color: #ffffff;
5295
+ text-decoration: none;
5296
+ cursor: pointer;
5297
+ }
5298
+
5299
+ .factory-bootstrap-330 .label:empty {
5300
+ display: none;
5301
+ }
5302
+
5303
+ .factory-bootstrap-330 .btn .label {
5304
+ position: relative;
5305
+ top: -1px;
5306
+ }
5307
+
5308
+ .factory-bootstrap-330 .label-default {
5309
+ background-color: #999999;
5310
+ }
5311
+
5312
+ .factory-bootstrap-330 .label-default[href]:hover,
5313
+ .factory-bootstrap-330 .label-default[href]:focus {
5314
+ background-color: #808080;
5315
+ }
5316
+
5317
+ .factory-bootstrap-330 .label-primary {
5318
+ background-color: #428bca;
5319
+ }
5320
+
5321
+ .factory-bootstrap-330 .label-primary[href]:hover,
5322
+ .factory-bootstrap-330 .label-primary[href]:focus {
5323
+ background-color: #3071a9;
5324
+ }
5325
+
5326
+ .factory-bootstrap-330 .label-success {
5327
+ background-color: #5cb85c;
5328
+ }
5329
+
5330
+ .factory-bootstrap-330 .label-success[href]:hover,
5331
+ .factory-bootstrap-330 .label-success[href]:focus {
5332
+ background-color: #449d44;
5333
+ }
5334
+
5335
+ .factory-bootstrap-330 .label-info {
5336
+ background-color: #5bc0de;
5337
+ }
5338
+
5339
+ .factory-bootstrap-330 .label-info[href]:hover,
5340
+ .factory-bootstrap-330 .label-info[href]:focus {
5341
+ background-color: #31b0d5;
5342
+ }
5343
+
5344
+ .factory-bootstrap-330 .label-warning {
5345
+ background-color: #f0ad4e;
5346
+ }
5347
+
5348
+ .factory-bootstrap-330 .label-warning[href]:hover,
5349
+ .factory-bootstrap-330 .label-warning[href]:focus {
5350
+ background-color: #ec971f;
5351
+ }
5352
+
5353
+ .factory-bootstrap-330 .label-danger {
5354
+ background-color: #d9534f;
5355
+ }
5356
+
5357
+ .factory-bootstrap-330 .label-danger[href]:hover,
5358
+ .factory-bootstrap-330 .label-danger[href]:focus {
5359
+ background-color: #c9302c;
5360
+ }
5361
+
5362
+ .factory-bootstrap-330 .badge {
5363
+ display: inline-block;
5364
+ min-width: 10px;
5365
+ padding: 3px 7px;
5366
+ font-size: 12px;
5367
+ font-weight: bold;
5368
+ line-height: 1;
5369
+ color: #ffffff;
5370
+ text-align: center;
5371
+ white-space: nowrap;
5372
+ vertical-align: baseline;
5373
+ background-color: #999999;
5374
+ border-radius: 10px;
5375
+ }
5376
+
5377
+ .factory-bootstrap-330 .badge:empty {
5378
+ display: none;
5379
+ }
5380
+
5381
+ .factory-bootstrap-330 .btn .badge {
5382
+ position: relative;
5383
+ top: -1px;
5384
+ }
5385
+
5386
+ .factory-bootstrap-330 a.badge:hover,
5387
+ .factory-bootstrap-330 a.badge:focus {
5388
+ color: #ffffff;
5389
+ text-decoration: none;
5390
+ cursor: pointer;
5391
+ }
5392
+
5393
+ .factory-bootstrap-330 a.list-group-item.active > .badge,
5394
+ .factory-bootstrap-330 .nav-pills > .active > a > .badge {
5395
+ color: #428bca;
5396
+ background-color: #ffffff;
5397
+ }
5398
+
5399
+ .factory-bootstrap-330 .nav-pills > li > a > .badge {
5400
+ margin-left: 3px;
5401
+ }
5402
+
5403
+ .factory-bootstrap-330 .jumbotron {
5404
+ padding: 30px;
5405
+ margin-bottom: 30px;
5406
+ font-size: 21px;
5407
+ font-weight: 200;
5408
+ line-height: 2.1428571435;
5409
+ color: inherit;
5410
+ background-color: #eeeeee;
5411
+ }
5412
+
5413
+ .factory-bootstrap-330 .jumbotron h1,
5414
+ .factory-bootstrap-330 .jumbotron .h1 {
5415
+ line-height: 1;
5416
+ color: inherit;
5417
+ }
5418
+
5419
+ .factory-bootstrap-330 .jumbotron p {
5420
+ line-height: 1.4;
5421
+ }
5422
+
5423
+ .factory-bootstrap-330 .container .jumbotron {
5424
+ border-radius: 6px;
5425
+ }
5426
+
5427
+ .factory-bootstrap-330 .jumbotron .container {
5428
+ max-width: 100%;
5429
+ }
5430
+
5431
+ @media screen and (min-width: 768px) {
5432
+ .jumbotron {
5433
+ padding-top: 48px;
5434
+ padding-bottom: 48px;
5435
+ }
5436
+
5437
+ .container .jumbotron {
5438
+ padding-right: 60px;
5439
+ padding-left: 60px;
5440
+ }
5441
+
5442
+ .jumbotron h1,
5443
+ .jumbotron .h1 {
5444
+ font-size: 63px;
5445
+ }
5446
+ }
5447
+
5448
+ .factory-bootstrap-330 .thumbnail {
5449
+ display: block;
5450
+ padding: 4px;
5451
+ margin-bottom: 20px;
5452
+ line-height: 1.428571429;
5453
+ background-color: #ffffff;
5454
+ border: 1px solid #dddddd;
5455
+ border-radius: 4px;
5456
+ -webkit-transition: all 0.2s ease-in-out;
5457
+ transition: all 0.2s ease-in-out;
5458
+ }
5459
+
5460
+ .factory-bootstrap-330 .thumbnail > img,
5461
+ .factory-bootstrap-330 .thumbnail a > img {
5462
+ display: block;
5463
+ height: auto;
5464
+ max-width: 100%;
5465
+ margin-right: auto;
5466
+ margin-left: auto;
5467
+ }
5468
+
5469
+ .factory-bootstrap-330 a.thumbnail:hover,
5470
+ .factory-bootstrap-330 a.thumbnail:focus,
5471
+ .factory-bootstrap-330 a.thumbnail.active {
5472
+ border-color: #428bca;
5473
+ }
5474
+
5475
+ .factory-bootstrap-330 .thumbnail .caption {
5476
+ padding: 9px;
5477
+ color: #333333;
5478
+ }
5479
+
5480
+ .factory-bootstrap-330 .alert {
5481
+ padding: 15px;
5482
+ margin-bottom: 20px;
5483
+ border: 1px solid transparent;
5484
+ border-radius: 4px;
5485
+ }
5486
+
5487
+ .factory-bootstrap-330 .alert h4 {
5488
+ margin-top: 0;
5489
+ color: inherit;
5490
+ }
5491
+
5492
+ .factory-bootstrap-330 .alert .alert-link {
5493
+ font-weight: bold;
5494
+ }
5495
+
5496
+ .factory-bootstrap-330 .alert > p,
5497
+ .factory-bootstrap-330 .alert > ul {
5498
+ margin-bottom: 0;
5499
+ }
5500
+
5501
+ .factory-bootstrap-330 .alert > p + p {
5502
+ margin-top: 5px;
5503
+ }
5504
+
5505
+ .factory-bootstrap-330 .alert-dismissable {
5506
+ padding-right: 35px;
5507
+ }
5508
+
5509
+ .factory-bootstrap-330 .alert-dismissable .close {
5510
+ position: relative;
5511
+ top: -2px;
5512
+ right: -21px;
5513
+ color: inherit;
5514
+ }
5515
+
5516
+ .factory-bootstrap-330 .alert-info {
5517
+ color: #31708f;
5518
+ background-color: #d9edf7;
5519
+ border-color: #bce8f1;
5520
+ }
5521
+
5522
+ .factory-bootstrap-330 .alert-info hr {
5523
+ border-top-color: #a6e1ec;
5524
+ }
5525
+
5526
+ .factory-bootstrap-330 .alert-info .alert-link {
5527
+ color: #245269;
5528
+ }
5529
+
5530
+ @-webkit-keyframes progress-bar-stripes {
5531
+ from {
5532
+ background-position: 40px 0;
5533
+ }
5534
+ to {
5535
+ background-position: 0 0;
5536
+ }
5537
+ }
5538
+
5539
+ @keyframes progress-bar-stripes {
5540
+ from {
5541
+ background-position: 40px 0;
5542
+ }
5543
+ to {
5544
+ background-position: 0 0;
5545
+ }
5546
+ }
5547
+
5548
+ .factory-bootstrap-330 .progress {
5549
+ height: 20px;
5550
+ margin-bottom: 20px;
5551
+ overflow: hidden;
5552
+ background-color: #f5f5f5;
5553
+ border-radius: 4px;
5554
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
5555
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
5556
+ }
5557
+
5558
+ .factory-bootstrap-330 .progress-bar {
5559
+ float: left;
5560
+ width: 0;
5561
+ height: 100%;
5562
+ font-size: 12px;
5563
+ line-height: 20px;
5564
+ color: #ffffff;
5565
+ text-align: center;
5566
+ background-color: #2ea2cc;
5567
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
5568
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
5569
+ -webkit-transition: width 0.6s ease;
5570
+ transition: width 0.6s ease;
5571
+ }
5572
+
5573
+ .factory-bootstrap-330 .progress-striped .progress-bar {
5574
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5575
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5576
+ background-size: 40px 40px;
5577
+ }
5578
+
5579
+ .factory-bootstrap-330 .progress.active .progress-bar {
5580
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
5581
+ animation: progress-bar-stripes 2s linear infinite;
5582
+ }
5583
+
5584
+ .factory-bootstrap-330 .progress-bar-success {
5585
+ background-color: #5cb85c;
5586
+ }
5587
+
5588
+ .factory-bootstrap-330 .progress-striped .progress-bar-success {
5589
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5590
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5591
+ }
5592
+
5593
+ .factory-bootstrap-330 .progress-bar-info {
5594
+ background-color: #5bc0de;
5595
+ }
5596
+
5597
+ .factory-bootstrap-330 .progress-striped .progress-bar-info {
5598
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5599
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5600
+ }
5601
+
5602
+ .factory-bootstrap-330 .progress-bar-warning {
5603
+ background-color: #f0ad4e;
5604
+ }
5605
+
5606
+ .factory-bootstrap-330 .progress-striped .progress-bar-warning {
5607
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5608
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5609
+ }
5610
+
5611
+ .factory-bootstrap-330 .progress-bar-danger {
5612
+ background-color: #d9534f;
5613
+ }
5614
+
5615
+ .factory-bootstrap-330 .progress-striped .progress-bar-danger {
5616
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5617
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
5618
+ }
5619
+
5620
+ .factory-bootstrap-330 .media,
5621
+ .factory-bootstrap-330 .media-body {
5622
+ overflow: hidden;
5623
+ zoom: 1;
5624
+ }
5625
+
5626
+ .factory-bootstrap-330 .media,
5627
+ .factory-bootstrap-330 .media .media {
5628
+ margin-top: 15px;
5629
+ }
5630
+
5631
+ .factory-bootstrap-330 .media:first-child {
5632
+ margin-top: 0;
5633
+ }
5634
+
5635
+ .factory-bootstrap-330 .media-object {
5636
+ display: block;
5637
+ }
5638
+
5639
+ .factory-bootstrap-330 .media-heading {
5640
+ margin: 0 0 5px;
5641
+ }
5642
+
5643
+ .factory-bootstrap-330 .media > .pull-left {
5644
+ margin-right: 10px;
5645
+ }
5646
+
5647
+ .factory-bootstrap-330 .media > .pull-right {
5648
+ margin-left: 10px;
5649
+ }
5650
+
5651
+ .factory-bootstrap-330 .media-list {
5652
+ padding-left: 0;
5653
+ list-style: none;
5654
+ }
5655
+
5656
+ .factory-bootstrap-330 .list-group {
5657
+ padding-left: 0;
5658
+ margin-bottom: 20px;
5659
+ }
5660
+
5661
+ .factory-bootstrap-330 .list-group-item {
5662
+ position: relative;
5663
+ display: block;
5664
+ padding: 10px 15px;
5665
+ margin-bottom: -1px;
5666
+ background-color: #ffffff;
5667
+ border: 1px solid #dddddd;
5668
+ }
5669
+
5670
+ .factory-bootstrap-330 .list-group-item:first-child {
5671
+ border-top-right-radius: 4px;
5672
+ border-top-left-radius: 4px;
5673
+ }
5674
+
5675
+ .factory-bootstrap-330 .list-group-item:last-child {
5676
+ margin-bottom: 0;
5677
+ border-bottom-right-radius: 4px;
5678
+ border-bottom-left-radius: 4px;
5679
+ }
5680
+
5681
+ .factory-bootstrap-330 .list-group-item > .badge {
5682
+ float: right;
5683
+ }
5684
+
5685
+ .factory-bootstrap-330 .list-group-item > .badge + .badge {
5686
+ margin-right: 5px;
5687
+ }
5688
+
5689
+ .factory-bootstrap-330 a.list-group-item {
5690
+ color: #555555;
5691
+ }
5692
+
5693
+ .factory-bootstrap-330 a.list-group-item .list-group-item-heading {
5694
+ color: #333333;
5695
+ }
5696
+
5697
+ .factory-bootstrap-330 a.list-group-item:hover,
5698
+ .factory-bootstrap-330 a.list-group-item:focus {
5699
+ text-decoration: none;
5700
+ background-color: #f5f5f5;
5701
+ }
5702
+
5703
+ .factory-bootstrap-330 a.list-group-item.active,
5704
+ .factory-bootstrap-330 a.list-group-item.active:hover,
5705
+ .factory-bootstrap-330 a.list-group-item.active:focus {
5706
+ z-index: 2;
5707
+ color: #ffffff;
5708
+ background-color: #428bca;
5709
+ border-color: #428bca;
5710
+ }
5711
+
5712
+ .factory-bootstrap-330 a.list-group-item.active .list-group-item-heading,
5713
+ .factory-bootstrap-330 a.list-group-item.active:hover .list-group-item-heading,
5714
+ .factory-bootstrap-330 a.list-group-item.active:focus .list-group-item-heading {
5715
+ color: inherit;
5716
+ }
5717
+
5718
+ .factory-bootstrap-330 a.list-group-item.active .list-group-item-text,
5719
+ .factory-bootstrap-330 a.list-group-item.active:hover .list-group-item-text,
5720
+ .factory-bootstrap-330 a.list-group-item.active:focus .list-group-item-text {
5721
+ color: #e1edf7;
5722
+ }
5723
+
5724
+ .factory-bootstrap-330 .list-group-item-heading {
5725
+ margin-top: 0;
5726
+ margin-bottom: 5px;
5727
+ }
5728
+
5729
+ .factory-bootstrap-330 .list-group-item-text {
5730
+ margin-bottom: 0;
5731
+ line-height: 1.3;
5732
+ }
5733
+
5734
+ .factory-bootstrap-330 .panel {
5735
+ margin-bottom: 20px;
5736
+ background-color: #ffffff;
5737
+ border: 1px solid transparent;
5738
+ border-radius: 4px;
5739
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
5740
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
5741
+ }
5742
+
5743
+ .factory-bootstrap-330 .panel-body {
5744
+ padding: 15px;
5745
+ }
5746
+
5747
+ .factory-bootstrap-330 .panel-body:before,
5748
+ .factory-bootstrap-330 .panel-body:after {
5749
+ display: table;
5750
+ content: " ";
5751
+ }
5752
+
5753
+ .factory-bootstrap-330 .panel-body:after {
5754
+ clear: both;
5755
+ }
5756
+
5757
+ .factory-bootstrap-330 .panel-body:before,
5758
+ .factory-bootstrap-330 .panel-body:after {
5759
+ display: table;
5760
+ content: " ";
5761
+ }
5762
+
5763
+ .factory-bootstrap-330 .panel-body:after {
5764
+ clear: both;
5765
+ }
5766
+
5767
+ .factory-bootstrap-330 .panel > .list-group {
5768
+ margin-bottom: 0;
5769
+ }
5770
+
5771
+ .factory-bootstrap-330 .panel > .list-group .list-group-item {
5772
+ border-width: 1px 0;
5773
+ }
5774
+
5775
+ .factory-bootstrap-330 .panel > .list-group .list-group-item:first-child {
5776
+ border-top-right-radius: 0;
5777
+ border-top-left-radius: 0;
5778
+ }
5779
+
5780
+ .factory-bootstrap-330 .panel > .list-group .list-group-item:last-child {
5781
+ border-bottom: 0;
5782
+ }
5783
+
5784
+ .factory-bootstrap-330 .panel-heading + .list-group .list-group-item:first-child {
5785
+ border-top-width: 0;
5786
+ }
5787
+
5788
+ .factory-bootstrap-330 .panel > .table,
5789
+ .factory-bootstrap-330 .panel > .table-responsive > .table {
5790
+ margin-bottom: 0;
5791
+ }
5792
+
5793
+ .factory-bootstrap-330 .panel > .panel-body + .table,
5794
+ .factory-bootstrap-330 .panel > .panel-body + .table-responsive {
5795
+ border-top: 1px solid #dddddd;
5796
+ }
5797
+
5798
+ .factory-bootstrap-330 .panel > .table > tbody:first-child th,
5799
+ .factory-bootstrap-330 .panel > .table > tbody:first-child td {
5800
+ border-top: 0;
5801
+ }
5802
+
5803
+ .factory-bootstrap-330 .panel > .table-bordered,
5804
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered {
5805
+ border: 0;
5806
+ }
5807
+
5808
+ .factory-bootstrap-330 .panel > .table-bordered > thead > tr > th:first-child,
5809
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
5810
+ .factory-bootstrap-330 .panel > .table-bordered > tbody > tr > th:first-child,
5811
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
5812
+ .factory-bootstrap-330 .panel > .table-bordered > tfoot > tr > th:first-child,
5813
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
5814
+ .factory-bootstrap-330 .panel > .table-bordered > thead > tr > td:first-child,
5815
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
5816
+ .factory-bootstrap-330 .panel > .table-bordered > tbody > tr > td:first-child,
5817
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
5818
+ .factory-bootstrap-330 .panel > .table-bordered > tfoot > tr > td:first-child,
5819
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
5820
+ border-left: 0;
5821
+ }
5822
+
5823
+ .factory-bootstrap-330 .panel > .table-bordered > thead > tr > th:last-child,
5824
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
5825
+ .factory-bootstrap-330 .panel > .table-bordered > tbody > tr > th:last-child,
5826
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
5827
+ .factory-bootstrap-330 .panel > .table-bordered > tfoot > tr > th:last-child,
5828
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
5829
+ .factory-bootstrap-330 .panel > .table-bordered > thead > tr > td:last-child,
5830
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
5831
+ .factory-bootstrap-330 .panel > .table-bordered > tbody > tr > td:last-child,
5832
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
5833
+ .factory-bootstrap-330 .panel > .table-bordered > tfoot > tr > td:last-child,
5834
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
5835
+ border-right: 0;
5836
+ }
5837
+
5838
+ .factory-bootstrap-330 .panel > .table-bordered > thead > tr:last-child > th,
5839
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > thead > tr:last-child > th,
5840
+ .factory-bootstrap-330 .panel > .table-bordered > tbody > tr:last-child > th,
5841
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
5842
+ .factory-bootstrap-330 .panel > .table-bordered > tfoot > tr:last-child > th,
5843
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th,
5844
+ .factory-bootstrap-330 .panel > .table-bordered > thead > tr:last-child > td,
5845
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > thead > tr:last-child > td,
5846
+ .factory-bootstrap-330 .panel > .table-bordered > tbody > tr:last-child > td,
5847
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
5848
+ .factory-bootstrap-330 .panel > .table-bordered > tfoot > tr:last-child > td,
5849
+ .factory-bootstrap-330 .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td {
5850
+ border-bottom: 0;
5851
+ }
5852
+
5853
+ .factory-bootstrap-330 .panel > .table-responsive {
5854
+ margin-bottom: 0;
5855
+ border: 0;
5856
+ }
5857
+
5858
+ .factory-bootstrap-330 .panel-heading {
5859
+ padding: 10px 15px;
5860
+ border-bottom: 1px solid transparent;
5861
+ border-top-right-radius: 3px;
5862
+ border-top-left-radius: 3px;
5863
+ }
5864
+
5865
+ .factory-bootstrap-330 .panel-heading > .dropdown .dropdown-toggle {
5866
+ color: inherit;
5867
+ }
5868
+
5869
+ .factory-bootstrap-330 .panel-title {
5870
+ margin-top: 0;
5871
+ margin-bottom: 0;
5872
+ font-size: 16px;
5873
+ color: inherit;
5874
+ }
5875
+
5876
+ .factory-bootstrap-330 .panel-title > a {
5877
+ color: inherit;
5878
+ }
5879
+
5880
+ .factory-bootstrap-330 .panel-footer {
5881
+ padding: 10px 15px;
5882
+ background-color: #f5f5f5;
5883
+ border-top: 1px solid #dddddd;
5884
+ border-bottom-right-radius: 3px;
5885
+ border-bottom-left-radius: 3px;
5886
+ }
5887
+
5888
+ .factory-bootstrap-330 .panel-group .panel {
5889
+ margin-bottom: 0;
5890
+ overflow: hidden;
5891
+ border-radius: 4px;
5892
+ }
5893
+
5894
+ .factory-bootstrap-330 .panel-group .panel + .panel {
5895
+ margin-top: 5px;
5896
+ }
5897
+
5898
+ .factory-bootstrap-330 .panel-group .panel-heading {
5899
+ border-bottom: 0;
5900
+ }
5901
+
5902
+ .factory-bootstrap-330 .panel-group .panel-heading + .panel-collapse .panel-body {
5903
+ border-top: 1px solid #dddddd;
5904
+ }
5905
+
5906
+ .factory-bootstrap-330 .panel-group .panel-footer {
5907
+ border-top: 0;
5908
+ }
5909
+
5910
+ .factory-bootstrap-330 .panel-group .panel-footer + .panel-collapse .panel-body {
5911
+ border-bottom: 1px solid #dddddd;
5912
+ }
5913
+
5914
+ .factory-bootstrap-330 .panel-default {
5915
+ border-color: #dddddd;
5916
+ }
5917
+
5918
+ .factory-bootstrap-330 .panel-default > .panel-heading {
5919
+ color: #333333;
5920
+ background-color: #f5f5f5;
5921
+ border-color: #dddddd;
5922
+ }
5923
+
5924
+ .factory-bootstrap-330 .panel-default > .panel-heading + .panel-collapse .panel-body {
5925
+ border-top-color: #dddddd;
5926
+ }
5927
+
5928
+ .factory-bootstrap-330 .panel-default > .panel-footer + .panel-collapse .panel-body {
5929
+ border-bottom-color: #dddddd;
5930
+ }
5931
+
5932
+ .factory-bootstrap-330 .panel-primary {
5933
+ border-color: #428bca;
5934
+ }
5935
+
5936
+ .factory-bootstrap-330 .panel-primary > .panel-heading {
5937
+ color: #ffffff;
5938
+ background-color: #428bca;
5939
+ border-color: #428bca;
5940
+ }
5941
+
5942
+ .factory-bootstrap-330 .panel-primary > .panel-heading + .panel-collapse .panel-body {
5943
+ border-top-color: #428bca;
5944
+ }
5945
+
5946
+ .factory-bootstrap-330 .panel-primary > .panel-footer + .panel-collapse .panel-body {
5947
+ border-bottom-color: #428bca;
5948
+ }
5949
+
5950
+ .factory-bootstrap-330 .panel-success {
5951
+ border-color: #d6e9c6;
5952
+ }
5953
+
5954
+ .factory-bootstrap-330 .panel-success > .panel-heading {
5955
+ color: #3c763d;
5956
+ background-color: #dff0d8;
5957
+ border-color: #d6e9c6;
5958
+ }
5959
+
5960
+ .factory-bootstrap-330 .panel-success > .panel-heading + .panel-collapse .panel-body {
5961
+ border-top-color: #d6e9c6;
5962
+ }
5963
+
5964
+ .factory-bootstrap-330 .panel-success > .panel-footer + .panel-collapse .panel-body {
5965
+ border-bottom-color: #d6e9c6;
5966
+ }
5967
+
5968
+ .factory-bootstrap-330 .panel-warning {
5969
+ border-color: #faebcc;
5970
+ }
5971
+
5972
+ .factory-bootstrap-330 .panel-warning > .panel-heading {
5973
+ color: #8a6d3b;
5974
+ background-color: #fcf8e3;
5975
+ border-color: #faebcc;
5976
+ }
5977
+
5978
+ .factory-bootstrap-330 .panel-warning > .panel-heading + .panel-collapse .panel-body {
5979
+ border-top-color: #faebcc;
5980
+ }
5981
+
5982
+ .factory-bootstrap-330 .panel-warning > .panel-footer + .panel-collapse .panel-body {
5983
+ border-bottom-color: #faebcc;
5984
+ }
5985
+
5986
+ .factory-bootstrap-330 .panel-danger {
5987
+ border-color: #ebccd1;
5988
+ }
5989
+
5990
+ .factory-bootstrap-330 .panel-danger > .panel-heading {
5991
+ color: #a94442;
5992
+ background-color: #f2dede;
5993
+ border-color: #ebccd1;
5994
+ }
5995
+
5996
+ .factory-bootstrap-330 .panel-danger > .panel-heading + .panel-collapse .panel-body {
5997
+ border-top-color: #ebccd1;
5998
+ }
5999
+
6000
+ .factory-bootstrap-330 .panel-danger > .panel-footer + .panel-collapse .panel-body {
6001
+ border-bottom-color: #ebccd1;
6002
+ }
6003
+
6004
+ .factory-bootstrap-330 .panel-info {
6005
+ border-color: #bce8f1;
6006
+ }
6007
+
6008
+ .factory-bootstrap-330 .panel-info > .panel-heading {
6009
+ color: #31708f;
6010
+ background-color: #d9edf7;
6011
+ border-color: #bce8f1;
6012
+ }
6013
+
6014
+ .factory-bootstrap-330 .panel-info > .panel-heading + .panel-collapse .panel-body {
6015
+ border-top-color: #bce8f1;
6016
+ }
6017
+
6018
+ .factory-bootstrap-330 .panel-info > .panel-footer + .panel-collapse .panel-body {
6019
+ border-bottom-color: #bce8f1;
6020
+ }
6021
+
6022
+ .factory-bootstrap-330 .well {
6023
+ min-height: 20px;
6024
+ padding: 19px;
6025
+ margin-bottom: 20px;
6026
+ background-color: #f5f5f5;
6027
+ border: 1px solid #e3e3e3;
6028
+ border-radius: 4px;
6029
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
6030
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
6031
+ }
6032
+
6033
+ .factory-bootstrap-330 .well blockquote {
6034
+ border-color: #ddd;
6035
+ border-color: rgba(0, 0, 0, 0.15);
6036
+ }
6037
+
6038
+ .factory-bootstrap-330 .well-lg {
6039
+ padding: 24px;
6040
+ border-radius: 6px;
6041
+ }
6042
+
6043
+ .factory-bootstrap-330 .well-sm {
6044
+ padding: 9px;
6045
+ border-radius: 3px;
6046
+ }
6047
+
6048
+ .factory-bootstrap-330 .close {
6049
+ float: right;
6050
+ font-size: 14px;
6051
+ font-weight: bold;
6052
+ line-height: 1;
6053
+ color: #000000;
6054
+ text-shadow: 0 1px 0 #ffffff;
6055
+ opacity: 0.3;
6056
+ filter: alpha(opacity=30);
6057
+ }
6058
+
6059
+ .factory-bootstrap-330 .alert .close {
6060
+ position: relative;
6061
+ top: -8px;
6062
+ right: -7px;
6063
+ }
6064
+
6065
+ .factory-bootstrap-330 .close:hover,
6066
+ .factory-bootstrap-330 .close:focus {
6067
+ color: #000000;
6068
+ text-decoration: none;
6069
+ cursor: pointer;
6070
+ opacity: 0.5;
6071
+ filter: alpha(opacity=50);
6072
+ }
6073
+
6074
+ .factory-bootstrap-330 button.close {
6075
+ padding: 0;
6076
+ cursor: pointer;
6077
+ background: transparent;
6078
+ border: 0;
6079
+ -webkit-appearance: none;
6080
+ }
6081
+
6082
+ .factory-bootstrap-330 .modal-open {
6083
+ overflow: hidden;
6084
+ }
6085
+
6086
+ .factory-bootstrap-330 .modal {
6087
+ position: fixed;
6088
+ top: 0;
6089
+ right: 0;
6090
+ bottom: 0;
6091
+ left: 0;
6092
+ z-index: 1040;
6093
+ display: none;
6094
+ overflow: auto;
6095
+ overflow-y: scroll;
6096
+ width: auto;
6097
+ margin-left: 0px;
6098
+ background-color: transparent;
6099
+ border: 0px;
6100
+ }
6101
+
6102
+ .factory-bootstrap-330 .modal.fade .modal-dialog {
6103
+ -webkit-transform: translate(0, -25%);
6104
+ -ms-transform: translate(0, -25%);
6105
+ transform: translate(0, -25%);
6106
+ -webkit-transition: -webkit-transform 0.3s ease-out;
6107
+ -moz-transition: -moz-transform 0.3s ease-out;
6108
+ -o-transition: -o-transform 0.3s ease-out;
6109
+ transition: transform 0.3s ease-out;
6110
+ }
6111
+
6112
+ .factory-bootstrap-330 .modal.in .modal-dialog {
6113
+ -webkit-transform: translate(0, 0);
6114
+ -ms-transform: translate(0, 0);
6115
+ transform: translate(0, 0);
6116
+ }
6117
+
6118
+ .factory-bootstrap-330 .modal-dialog {
6119
+ position: relative;
6120
+ z-index: 1050;
6121
+ width: auto;
6122
+ margin: 10px;
6123
+ }
6124
+
6125
+ .factory-bootstrap-330 .modal-content {
6126
+ position: relative;
6127
+ background-color: #ffffff;
6128
+ border: 1px solid #999999;
6129
+ border: 1px solid rgba(0, 0, 0, 0.2);
6130
+ border-radius: 6px;
6131
+ outline: none;
6132
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
6133
+ box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
6134
+ background-clip: padding-box;
6135
+ }
6136
+
6137
+ .factory-bootstrap-330 .modal-backdrop,
6138
+ .factory-bootstrap-330-modal-backdrop {
6139
+ position: fixed;
6140
+ top: 0;
6141
+ right: 0;
6142
+ bottom: 0;
6143
+ left: 0;
6144
+ z-index: 1030;
6145
+ background-color: #000000;
6146
+ }
6147
+
6148
+ .factory-bootstrap-330 .modal-backdrop.fade,
6149
+ .factory-bootstrap-330-modal-backdrop.fade {
6150
+ opacity: 0;
6151
+ filter: alpha(opacity=0);
6152
+ }
6153
+
6154
+ .factory-bootstrap-330 .modal-backdrop.in,
6155
+ .factory-bootstrap-330-modal-backdrop.in {
6156
+ opacity: 0.5;
6157
+ filter: alpha(opacity=50);
6158
+ }
6159
+
6160
+ .factory-bootstrap-330 .modal-header {
6161
+ min-height: 16.428571429px;
6162
+ padding: 15px;
6163
+ border-bottom: 1px solid #e5e5e5;
6164
+ }
6165
+
6166
+ .factory-bootstrap-330 .modal-header .close {
6167
+ margin-top: -2px;
6168
+ }
6169
+
6170
+ .factory-bootstrap-330 .modal-title {
6171
+ margin: 0;
6172
+ line-height: 1.428571429;
6173
+ }
6174
+
6175
+ .factory-bootstrap-330 .modal-body {
6176
+ position: relative;
6177
+ padding: 20px;
6178
+ max-height: none;
6179
+ }
6180
+
6181
+ .factory-bootstrap-330 .modal-footer {
6182
+ padding: 19px 20px 20px;
6183
+ margin-top: 15px;
6184
+ text-align: right;
6185
+ border-top: 1px solid #e5e5e5;
6186
+ }
6187
+
6188
+ .factory-bootstrap-330 .modal-footer:before,
6189
+ .factory-bootstrap-330 .modal-footer:after {
6190
+ display: table;
6191
+ content: " ";
6192
+ }
6193
+
6194
+ .factory-bootstrap-330 .modal-footer:after {
6195
+ clear: both;
6196
+ }
6197
+
6198
+ .factory-bootstrap-330 .modal-footer:before,
6199
+ .factory-bootstrap-330 .modal-footer:after {
6200
+ display: table;
6201
+ content: " ";
6202
+ }
6203
+
6204
+ .factory-bootstrap-330 .modal-footer:after {
6205
+ clear: both;
6206
+ }
6207
+
6208
+ .factory-bootstrap-330 .modal-footer .btn + .btn {
6209
+ margin-bottom: 0;
6210
+ margin-left: 5px;
6211
+ }
6212
+
6213
+ .factory-bootstrap-330 .modal-footer .btn-group .btn + .btn {
6214
+ margin-left: -1px;
6215
+ }
6216
+
6217
+ .factory-bootstrap-330 .modal-footer .btn-block + .btn-block {
6218
+ margin-left: 0;
6219
+ }
6220
+
6221
+ @media screen and (min-width: 768px) {
6222
+ .factory-bootstrap-330 .modal-dialog {
6223
+ width: 600px;
6224
+ margin: 30px auto;
6225
+ }
6226
+
6227
+ .factory-bootstrap-330 .modal-content {
6228
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
6229
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
6230
+ }
6231
+ }
6232
+
6233
+ .factory-bootstrap-330 .tooltip {
6234
+ position: absolute;
6235
+ z-index: 1030;
6236
+ display: block;
6237
+ font-size: 12px;
6238
+ line-height: 1.4;
6239
+ opacity: 0;
6240
+ filter: alpha(opacity=0);
6241
+ visibility: visible;
6242
+ }
6243
+
6244
+ .factory-bootstrap-330 .tooltip.in {
6245
+ opacity: 0.9;
6246
+ filter: alpha(opacity=90);
6247
+ }
6248
+
6249
+ .factory-bootstrap-330 .tooltip.top {
6250
+ padding: 5px 0;
6251
+ margin-top: -3px;
6252
+ }
6253
+
6254
+ .factory-bootstrap-330 .tooltip.right {
6255
+ padding: 0 5px;
6256
+ margin-left: 3px;
6257
+ }
6258
+
6259
+ .factory-bootstrap-330 .tooltip.bottom {
6260
+ padding: 5px 0;
6261
+ margin-top: 3px;
6262
+ }
6263
+
6264
+ .factory-bootstrap-330 .tooltip.left {
6265
+ padding: 0 5px;
6266
+ margin-left: -3px;
6267
+ }
6268
+
6269
+ .factory-bootstrap-330 .tooltip-inner {
6270
+ width: 400px;
6271
+ padding: 15px 20px;
6272
+ color: #ffffff;
6273
+ text-align: left;
6274
+ text-decoration: none;
6275
+ background-color: #673ab7;
6276
+ border-radius: 3px;
6277
+ }
6278
+
6279
+ .factory-bootstrap-330 .tooltip-arrow {
6280
+ position: absolute;
6281
+ width: 0;
6282
+ height: 0;
6283
+ border-color: transparent;
6284
+ border-style: solid;
6285
+ }
6286
+
6287
+ .factory-bootstrap-330 .tooltip.top .tooltip-arrow {
6288
+ bottom: 0;
6289
+ left: 50%;
6290
+ margin-left: -5px;
6291
+ border-top-color: #673ab7;
6292
+ border-width: 5px 5px 0;
6293
+ }
6294
+
6295
+ .factory-bootstrap-330 .tooltip.top-left .tooltip-arrow {
6296
+ bottom: 0;
6297
+ left: 5px;
6298
+ border-top-color: #673ab7;
6299
+ border-width: 5px 5px 0;
6300
+ }
6301
+
6302
+ .factory-bootstrap-330 .tooltip.top-right .tooltip-arrow {
6303
+ right: 5px;
6304
+ bottom: 0;
6305
+ border-top-color: #673ab7;
6306
+ border-width: 5px 5px 0;
6307
+ }
6308
+
6309
+ .factory-bootstrap-330 .tooltip.right .tooltip-arrow {
6310
+ top: 50%;
6311
+ left: 0;
6312
+ margin-top: -5px;
6313
+ border-right-color: #673ab7;
6314
+ border-width: 5px 5px 5px 0;
6315
+ }
6316
+
6317
+ .factory-bootstrap-330 .tooltip.left .tooltip-arrow {
6318
+ top: 50%;
6319
+ right: 0;
6320
+ margin-top: -5px;
6321
+ border-left-color: #673ab7;
6322
+ border-width: 5px 0 5px 5px;
6323
+ }
6324
+
6325
+ .factory-bootstrap-330 .tooltip.bottom .tooltip-arrow {
6326
+ top: 0;
6327
+ left: 50%;
6328
+ margin-left: -5px;
6329
+ border-bottom-color: #673ab7;
6330
+ border-width: 0 5px 5px;
6331
+ }
6332
+
6333
+ .factory-bootstrap-330 .tooltip.bottom-left .tooltip-arrow {
6334
+ top: 0;
6335
+ left: 5px;
6336
+ border-bottom-color: #673ab7;
6337
+ border-width: 0 5px 5px;
6338
+ }
6339
+
6340
+ .factory-bootstrap-330 .tooltip.bottom-right .tooltip-arrow {
6341
+ top: 0;
6342
+ right: 5px;
6343
+ border-bottom-color: #673ab7;
6344
+ border-width: 0 5px 5px;
6345
+ }
6346
+
6347
+ .factory-bootstrap-330 .popover {
6348
+ position: absolute;
6349
+ top: 0;
6350
+ left: 0;
6351
+ z-index: 1010;
6352
+ display: none;
6353
+ max-width: 276px;
6354
+ padding: 1px;
6355
+ text-align: left;
6356
+ white-space: normal;
6357
+ background-color: #ffffff;
6358
+ border: 1px solid #cccccc;
6359
+ border: 1px solid rgba(0, 0, 0, 0.2);
6360
+ border-radius: 6px;
6361
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
6362
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
6363
+ background-clip: padding-box;
6364
+ }
6365
+
6366
+ .factory-bootstrap-330 .popover.top {
6367
+ margin-top: -10px;
6368
+ }
6369
+
6370
+ .factory-bootstrap-330 .popover.right {
6371
+ margin-left: 10px;
6372
+ }
6373
+
6374
+ .factory-bootstrap-330 .popover.bottom {
6375
+ margin-top: 10px;
6376
+ }
6377
+
6378
+ .factory-bootstrap-330 .popover.left {
6379
+ margin-left: -10px;
6380
+ }
6381
+
6382
+ .factory-bootstrap-330 .popover-title {
6383
+ padding: 8px 14px;
6384
+ margin: 0;
6385
+ font-size: 14px;
6386
+ font-weight: normal;
6387
+ line-height: 18px;
6388
+ background-color: #f7f7f7;
6389
+ border-bottom: 1px solid #ebebeb;
6390
+ border-radius: 5px 5px 0 0;
6391
+ }
6392
+
6393
+ .factory-bootstrap-330 .popover-content {
6394
+ padding: 9px 14px;
6395
+ }
6396
+
6397
+ .factory-bootstrap-330 .popover .arrow,
6398
+ .factory-bootstrap-330 .popover .arrow:after {
6399
+ position: absolute;
6400
+ display: block;
6401
+ width: 0;
6402
+ height: 0;
6403
+ border-color: transparent;
6404
+ border-style: solid;
6405
+ }
6406
+
6407
+ .factory-bootstrap-330 .popover .arrow {
6408
+ border-width: 11px;
6409
+ }
6410
+
6411
+ .factory-bootstrap-330 .popover .arrow:after {
6412
+ border-width: 10px;
6413
+ content: "";
6414
+ }
6415
+
6416
+ .factory-bootstrap-330 .popover.top .arrow {
6417
+ bottom: -11px;
6418
+ left: 50%;
6419
+ margin-left: -11px;
6420
+ border-top-color: #999999;
6421
+ border-top-color: rgba(0, 0, 0, 0.25);
6422
+ border-bottom-width: 0;
6423
+ }
6424
+
6425
+ .factory-bootstrap-330 .popover.top .arrow:after {
6426
+ bottom: 1px;
6427
+ margin-left: -10px;
6428
+ border-top-color: #ffffff;
6429
+ border-bottom-width: 0;
6430
+ content: " ";
6431
+ }
6432
+
6433
+ .factory-bootstrap-330 .popover.right .arrow {
6434
+ top: 50%;
6435
+ left: -11px;
6436
+ margin-top: -11px;
6437
+ border-right-color: #999999;
6438
+ border-right-color: rgba(0, 0, 0, 0.25);
6439
+ border-left-width: 0;
6440
+ }
6441
+
6442
+ .factory-bootstrap-330 .popover.right .arrow:after {
6443
+ bottom: -10px;
6444
+ left: 1px;
6445
+ border-right-color: #ffffff;
6446
+ border-left-width: 0;
6447
+ content: " ";
6448
+ }
6449
+
6450
+ .factory-bootstrap-330 .popover.bottom .arrow {
6451
+ top: -11px;
6452
+ left: 50%;
6453
+ margin-left: -11px;
6454
+ border-bottom-color: #999999;
6455
+ border-bottom-color: rgba(0, 0, 0, 0.25);
6456
+ border-top-width: 0;
6457
+ }
6458
+
6459
+ .factory-bootstrap-330 .popover.bottom .arrow:after {
6460
+ top: 1px;
6461
+ margin-left: -10px;
6462
+ border-bottom-color: #ffffff;
6463
+ border-top-width: 0;
6464
+ content: " ";
6465
+ }
6466
+
6467
+ .factory-bootstrap-330 .popover.left .arrow {
6468
+ top: 50%;
6469
+ right: -11px;
6470
+ margin-top: -11px;
6471
+ border-left-color: #999999;
6472
+ border-left-color: rgba(0, 0, 0, 0.25);
6473
+ border-right-width: 0;
6474
+ }
6475
+
6476
+ .factory-bootstrap-330 .popover.left .arrow:after {
6477
+ right: 1px;
6478
+ bottom: -10px;
6479
+ border-left-color: #ffffff;
6480
+ border-right-width: 0;
6481
+ content: " ";
6482
+ }
6483
+
6484
+ .factory-bootstrap-330 .carousel {
6485
+ position: relative;
6486
+ }
6487
+
6488
+ .factory-bootstrap-330 .carousel-inner {
6489
+ position: relative;
6490
+ width: 100%;
6491
+ overflow: hidden;
6492
+ }
6493
+
6494
+ .factory-bootstrap-330 .carousel-inner > .item {
6495
+ position: relative;
6496
+ display: none;
6497
+ -webkit-transition: 0.6s ease-in-out left;
6498
+ transition: 0.6s ease-in-out left;
6499
+ }
6500
+
6501
+ .factory-bootstrap-330 .carousel-inner > .item > img,
6502
+ .factory-bootstrap-330 .carousel-inner > .item > a > img {
6503
+ display: block;
6504
+ height: auto;
6505
+ max-width: 100%;
6506
+ line-height: 1;
6507
+ }
6508
+
6509
+ .factory-bootstrap-330 .carousel-inner > .active,
6510
+ .factory-bootstrap-330 .carousel-inner > .next,
6511
+ .factory-bootstrap-330 .carousel-inner > .prev {
6512
+ display: block;
6513
+ }
6514
+
6515
+ .factory-bootstrap-330 .carousel-inner > .active {
6516
+ left: 0;
6517
+ }
6518
+
6519
+ .factory-bootstrap-330 .carousel-inner > .next,
6520
+ .factory-bootstrap-330 .carousel-inner > .prev {
6521
+ position: absolute;
6522
+ top: 0;
6523
+ width: 100%;
6524
+ }
6525
+
6526
+ .factory-bootstrap-330 .carousel-inner > .next {
6527
+ left: 100%;
6528
+ }
6529
+
6530
+ .factory-bootstrap-330 .carousel-inner > .prev {
6531
+ left: -100%;
6532
+ }
6533
+
6534
+ .factory-bootstrap-330 .carousel-inner > .next.left,
6535
+ .factory-bootstrap-330 .carousel-inner > .prev.right {
6536
+ left: 0;
6537
+ }
6538
+
6539
+ .factory-bootstrap-330 .carousel-inner > .active.left {
6540
+ left: -100%;
6541
+ }
6542
+
6543
+ .factory-bootstrap-330 .carousel-inner > .active.right {
6544
+ left: 100%;
6545
+ }
6546
+
6547
+ .factory-bootstrap-330 .carousel-control {
6548
+ position: absolute;
6549
+ top: 0;
6550
+ bottom: 0;
6551
+ left: 0;
6552
+ width: 15%;
6553
+ font-size: 20px;
6554
+ color: #ffffff;
6555
+ text-align: center;
6556
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
6557
+ opacity: 0.5;
6558
+ filter: alpha(opacity=50);
6559
+ }
6560
+
6561
+ .factory-bootstrap-330 .carousel-control.left {
6562
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0), color-stop(rgba(0, 0, 0, 0.0001) 100%));
6563
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%);
6564
+ background-repeat: repeat-x;
6565
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
6566
+ }
6567
+
6568
+ .factory-bootstrap-330 .carousel-control.right {
6569
+ right: 0;
6570
+ left: auto;
6571
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0), color-stop(rgba(0, 0, 0, 0.5) 100%));
6572
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%);
6573
+ background-repeat: repeat-x;
6574
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
6575
+ }
6576
+
6577
+ .factory-bootstrap-330 .carousel-control:hover,
6578
+ .factory-bootstrap-330 .carousel-control:focus {
6579
+ color: #ffffff;
6580
+ text-decoration: none;
6581
+ outline: none;
6582
+ opacity: 0.9;
6583
+ filter: alpha(opacity=90);
6584
+ }
6585
+
6586
+ .factory-bootstrap-330 .carousel-control .icon-prev,
6587
+ .factory-bootstrap-330 .carousel-control .icon-next,
6588
+ .factory-bootstrap-330 .carousel-control .glyphicon-chevron-left,
6589
+ .factory-bootstrap-330 .carousel-control .glyphicon-chevron-right {
6590
+ position: absolute;
6591
+ top: 50%;
6592
+ z-index: 5;
6593
+ display: inline-block;
6594
+ }
6595
+
6596
+ .factory-bootstrap-330 .carousel-control .icon-prev,
6597
+ .factory-bootstrap-330 .carousel-control .glyphicon-chevron-left {
6598
+ left: 50%;
6599
+ }
6600
+
6601
+ .factory-bootstrap-330 .carousel-control .icon-next,
6602
+ .factory-bootstrap-330 .carousel-control .glyphicon-chevron-right {
6603
+ right: 50%;
6604
+ }
6605
+
6606
+ .factory-bootstrap-330 .carousel-control .icon-prev,
6607
+ .factory-bootstrap-330 .carousel-control .icon-next {
6608
+ width: 20px;
6609
+ height: 20px;
6610
+ margin-top: -10px;
6611
+ margin-left: -10px;
6612
+ font-family: serif;
6613
+ }
6614
+
6615
+ .factory-bootstrap-330 .carousel-control .icon-prev:before {
6616
+ content: '\2039';
6617
+ }
6618
+
6619
+ .factory-bootstrap-330 .carousel-control .icon-next:before {
6620
+ content: '\203a';
6621
+ }
6622
+
6623
+ .factory-bootstrap-330 .carousel-indicators {
6624
+ position: absolute;
6625
+ bottom: 10px;
6626
+ left: 50%;
6627
+ z-index: 15;
6628
+ width: 60%;
6629
+ padding-left: 0;
6630
+ margin-left: -30%;
6631
+ text-align: center;
6632
+ list-style: none;
6633
+ }
6634
+
6635
+ .factory-bootstrap-330 .carousel-indicators li {
6636
+ display: inline-block;
6637
+ width: 10px;
6638
+ height: 10px;
6639
+ margin: 1px;
6640
+ text-indent: -999px;
6641
+ cursor: pointer;
6642
+ background-color: #000 \9;
6643
+ background-color: rgba(0, 0, 0, 0);
6644
+ border: 1px solid #ffffff;
6645
+ border-radius: 10px;
6646
+ }
6647
+
6648
+ .factory-bootstrap-330 .carousel-indicators .active {
6649
+ width: 12px;
6650
+ height: 12px;
6651
+ margin: 0;
6652
+ background-color: #ffffff;
6653
+ }
6654
+
6655
+ .factory-bootstrap-330 .carousel-caption {
6656
+ position: absolute;
6657
+ right: 15%;
6658
+ bottom: 20px;
6659
+ left: 15%;
6660
+ z-index: 10;
6661
+ padding-top: 20px;
6662
+ padding-bottom: 20px;
6663
+ color: #ffffff;
6664
+ text-align: center;
6665
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
6666
+ }
6667
+
6668
+ .factory-bootstrap-330 .carousel-caption .btn {
6669
+ text-shadow: none;
6670
+ }
6671
+
6672
+ @media screen and (min-width: 768px) {
6673
+ .carousel-control .glyphicons-chevron-left,
6674
+ .carousel-control .glyphicons-chevron-right,
6675
+ .carousel-control .icon-prev,
6676
+ .carousel-control .icon-next {
6677
+ width: 30px;
6678
+ height: 30px;
6679
+ margin-top: -15px;
6680
+ margin-left: -15px;
6681
+ font-size: 30px;
6682
+ }
6683
+
6684
+ .carousel-caption {
6685
+ right: 20%;
6686
+ left: 20%;
6687
+ padding-bottom: 30px;
6688
+ }
6689
+
6690
+ .carousel-indicators {
6691
+ bottom: 20px;
6692
+ }
6693
+ }
6694
+
6695
+ .factory-bootstrap-330 .clearfix:before,
6696
+ .factory-bootstrap-330 .clearfix:after {
6697
+ display: table;
6698
+ content: " ";
6699
+ }
6700
+
6701
+ .factory-bootstrap-330 .clearfix:after {
6702
+ clear: both;
6703
+ }
6704
+
6705
+ .factory-bootstrap-330 .center-block {
6706
+ display: block;
6707
+ margin-right: auto;
6708
+ margin-left: auto;
6709
+ }
6710
+
6711
+ .factory-bootstrap-330 .pull-right {
6712
+ float: right !important;
6713
+ }
6714
+
6715
+ .factory-bootstrap-330 .pull-left {
6716
+ float: left !important;
6717
+ }
6718
+
6719
+ .factory-bootstrap-330 .hide {
6720
+ display: none !important;
6721
+ }
6722
+
6723
+ .factory-bootstrap-330 .show {
6724
+ display: block !important;
6725
+ }
6726
+
6727
+ .factory-bootstrap-330 .invisible {
6728
+ visibility: hidden;
6729
+ }
6730
+
6731
+ .factory-bootstrap-330 .text-hide {
6732
+ font: 0/0 a;
6733
+ color: transparent;
6734
+ text-shadow: none;
6735
+ background-color: transparent;
6736
+ border: 0;
6737
+ }
6738
+
6739
+ .factory-bootstrap-330 .hidden {
6740
+ display: none !important;
6741
+ visibility: hidden !important;
6742
+ }
6743
+
6744
+ .factory-bootstrap-330 .affix {
6745
+ position: fixed;
6746
+ }
6747
+
6748
+ @-ms-viewport {
6749
+ width: device-width;
6750
+ }
6751
+
6752
+ .factory-bootstrap-330 .visible-xs,
6753
+ .factory-bootstrap-330 tr.visible-xs,
6754
+ .factory-bootstrap-330 th.visible-xs,
6755
+ .factory-bootstrap-330 td.visible-xs {
6756
+ display: none !important;
6757
+ }
6758
+
6759
+ @media (max-width: 767px) {
6760
+ .visible-xs {
6761
+ display: block !important;
6762
+ }
6763
+
6764
+ table.visible-xs {
6765
+ display: table;
6766
+ }
6767
+
6768
+ tr.visible-xs {
6769
+ display: table-row !important;
6770
+ }
6771
+
6772
+ th.visible-xs,
6773
+ td.visible-xs {
6774
+ display: table-cell !important;
6775
+ }
6776
+ }
6777
+
6778
+ @media (min-width: 768px) and (max-width: 991px) {
6779
+ .visible-xs.visible-sm {
6780
+ display: block !important;
6781
+ }
6782
+
6783
+ table.visible-xs.visible-sm {
6784
+ display: table;
6785
+ }
6786
+
6787
+ tr.visible-xs.visible-sm {
6788
+ display: table-row !important;
6789
+ }
6790
+
6791
+ th.visible-xs.visible-sm,
6792
+ td.visible-xs.visible-sm {
6793
+ display: table-cell !important;
6794
+ }
6795
+ }
6796
+
6797
+ @media (min-width: 992px) and (max-width: 1199px) {
6798
+ .visible-xs.visible-md {
6799
+ display: block !important;
6800
+ }
6801
+
6802
+ table.visible-xs.visible-md {
6803
+ display: table;
6804
+ }
6805
+
6806
+ tr.visible-xs.visible-md {
6807
+ display: table-row !important;
6808
+ }
6809
+
6810
+ th.visible-xs.visible-md,
6811
+ td.visible-xs.visible-md {
6812
+ display: table-cell !important;
6813
+ }
6814
+ }
6815
+
6816
+ @media (min-width: 1200px) {
6817
+ .visible-xs.visible-lg {
6818
+ display: block !important;
6819
+ }
6820
+
6821
+ table.visible-xs.visible-lg {
6822
+ display: table;
6823
+ }
6824
+
6825
+ tr.visible-xs.visible-lg {
6826
+ display: table-row !important;
6827
+ }
6828
+
6829
+ th.visible-xs.visible-lg,
6830
+ td.visible-xs.visible-lg {
6831
+ display: table-cell !important;
6832
+ }
6833
+ }
6834
+
6835
+ .factory-bootstrap-330 .visible-sm,
6836
+ .factory-bootstrap-330 tr.visible-sm,
6837
+ .factory-bootstrap-330 th.visible-sm,
6838
+ .factory-bootstrap-330 td.visible-sm {
6839
+ display: none !important;
6840
+ }
6841
+
6842
+ @media (max-width: 767px) {
6843
+ .visible-sm.visible-xs {
6844
+ display: block !important;
6845
+ }
6846
+
6847
+ table.visible-sm.visible-xs {
6848
+ display: table;
6849
+ }
6850
+
6851
+ tr.visible-sm.visible-xs {
6852
+ display: table-row !important;
6853
+ }
6854
+
6855
+ th.visible-sm.visible-xs,
6856
+ td.visible-sm.visible-xs {
6857
+ display: table-cell !important;
6858
+ }
6859
+ }
6860
+
6861
+ @media (min-width: 768px) and (max-width: 991px) {
6862
+ .visible-sm {
6863
+ display: block !important;
6864
+ }
6865
+
6866
+ table.visible-sm {
6867
+ display: table;
6868
+ }
6869
+
6870
+ tr.visible-sm {
6871
+ display: table-row !important;
6872
+ }
6873
+
6874
+ th.visible-sm,
6875
+ td.visible-sm {
6876
+ display: table-cell !important;
6877
+ }
6878
+ }
6879
+
6880
+ @media (min-width: 992px) and (max-width: 1199px) {
6881
+ .visible-sm.visible-md {
6882
+ display: block !important;
6883
+ }
6884
+
6885
+ table.visible-sm.visible-md {
6886
+ display: table;
6887
+ }
6888
+
6889
+ tr.visible-sm.visible-md {
6890
+ display: table-row !important;
6891
+ }
6892
+
6893
+ th.visible-sm.visible-md,
6894
+ td.visible-sm.visible-md {
6895
+ display: table-cell !important;
6896
+ }
6897
+ }
6898
+
6899
+ @media (min-width: 1200px) {
6900
+ .visible-sm.visible-lg {
6901
+ display: block !important;
6902
+ }
6903
+
6904
+ table.visible-sm.visible-lg {
6905
+ display: table;
6906
+ }
6907
+
6908
+ tr.visible-sm.visible-lg {
6909
+ display: table-row !important;
6910
+ }
6911
+
6912
+ th.visible-sm.visible-lg,
6913
+ td.visible-sm.visible-lg {
6914
+ display: table-cell !important;
6915
+ }
6916
+ }
6917
+
6918
+ .factory-bootstrap-330 .visible-md,
6919
+ .factory-bootstrap-330 tr.visible-md,
6920
+ .factory-bootstrap-330 th.visible-md,
6921
+ .factory-bootstrap-330 td.visible-md {
6922
+ display: none !important;
6923
+ }
6924
+
6925
+ @media (max-width: 767px) {
6926
+ .visible-md.visible-xs {
6927
+ display: block !important;
6928
+ }
6929
+
6930
+ table.visible-md.visible-xs {
6931
+ display: table;
6932
+ }
6933
+
6934
+ tr.visible-md.visible-xs {
6935
+ display: table-row !important;
6936
+ }
6937
+
6938
+ th.visible-md.visible-xs,
6939
+ td.visible-md.visible-xs {
6940
+ display: table-cell !important;
6941
+ }
6942
+ }
6943
+
6944
+ @media (min-width: 768px) and (max-width: 991px) {
6945
+ .visible-md.visible-sm {
6946
+ display: block !important;
6947
+ }
6948
+
6949
+ table.visible-md.visible-sm {
6950
+ display: table;
6951
+ }
6952
+
6953
+ tr.visible-md.visible-sm {
6954
+ display: table-row !important;
6955
+ }
6956
+
6957
+ th.visible-md.visible-sm,
6958
+ td.visible-md.visible-sm {
6959
+ display: table-cell !important;
6960
+ }
6961
+ }
6962
+
6963
+ @media (min-width: 992px) and (max-width: 1199px) {
6964
+ .visible-md {
6965
+ display: block !important;
6966
+ }
6967
+
6968
+ table.visible-md {
6969
+ display: table;
6970
+ }
6971
+
6972
+ tr.visible-md {
6973
+ display: table-row !important;
6974
+ }
6975
+
6976
+ th.visible-md,
6977
+ td.visible-md {
6978
+ display: table-cell !important;
6979
+ }
6980
+ }
6981
+
6982
+ @media (min-width: 1200px) {
6983
+ .visible-md.visible-lg {
6984
+ display: block !important;
6985
+ }
6986
+
6987
+ table.visible-md.visible-lg {
6988
+ display: table;
6989
+ }
6990
+
6991
+ tr.visible-md.visible-lg {
6992
+ display: table-row !important;
6993
+ }
6994
+
6995
+ th.visible-md.visible-lg,
6996
+ td.visible-md.visible-lg {
6997
+ display: table-cell !important;
6998
+ }
6999
+ }
7000
+
7001
+ .factory-bootstrap-330 .visible-lg,
7002
+ .factory-bootstrap-330 tr.visible-lg,
7003
+ .factory-bootstrap-330 th.visible-lg,
7004
+ .factory-bootstrap-330 td.visible-lg {
7005
+ display: none !important;
7006
+ }
7007
+
7008
+ @media (max-width: 767px) {
7009
+ .visible-lg.visible-xs {
7010
+ display: block !important;
7011
+ }
7012
+
7013
+ table.visible-lg.visible-xs {
7014
+ display: table;
7015
+ }
7016
+
7017
+ tr.visible-lg.visible-xs {
7018
+ display: table-row !important;
7019
+ }
7020
+
7021
+ th.visible-lg.visible-xs,
7022
+ td.visible-lg.visible-xs {
7023
+ display: table-cell !important;
7024
+ }
7025
+ }
7026
+
7027
+ @media (min-width: 768px) and (max-width: 991px) {
7028
+ .visible-lg.visible-sm {
7029
+ display: block !important;
7030
+ }
7031
+
7032
+ table.visible-lg.visible-sm {
7033
+ display: table;
7034
+ }
7035
+
7036
+ tr.visible-lg.visible-sm {
7037
+ display: table-row !important;
7038
+ }
7039
+
7040
+ th.visible-lg.visible-sm,
7041
+ td.visible-lg.visible-sm {
7042
+ display: table-cell !important;
7043
+ }
7044
+ }
7045
+
7046
+ @media (min-width: 992px) and (max-width: 1199px) {
7047
+ .visible-lg.visible-md {
7048
+ display: block !important;
7049
+ }
7050
+
7051
+ table.visible-lg.visible-md {
7052
+ display: table;
7053
+ }
7054
+
7055
+ tr.visible-lg.visible-md {
7056
+ display: table-row !important;
7057
+ }
7058
+
7059
+ th.visible-lg.visible-md,
7060
+ td.visible-lg.visible-md {
7061
+ display: table-cell !important;
7062
+ }
7063
+ }
7064
+
7065
+ @media (min-width: 1200px) {
7066
+ .visible-lg {
7067
+ display: block !important;
7068
+ }
7069
+
7070
+ table.visible-lg {
7071
+ display: table;
7072
+ }
7073
+
7074
+ tr.visible-lg {
7075
+ display: table-row !important;
7076
+ }
7077
+
7078
+ th.visible-lg,
7079
+ td.visible-lg {
7080
+ display: table-cell !important;
7081
+ }
7082
+ }
7083
+
7084
+ .factory-bootstrap-330 .hidden-xs {
7085
+ display: block !important;
7086
+ }
7087
+
7088
+ .factory-bootstrap-330 table.hidden-xs {
7089
+ display: table;
7090
+ }
7091
+
7092
+ .factory-bootstrap-330 tr.hidden-xs {
7093
+ display: table-row !important;
7094
+ }
7095
+
7096
+ .factory-bootstrap-330 th.hidden-xs,
7097
+ .factory-bootstrap-330 td.hidden-xs {
7098
+ display: table-cell !important;
7099
+ }
7100
+
7101
+ @media (max-width: 767px) {
7102
+ .hidden-xs,
7103
+ tr.hidden-xs,
7104
+ th.hidden-xs,
7105
+ td.hidden-xs {
7106
+ display: none !important;
7107
+ }
7108
+ }
7109
+
7110
+ @media (min-width: 768px) and (max-width: 991px) {
7111
+ .hidden-xs.hidden-sm,
7112
+ tr.hidden-xs.hidden-sm,
7113
+ th.hidden-xs.hidden-sm,
7114
+ td.hidden-xs.hidden-sm {
7115
+ display: none !important;
7116
+ }
7117
+ }
7118
+
7119
+ @media (min-width: 992px) and (max-width: 1199px) {
7120
+ .hidden-xs.hidden-md,
7121
+ tr.hidden-xs.hidden-md,
7122
+ th.hidden-xs.hidden-md,
7123
+ td.hidden-xs.hidden-md {
7124
+ display: none !important;
7125
+ }
7126
+ }
7127
+
7128
+ @media (min-width: 1200px) {
7129
+ .hidden-xs.hidden-lg,
7130
+ tr.hidden-xs.hidden-lg,
7131
+ th.hidden-xs.hidden-lg,
7132
+ td.hidden-xs.hidden-lg {
7133
+ display: none !important;
7134
+ }
7135
+ }
7136
+
7137
+ .factory-bootstrap-330 .hidden-sm {
7138
+ display: block !important;
7139
+ }
7140
+
7141
+ .factory-bootstrap-330 table.hidden-sm {
7142
+ display: table;
7143
+ }
7144
+
7145
+ .factory-bootstrap-330 tr.hidden-sm {
7146
+ display: table-row !important;
7147
+ }
7148
+
7149
+ .factory-bootstrap-330 th.hidden-sm,
7150
+ .factory-bootstrap-330 td.hidden-sm {
7151
+ display: table-cell !important;
7152
+ }
7153
+
7154
+ @media (max-width: 767px) {
7155
+ .hidden-sm.hidden-xs,
7156
+ tr.hidden-sm.hidden-xs,
7157
+ th.hidden-sm.hidden-xs,
7158
+ td.hidden-sm.hidden-xs {
7159
+ display: none !important;
7160
+ }
7161
+ }
7162
+
7163
+ @media (min-width: 768px) and (max-width: 991px) {
7164
+ .hidden-sm,
7165
+ tr.hidden-sm,
7166
+ th.hidden-sm,
7167
+ td.hidden-sm {
7168
+ display: none !important;
7169
+ }
7170
+ }
7171
+
7172
+ @media (min-width: 992px) and (max-width: 1199px) {
7173
+ .hidden-sm.hidden-md,
7174
+ tr.hidden-sm.hidden-md,
7175
+ th.hidden-sm.hidden-md,
7176
+ td.hidden-sm.hidden-md {
7177
+ display: none !important;
7178
+ }
7179
+ }
7180
+
7181
+ @media (min-width: 1200px) {
7182
+ .hidden-sm.hidden-lg,
7183
+ tr.hidden-sm.hidden-lg,
7184
+ th.hidden-sm.hidden-lg,
7185
+ td.hidden-sm.hidden-lg {
7186
+ display: none !important;
7187
+ }
7188
+ }
7189
+
7190
+ .factory-bootstrap-330 .hidden-md {
7191
+ display: block !important;
7192
+ }
7193
+
7194
+ .factory-bootstrap-330 table.hidden-md {
7195
+ display: table;
7196
+ }
7197
+
7198
+ .factory-bootstrap-330 tr.hidden-md {
7199
+ display: table-row !important;
7200
+ }
7201
+
7202
+ .factory-bootstrap-330 th.hidden-md,
7203
+ .factory-bootstrap-330 td.hidden-md {
7204
+ display: table-cell !important;
7205
+ }
7206
+
7207
+ @media (max-width: 767px) {
7208
+ .hidden-md.hidden-xs,
7209
+ tr.hidden-md.hidden-xs,
7210
+ th.hidden-md.hidden-xs,
7211
+ td.hidden-md.hidden-xs {
7212
+ display: none !important;
7213
+ }
7214
+ }
7215
+
7216
+ @media (min-width: 768px) and (max-width: 991px) {
7217
+ .hidden-md.hidden-sm,
7218
+ tr.hidden-md.hidden-sm,
7219
+ th.hidden-md.hidden-sm,
7220
+ td.hidden-md.hidden-sm {
7221
+ display: none !important;
7222
+ }
7223
+ }
7224
+
7225
+ @media (min-width: 992px) and (max-width: 1199px) {
7226
+ .hidden-md,
7227
+ tr.hidden-md,
7228
+ th.hidden-md,
7229
+ td.hidden-md {
7230
+ display: none !important;
7231
+ }
7232
+ }
7233
+
7234
+ @media (min-width: 1200px) {
7235
+ .hidden-md.hidden-lg,
7236
+ tr.hidden-md.hidden-lg,
7237
+ th.hidden-md.hidden-lg,
7238
+ td.hidden-md.hidden-lg {
7239
+ display: none !important;
7240
+ }
7241
+ }
7242
+
7243
+ .factory-bootstrap-330 .hidden-lg {
7244
+ display: block !important;
7245
+ }
7246
+
7247
+ .factory-bootstrap-330 table.hidden-lg {
7248
+ display: table;
7249
+ }
7250
+
7251
+ .factory-bootstrap-330 tr.hidden-lg {
7252
+ display: table-row !important;
7253
+ }
7254
+
7255
+ .factory-bootstrap-330 th.hidden-lg,
7256
+ .factory-bootstrap-330 td.hidden-lg {
7257
+ display: table-cell !important;
7258
+ }
7259
+
7260
+ @media (max-width: 767px) {
7261
+ .factory-bootstrap-330 .hidden-lg.hidden-xs,
7262
+ .factory-bootstrap-330 tr.hidden-lg.hidden-xs,
7263
+ .factory-bootstrap-330 th.hidden-lg.hidden-xs,
7264
+ .factory-bootstrap-330 td.hidden-lg.hidden-xs {
7265
+ display: none !important;
7266
+ }
7267
+ }
7268
+
7269
+ @media (min-width: 768px) and (max-width: 991px) {
7270
+ .factory-bootstrap-330 .hidden-lg.hidden-sm,
7271
+ .factory-bootstrap-330 tr.hidden-lg.hidden-sm,
7272
+ .factory-bootstrap-330 th.hidden-lg.hidden-sm,
7273
+ .factory-bootstrap-330 td.hidden-lg.hidden-sm {
7274
+ display: none !important;
7275
+ }
7276
+ }
7277
+
7278
+ @media (min-width: 992px) and (max-width: 1199px) {
7279
+ .factory-bootstrap-330 .hidden-lg.hidden-md,
7280
+ .factory-bootstrap-330 tr.hidden-lg.hidden-md,
7281
+ .factory-bootstrap-330 th.hidden-lg.hidden-md,
7282
+ .factory-bootstrap-330 td.hidden-lg.hidden-md {
7283
+ display: none !important;
7284
+ }
7285
+ }
7286
+
7287
+ @media (min-width: 1200px) {
7288
+ .factory-bootstrap-330 .hidden-lg,
7289
+ .factory-bootstrap-330 tr.hidden-lg,
7290
+ .factory-bootstrap-330 th.hidden-lg,
7291
+ .factory-bootstrap-330 td.hidden-lg {
7292
+ display: none !important;
7293
+ }
7294
+ }
7295
+
7296
+ .factory-bootstrap-330 .visible-print,
7297
+ .factory-bootstrap-330 tr.visible-print,
7298
+ .factory-bootstrap-330 th.visible-print,
7299
+ .factory-bootstrap-330 td.visible-print {
7300
+ display: none !important;
7301
+ }
7302
+
7303
+ @media print {
7304
+ .factory-bootstrap-330 .visible-print {
7305
+ display: block !important;
7306
+ }
7307
+
7308
+ .factory-bootstrap-330 table.visible-print {
7309
+ display: table;
7310
+ }
7311
+
7312
+ .factory-bootstrap-330 tr.visible-print {
7313
+ display: table-row !important;
7314
+ }
7315
+
7316
+ .factory-bootstrap-330 th.visible-print,
7317
+ .factory-bootstrap-330 td.visible-print {
7318
+ display: table-cell !important;
7319
+ }
7320
+
7321
+ .factory-bootstrap-330 .hidden-print,
7322
+ .factory-bootstrap-330 tr.hidden-print,
7323
+ .factory-bootstrap-330 th.hidden-print,
7324
+ .factory-bootstrap-330 td.hidden-print {
7325
+ display: none !important;
7326
+ }
7327
+ }
7328
+
7329
+ /*!
7330
+ * Factory Default Bootstrap Theme
7331
+ *
7332
+ * The code is based on Bootstrap v2.1.1
7333
+ *
7334
+ * Bootstrap v3.0.3 (http://getbootstrap.com)
7335
+ * Copyright 2013 Twitter, Inc.
7336
+ * Licensed under http://www.apache.org/licenses/LICENSE-2.0
7337
+ *
7338
+ * @author Paul Kashtanoff <paul@byonepress.com>
7339
+ * @copyright (c) 2013, OnePress Ltd
7340
+ *
7341
+ * @package factory-bootstrap
7342
+ * @since 1.0.0
7343
+ */
7344
+
7345
+ .factory-bootstrap-330 .btn-default,
7346
+ .factory-bootstrap-330 .btn-primary,
7347
+ .factory-bootstrap-330 .btn-success,
7348
+ .factory-bootstrap-330 .btn-info,
7349
+ .factory-bootstrap-330 .btn-warning,
7350
+ .factory-bootstrap-330 .btn-danger {
7351
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
7352
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
7353
+ }
7354
+
7355
+ .factory-bootstrap-330 .btn-default:active,
7356
+ .factory-bootstrap-330 .btn-primary:active,
7357
+ .factory-bootstrap-330 .btn-success:active,
7358
+ .factory-bootstrap-330 .btn-info:active,
7359
+ .factory-bootstrap-330 .btn-warning:active,
7360
+ .factory-bootstrap-330 .btn-danger:active,
7361
+ .factory-bootstrap-330 .btn-default.active,
7362
+ .factory-bootstrap-330 .btn-primary.active,
7363
+ .factory-bootstrap-330 .btn-success.active,
7364
+ .factory-bootstrap-330 .btn-info.active,
7365
+ .factory-bootstrap-330 .btn-warning.active,
7366
+ .factory-bootstrap-330 .btn-danger.active {
7367
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
7368
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
7369
+ }
7370
+
7371
+ .factory-bootstrap-330 .btn:active,
7372
+ .factory-bootstrap-330 .btn.active {
7373
+ background-image: none;
7374
+ }
7375
+
7376
+ .factory-bootstrap-330 .btn-default {
7377
+ background: #fafafa;
7378
+ color: #555;
7379
+ border-color: #ccc;
7380
+ background: #f7f7f7;
7381
+ -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0, 0, 0, .08);
7382
+ box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0, 0, 0, .08);
7383
+ vertical-align: top;
7384
+ }
7385
+
7386
+ .factory-bootstrap-330 .btn-default:active,
7387
+ .factory-bootstrap-330 .btn-default.active {
7388
+ background-color: #fff;
7389
+ border-color: #dbdbdb;
7390
+ }
7391
+
7392
+ .factory-bootstrap-330 .btn-gold {
7393
+ font-weight: bold;
7394
+ padding: 7px 12px;
7395
+ cursor: pointer;
7396
+ line-height: 16px;
7397
+ display: inline-block;
7398
+ border-radius: 2px;
7399
+ -moz-border-radius: 2px; /*gecko - mozilla*/
7400
+ -webkit-border-radius: 2px; /*new webkit - Chrome and Safari*/
7401
+ box-shadow: #e3e3e3 0 1px 1px;
7402
+ -moz-box-shadow: 0px 1px 1px rgba(000, 000, 000, 0.1), inset 0px 1px 1px rgba(255, 255, 255, 0.7);
7403
+ -webkit-box-shadow: 0px 1px 1px rgba(000, 000, 000, 0.1), inset 0px 1px 1px rgba(255, 255, 255, 0.7);
7404
+ text-shadow: 1px 1px 0px #ffe8b2;
7405
+ color: #7c5d1b;
7406
+ border: 1px solid #d6a437;
7407
+ background: #feeb80; /*fallback for non-CSS3 browsers*/
7408
+ }
7409
+
7410
+ .factory-bootstrap-330 .btn-gold:hover,
7411
+ .factory-bootstrap-330 .btn-gold:focus {
7412
+ background: #fef0a1;
7413
+ }
7414
+
7415
+ .factory-bootstrap-330 .btn-gold:active,
7416
+ .factory-bootstrap-330 .btn-gold.active {
7417
+ background: #fef0a1;
7418
+ -webkit-box-shadow: inset 0 3px 8px 0 #f8ba36;
7419
+ box-shadow: inset 0 3px 8px 0 #f8ba36;
7420
+ }
7421
+
7422
+ .factory-bootstrap-330 .btn-primary {
7423
+ background: #2ea2cc;
7424
+ border-color: #0074a2;
7425
+ -webkit-box-shadow: inset 0 1px 0 rgba(120, 200, 230, .5), 0 1px 0 rgba(0, 0, 0, .15);
7426
+ box-shadow: inset 0 1px 0 rgba(120, 200, 230, .5), 0 1px 0 rgba(0, 0, 0, .15);
7427
+ color: #fff;
7428
+ text-decoration: none;
7429
+ }
7430
+
7431
+ .factory-bootstrap-330 .btn-primary:hover,
7432
+ .factory-bootstrap-330 .btn-primary:focus {
7433
+ background: #1e8cbe;
7434
+ border-color: #0074a2;
7435
+ -webkit-box-shadow: inset 0 1px 0 rgba(120, 200, 230, .6);
7436
+ box-shadow: inset 0 1px 0 rgba(120, 200, 230, .6);
7437
+ color: #fff;
7438
+ }
7439
+
7440
+ .factory-bootstrap-330 .btn-primary:active,
7441
+ .factory-bootstrap-330 .btn-primary.active {
7442
+ background-color: #2d6ca2;
7443
+ border-color: #2b669a;
7444
+ }
7445
+
7446
+ .factory-bootstrap-330 .btn-success {
7447
+ background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
7448
+ background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
7449
+ background-repeat: repeat-x;
7450
+ border-color: #3e8f3e;
7451
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
7452
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
7453
+ }
7454
+
7455
+ .factory-bootstrap-330 .btn-success:hover,
7456
+ .factory-bootstrap-330 .btn-success:focus {
7457
+ background-color: #419641;
7458
+ background-position: 0 -15px;
7459
+ }
7460
+
7461
+ .factory-bootstrap-330 .btn-success:active,
7462
+ .factory-bootstrap-330 .btn-success.active {
7463
+ background-color: #419641;
7464
+ border-color: #3e8f3e;
7465
+ }
7466
+
7467
+ .factory-bootstrap-330 .btn-warning {
7468
+ background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
7469
+ background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
7470
+ background-repeat: repeat-x;
7471
+ border-color: #e38d13;
7472
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
7473
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
7474
+ }
7475
+
7476
+ .factory-bootstrap-330 .btn-warning:hover,
7477
+ .factory-bootstrap-330 .btn-warning:focus {
7478
+ background-color: #eb9316;
7479
+ background-position: 0 -15px;
7480
+ }
7481
+
7482
+ .factory-bootstrap-330 .btn-warning:active,
7483
+ .factory-bootstrap-330 .btn-warning.active {
7484
+ background-color: #eb9316;
7485
+ border-color: #e38d13;
7486
+ }
7487
+
7488
+ .factory-bootstrap-330 .btn-danger {
7489
+ color: #ffffff;
7490
+ background: #d9534f;
7491
+ border-color: #d43f3a;
7492
+ }
7493
+
7494
+ .factory-bootstrap-330 .btn-danger:hover,
7495
+ .factory-bootstrap-330 .btn-danger:focus,
7496
+ .factory-bootstrap-330 .btn-danger:active,
7497
+ .factory-bootstrap-330 .btn-danger.active,
7498
+ .factory-bootstrap-330 .open .dropdown-toggle.btn-danger {
7499
+ color: #ffffff;
7500
+ background-color: #d2322d;
7501
+ border-color: #ac2925;
7502
+ }
7503
+
7504
+ .factory-bootstrap-330 .btn-info {
7505
+ background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
7506
+ background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
7507
+ background-repeat: repeat-x;
7508
+ border-color: #28a4c9;
7509
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
7510
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
7511
+ }
7512
+
7513
+ .factory-bootstrap-330 .btn-info:hover,
7514
+ .factory-bootstrap-330 .btn-info:focus {
7515
+ background-color: #2aabd2;
7516
+ background-position: 0 -15px;
7517
+ }
7518
+
7519
+ .factory-bootstrap-330 .btn-info:active,
7520
+ .factory-bootstrap-330 .btn-info.active {
7521
+ background-color: #2aabd2;
7522
+ border-color: #28a4c9;
7523
+ }
7524
+
7525
+ .factory-bootstrap-330 .thumbnail,
7526
+ .factory-bootstrap-330 .img-thumbnail {
7527
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
7528
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
7529
+ }
7530
+
7531
+ .factory-bootstrap-330 .dropdown-menu > li > a:hover,
7532
+ .factory-bootstrap-330 .dropdown-menu > li > a:focus {
7533
+ background-color: #e8e8e8;
7534
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
7535
+ background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
7536
+ background-repeat: repeat-x;
7537
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
7538
+ }
7539
+
7540
+ .factory-bootstrap-330 .dropdown-menu > .active > a,
7541
+ .factory-bootstrap-330 .dropdown-menu > .active > a:hover,
7542
+ .factory-bootstrap-330 .dropdown-menu > .active > a:focus {
7543
+ background-color: #357ebd;
7544
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
7545
+ background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
7546
+ background-repeat: repeat-x;
7547
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
7548
+ }
7549
+
7550
+ .factory-bootstrap-330 .navbar-default {
7551
+ background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
7552
+ background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
7553
+ background-repeat: repeat-x;
7554
+ border-radius: 4px;
7555
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
7556
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
7557
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
7558
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
7559
+ }
7560
+
7561
+ .factory-bootstrap-330 .navbar-default .navbar-nav > .active > a {
7562
+ background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
7563
+ background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);
7564
+ background-repeat: repeat-x;
7565
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);
7566
+ -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
7567
+ box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
7568
+ }
7569
+
7570
+ .factory-bootstrap-330 .navbar-brand,
7571
+ .factory-bootstrap-330 .navbar-nav > li > a {
7572
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
7573
+ }
7574
+
7575
+ .factory-bootstrap-330 .navbar-inverse {
7576
+ background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);
7577
+ background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
7578
+ background-repeat: repeat-x;
7579
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
7580
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
7581
+ }
7582
+
7583
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > .active > a {
7584
+ background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%);
7585
+ background-image: linear-gradient(to bottom, #222222 0%, #282828 100%);
7586
+ background-repeat: repeat-x;
7587
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);
7588
+ -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
7589
+ box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
7590
+ }
7591
+
7592
+ .factory-bootstrap-330 .navbar-inverse .navbar-brand,
7593
+ .factory-bootstrap-330 .navbar-inverse .navbar-nav > li > a {
7594
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
7595
+ }
7596
+
7597
+ .factory-bootstrap-330 .navbar-static-top,
7598
+ .factory-bootstrap-330 .navbar-fixed-top,
7599
+ .factory-bootstrap-330 .navbar-fixed-bottom {
7600
+ border-radius: 0;
7601
+ }
7602
+
7603
+ .factory-bootstrap-330 .alert {
7604
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
7605
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
7606
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
7607
+ }
7608
+
7609
+ .factory-bootstrap-330 .alert .actions {
7610
+ padding-top: 10px;
7611
+ }
7612
+
7613
+ .factory-bootstrap-330 .alert-success {
7614
+ color: #3c763d;
7615
+ background-color: #dff0d8;
7616
+ border-bottom: 2px solid #c8e5bc;
7617
+ }
7618
+
7619
+ .factory-bootstrap-330 .alert-info {
7620
+ background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
7621
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
7622
+ background-repeat: repeat-x;
7623
+ border-color: #9acfea;
7624
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
7625
+ }
7626
+
7627
+ .factory-bootstrap-330 .alert {
7628
+ text-shadow: none;
7629
+ box-shadow: none;
7630
+
7631
+ margin: 0px;
7632
+ margin-top: 10px;
7633
+ margin-bottom: 10px;
7634
+ padding: 10px;
7635
+ }
7636
+
7637
+ .factory-bootstrap-330 .alert-warning,
7638
+ .factory-bootstrap-330 .alert-normal {
7639
+ background: #fcf8e3;
7640
+ border: 0px;
7641
+ color: #8a6d3b;
7642
+ border: 1px solid #b8823b;
7643
+ }
7644
+
7645
+ .factory-bootstrap-330 .alert-danger {
7646
+ background: #cf4944;
7647
+ color: #fff;
7648
+ border-bottom: 2px solid #b23e3a;
7649
+ }
7650
+
7651
+ .factory-bootstrap-330 .alert-error a:not(.btn),
7652
+ .factory-bootstrap-330 .alert-danger a:not(.btn) {
7653
+ color: #fff;
7654
+ }
7655
+
7656
+ .factory-bootstrap-330 .progress {
7657
+ background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
7658
+ background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
7659
+ background-repeat: repeat-x;
7660
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
7661
+ }
7662
+
7663
+ .factory-bootstrap-330 .progress-bar {
7664
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);
7665
+ background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
7666
+ background-repeat: repeat-x;
7667
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
7668
+ }
7669
+
7670
+ .factory-bootstrap-330 .progress-bar-success {
7671
+ background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
7672
+ background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
7673
+ background-repeat: repeat-x;
7674
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
7675
+ }
7676
+
7677
+ .factory-bootstrap-330 .progress-bar-info {
7678
+ background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
7679
+ background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
7680
+ background-repeat: repeat-x;
7681
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
7682
+ }
7683
+
7684
+ .factory-bootstrap-330 .progress-bar-warning {
7685
+ background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
7686
+ background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
7687
+ background-repeat: repeat-x;
7688
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
7689
+ }
7690
+
7691
+ .factory-bootstrap-330 .progress-bar-danger {
7692
+ background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
7693
+ background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
7694
+ background-repeat: repeat-x;
7695
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
7696
+ }
7697
+
7698
+ .factory-bootstrap-330 .list-group {
7699
+ border-radius: 4px;
7700
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
7701
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
7702
+ }
7703
+
7704
+ .factory-bootstrap-330 .list-group-item.active,
7705
+ .factory-bootstrap-330 .list-group-item.active:hover,
7706
+ .factory-bootstrap-330 .list-group-item.active:focus {
7707
+ text-shadow: 0 -1px 0 #3071a9;
7708
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);
7709
+ background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
7710
+ background-repeat: repeat-x;
7711
+ border-color: #3278b3;
7712
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
7713
+ }
7714
+
7715
+ .factory-bootstrap-330 .panel {
7716
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
7717
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
7718
+ }
7719
+
7720
+ .factory-bootstrap-330 .panel-default > .panel-heading {
7721
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
7722
+ background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
7723
+ background-repeat: repeat-x;
7724
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
7725
+ }
7726
+
7727
+ .factory-bootstrap-330 .panel-primary > .panel-heading {
7728
+ background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
7729
+ background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
7730
+ background-repeat: repeat-x;
7731
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
7732
+ }
7733
+
7734
+ .factory-bootstrap-330 .panel-success > .panel-heading {
7735
+ background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
7736
+ background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
7737
+ background-repeat: repeat-x;
7738
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
7739
+ }
7740
+
7741
+ .factory-bootstrap-330 .panel-info > .panel-heading {
7742
+ background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
7743
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
7744
+ background-repeat: repeat-x;
7745
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
7746
+ }
7747
+
7748
+ .factory-bootstrap-330 .panel-warning > .panel-heading {
7749
+ background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
7750
+ background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
7751
+ background-repeat: repeat-x;
7752
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
7753
+ }
7754
+
7755
+ .factory-bootstrap-330 .panel-danger > .panel-heading {
7756
+ background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
7757
+ background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
7758
+ background-repeat: repeat-x;
7759
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
7760
+ }
7761
+
7762
+ .factory-bootstrap-330 .well {
7763
+ background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
7764
+ background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
7765
+ background-repeat: repeat-x;
7766
+ border-color: #dcdcdc;
7767
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
7768
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
7769
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
7770
+ }
7771
+
7772
+ /**
7773
+ * Extra
7774
+ */
7775
+
7776
+ .factory-bootstrap-330 .factory-after {
7777
+ margin-left: 7px;
7778
+ display: inline-block;
7779
+ }
7780
+
7781
+ .factory-bootstrap-330 .factory-hidden {
7782
+ display: none;
7783
+ }
7784
+
7785
+ .factory-bootstrap-330 .factory-ajax-loader {
7786
+ width: 25px;
7787
+ height: 25px;
7788
+ background: url("../assets/images/loader-sm-tr.gif")
7789
+ }
7790
+
7791
+ .factory-control-error {
7792
+
7793
+ background-color: rgba(0, 0, 0, 0.8);
7794
+ white-space: normal;
7795
+ z-index: 10;
7796
+ font-weight: normal;
7797
+ line-height: 150%;
7798
+ border-radius: 4px;
7799
+ color: #fff;
7800
+ font-size: 13px;
7801
+ margin-top: 5px;
7802
+
7803
+ padding: 4px 10px 3px 10px;
7804
+ max-width: 500px;
7805
+ display: inline-block;
7806
+ }
7807
+
7808
+ .factory-control-error i {
7809
+ margin: 0 7px 0 1px;
7810
+ }
libs/factory/bootstrap/assets/flat/css/bootstrap.datepicker.css ADDED
@@ -0,0 +1,782 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.ectoplasm.css ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-group.css ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Form Groups
3
+ */
4
+
5
+ .factory-bootstrap-330 .factory-form-group .factory-legend {
6
+ padding: 9px 12px;
7
+ background-color: #f9f9f9;
8
+ }
9
+
10
+ .factory-bootstrap-330 .factory-form-group .factory-title {
11
+ font-weight: bold;
12
+ font-size: 14px;
13
+ line-height: 14px;
14
+ color: #555;
15
+ margin: 0px;
16
+ }
17
+
18
+ .factory-bootstrap-330 .factory-form-group .factory-hint-icon {
19
+ display: block;
20
+ width: 16px;
21
+ height: 16px;
22
+ line-height: 13px;
23
+ padding: 0;
24
+ font-size: 11px;
25
+ text-align: center;
26
+ position: absolute;
27
+ top: -5px;
28
+ right: -3px;
29
+ color: #fff;
30
+ background: #E91E63;
31
+ border-radius: 3px;
32
+ }
33
+
34
+ .factory-bootstrap-330 .factory-form-group .factory-hint-icon.factory-hint-icon-green {
35
+ background: #8bc34a;
36
+ }
37
+
38
+ .factory-bootstrap-330 .factory-form-group .factory-hint-icon.factory-hint-icon-grey {
39
+ background: #9e9e9e;
40
+ }
41
+
42
+ .factory-bootstrap-330 .factory-form-group .factory-hint-icon.factory-hint-icon-red {
43
+ background: #E91E63;
44
+ }
45
+
46
+ .factory-bootstrap-330 .factory-form-group .factory-hint {
47
+ margin: 0px;
48
+ font-size: 12px;
49
+ line-height: 16px;
50
+ margin-top: 6px;
51
+ }
52
+
53
+ .factory-bootstrap-330 .factory-form-group + .factory-form-group {
54
+ margin-top: 30px;
55
+ }
56
+
57
+ .factory-bootstrap-330 .factory-form-group legend + .control-group {
58
+ margin-top: 0px;
59
+ }
libs/factory/bootstrap/assets/flat/css/bootstrap.form-metabox.css ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.light.css ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .factory-bootstrap-330 .btn-primary {
2
+ background: #04a4cc;
3
+ border-color: #037c9a;
4
+ color: white;
5
+ -webkit-box-shadow: inset 0 1px 0 #22cffb, 0 1px 0 rgba(0, 0, 0, 0.15);
6
+ box-shadow: inset 0 1px 0 #22cffb, 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: #0384a4;
11
+ border-color: #036881;
12
+ color: white;
13
+ -webkit-box-shadow: inset 0 1px 0 #09cafa, 0 1px 0 rgba(0, 0, 0, 0.15);
14
+ box-shadow: inset 0 1px 0 #09cafa, 0 1px 0 rgba(0, 0, 0, 0.15);
15
+ }
16
+ .factory-bootstrap-330 .btn-primary:active {
17
+ background: #0384a4;
18
+ border-color: #036881;
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: #c7cfd1 !important;
26
+ background: #0384a4 !important;
27
+ border-color: #036881 !important;
28
+ text-shadow: none !important;
29
+ }
30
+
31
+ .factory-bootstrap-330 .btn-group .btn.active.value {
32
+ background-color: #04a4cc;
33
+ -webkit-box-shadow: inset 0 1px 2px #037c9a;
34
+ box-shadow: inset 0 1px 2px #037c9a;
35
+ border-top: 1px solid #037c9a;
36
+ border-bottom: 1px solid #037c9a;
37
+ border-left: 1px solid #037c9a;
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: #04a4cc;
47
+ border-color: #037c9a;
48
+ }
libs/factory/bootstrap/assets/flat/css/bootstrap.midnight.css ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.separator.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Separator
3
+ */
4
+ .factory-bootstrap-330 .factory-separator {
5
+ border-bottom: 1px solid #f9f9f9;
6
+ border-top: 1px solid #d1d1d1;
7
+ margin-bottom: 25px;
8
+ }
libs/factory/bootstrap/assets/flat/css/bootstrap.sunrise.css ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.checkbox.css ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #side-sortables .factory-bootstrap-330 .factory-buttons-way {
2
+ float: right;
3
+ position: relative;
4
+ top: -25px;
5
+ left: 5px;
6
+ border: 3px solid #f9f9f9;
7
+ border-radius: 4px;
8
+ }
9
+
10
+ .factory-bootstrap-330 .factory-buttons-way {
11
+ border: 3px solid #f9f9f9;
12
+ border-radius: 4px;
13
+ }
14
+
15
+ .factory-bootstrap-330 .factory-buttons-way button {
16
+ padding-left: 10px;
17
+ padding-right: 10px;
18
+ }
19
+
20
+ .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
21
+ text-shadow: none;
22
+ color: #fff;
23
+ background-color: #33aad5;
24
+ -webkit-box-shadow: inset 0 1px 1px #0074a2;
25
+ box-shadow: inset 0 1px 3px #0074a2;
26
+ border-top: 1px solid #0074a2;
27
+ border-bottom: 1px solid #0074a2;
28
+ border-left: 1px solid #0074a2;
29
+ }
30
+
31
+ .factory-bootstrap-330 .factory-checkbox-tumbler-hint {
32
+ margin-top: 5px;
33
+ }
34
+
35
+ .factory-bootstrap-330 .factory-checkbox-tumbler-hint .factory-tumbler-content {
36
+ display: inline-block;
37
+ background-color: #ffffdd;
38
+ padding: 1px 5px;
39
+ }
40
+
41
+ .admin-color-light .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
42
+ background-color: #04a4cc;
43
+ -webkit-box-shadow: inset 0 1px 2px #037c9a;
44
+ box-shadow: inset 0 1px 2px #037c9a;
45
+ border-top: 1px solid #037c9a;
46
+ border-bottom: 1px solid #037c9a;
47
+ border-left: 1px solid #037c9a;
48
+ }
49
+
50
+ .admin-color-blue .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
51
+ background-color: #e1a948;
52
+ -webkit-box-shadow: inset 0 1px 2px #d39323;
53
+ box-shadow: inset 0 1px 2px #d39323;
54
+ border-top: 1px solid #d39323;
55
+ border-bottom: 1px solid #d39323;
56
+ border-left: 1px solid #d39323;
57
+ }
58
+
59
+ .admin-color-coffee .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
60
+ background-color: #c7a589;
61
+ -webkit-box-shadow: inset 0 1px 2px #b78a66;
62
+ box-shadow: inset 0 1px 2px #b78a66;
63
+ border-top: 1px solid #b78a66;
64
+ border-bottom: 1px solid #b78a66;
65
+ border-left: 1px solid #b78a66;
66
+ }
67
+
68
+ .admin-color-ectoplasm .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
69
+ background-color: #a3b745;
70
+ -webkit-box-shadow: inset 0 1px 2px #839237;
71
+ box-shadow: inset 0 1px 2px #839237;
72
+ border-top: 1px solid #839237;
73
+ border-bottom: 1px solid #839237;
74
+ border-left: 1px solid #839237;
75
+ }
76
+
77
+ .admin-color-midnight .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
78
+ background-color: #e14d43;
79
+ -webkit-box-shadow: inset 0 1px 2px #d02a21;
80
+ box-shadow: inset 0 1px 2px #d02a21;
81
+ border-top: 1px solid #d02a21;
82
+ border-bottom: 1px solid #d02a21;
83
+ border-left: 1px solid #d02a21;
84
+ }
85
+
86
+ .admin-color-ocean .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
87
+ background-color: #9ebaa0;
88
+ -webkit-box-shadow: inset 0 1px 2px #80a583;
89
+ box-shadow: inset 0 1px 2px #80a583;
90
+ border-top: 1px solid #80a583;
91
+ border-bottom: 1px solid #80a583;
92
+ border-left: 1px solid #80a583;
93
+ }
94
+
95
+ .admin-color-sunrise .factory-bootstrap-330 .factory-buttons-way .factory-on.active {
96
+ background-color: #dd823b;
97
+ -webkit-box-shadow: inset 0 1px 2px #c36822;
98
+ box-shadow: inset 0 1px 2px #c36822;
99
+ border-top: 1px solid #c36822;
100
+ border-bottom: 1px solid #c36822;
101
+ border-left: 1px solid #c36822;
102
+ }
libs/factory/bootstrap/assets/flat/css/control.color-and-opacity.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.dropdown.css ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Dropdown As Buttons
3
+ */
4
+
5
+ .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .fa {
6
+ margin-right: 6px;
7
+ position: relative;
8
+ }
9
+ .factory-bootstrap-330 .factory-dropdown.factory-buttons-way {
10
+ border: 0px;
11
+ border-radius: 0px;
12
+ }
13
+
14
+ .factory-bootstrap-330 .factory-hints .factory-hint {
15
+ margin-top: 5px;
16
+ display: inline-block;
17
+ background-color: #ffffdd;
18
+ padding: 1px 5px;
19
+ }
20
+
21
+ .admin-color-light .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .active {
22
+ background-color: #04a4cc;
23
+ -webkit-box-shadow: inset 0 1px 2px #037c9a;
24
+ box-shadow: inset 0 1px 2px #037c9a;
25
+ border-top: 1px solid #037c9a;
26
+ border-bottom: 1px solid #037c9a;
27
+ border-left: 1px solid #037c9a;
28
+ }
29
+ .admin-color-blue .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .active {
30
+ background-color: #e1a948;
31
+ -webkit-box-shadow: inset 0 1px 2px #d39323;
32
+ box-shadow: inset 0 1px 2px #d39323;
33
+ border-top: 1px solid #d39323;
34
+ border-bottom: 1px solid #d39323;
35
+ border-left: 1px solid #d39323;
36
+ }
37
+ .admin-color-coffee .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .active {
38
+ background-color: #c7a589;
39
+ -webkit-box-shadow: inset 0 1px 2px #b78a66;
40
+ box-shadow: inset 0 1px 2px #b78a66;
41
+ border-top: 1px solid #b78a66;
42
+ border-bottom: 1px solid #b78a66;
43
+ border-left: 1px solid #b78a66;
44
+ }
45
+ .admin-color-ectoplasm .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .active {
46
+ background-color: #a3b745;
47
+ -webkit-box-shadow: inset 0 1px 2px #839237;
48
+ box-shadow: inset 0 1px 2px #839237;
49
+ border-top: 1px solid #839237;
50
+ border-bottom: 1px solid #839237;
51
+ border-left: 1px solid #839237;
52
+ }
53
+ .admin-color-midnight .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .active {
54
+ background-color: #e14d43;
55
+ -webkit-box-shadow: inset 0 1px 2px #d02a21;
56
+ box-shadow: inset 0 1px 2px #d02a21;
57
+ border-top: 1px solid #d02a21;
58
+ border-bottom: 1px solid #d02a21;
59
+ border-left: 1px solid #d02a21;
60
+ }
61
+ .admin-color-ocean .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .active {
62
+ background-color: #9ebaa0;
63
+ -webkit-box-shadow: inset 0 1px 2px #80a583;
64
+ box-shadow: inset 0 1px 2px #80a583;
65
+ border-top: 1px solid #80a583;
66
+ border-bottom: 1px solid #80a583;
67
+ border-left: 1px solid #80a583;
68
+ }
69
+ .admin-color-sunrise .factory-bootstrap-330 .factory-dropdown.factory-buttons-way .active {
70
+ background-color: #dd823b;
71
+ -webkit-box-shadow: inset 0 1px 2px #c36822;
72
+ box-shadow: inset 0 1px 2px #c36822;
73
+ border-top: 1px solid #c36822;
74
+ border-bottom: 1px solid #c36822;
75
+ border-left: 1px solid #c36822;
76
+ }
77
+
78
+ /**
79
+ * Dropdown As ddSlick
80
+ * http://designwithpc.com/plugins/ddslick
81
+ */
82
+
83
+ .factory-bootstrap-330 .factory-dropdown.factory-ddslick-way .dd-select {
84
+ background-color: #fff !important;
85
+ }
86
+ .factory-bootstrap-330 .factory-dropdown.factory-ddslick-way label {
87
+ margin-bottom: 1px;
88
+ }
89
+ .factory-bootstrap-330 .factory-dropdown.factory-ddslick-way .dd-option,
90
+ .factory-bootstrap-330 .factory-dropdown.factory-ddslick-way .dd-selected {
91
+ padding: 8px 12px 8px 11px !important;
92
+ }
libs/factory/bootstrap/assets/flat/css/control.fonts.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1 @@
 
1
+
libs/factory/bootstrap/assets/flat/css/control.list.css ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.pattern.css ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/holder.more-link.css ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * More Link
3
+ */
4
+
5
+ .factory-bootstrap-330 .factory-more-link-content {
6
+ border-top: 1px dashed #DDD;
7
+ padding-top: 25px;
8
+ width: 100%;
9
+ padding-right: 20px;
10
+ position: relative;
11
+ }
12
+ .factory-bootstrap-330 .factory-tab .factory-more-link-show {
13
+ display: inline-block;
14
+ text-decoration: none;
15
+ border-bottom: 1px dotted #21759b;
16
+ position: relative;
17
+ }
18
+ .factory-bootstrap-330 .factory-tab .factory-more-link-show:hover {
19
+ border-color: #d54e21;
20
+ }
21
+ .factory-bootstrap-330 .factory-tab .factory-more-link-hide {
22
+ position: absolute;
23
+ margin-top: -35px;
24
+ background-color: #fff;
25
+ padding: 0 5px;
26
+ right: 20px;
27
+ color: #bbb;
28
+ text-decoration: none;
29
+ }
30
+ .factory-bootstrap-330 .factory-tab .factory-more-link-hide:hover {
31
+ color: #999;
32
+ }
libs/factory/bootstrap/assets/flat/css/plugin.chosen.css ADDED
@@ -0,0 +1,494 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1 @@
 
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 ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
Binary file
libs/factory/bootstrap/assets/images/chosen-sprite@2x.png ADDED
Binary file
libs/factory/bootstrap/assets/images/color_picker_pattern.jpg ADDED
Binary file
libs/factory/bootstrap/assets/images/drop-menu_arrow.png ADDED
Binary file
libs/factory/bootstrap/assets/images/loader-sm-f6f6f6.gif ADDED
Binary file
libs/factory/bootstrap/assets/images/loader-sm-tr.gif ADDED
Binary file
libs/factory/bootstrap/assets/images/no-pattern-background-control.png ADDED
Binary file
libs/factory/bootstrap/assets/js/bootstrap.accordion.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,1966 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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">&#160;</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">&#171;</th>' +
1894
+ '<th colspan="5" class="datepicker-switch"></th>' +
1895
+ '<th class="next">&#187;</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.dropdown.js ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ========================================================================
2
+ * Bootstrap: dropdown.js v3.0.3
3
+ * http://getbootstrap.com/javascript/#dropdowns
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
+ // DROPDOWN CLASS DEFINITION
24
+ // =========================
25
+
26
+ var backdrop = '.dropdown-backdrop'
27
+ var toggle = '[data-toggle=factory-dropdown]'
28
+ var Dropdown = function (element) {
29
+ $(element).on('click.bs.dropdown', this.toggle)
30
+ }
31
+
32
+ Dropdown.prototype.toggle = function (e) {
33
+ var $this = $(this)
34
+
35
+ if ($this.is('.disabled, :disabled')) return
36
+
37
+ var $parent = getParent($this)
38
+ var isActive = $parent.hasClass('open')
39
+
40
+ clearMenus()
41
+
42
+ if (!isActive) {
43
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
44
+ // if mobile we use a backdrop because click events don't delegate
45
+ $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
46
+ }
47
+
48
+ $parent.trigger(e = $.Event('show.bs.dropdown'))
49
+
50
+ if (e.isDefaultPrevented()) return
51
+
52
+ $parent
53
+ .toggleClass('open')
54
+ .trigger('shown.bs.dropdown')
55
+
56
+ $this.focus()
57
+ }
58
+
59
+ return false
60
+ }
61
+
62
+ Dropdown.prototype.keydown = function (e) {
63
+ if (!/(38|40|27)/.test(e.keyCode)) return
64
+
65
+ var $this = $(this)
66
+
67
+ e.preventDefault()
68
+ e.stopPropagation()
69
+
70
+ if ($this.is('.disabled, :disabled')) return
71
+
72
+ var $parent = getParent($this)
73
+ var isActive = $parent.hasClass('open')
74
+
75
+ if (!isActive || (isActive && e.keyCode == 27)) {
76
+ if (e.which == 27) $parent.find(toggle).focus()
77
+ return $this.click()
78
+ }
79
+
80
+ var $items = $('[role=menu] li:not(.divider):visible a', $parent)
81
+
82
+ if (!$items.length) return
83
+
84
+ var index = $items.index($items.filter(':focus'))
85
+
86
+ if (e.keyCode == 38 && index > 0) index-- // up
87
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
88
+ if (!~index) index=0
89
+
90
+ $items.eq(index).focus()
91
+ }
92
+
93
+ function clearMenus() {
94
+ $(backdrop).remove()
95
+ $(toggle).each(function (e) {
96
+ var $parent = getParent($(this))
97
+ if (!$parent.hasClass('open')) return
98
+ $parent.trigger(e = $.Event('hide.bs.dropdown'))
99
+ if (e.isDefaultPrevented()) return
100
+ $parent.removeClass('open').trigger('hidden.bs.dropdown')
101
+ })
102
+ }
103
+
104
+ function getParent($this) {
105
+ var selector = $this.attr('data-target')
106
+
107
+ if (!selector) {
108
+ selector = $this.attr('href')
109
+ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
110
+ }
111
+
112
+ var $parent = selector && $(selector)
113
+
114
+ return $parent && $parent.length ? $parent : $this.parent()
115
+ }
116
+
117
+
118
+ // DROPDOWN PLUGIN DEFINITION
119
+ // ==========================
120
+
121
+ $.fn.factoryBootstrap330_dropdown = function (option) {
122
+ return this.each(function () {
123
+ var $this = $(this)
124
+ var data = $this.data('bs.dropdown')
125
+
126
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
127
+ if (typeof option == 'string') data[option].call($this)
128
+ })
129
+ }
130
+
131
+ $.fn.factoryBootstrap330_dropdown.Constructor = Dropdown
132
+
133
+
134
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
135
+ // ===================================
136
+
137
+ $(document)
138
+ .on('click.bs.dropdown.data-api', clearMenus)
139
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
140
+ .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
141
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
142
+
143
+ }(jQuery);
libs/factory/bootstrap/assets/js/bootstrap.modal.js ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.tooltip.js ADDED
@@ -0,0 +1,455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ========================================================================
2
+ * Bootstrap: tooltip.js v3.0.3
3
+ * http://getbootstrap.com/javascript/#tooltip
4
+ * Inspired by the original jQuery.tipsy by Jason Frame
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
+ +function($) {
22
+ "use strict";
23
+
24
+ // TOOLTIP PUBLIC CLASS DEFINITION
25
+ // ===============================
26
+
27
+ var Tooltip = function(element, options) {
28
+ this.type =
29
+ this.options =
30
+ this.enabled =
31
+ this.timeout =
32
+ this.hoverState =
33
+ this.$element = null;
34
+
35
+ this.init('tooltip', element, options)
36
+ };
37
+
38
+ Tooltip.DEFAULTS = {
39
+ animation: true
40
+ ,
41
+ placement: 'top'
42
+ ,
43
+ selector: false
44
+ ,
45
+ template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
46
+ ,
47
+ trigger: 'hover focus'
48
+ ,
49
+ title: ''
50
+ ,
51
+ delay: 0
52
+ ,
53
+ html: false
54
+ ,
55
+ container: false
56
+ };
57
+
58
+ Tooltip.prototype.init = function(type, element, options) {
59
+ this.enabled = true;
60
+ this.type = type;
61
+ this.$element = $(element);
62
+ this.options = this.getOptions(options);
63
+
64
+ var triggers = this.options.trigger.split(' ');
65
+
66
+ for( var i = triggers.length; i--; ) {
67
+ var trigger = triggers[i];
68
+
69
+ if( trigger == 'click' ) {
70
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
71
+ } else if( trigger != 'manual' ) {
72
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus';
73
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur';
74
+
75
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this));
76
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
77
+ }
78
+ }
79
+
80
+ this.options.selector ?
81
+ (this._options = $.extend({}, this.options, {
82
+ trigger: 'manual',
83
+ selector: ''
84
+ })) :
85
+ this.fixTitle()
86
+ };
87
+
88
+ Tooltip.prototype.getDefaults = function() {
89
+ return Tooltip.DEFAULTS
90
+ };
91
+
92
+ Tooltip.prototype.getOptions = function(options) {
93
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
94
+
95
+ if( options.delay && typeof options.delay == 'number' ) {
96
+ options.delay = {
97
+ show: options.delay
98
+ ,
99
+ hide: options.delay
100
+ }
101
+ }
102
+
103
+ return options
104
+ };
105
+
106
+ Tooltip.prototype.getDelegateOptions = function() {
107
+ var options = {};
108
+ var defaults = this.getDefaults();
109
+
110
+ this._options && $.each(this._options, function(key, value) {
111
+ if( defaults[key] != value ) {
112
+ options[key] = value
113
+ }
114
+ });
115
+
116
+ return options
117
+ };
118
+
119
+ Tooltip.prototype.enter = function(obj) {
120
+ var self = obj instanceof this.constructor ?
121
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type);
122
+
123
+ clearTimeout(self.timeout);
124
+
125
+ self.hoverState = 'in';
126
+
127
+ if( !self.options.delay || !self.options.delay.show ) {
128
+ return self.show();
129
+ }
130
+
131
+ self.timeout = setTimeout(function() {
132
+ if( self.hoverState == 'in' ) {
133
+ self.show()
134
+ }
135
+ }, self.options.delay.show)
136
+ };
137
+
138
+ Tooltip.prototype.leave = function(obj) {
139
+ var self = obj instanceof this.constructor ?
140
+ obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type);
141
+
142
+ clearTimeout(self.timeout);
143
+
144
+ self.hoverState = 'out';
145
+
146
+ if( !self.options.delay || !self.options.delay.hide ) {
147
+ return self.hide();
148
+ }
149
+
150
+ self.timeout = setTimeout(function() {
151
+ if( self.hoverState == 'out' ) {
152
+ self.hide()
153
+ }
154
+ }, self.options.delay.hide)
155
+ };
156
+
157
+ Tooltip.prototype.show = function() {
158
+ var e = $.Event('show.bs.' + this.type);
159
+
160
+ if( this.hasContent() && this.enabled ) {
161
+ this.$element.trigger(e);
162
+
163
+ if( e.isDefaultPrevented() ) {
164
+ return;
165
+ }
166
+
167
+ var $tip = this.tip();
168
+
169
+ this.setContent();
170
+
171
+ if( this.options.animation ) {
172
+ $tip.addClass('fade');
173
+ }
174
+
175
+ var placement = typeof this.options.placement == 'function' ?
176
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
177
+ this.options.placement;
178
+
179
+ var autoToken = /\s?auto?\s?/i;
180
+ var autoPlace = autoToken.test(placement);
181
+ if( autoPlace ) {
182
+ placement = placement.replace(autoToken, '') || 'top';
183
+ }
184
+
185
+ $tip
186
+ .detach()
187
+ .css({
188
+ top: 0,
189
+ left: 0,
190
+ display: 'block'
191
+ })
192
+ .addClass(placement);
193
+
194
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element);
195
+
196
+ var pos = this.getPosition();
197
+ var actualWidth = $tip[0].offsetWidth;
198
+ var actualHeight = $tip[0].offsetHeight;
199
+
200
+ if( autoPlace ) {
201
+ var $parent = this.$element.parent();
202
+
203
+ var orgPlacement = placement;
204
+ var docScroll = document.documentElement.scrollTop || document.body.scrollTop;
205
+ var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth();
206
+ var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight();
207
+ var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left;
208
+
209
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight
210
+ ? 'top'
211
+ :
212
+ placement == 'top' && pos.top - docScroll - actualHeight < 0
213
+ ? 'bottom'
214
+ :
215
+ placement == 'right' && pos.right + actualWidth > parentWidth
216
+ ? 'left'
217
+ :
218
+ placement == 'left' && pos.left - actualWidth < parentLeft
219
+ ? 'right'
220
+ :
221
+ placement;
222
+
223
+ $tip
224
+ .removeClass(orgPlacement)
225
+ .addClass(placement)
226
+ }
227
+
228
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
229
+
230
+ this.applyPlacement(calculatedOffset, placement);
231
+ this.$element.trigger('shown.bs.' + this.type)
232
+ }
233
+ };
234
+
235
+ Tooltip.prototype.applyPlacement = function(offset, placement) {
236
+ var replace;
237
+ var $tip = this.tip();
238
+ var width = $tip[0].offsetWidth;
239
+ var height = $tip[0].offsetHeight;
240
+
241
+ // manually read margins because getBoundingClientRect includes difference
242
+ var marginTop = parseInt($tip.css('margin-top'), 10);
243
+ var marginLeft = parseInt($tip.css('margin-left'), 10);
244
+
245
+ // we must check for NaN for ie 8/9
246
+ if( isNaN(marginTop) ) {
247
+ marginTop = 0;
248
+ }
249
+ if( isNaN(marginLeft) ) {
250
+ marginLeft = 0;
251
+ }
252
+
253
+ offset.top = offset.top + marginTop;
254
+ offset.left = offset.left + marginLeft;
255
+
256
+ $tip
257
+ .offset(offset)
258
+ .addClass('in');
259
+
260
+ // check to see if placing tip in new offset caused the tip to resize itself
261
+ var actualWidth = $tip[0].offsetWidth;
262
+ var actualHeight = $tip[0].offsetHeight;
263
+
264
+ if( placement == 'top' && actualHeight != height ) {
265
+ replace = true;
266
+ offset.top = offset.top + height - actualHeight
267
+ }
268
+
269
+ if( /bottom|top/.test(placement) ) {
270
+ var delta = 0;
271
+
272
+ if( offset.left < 0 ) {
273
+ delta = offset.left * -2;
274
+ offset.left = 0;
275
+
276
+ $tip.offset(offset);
277
+
278
+ actualWidth = $tip[0].offsetWidth;
279
+ actualHeight = $tip[0].offsetHeight
280
+ }
281
+
282
+ this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
283
+ } else {
284
+ this.replaceArrow(actualHeight - height, actualHeight, 'top')
285
+ }
286
+
287
+ if( replace ) {
288
+ $tip.offset(offset)
289
+ }
290
+ };
291
+
292
+ Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
293
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
294
+ };
295
+
296
+ Tooltip.prototype.setContent = function() {
297
+ var $tip = this.tip();
298
+ var title = this.getTitle();
299
+
300
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title);
301
+ $tip.removeClass('fade in top bottom left right')
302
+ };
303
+
304
+ Tooltip.prototype.hide = function() {
305
+ var that = this;
306
+ var $tip = this.tip();
307
+ var e = $.Event('hide.bs.' + this.type);
308
+
309
+ function complete() {
310
+ if( that.hoverState != 'in' ) {
311
+ $tip.detach()
312
+ }
313
+ }
314
+
315
+ this.$element.trigger(e);
316
+
317
+ if( e.isDefaultPrevented() ) {
318
+ return;
319
+ }
320
+
321
+ $tip.removeClass('in');
322
+
323
+ $.support.transition && this.$tip.hasClass('fade') ?
324
+ $tip
325
+ .one($.support.transition.end, complete)
326
+ .emulateTransitionEnd(150) :
327
+ complete();
328
+
329
+ this.$element.trigger('hidden.bs.' + this.type);
330
+
331
+ return this
332
+ };
333
+
334
+ Tooltip.prototype.fixTitle = function() {
335
+ var $e = this.$element;
336
+ if( $e.attr('title') || typeof($e.attr('data-original-title')) != 'string' ) {
337
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
338
+ }
339
+ };
340
+
341
+ Tooltip.prototype.hasContent = function() {
342
+ return this.getTitle()
343
+ };
344
+
345
+ Tooltip.prototype.getPosition = function() {
346
+ var el = this.$element[0];
347
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
348
+ width: el.offsetWidth
349
+ ,
350
+ height: el.offsetHeight
351
+ }, this.$element.offset())
352
+ };
353
+
354
+ Tooltip.prototype.getCalculatedOffset = function(placement, pos, actualWidth, actualHeight) {
355
+ return placement == 'bottom' ? {
356
+ top: pos.top + pos.height,
357
+ left: pos.left + pos.width / 2 - actualWidth / 2
358
+ } :
359
+ placement == 'top' ? {
360
+ top: pos.top - actualHeight,
361
+ left: pos.left + pos.width / 2 - actualWidth / 2
362
+ } :
363
+ placement == 'left' ? {
364
+ top: pos.top + pos.height / 2 - actualHeight / 2,
365
+ left: pos.left - actualWidth
366
+ } :
367
+ /* placement == 'right' */ {
368
+ top: pos.top + pos.height / 2 - actualHeight / 2,
369
+ left: pos.left + pos.width
370
+ }
371
+ };
372
+
373
+ Tooltip.prototype.getTitle = function() {
374
+ var title;
375
+ var $e = this.$element;
376
+ var o = this.options;
377
+
378
+ title = $e.attr('data-original-title')
379
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title);
380
+
381
+ return title
382
+ };
383
+
384
+ Tooltip.prototype.tip = function() {
385
+ return this.$tip = this.$tip || $(this.options.template)
386
+ };
387
+
388
+ Tooltip.prototype.arrow = function() {
389
+ return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
390
+ };
391
+
392
+ Tooltip.prototype.validate = function() {
393
+ if( !this.$element[0].parentNode ) {
394
+ this.hide();
395
+ this.$element = null;
396
+ this.options = null
397
+ }
398
+ };
399
+
400
+ Tooltip.prototype.enable = function() {
401
+ this.enabled = true
402
+ };
403
+
404
+ Tooltip.prototype.disable = function() {
405
+ this.enabled = false
406
+ };
407
+
408
+ Tooltip.prototype.toggleEnabled = function() {
409
+ this.enabled = !this.enabled
410
+ };
411
+
412
+ Tooltip.prototype.toggle = function(e) {
413
+ var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this;
414
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
415
+ };
416
+
417
+ Tooltip.prototype.destroy = function() {
418
+ this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
419
+ };
420
+
421
+ // TOOLTIP PLUGIN DEFINITION
422
+ // =========================
423
+
424
+ var old = $.fn.tooltip;
425
+
426
+ $.fn.tooltip = function(option) {
427
+ return this.each(function() {
428
+ var $this = $(this);
429
+ var data = $this.data('bs.tooltip');
430
+ var options = typeof option == 'object' && option;
431
+
432
+ if( !data ) {
433
+ $this.data('bs.tooltip', (data = new Tooltip(this, options)));
434
+ }
435
+ if( typeof option == 'string' ) {
436
+ data[option]()
437
+ }
438
+ })
439
+ };
440
+
441
+ $.fn.tooltip.Constructor = Tooltip;
442
+
443
+ // TOOLTIP NO CONFLICT
444
+ // ===================
445
+
446
+ $.fn.tooltip.noConflict = function() {
447
+ $.fn.tooltip = old;
448
+ return this
449
+ };
450
+
451
+ $(function() {
452
+ $('[data-toggle="factory-tooltip"]').tooltip({html: true});
453
+ })
454
+
455
+ }(jQuery);
libs/factory/bootstrap/assets/js/bootstrap.transition.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.checkbox.js ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function($) {
2
+
3
+ // CHECKBOX CONTROL CLASS DEFINITION
4
+ // ================================
5
+
6
+ var CheckboxControl = function(element) {
7
+ var self = this;
8
+ this.$element = $(element);
9
+
10
+ this.$result = this.$element.find(".factory-result");
11
+ this.$on = this.$element.find(".factory-on");
12
+ this.$off = this.$element.find(".factory-off");
13
+
14
+ var isTumbler = this.$element.is(".factory-tumbler");
15
+ var hasTumblerHint = this.$element.is(".factory-has-tumbler-hint");
16
+ var tumblerFunction = this.$element.data('tumbler-function');
17
+
18
+ var tumblerDelay = this.$element.data('tumbler-delay');
19
+ if( !tumblerDelay ) {
20
+ tumblerDelay = 3000;
21
+ }
22
+
23
+ this.callByPath = function(functionName, args) {
24
+ var parts = functionName.split(".");
25
+ var obj = window;
26
+
27
+ for( var i = 0; i < parts.length; i++ ) {
28
+ obj = obj[parts[i]];
29
+ }
30
+
31
+ obj.apply(obj, args);
32
+ }
33
+
34
+ this.$on.click(function() {
35
+
36
+ self.$off.removeClass('active');
37
+ self.$on.addClass('active');
38
+
39
+ if( !isTumbler ) {
40
+ self.$result.attr('checked', 'checked');
41
+ self.$result.val(1);
42
+ self.$result.trigger('change');
43
+ } else {
44
+
45
+ setTimeout(function() {
46
+ self.$on.removeClass('active');
47
+ self.$off.addClass('active');
48
+
49
+ var $hint = hasTumblerHint ? self.$element.next() : null;
50
+
51
+ if( tumblerFunction ) {
52
+ self.callByPath(tumblerFunction, [self.$element, $hint]);
53
+ } else {
54
+ if( hasTumblerHint ) {
55
+ self.$element.next().fadeIn(300);
56
+ setTimeout(function() {
57
+ self.$element.next().fadeOut(500);
58
+ }, tumblerDelay);
59
+ }
60
+ }
61
+
62
+ }, 300);
63
+ }
64
+
65
+ return false;
66
+ });
67
+
68
+ this.$off.click(function() {
69
+
70
+ self.$on.removeClass('active');
71
+ self.$off.addClass('active');
72
+
73
+ if( !isTumbler ) {
74
+ self.$result.removeAttr('checked');
75
+ self.$result.val(0);
76
+ self.$result.trigger('change');
77
+ } else {
78
+
79
+ setTimeout(function() {
80
+ self.$off.removeClass('active');
81
+ self.$on.addClass('active');
82
+
83
+ var $hint = hasTumblerHint ? self.$element.next() : null;
84
+
85
+ if( tumblerFunction ) {
86
+ self.callByPath(tumblerFunction, [self.$element, $hint]);
87
+ } else {
88
+ if( hasTumblerHint ) {
89
+ self.$element.next().fadeIn(300);
90
+ setTimeout(function() {
91
+ self.$element.next().fadeOut(500);
92
+ }, tumblerDelay);
93
+ }
94
+ }
95
+
96
+ }, 300);
97
+ }
98
+
99
+ return false;
100
+ });
101
+
102
+ this.hashCode = function(str) {
103
+ var hash = 0;
104
+ if( !str || str.length === 0 ) {
105
+ return hash;
106
+ }
107
+ for( var i = 0; i < str.length; i++ ) {
108
+ var charCode = str.charCodeAt(i);
109
+ hash = ((hash << 5) - hash) + charCode;
110
+ hash = hash & hash;
111
+ }
112
+ hash = hash.toString(16);
113
+ hash = hash.replace("-", "");
114
+ return hash;
115
+ };
116
+
117
+ this.executeEvents = function(element) {
118
+ if( void 0 === window.__factory_checkbox_control_events_off_data && void 0 === window.__factory_checkbox_control_events_on_data ) {
119
+ return;
120
+ }
121
+ element.change(function() {
122
+ self.eventsProcess(element);
123
+ });
124
+
125
+ self.eventsProcess(element);
126
+ };
127
+
128
+ this.eventsProcess = function(element) {
129
+ var controlName = element.attr('name'),
130
+ controlIsChecked = element.prop('checked');
131
+
132
+ var controlEventsOnData = window.__factory_checkbox_control_events_on_data[controlName];
133
+ var controlEventsOffData = window.__factory_checkbox_control_events_off_data[controlName];
134
+
135
+ if( !controlEventsOnData && !controlEventsOffData ) {
136
+ return;
137
+ }
138
+
139
+ var detachElements, currentEventsData;
140
+
141
+ if( void 0 === window.__factory_checkbox_control_detach_elements ) {
142
+ window.__factory_checkbox_control_detach_elements = {};
143
+ }
144
+
145
+ detachElements = window.__factory_checkbox_control_detach_elements;
146
+
147
+ if( controlIsChecked ) {
148
+ currentEventsData = controlEventsOnData;
149
+ } else {
150
+ currentEventsData = controlEventsOffData;
151
+ }
152
+
153
+ for( var event in currentEventsData ) {
154
+ if( !currentEventsData.hasOwnProperty(event) ) {
155
+ continue;
156
+ }
157
+
158
+ var selector = currentEventsData[event];
159
+
160
+ var uqName;
161
+ if( !$.isArray(selector) ) {
162
+ uqName = self.hashCode(controlName + selector);
163
+ }
164
+
165
+ var selectorName;
166
+
167
+ switch( event ) {
168
+ case 'hide':
169
+ if( typeof selector === 'string' ) {
170
+ $(selector).hide(0);
171
+ }
172
+ break;
173
+ case 'show':
174
+ if( typeof selector === 'string' ) {
175
+ $(selector).fadeIn(200);
176
+ }
177
+ break;
178
+ case 'detach':
179
+ if( typeof selector === 'string' ) {
180
+ $(selector).each(function(i) {
181
+ if( !detachElements[uqName] ) {
182
+ detachElements[uqName] = {};
183
+ }
184
+ if( !detachElements[uqName][i] ) {
185
+ detachElements[uqName][i] = {};
186
+ }
187
+ detachElements[uqName][i]['recovery_contanier'] = $(this).parent();
188
+ detachElements[uqName][i]['element'] = $(this).clone(true);
189
+
190
+ $(this).remove();
191
+ });
192
+ }
193
+ break;
194
+ case 'recovery':
195
+ if( detachElements[uqName] ) {
196
+ for( var key in detachElements[uqName] ) {
197
+ if( !detachElements[uqName].hasOwnProperty(key) ) {
198
+ continue;
199
+ }
200
+ if( detachElements[uqName][key]['recovery_contanier'] && detachElements[uqName][key]['element'] ) {
201
+ detachElements[uqName][key]['recovery_contanier'].append(detachElements[uqName][key]['element']);
202
+ }
203
+ }
204
+ delete detachElements[uqName];
205
+ }
206
+ break;
207
+ case 'removeClasses':
208
+ if( typeof selector === 'object' ) {
209
+ for( selectorName in selector ) {
210
+ if( !selector.hasOwnProperty(selectorName) ) {
211
+ continue;
212
+ }
213
+ if( selector[selectorName] ) {
214
+ $(selectorName).removeClass(selector[selectorName]);
215
+ }
216
+
217
+ }
218
+ }
219
+ break;
220
+ case 'addClasses':
221
+ if( typeof selector === 'object' ) {
222
+ for( selectorName in selector ) {
223
+ if( !selector.hasOwnProperty(selectorName) ) {
224
+ continue;
225
+ }
226
+ if( selector[selectorName] ) {
227
+ $(selectorName).addClass(selector[selectorName]);
228
+ }
229
+
230
+ }
231
+ }
232
+ break;
233
+ case 'setValue':
234
+ if( typeof selector === 'object' ) {
235
+ for( selectorName in selector ) {
236
+ if( !selector.hasOwnProperty(selectorName) ) {
237
+ continue;
238
+ }
239
+
240
+ if( selector[selectorName] !== void 0 && selector[selectorName] !== null ) {
241
+ console.log(selector[selectorName]);
242
+ $(selectorName).val(selector[selectorName]);
243
+ }
244
+ }
245
+ }
246
+ break;
247
+ }
248
+ }
249
+ };
250
+
251
+ this.executeEvents(this.$result);
252
+
253
+ };
254
+
255
+ // CHECKBOX CONTROL DEFINITION
256
+ // ================================
257
+
258
+ $.fn.factoryBootstrap330_checkboxControl = function(option) {
259
+
260
+ // call an method
261
+ if( typeof option === "string" ) {
262
+ var data = $(this).data('factory.checkbox.control');
263
+ if( !data ) {
264
+ return null;
265
+ }
266
+ return data[option]();
267
+ }
268
+
269
+ // creating an object
270
+ else {
271
+ return this.each(function() {
272
+ var $this = $(this);
273
+ var data = $this.data('factory.checkbox.control');
274
+ if( !data ) {
275
+ $this.data('factory.checkbox.control', (data = new CheckboxControl(this)));
276
+ }
277
+ });
278
+ }
279
+ };
280
+
281
+ $.fn.factoryBootstrap330_checkboxControl.Constructor = CheckboxControl;
282
+
283
+ // AUTO CREATING
284
+ // ================================
285
+
286
+ $(function() {
287
+ $(".factory-bootstrap-330 .factory-checkbox.factory-buttons-way").factoryBootstrap330_checkboxControl();
288
+ });
289
+
290
+ }(jQuery) );
libs/factory/bootstrap/assets/js/control.color-and-opacity.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.dropdown.js ADDED
@@ -0,0 +1,355 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function($) {
2
+
3
+ // DROPDOWN CONTROL CLASS DEFINITION
4
+ // ================================
5
+
6
+ var DropdownControl = function(element) {
7
+ var self = this;
8
+
9
+ this.$element = $(element);
10
+ this.way = this.$element.data('way');
11
+ this.name = this.$element.data('name') || this.$element.attr('name');
12
+
13
+ this.hashCode = function(str) {
14
+ var hash = 0;
15
+ if( !str || str.length === 0 ) {
16
+ return hash;
17
+ }
18
+ for( var i = 0; i < str.length; i++ ) {
19
+ var charCode = str.charCodeAt(i);
20
+ hash = ((hash << 5) - hash) + charCode;
21
+ hash = hash & hash;
22
+ }
23
+ hash = hash.toString(16);
24
+ hash = hash.replace("-", "");
25
+ return hash;
26
+ };
27
+
28
+ this.executeEvents = function(element) {
29
+ if( void 0 === window.factory_dropdown_control_events_data ) {
30
+ return;
31
+ }
32
+
33
+ element.change(function() {
34
+ self.eventsProcess(element);
35
+ });
36
+
37
+ self.eventsProcess(element);
38
+ };
39
+
40
+ this.eventsProcess = function(element) {
41
+ var controlName = element.attr('name'),
42
+ controlValue = element.val();
43
+ var controlEventsData = window.factory_dropdown_control_events_data[controlName];
44
+
45
+ if( !controlEventsData || !controlEventsData[controlValue] ) {
46
+ return;
47
+ }
48
+
49
+ var detachElements;
50
+
51
+ if( void 0 === window.__factory_dropdown_control_detach_elements ) {
52
+ window.__factory_dropdown_control_detach_elements = {};
53
+ }
54
+
55
+ detachElements = window.__factory_dropdown_control_detach_elements;
56
+
57
+ for( var event in controlEventsData[controlValue] ) {
58
+ if( !controlEventsData[controlValue].hasOwnProperty(event) ) {
59
+ continue;
60
+ }
61
+
62
+ var selector = controlEventsData[controlValue][event];
63
+
64
+ var uqName;
65
+ if( !$.isArray(selector) ) {
66
+ uqName = self.hashCode(controlName + selector);
67
+ }
68
+
69
+ switch( event ) {
70
+ case 'hide':
71
+ if( typeof selector === 'string' ) {
72
+ $(selector).hide(0);
73
+ }
74
+ break;
75
+ case 'show':
76
+ if( typeof selector === 'string' ) {
77
+ $(selector).fadeIn(200);
78
+ }
79
+ break;
80
+ case 'detach':
81
+ if( typeof selector === 'string' ) {
82
+ $(selector).each(function(i) {
83
+ if( !detachElements[uqName] ) {
84
+ detachElements[uqName] = {};
85
+ }
86
+ if( !detachElements[uqName][i] ) {
87
+ detachElements[uqName][i] = {};
88
+ }
89
+ detachElements[uqName][i]['recovery_contanier'] = $(this).parent();
90
+ detachElements[uqName][i]['element'] = $(this).clone(true);
91
+
92
+ $(this).remove();
93
+ });
94
+ }
95
+ break;
96
+ case 'recovery':
97
+ if( detachElements[uqName] ) {
98
+ for( var key in detachElements[uqName] ) {
99
+ if( !detachElements[uqName].hasOwnProperty(key) ) {
100
+ continue;
101
+ }
102
+ if( detachElements[uqName][key]['recovery_contanier'] && detachElements[uqName][key]['element'] ) {
103
+ detachElements[uqName][key]['recovery_contanier'].append(detachElements[uqName][key]['element']);
104
+ }
105
+ }
106
+ delete detachElements[uqName];
107
+ }
108
+ break;
109
+ case 'removeClasses':
110
+ if( typeof selector === 'object' ) {
111
+ for( var selectorName in selector ) {
112
+ if( !selector.hasOwnProperty(selectorName) ) {
113
+ continue;
114
+ }
115
+ if( selector[selectorName] ) {
116
+ $(selectorName).removeClass(selector[selectorName]);
117
+ }
118
+
119
+ }
120
+ }
121
+ break;
122
+ case 'addClasses':
123
+ if( typeof selector === 'object' ) {
124
+ for( var selectorName in selector ) {
125
+ if( !selector.hasOwnProperty(selectorName) ) {
126
+ continue;
127
+ }
128
+ if( selector[selectorName] ) {
129
+ $(selectorName).addClass(selector[selectorName]);
130
+ }
131
+
132
+ }
133
+ }
134
+ break;
135
+ }
136
+ }
137
+ };
138
+
139
+ if( 'buttons' === this.way ) {
140
+
141
+ this.$result = this.$element.find(".factory-result");
142
+ this.$hints = this.$element.find(".factory-hints");
143
+ this.$buttons = this.$element.find(".btn");
144
+
145
+ self.executeEvents(this.$result);
146
+
147
+ this.$buttons.click(function() {
148
+ var value = $(this).data('value');
149
+
150
+ self.$buttons.removeClass('active');
151
+ $(this).addClass('active');
152
+
153
+ self.$hints.find(".factory-hint").hide();
154
+ self.$hints.find(".factory-hint-" + value).fadeIn();
155
+
156
+ self.$result.val(value);
157
+ self.$result.trigger('change');
158
+
159
+ return false;
160
+ });
161
+
162
+ } else if( 'ddslick' === this.way ) {
163
+ self.executeEvents(self.$element.find(".factory-result"));
164
+
165
+ var data = window['factory_' + this.name + "_data"];
166
+ var $ddslick = this.$element.find(".factory-ddslick");
167
+
168
+ var width = this.$element.data("width") || 300;
169
+ var imagePosition = this.$element.data("align") || 'right';
170
+
171
+ $(data).each(function() {
172
+ if( !this.imageHoverSrc ) {
173
+ return true;
174
+ }
175
+ $('<img/>')[0].src = this.imageHoverSrc;
176
+ });
177
+
178
+ $ddslick.ddslick({
179
+ data: data,
180
+ width: width,
181
+ imagePosition: imagePosition,
182
+ selectText: "- select -",
183
+ onSelected: function(data) {
184
+
185
+ if( data.selectedData.imageHoverSrc ) {
186
+ self.$element.find(".dd-selected-image").attr('src', data.selectedData.imageHoverSrc);
187
+ }
188
+
189
+ var $result = self.$element.find(".factory-result").val(data.selectedData.value);
190
+ $result.change();
191
+ }
192
+ });
193
+
194
+ } else {
195
+
196
+ self.executeEvents(this.$element);
197
+
198
+ // hints
199
+
200
+ this.$hints = this.$element.next();
201
+
202
+ if( this.$hints.hasClass('factory-hints') ) {
203
+ this.$element.change(function() {
204
+ self.updateHints();
205
+ return false;
206
+ });
207
+
208
+ this.updateHints = function() {
209
+ var value = self.$element.val();
210
+ self.$hints.find(".factory-hint").hide();
211
+ self.$hints.find(".factory-hint-" + value).show();
212
+ };
213
+
214
+ self.updateHints();
215
+ }
216
+
217
+ // ajax
218
+
219
+ this.getAjaxData = function() {
220
+ var ajaxDataID = self.$element.data('ajax-data-id');
221
+ return window[ajaxDataID];
222
+ };
223
+
224
+ this.loadData = function() {
225
+
226
+ var ajaxData = self.getAjaxData();
227
+
228
+ var req = $.ajax({
229
+ url: ajaxData.url,
230
+ data: ajaxData.data,
231
+ dataType: 'json',
232
+
233
+ success: function(response) {
234
+ if( response.error ) {
235
+ return self.showError(response.error);
236
+ }
237
+ self.fill(response.items);
238
+ },
239
+ error: function(response) {
240
+
241
+ if( console && console.log ) {
242
+ console.log(response.responseText);
243
+ }
244
+
245
+ self.showError('Unexpected error occurred during the ajax request.');
246
+ },
247
+ complete: function() {
248
+ self.removeLoader();
249
+ }
250
+ });
251
+ };
252
+
253
+ this.fill = function(items) {
254
+ this.clearList();
255
+
256
+ var ajaxData = self.getAjaxData();
257
+
258
+ if( !items || !items.length ) {
259
+
260
+ this.$element.append("<option>" + ajaxData.emptyList + "</li>");
261
+
262
+ } else {
263
+
264
+ for( var index in items ) {
265
+ var item = items[index];
266
+ self.addListItem(item);
267
+ }
268
+ }
269
+
270
+ this.$element.trigger("factory-loaded");
271
+ };
272
+
273
+ this.clearList = function() {
274
+ this.$element.html("");
275
+ };
276
+
277
+ this.addListItem = function(item) {
278
+
279
+ var $option = $('<option />')
280
+ .attr('value', item.value)
281
+ .text(item.title)
282
+ .appendTo(this.$element);
283
+
284
+ var ajaxData = self.getAjaxData();
285
+
286
+ if( ajaxData.selected && ajaxData.selected == item.value ) {
287
+ $option.attr('selected', 'selected');
288
+ }
289
+ };
290
+
291
+ this.showError = function(text) {
292
+ this.clearList();
293
+
294
+ var $error = $("<div class='factory-control-error'></div>")
295
+ .append($("<i class='fa fa-exclamation-triangle'></i>"))
296
+ .append(text);
297
+
298
+ var ajaxData = self.getAjaxData();
299
+
300
+ this.$element.append("<option>" + ajaxData.emptyList + "</li>");
301
+ this.$element.after($error);
302
+
303
+ this.$element.addClass('factory-has-error');
304
+ };
305
+
306
+ this.removeLoader = function() {
307
+ this.$element.removeClass('factory-hidden');
308
+
309
+ var ajaxData = self.getAjaxData();
310
+ $(ajaxData.loader).remove();
311
+ };
312
+
313
+ var ajax = this.$element.data('ajax');
314
+ if( ajax ) {
315
+ this.loadData();
316
+ }
317
+ }
318
+ };
319
+
320
+ // DROPDOWN CONTROL DEFINITION
321
+ // ================================
322
+
323
+ $.fn.factoryBootstrap330_dropdownControl = function(option) {
324
+
325
+ // call an method
326
+ if( typeof option === "string" ) {
327
+ var data = $(this).data('factory.dropdown.control');
328
+ if( !data ) {
329
+ return null;
330
+ }
331
+ return data[option]();
332
+ }
333
+
334
+ // creating an object
335
+ else {
336
+ return this.each(function() {
337
+ var $this = $(this);
338
+ var data = $this.data('factory.dropdown.control');
339
+ if( !data ) {
340
+ $this.data('factory.dropdown.control', (data = new DropdownControl(this)));
341
+ }
342
+ });
343
+ }
344
+ };
345
+
346
+ $.fn.factoryBootstrap330_dropdownControl.Constructor = DropdownControl;
347
+
348
+ // AUTO CREATING
349
+ // ================================
350
+
351
+ $(function() {
352
+ $(".factory-bootstrap-330 .factory-dropdown").factoryBootstrap330_dropdownControl();
353
+ });
354
+
355
+ }(jQuery) );
libs/factory/bootstrap/assets/js/control.fonts.js ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.list.js ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ){
2
+
3
+ var list = function (element) {
4
+ var self = this;
5
+
6
+ this.$element = $(element);
7
+ this.way = this.$element.data('way');
8
+ this.name = this.$element.data('name');
9
+
10
+ // curently the control supports only checklists
11
+ if ( 'checklist' !== this.way ) return;
12
+
13
+ this.getAjaxData = function() {
14
+ var ajaxDataID = self.$element.data('ajax-data-id');
15
+ return window[ajaxDataID];
16
+ }
17
+
18
+ this.loadData = function() {
19
+
20
+ var ajaxData = self.getAjaxData();
21
+
22
+ var req = $.ajax({
23
+ url: ajaxData.url,
24
+ data: ajaxData.data,
25
+ dataType: 'json',
26
+
27
+ success: function( response ){
28
+ if ( response.error ) return self.showError( response.error );
29
+ self.fill( response.items );
30
+ },
31
+ error: function() {
32
+ self.showError('Unexpected error occurred during the ajax request.');
33
+ },
34
+ complete: function() {
35
+ self.removeLoader();
36
+ }
37
+ });
38
+ };
39
+
40
+ this.fill = function( items ) {
41
+ this.clearList();
42
+
43
+ var ajaxData = self.getAjaxData();
44
+
45
+ if ( !items || !items.length ) {
46
+
47
+ this.$element.addClass('factory-empty');
48
+ this.$element.append("<li>" + ajaxData.emptyList + "</li>");
49
+
50
+ } else {
51
+
52
+ this.$element.removeClass('factory-empty');
53
+
54
+ for( var index in items ) {
55
+ var item = items[index];
56
+ self.addListItem( item );
57
+ }
58
+ }
59
+ };
60
+
61
+ this.clearList = function() {
62
+ this.$element.html("");
63
+ };
64
+
65
+ this.addListItem = function( item ) {
66
+
67
+ var $li = $('<li>');
68
+
69
+ var $label = $('<label>')
70
+ .attr('for', 'factory-checklist-' + self.name + '-' + item.value)
71
+ .appendTo($li);
72
+
73
+ var $checkboxSpan = $('<span>')
74
+ .appendTo($label);
75
+
76
+ var $checkbox = $('<input />')
77
+ .attr('type', 'checkbox')
78
+ .attr('name', self.name + "[]")
79
+ .val(item.value)
80
+ .attr('id', 'factory-checklist-' + self.name + '-' + item.value)
81
+ .appendTo($checkboxSpan);
82
+
83
+
84
+ var $title = $('<span>' + item.title + '</span>')
85
+ .appendTo($label);
86
+
87
+
88
+ var ajaxData = self.getAjaxData();
89
+ if ( ajaxData.selected.length && $.inArray( item.value, ajaxData.selected ) >= 0 ) {
90
+ $checkbox.attr('checked', 'checked');
91
+ }
92
+
93
+ this.$element.append($li);
94
+ };
95
+
96
+ this.showError = function( text ) {
97
+
98
+ this.$element.html("")
99
+ .append($("<i class='fa fa-exclamation-triangle'></i>"))
100
+ .append( text );
101
+
102
+ this.$element.addClass('factory-list-error');
103
+ };
104
+
105
+ this.removeLoader = function() {
106
+ this.$element.removeClass('factory-hidden');
107
+
108
+ var ajaxData = self.getAjaxData();
109
+ $( ajaxData.loader ).remove();
110
+ }
111
+
112
+ var ajax = this.$element.data('ajax');
113
+ if ( ajax ) this.loadData();
114
+ };
115
+
116
+ $.fn.factoryBootstrap330_listControl = function (option) {
117
+
118
+ // call an method
119
+ if ( typeof option === "string" ) {
120
+ var data = $(this).data('factory.list.control');
121
+ if ( !data ) return null;
122
+ return data[option]();
123
+ }
124
+
125
+ // creating an object
126
+ else {
127
+ return this.each(function () {
128
+ var $this = $(this);
129
+ var data = $this.data('factory.list.control');
130
+ if (!data) $this.data('factory.list.control', (data = new list(this)));
131
+ });
132
+ }
133
+ };
134
+
135
+ $.fn.factoryBootstrap330_listControl.Constructor = list;
136
+
137
+ $(function(){
138
+ $(".factory-bootstrap-330 .factory-list").factoryBootstrap330_listControl();
139
+ });
140
+
141
+ }( jQuery ) );
libs/factory/bootstrap/assets/js/control.pattern.js ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,1211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "<": "&lt;",
90
+ ">": "&gt;",
91
+ '"': "&quot;",
92
+ "'": "&#x27;",
93
+ "`": "&#x60;"
94
+ };
95
+ unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
96
+ return text.replace(unsafe_chars, function(chr) {
97
+ return map[chr] || "&amp;";
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 ADDED
@@ -0,0 +1,595 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1 @@
 
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 ADDED
@@ -0,0 +1,585 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,893 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/bootstrap/boot.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Factory Bootstrap
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>, Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2013, OnePress Ltd, (c) 2017 Webcraftic Ltd
7
+ *
8
+ * @package factory-bootstrap
9
+ * @since 1.0.0
10
+ */
11
+
12
+ // module provides function only for the admin area
13
+ if( !is_admin() ) {
14
+ return;
15
+ }
16
+
17
+ if( defined('FACTORY_BOOTSTRAP_330_LOADED') ) {
18
+ return;
19
+ }
20
+ define('FACTORY_BOOTSTRAP_330_LOADED', true);
21
+
22
+ define('FACTORY_BOOTSTRAP_330_DIR', dirname(__FILE__));
23
+ define('FACTORY_BOOTSTRAP_330_URL', plugins_url(null, __FILE__));
24
+
25
+ // sets version of admin interface
26
+ define('FACTORY_BOOTSTRAP_330_VERSION', 'FACTORY_BOOTSTRAP_330');
27
+ if( !defined('FACTORY_FLAT_ADMIN') ) {
28
+ define('FACTORY_FLAT_ADMIN', true);
29
+ }
30
+
31
+ include_once(FACTORY_BOOTSTRAP_330_DIR . '/includes/functions.php');
libs/factory/bootstrap/includes/functions.php ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file manages assets of the Factory Bootstap.
4
+ *
5
+ * @author Alex Kovalev <alex@byonepress.com>
6
+ * @author Paul Kashtanoff <paul@byonepress.com>
7
+ * @copyright (c) 2013, OnePress Ltd
8
+ *
9
+ * @package core
10
+ * @since 1.0.0
11
+ */
12
+
13
+ add_action('factory_bootstrap_330_plugin_created', 'factory_bootstrap_330_plugin_created');
14
+ function factory_bootstrap_330_plugin_created($plugin)
15
+ {
16
+ $manager = new FactoryBootstrap330_Manager($plugin);
17
+ $plugin->bootstrap = $manager;
18
+ }
19
+
20
+ /**
21
+ * The Bootstrap Manager class.
22
+ *
23
+ * @since 3.2.0
24
+ */
25
+ class FactoryBootstrap330_Manager {
26
+
27
+ /**
28
+ * A plugin for which the manager was created.
29
+ *
30
+ * @since 3.2.0
31
+ * @var Factory326_Plugin
32
+ */
33
+ public $plugin;
34
+
35
+ /**
36
+ * Contains scripts to include.
37
+ *
38
+ * @since 3.2.0
39
+ * @var string[]
40
+ */
41
+ public $scripts = array();
42
+
43
+ /**
44
+ * Contains styles to include.
45
+ *
46
+ * @since 3.2.0
47
+ * @var string[]
48
+ */
49
+ public $styles = array();
50
+
51
+ /**
52
+ * Createas a new instance of the license api for a given plugin.
53
+ *
54
+ * @since 1.0.0
55
+ */
56
+ public function __construct($plugin)
57
+ {
58
+ $this->plugin = $plugin;
59
+
60
+ add_action('admin_enqueue_scripts', array($this, 'loadAssets'));
61
+ add_filter('admin_body_class', array($this, 'adminBodyClass'));
62
+ }
63
+
64
+ /**
65
+ * Includes the Bootstrap scripts.
66
+ *
67
+ * @since 3.2.0
68
+ * @param mixedp[] $scripts
69
+ * @return void
70
+ */
71
+ public function enqueueScript($scripts)
72
+ {
73
+
74
+ if( is_array($scripts) ) {
75
+ foreach($scripts as $script) {
76
+ if( !in_array($script, $this->scripts) ) {
77
+ $this->scripts[] = $script;
78
+ }
79
+ }
80
+ } else {
81
+ if( !in_array($scripts, $this->scripts) ) {
82
+ $this->scripts[] = $scripts;
83
+ }
84
+ }
85
+ }
86
+
87
+ /**
88
+ * Includes the Bootstrap styles.
89
+ *
90
+ * @since 3.2.0
91
+ * @param mixedp[] $scripts
92
+ * @return void
93
+ */
94
+ public function enqueueStyle($styles)
95
+ {
96
+
97
+ if( is_array($styles) ) {
98
+ foreach($styles as $style) {
99
+ if( !in_array($style, $this->styles) ) {
100
+ $this->styles[] = $style;
101
+ }
102
+ }
103
+ } else {
104
+ if( !in_array($styles, $this->styles) ) {
105
+ $this->styles[] = $styles;
106
+ }
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Loads Bootstrap assets.
112
+ *
113
+ * @see admin_enqueue_scripts
114
+ *
115
+ * @since 3.2.0
116
+ * @return void
117
+ */
118
+ public function loadAssets($hook)
119
+ {
120
+
121
+ do_action('factory_bootstrap_enqueue_scripts', $hook);
122
+ do_action('factory_bootstrap_enqueue_scripts_' . $this->plugin->pluginName, $hook);
123
+
124
+ $dependencies = array();
125
+ if( !empty($this->scripts) ) {
126
+ $dependencies[] = 'jquery';
127
+ $dependencies[] = 'jquery-ui-core';
128
+ $dependencies[] = 'jquery-ui-widget';
129
+ }
130
+
131
+ foreach($this->scripts as $script) {
132
+ switch( $script ) {
133
+ case 'plugin.iris':
134
+ $dependencies[] = 'jquery-ui-widget';
135
+ $dependencies[] = 'jquery-ui-slider';
136
+ $dependencies[] = 'jquery-ui-draggable';
137
+ break;
138
+ }
139
+ }
140
+
141
+ // Issue #FB-3:
142
+ // Tests if we can access load-styles.php and load-scripts.php remotely.
143
+ // If yes, we use load-styles.php and load-scripts.php to load, merge and compress css and js.
144
+ // Otherwise, every resource will be loaded separatly.
145
+
146
+ $isWpContentAccessTested = get_option('factory_wp_content_access_tested', false);
147
+ if( !$isWpContentAccessTested ) {
148
+ update_option('factory_css_js_compression', false);
149
+ update_option('factory_wp_content_access_tested', true);
150
+
151
+ if( function_exists('wp_remote_get') ) {
152
+ $result = wp_remote_get(FACTORY_BOOTSTRAP_330_URL . '/includes/load-scripts.php?test=1');
153
+ if( !is_wp_error($result) && $result && isset($result['body']) && $result['body'] == 'success' ) {
154
+ update_option('factory_css_js_compression', true);
155
+ }
156
+ }
157
+ }
158
+
159
+ $compression = get_option('factory_css_js_compression', false);
160
+
161
+ if( !$compression ) {
162
+
163
+ $id = md5(FACTORY_BOOTSTRAP_330_VERSION);
164
+
165
+ $isFirst = true;
166
+ foreach($this->scripts as $scriptToLoad) {
167
+ wp_enqueue_script($scriptToLoad . '-' . $id, FACTORY_BOOTSTRAP_330_URL . "/assets/js/$scriptToLoad.js", $isFirst
168
+ ? $dependencies
169
+ : false, $this->plugin->version);
170
+ $isFirst = false;
171
+ }
172
+
173
+ foreach($this->styles as $styleToLoad) {
174
+ wp_enqueue_style($styleToLoad . '-' . $id, FACTORY_BOOTSTRAP_330_URL . "/assets/flat/css/$styleToLoad.css", array(), $this->plugin->version);
175
+ }
176
+ // - //
177
+
178
+ } else {
179
+
180
+ $loadScriptsOut = join(',', $this->scripts);
181
+ $loadStylesOut = join(',', $this->styles);
182
+
183
+ if( defined('WP_DEBUG') && WP_DEBUG ) {
184
+ $loadScriptsOut .= "&debug=true";
185
+ $loadStylesOut .= "&debug=true";
186
+ }
187
+
188
+ if( !empty($this->styles) ) {
189
+ $id = md5($loadStylesOut . FACTORY_BOOTSTRAP_330_VERSION);
190
+ wp_enqueue_style('factory-bootstrap-330-' . $id, FACTORY_BOOTSTRAP_330_URL . '/includes/load-styles.php?folder=flat&load=' . $loadStylesOut, array(), $this->plugin->version);
191
+ }
192
+
193
+ if( !empty($this->scripts) ) {
194
+ $id = md5($loadScriptsOut . FACTORY_BOOTSTRAP_330_VERSION);
195
+ wp_enqueue_script('factory-bootstrap-330-' . $id, FACTORY_BOOTSTRAP_330_URL . '/includes/load-scripts.php?load=' . $loadScriptsOut, $dependencies, $this->plugin->version);
196
+ }
197
+
198
+ // Issue #FB-4:
199
+ // Some themes and plugins contain the functions which remove arguments from the scripts and styles paths.
200
+ // If we use the compression, we need to check whether the paths are the same.
201
+
202
+ add_filter('script_loader_src', array($this, 'testKeepingArgsInPaths'), 99999, 2);
203
+ add_filter('style_loader_src', array($this, 'testKeepingArgsInPaths'), 99999, 2);
204
+ }
205
+
206
+ $userId = get_current_user_id();
207
+ $colorName = get_user_meta($userId, 'admin_color', true);
208
+
209
+ if( $colorName !== 'fresh' ) {
210
+ wp_enqueue_style('factory-bootstrap-330-colors', FACTORY_BOOTSTRAP_330_URL . '/assets/flat/css/bootstrap.' . $colorName . '.css');
211
+ }
212
+
213
+ if( $colorName == 'light' ) {
214
+ $primaryDark = '#037c9a';
215
+ $primaryLight = '#04a4cc';
216
+ } elseif( $colorName == 'blue' ) {
217
+ $primaryDark = '#d39323';
218
+ $primaryLight = '#e1a948';
219
+ } elseif( $colorName == 'coffee' ) {
220
+ $primaryDark = '#b78a66';
221
+ $primaryLight = '#c7a589';
222
+ } elseif( $colorName == 'ectoplasm' ) {
223
+ $primaryDark = '#839237';
224
+ $primaryLight = '#a3b745';
225
+ } elseif( $colorName == 'ocean' ) {
226
+ $primaryDark = '#80a583';
227
+ $primaryLight = '#9ebaa0';
228
+ } elseif( $colorName == 'midnight' ) {
229
+ $primaryDark = '#d02a21';
230
+ $primaryLight = '#e14d43';
231
+ } elseif( $colorName == 'sunrise' ) {
232
+ $primaryDark = '#c36822';
233
+ $primaryLight = '#dd823b';
234
+ } else {
235
+ $primaryDark = '#0074a2';
236
+ $primaryLight = '#2ea2cc';
237
+ }
238
+
239
+ ?>
240
+
241
+ <script>
242
+ if( !window.factory ) {
243
+ window.factory = {};
244
+ }
245
+ if( !window.factory.factoryBootstrap330 ) {
246
+ window.factory.factoryBootstrap330 = {};
247
+ }
248
+ window.factory.factoryBootstrap330.colors = {
249
+ primaryDark: '<?php echo $primaryDark ?>',
250
+ primaryLight: '<?php echo $primaryLight ?>'
251
+ };
252
+ </script>
253
+ <?php
254
+ }
255
+
256
+ /**
257
+ * Tests whether the scripts and styles path contain query arguments or them were removed.
258
+ *
259
+ * See 'script_loader_src'
260
+ * See 'style_loader_src'
261
+ *
262
+ * @since 3.2.5
263
+ * @return void
264
+ */
265
+ public function testKeepingArgsInPaths($src, $handle)
266
+ {
267
+ if( substr($handle, 0, 22) !== 'factory-bootstrap-330-' ) {
268
+ return $src;
269
+ }
270
+
271
+ $parts = explode('?', $src);
272
+ if( count($parts) > 1 ) {
273
+ return $src;
274
+ }
275
+
276
+ update_option('factory_css_js_compression', false);
277
+
278
+ return $src;
279
+ }
280
+
281
+ /**
282
+ * Adds the body classes: 'factory-flat or 'factory-volumetric'.
283
+ *
284
+ * @since 3.2.0
285
+ * @param string $classes
286
+ * @return string
287
+ */
288
+ public function adminBodyClass($classes)
289
+ {
290
+ $classes .= FACTORY_FLAT_ADMIN
291
+ ? ' factory-flat '
292
+ : ' factory-volumetric ';
293
+
294
+ return $classes;
295
+ }
296
+ }
libs/factory/bootstrap/includes/load-scripts.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Этот файл отвечает за конкатенацию скриптов из сабмодулей
4
+ *
5
+ * Создано для Factory Metaboxes.
6
+ *
7
+ * @author Alex Kovalev <alex@byonepress.com>
8
+ * @copyright (c) 2013, OnePress Ltd
9
+ *
10
+ * @package core
11
+ * @since 1.0.0
12
+ */
13
+
14
+ define('ONP_SCRIPTS_DIR', '..');
15
+
16
+ if( isset($_GET['test']) ) {
17
+ echo 'success';
18
+ exit;
19
+ }
20
+
21
+ /**
22
+ * Фукнция получает контент файла
23
+ * @param type $path - путь к файлу
24
+ * @return string
25
+ */
26
+ function get_file($path)
27
+ {
28
+ if( function_exists('realpath') ) {
29
+ $path = realpath($path);
30
+ }
31
+ if( !$path || !@is_file($path) ) {
32
+ return '';
33
+ }
34
+
35
+ return @file_get_contents($path);
36
+ }
37
+
38
+ //Получает имена модулей разделенные запятой
39
+ $load = isset($_GET['load'])
40
+ ? preg_replace('/[^a-z0-9,._-]+/i', '', $_GET['load'])
41
+ : null;
42
+
43
+ $debug = isset($_GET['debug']) && $_GET['debug'] === 'true'
44
+ ? true
45
+ : false;
46
+
47
+ if( empty($load) ) {
48
+ exit;
49
+ }
50
+
51
+ $load = explode(',', $load);
52
+
53
+ $out = '';
54
+ $compress = (isset($_GET['c']) && $_GET['c']);
55
+ $force_gzip = ($compress && 'gzip' == $_GET['c']);
56
+ $expires_offset = 31536000; // 1 year
57
+ $cache_filename = md5(join(',', $load));
58
+
59
+ if( empty($load) ) {
60
+ exit;
61
+ }
62
+
63
+ foreach($load as $key => $val) {
64
+ $load[$key] = ONP_SCRIPTS_DIR . "/assets/js/$val.js";
65
+ }
66
+
67
+ //Собираем в строку
68
+ foreach($load as $handle) {
69
+ if( file_exists($handle) ) {
70
+ $out .= get_file($handle) . "\n";
71
+ }
72
+ }
73
+
74
+ //Говорим, что этот javascript файл
75
+ header('Content-Type: application/x-javascript; charset=UTF-8');
76
+ header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $expires_offset) . ' GMT');
77
+ header("Cache-Control: public, max-age=$expires_offset");
78
+
79
+ if( $compress && !ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
80
+ header('Vary: Accept-Encoding'); // Handle proxies
81
+ if( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && !$force_gzip ) {
82
+ header('Content-Encoding: deflate');
83
+ $out = gzdeflate($out, 3);
84
+ } elseif( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
85
+ header('Content-Encoding: gzip');
86
+ $out = gzencode($out, 3);
87
+ }
88
+ }
89
+
90
+ echo $out;
91
+ exit;
libs/factory/bootstrap/includes/load-styles.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Этот файл отвечает за конкатенацию стилей из сабмодулей
4
+ *
5
+ * Создано для Factory Metaboxes.
6
+ *
7
+ * @author Alex Kovalev <alex@byonepress.com>
8
+ * @copyright (c) 2013, OnePress Ltd
9
+ *
10
+ * @package core
11
+ * @since 1.0.0
12
+ */
13
+
14
+ define('ONP_SCRIPTS_DIR', '..');
15
+
16
+ if( isset($_GET['test']) ) {
17
+ echo 'success';
18
+ exit;
19
+ }
20
+
21
+ /**
22
+ * Фукнция получает контент файла
23
+ * @param type $path - путь к файлу
24
+ * @return string
25
+ */
26
+ function get_file($path)
27
+ {
28
+ if( function_exists('realpath') ) {
29
+ $path = realpath($path);
30
+ }
31
+ if( !$path || !@is_file($path) ) {
32
+ return '';
33
+ }
34
+
35
+ return @file_get_contents($path);
36
+ }
37
+
38
+ //Получает имена модулей разделенные запятой
39
+ $load = isset($_GET['load'])
40
+ ? preg_replace('/[^a-z0-9,._-]+/i', '', $_GET['load'])
41
+ : null;
42
+
43
+ $debug = isset($_GET['debug']) && $_GET['debug'] === 'true'
44
+ ? true
45
+ : false;
46
+
47
+ $folder = isset($_GET['folder'])
48
+ ? preg_replace('/[^a-z0-9,._-]+/i', '', $_GET['folder'])
49
+ : null;
50
+
51
+ if( empty($folder) || empty($load) ) {
52
+ exit;
53
+ }
54
+
55
+ $load = explode(',', $load);
56
+
57
+ $out = '';
58
+ $compress = (isset($_GET['c']) && $_GET['c']);
59
+ $force_gzip = ($compress && 'gzip' == $_GET['c']);
60
+ $expires_offset = 31536000; // 1 year
61
+ $cache_filename = md5(join(',', $load));
62
+
63
+ foreach($load as $key => $val)
64
+ $load[$key] = ONP_SCRIPTS_DIR . "/assets/$folder/css/$val.css";
65
+
66
+ //Собираем в строку и минифицируем
67
+ foreach($load as $handle) {
68
+ if( file_exists($handle) ) {
69
+ $out .= get_file($handle) . "\n";
70
+ }
71
+ }
72
+
73
+ //Говорим, что этот javascript файл
74
+ header('Content-Type: text/css; charset=UTF-8');
75
+ header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $expires_offset) . ' GMT');
76
+ header("Cache-Control: public, max-age=$expires_offset");
77
+
78
+ if( $compress && !ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
79
+ header('Vary: Accept-Encoding'); // Handle proxies
80
+ if( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && !$force_gzip ) {
81
+ header('Content-Encoding: deflate');
82
+ $out = gzdeflate($out, 3);
83
+ } elseif( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
84
+ header('Content-Encoding: gzip');
85
+ $out = gzencode($out, 3);
86
+ }
87
+ }
88
+
89
+ echo $out;
90
+ exit;
libs/factory/clearfy/boot.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Factory clearfy
4
+ *
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webcraftic Ltd
7
+ *
8
+ * @package core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ if( defined('FACTORY_CLEARFY_101_LOADED') ) {
13
+ return;
14
+ }
15
+ define('FACTORY_CLEARFY_101_LOADED', true);
16
+
17
+ define('FACTORY_CLEARFY_101_DIR', dirname(__FILE__));
18
+ define('FACTORY_CLEARFY_101_URL', plugins_url(null, __FILE__));
19
+
20
+ load_plugin_textdomain('factory_clearfy_101', false, dirname(plugin_basename(__FILE__)) . '/langs');
21
+
22
+ require(FACTORY_CLEARFY_101_DIR . '/includes/functions.php');
23
+ require(FACTORY_CLEARFY_101_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_322_LOADED') ) {
31
+ require(FACTORY_CLEARFY_101_DIR . '/pages/more-features.php');
32
+ }
libs/factory/clearfy/includes/class.configurate.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Core plugin
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ abstract class WbcrFactoryClearfy_Configurate {
10
+
11
+ public function __construct(Factory326_Plugin $plugin)
12
+ {
13
+ $this->plugin = $plugin;
14
+ $this->registerActionsAndFilters();
15
+ }
16
+
17
+ /**
18
+ * Registers filters and actions
19
+ * @return mixed
20
+ */
21
+ abstract protected function registerActionsAndFilters();
22
+
23
+ /**
24
+ * Get options with namespace
25
+ * @param $option_name
26
+ * @param bool $default
27
+ * @return mixed|void
28
+ */
29
+ public function getOption($option_name, $default = false)
30
+ {
31
+ return get_option($this->plugin->pluginName . '_' . $option_name, $default);
32
+ }
33
+ }
libs/factory/clearfy/includes/functions.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Helpers functions
4
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
5
+ * @copyright (c) 2017 Webraftic Ltd
6
+ * @version 1.0
7
+ */
8
+
9
+ /**
10
+ * Merge arrays, inserting $arr2 into $arr1 before/after certain key
11
+ *
12
+ * @param array $arr Modifyed array
13
+ * @param array $inserted Inserted array
14
+ * @param string $position 'before' / 'after' / 'top' / 'bottom'
15
+ * @param string $key Associative key of $arr1 for before/after insertion
16
+ *
17
+ * @return array
18
+ */
19
+ function wbcr_factory_array_merge_insert(array $arr, array $inserted, $position = 'bottom', $key = null)
20
+ {
21
+ if( $position == 'top' ) {
22
+ return array_merge($inserted, $arr);
23
+ }
24
+ $key_position = ($key === null)
25
+ ? false
26
+ : array_search($key, array_keys($arr));
27
+ if( $key_position === false OR ($position != 'before' AND $position != 'after') ) {
28
+ return array_merge($arr, $inserted);
29
+ }
30
+ if( $position == 'after' ) {
31
+ $key_position++;
32
+ }
33
+
34
+ return array_merge(array_slice($arr, 0, $key_position, true), $inserted, array_slice($arr, $key_position, null, true));
35
+ }
36
+
37
+ /**
38
+ * Try to get variable from JSON-encoded post variable
39
+ *
40
+ * Note: we pass some params via json-encoded variables, as via pure post some data (ex empty array) will be absent
41
+ *
42
+ * @param string $name $_POST's variable name
43
+ *
44
+ * @return array
45
+ */
46
+ function wbcr_factory_maybe_get_post_json($name)
47
+ {
48
+ if( isset($_POST[$name]) AND is_string($_POST[$name]) ) {
49
+ $result = json_decode(stripslashes($_POST[$name]), true);
50
+ if( !is_array($result) ) {
51
+ $result = array();
52
+ }
53
+
54
+ return $result;
55
+ } else {
56
+ return array();
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Escape json data
62
+ * @param array $data
63
+ * @return string escaped json string
64
+ */
65
+ function wbcr_factory_get_escape_json(array $data)
66
+ {
67
+ return htmlspecialchars(json_encode($data), ENT_QUOTES, 'UTF-8');
68
+ }
69
+
libs/factory/clearfy/langs/factory_clearfy_101-fr-FR.mo ADDED
Binary file
libs/factory/clearfy/langs/factory_clearfy_101-fr-FR.po ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: clearfy\n"
4
+ "POT-Creation-Date: 2017-11-09 10:35+0300\n"
5
+ "PO-Revision-Date: 2017-11-09 13:50+0100\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: fr\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 2.0.4\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
+
20
+ #: pages/more-features.php:29
21
+ msgid "More features (<b>free</b>)"
22
+ msgstr "Plus de fonctionnalités (<b>gratuit</b>)"
23
+
24
+ #: pages/more-features.php:36
25
+ msgid "install the ultimate version of the plugin for free!"
26
+ msgstr "installez la version ultime du plugin gratuitement!"
27
+
28
+ #: pages/more-features.php:47
29
+ msgid "Code cleaning"
30
+ msgstr "Nettoyage du code"
31
+
32
+ #: pages/more-features.php:49
33
+ msgid "Clears the source code of the page from unused code."
34
+ msgstr "Efface le code source de la page du code inutilisé."
35
+
36
+ #: pages/more-features.php:56
37
+ msgid "Improve SEO"
38
+ msgstr "Améliorer le référencement"
39
+
40
+ #: pages/more-features.php:58
41
+ msgid ""
42
+ "Removes duplicate pages, closes external links, changes the headers of the "
43
+ "server."
44
+ msgstr ""
45
+ "Supprime les pages en double, ferme les liens externes, modifie les en-têtes "
46
+ "du serveur."
47
+
48
+ #: pages/more-features.php:65
49
+ msgid "Site ptotection"
50
+ msgstr "Protection du site"
51
+
52
+ #: pages/more-features.php:67
53
+ msgid "Enables and disables features that improve the protection of your site."
54
+ msgstr ""
55
+ "Active et désactive les fonctionnalités qui améliorent la protection de "
56
+ "votre site."
57
+
58
+ #: pages/more-features.php:74
59
+ msgid "Disable comments"
60
+ msgstr "Désactiver les commentaires"
61
+
62
+ #: pages/more-features.php:76
63
+ msgid "Disables comments on the entire site or on specific pages."
64
+ msgstr ""
65
+ "Désactive les commentaires sur l'intégralité du site ou sur des pages "
66
+ "spécifiques."
67
+
68
+ #: pages/more-features.php:83
69
+ msgid "Manage updates"
70
+ msgstr "Gérer les mises à jour"
71
+
72
+ #: pages/more-features.php:85
73
+ msgid ""
74
+ "Enables or disables automatically updates for plugins, themes and core. It "
75
+ "is also possible\n"
76
+ "\t\t\t\t\t\t\tto disable all updates."
77
+ msgstr ""
78
+ "Active ou désactive automatiquement les mises à jour pour les plugins, les "
79
+ "thèmes et le core. C'est aussi possible\n"
80
+ "\t\t\t\t\t\t\tdésactiver toutes les mises à jour."
81
+
82
+ #: pages/more-features.php:93
83
+ msgid "Manage widgets"
84
+ msgstr "Gérer les widgets"
85
+
86
+ #: pages/more-features.php:95
87
+ msgid "Allows you to remove unused widgets."
88
+ msgstr "Vous permet de supprimer les widgets inutilisés."
89
+
90
+ #: pages/more-features.php:102
91
+ msgid "Speed Optimization"
92
+ msgstr "Optimisation de la vitesse"
93
+
94
+ #: pages/more-features.php:104
95
+ msgid ""
96
+ "Increases performance by disabling unused functions and reducing the number "
97
+ "of requests."
98
+ msgstr ""
99
+ "Augmente les performances en désactivant les fonctions inutilisées et en "
100
+ "réduisant le nombre de requêtes."
101
+
102
+ #: pages/more-features.php:111
103
+ msgid "Site privacy"
104
+ msgstr "Confidentialité du site"
105
+
106
+ #: pages/more-features.php:113
107
+ msgid ""
108
+ "Allows you to hide the version of the site and plugins. Allows you to hide "
109
+ "your\n"
110
+ "\t\t\t\t\t\t\tWordPress."
111
+ msgstr ""
112
+ "Vous permet de masquer la version du site et des plugins. Vous permet de "
113
+ "cacher votre\n"
114
+ "\t\t\t\t\t\t\tWordPress."
115
+
116
+ #: pages/more-features.php:121
117
+ msgid "Easy setup"
118
+ msgstr "Configuration facile"
119
+
120
+ #: pages/more-features.php:123
121
+ msgid ""
122
+ "In quick mode, you can easily configure the plugin according to your needs."
123
+ msgstr ""
124
+ "En mode rapide, vous pouvez facilement configurer le plugin en fonction de "
125
+ "vos besoins."
126
+
127
+ #: pages/more-features.php:130
128
+ msgid "Get the ultimate plugin 100% FREE"
129
+ msgstr "Obtenez le plugin ultime 100% GRATUIT"
libs/factory/clearfy/langs/factory_clearfy_101-ru_RU.mo ADDED
Binary file
libs/factory/clearfy/langs/factory_clearfy_101-ru_RU.po ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: clearfy\n"
4
+ "POT-Creation-Date: 2017-10-14 13:50+0300\n"
5
+ "PO-Revision-Date: 2017-10-14 13:50+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
+
20
+ #: pages/more-features.php:27
21
+ msgid "More features (<b>free</b>)"
22
+ msgstr "Дополнительно"
23
+
24
+ #: pages/more-features.php:34
25
+ msgid "install the ultimate version of the plugin for free!"
26
+ msgstr "установите полную версию плагина бесплатно!"
27
+
28
+ #: pages/more-features.php:45
29
+ msgid "Code cleaning"
30
+ msgstr "Очищает код"
31
+
32
+ #: pages/more-features.php:47
33
+ msgid "Clears the source code of the page from unused code."
34
+ msgstr "Очищает исходный код страницы от неиспользуемого кода."
35
+
36
+ #: pages/more-features.php:54
37
+ msgid "Improve SEO"
38
+ msgstr "Улучшает SEO"
39
+
40
+ #: pages/more-features.php:56
41
+ msgid ""
42
+ "Removes duplicate pages, closes external links, changes the headers of the "
43
+ "server."
44
+ msgstr ""
45
+ "Удаляет дубликаты страниц, закрывает внешние ссылки, изменяет заголовки "
46
+ "сервера."
47
+
48
+ #: pages/more-features.php:63
49
+ msgid "Site ptotection"
50
+ msgstr "Защищает ваш сайт"
51
+
52
+ #: pages/more-features.php:65
53
+ msgid "Enables and disables features that improve the protection of your site."
54
+ msgstr "Включает и отключает функции, которые улучшают защиту вашего сайта."
55
+
56
+ #: pages/more-features.php:72
57
+ msgid "Disable comments"
58
+ msgstr "Отключает комментарии"
59
+
60
+ #: pages/more-features.php:74
61
+ msgid "Disables comments on the entire site or on specific pages."
62
+ msgstr "Отключает комментарии на всем сайте или у определенных страниц."
63
+
64
+ #: pages/more-features.php:81
65
+ msgid "Manage updates"
66
+ msgstr "Менеджер обновлений"
67
+
68
+ #: pages/more-features.php:83
69
+ msgid ""
70
+ "Enables or disables automatically updates for plugins, themes and core. It "
71
+ "is also possible\n"
72
+ "\t\t\t\t\t\t\tto disable all updates."
73
+ msgstr ""
74
+ "Включает или отключает автоматические обновление плагинов, тем и ядра. Также "
75
+ "возможно\n"
76
+ "отключение всех обновлений."
77
+
78
+ #: pages/more-features.php:91
79
+ msgid "Manage widgets"
80
+ msgstr "Управление виджетами"
81
+
82
+ #: pages/more-features.php:93
83
+ msgid "Allows you to remove unused widgets."
84
+ msgstr "Позволяет удалить неиспользуемые виджеты."
85
+
86
+ #: pages/more-features.php:100
87
+ msgid "Speed Optimization"
88
+ msgstr "Оптимизация производительности"
89
+
90
+ #: pages/more-features.php:102
91
+ msgid ""
92
+ "Increases performance by disabling unused functions and reducing the number "
93
+ "of requests."
94
+ msgstr ""
95
+ "Повышает производительность, отключая неиспользуемые функции и уменьшая "
96
+ "количество запросов."
97
+
98
+ #: pages/more-features.php:109
99
+ msgid "Site privacy"
100
+ msgstr "Конфиденциальность сайта"
101
+
102
+ #: pages/more-features.php:111
103
+ msgid ""
104
+ "Allows you to hide the version of the site and plugins. Allows you to hide "
105
+ "your\n"
106
+ "\t\t\t\t\t\t\tWordPress."
107
+ msgstr ""
108
+ "Позволяет скрыть версию сайта и плагинов. Позволяет скрыть ваш\n"
109
+ "WordPress."
110
+
111
+ #: pages/more-features.php:119
112
+ msgid "Easy setup"
113
+ msgstr "Простая настройка"
114
+
115
+ #: pages/more-features.php:121
116
+ msgid ""
117
+ "In quick mode, you can easily configure the plugin according to your needs."
118
+ msgstr ""
119
+ "В быстром режиме вы можете легко настроить плагин в соответствии с вашими "
120
+ "потребностями."
121
+
122
+ #: pages/more-features.php:128
123
+ msgid "Get the ultimate plugin 100% FREE"
124
+ msgstr "Получить полную версию бесплатно на 100%"
libs/factory/clearfy/pages/more-features.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The page Settings.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ class FactoryClearfy101_MoreFeaturesPage extends FactoryPages322_ImpressiveThemplate {
9
+
10
+ /**
11
+ * The id of the page in the admin menu.
12
+ *
13
+ * Mainly used to navigate between pages.
14
+ * @see FactoryPages322_AdminPage
15
+ *
16
+ * @since 1.0.0
17
+ * @var string
18
+ */
19
+ public $id = "more_features";
20
+
21
+ public $page_menu_dashicon = 'dashicons-star-filled wbcr-factory-premium-color';
22
+
23
+ public $page_menu_position = 5;
24
+
25
+ public $type = 'page';
26
+
27
+ public function __construct(Factory326_Plugin $plugin)
28
+ {
29
+ $this->menuTitle = __('More features (<b>free</b>)', 'factory_clearfy_101');
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_101');
37
+ }
38
+
39
+ public function showPageContent()
40
+ {
41
+ ?>
42
+ <div class="row">
43
+ <div class="col-sm-4">
44
+ <div class="wbcr-factory-feature-box">
45
+ <span class="dashicons dashicons-yes"></span>
46
+
47
+ <h3><?php _e('Code cleaning', 'factory_clearfy_101')?></h3>
48
+
49
+ <p><?php _e('Clears the source code of the page from unused code.', 'factory_clearfy_101')?></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_101')?></h3>
57
+
58
+ <p><?php _e('Removes duplicate pages, closes external links, changes the headers of the server.', 'factory_clearfy_101')?></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_101')?></h3>
66
+
67
+ <p><?php _e('Enables and disables features that improve the protection of your site.', 'factory_clearfy_101')?></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_101')?></h3>
75
+
76
+ <p><?php _e('Disables comments on the entire site or on specific pages.', 'factory_clearfy_101')?></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_101')?></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_101')?></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_101')?></h3>
94
+
95
+ <p><?php _e('Allows you to remove unused widgets.', 'factory_clearfy_101')?></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_101')?></h3>
103
+
104
+ <p><?php _e('Increases performance by disabling unused functions and reducing the number of requests.', 'factory_clearfy_101')?></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_101')?></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_101')?></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_101')?></h3>
122
+
123
+ <p><?php _e('In quick mode, you can easily configure the plugin according to your needs.', 'factory_clearfy_101')?></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_101')?>
131
+ </a>
132
+ </div>
133
+ <?php
134
+ }
135
+ }
libs/factory/core/boot.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Factory Plugin
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>, Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2013, OnePress Ltd, (c) 2017 Webcraftic Ltd
7
+ *
8
+ * @package core
9
+ * @since 1.0.1
10
+ */
11
+
12
+ if( defined('FACTORY_326_LOADED') ) {
13
+ return;
14
+ }
15
+ define('FACTORY_326_LOADED', true);
16
+
17
+ define('FACTORY_326_VERSION', '000');
18
+
19
+ define('FACTORY_326_DIR', dirname(__FILE__));
20
+ define('FACTORY_326_URL', plugins_url(null, __FILE__));
21
+
22
+ #comp merge
23
+ require(FACTORY_326_DIR . '/includes/assets-managment/assets-list.class.php');
24
+ require(FACTORY_326_DIR . '/includes/assets-managment/script-list.class.php');
25
+ require(FACTORY_326_DIR . '/includes/assets-managment/style-list.class.php');
26
+
27
+ require(FACTORY_326_DIR . '/includes/functions.php');
28
+ require(FACTORY_326_DIR . '/includes/plugin.class.php');
29
+
30
+ require(FACTORY_326_DIR . '/includes/activation/activator.class.php');
31
+ require(FACTORY_326_DIR . '/includes/activation/update.class.php');
32
+ #endcomp
libs/factory/core/includes/activation/activator.class.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains a base class for plugin activators.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package factory-core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Plugin Activator
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ abstract class Factory326_Activator {
18
+
19
+ /**
20
+ * Curent plugin.
21
+ * @var Factory326_Plugin
22
+ */
23
+ public $plugin;
24
+
25
+ public function __construct(Factory326_Plugin $plugin) {
26
+ $this->plugin = $plugin;
27
+ }
28
+
29
+ public function activate() {}
30
+ public function deactivate() {}
31
+ public function update() {}
32
+
33
+ // --------------------------------------------------------------------------------
34
+ // Posts and pages
35
+ // --------------------------------------------------------------------------------
36
+
37
+ /**
38
+ * Adds post on activation.
39
+ * @return array Post info.
40
+ */
41
+ public function addPost() {
42
+
43
+ $argsCount = func_num_args();
44
+
45
+ $postInfoBase = array();
46
+ $metaInfoBase = array();
47
+
48
+ if ($argsCount == 4) {
49
+
50
+ $base = func_get_arg(0);
51
+
52
+ $postInfoBase = $base['post'];
53
+ $metaInfoBase = $base['meta'];
54
+ }
55
+
56
+ $optionName = ($argsCount == 4) ? func_get_arg(1) : func_get_arg(0);
57
+ $postInfo = ($argsCount == 4) ? func_get_arg(2) : func_get_arg(1);
58
+ $metaInfo = ($argsCount == 4) ? func_get_arg(3) : func_get_arg(2);
59
+
60
+ if ($postInfo == null) $postInfo = array();
61
+ if ($metaInfo == null) $metaInfo = array();
62
+
63
+ $postInfo = array_merge($postInfoBase, $postInfo);
64
+ $metaInfo = array_merge($metaInfoBase, $metaInfo);
65
+
66
+ $insert_id = $this->createPost($postInfo, $metaInfo, $optionName);
67
+
68
+ return array(
69
+ 'post_id' => $insert_id,
70
+ 'post' => $postInfo,
71
+ 'meta' => $metaInfo
72
+ );
73
+ }
74
+
75
+ /**
76
+ * Adds a page on activation.
77
+ */
78
+ public function addPage() {
79
+ $argsCount = func_num_args();
80
+
81
+ $optionName = func_get_arg(0);
82
+ $postInfo = func_get_arg(1);
83
+ $metaInfo = func_get_arg(2);
84
+
85
+ if ($postInfo == null) $postInfo = array();
86
+ if ($metaInfo == null) $metaInfo = array();
87
+
88
+ $postInfo['post_type'] = 'page';
89
+ $this->createPost($postInfo, $metaInfo, $optionName);
90
+ }
91
+
92
+ /**
93
+ * Creates post by using the specified info.
94
+ * @global type $wpdb
95
+ * @param type $postInfo
96
+ * @param type $metaInfo
97
+ * @param type $optionName
98
+ * @return interger
99
+ */
100
+ public function createPost( $postInfo, $metaInfo, $optionName ) {
101
+ global $wpdb;
102
+
103
+ $slug = $postInfo['post_name'];
104
+ $postType = $postInfo['post_type'];
105
+
106
+ $postId = $wpdb->get_var("SELECT ID FROM " . $wpdb->posts . " WHERE post_name = '$slug' AND
107
+ post_type = '" . $postType . "' LIMIT 1");
108
+
109
+ $optionValue = get_option($optionName);
110
+
111
+ if ( !$postId )
112
+ {
113
+ $create = true;
114
+
115
+ if ( !empty( $optionValue ) ) {
116
+ $post_id = $wpdb->get_var("SELECT ID FROM " . $wpdb->posts . " WHERE ID = '$optionValue' AND
117
+ post_type = '" . $postType . "' LIMIT 1");
118
+ if ( $post_id ) $create = false;
119
+ };
120
+
121
+ if ( $create ) :
122
+ if ( !isset( $postInfo['post_status'] ) ) $postInfo['post_status'] = 'publish';
123
+
124
+ // '@' here is to hide unexpected output while plugin activation
125
+ $optionValue = @wp_insert_post( $postInfo );
126
+ $postId = $optionValue;
127
+ update_option( $optionName, $optionValue );
128
+ endif;
129
+ }
130
+ else
131
+ {
132
+ if ( empty ( $optionValue ) ) {
133
+ update_option( $optionName, $postId );
134
+ }
135
+ }
136
+
137
+ update_option( $optionName, $postId );
138
+
139
+ // adds meta
140
+ foreach($metaInfo as $key => $value) {
141
+ if ($value === true) $value = 'true';
142
+ if ($value === false) $value = 'false';
143
+
144
+ add_post_meta($postId, $key, $value);
145
+ }
146
+
147
+ return $postId;
148
+ }
149
+ }
libs/factory/core/includes/activation/update.class.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains a base class for update items of plugins.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package factory-core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Plugin Activator
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ abstract class Factory326_Update {
18
+
19
+ /**
20
+ * Current plugin
21
+ * @var Factory326_Plugin
22
+ */
23
+ var $plugin;
24
+
25
+ public function __construct( Factory326_Plugin $plugin ){
26
+ $this->plugin = $plugin;
27
+ }
28
+
29
+ abstract function install();
30
+ }
libs/factory/core/includes/assets-managment/assets-list.class.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The class contains a base class for all lists of assets.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package factory-core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Assets List
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class Factory326_AssetsList {
18
+
19
+ protected $all = array();
20
+ public $headerPlace = array();
21
+ public $footerPlace = array();
22
+ public $required = array();
23
+
24
+ protected $defaultPlace;
25
+
26
+ public function __construct($plugin = null, $defaultIsFooter = true)
27
+ {
28
+ $this->plugin = $plugin;
29
+
30
+ if( $defaultIsFooter ) {
31
+ $this->defaultPlace = &$this->footerPlace;
32
+ }
33
+ if( !$defaultIsFooter ) {
34
+ $this->defaultPlace = &$this->headerPlace;
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Adds new items to the collection (default place).
40
+ * @param mixed
41
+ */
42
+ public function add()
43
+ {
44
+
45
+ foreach(func_get_args() as $item) {
46
+ $this->all[] = $item;
47
+ $this->defaultPlace[] = $item;
48
+ }
49
+
50
+ return $this;
51
+ }
52
+
53
+ /**
54
+ * Remove items from the collection
55
+ * @return $this
56
+ */
57
+ public function deregister()
58
+ {
59
+ foreach(func_get_args() as $item) {
60
+ if( !is_string($item) ) {
61
+ return $this;
62
+ }
63
+ $keyInAll = array_search($item, $this->all);
64
+ $keyInDefaultPlace = array_search($item, $this->defaultPlace);
65
+ $keyInHeaderPlace = array_search($item, $this->headerPlace);
66
+ $keyInFooterPlace = array_search($item, $this->footerPlace);
67
+
68
+ if( $keyInAll ) {
69
+ unset($this->all[$keyInAll]);
70
+ }
71
+ if( $keyInDefaultPlace ) {
72
+ unset($this->defaultPlace[$keyInDefaultPlace]);
73
+ }
74
+ if( $keyInHeaderPlace ) {
75
+ unset($this->headerPlace[$keyInHeaderPlace]);
76
+ }
77
+ if( $keyInFooterPlace ) {
78
+ unset($this->footerPlace[$keyInFooterPlace]);
79
+ }
80
+ }
81
+
82
+ return $this;
83
+ }
84
+
85
+ /**
86
+ * Adds new items to the collection (header).
87
+ * @param mixed
88
+ */
89
+ public function addToHeader()
90
+ {
91
+
92
+ foreach(func_get_args() as $item) {
93
+ $this->all[] = $item;
94
+ $this->headerPlace[] = $item;
95
+ }
96
+
97
+ return $this;
98
+ }
99
+
100
+ /**
101
+ * Adds new items to the collection (footer).
102
+ * @param mixed
103
+ */
104
+ public function addToFooter()
105
+ {
106
+
107
+ foreach(func_get_args() as $item) {
108
+ $this->all[] = $item;
109
+ $this->footerPlace[] = $item;
110
+ }
111
+
112
+ return $this;
113
+ }
114
+
115
+ /**
116
+ * Checks whether the collection is empty.
117
+ *
118
+ * @param string $source if the 'bootstrap' specified, checks only whether the bootstrap assets were required.
119
+ * @return boolean
120
+ */
121
+ public function isEmpty($source = 'wordpress')
122
+ {
123
+ if( 'bootstrap' === $source ) {
124
+ return empty($this->required[$source]);
125
+ }
126
+
127
+ return empty($this->all) && empty($this->required);
128
+ }
129
+
130
+ public function IsHeaderEmpty()
131
+ {
132
+ return empty($this->headerPlace);
133
+ }
134
+
135
+ public function IsFooterEmpty()
136
+ {
137
+ return empty($this->footerPlace);
138
+ }
139
+
140
+ /**
141
+ * Adds new items to the requried collection.
142
+ * @param mixed
143
+ */
144
+ public function request($items, $source = 'wordpress')
145
+ {
146
+
147
+ if( is_array($items) ) {
148
+ foreach($items as $item) {
149
+ $this->required[$source][] = $item;
150
+ }
151
+ } else {
152
+ $this->required[$source][] = $items;
153
+ }
154
+
155
+ return $this;
156
+ }
157
+ }
libs/factory/core/includes/assets-managment/script-list.class.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains a class to manage script assets.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package factory-core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Script List
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class Factory326_ScriptList extends Factory326_AssetsList {
18
+
19
+ public $localizeData = array();
20
+ public $useAjax = false;
21
+
22
+ public function connect($source = 'wordpress')
23
+ {
24
+
25
+ // register all global required scripts
26
+ if( !empty($this->required[$source]) ) {
27
+ foreach($this->required[$source] as $script) {
28
+ if( 'wordpress' === $source ) {
29
+ wp_enqueue_script($script);
30
+ } elseif( 'bootstrap' === $source ) {
31
+ $this->plugin->bootstrap->enqueueScript($script);
32
+ }
33
+ }
34
+ }
35
+
36
+ if( $source == 'bootstrap' ) {
37
+ return;
38
+ }
39
+
40
+ $isFirstScript = true;
41
+ $isFooter = false;
42
+
43
+ // register all other scripts
44
+ foreach(array($this->headerPlace, $this->footerPlace) as $scriptPlace) {
45
+ foreach($scriptPlace as $script) {
46
+
47
+ wp_register_script($script, $script, array(), $this->plugin->version, $isFooter);
48
+
49
+ if( $isFirstScript && $this->useAjax ) {
50
+ wp_localize_script($script, 'factory', array('ajaxurl' => admin_url('admin-ajax.php')));
51
+ }
52
+
53
+ if( !empty($this->localizeData[$script]) ) {
54
+
55
+ wp_localize_script($script, $this->localizeData[$script][0], $this->localizeData[$script][1]);
56
+ }
57
+
58
+ wp_enqueue_script($script);
59
+ $siFirstScript = false;
60
+ }
61
+
62
+ $isFooter = true;
63
+ }
64
+ }
65
+
66
+ public function useAjax()
67
+ {
68
+ $this->useAjax = true;
69
+ }
70
+
71
+ public function localize($varname, $data)
72
+ {
73
+ $bindTo = count($this->all) == 0
74
+ ? null
75
+ : end($this->all);
76
+ if( !$bindTo ) {
77
+ return;
78
+ }
79
+
80
+ $this->localizeData[$bindTo] = array($varname, $data);
81
+
82
+ return $this;
83
+ }
84
+ }
libs/factory/core/includes/assets-managment/style-list.class.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains a class to manage style assets.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package factory-core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Style List
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class Factory326_StyleList extends Factory326_AssetsList {
18
+
19
+ public function connect($source = 'wordpress')
20
+ {
21
+
22
+ // register all global required scripts
23
+ if( !empty($this->required[$source]) ) {
24
+
25
+ foreach($this->required[$source] as $style) {
26
+ if( 'wordpress' === $source ) {
27
+ wp_enqueue_style($style);
28
+ } elseif( 'bootstrap' === $source ) {
29
+ $this->plugin->bootstrap->enqueueStyle($style);
30
+ }
31
+ }
32
+ }
33
+
34
+ if( $source == 'bootstrap' ) {
35
+ return;
36
+ }
37
+
38
+ // register all other styles
39
+ foreach($this->all as $style) {
40
+ wp_enqueue_style(md5($style), $style, array(), $this->plugin->version);
41
+ }
42
+ }
43
+ }
libs/factory/core/includes/functions.php ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Factory Function Library
4
+ *
5
+ * ToDo: remove this file in future
6
+ *
7
+ * @author Paul Kashtanoff <paul@byonepress.com>
8
+ * @copyright (c) 2013, OnePress Ltd
9
+ *
10
+ * @package factory-core
11
+ * @since 1.0.0
12
+ */
13
+
14
+ /**
15
+ * Returns a nonce based on a current wordpress blog options.
16
+ *
17
+ * @since 1.0.0
18
+ * @return string
19
+ */
20
+ function factory_326_get_nonce() {
21
+ $values = array('name', 'description', 'admin_email', 'url', 'language', 'version');
22
+ $line = '';
23
+
24
+ foreach($values as $value) $line .= get_bloginfo($value);
25
+ return md5( $line );
26
+ }
27
+
28
+ /**
29
+ * Prints a nonce based on a current wordpress blog options.
30
+ *
31
+ * @since 1.0.0
32
+ * @return string
33
+ */
34
+ function factory_326_nonce() {
35
+ echo factory_326_get_nonce();
36
+ }
37
+
38
+ // ------------------------------
39
+ // String functions
40
+ // ------------------------------
41
+
42
+ /**
43
+ * Checks if $haystack strats with $needle.
44
+ *
45
+ * @since 1.0.0
46
+ * @param string $haystack
47
+ * @param string $needle
48
+ * @return bool
49
+ */
50
+ function factory_326_starts_with($haystack, $needle) {
51
+ return !strncmp($haystack, $needle, strlen($needle));
52
+ }
53
+
54
+ /**
55
+ * Checks if $haystack ends with $needle.
56
+ *
57
+ * @since 1.0.0
58
+ * @param string $haystack
59
+ * @param string $needle
60
+ * @return bool
61
+ */
62
+ function factory_326_ends_with($haystack, $needle) {
63
+ $length = strlen($needle);
64
+ if ($length == 0) return true;
65
+ return (substr($haystack, -$length) === $needle);
66
+ }
67
+
68
+ // ------------------------------
69
+ // Json functions
70
+ // ------------------------------
71
+
72
+ function factory_326_json_error($error) {
73
+ echo json_encode(array('error' => $error));
74
+ exit;
75
+ }
76
+
77
+ function factory_326_json_success( $data = array() ) {
78
+ $data['error'] = false;
79
+ echo json_encode( $data );
80
+ exit;
81
+ }
82
+
83
+ // ------------------------------
84
+ // File functions
85
+ // ------------------------------
86
+
87
+ /**
88
+ * Gets data about a given path.
89
+ *
90
+ * @since 1.0.0
91
+ * @param type $path A path to get data.
92
+ * @return string[]
93
+ */
94
+ function factory_326_pathinfo( $path ) {
95
+ $data = pathinfo($path);
96
+ $data['filename'] = factory_326_filename_without_ext($data['basename']);
97
+ return $data;
98
+ }
99
+
100
+ /**
101
+ * Gets a file name without its extention.
102
+ *
103
+ * @since 1.0.0
104
+ * @param string $filename A file name to process.
105
+ * @return string
106
+ */
107
+ function factory_326_filename_without_ext($filename){
108
+ $pos = strripos($filename, '.');
109
+ if($pos === false){
110
+ return $filename;
111
+ }else{
112
+ return substr($filename, 0, $pos);
113
+ }
114
+ }
115
+
116
+ /**
117
+ * Gets a file extention.
118
+ *
119
+ * @since 1.0.0
120
+ * @param string $filename A file name to get an extention.
121
+ * @return string
122
+ */
123
+ function factory_326_filename_ext($filename){
124
+ $result = explode('.', $filename);
125
+ if ( empty($result) ) return null;
126
+ return $result[count($result)-1];
127
+ }
128
+
129
+ function factory_326_get_human_filesize_by_path( $path ) {
130
+ $bytes = filesize( $path );
131
+ return factory_get_human_filesize( $bytes );
132
+ }
133
+
134
+ function factory_326_get_human_filesize( $bytes ) {
135
+ if ($bytes >= 1073741824)
136
+ {
137
+ $bytes = number_format($bytes / 1073741824, 2) . ' GB';
138
+ }
139
+ elseif ($bytes >= 1048576)
140
+ {
141
+ $bytes = number_format($bytes / 1048576, 2) . ' MB';
142
+ }
143
+ elseif ($bytes >= 1024)
144
+ {
145
+ $bytes = number_format($bytes / 1024, 2) . ' KB';
146
+ }
147
+ elseif ($bytes > 1)
148
+ {
149
+ $bytes = $bytes . ' bytes';
150
+ }
151
+ elseif ($bytes == 1)
152
+ {
153
+ $bytes = $bytes . ' byte';
154
+ }
155
+ else
156
+ {
157
+ $bytes = '0 bytes';
158
+ }
159
+
160
+ return $bytes;
161
+ }
162
+
163
+ // ------------------------------
164
+ // Date functions
165
+ // ------------------------------
166
+
167
+ /**
168
+ * @since 1.0.0
169
+ */
170
+ function factory_326_get_days( $startDate, $endDate ) {
171
+ return floor( abs( $endDate - $startDate ) / (60*60*24) ) + 1;
172
+ }
173
+
174
+ /**
175
+ * @since 1.0.0
176
+ */
177
+ function factory_326_get_weeks( $startDate, $endDate ) {
178
+ $days = factory_326_get_days( $startDate, $endDate );
179
+
180
+ $startDay = date( "w", $startDate );
181
+ $endDay = date( "w", $endDate );
182
+
183
+ if ( $days < 7 ) {
184
+ if ( $endDay < $startDay ) {
185
+ return 2;
186
+ } else {
187
+ return 1;
188
+ }
189
+ } else {
190
+ return floor( $days / 7 );
191
+ }
192
+ }
193
+
194
+ /**
195
+ * @since 1.0.0
196
+ */
197
+ function factory_326_get_months( $startDate, $endDate ) {
198
+ return floor( abs( $endDate - $startDate ) / (60*60*24*30) );
199
+ }
200
+
201
+ /**
202
+ * Checks if a user is an administrator.
203
+ *
204
+ * @since 1.5.0
205
+ * @return type
206
+ */
207
+ function factory_326_is_administrator() {
208
+ return current_user_can( 'manage_options' );
209
+ }
210
+
211
+ /**
212
+ * Prints hard-coded formatted html error.
213
+ *
214
+ * @since 3.0.6
215
+ * @param type $title a title of the error to print
216
+ * @param type $message a message of the error to print
217
+ * @return void
218
+ */
219
+ function factory_326_print_error( $title, $message ) {
220
+ ?>
221
+ <div class="factory-error" style="padding: 10px; border: 3px solid #b23e3a; background: #cf4944; color: #fff;">
222
+ <strong><?php echo $title ?></strong><br />
223
+ <p style="margin: 0px;"><?php echo $message ?></p>
224
+ </div>
225
+ <?php
226
+ }
227
+
228
+ /**
229
+ * Prints a script that resized parent iframe.
230
+ *
231
+ * @since 3.0.6
232
+ * @return void
233
+ */
234
+ function factory_326_iframe_resize_script( $wrapId ) {
235
+ ?>
236
+ <script>
237
+ var $ = window.parent.jQuery;
238
+ var $doc = $(window.document);
239
+ var $parentDoc = $(window.parent.document);
240
+
241
+ var $body = $doc.find("body");
242
+ if ( $body.length === 1 ) {
243
+
244
+ var heigth = $body.height() + 20;
245
+ if ( heigth < 150 ) heigth = 150;
246
+
247
+ var $iframe = $parentDoc.find("#<?php echo $wrapId ?> iframe");
248
+ $iframe.height(heigth);
249
+ }
250
+ </script>
251
+ <?php
252
+ }
253
+
254
+ /**
255
+ * Sets a lazy redirect.
256
+ *
257
+ * @since 3.0.6
258
+ * @return void
259
+ */
260
+ function factory_326_set_lazy_redirect( $url ) {
261
+ update_option('factory_lazy_redirect', $url );
262
+ }
263
+
264
+ add_action('admin_init', 'factory_326_do_lazy_redirect');
265
+ function factory_326_do_lazy_redirect() {
266
+ $url = get_option('factory_lazy_redirect', null );
267
+ if ( empty($url) ) return;
268
+
269
+ delete_option('factory_lazy_redirect');
270
+ wp_redirect($url);
271
+ }
272
+
273
+
274
+ /**
275
+ * Fires functions attached to a deprecated filter hook.
276
+ *
277
+ * When a filter hook is deprecated, the apply_filters() call is replaced with
278
+ * apply_filters_deprecated(), which triggers a deprecation notice and then fires
279
+ * the original filter hook.
280
+ *
281
+ * This is a copy of `apply_filters_deprecated` introduced in WP 4.6.
282
+ *
283
+ * @since 1.0.0
284
+ *
285
+ * @see factory_326_deprecated_hook()
286
+ *
287
+ * @param string $tag The name of the filter hook.
288
+ * @param array $args Array of additional function arguments to be passed to apply_filters().
289
+ * @param string $version The version of BP Block Users that deprecated the hook.
290
+ * @param string $replacement Optional. The hook that should have been used.
291
+ * @param string $message Optional. A message regarding the change.
292
+ *
293
+ * @return mixed
294
+ */
295
+ function factory_326_apply_filters_deprecated($tag, $args, $version, $replacement = false, $message = null)
296
+ {
297
+ if( function_exists('apply_filters_deprecated') ) {
298
+ return apply_filters_deprecated($tag, $args, $version, $replacement, $message);
299
+ }
300
+ if( !has_filter($tag) ) {
301
+ return $args[0];
302
+ }
303
+ factory_326_deprecated_hook($tag, $version, $replacement, $message);
304
+
305
+ return apply_filters_ref_array($tag, $args);
306
+ }
307
+
308
+ /**
309
+ * Fires functions attached to a deprecated action hook.
310
+ *
311
+ * When an action hook is deprecated, the do_action() call is replaced with
312
+ * do_action_deprecated(), which triggers a deprecation notice and then fires
313
+ * the original hook.
314
+ *
315
+ * This is a copy of `do_action_deprecated` introduced in WP 4.6.
316
+ *
317
+ * @since 1.0.0
318
+ *
319
+ * @see _deprecated_hook()
320
+ *
321
+ * @param string $tag The name of the action hook.
322
+ * @param array $args Array of additional function arguments to be passed to do_action().
323
+ * @param string $version The version of BP Block Users that deprecated the hook.
324
+ * @param string $replacement Optional. The hook that should have been used.
325
+ * @param string $message Optional. A message regarding the change.
326
+ *
327
+ * @return void
328
+ */
329
+ function factory_326_do_action_deprecated($tag, $args, $version, $replacement = false, $message = null)
330
+ {
331
+ if( function_exists('do_action_deprecated') ) {
332
+ do_action_deprecated($tag, $args, $version, $replacement, $message);
333
+
334
+ return;
335
+ }
336
+ if( !has_action($tag) ) {
337
+ return;
338
+ }
339
+ factory_326_deprecated_hook($tag, $version, $replacement, $message);
340
+ do_action_ref_array($tag, $args);
341
+ }
342
+
343
+ /**
344
+ * Marks a deprecated action or filter hook as deprecated and throws a notice.
345
+ *
346
+ * Use the 'factory_326_deprecated_hook_run' action to get the backtrace describing where the
347
+ * deprecated hook was called.
348
+ *
349
+ * Default behavior is to trigger a user error if WP_DEBUG is true.
350
+ *
351
+ * This function is called by the do_action_deprecated() and apply_filters_deprecated()
352
+ * functions, and so generally does not need to be called directly.
353
+ *
354
+ * This is a copy of `_deprecated_hook` introduced in WP 4.6.
355
+ *
356
+ * @since 1.0.0
357
+ * @access private
358
+ *
359
+ * @param string $hook The hook that was used.
360
+ * @param string $version The version of WordPress that deprecated the hook.
361
+ * @param string $replacement Optional. The hook that should have been used.
362
+ * @param string $message Optional. A message regarding the change.
363
+ */
364
+ function factory_326_deprecated_hook($hook, $version, $replacement = null, $message = null)
365
+ {
366
+ /**
367
+ * Fires when a deprecated hook is called.
368
+ *
369
+ * @since 1.0.0
370
+ *
371
+ * @param string $hook The hook that was called.
372
+ * @param string $replacement The hook that should be used as a replacement.
373
+ * @param string $version The version of BP Block Users that deprecated the argument used.
374
+ * @param string $message A message regarding the change.
375
+ */
376
+ do_action('deprecated_hook_run', $hook, $replacement, $version, $message);
377
+ /**
378
+ * Filter whether to trigger deprecated hook errors.
379
+ *
380
+ * @since 1.0.0
381
+ *
382
+ * @param bool $trigger Whether to trigger deprecated hook errors. Requires
383
+ * `WP_DEBUG` to be defined true.
384
+ */
385
+ if( WP_DEBUG && apply_filters('deprecated_hook_trigger_error', true) ) {
386
+ $message = empty($message)
387
+ ? ''
388
+ : ' ' . $message;
389
+ if( !is_null($replacement) ) {
390
+ trigger_error(sprintf(__('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $hook, $version, $replacement) . $message);
391
+ } else {
392
+ trigger_error(sprintf(__('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $hook, $version) . $message);
393
+ }
394
+ }
395
+ }
396
+
libs/factory/core/includes/plugin.class.php ADDED
@@ -0,0 +1,730 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class to register a plugin in the Factory.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package factory-core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ if( !class_exists('Factory_Plugins') ) {
13
+
14
+ /**
15
+ * A collection of created plugins.
16
+ *
17
+ * This class has the same name across all possible Factorries.
18
+ *
19
+ * @since 1.0.0
20
+ */
21
+ class Factory_Plugins {
22
+
23
+ protected static $plugins = array();
24
+
25
+ /**
26
+ * Registers a plugin
27
+ *
28
+ * @since 1.0.0
29
+ */
30
+ public static function register($plugin)
31
+ {
32
+ self::$plugins[$plugin->pluginName] = $plugin;
33
+ }
34
+
35
+ /**
36
+ * Get a plugin by its name.
37
+ *
38
+ * @since 1.0.0
39
+ */
40
+ public static function get($pluginName)
41
+ {
42
+ if( isset(self::$plugins[$pluginName]) ) {
43
+ return self::$plugins[$pluginName];
44
+ }
45
+
46
+ return null;
47
+ }
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Factory Plugin
53
+ *
54
+ * @since 1.0.0
55
+ */
56
+ class Factory326_Plugin {
57
+
58
+ /**
59
+ * Is a current page one of the admin pages?
60
+ *
61
+ * @since 1.0.0
62
+ * @var bool
63
+ */
64
+ public $isAdmin;
65
+
66
+ /**
67
+ * A class name of an activator to activate the plugin.
68
+ *
69
+ * @var string
70
+ */
71
+ protected $activatorClass = array();
72
+
73
+ /**
74
+ * Creates an instance of Factory plugin.
75
+ *
76
+ * @param $pluginPath A full path to the main plugin file.
77
+ * @param $data A set of plugin data.
78
+ * @since 1.0.0
79
+ */
80
+ public function __construct($pluginPath, $data)
81
+ {
82
+ $this->options = $data;
83
+
84
+ // saves plugin basic paramaters
85
+ $this->mainFile = $pluginPath;
86
+ $this->pluginRoot = dirname($pluginPath);
87
+ $this->relativePath = plugin_basename($pluginPath);
88
+ $this->pluginUrl = plugins_url(null, $pluginPath);
89
+
90
+ // child plugins, these plugins depend on activation/deactivation of the core plugin
91
+ $this->childPlugins = isset($data['childPlugins'])
92
+ ? $data['childPlugins']
93
+ : array();
94
+
95
+ // some extra params
96
+ $this->pluginName = isset($data['name'])
97
+ ? $data['name']
98
+ : null;
99
+ $this->pluginTitle = isset($data['title'])
100
+ ? $data['title']
101
+ : null;
102
+ $this->version = isset($data['version'])
103
+ ? $data['version']
104
+ : null;
105
+ $this->build = isset($data['assembly'])
106
+ ? $data['assembly']
107
+ : null;
108
+ $this->tracker = isset ($data['tracker'])
109
+ ? $data['tracker']
110
+ : null;
111
+ $this->host = isset($_SERVER['HTTP_HOST'])
112
+ ? $_SERVER['HTTP_HOST']
113
+ : null;
114
+
115
+ // used only in the module 'updates'
116
+ $this->pluginSlug = !empty($this->pluginName)
117
+ ? $this->pluginName
118
+ : basename($pluginPath);
119
+
120
+ // just caching this varibale
121
+ $this->isAdmin = is_admin();
122
+
123
+ // registers the plugin in the global collection
124
+ Factory_Plugins::register($this);
125
+
126
+ // init actions
127
+ $this->setupActions();
128
+
129
+ // register activation hooks
130
+ if( is_admin() ) {
131
+ register_activation_hook($this->mainFile, array($this, 'forceActivationHook'));
132
+ register_deactivation_hook($this->mainFile, array($this, 'deactivationHook'));
133
+ }
134
+ }
135
+
136
+ /**
137
+ * Loads modules required for a plugin.
138
+ *
139
+ * @since 3.2.0
140
+ * @param mixed[] $modules
141
+ * @return void
142
+ */
143
+ public function load($modules = array())
144
+ {
145
+ foreach($modules as $module) {
146
+ $this->loadModule($module);
147
+ }
148
+
149
+ do_action('factory_core_modules_loaded-' . $this->pluginName);
150
+ }
151
+
152
+ /**
153
+ * Loads add-ons for the plugin.
154
+ */
155
+ public function loadAddons($addons)
156
+ {
157
+ if( empty($addons) ) {
158
+ return;
159
+ }
160
+
161
+ foreach($addons as $addonName => $addonPath) {
162
+ $constName = strtoupper('LOADING_' . $addonName . '_AS_ADDON');
163
+ if( !defined($constName) ) {
164
+ define($constName, true);
165
+ }
166
+ require_once($addonPath);
167
+ }
168
+ }
169
+
170
+ /**
171
+ * Loads a specified module.
172
+ *
173
+ * @since 3.2.0
174
+ * @param string $modulePath
175
+ * @param string $moduleVersion
176
+ * @return void
177
+ */
178
+ public function loadModule($module)
179
+ {
180
+ $scope = isset($module[2])
181
+ ? $module[2]
182
+ : 'all';
183
+
184
+ if( $scope == 'all' || (is_admin() && $scope == 'admin') || (!is_admin() && $scope == 'public') ) {
185
+
186
+ require $this->pluginRoot . '/' . $module[0] . '/boot.php';
187
+ do_action($module[1] . '_plugin_created', $this);
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Registers a class to activate the plugin.
193
+ *
194
+ * @since 1.0.0
195
+ * @param string A class name of the plugin activator.
196
+ * @return void
197
+ */
198
+ public function registerActivation($className)
199
+ {
200
+ $this->activatorClass[] = $className;
201
+ }
202
+
203
+ /**
204
+ * Setups actions related with the Factory Plugin.
205
+ *
206
+ * @since 1.0.0
207
+ */
208
+ private function setupActions()
209
+ {
210
+ add_action('init', array($this, 'checkPluginVersioninDatabase'));
211
+
212
+ if( $this->isAdmin ) {
213
+ add_action('admin_init', array($this, 'customizePluginRow'), 20);
214
+ add_action('factory_core_modules_loaded-' . $this->pluginName, array($this, 'modulesLoaded'));
215
+ }
216
+ }
217
+
218
+ /**
219
+ * Checks the plugin version in database. If it's not the same as the currernt,
220
+ * it means that the plugin was updated and we need to execute the update hook.
221
+ *
222
+ * Calls on the hook "plugins_loaded".
223
+ *
224
+ * @since 1.0.0
225
+ * @return void
226
+ */
227
+ public function checkPluginVersioninDatabase()
228
+ {
229
+
230
+ // checks whether the plugin needs to run updates.
231
+ if( $this->isAdmin ) {
232
+ $version = $this->getPluginVersionFromDatabase();
233
+
234
+ if( $version != $this->build . '-' . $this->version ) {
235
+ $this->activationOrUpdateHook(false);
236
+ }
237
+ }
238
+ }
239
+
240
+ /**
241
+ * Returns the plugin version from database.
242
+ *
243
+ * @since 1.0.0
244
+ * @return string|null The plugin version registered in the database.
245
+ */
246
+ public function getPluginVersionFromDatabase()
247
+ {
248
+ $versions = get_option('factory_plugin_versions', array());
249
+ $version = isset ($versions[$this->pluginName])
250
+ ? $versions[$this->pluginName]
251
+ : null;
252
+
253
+ // for combability with previous versions
254
+ // @todo: remove after several updates
255
+ if( !$version ) {
256
+ return get_option('fy_plugin_version_' . $this->pluginName, null);
257
+ }
258
+
259
+ return $version;
260
+ }
261
+
262
+ /**
263
+ * Registers in the database a new version of the plugin.
264
+ *
265
+ * @since 1.0.0
266
+ * @return void
267
+ */
268
+ public function updatePluginVersionInDatabase()
269
+ {
270
+ $versions = get_option('factory_plugin_versions', array());
271
+ $versions[$this->pluginName] = $this->build . '-' . $this->version;
272
+ update_option('factory_plugin_versions', $versions);
273
+ }
274
+
275
+ /**
276
+ * Customize the plugin row (on the page plugins.php).
277
+ *
278
+ * Calls on the hook "admin_init".
279
+ *
280
+ * @since 1.0.0
281
+ * @return void
282
+ */
283
+ public function customizePluginRow()
284
+ {
285
+ remove_action("after_plugin_row_" . $this->relativePath, 'wp_plugin_update_row');
286
+ add_action("after_plugin_row_" . $this->relativePath, array($this, 'showCustomPluginRow'), 10, 2);
287
+ }
288
+
289
+ public function activate()
290
+ {
291
+ $this->forceActivationHook();
292
+ }
293
+
294
+ public function deactivate()
295
+ {
296
+ $this->deactivationHook();
297
+ }
298
+
299
+ /**
300
+ * Executes an activation hook for this plugin immediately.
301
+ *
302
+ * @since 1.0.0
303
+ * @return void
304
+ */
305
+ public function forceActivationHook()
306
+ {
307
+ $this->activationOrUpdateHook(true);
308
+
309
+ // activates the child plugins
310
+ if( !empty($this->childPlugins) ) {
311
+ foreach($this->childPlugins as $childPluginName) {
312
+
313
+ $childPlugin = Factory_Plugins::get($childPluginName);
314
+ if( empty($childPlugin) ) {
315
+ die('The child plugin "' . $childPluginName . '" not found.');
316
+ }
317
+
318
+ $childPlugin->forceActivationHook();
319
+ }
320
+ }
321
+ }
322
+
323
+ /**
324
+ * Executes an activation hook or an update hook.
325
+ *
326
+ * @param bool $forceActivation If true, then executes an activation hook.
327
+ * @since 1.0.0
328
+ * @return void
329
+ */
330
+ public function activationOrUpdateHook($forceActivation = false)
331
+ {
332
+
333
+ $dbVersion = $this->getPluginVersionFromDatabase();
334
+ do_action('factory_plugin_activation_or_update_' . $this->pluginName, $forceActivation, $dbVersion, $this);
335
+
336
+ // there are not any previous version of the plugin in the past
337
+ if( !$dbVersion ) {
338
+ $this->activationHook();
339
+
340
+ $this->updatePluginVersionInDatabase();
341
+
342
+ return;
343
+ }
344
+
345
+ $parts = explode('-', $dbVersion);
346
+ $prevousBuild = $parts[0];
347
+ $prevousVersion = $parts[1];
348
+
349
+ // if another build was used previously
350
+ if( $prevousBuild != $this->build ) {
351
+ $this->migrationHook($prevousBuild, $this->build);
352
+ $this->activationHook();
353
+
354
+ $this->updatePluginVersionInDatabase();
355
+
356
+ return;
357
+ }
358
+
359
+ // if another less version was used previously
360
+ if( version_compare($prevousVersion, $this->version, '<') ) {
361
+ $this->updateHook($prevousVersion, $this->version);
362
+ }
363
+
364
+ // standart plugin activation
365
+ if( $forceActivation ) {
366
+ $this->activationHook();
367
+ }
368
+
369
+ // else nothing to do
370
+ $this->updatePluginVersionInDatabase();
371
+
372
+ return;
373
+ }
374
+
375
+ /**
376
+ * It's invoked on plugin activation. Don't excite it directly.
377
+ *
378
+ * @since 1.0.0
379
+ * @return void
380
+ */
381
+ public function activationHook()
382
+ {
383
+
384
+ $cancelled = apply_filters('factory_cancel_plugin_activation_' . $this->pluginName, false);
385
+ if( $cancelled ) {
386
+ return;
387
+ }
388
+
389
+ if( !empty($this->activatorClass) ) {
390
+ foreach($this->activatorClass as $activatorClass) {
391
+ $activator = new $activatorClass($this);
392
+ $activator->activate();
393
+ }
394
+ }
395
+
396
+ do_action('factory_326_plugin_activation', $this);
397
+ do_action('factory_plugin_activation_' . $this->pluginName, $this);
398
+
399
+ // just time to know when the plugin was activated the first time
400
+ $activated = get_option('factory_plugin_activated_' . $this->pluginName, 0);
401
+ if( !$activated ) {
402
+ update_option('factory_plugin_activated_' . $this->pluginName, time());
403
+ }
404
+ }
405
+
406
+ /**
407
+ * It's invoked on plugin deactionvation. Don't excite it directly.
408
+ *
409
+ * @since 1.0.0
410
+ * @return void
411
+ */
412
+ public function deactivationHook()
413
+ {
414
+
415
+ $cancelled = apply_filters('factory_cancel_plugin_deactivation_' . $this->pluginName, false);
416
+ if( $cancelled ) {
417
+ return;
418
+ }
419
+
420
+ do_action('factory_326_plugin_deactivation', $this);
421
+ do_action('factory_plugin_deactivation_' . $this->pluginName, $this);
422
+
423
+ if( !empty($this->activatorClass) ) {
424
+ foreach($this->activatorClass as $activatorClass) {
425
+ $activator = new $activatorClass($this);
426
+ $activator->deactivate();
427
+ }
428
+ }
429
+
430
+ // deactivates the child plugins
431
+ if( !empty($this->childPlugins) ) {
432
+ foreach($this->childPlugins as $childPluginName) {
433
+
434
+ $childPlugin = Factory_Plugins::get($childPluginName);
435
+ if( empty($childPlugin) ) {
436
+ die('The child plugin "' . $childPluginName . '" not found.');
437
+ }
438
+
439
+ $childPlugin->deactivationHook();
440
+ }
441
+ }
442
+ }
443
+
444
+ /**
445
+ * Finds migration items and install ones.
446
+ *
447
+ * @since 1.0.0
448
+ * @return void
449
+ */
450
+ public function migrationHook($previosBuild, $currentBuild)
451
+ {
452
+
453
+ $migrationFile = $this->options['updates'] . $previosBuild . '-' . $currentBuild . '.php';
454
+ if( !file_exists($migrationFile) ) {
455
+ return;
456
+ }
457
+
458
+ $classes = $this->getClasses($migrationFile);
459
+ if( count($classes) == 0 ) {
460
+ return;
461
+ }
462
+
463
+ include_once($migrationFile);
464
+ $migrationClass = $classes[0]['name'];
465
+
466
+ $migrationItem = new $migrationClass($this->plugin);
467
+ $migrationItem->install();
468
+ }
469
+
470
+ /**
471
+ * Finds upate items and install the ones.
472
+ *
473
+ * @since 1.0.0
474
+ * @return void
475
+ */
476
+ public function updateHook($old, $new)
477
+ {
478
+
479
+ // converts versions like 0.0.0 to 000000
480
+ $oldNumber = $this->getVersionNumber($old);
481
+ $newNumber = $this->getVersionNumber($new);
482
+
483
+ $updateFiles = $this->options['updates'];
484
+ $files = $this->findFiles($updateFiles);
485
+
486
+ if( empty($files) ) {
487
+ return;
488
+ }
489
+
490
+ // finds updates that has intermediate version
491
+ foreach($files as $item) {
492
+ if( !preg_match('/^\d+$/', $item['name']) ) {
493
+ continue;
494
+ }
495
+
496
+ $itemNumber = intval($item['name']);
497
+ if( $itemNumber > $oldNumber && $itemNumber <= $newNumber ) {
498
+
499
+ $classes = $this->getClasses($item['path']);
500
+ if( count($classes) == 0 ) {
501
+ return;
502
+ }
503
+
504
+ foreach($classes as $path => $classData) {
505
+ include_once($path);
506
+ $updateClass = $classData['name'];
507
+
508
+ $update = new $updateClass($this);
509
+ $update->install();
510
+ }
511
+ }
512
+ }
513
+
514
+ // just time to know when the plugin was activated the first time
515
+ $activated = get_option('factory_plugin_activated_' . $this->pluginName, 0);
516
+ if( !$activated ) {
517
+ update_option('factory_plugin_activated_' . $this->pluginName, time());
518
+ }
519
+ }
520
+
521
+ /**
522
+ * Converts string representation of the version to the numeric.
523
+ *
524
+ * @since 1.0.0
525
+ * @param string $version A string version to convert.
526
+ * @return integer
527
+ */
528
+ protected function getVersionNumber($version)
529
+ {
530
+
531
+ preg_match('/(\d+)\.(\d+)\.(\d+)/', $version, $matches);
532
+ if( count($matches) == 0 ) {
533
+ return false;
534
+ }
535
+
536
+ $number = '';
537
+ $number .= (strlen($matches[1]) == 1)
538
+ ? '0' . $matches[1]
539
+ : $matches[1];
540
+ $number .= (strlen($matches[2]) == 1)
541
+ ? '0' . $matches[2]
542
+ : $matches[2];
543
+ $number .= (strlen($matches[3]) == 1)
544
+ ? '0' . $matches[3]
545
+ : $matches[3];
546
+
547
+ return intval($number);
548
+ }
549
+
550
+ /**
551
+ * Forces modules.
552
+ *
553
+ * @since 1.0.0
554
+ * @return void
555
+ */
556
+ public function modulesLoaded()
557
+ {
558
+ // factory_core_000_modules_loaded( $this );
559
+ }
560
+
561
+ /**
562
+ * Shows admin notices for a given plugin.
563
+ *
564
+ * @since 1.0.0
565
+ * @return void
566
+ */
567
+ public function showAdminNotices()
568
+ {
569
+ factory_core_000_show_admin_notices($this);
570
+ }
571
+
572
+ /**
573
+ * Hook action.
574
+ *
575
+ * @since 1.0.0
576
+ * @return void
577
+ */
578
+ public function hook()
579
+ {
580
+ factory_core_000_hook($this);
581
+ }
582
+
583
+ // ----------------------------------------------------------------------
584
+ // Plugin row on plugins.php page
585
+ // ----------------------------------------------------------------------
586
+
587
+ public function showCustomPluginRow($file, $plugin_data)
588
+ {
589
+ if( !is_network_admin() && is_multisite() ) {
590
+ return;
591
+ }
592
+
593
+ $messages = apply_filters('factory_plugin_row_' . $this->pluginName, array(), $file, $plugin_data);
594
+
595
+ // if nothign to show then, use default handle
596
+ /*if( count($messages) == 0 ) {
597
+ wp_plugin_update_row($file, $plugin_data);
598
+
599
+ return;
600
+ }*/
601
+
602
+ if( empty($messages) ) {
603
+ return;
604
+ }
605
+
606
+ $wp_list_table = _get_list_table('WP_Plugins_List_Table');
607
+
608
+ foreach($messages as $message) {
609
+ echo '<tr class="plugin-update-tr active">';
610
+ echo '<td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">';
611
+ echo '<div class="update-message notice inline notice-error notice-alt">';
612
+ echo '<p>' . $message . '</p>';
613
+ echo '</div>';
614
+ echo '</td></tr>';
615
+ }
616
+ }
617
+
618
+ // ----------------------------------------------------------------------
619
+ // Finding files
620
+ // ----------------------------------------------------------------------
621
+
622
+ /**
623
+ * Returns a list of files at a given path.
624
+ * @param string $path path for search
625
+ */
626
+ private function findFiles($path)
627
+ {
628
+ return $this->findFileOrFolders($path, true);
629
+ }
630
+
631
+ /**
632
+ * Returns a list of folders at a given path.
633
+ * @param string $path path for search
634
+ */
635
+ private function findFolders($path)
636
+ {
637
+ return $this->findFileOrFolders($path, false);
638
+ }
639
+
640
+ /**
641
+ * Returns a list of files or folders at a given path.
642
+ * @param string $path path for search
643
+ * @param bool $files files or folders?
644
+ */
645
+ private function findFileOrFolders($path, $areFiles = true)
646
+ {
647
+ if( !is_dir($path) ) {
648
+ return array();
649
+ }
650
+
651
+ $entries = scandir($path);
652
+ if( empty($entries) ) {
653
+ return array();
654
+ }
655
+
656
+ $files = array();
657
+ foreach($entries as $entryName) {
658
+ if( $entryName == '.' || $entryName == '..' ) {
659
+ continue;
660
+ }
661
+
662
+ $filename = $path . '/' . $entryName;
663
+ if( ($areFiles && is_file($filename)) || (!$areFiles && is_dir($filename)) ) {
664
+ $files[] = array(
665
+ 'path' => str_replace("\\", "/", $filename),
666
+ 'name' => $areFiles
667
+ ? str_replace('.php', '', $entryName)
668
+ : $entryName
669
+ );
670
+ }
671
+ }
672
+
673
+ return $files;
674
+ }
675
+
676
+ /**
677
+ * Gets php classes defined in a specified file.
678
+ * @param type $path
679
+ */
680
+ private function getClasses($path)
681
+ {
682
+
683
+ $phpCode = file_get_contents($path);
684
+
685
+ $classes = array();
686
+ $tokens = token_get_all($phpCode);
687
+
688
+ $count = count($tokens);
689
+ for($i = 2; $i < $count; $i++) {
690
+ if( is_array($tokens) && $tokens[$i - 2][0] == T_CLASS && $tokens[$i - 1][0] == T_WHITESPACE && $tokens[$i][0] == T_STRING ) {
691
+
692
+ $extends = null;
693
+ if( $tokens[$i + 2][0] == T_EXTENDS && $tokens[$i + 4][0] == T_STRING ) {
694
+ $extends = $tokens[$i + 4][1];
695
+ }
696
+
697
+ $class_name = $tokens[$i][1];
698
+ $classes[$path] = array(
699
+ 'name' => $class_name,
700
+ 'extends' => $extends
701
+ );
702
+ }
703
+ }
704
+
705
+ /**
706
+ * result example:
707
+ *
708
+ * $classes['/plugin/items/filename.php'] = array(
709
+ * 'name' => 'PluginNameItem',
710
+ * 'extendes' => 'PluginNameItemBase'
711
+ * )
712
+ */
713
+
714
+ return $classes;
715
+ }
716
+
717
+ // ----------------------------------------------------------------------
718
+ // Public methods
719
+ // ----------------------------------------------------------------------
720
+
721
+ public function newScriptList()
722
+ {
723
+ return new Factory326_ScriptList($this);
724
+ }
725
+
726
+ public function newStyleList()
727
+ {
728
+ return new Factory326_StyleList($this);
729
+ }
730
+ }
libs/factory/forms/assets/css/editor.css ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ font-family: Arial;
3
+ font-size: 14px;
4
+ background-color: #fff;
5
+ }
6
+ p {
7
+ margin: 0px;
8
+ }
9
+
10
+ p + p {
11
+ margin-top: 5px;
12
+ }
libs/factory/forms/assets/standard-controls.js ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+
3
+ if ( !$.factory ) $.factory = {}
4
+ if ( $.factory.widget ) return;
5
+
6
+ /**
7
+ * OnePress Widget Factory.
8
+ */
9
+ $.factory.widget = function (pluginName, pluginObject) {
10
+
11
+ var factory = {
12
+
13
+ createWidget: function (element, options) {
14
+ var widget = $.extend(true, {}, pluginObject);
15
+
16
+ widget.element = $(element);
17
+ widget.options = $.extend(true, widget.options, options);
18
+
19
+ if (widget._init) widget._init();
20
+ if (widget._create) widget._create();
21
+
22
+ $.data(element, 'plugin_' + pluginName, widget);
23
+ },
24
+
25
+ callMethod: function (widget, methodName) {
26
+ widget[methodName] && widget[methodName]();
27
+ }
28
+ };
29
+
30
+ $.fn[pluginName] = function () {
31
+ var args = arguments;
32
+ var argsCount = arguments.length;
33
+
34
+ this.each(function () {
35
+
36
+ var widget = $.data(this, 'plugin_' + pluginName);
37
+
38
+ // a widget is not created yet
39
+ if (!widget && argsCount <= 1) {
40
+ factory.createWidget(this, argsCount ? args[0] : false);
41
+
42
+ // a widget is created, the public method with no args is being called
43
+ } else if (argsCount == 1) {
44
+ factory.callMethod(widget, args[0]);
45
+ }
46
+ });
47
+ };
48
+ };
49
+
50
+ /**
51
+ * Radio #1
52
+ */
53
+
54
+ $.fn.onpRadioCircles = function( options ) {
55
+ if ( !options ) options = {};
56
+ options.theme = 'circles';
57
+ $(this).onpRadio(options);
58
+ };
59
+
60
+ $.fn.onpRadioSquares = function( options ) {
61
+ if ( !options ) options = {};
62
+ options.theme = 'squares';
63
+ $(this).onpRadio(options);
64
+ };
65
+
66
+ $.factory.widget('onpRadio', {
67
+ options: {
68
+ theme: 'squares',
69
+ selected: null
70
+ },
71
+ _create: function() {
72
+ var self = this;
73
+ this._createMarkup();
74
+
75
+ this.radio.find('.onp-radio-option').click(function(){
76
+ if ( $(this).is(".disabled") ) return;
77
+ var selected = self.radio.find('.onp-radio-option.selected');
78
+ if ( selected.data('value') == $(this).data('value')) return;
79
+
80
+ selected.removeClass('selected');
81
+ $(this).addClass("selected");
82
+
83
+ var value = $(this).data('value');
84
+ self.element.val(value);
85
+ self.element.trigger( "change", $(this).data('value') );
86
+ });
87
+ },
88
+ _createMarkup: function() {
89
+
90
+ var wrap = $("<ul class='onp-radio-wrap'></ul>").addClass('onp-radio-' + this.options.theme);
91
+ this.element.find("option").each(function(){
92
+ var $this = $(this);
93
+
94
+ var value = $this.attr('value');
95
+ var text = $this.html();
96
+ var icon = $this.data('icon');
97
+ var disabled = $this.attr('disabled');
98
+
99
+ var option = $("<li class='onp-radio-option' data-value='" + value + "'></li>");
100
+ var innerOptionWrap = $("<span class='onp-radio-option-inner-wrap'></span>").appendTo(option);
101
+ option.addClass('onp-radio-option-' + value);
102
+
103
+ if ( icon ) innerOptionWrap.append("<i class='" + icon + "'></i>");
104
+ if ( disabled ) option.addClass('disabled');
105
+
106
+ wrap.append(option);
107
+ });
108
+
109
+ this.options.selected = this.options.selected || this.element.find("option:selected").attr('value');
110
+ wrap.find('.onp-radio-option-' + this.options.selected).addClass("selected");
111
+
112
+ this.element.hide();
113
+ this.element.after(wrap);
114
+ this.radio = wrap;
115
+ }
116
+ });
117
+
118
+ var factoryForms = {
119
+
120
+ collapsedGroups: function( $target ) {
121
+ if ( !$target ) $target = $("body");
122
+
123
+ $target.find(".fy-collapsed-show").click(function(){
124
+ $( $(this).attr('href') ).fadeIn();
125
+ $(this).hide();
126
+ return false;
127
+ });
128
+
129
+ $target.find(".fy-collapsed-hide").click(function(){
130
+ var content = $( $(this).attr('href') );
131
+ content.fadeOut(300, function(){
132
+ content.prev().show();
133
+ });
134
+ return false;
135
+ });
136
+ }
137
+ }
138
+
139
+ $(function(){
140
+ $(".onp-radio-circles.auto").onpRadioCircles();
141
+ $(".onp-radio-squares.auto").onpRadioSquares();
142
+ factoryForms.collapsedGroups();
143
+ });
144
+
145
+ })(jQuery)
146
+
libs/factory/forms/boot.php ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Factory Forms
4
+ *
5
+ * Factory Forms is a Factory module that provides a declarative
6
+ * way to build forms without any extra html or css markup.
7
+ *
8
+ * @author Paul Kashtanoff <paul@byonepress.com>, Webcraftic <wordpress.webraftic@gmail.com>
9
+ * @copyright (c) 2013, OnePress Ltd, (c) 2017 Webcraftic Ltd
10
+ *
11
+ * @package factory-forms
12
+ * @since 1.0.1
13
+ */
14
+
15
+ // the module provides function for the admin area only
16
+
17
+ if( !is_admin() ) {
18
+ return;
19
+ }
20
+
21
+ // checks if the module is already loaded in order to
22
+ // prevent loading the same version of the module twice.
23
+ if( defined('FACTORY_FORMS_329_LOADED') ) {
24
+ return;
25
+ }
26
+
27
+ define('FACTORY_FORMS_329_LOADED', true);
28
+
29
+ // absolute path and URL to the files and resources of the module.
30
+ define('FACTORY_FORMS_329_DIR', dirname(__FILE__));
31
+ define('FACTORY_FORMS_329_URL', plugins_url(null, __FILE__));
32
+
33
+ #comp merge
34
+ require(FACTORY_FORMS_329_DIR . '/includes/providers/value-provider.interface.php');
35
+ require(FACTORY_FORMS_329_DIR . '/includes/providers/meta-value-provider.class.php');
36
+ require(FACTORY_FORMS_329_DIR . '/includes/providers/options-value-provider.class.php');
37
+
38
+ require(FACTORY_FORMS_329_DIR . '/includes/form.class.php');
39
+ require(FACTORY_FORMS_329_DIR . '/helpers.php');
40
+ #endcomp
41
+
42
+ load_plugin_textdomain('factory_forms_329', false, dirname(plugin_basename(__FILE__)) . '/langs');
43
+
44
+ /**
45
+ * We add this code into the hook because all these controls quite heavy. So in order to get better perfomance,
46
+ * we load the form controls only on pages where the forms are created.
47
+ *
48
+ * @see the 'factory_forms_329_register_controls' hook
49
+ *
50
+ * @since 3.0.7
51
+ */
52
+ if( !function_exists('factory_forms_329_register_default_controls') ) {
53
+
54
+ function factory_forms_329_register_default_controls($plugin)
55
+ {
56
+
57
+ if( $plugin && !isset($plugin->forms) ) {
58
+ throw new Exception("The module Factory Forms is not loaded for the plugin '{$plugin->pluginName}'.");
59
+ }
60
+
61
+ require_once(FACTORY_FORMS_329_DIR . '/includes/html-builder.class.php');
62
+ require_once(FACTORY_FORMS_329_DIR . '/includes/form-element.class.php');
63
+ require_once(FACTORY_FORMS_329_DIR . '/includes/control.class.php');
64
+ require_once(FACTORY_FORMS_329_DIR . '/includes/complex-control.class.php');
65
+ require_once(FACTORY_FORMS_329_DIR . '/includes/holder.class.php');
66
+ require_once(FACTORY_FORMS_329_DIR . '/includes/control-holder.class.php');
67
+ require_once(FACTORY_FORMS_329_DIR . '/includes/custom-element.class.php');
68
+ require_once(FACTORY_FORMS_329_DIR . '/includes/form-layout.class.php');
69
+
70
+ // registration of controls
71
+ $plugin->forms->registerControls(array(
72
+ array(
73
+ 'type' => 'checkbox',
74
+ 'class' => 'FactoryForms329_CheckboxControl',
75
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/checkbox.php'
76
+ ),
77
+ array(
78
+ 'type' => 'list',
79
+ 'class' => 'FactoryForms329_ListControl',
80
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/list.php'
81
+ ),
82
+ array(
83
+ 'type' => 'dropdown',
84
+ 'class' => 'FactoryForms329_DropdownControl',
85
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/dropdown.php'
86
+ ),
87
+ array(
88
+ 'type' => 'dropdown-and-colors',
89
+ 'class' => 'FactoryForms329_DropdownAndColorsControl',
90
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/dropdown-and-colors.php'
91
+ ),
92
+ array(
93
+ 'type' => 'hidden',
94
+ 'class' => 'FactoryForms329_HiddenControl',
95
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/hidden.php'
96
+ ),
97
+ array(
98
+ 'type' => 'hidden',
99
+ 'class' => 'FactoryForms329_HiddenControl',
100
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/hidden.php'
101
+ ),
102
+ array(
103
+ 'type' => 'radio',
104
+ 'class' => 'FactoryForms329_RadioControl',
105
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/radio.php'
106
+ ),
107
+ array(
108
+ 'type' => 'radio-colors',
109
+ 'class' => 'FactoryForms329_RadioColorsControl',
110
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/radio-colors.php'
111
+ ),
112
+ array(
113
+ 'type' => 'textarea',
114
+ 'class' => 'FactoryForms329_TextareaControl',
115
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/textarea.php'
116
+ ),
117
+ array(
118
+ 'type' => 'textbox',
119
+ 'class' => 'FactoryForms329_TextboxControl',
120
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/textbox.php'
121
+ ),
122
+ array(
123
+ 'type' => 'url',
124
+ 'class' => 'FactoryForms329_UrlControl',
125
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/url.php'
126
+ ),
127
+ array(
128
+ 'type' => 'wp-editor',
129
+ 'class' => 'FactoryForms329_WpEditorControl',
130
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/wp-editor.php'
131
+ ),
132
+ array(
133
+ 'type' => 'color',
134
+ 'class' => 'FactoryForms329_ColorControl',
135
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/color.php'
136
+ ),
137
+ array(
138
+ 'type' => 'color-and-opacity',
139
+ 'class' => 'FactoryForms329_ColorAndOpacityControl',
140
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/color-and-opacity.php'
141
+ ),
142
+ array(
143
+ 'type' => 'gradient',
144
+ 'class' => 'FactoryForms329_GradientControl',
145
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/gradient.php'
146
+ ),
147
+ array(
148
+ 'type' => 'font',
149
+ 'class' => 'FactoryForms329_FontControl',
150
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/font.php'
151
+ ),
152
+ array(
153
+ 'type' => 'google-font',
154
+ 'class' => 'FactoryForms329_GoogleFontControl',
155
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/google-font.php'
156
+ ),
157
+ array(
158
+ 'type' => 'pattern',
159
+ 'class' => 'FactoryForms329_PatternControl',
160
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/pattern.php'
161
+ ),
162
+ array(
163
+ 'type' => 'integer',
164
+ 'class' => 'FactoryForms329_IntegerControl',
165
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/integer.php'
166
+ ),
167
+ array(
168
+ 'type' => 'control-group',
169
+ 'class' => 'FactoryForms329_ControlGroupHolder',
170
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/control-group.php'
171
+ ),
172
+ array(
173
+ 'type' => 'paddings-editor',
174
+ 'class' => 'FactoryForms329_PaddingsEditorControl',
175
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/paddings-editor.php'
176
+ ),
177
+ ));
178
+
179
+ // registration of control holders
180
+ $plugin->forms->registerHolders(array(
181
+ array(
182
+ 'type' => 'tab',
183
+ 'class' => 'FactoryForms329_TabHolder',
184
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/tab.php'
185
+ ),
186
+ array(
187
+ 'type' => 'tab-item',
188
+ 'class' => 'FactoryForms329_TabItemHolder',
189
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/tab-item.php'
190
+ ),
191
+ array(
192
+ 'type' => 'accordion',
193
+ 'class' => 'FactoryForms329_AccordionHolder',
194
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/accordion.php'
195
+ ),
196
+ array(
197
+ 'type' => 'accordion-item',
198
+ 'class' => 'FactoryForms329_AccordionItemHolder',
199
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/accordion-item.php'
200
+ ),
201
+ array(
202
+ 'type' => 'control-group',
203
+ 'class' => 'FactoryForms329_ControlGroupHolder',
204
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/control-group.php'
205
+ ),
206
+ array(
207
+ 'type' => 'control-group-item',
208
+ 'class' => 'FactoryForms329_ControlGroupItem',
209
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/control-group-item.php'
210
+ ),
211
+ array(
212
+ 'type' => 'form-group',
213
+ 'class' => 'FactoryForms329_FormGroupHolder',
214
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/form-group.php'
215
+ ),
216
+ array(
217
+ 'type' => 'more-link',
218
+ 'class' => 'FactoryForms329_MoreLinkHolder',
219
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/more-link.php'
220
+ ),
221
+ array(
222
+ 'type' => 'div',
223
+ 'class' => 'FactoryForms329_DivHolder',
224
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/div.php'
225
+ ),
226
+ array(
227
+ 'type' => 'columns',
228
+ 'class' => 'FactoryForms329_ColumnsHolder',
229
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/holders/columns.php'
230
+ )
231
+ ));
232
+
233
+ // registration custom form elements
234
+ $plugin->forms->registerCustomElements(array(
235
+ array(
236
+ 'type' => 'html',
237
+ 'class' => 'FactoryForms329_Html',
238
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/customs/html.php',
239
+ ),
240
+ array(
241
+ 'type' => 'separator',
242
+ 'class' => 'FactoryForms329_Separator',
243
+ 'include' => FACTORY_FORMS_329_DIR . '/controls/customs/separator.php',
244
+ ),
245
+ ));
246
+
247
+ // registration of form layouts
248
+ $plugin->forms->registerFormLayout(array(
249
+ 'name' => 'bootstrap-2',
250
+ 'class' => 'FactoryForms329_Bootstrap2FormLayout',
251
+ 'include' => FACTORY_FORMS_329_DIR . '/layouts/bootstrap-2/bootstrap-2.php'
252
+ ));
253
+ $plugin->forms->registerFormLayout(array(
254
+ 'name' => 'bootstrap-3',
255
+ 'class' => 'FactoryForms329_Bootstrap3FormLayout',
256
+ 'include' => FACTORY_FORMS_329_DIR . '/layouts/bootstrap-3/bootstrap-3.php'
257
+ ));
258
+ }
259
+
260
+ add_action('factory_forms_329_register_controls', 'factory_forms_329_register_default_controls');
261
+ }
libs/factory/forms/controls/checkbox.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Checkbox Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ *
11
+ * @author Paul Kashtanoff <paul@byonepress.com>
12
+ * @copyright (c) 2013, OnePress Ltd
13
+ *
14
+ * @package factory-forms
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_CheckboxControl extends FactoryForms329_Control {
18
+
19
+ public $type = 'checkbox';
20
+
21
+ public function getSubmitValue($name, $subName)
22
+ {
23
+ $nameOnForm = $this->getNameOnForm($name);
24
+
25
+ return isset($_POST[$nameOnForm]) && $_POST[$nameOnForm] != 0
26
+ ? 1
27
+ : 0;
28
+ }
29
+
30
+ /**
31
+ * Shows the html markup of the control.
32
+ *
33
+ * @since 1.0.0
34
+ * @return void
35
+ */
36
+ public function html()
37
+ {
38
+
39
+ $eventsOnData = $this->getOption('eventsOn', array());
40
+ $eventsOffData = $this->getOption('eventsOff', array());
41
+
42
+ if( !empty($eventsOnData) || !empty($eventsOffData) ) {
43
+
44
+ $eventsOnStringData = json_encode($eventsOnData);
45
+ $eventsOffStringData = json_encode($eventsOffData);
46
+
47
+ $nameOnForm = $this->getNameOnForm();
48
+ $value = $this->getValue();
49
+
50
+ $printStyles = '';
51
+
52
+ if( $value ) {
53
+ $currentEventsData = $eventsOnData;
54
+ } else {
55
+ $currentEventsData = $eventsOffData;
56
+ }
57
+
58
+ foreach($currentEventsData as $eventName => $selectors) {
59
+ if( $eventName == 'hide' ) {
60
+ $printStyles .= $selectors . '{display:none;}';
61
+ } else if( $eventName == 'show' ) {
62
+ $printStyles .= $selectors . '{display:block;}';
63
+ }
64
+ }
65
+
66
+ echo '<style>' . $printStyles . '</style>';
67
+ ?>
68
+
69
+ <script>
70
+ // Onepress factory checkbox control events
71
+ if( void 0 === window.__factory_checkbox_control_events_on_data ) {
72
+ window.__factory_checkbox_control_events_on_data = {};
73
+ }
74
+ if( void 0 === window.__factory_checkbox_control_events_off_data ) {
75
+ window.__factory_checkbox_control_events_off_data = {};
76
+ }
77
+ window.__factory_checkbox_control_events_on_data['<?php echo $nameOnForm ?>'] = <?= $eventsOnStringData ?>;
78
+ window.__factory_checkbox_control_events_off_data['<?php echo $nameOnForm ?>'] = <?= $eventsOffStringData ?>;
79
+ </script>
80
+ <?php
81
+ }
82
+
83
+ if( 'buttons' == $this->getOption('way') ) {
84
+ $this->buttonsHtml();
85
+ } else {
86
+ $this->defaultHtml();
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Shows the Buttons Checkbox.
92
+ *
93
+ * @since 1.0.0
94
+ * @return void
95
+ */
96
+ protected function buttonsHtml()
97
+ {
98
+ $value = esc_attr($this->getValue());
99
+ $nameOnForm = $this->getNameOnForm();
100
+
101
+ $this->addCssClass('factory-buttons-way');
102
+ $this->addCssClass('btn-group');
103
+
104
+ if( $this->getOption('tumbler', false) ) {
105
+ $this->addCssClass('factory-tumbler');
106
+ }
107
+
108
+ $tumblerFunction = $this->getOption('tumblerFunction', false);
109
+ if( $tumblerFunction ) {
110
+ $this->addHtmlData('tumbler-function', $tumblerFunction);
111
+ }
112
+
113
+ if( $this->getOption('tumblerHint', false) ) {
114
+ $this->addCssClass('factory-has-tumbler-hint');
115
+
116
+ $delay = $this->getOption('tumblerDelay', 3000);
117
+ $this->addHtmlData('tumbler-delay', $delay);
118
+ }
119
+
120
+
121
+ ?>
122
+ <div <?php $this->attrs() ?>>
123
+ <button type="button" class="btn btn-default btn-small btn-sm factory-on <?php if( $value ) {
124
+ echo 'active';
125
+ } ?>"><?php _e('On', 'factory_forms_329') ?></button>
126
+ <button type="button" class="btn btn-default btn-small btn-sm factory-off <?php if( !$value ) {
127
+ echo 'active';
128
+ } ?>" data-value="0"><?php _e('Off', 'factory_forms_329') ?></button>
129
+ <input type="checkbox" style="display: none" id="<?php echo $nameOnForm ?>" class="factory-result" name="<?php echo $nameOnForm ?>" value="<?= $value ?>" <?php if( $value ) {
130
+ echo 'checked="checked"';
131
+ } ?>" />
132
+ </div>
133
+ <?php if( $this->getOption('tumblerHint', false) ) { ?>
134
+ <div class="factory-checkbox-tumbler-hint factory-tumbler-hint" style="display: none;">
135
+ <div class="factory-tumbler-content">
136
+ <?php echo $this->getOption('tumblerHint') ?>
137
+ </div>
138
+ </div>
139
+ <?php } ?>
140
+ <?php
141
+ }
142
+
143
+ /**
144
+ * Shows the standart checkbox.
145
+ *
146
+ * @since 1.0.0
147
+ * @return void
148
+ */
149
+ protected function defaultHtml()
150
+ {
151
+ $value = esc_attr($this->getValue());
152
+ $nameOnForm = $this->getNameOnForm();
153
+
154
+ $this->addHtmlAttr('type', 'checkbox');
155
+ $this->addHtmlAttr('id', $nameOnForm);
156
+ $this->addHtmlAttr('name', $nameOnForm);
157
+ $this->addHtmlAttr('value', $value);
158
+
159
+ if( $value ) {
160
+ $this->addHtmlAttr('checked', 'checked');
161
+ }
162
+ $this->addCssClass('factory-default-way');
163
+
164
+ ?>
165
+ <input <?php $this->attrs() ?>/>
166
+ <?php
167
+ }
168
+ }
libs/factory/forms/controls/color-and-opacity.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Color and Opacity
4
+ *
5
+ * Main options:
6
+ * name => a name of the control
7
+ * value => a value to show in the control
8
+ * default => a default value of the control if the "value" option is not specified
9
+ *
10
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
11
+ * @copyright (c) 2013, OnePress Ltd
12
+ *
13
+ * @package core
14
+ * @since 1.0.0
15
+ */
16
+
17
+ class FactoryForms329_ColorAndOpacityControl extends FactoryForms329_ComplexControl
18
+ {
19
+ public $type = 'color-and-opacity';
20
+
21
+ public function __construct( $options, $form, $provider = null ) {
22
+ parent::__construct( $options, $form, $provider );
23
+
24
+ if ( !isset( $options['color']) ) $options['color'] = array();
25
+ $options['color'] = array_merge($options['color'], array(
26
+ 'name' => $this->options['name'] . '__color',
27
+ 'default' => isset( $this->options['default'] ) ? $this->options['default']['color'] : '#1e8cbe',
28
+ 'pickerTarget' => '.factory-control-' . $this->options['name'] . ' .factory-picker-target'
29
+ ));
30
+
31
+ if ( !isset( $options['opacity']) ) $options['opacity'] = array();
32
+ $options['opacity'] = array_merge($options['opacity'], array(
33
+ 'name' => $this->options['name'] . '__opacity',
34
+ 'default' => isset( $this->options['default'] ) ? $this->options['default']['opacity'] : 100,
35
+ 'units' => '%',
36
+ 'range' => array(0, 100),
37
+ 'way' => 'slider'
38
+ ));
39
+
40
+ $this->color = new FactoryForms329_ColorControl( $options['color'], $form, $provider );
41
+ $this->opacity = new FactoryForms329_IntegerControl( $options['opacity'], $form, $provider );
42
+
43
+ $this->innerControls = array( $this->color, $this->opacity );
44
+ }
45
+
46
+ /**
47
+ * Shows the html markup of the control.
48
+ *
49
+ * @since 1.0.0
50
+ * @return void
51
+ */
52
+ public function html( ) {
53
+ ?>
54
+ <div <?php $this->attrs() ?>>
55
+ <div class="factory-control-row">
56
+ <div class="factory-color-wrap">
57
+ <?php $this->color->html() ?>
58
+ </div>
59
+ <div class="factory-opacity-wrap">
60
+ <?php $this->opacity->html() ?>
61
+ </div>
62
+ </div>
63
+ <div class="factory-picker-target"></div>
64
+ </div>
65
+ <?php
66
+ }
67
+ }
libs/factory/forms/controls/color.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Color
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ *
11
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
12
+ * @copyright (c) 2013, OnePress Ltd
13
+ *
14
+ * @package core
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_ColorControl extends FactoryForms329_Control {
18
+
19
+ public $type = 'color';
20
+
21
+ /**
22
+ * Shows the html markup of the control.
23
+ *
24
+ * @since 1.0.0
25
+ * @return void
26
+ */
27
+ public function html()
28
+ {
29
+ $name = $this->getNameOnForm();
30
+ $value = esc_attr($this->getValue());
31
+
32
+ if( !$value )
33
+ $value = '#1e8cbe';
34
+
35
+ // the "pickerTarget" options allows to select element where the palette will be shown
36
+ $pickerTarget = $this->getOption('pickerTarget');
37
+ if( !empty($pickerTarget) )
38
+ $this->addHtmlData('picker-target', $pickerTarget);
39
+
40
+ ?>
41
+ <div <?php $this->attrs() ?>>
42
+ <div class="factory-background" <?php echo(!empty($value)
43
+ ? 'style="background:' . $value . ';"'
44
+ : ''); ?>></div>
45
+ <div class="factory-pattern"></div>
46
+ <input type="text" id="<?php echo $name; ?>" name="<?php echo $name; ?>" class="factory-input-text factory-color-hex" value="<?php echo $value; ?>">
47
+ </div>
48
+ <?php
49
+ }
50
+ }
libs/factory/forms/controls/customs/html.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 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
+ $html = $this->getOption('html', '');
24
+
25
+ // if the data options is a valid callback for an object method
26
+ if (
27
+ ( is_array($html) &&
28
+ count($html) == 2 &&
29
+ gettype($html[0]) == 'object' ) || function_exists( $html ) ) {
30
+
31
+ call_user_func($html);
32
+ return;
33
+ }
34
+
35
+ // if the data options is an array of values
36
+ echo $html;
37
+ }
38
+ }
libs/factory/forms/controls/customs/separator.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ class FactoryForms329_Separator extends FactoryForms329_CustomElement
13
+ {
14
+ public $type = 'separator';
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
+ <div <?php $this->attrs()?>></div>
25
+ <?php
26
+ }
27
+ }
libs/factory/forms/controls/dropdown-and-colors.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Dropdown and Colors List Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * // see FactoryForms329_DropdownControl
9
+ * 'dropdown' => array(
10
+ * // a callback to return items or an array of items to select
11
+ * 'data' => OPanda_ThemeManager::getThemes(OPanda_Items::getCurrentItemName(), 'dropdown'),
12
+ * 'default' => 'default',
13
+ * 'value' => 'value' // a value to show in the control
14
+ * ),
15
+ * // see FactoryForms329_RadioColorsControl
16
+ * 'colors' => array(
17
+ * // a callback to return items or an array of items to select
18
+ * 'data' => array(
19
+ * array('default', '#75649b'),
20
+ * array('black', '#222'),
21
+ * array('light', '#fff3ce'),
22
+ * array('forest', '#c9d4be'),
23
+ * ),
24
+ * 'value' => 'value' // a value to show in the control
25
+ * 'default' => 'default', // a default value of the control if the "value" option is not specified
26
+ * ),
27
+ *
28
+ * @author Alex Kovalevv <alex.kovalevv@gmail.com>
29
+ * @copyright (c) 2017, OnePress Ltd
30
+ *
31
+ * @package factory-forms
32
+ * @since 1.0.0
33
+ */
34
+ class FactoryForms329_DropdownAndColorsControl extends FactoryForms329_ComplexControl {
35
+
36
+ public $type = 'dropdown-and-colors';
37
+
38
+ public function __construct($options, $form, $provider = null)
39
+ {
40
+ parent::__construct($options, $form, $provider);
41
+
42
+ if( !isset($options['dropdown']) ) {
43
+ $options['dropdown'] = array();
44
+ }
45
+
46
+ $options['dropdown'] = array_merge($options['dropdown'], array(
47
+ 'scope' => isset($options['scope'])
48
+ ? $options['scope']
49
+ : 'opanda',
50
+ 'name' => $this->options['name'] . '__dropdown',
51
+ ));
52
+
53
+ if( !isset($options['colors']) ) {
54
+ $options['colors'] = array();
55
+ }
56
+
57
+ $options['colors'] = array_merge($options['colors'], array(
58
+ 'scope' => isset($options['scope'])
59
+ ? $options['scope']
60
+ : 'opanda',
61
+ 'name' => $this->options['name'] . '__colors',
62
+ ));
63
+
64
+ $this->dropdown = new FactoryForms329_DropdownControl($options['dropdown'], $form, $provider);
65
+ $this->colors = new FactoryForms329_RadioColorsControl($options['colors'], $form, $provider);
66
+ $this->innerControls = array($this->dropdown, $this->colors);
67
+
68
+ $colors = $this->colors->getOption('data');
69
+
70
+ if( empty($colors) ) {
71
+ $dropdownValue = $this->dropdown->getValue();
72
+ $dOptions = $this->dropdown->getOption('data', array());
73
+
74
+ foreach($dOptions as $option) {
75
+ if( $option['value'] == $dropdownValue && isset($option['data']['colors']) ) {
76
+ $colorsOptions = json_decode(htmlspecialchars_decode($option['data']['colors']));
77
+ $this->colors->setOption('data', $colorsOptions);
78
+ }
79
+ }
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Shows the html markup of the control.
85
+ *
86
+ * @since 1.0.0
87
+ * @return void
88
+ */
89
+ public function html()
90
+ {
91
+ ?>
92
+ <script>
93
+ </script>
94
+ <div <?php $this->attrs() ?>>
95
+ <div class="factory-control-row">
96
+ <div class="factory-dropdown-wrap">
97
+ <?php $this->dropdown->render(); ?>
98
+ </div>
99
+ <div class="factory-colors-wrap">
100
+ <?php $this->colors->render(); ?>
101
+ </div>
102
+ </div>
103
+ <div class="factory-picker-target"></div>
104
+ </div>
105
+ <?php
106
+ }
107
+ }
libs/factory/forms/controls/dropdown.php ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Dropdown List Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ * items => a callback to return items or an array of items to select
11
+ *
12
+ * @author Paul Kashtanoff <paul@byonepress.com>
13
+ * @copyright (c) 2013, OnePress Ltd
14
+ *
15
+ * @package factory-forms
16
+ * @since 1.0.0
17
+ */
18
+ class FactoryForms329_DropdownControl extends FactoryForms329_Control {
19
+
20
+ public $type = 'dropdown';
21
+
22
+ /**
23
+ * Returns a set of available items for the list.
24
+ *
25
+ * @since 1.0.0
26
+ * @return mixed[]
27
+ */
28
+ private function getItems()
29
+ {
30
+ $data = $this->getOption('data', array());
31
+
32
+ // if the data options is a valid callback for an object method
33
+ if( is_array($data) && count($data) == 2 && gettype($data[0]) == 'object' ) {
34
+
35
+ return call_user_func($data);
36
+ // if the data options is a valid callback for a function
37
+ } elseif( gettype($data) == 'string' ) {
38
+
39
+ return $data();
40
+ }
41
+
42
+ // if the data options is an array of values
43
+ return $data;
44
+ }
45
+
46
+ /**
47
+ * Returns true, if the data should be loaded via ajax.
48
+ *
49
+ * @since 1.0.0
50
+ * @return bool
51
+ */
52
+ protected function isAjax()
53
+ {
54
+
55
+ $data = $this->getOption('data', array());
56
+
57
+ return is_array($data) && isset($data['ajax']);
58
+ }
59
+
60
+ /**
61
+ * Shows the html markup of the control.
62
+ *
63
+ * @since 1.0.0
64
+ * @return void
65
+ */
66
+ public function html()
67
+ {
68
+
69
+ $way = $this->getOption('way', 'default');
70
+ $this->addHtmlData('way', $way);
71
+
72
+ $eventsData = $this->getOption('events', array());
73
+
74
+ if( !empty($eventsData) ) {
75
+ $eventsStringData = json_encode($eventsData);
76
+ $nameOnForm = $this->getNameOnForm();
77
+
78
+ $value = $this->getValue();
79
+
80
+ if( empty($value) || (is_array($value) && empty($value[0])) ) {
81
+ $value = null;
82
+ }
83
+
84
+ if( !empty($value) && isset($eventsData[$value]) && is_array($eventsData[$value]) ) {
85
+ $printStyles = '';
86
+ foreach($eventsData[$value] as $eventName => $selectors) {
87
+ if( $eventName == 'hide' ) {
88
+ $printStyles .= $selectors . '{display:none;}';
89
+ } else if( $eventName == 'show' ) {
90
+ $printStyles .= $selectors . '{display:block;}';
91
+ }
92
+ }
93
+
94
+ echo '<style>' . $printStyles . '</style>';
95
+ }
96
+ ?>
97
+
98
+ <script>
99
+ // Onepress factory dropdown control events
100
+ if( void 0 === window.factory_dropdown_control_events_data ) {
101
+ window.factory_dropdown_control_events_data = {};
102
+ }
103
+ window.factory_dropdown_control_events_data['<?php echo $nameOnForm ?>'] = <?= $eventsStringData ?>;
104
+ </script>
105
+ <?php
106
+ }
107
+ if( $this->isAjax() ) {
108
+
109
+ $data = $this->getOption('data', array());
110
+ $ajaxId = 'factory-dropdown-' . rand(1000000, 9999999);
111
+
112
+ $value = $this->getValue();
113
+
114
+ if( empty($value) || (is_array($value) && empty($value[0])) ) {
115
+ $value = null;
116
+ }
117
+
118
+ ?>
119
+ <div class="factory-ajax-loader <?php echo $ajaxId . '-loader'; ?>"></div>
120
+ <script>
121
+ window['<?php echo $ajaxId ?>'] = {
122
+ 'loader': '.<?php echo $ajaxId . '-loader' ?>',
123
+ 'url': '<?php echo $data['url'] ?>',
124
+ 'data': <?php echo json_encode( $data['data'] ) ?>,
125
+ 'selected': '<?php echo $value ?>',
126
+ 'emptyList': '<?php echo $this->getOption('empty', __('The list is empty.', 'factory_forms_329') ) ?>'
127
+ };
128
+ </script>
129
+ <?php
130
+
131
+ $this->addHtmlData('ajax', true);
132
+ $this->addHtmlData('ajax-data-id', $ajaxId);
133
+ $this->addCssClass('factory-hidden');
134
+ }
135
+
136
+ if( 'buttons' == $way ) {
137
+ $this->buttonsHtml();
138
+ } elseif( 'ddslick' == $way ) {
139
+ $this->ddslickHtml();
140
+ } else {
141
+ $this->defaultHtml();
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Shows the Buttons Dropdown.
147
+ *
148
+ * @since 1.0.0
149
+ * @return void
150
+ */
151
+ protected function buttonsHtml()
152
+ {
153
+ $items = $this->getItems();
154
+ $value = $this->getValue();
155
+
156
+ $nameOnForm = $this->getNameOnForm();
157
+
158
+ $this->addCssClass('factory-buttons-way');
159
+
160
+ ?>
161
+ <div <?php $this->attrs() ?>>
162
+ <div class="btn-group factory-buttons-group">
163
+ <?php foreach($items as $item) { ?>
164
+ <button type="button" class="btn btn-default btn-small factory-<?php echo $item[0] ?> <?php if( $value == $item[0] ) {
165
+ echo 'active';
166
+ } ?>" data-value="<?php echo $item[0] ?>"><?php echo $item[1] ?></button>
167
+ <?php } ?>
168
+ <input type="hidden" id="<?php echo $nameOnForm ?>" class="factory-result" name="<?php echo $nameOnForm ?>" value="<?php echo $value ?>"/>
169
+ </div>
170
+ <div class="factory-hints">
171
+ <?php foreach($items as $item) { ?>
172
+ <?php if( isset($item[2]) ) { ?>
173
+ <div class="factory-hint factory-hint-<?php echo $item[0] ?>" <?php if( $value !== $item[0] ) {
174
+ echo 'style="display: none;"';
175
+ } ?>><?php echo $item[2] ?></div>
176
+ <?php } ?>
177
+ <?php } ?>
178
+ </div>
179
+ </div>
180
+ <?php
181
+ }
182
+
183
+ /**
184
+ * Shows the ddSlick dropbox.
185
+ *
186
+ * @since 3.2.8
187
+ * @return void
188
+ */
189
+ protected function ddslickHtml()
190
+ {
191
+ $items = $this->getItems();
192
+ $value = $this->getValue();
193
+
194
+ $nameOnForm = $this->getNameOnForm();
195
+
196
+ $this->addCssClass('factory-ddslick-way');
197
+ $this->addHtmlData('name', $nameOnForm);
198
+
199
+ $this->addHtmlData('width', $this->getOption('width', 300));
200
+ $this->addHtmlData('align', $this->getOption('imagePosition', 'right'));
201
+
202
+ ?>
203
+ <div <?php $this->attrs() ?>>
204
+ <script>
205
+ //Dropdown plugin data
206
+ var factory_<?php echo $nameOnForm ?>_data = [
207
+ <?php foreach ( $items as $item ) { ?>
208
+ {
209
+ text: "<?php echo $item['title'] ?>",
210
+ value: "<?php echo $item['value'] ?>",
211
+ selected: <?php if ( $value == $item['value'] ) { echo 'true'; } else { echo 'false'; } ?>,
212
+ description: "<?php echo ( isset( $item['hint'] ) ? $item['hint'] : '' ); ?>",
213
+ imageSrc: "<?php echo ( isset( $item['image'] ) ? $item['image'] : '' ); ?>",
214
+ imageHoverSrc: "<?php echo ( isset( $item['hover'] ) ? $item['hover'] : '' ); ?>"
215
+ },
216
+ <?php } ?>
217
+ ];
218
+ </script>
219
+ <div class="factory-ddslick"></div>
220
+ <input type="hidden" class="factory-result" id="<?php echo $nameOnForm ?>" name="<?php echo $nameOnForm ?>" value="<?php echo $value ?>"/>
221
+ </div>
222
+ <?php
223
+ }
224
+
225
+ /**
226
+ * Shows the standart dropdown.
227
+ *
228
+ * @since 1.3.1
229
+ * @return void
230
+ */
231
+ protected function defaultHtml()
232
+ {
233
+
234
+ $items = $this->getItems();
235
+ $value = esc_attr($this->getValue());
236
+
237
+ $nameOnForm = $this->getNameOnForm();
238
+
239
+ $this->addHtmlAttr('id', $nameOnForm);
240
+ $this->addHtmlAttr('name', $nameOnForm);
241
+ $this->addCssClass('form-control');
242
+
243
+ $hasGroups = $this->getOption('hasGroups', true);
244
+ $hasHints = $this->getOption('hasHints', false);
245
+
246
+ foreach($items as $item) {
247
+ if( !isset($item['hint']) ) {
248
+ continue;
249
+ }
250
+ if( empty($item['hint']) ) {
251
+ continue;
252
+ }
253
+ $hasHints = true;
254
+ break;
255
+ }
256
+
257
+ $isEmpty = $this->isAjax() || empty($items);
258
+ $emptyList = $this->getOption('empty', __('- empty -', 'factory_forms_329'));
259
+
260
+ ?>
261
+
262
+ <select <?php $this->attrs() ?>>
263
+ <?php if( $isEmpty ) { ?>
264
+
265
+ <option value='' class="factory-empty-option">
266
+ <?php echo $emptyList ?>
267
+ </option>
268
+
269
+ <?php } else { ?>
270
+
271
+ <?php $this->printItems($items, $value) ?>
272
+
273
+ <?php } ?>
274
+ </select>
275
+
276
+ <?php if( $hasHints ) { ?>
277
+ <div class="factory-hints">
278
+ <?php foreach($items as $item) {
279
+
280
+ $hint = isset($item[2])
281
+ ? $item[2]
282
+ : null;
283
+ $hint = isset($item['hint'])
284
+ ? $item['hint']
285
+ : null;
286
+ $value = isset($item[0])
287
+ ? esc_attr($item[0])
288
+ : null;
289
+ $value = isset($item['value'])
290
+ ? esc_attr($item['value'])
291
+ : null;
292
+
293
+ if( !empty($hint) ) { ?>
294
+ <div style="display: none;" class="factory-hint factory-hint-<?php echo $value ?>" <?php if( $value !== $value ) {
295
+ echo 'style="display: none;"';
296
+ } ?>><?php echo $hint ?></div>
297
+ <?php }
298
+ } ?>
299
+ </div>
300
+ <?php } ?>
301
+ <?php
302
+ }
303
+
304
+ protected function printItems($items, $selected = null)
305
+ {
306
+
307
+ foreach($items as $item) {
308
+
309
+ $subitems = array();
310
+ $data = null;
311
+
312
+ // this item is an associative array
313
+ if( isset($item['type']) || isset($item['value']) ) {
314
+
315
+ $type = isset($item['type'])
316
+ ? $item['type']
317
+ : 'option';
318
+ if( 'group' === $type ) {
319
+ $subitems = isset($item['items'])
320
+ ? $item['items']
321
+ : array();
322
+ }
323
+
324
+ $value = isset($item['value'])
325
+ ? $item['value']
326
+ : '';
327
+ $title = isset($item['title'])
328
+ ? $item['title']
329
+ : __('- empty -', 'factory_forms_329');
330
+
331
+ $data = isset($item['data'])
332
+ ? $item['data']
333
+ : null;
334
+ } else {
335
+
336
+ $type = (count($item) == 3 && $item[0] === 'group')
337
+ ? 'group'
338
+ : 'option';
339
+ if( 'group' === $type ) {
340
+ $subitems = $item[2];
341
+ }
342
+
343
+ $title = esc_html($item[1]);
344
+ $value = esc_attr($item[0]);
345
+ }
346
+
347
+ if( 'group' === $type ) {
348
+ ?>
349
+
350
+ <optgroup label="<?php echo $item[1] ?>">
351
+ <?php $this->printItems($subitems, $selected); ?>
352
+ </optgroup>
353
+
354
+ <?php
355
+ } else {
356
+
357
+ $attr = ($selected == $value)
358
+ ? 'selected="selected"'
359
+ : '';
360
+
361
+ $strData = '';
362
+ if( !empty($data) ) {
363
+
364
+ foreach($data as $key => $values) {
365
+ $strData = $strData . ' data-' . $key . '="' . (is_array($values)
366
+ ? implode(',', $values)
367
+ : $values) . '"';
368
+ }
369
+ }
370
+
371
+ ?>
372
+ <option value='<?php echo $value ?>' <?php echo $attr ?> <?php echo $strData ?>>
373
+ <?php echo $title ?>
374
+ </option>
375
+ <?php
376
+ }
377
+ }
378
+ }
379
+ }
libs/factory/forms/controls/font.php ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Dropdown List Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ * items => a callback to return items or an array of items to select
11
+ *
12
+ * @author Alex Kovalev <alex@byonepress.com>
13
+ * @copyright (c) 2013, OnePress Ltd
14
+ *
15
+ * @package core
16
+ * @since 1.0.0
17
+ */
18
+ class FactoryForms329_FontControl extends FactoryForms329_ComplexControl {
19
+
20
+ public $type = 'font';
21
+
22
+ public function __construct($options, $form, $provider = null)
23
+ {
24
+ parent::__construct($options, $form, $provider);
25
+
26
+ $optionFontSize = array(
27
+ 'name' => $this->options['name'] . '__size',
28
+ 'units' => $this->options['units'],
29
+ 'default' => isset($this->options['default'])
30
+ ? $this->options['default']['size']
31
+ : null
32
+ );
33
+
34
+ $optionFontFamily = array(
35
+ 'name' => $this->options['name'] . '__family',
36
+ 'data' => $this->getFonts(),
37
+ 'default' => isset($this->options['default'])
38
+ ? $this->options['default']['family']
39
+ : null
40
+ );
41
+
42
+ $optionFontColor = array(
43
+ 'name' => $this->options['name'] . '__color',
44
+ 'default' => isset($this->options['default'])
45
+ ? $this->options['default']['color']
46
+ : null,
47
+ 'pickerTarget' => '.factory-control-' . $this->options['name'] . ' .factory-picker-target'
48
+ );
49
+
50
+ $this->size = new FactoryForms329_IntegerControl($optionFontSize, $form, $provider);
51
+ $this->family = new FactoryForms329_DropdownControl($optionFontFamily, $form, $provider);
52
+ $this->color = new FactoryForms329_ColorControl($optionFontColor, $form, $provider);
53
+
54
+ $this->innerControls = array($this->family, $this->size, $this->color);
55
+ }
56
+
57
+ public function getFonts()
58
+ {
59
+
60
+ $fonts = $this->getDefaultFonts();
61
+
62
+ $fonts = apply_filters('factory_forms_329_fonts', $fonts);
63
+ $fonts = apply_filters('factory_forms_329_fonts-' . $this->options['name'], $fonts);
64
+
65
+ return $fonts;
66
+ }
67
+
68
+ public function getDefaultFonts()
69
+ {
70
+
71
+ $fonts = array(
72
+
73
+ array('inherit', __('(use default website font)', 'factory_forms_329')),
74
+ array(
75
+ 'group',
76
+ __('Sans Serif:', 'factory_forms_329'),
77
+ array(
78
+ array('Arial, "Helvetica Neue", Helvetica, sans-serif', 'Arial'),
79
+ array('"Arial Black", "Arial Bold", Gadget, sans-serif', 'Arial Black'),
80
+ array('"Arial Narrow", Arial, sans-serif', 'Arial Narrow'),
81
+ array(
82
+ '"Arial Rounded MT Bold", "Helvetica Rounded", Arial, sans-serif',
83
+ 'Arial Rounded MT Bold'
84
+ ),
85
+ array(
86
+ '"Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif',
87
+ 'Avant Garde'
88
+ ),
89
+ array('Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif', 'Calibri'),
90
+ array('Candara, Calibri, Segoe, "Segoe UI", Optima, Arial, sans-serif', 'Candara'),
91
+ array('"Century Gothic", CenturyGothic, AppleGothic, sans-serif', 'Century Gothic'),
92
+ array(
93
+ '"Franklin Gothic Medium", "Franklin Gothic", "ITC Franklin Gothic", Arial, sans-serif',
94
+ 'Franklin Gothic Medium'
95
+ ),
96
+ array('Futura, "Trebuchet MS", Arial, sans-serif', 'Futura'),
97
+ array('Geneva, Tahoma, Verdana, sans-serif', 'Geneva'),
98
+ array('"Gill Sans", "Gill Sans MT", Calibri, sans-serif', 'Gill Sans'),
99
+ array('"Helvetica Neue", Helvetica, Arial, sans-serif', 'Helvetica'),
100
+ array(
101
+ 'Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans serif',
102
+ 'Impact'
103
+ ),
104
+ array(
105
+ '"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif',
106
+ 'Lucida Grande'
107
+ ),
108
+ array('Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif', 'Optima'),
109
+ array(
110
+ '"Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif',
111
+ 'Segoe UI'
112
+ ),
113
+ array(
114
+ 'Montserrat, "Segoe UI", "Helvetica Neue", Arial, sans-serif',
115
+ 'Montserrat'
116
+ ),
117
+ array('Tahoma, Verdana, Segoe, sans-serif', 'Tahoma'),
118
+ array(
119
+ '"Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif',
120
+ 'Trebuchet MS'
121
+ ),
122
+ array('Verdana, Geneva, sans-serif', 'Verdana'),
123
+ )
124
+ ),
125
+ array(
126
+ 'group',
127
+ __('Serif:', 'factory_forms_329'),
128
+ array(
129
+ array(
130
+ 'Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif',
131
+ 'Baskerville'
132
+ ),
133
+ array('"Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif', 'Big Caslon'),
134
+ array(
135
+ '"Bodoni MT", Didot, "Didot LT STD", "Hoefler Text", Garamond, "Times New Roman", serif',
136
+ 'Bodoni MT'
137
+ ),
138
+ array(
139
+ '"Book Antiqua", Palatino, "Palatino Linotype", "Palatino LT STD", Georgia, serif',
140
+ 'Book Antiqua'
141
+ ),
142
+ array(
143
+ '"Calisto MT", "Bookman Old Style", Bookman, "Goudy Old Style", Garamond, "Hoefler Text", "Bitstream Charter", Georgia, serif',
144
+ 'Calisto MT'
145
+ ),
146
+ array('Cambria, Georgia, serif', 'Cambria'),
147
+ array('Didot, "Didot LT STD", "Hoefler Text", Garamond, "Times New Roman", serif', 'Didot'),
148
+ array(
149
+ 'Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif',
150
+ 'Garamond'
151
+ ),
152
+ array('Georgia, Times, "Times New Roman", serif', 'Georgia'),
153
+ array('"Goudy Old Style", Garamond, "Big Caslon", "Times New Roman", serif', 'Goudy Old Style'),
154
+ array(
155
+ '"Hoefler Text", "Baskerville old face", Garamond, "Times New Roman", serif',
156
+ 'Hoefler Text'
157
+ ),
158
+ array('"Lucida Bright", Georgia, serif', 'Lucida Bright'),
159
+ array(
160
+ 'Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif',
161
+ 'Palatino'
162
+ ),
163
+ array(
164
+ 'Perpetua, Baskerville, "Big Caslon", "Palatino Linotype", Palatino, "URW Palladio L", "Nimbus Roman No9 L", serif',
165
+ 'Perpetua'
166
+ ),
167
+ array(
168
+ 'Rockwell, "Courier Bold", Courier, Georgia, Times, "Times New Roman", serif',
169
+ 'Rockwell'
170
+ ),
171
+ array('"Rockwell Extra Bold", "Rockwell Bold", monospace', 'Rockwell Extra Bold'),
172
+ array('TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif', 'Times New Roman')
173
+ )
174
+ ),
175
+ array(
176
+ 'group',
177
+ __('Monospaced:', 'factory_forms_329'),
178
+ array(
179
+ array('"Andale Mono", AndaleMono, monospace', 'Andale Mono'),
180
+ array('Consolas, monaco, monospace', 'Consolas'),
181
+ array(
182
+ '"Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace',
183
+ 'Courier New'
184
+ ),
185
+ array(
186
+ '"Lucida Console", "Lucida Sans Typewriter", Monaco, "Bitstream Vera Sans Mono", monospace',
187
+ 'Lucida Console'
188
+ ),
189
+ array(
190
+ '"Lucida Sans Typewriter", "Lucida Console", Monaco, "Bitstream Vera Sans Mono", monospace',
191
+ 'Lucida Sans Typewriter'
192
+ ),
193
+ array('Monaco, Consolas, "Lucida Console", monospace', 'Monaco')
194
+ )
195
+ )
196
+
197
+ );
198
+
199
+ return $fonts;
200
+ }
201
+
202
+ /**
203
+ * Removes \" in the font family value.
204
+ *
205
+ * @since 3.1.0
206
+ * @return mixed[]
207
+ */
208
+ public function getValuesToSave()
209
+ {
210
+ $values = parent::getValuesToSave();
211
+
212
+ $familyKey = $this->options['name'] . '__family';
213
+ $values[$familyKey] = sanitize_text_field($values[$familyKey]);
214
+
215
+ return $values;
216
+ }
217
+
218
+ public function beforeControlsHtml()
219
+ {
220
+ }
221
+
222
+ public function afterControlsHtml()
223
+ {
224
+ }
225
+
226
+ /**
227
+ * Shows the html markup of the control.
228
+ *
229
+ * @since 1.0.0
230
+ * @return void
231
+ */
232
+ public function html()
233
+ {
234
+ ?>
235
+ <div <?php $this->attrs() ?>>
236
+ <div class="factory-control-row">
237
+ <?php $this->beforeControlsHtml() ?>
238
+
239
+ <div class="factory-family-wrap">
240
+ <?php $this->family->html() ?>
241
+ </div>
242
+ <div class="factory-size-wrap">
243
+ <?php $this->size->html() ?>
244
+ </div>
245
+ <div class="factory-color-wrap">
246
+ <?php $this->color->html() ?>
247
+ </div>
248
+
249
+ <?php $this->afterControlsHtml() ?>
250
+ </div>
251
+ <div class="factory-picker-target"></div>
252
+ </div>
253
+ <?php
254
+ }
255
+ }
libs/factory/forms/controls/google-font.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Dropdown List Control
4
+ *
5
+ * Main options:
6
+ * name => a name of the control
7
+ * value => a value to show in the control
8
+ * default => a default value of the control if the "value" option is not specified
9
+ * items => a callback to return items or an array of items to select
10
+ *
11
+ * @author Alex Kovalev <alex@byonepress.com>
12
+ * @copyright (c) 2013, OnePress Ltd
13
+ *
14
+ * @package core
15
+ * @since 1.0.0
16
+ */
17
+
18
+ class FactoryForms329_GoogleFontControl extends FactoryForms329_FontControl
19
+ {
20
+ public $type = 'google-font';
21
+ const APIKEY = 'AIzaSyB-3vazYv7Q-5QZA04bmSKFrWcw_VhC40w';
22
+
23
+ public function __construct($options, $form, $provider = null) {
24
+ parent::__construct($options, $form, $provider);
25
+ $this->addCssClass('factory-font');
26
+
27
+ $optionGoogleFontData = array(
28
+ 'name' => $this->options['name'] . '__google_font_data',
29
+ 'cssClass' => 'factory-google-font-data'
30
+ );
31
+
32
+ $this->googleFontData = new FactoryForms329_HiddenControl( $optionGoogleFontData, $form, $provider );
33
+ $this->innerControls[] = $this->googleFontData;
34
+ }
35
+
36
+ public function getDefaultFonts() {
37
+
38
+ $googleFonts = $this->getGoogleFonts();
39
+
40
+ $fonts = array(
41
+ array( 'inherit', __( '(use default website font)', 'factory_forms_329' ) )
42
+ );
43
+
44
+ $fontsCommon = array( 'group', __('Standard:', 'factory_forms_329'), array(
45
+
46
+ array( 'Arial, "Helvetica Neue", Helvetica, sans-serif', 'Arial' ),
47
+ array( '"Helvetica Neue", Helvetica, Arial, sans-serif', 'Helvetica' ),
48
+ array( 'Tahoma, Verdana, Segoe, sans-serif', 'Tahoma' ),
49
+ array( 'Verdana, Geneva, sans-serif', 'Verdana' ),
50
+
51
+ ));
52
+
53
+ $fontsGoogleFonts = array( 'group', __('Google Fonts:', 'factory_forms_329'), array() );
54
+
55
+ foreach( $googleFonts->items as $item ) {
56
+
57
+ $altFont = $item->category;
58
+ if ( in_array( $altFont, array( 'handwriting', 'display' ) ) ) $altFont = 'serif';
59
+
60
+ $listItem = array(
61
+ 'title' => $item->family,
62
+ 'value' => $item->family . ', ' . $item->category,
63
+ 'hint' => '<em>Google Font</em>',
64
+ 'data' => array(
65
+ 'google-font' => true,
66
+ 'family' => $item->family,
67
+ 'variants' => $item->variants,
68
+ 'subsets' => $item->subsets
69
+ )
70
+ );
71
+
72
+ $fontsGoogleFonts[2][] = $listItem;
73
+ }
74
+
75
+ $fonts[] = $fontsCommon;
76
+ $fonts[] = $fontsGoogleFonts;
77
+
78
+ set_transient('factory_google_fonts', $fonts, 60 * 60 * 6);
79
+ return $fonts;
80
+ }
81
+
82
+ protected function getGoogleFonts() {
83
+
84
+ $body = get_transient('factory_google_fonts_raw');
85
+ if ( !empty( $body ) ) return $body;
86
+
87
+ $response = wp_remote_get( sprintf( 'https://www.googleapis.com/webfonts/v1/webfonts?key=%s', self::APIKEY ) );
88
+
89
+ $this->error = false;
90
+ $this->defailedError = false;
91
+
92
+ if ( is_wp_error( $response ) ) {
93
+
94
+ $this->error = __('Unable to retrieve the list of Google Fonts.', 'factory_forms_329');
95
+ $this->defailedError = $response->get_error_message();
96
+ return $body;
97
+ }
98
+
99
+ if ( !isset( $response['body'] ) ) {
100
+
101
+ $this->error = __('Invalide response from the Google Fonts API.', 'factory_forms_329');
102
+ $this->defailedError = $response['body'];
103
+ return $body;
104
+ }
105
+
106
+ $body = json_decode( $response['body']);
107
+
108
+ if ( empty( $body->items ) ) {
109
+
110
+ $this->error = __('Unexpected error. The list of Google Fonts are empty.', 'factory_forms_329');
111
+ return $body;
112
+ }
113
+
114
+ set_transient('factory_google_fonts_raw', $body, 60 * 60 * 6);
115
+ return $body;
116
+ }
117
+
118
+ public function afterControlsHtml() {
119
+ ?>
120
+ <?php $this->googleFontData->html() ?>
121
+ <?php
122
+ }
123
+ }
libs/factory/forms/controls/gradient.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Gradient picker Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * title => Заголовок
9
+ * colors => массив цветов для градиента
10
+ * Пример: array("#000 0% 0.5", "#e70303 100% 1")
11
+ * filldirection => Направление градиента(top, left)
12
+ * Пример: 90deg
13
+ * value => a value to show in the control
14
+ * default => a default value of the control if the "value" option is not specified
15
+ *
16
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
17
+ * @copyright (c) 2013, OnePress Ltd
18
+ *
19
+ * @package core
20
+ * @since 1.0.0
21
+ */
22
+ class FactoryForms329_GradientControl extends FactoryForms329_Control {
23
+
24
+ public $type = 'gradient';
25
+
26
+ /**
27
+ * Shows the html markup of the control.
28
+ *
29
+ * @since 1.0.0
30
+ * @return void
31
+ */
32
+ public function html()
33
+ {
34
+ $name = $this->getNameOnForm();
35
+ $value = esc_attr($this->getValue());
36
+
37
+ if( !empty($value) ) {
38
+
39
+ $values = json_decode(stripcslashes(htmlspecialchars_decode($value)));
40
+
41
+ $points = '';
42
+
43
+ foreach($values->color_points as $splitVlaues) {
44
+ $points .= $splitVlaues . ',';
45
+ }
46
+
47
+ $points = rtrim($points, ',');
48
+
49
+ $this->addHtmlData('points', $points);
50
+ $this->addHtmlData('directions', $values->filldirection);
51
+ } else {
52
+ $this->addHtmlData('directions', 'top');
53
+ }
54
+ ?>
55
+ <script>
56
+ if( !window.factory ) {
57
+ window.factory = {};
58
+ }
59
+ if( !window.factory.res ) {
60
+ window.factory.res = {};
61
+ }
62
+ factory.res.resVertical = '<?php _e( 'vertical', 'factory_forms_329' ) ?>';
63
+ factory.res.resHorizontal = '<?php _e( 'horizontal', 'factory_forms_329' ) ?>';
64
+ </script>
65
+ <div <?php $this->attrs() ?>>
66
+ <div class="factory-gradient-picker">
67
+ <ul class="gradientPicker-pallets">
68
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#1bbc9d" data-secondary="#16a086"></li>
69
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#2fcc71" data-secondary="#27ae61"></li>
70
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#3598dc" data-secondary="#2a80b9"></li>
71
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#9c59b8" data-secondary="#8f44ad"></li>
72
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#34495e" data-secondary="#2d3e50"></li>
73
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#f1c40f" data-secondary="#f49c14"></li>
74
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#e84c3d" data-secondary="#c1392b"></li>
75
+ <li class="factory-preset-gradient factory-primary-gradient" data-primary="#ecf0f1" data-secondary="#bec3c7"></li>
76
+ </ul>
77
+ <canvas class='gradientPicker-preview'></canvas>
78
+ <div class='factory-points'></div>
79
+ <div class='factory-color-picker-container'>
80
+ <div class="factory-slider-container">
81
+ <div class="factory-slider">
82
+ <input type="text" class="factory-input-text factory-color-hex"/>
83
+
84
+ <div class="factory-bar"></div>
85
+ <div class="factory-visible-value">100%</div>
86
+ </div>
87
+ </div>
88
+ <div class="factory-color-picker"></div>
89
+ </div>
90
+ </div>
91
+ <input type="hidden" id="<?php echo $name; ?>" class="factory-result" name="<?php echo $name; ?>" value="<?php echo $value; ?>">
92
+ </div>
93
+ <?php
94
+ }
95
+ }
libs/factory/forms/controls/hidden.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Hidden Input Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ *
11
+ * @author Paul Kashtanoff <paul@byonepress.com>
12
+ * @copyright (c) 2013, OnePress Ltd
13
+ *
14
+ * @package factory-forms
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_HiddenControl extends FactoryForms329_Control {
18
+
19
+ public $type = 'hidden';
20
+
21
+ /**
22
+ * Shows the html markup of the control.
23
+ *
24
+ * @since 1.0.0
25
+ * @return void
26
+ */
27
+ public function html()
28
+ {
29
+ $value = esc_attr($this->getValue());
30
+ $nameOnForm = $this->getNameOnForm();
31
+
32
+ $this->addHtmlAttr('id', $nameOnForm);
33
+ $this->addHtmlAttr('name', $nameOnForm);
34
+ $this->addHtmlAttr('value', $value);
35
+ $this->addHtmlAttr('type', 'hidden');
36
+
37
+ ?>
38
+ <input <?php $this->attrs() ?>/>
39
+ <?php
40
+ }
41
+ }
libs/factory/forms/controls/holders/accordion-item.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Tab Control Holder.
4
+ *
5
+ * @author Alex Kovalev <alex@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Tab Control Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_AccordionItemHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'accordion-item';
26
+
27
+ /**
28
+ * Here we should render a beginning html of the tab.
29
+ *
30
+ * @since 1.0.0
31
+ * @return void
32
+ */
33
+ public function beforeRendering() {
34
+ ?>
35
+ <h3><?php echo $this->options['title']; ?></h3>
36
+ <div class="factory-accordion-item">
37
+ <div class="inner-factory-accordion-item">
38
+ <?php
39
+ }
40
+
41
+ /**
42
+ * Here we should render an end html of the tab.
43
+ *
44
+ * @since 1.0.0
45
+ * @return void
46
+ */
47
+ public function afterRendering() {
48
+ ?>
49
+ </div>
50
+ </div>
51
+ <?php
52
+ }
53
+ }
libs/factory/forms/controls/holders/accordion.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Tab Control Holder.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Tab Control Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_AccordionHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'accordion';
26
+
27
+ /**
28
+ * Here we should render a beginning html of the tab.
29
+ *
30
+ * @since 1.0.0
31
+ * @return void
32
+ */
33
+ public function beforeRendering() {
34
+ ?>
35
+ <div <?php $this->attrs() ?>>
36
+ <?php
37
+ }
38
+
39
+ /**
40
+ * Here we should render an end html of the tab.
41
+ *
42
+ * @since 1.0.0
43
+ * @return void
44
+ */
45
+ public function afterRendering() {
46
+ ?>
47
+ </div>
48
+ <?php
49
+ }
50
+ }
libs/factory/forms/controls/holders/columns.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Columns Holder.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2014, OnePress Ltd
7
+ *
8
+ * @package factory-forms
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * Columns Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_ColumnsHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'columns';
26
+
27
+ public function __construct($options, $form) {
28
+ $columnsItems = array();
29
+
30
+ $items = isset( $options['items'] ) ? $options['items'] : array();
31
+
32
+ // calculates the number of columns
33
+
34
+ $this->columnsCount = 0;
35
+
36
+ foreach( $options['items'] as $item ) {
37
+ $i = ( !isset( $item['column'] ) ? 1 : intval( $item['column'] ) ) - 1;
38
+ $columnsItems[$i][] = $item;
39
+
40
+ if ( $i > $this->columnsCount ) $this->columnsCount = $i + 1;
41
+ }
42
+ // calculates the number of rows
43
+
44
+ $this->rowsCount = 0;
45
+ foreach($columnsItems as $items) {
46
+ $count = count( $items );
47
+ if ( $count > $this->rowsCount ) $this->rowsCount = $count;
48
+ }
49
+
50
+ // creates elements
51
+
52
+ parent::__construct($options, $form);
53
+
54
+ // groups the created by columns
55
+
56
+ $elementIndex = 0;
57
+ $this->columns = array();
58
+
59
+ foreach($columnsItems as $columnIndex => $columnItems) {
60
+ $count = count ( $columnItems );
61
+ for ( $k = 0; $k < $count; $k++ ) {
62
+ $this->columns[$columnIndex][] = $this->elements[$elementIndex];
63
+ $elementIndex++;
64
+ }
65
+ }
66
+ }
67
+
68
+ public function render() {
69
+ $this->beforeRendering();
70
+
71
+ for( $n = 0; $n < $this->rowsCount; $n++ ) {
72
+
73
+ $this->form->layout->startRow( $n, $this->rowsCount );
74
+
75
+ for( $i = 0; $i < $this->columnsCount; $i++ ) {
76
+ $control = $this->columns[$i][$n];
77
+ $this->form->layout->startColumn( $control, $i, $this->columnsCount );
78
+ $this->columns[$i][$n]->render();
79
+ $this->form->layout->endColumn( $control, $i, $this->columnsCount );
80
+ }
81
+
82
+ $this->form->layout->endRow( $n, $this->rowsCount );
83
+ }
84
+ }
85
+ }
libs/factory/forms/controls/holders/control-group-item.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Tab Control Holder.
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
+ * Tab Control Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_ControlGroupItem extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'control-group-item';
26
+
27
+
28
+ /**
29
+ * Here we should render a beginning html of the tab.
30
+ *
31
+ * @since 1.0.0
32
+ * @return void
33
+ */
34
+ public function beforeRendering() {
35
+ $this->addCssClass('control-group-item' );
36
+ $this->addCssClass('factory-control-group-item-' . $this->options['name'] );
37
+ if ( $this->parent->getValue() == $this->options['name'] ) {
38
+ $this->addCssClass('current');
39
+ foreach( $this->elements as $val ) {
40
+ $val->setOption('isActive', 1);
41
+ }
42
+ } else {
43
+ foreach( $this->elements as $val ) {
44
+ $val->setOption('isActive', 0);
45
+ }
46
+ }
47
+
48
+ ?>
49
+ <div <?php $this->attrs() ?>>
50
+ <?php
51
+ }
52
+
53
+ /**
54
+ * Here we should render an end html of the tab.
55
+ *
56
+ * @since 1.0.0
57
+ * @return void
58
+ */
59
+ public function afterRendering() {
60
+ ?>
61
+ </div>
62
+ <?php
63
+ }
64
+ }
libs/factory/forms/controls/holders/control-group.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Tab Control Holder.
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
+ * Tab Control Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_ControlGroupHolder extends FactoryForms329_ControlHolder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'control-group';
26
+
27
+
28
+ /**
29
+ * Here we should render a beginning html of the tab.
30
+ *
31
+ * @since 1.0.0
32
+ * @return void
33
+ */
34
+ public function beforeRendering() {
35
+ $name = $this->getNameOnForm();
36
+ $value = $this->getValue();
37
+
38
+ $title = $this->getOption('title', null);
39
+
40
+ ?>
41
+ <div <?php $this->attrs() ?>>
42
+ <input type="hidden" name="<?php echo $name ?>" id="<?php echo $name ?>" class="factory-ui-control-group" value="<?php echo $value ?>" />
43
+
44
+ <?php if ( $title ) {?>
45
+ <strong class="factory-header"><?php echo $title; ?></strong>
46
+ <?php } ?>
47
+
48
+ <ul class="factory-control-group-nav">
49
+ <?php
50
+ foreach( $this->elements as $element ):
51
+ if ( $element->options['type'] !== 'control-group-item' ) continue;
52
+ $builder = new FactoryForms329_HtmlAttributeBuilder();
53
+ $builder->addCssClass('factory-control-group-nav-label');
54
+ $builder->addCssClass('factory-control-group-nav-label-'. $element->getOption('name') );
55
+ $builder->addHtmlData('control-id', 'factory-control-group-item-' . $element->getOption('name') );
56
+ $builder->addHtmlData('control-name', $element->getOption('name') );
57
+
58
+ if ( $value == $element->getOption('name') ) $builder->addCssClass('current');
59
+
60
+ ?>
61
+ <li <?php $builder->printAttrs(); ?>><?php $element->title(); ?></li>
62
+ <?php endforeach; ?>
63
+ </ul>
64
+ <div class="factory-control-group-body">
65
+ <?php
66
+ }
67
+
68
+ /**
69
+ * Here we should render an end html of the tab.
70
+ *
71
+ * @since 1.0.0
72
+ * @return void
73
+ */
74
+ public function afterRendering() {
75
+ ?>
76
+ </div>
77
+ </div>
78
+ <?php
79
+ }
80
+ }
libs/factory/forms/controls/holders/div.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Div Control Holder.
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
+ * Div Control Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_DivHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'div';
26
+
27
+ /**
28
+ * Here we should render a beginning html of the tab.
29
+ *
30
+ * @since 1.0.0
31
+ * @return void
32
+ */
33
+ public function beforeRendering() {
34
+
35
+ if ( isset( $this->options['class'] )) $this->addCssClass ( $this->options['class'] );
36
+ if ( isset( $this->options['id'] )) $this->addHtmlAttr ( 'id', $this->options['id'] );
37
+
38
+ ?>
39
+ <div <?php $this->attrs() ?>>
40
+ <?php
41
+ }
42
+
43
+ /**
44
+ * Here we should render an end html of the tab.
45
+ *
46
+ * @since 1.0.0
47
+ * @return void
48
+ */
49
+ public function afterRendering() {
50
+ ?>
51
+ </div>
52
+ <?php
53
+ }
54
+ }
libs/factory/forms/controls/holders/form-group.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Group Holder.
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
+ * Group Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_FormGroupHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'form-group';
26
+
27
+ /**
28
+ * Here we should render a beginning html of the tab.
29
+ *
30
+ * @since 1.0.0
31
+ * @return void
32
+ */
33
+ public function beforeRendering() {
34
+
35
+ $this->addCssClass('factory-form-group-'. $this->getName() );
36
+ $this->addHtmlAttr('id', 'factory-form-group-' . $this->getName() );
37
+
38
+ ?>
39
+ <fieldset <?php $this->attrs()?>>
40
+ <?php if ( $this->hasTitle() ) { ?>
41
+ <legend class='factory-legend'>
42
+ <p class='factory-title'><?php $this->title() ?></p>
43
+ <?php if ( $this->hasHint() ) { ?>
44
+ <p class='factory-hint'><?php echo $this->hint() ?></p>
45
+ <?php } ?>
46
+ </legend>
47
+ <?php } ?>
48
+ <?php
49
+ }
50
+
51
+ /**
52
+ * Here we should render an end html of the tab.
53
+ *
54
+ * @since 1.0.0
55
+ * @return void
56
+ */
57
+ public function afterRendering() {
58
+ ?>
59
+ </fieldset>
60
+ <?php
61
+ }
62
+ }
libs/factory/forms/controls/holders/more-link.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of More Link Holder.
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
+ * Collapsed Group Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_MoreLinkHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'more-link';
26
+
27
+ /**
28
+ * Here we should render a beginning html of the tab.
29
+ *
30
+ * @since 1.0.0
31
+ * @return void
32
+ */
33
+ public function beforeRendering() {
34
+
35
+ $count = isset( $this->options['count'] ) ? $this->options['count'] : 0;
36
+ $id = 'factory-more-link-' . $this->getName();
37
+
38
+ ?>
39
+ <div <?php $this->attrs() ?>>
40
+ <div class="form-group">
41
+ <div class="control-label col-sm-2"></div>
42
+ <div class="control-group col-sm-10">
43
+ <a href="#<?php echo $id ?>" class="factory-more-link-show"><?php $this->title() ?> (<?php echo $count ?>)</a>
44
+ </div>
45
+ </div>
46
+ <div class='factory-more-link-content' id="<?php echo $id ?>" style="display: none;">
47
+ <a href="#<?php echo $id ?>" class='factory-more-link-hide'><?php _e('hide extra options', 'factory'); ?></a>
48
+ <?php
49
+ }
50
+
51
+ /**
52
+ * Here we should render an end html of the tab.
53
+ *
54
+ * @since 1.0.0
55
+ * @return void
56
+ */
57
+ public function afterRendering() {
58
+ ?>
59
+ </div></div>
60
+ <?php
61
+ }
62
+ }
libs/factory/forms/controls/holders/tab-item.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Tab Item Control Holder.
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
+ * Tab Item Control Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_TabItemHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'tab-item';
26
+
27
+ /**
28
+ * Here we should render a beginning html of the tab.
29
+ *
30
+ * @since 1.0.0
31
+ * @return void
32
+ */
33
+ public function beforeRendering() {
34
+
35
+ $this->addCssClass('tab-'. $this->getName() );
36
+ $this->addHtmlAttr('id', $this->getName() );
37
+
38
+ $this->addCssClass('tab-pane');
39
+ if ( isset( $this->options['isFirst'] ) && $this->options['isFirst'] ) $this->addCssClass('active');
40
+
41
+ ?>
42
+ <div <?php $this->attrs()?>>
43
+ <?php
44
+ }
45
+
46
+ /**
47
+ * Here we should render an end html of the tab.
48
+ *
49
+ * @since 1.0.0
50
+ * @return void
51
+ */
52
+ public function afterRendering() {
53
+ ?>
54
+ </div>
55
+ <?php
56
+ }
57
+ }
libs/factory/forms/controls/holders/tab.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Tab Control Holder.
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
+ * Tab Control Holder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_TabHolder extends FactoryForms329_Holder {
18
+
19
+ /**
20
+ * A holder type.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string
24
+ */
25
+ public $type = 'tab';
26
+
27
+ /**
28
+ * An align of a tab (horizontal or vertical).
29
+ *
30
+ * @since 1.0.0
31
+ * @var string
32
+ */
33
+ public $align = 'horizontal';
34
+
35
+ /**
36
+ * Creates a new instance of control holder.
37
+ *
38
+ * @since 1.0.0
39
+ * @param mixed[] $options A holder options.
40
+ * @param FactoryForms329_Form $form A parent form.
41
+ */
42
+ public function __construct($options, $form) {
43
+ parent::__construct($options, $form);
44
+ $this->align = isset( $options['align'] ) ? $options['align'] : 'horizontal';
45
+ }
46
+
47
+ /**
48
+ * Here we should render a beginning html of the tab.
49
+ *
50
+ * @since 1.0.0
51
+ * @return void
52
+ */
53
+ public function beforeRendering() {
54
+
55
+ $isFirstTab = true;
56
+ $tabClass = $this->getOption('class');
57
+
58
+ if(!empty($tabClass))
59
+ $this->addCssClass($tabClass);
60
+ $this->addCssClass('factory-align-' . $this->align);
61
+
62
+ ?>
63
+ <div <?php $this->attrs() ?>>
64
+ <div class="factory-headers">
65
+ <ul class="nav nav-tabs">
66
+ <?php foreach( $this->elements as $element ) {
67
+ if ( $element->options['type'] !== 'tab-item' ) continue;
68
+
69
+ $hasIcon = isset( $element->options['icon'] );
70
+ if ( $hasIcon ) $tabIcon = $element->options['icon'];
71
+
72
+ $builder = new FactoryForms329_HtmlAttributeBuilder();
73
+ $builder->addCssClass('factory-tab-item-header');
74
+ $builder->addCssClass('factory-tab-item-header-'. $element->getName() );
75
+ if ( $hasIcon ) $builder->addCssClass('factory-tab-item-header-with-icon');
76
+ if ( $isFirstTab ) $builder->addCssClass('active');
77
+
78
+ $builder->addHtmlData('tab-id', $element->getName() );
79
+ $isFirstTab = false;
80
+
81
+ if ($hasIcon) { ?>
82
+ <style>
83
+ .factory-form-tab-item-header-<?php $element->name() ?> a {
84
+ background-image: url("<?php echo $tabIcon ?>");
85
+ }
86
+ </style>
87
+ <?php } ?>
88
+ <li <?php $builder->printAttrs() ?>>
89
+ <a href="#<?php $element->name() ?>" data-toggle="tab">
90
+ <?php $element->title() ?>
91
+ </a>
92
+ </li>
93
+ <?php } ?>
94
+ </ul>
95
+ </div>
96
+ <div class='tab-content factory-bodies'>
97
+ <?php
98
+ }
99
+
100
+ /**
101
+ * Here we should render an end html of the tab.
102
+ *
103
+ * @since 1.0.0
104
+ * @return void
105
+ */
106
+ public function afterRendering() {
107
+ ?>
108
+ </div>
109
+ </div>
110
+ <?php
111
+ }
112
+ }
libs/factory/forms/controls/integer.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Integer Control
5
+ * Main options:
6
+ * name => a name of the control
7
+ * way => Тип значения 'slider' - слайдер, 'checkbox-slider' - чекбокс активирует слайдер, по умолчанию input
8
+ * checkbox => Указывается если, 'way' имеет значение 'checkbox-slider'
9
+ * Пример:
10
+ * array(
11
+ * 'on' => __('Show shadow', 'bizpanda'),
12
+ * 'off' => __('Hide shadow', 'bizpanda'),
13
+ * )
14
+ * title => Заголовок контрола
15
+ * slider-title => Заголовок слайдера( Только если 'way' имеет значение 'checkbox-slider' )
16
+ * range => Диапазон значений, указывается если 'way' имеет значение 'slider' или 'checkbox-slider'
17
+ * Пример: array(0,100)
18
+ * units => Единицы измерения(px,pt,em,%)
19
+ * isActive => Включение, отключение поля
20
+ * value => a value to show in the control
21
+ * default => a default value of the control if the "value" option is not specified
22
+ *
23
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
24
+ * @copyright (c) 2013, OnePress Ltd
25
+ *
26
+ * @package factory-forms
27
+ * @since 1.0.0
28
+ */
29
+ class FactoryForms329_IntegerControl extends FactoryForms329_Control {
30
+
31
+ public $type = 'integer';
32
+
33
+ /**
34
+ * Converting string to integer.
35
+ *
36
+ * @since 1.0.0
37
+ * @return integer
38
+ */
39
+ public function html()
40
+ {
41
+
42
+ $name = $this->getNameOnForm();
43
+ $value = esc_attr($this->getValue());
44
+ $isActive = $this->getOption('isActive', 1);
45
+ $unit = esc_attr($this->getOption('units'));
46
+
47
+ $way = $this->getOption('way');
48
+ if( empty($way) ) {
49
+ $way = 'text';
50
+ }
51
+
52
+ $hasSlider = false;
53
+
54
+ if( in_array($way, array('slider', 'checkbox-slider')) ) {
55
+ $range = $this->getOption('range', array(0, 99));
56
+ $slider_title = $this->getOption('slider-title');
57
+ $checkbox = $this->getOption('checkbox');
58
+ $step = $this->getOption('step', 1);
59
+ $hasSlider = true;
60
+ }
61
+
62
+ $this->addCssClass('factory-way-' . $way);
63
+ if( $hasSlider ) {
64
+ $this->addCssClass('factory-has-slider');
65
+ }
66
+ ?>
67
+
68
+ <div <?php $this->attrs() ?>>
69
+ <?php if( $hasSlider ) { ?>
70
+
71
+ <?php if( 'checkbox-slider' == $way ) { ?>
72
+
73
+ <div>
74
+ <label for="<?php echo $name; ?>_checker"><?php echo $isActive
75
+ ? $checkbox['off']
76
+ : $checkbox['on']; ?></label><br>
77
+ <input type="checkbox" id="<?php echo $name; ?>_checker" class="factory-checkbox" name="<?php echo $name; ?>_checker" <?php echo $isActive
78
+ ? 'checked'
79
+ : '' ?>></p>
80
+ </div>
81
+
82
+ <?php } ?>
83
+
84
+ <div
85
+ data-units="<?php echo $unit ?>"
86
+ data-range-start="<?php echo $range[0] ?>"
87
+ data-range-end="<?php echo $range[1] ?>"
88
+ data-step="<?php echo $step ?>"
89
+ <?php echo !$isActive
90
+ ? ' style="display:none;"'
91
+ : '' ?>
92
+ class="factory-slider-container factory-slider-container-<?php echo $name; ?>">
93
+ <?php if( !empty($slider_title) ): ?>
94
+ <label class="factory-title">
95
+ <?php echo $this->getOption('slider-title'); ?>
96
+ </label>
97
+ <?php endif; ?>
98
+
99
+ <div class="factory-slider">
100
+ <div class="factory-bar"></div>
101
+ <span class="factory-visible-value">
102
+ <?php echo $value ?><?php echo $unit ?>
103
+ </span>
104
+ </div>
105
+ <input type="hidden" name="<?php echo $name; ?>" class="factory-result" value="<?php echo $value; ?>"/>
106
+ </div>
107
+
108
+ <?php } else { ?>
109
+
110
+ <input type="text" id="<?php echo $name; ?>" name="<?php echo $name; ?>" value="<?php echo $value; ?>" class="factory-input-text"/>
111
+ <span class="factory-units"><?php echo $unit ?></span>
112
+
113
+ <?php } ?>
114
+ </div><!-- .factory-integer -->
115
+ <?php
116
+ }
117
+
118
+ /**
119
+ * Форматирует значение без единиц измерения
120
+ * @param string $values
121
+ * @param string $unit
122
+ * @return string
123
+ */
124
+ public function valueFormatWithoutUnit($values, $unit)
125
+ {
126
+ if( !is_numeric($values) ) {
127
+ return str_replace($unit, '', $values);
128
+ } else {
129
+ return $values;
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Форматирует значение c единицами измерения
135
+ * @param string $values
136
+ * @param string $unit
137
+ * @return string
138
+ */
139
+ public function valueFormatWithUnit($values, $unit)
140
+ {
141
+ if( is_numeric($values) ) {
142
+ return $values . $unit;
143
+ } else {
144
+ return $values;
145
+ }
146
+ }
147
+ }
libs/factory/forms/controls/list.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Multiselect List Control
4
+ *
5
+ * Main options:
6
+ * name => a name of the control
7
+ * value => a value to show in the control
8
+ * default => a default value of the control if the "value" option is not specified
9
+ * items => a callback to return items or an array of items to select
10
+ *
11
+ * @author Paul Kashtanoff <paul@byonepress.com>
12
+ * @copyright (c) 2013, OnePress Ltd
13
+ *
14
+ * @package factory-forms
15
+ * @since 1.0.0
16
+ */
17
+
18
+ class FactoryForms329_ListControl extends FactoryForms329_Control
19
+ {
20
+ public $type = 'list';
21
+
22
+ /**
23
+ * Returns a set of available items for the list.
24
+ *
25
+ * @since 1.0.0
26
+ * @return mixed[]
27
+ */
28
+ private function getItems() {
29
+
30
+ $data = $this->getOption('data', array());
31
+
32
+ // if the data options is a valid callback for an object method
33
+ if (
34
+ is_array($data) &&
35
+ count($data) == 2 &&
36
+ gettype($data[0]) == 'object' ) {
37
+
38
+ return call_user_func($data);
39
+
40
+ // if the data options is a valid callback for a function
41
+ } elseif ( gettype($data) == 'string' ) {
42
+
43
+ return $data();
44
+ }
45
+
46
+ // if the data options is an array of values
47
+ return $data;
48
+ }
49
+
50
+ /**
51
+ * Returns true, if the data should be loaded via ajax.
52
+ *
53
+ * @since 1.0.0
54
+ * @return bool
55
+ */
56
+ protected function isAjax() {
57
+
58
+ $data = $this->getOption('data', array());
59
+ return is_array($data) && isset($data['ajax']);
60
+ }
61
+
62
+ /**
63
+ * Shows the html markup of the control.
64
+ *
65
+ * @since 1.0.0
66
+ * @return void
67
+ */
68
+ public function html( ) {
69
+
70
+ $way = $this->getOption('way', 'default');
71
+ $this->addHtmlData('way', $way);
72
+
73
+ if ( $this->isAjax() ) {
74
+
75
+ $data = $this->getOption('data', array());
76
+ $ajaxId = 'factory-list-' . rand(1000000, 9999999);
77
+
78
+ $value = $this->getValue( null, true );
79
+ if ( empty( $value ) || empty( $value[0] )) $value = array();
80
+
81
+ ?>
82
+ <div class="factory-ajax-loader <?php echo $ajaxId . '-loader'; ?>"></div>
83
+ <script>
84
+ window['<?php echo $ajaxId ?>'] = {
85
+ 'loader': '.<?php echo $ajaxId . '-loader' ?>',
86
+ 'url': '<?php echo $data['url'] ?>',
87
+ 'data': <?php echo json_encode( $data['data'] ) ?>,
88
+ 'selected': <?php echo json_encode( $value ) ?>,
89
+ 'emptyList': '<?php echo $this->getOption('empty', __('The list is empty.', 'factory_forms_329') ) ?>'
90
+ };
91
+ </script>
92
+ <?php
93
+
94
+ $this->addHtmlData('ajax', true);
95
+ $this->addHtmlData('ajax-data-id', $ajaxId);
96
+ $this->addCssClass('factory-hidden');
97
+ }
98
+
99
+ if ( 'checklist' == $way ) {
100
+ $this->checklistHtml();
101
+ } else {
102
+ $this->defaultHtml();
103
+ }
104
+ }
105
+
106
+ /**
107
+ * Shows the Buttons Dropdown.
108
+ *
109
+ * @since 1.0.0
110
+ * @return void
111
+ */
112
+ protected function checklistHtml() {
113
+ $items = $this->getItems();
114
+
115
+ $value = explode( ',', $this->getValue() );
116
+ if ( empty( $value ) || empty( $value[0] )) $value = array();
117
+
118
+ $nameOnForm = $this->getNameOnForm();
119
+
120
+ $this->addCssClass('factory-checklist-way');
121
+ $this->addHtmlData('name', $nameOnForm);
122
+
123
+ $errorsCallback = $this->getOption('errors');
124
+ $errors = !empty( $errorsCallback ) ? call_user_func( $errorsCallback ) : array();
125
+
126
+ $isEmpty = $this->isAjax() || empty( $items );
127
+ $emptyList = $this->getOption('empty', __('The list is empty.', 'factory_forms_329') );
128
+
129
+ if ( $isEmpty ) {
130
+ $this->addCssClass('factory-empty');
131
+ }
132
+
133
+ ?>
134
+ <ul <?php $this->attrs() ?>>
135
+
136
+ <?php if ( $isEmpty ) { ?>
137
+ <li><?php echo $emptyList ?></li>
138
+ <?php } else { ?>
139
+ <?php foreach($items as $item) { ?>
140
+ <li>
141
+ <label for="factory-checklist-<?php echo $nameOnForm ?>-<?php echo $item[0] ?>" class="<?php if ( !empty( $errors[$item[0] ] ) ) { echo 'factory-has-error'; } ?>">
142
+
143
+ <?php if ( !empty( $errors[$item[0] ] ) ) { ?>
144
+ <span class="factory-error">
145
+ <i class="fa fa-exclamation-triangle"></i>
146
+ <div class='factory-error-text'><?php echo $errors[$item[0]] ?></div>
147
+ </span>
148
+ <?php } else { ?>
149
+ <span>
150
+ <input
151
+ type="checkbox"
152
+ name="<?php echo $nameOnForm ?>[]"
153
+ value="<?php echo $item[0] ?>"
154
+ id="factory-checklist-<?php echo $nameOnForm ?>-<?php echo $item[0] ?>"
155
+ <?php if ( in_array( $item[0], $value) ) { echo 'checked="checked"'; } ?> />
156
+ </span>
157
+ <?php } ?>
158
+
159
+ <span><?php echo $item[1] ?></span>
160
+ </label>
161
+ </li>
162
+ <?php } ?>
163
+ <?php } ?>
164
+
165
+ </ul>
166
+ <?php
167
+ }
168
+
169
+ /**
170
+ * Shows the standart dropdown.
171
+ *
172
+ * @since 1.3.1
173
+ * @return void
174
+ */
175
+ protected function defaultHtml() {
176
+
177
+ $items = $this->getItems();
178
+ $value = $this->getValue();
179
+
180
+ $nameOnForm = $this->getNameOnForm();
181
+
182
+ $this->addHtmlAttr('id', $nameOnForm);
183
+ $this->addHtmlAttr('name', $nameOnForm);
184
+ $this->addCssClass('form-control');
185
+
186
+ ?>
187
+ <select multiple="multiple" <?php $this->attrs() ?>/>
188
+ <?php foreach($items as $item) {
189
+ if ( count($item) == 3 ) {
190
+ ?>
191
+ <optgroup label="<?php echo $item[1] ?>" >
192
+ <?php foreach($item[2] as $subitem) { ?>
193
+ <?php $selected = ( $subitem[0] == $value ) ? 'selected="selected"' : ''; ?>
194
+ <option value='<?php echo $subitem[0] ?>' <?php echo $selected ?>>
195
+ <?php echo $subitem[1] ?>
196
+ </option>
197
+ <?php } ?>
198
+ </optgroup>
199
+ <?php
200
+ } else {
201
+ $selected = ( $item[0] == $value ) ? 'selected="selected"' : '';
202
+ ?>
203
+ <option value='<?php echo $item[0] ?>' <?php echo $selected ?>>
204
+ <?php echo $item[1] ?>
205
+ </option>
206
+ <?php } ?>
207
+ <?php } ?>
208
+ </select>
209
+ <?php
210
+ }
211
+ }
libs/factory/forms/controls/paddings-editor.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Paddings Control
5
+ */
6
+ class FactoryForms329_PaddingsEditorControl extends FactoryForms329_Control {
7
+
8
+ public $type = 'paddings-editor';
9
+
10
+ /**
11
+ * Converting string to integer.
12
+ *
13
+ * @since 1.0.0
14
+ * @return integer
15
+ */
16
+ public function html()
17
+ {
18
+
19
+ $name = $this->getNameOnForm();
20
+ $rawValue = esc_attr($this->getValue());
21
+
22
+ $units = $this->getOption('units');
23
+ $valuesWithUnits = explode(' ', $rawValue);
24
+
25
+ $values = array();
26
+ foreach($valuesWithUnits as $valueWithUnit) {
27
+ $values[] = intval($valueWithUnit);
28
+ }
29
+
30
+ $unit = $this->getOption('units', 'px');
31
+ $range = $this->getOption('range', array(0, 99));
32
+ $step = $this->getOption('step', 1);
33
+
34
+ ?>
35
+ <div <?php $this->attrs() ?>
36
+ data-units="<?php echo $unit ?>"
37
+ data-range-start="<?php echo $range[0] ?>"
38
+ data-range-end="<?php echo $range[1] ?>"
39
+ data-step="<?php echo $step ?>">
40
+ <div class="factory-rectangle">
41
+ <div class="factory-side factory-side-top" data-value="<?php echo $values[0] ?>">
42
+ <span class="factory-visible-value"><?php echo $values[0] ?><?php echo $units ?></span></div>
43
+ <div class="factory-side factory-side-bottom" data-value="<?php echo $values[1] ?>">
44
+ <span class="factory-visible-value"><?php echo $values[1] ?><?php echo $units ?></span></div>
45
+ <div class="factory-side factory-side-left" data-value="<?php echo $values[2] ?>">
46
+ <span class="factory-visible-value"><?php echo $values[2] ?><?php echo $units ?></span></div>
47
+ <div class="factory-side factory-side-right" data-value="<?php echo $values[3] ?>">
48
+ <span class="factory-visible-value"><?php echo $values[3] ?><?php echo $units ?></span></div>
49
+ <div class="factory-side factory-side-center" data-value="<?php echo $values[0] ?>"></div>
50
+ </div>
51
+ <div class="factory-slider-container">
52
+ <label class="factory-title">
53
+ <?php _e('Select a side and move the slider to set up:', 'factory_forms_329') ?>
54
+ </label>
55
+
56
+ <div class="factory-slider">
57
+ <div class="factory-bar"></div>
58
+ </div>
59
+ </div>
60
+ <input type="hidden" class="factory-result" name="<?php echo $name ?>" value="<?php echo $rawValue ?>"/>
61
+ </div>
62
+ <?php
63
+ }
64
+ }
libs/factory/forms/controls/pattern.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Pattern Control
5
+ *
6
+ * @author Alex Kovalev <alex@byonepress.com>
7
+ * @author Paul Kashtanoff <paul@byonepress.com>
8
+ * @copyright (c) 2013-2014, OnePress Ltd
9
+ *
10
+ * @package factory-forms
11
+ * @since 3.1.0
12
+ */
13
+ class FactoryForms329_PatternControl extends FactoryForms329_Control {
14
+
15
+ public $type = 'pattern';
16
+
17
+ public function getName()
18
+ {
19
+ return array(
20
+ $this->getOption('name') . '__url',
21
+ $this->getOption('name') . '__color'
22
+ );
23
+ }
24
+
25
+ public function __construct($options, $form, $provider = null)
26
+ {
27
+ parent::__construct($options, $form, $provider);
28
+
29
+ if( !isset($options['color']) ) {
30
+ $options['color'] = array();
31
+ }
32
+
33
+ $options['color'] = array_merge($options['color'], array(
34
+ 'name' => $this->options['name'] . '_color_picker',
35
+ 'default' => isset($this->options['default'])
36
+ ? $this->options['default']['color']
37
+ : null,
38
+ 'pickerTarget' => '.factory-control-' . $this->options['name'] . ' .factory-picker-target'
39
+ ));
40
+
41
+ if( !$options['color']['default'] ) {
42
+ $options['color']['default'] = '#1e8cbe';
43
+ }
44
+
45
+ $name = $this->getOption('name');
46
+
47
+ // filters to get available patterns for the given background contols
48
+ $this->patterns = apply_filters('factory_forms_329_patterns', array());
49
+ $this->patterns = apply_filters('factory_forms_329_patterns-' . $name, $this->patterns);
50
+ $this->customPatterns = $this->getOption('patterns', array());
51
+
52
+ $this->color = new FactoryForms329_ColorControl($options['color'], $form, $provider);
53
+ }
54
+
55
+ /**
56
+ * Shows the html markup of the control.
57
+ *
58
+ * @since 1.0.0
59
+ * @return void
60
+ */
61
+ public function html()
62
+ {
63
+ $name = $this->getNameOnForm();
64
+ $values = $this->getValue();
65
+
66
+ // if a pattern is not set by defaut, sets the first available pattern
67
+ if( empty($values['url']) && !empty($this->patterns) ) {
68
+ foreach($this->patterns as $groupKey => $groupValue) {
69
+ if( !empty($this->patterns[$groupKey]['patterns']) ) {
70
+ $values['url'] = $this->patterns[$groupKey]['patterns'][0]['pattern'];
71
+ break;
72
+ }
73
+ }
74
+ }
75
+
76
+ if( !empty($values['color']) ) {
77
+ $this->color->setOption('value', $values['color']);
78
+ }
79
+
80
+ $hasColor = !empty($values['color']);
81
+
82
+ if( $hasColor ) {
83
+ $this->addCssClass('factory-color-panel-active');
84
+ }
85
+
86
+ ?>
87
+ <div <?php $this->attrs() ?>>
88
+ <div class="factory-pattern-controls">
89
+ <div class="factory-preview-wrap">
90
+ <div <?php echo (!empty($values['url']))
91
+ ? 'style="background:url(' . esc_url($values['url']) . ') repeat; border:0; font-size:0;"'
92
+ : ''; ?> class="factory-preview <?php echo $this->getOption('name'); ?>"><span></span></div>
93
+ </div>
94
+ <a href="#" class="button button-default factory-button factory-change-color-btn <?php if( $hasColor ) {
95
+ echo 'button-active';
96
+ } ?>" title="<?php _e('Change color', 'factory_forms_329') ?>">
97
+ <i class="fa fa-flask"></i>
98
+ <span><?php _e('re-color', 'factory_forms_329') ?></span>
99
+ </a>
100
+ <input type="hidden" id="<?php echo $name[0]; ?>" name="<?php echo $name[0]; ?>" value="<?php echo esc_url($values['url']); ?>" class="factory-pattern-result">
101
+ <input type="hidden" id="<?php echo $name[1]; ?>" name="<?php echo $name[1]; ?>" value="<?php echo esc_attr($values['color']); ?>" class="factory-color-result">
102
+ </div>
103
+ <div class="factory-color-panel">
104
+ <div class="factory-color-wrap">
105
+ <span class="factory-color-label"><?php _e('Select color:', 'factory_forms_329') ?></span>
106
+ <?php $this->color->html() ?>
107
+ <div class="factory-hint">
108
+ <i><?php _e('Changing the color may takes a minute or more. Please be patient.', 'factory_forms_329') ?></i>
109
+ </div>
110
+ </div>
111
+ <div class="factory-picker-target"></div>
112
+ </div>
113
+ <div class="factory-patterns-panel">
114
+ <div class="factory-patterns-group factory-patterns-group-custom">
115
+ <?php $this->printPatterns($this->customPatterns, 4, '<div class="factory-patterns-item factory-upload-btn factory-no-preview"><span class="fa fa-upload"></span></div>') ?>
116
+ </div>
117
+ <?php foreach($this->patterns as $key => $group): ?>
118
+ <?php if( !empty($group['patterns']) ): ?>
119
+ <div class="factory-patterns-group factory-patterns-group-<?php echo $key ?>">
120
+ <div class="factory-patterns-group-title"><?php echo $group['title'] ?></div>
121
+ <?php $this->printPatterns($group['patterns'], 4) ?>
122
+ </div>
123
+ <?php endif; ?>
124
+ <?php endforeach; ?>
125
+ </div>
126
+ <div class="clearfix"></div>
127
+ </div>
128
+ <?php
129
+ }
130
+
131
+ private function printPatterns($patterns, $perRow, $firstItem = null)
132
+ {
133
+ $counter = 0;
134
+ $printFirstItem = $firstItem;
135
+
136
+ ?>
137
+ <div class="factory-patterns-row">
138
+ <?php
139
+
140
+ if( $printFirstItem ) {
141
+ echo $printFirstItem;
142
+ $printFirstItem = null;
143
+ $counter++;
144
+ }
145
+
146
+ foreach($patterns as $pattern) {
147
+ $counter++;
148
+
149
+ ?>
150
+ <div class="factory-patterns-item" data-pattern="<?php echo $pattern['pattern']; ?>">
151
+ <div class="factory-pattern-holder" style="background:url(<?php echo $pattern['preview']; ?>) repeat;"></div>
152
+ </div>
153
+ <?php
154
+
155
+ if( $counter == 4 ) {
156
+ $counter = 0;
157
+ ?>
158
+ </div><div class="factory-patterns-row">
159
+ <?php
160
+ }
161
+ }
162
+ ?>
163
+ </div>
164
+ <?php
165
+ }
166
+ }
libs/factory/forms/controls/radio-colors.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Radio Colors Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ * data => a callback to return items or an array of items to select
11
+ * 'data' => array(
12
+ * array('default', '#75649b'),
13
+ * array('black', '#222'),
14
+ * array('light', '#fff3ce'),
15
+ * array('forest', '#c9d4be'),
16
+ *)
17
+ *
18
+ * @author Alex Kovalevv <alex.kovalevv@gmail.com>
19
+ * @copyright (c) 2017, OnePress Ltd
20
+ *
21
+ * @package factory-forms
22
+ * @since 1.0.0
23
+ */
24
+ class FactoryForms329_RadioColorsControl extends FactoryForms329_Control {
25
+
26
+ public $type = 'radio-color';
27
+
28
+ /**
29
+ * Returns a set of available items for the radio.
30
+ *
31
+ * @since 1.0.0
32
+ * @return mixed[]
33
+ */
34
+ private function getItems()
35
+ {
36
+ $data = $this->getOption('data', array());
37
+
38
+ // if the data options is a valid callback for an object method
39
+ if( is_array($data) && count($data) == 2 && gettype($data[0]) == 'object' ) {
40
+
41
+ return call_user_func($data);
42
+ // if the data options is a valid callback for a function
43
+ } elseif( gettype($data) == 'string' ) {
44
+
45
+ return $data();
46
+ }
47
+
48
+ // if the data options is an array of values
49
+ return $data;
50
+ }
51
+
52
+ /**
53
+ * Preparing html attributes before rendering html of the control.
54
+ *
55
+ * @since 1.0.0
56
+ * @return void
57
+ */
58
+ protected function beforeHtml()
59
+ {
60
+ $nameOnForm = $this->getNameOnForm();
61
+ $this->addHtmlAttr('name', $nameOnForm);
62
+
63
+ echo '<div class="factory-colors-inner-wrap" data-radio-name="' . $nameOnForm . '">';
64
+ }
65
+
66
+ /**
67
+ * Preparing html attributes afterHtml rendering html of the control.
68
+ *
69
+ * @since 1.0.0
70
+ * @return void
71
+ */
72
+ protected function afterHtml()
73
+ {
74
+ echo '</div>';
75
+ }
76
+
77
+ /**
78
+ * Shows the html markup of the control.
79
+ *
80
+ * @since 1.0.0
81
+ * @return void
82
+ */
83
+ public function html()
84
+ {
85
+ $items = $this->getItems();
86
+ $value = $this->getValue();
87
+
88
+ ?>
89
+ <?php foreach($items as $item) {
90
+ $checked = ($item[0] == $value)
91
+ ? 'checked="checked"'
92
+ : '';
93
+
94
+ if( empty($item[1]) || strpos($item[1], '#') === false ) {
95
+ $item[1] = '#fff';
96
+ }
97
+ ?>
98
+ <span class="factory-form-radio-item">
99
+ <label class="factory-from-radio-label">
100
+ <input type="radio" <?php $this->attrs() ?> value="<?php echo esc_attr($item[0]) ?>" <?php echo $checked ?>/>
101
+ <span style="background-color:<?= esc_attr($item[1]) ?>"></span>
102
+ </lable>
103
+ </span>
104
+ <?php }
105
+ }
106
+ }
libs/factory/forms/controls/radio.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Radio Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ * items => a callback to return items or an array of items to select
11
+ *
12
+ * @author Paul Kashtanoff <paul@byonepress.com>
13
+ * @copyright (c) 2013, OnePress Ltd
14
+ *
15
+ * @package factory-forms
16
+ * @since 1.0.0
17
+ */
18
+ class FactoryForms329_RadioControl extends FactoryForms329_Control {
19
+
20
+ public $type = 'radio';
21
+
22
+ /**
23
+ * Returns a set of available items for the radio.
24
+ *
25
+ * @since 1.0.0
26
+ * @return mixed[]
27
+ */
28
+ private function getItems()
29
+ {
30
+ $data = $this->getOption('data', array());
31
+
32
+ // if the data options is a valid callback for an object method
33
+ if( is_array($data) && count($data) == 2 && gettype($data[0]) == 'object' ) {
34
+
35
+ return call_user_func($data);
36
+ // if the data options is a valid callback for a function
37
+ } elseif( gettype($data) == 'string' ) {
38
+
39
+ return $data();
40
+ }
41
+
42
+ // if the data options is an array of values
43
+ return $data;
44
+ }
45
+
46
+ /**
47
+ * Preparing html attributes before rendering html of the control.
48
+ *
49
+ * @since 1.0.0
50
+ * @return void
51
+ */
52
+ protected function beforeHtml()
53
+ {
54
+ $nameOnForm = $this->getNameOnForm();
55
+ $this->addHtmlAttr('name', $nameOnForm);
56
+ }
57
+
58
+ /**
59
+ * Shows the html markup of the control.
60
+ *
61
+ * @since 1.0.0
62
+ * @return void
63
+ */
64
+ public function html()
65
+ {
66
+ $items = $this->getItems();
67
+ $value = $this->getValue();
68
+ ?>
69
+ <?php foreach($items as $item) {
70
+ $checked = ($item[0] == $value)
71
+ ? 'checked="checked"'
72
+ : '';
73
+ ?>
74
+ <span class="factory-form-radio-item">
75
+ <label class="factory-from-radio-label"><?php echo esc_html($item[1]) ?></lable>
76
+ <input type="radio" <?php $this->attrs() ?> value="<?php echo esc_attr($item[0]) ?>" <?php echo $checked ?>/>
77
+ </span>
78
+ <?php }
79
+ }
80
+ }
libs/factory/forms/controls/textarea.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Textarea Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ *
11
+ * @author Paul Kashtanoff <paul@byonepress.com>
12
+ * @copyright (c) 2013, OnePress Ltd
13
+ *
14
+ * @package factory-forms
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_TextareaControl extends FactoryForms329_Control {
18
+
19
+ public $type = 'textarea';
20
+
21
+ /**
22
+ * Returns a submit value of the control by a given name.
23
+ *
24
+ * @since 1.0.0
25
+ * @return mixed
26
+ */
27
+ public function getSubmitValue($name, $subName)
28
+ {
29
+ $nameOnForm = $this->getNameOnForm($name);
30
+ $value = isset($_POST[$nameOnForm])
31
+ ? $_POST[$nameOnForm]
32
+ : null;
33
+ if( is_array($value) ) {
34
+ $value = implode(',', $value);
35
+ }
36
+
37
+ return sanitize_textarea_field($value);
38
+ }
39
+
40
+ /**
41
+ * Preparing html attributes before rendering html of the control.
42
+ *
43
+ * @since 1.0.0
44
+ * @return void
45
+ */
46
+ protected function beforeHtml()
47
+ {
48
+ $nameOnForm = $this->getNameOnForm();
49
+ $height = (int)$this->getOption('height', 100);
50
+
51
+ $this->addCssClass('form-control');
52
+ $this->addHtmlAttr('name', $nameOnForm);
53
+ $this->addHtmlAttr('id', $nameOnForm);
54
+ $this->addHtmlAttr('style', 'min-height:' . $height . 'px');
55
+ }
56
+
57
+ /**
58
+ * Shows the html markup of the control.
59
+ *
60
+ * @since 1.0.0
61
+ * @return void
62
+ */
63
+ public function html()
64
+ {
65
+ ?>
66
+ <textarea <?php $this->attrs(); ?> /><?php echo esc_textarea($this->getValue()); ?></textarea>
67
+ <?php
68
+ }
69
+ }
libs/factory/forms/controls/textbox.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Textbox Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ * maxLength => set the max length of text in the input control
11
+ * placeholder => a placeholder text for the control when the control value is empty
12
+ *
13
+ * Использование datepicker в текстовом поле (необходимо подключить bootstrap.datepicker)
14
+ * 'htmlAttrs' => array(
15
+ * 'data-provide' => 'datepicker-inline',
16
+ * 'data-date-language' => 'ru',
17
+ * 'data-date-autoclose' => 'true'
18
+ * )
19
+ *
20
+ * @author Paul Kashtanoff <paul@byonepress.com>
21
+ * @copyright (c) 2013, OnePress Ltd
22
+ *
23
+ * @package factory-forms
24
+ * @since 1.0.0
25
+ */
26
+ class FactoryForms329_TextboxControl extends FactoryForms329_Control {
27
+
28
+ public $type = 'textbox';
29
+
30
+ /**
31
+ * Preparing html attributes before rendering html of the control.
32
+ *
33
+ * @since 1.0.0
34
+ * @return void
35
+ */
36
+ protected function beforeHtml()
37
+ {
38
+ $value = esc_attr($this->getValue());
39
+ $nameOnForm = $this->getNameOnForm();
40
+
41
+ if( $this->getOption('maxLength', false) ) {
42
+ $this->addHtmlAttr('maxlength', intval($this->getOption('maxLength')));
43
+ }
44
+
45
+ if( $this->getOption('placeholder', false) ) {
46
+ $this->addHtmlAttr('placeholder', $this->getOption('placeholder'));
47
+ }
48
+
49
+ $this->addCssClass('form-control');
50
+ $this->addHtmlAttr('type', 'text');
51
+ $this->addHtmlAttr('id', $nameOnForm);
52
+ $this->addHtmlAttr('name', $nameOnForm);
53
+ $this->addHtmlAttr('value', $value);
54
+ }
55
+
56
+ /**
57
+ * Shows the html markup of the control.
58
+ *
59
+ * @since 1.0.0
60
+ * @return void
61
+ */
62
+ public function html()
63
+ {
64
+ $units = $this->getOption('units', false);
65
+ ?>
66
+ <?php if( $units ) { ?><div class="input-group"><?php } ?>
67
+ <input <?php $this->attrs() ?>/>
68
+ <?php if( $units ) { ?>
69
+ <span class="input-group-addon"><?php echo $units; ?></span>
70
+ <?php } ?>
71
+ <?php if( $units ) { ?></div><?php } ?>
72
+ <?php
73
+ }
74
+
75
+ public function getSubmitValue($name, $subName)
76
+ {
77
+ $nameOnForm = $this->getNameOnForm($name);
78
+
79
+ return isset($_POST[$nameOnForm])
80
+ ? sanitize_text_field($_POST[$nameOnForm])
81
+ : '';
82
+ }
83
+ }
libs/factory/forms/controls/url.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Url Control
5
+ *
6
+ * Main options:
7
+ * @see FactoryForms329_TextboxControl
8
+ *
9
+ * @author Paul Kashtanoff <paul@byonepress.com>
10
+ * @copyright (c) 2013, OnePress Ltd
11
+ *
12
+ * @package factory-forms
13
+ * @since 1.0.0
14
+ */
15
+ class FactoryForms329_UrlControl extends FactoryForms329_TextboxControl {
16
+
17
+ public $type = 'url';
18
+
19
+ /**
20
+ * Adding 'http://' to the url if it was missed.
21
+ *
22
+ * @since 1.0.0
23
+ * @return string
24
+ */
25
+ public function getSubmitValue($name, $subName)
26
+ {
27
+ $value = parent::getSubmitValue($name, $subName);
28
+ if( !empty($value) && substr($value, 0, 4) != 'http' )
29
+ $value = 'http://' . $value;
30
+
31
+ return $value;
32
+ }
33
+ }
libs/factory/forms/controls/wp-editor.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * WP Editor Control
5
+ *
6
+ * Main options:
7
+ * name => a name of the control
8
+ * value => a value to show in the control
9
+ * default => a default value of the control if the "value" option is not specified
10
+ * tinymce => an array of options for tinymce
11
+ * @link http://codex.wordpress.org/Function_Reference/wp_editor
12
+ *
13
+ * @author Paul Kashtanoff <paul@byonepress.com>
14
+ * @copyright (c) 2013, OnePress Ltd
15
+ *
16
+ * @package factory-forms
17
+ * @since 1.0.0
18
+ */
19
+ class FactoryForms329_WpEditorControl extends FactoryForms329_Control {
20
+
21
+ public $type = 'wp-editor';
22
+
23
+ /**
24
+ * Preparing html attributes and options for tinymce.
25
+ *
26
+ * @since 1.0.0
27
+ * @return void
28
+ */
29
+ protected function beforeHtml()
30
+ {
31
+
32
+ if( empty($this->options['tinymce']) ) {
33
+ $this->options['tinymce'] = array();
34
+ }
35
+
36
+ if( !isset($this->options['tinymce']['content_css']) ) {
37
+ $this->options['tinymce']['content_css'] = FACTORY_FORMS_329_URL . '/assets/css/editor.css';
38
+ }
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
+ $nameOnForm = $this->getNameOnForm();
50
+
51
+ $value = $this->getValue();
52
+
53
+ ?>
54
+ <div class='factory-form-wp-editor'>
55
+ <?php wp_editor($value, $nameOnForm, array(
56
+ 'textarea_name' => $nameOnForm,
57
+ 'wpautop' => false,
58
+ 'teeny' => true,
59
+ 'tinymce' => $this->getOption('tinymce', array())
60
+ )); ?>
61
+ </div>
62
+ <?php
63
+ }
64
+
65
+ /**
66
+ * Returns a submit value of the control by a given name.
67
+ *
68
+ * @since 1.0.0
69
+ * @return mixed
70
+ */
71
+ public function getSubmitValue($name, $subName)
72
+ {
73
+ $nameOnForm = $this->getNameOnForm($name);
74
+ $value = isset($_POST[$nameOnForm])
75
+ ? $_POST[$nameOnForm]
76
+ : null;
77
+ if( is_array($value) ) {
78
+ $value = implode(',', $value);
79
+ }
80
+
81
+ return wp_kses_post($value);
82
+ }
83
+ }
libs/factory/forms/helpers.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Html Helper is to render form elements independently.
4
+ *
5
+ * Factory Forms is a Factory module that provides a declarative
6
+ * way to build forms without any extra html or css markup.
7
+ *
8
+ * @author Paul Kashtanoff <paul@byonepress.com>
9
+ * @copyright (c) 2013, OnePress Ltd
10
+ *
11
+ * @package factory-forms
12
+ * @since 1.0.0
13
+ */
14
+
15
+ /**
16
+ * A class that provides a set of methods to render form elements independently.
17
+ *
18
+ * @since 1.0.0
19
+ */
20
+ class FactoryForms329_FormHelpers {
21
+
22
+ /**
23
+ * Renders a form element.
24
+ *
25
+ * @since 1.0.0
26
+ * @param type $type A type of a form element.
27
+ * @param type $options Element options.
28
+ * @return void
29
+ */
30
+ public static function render( $type, $options = array() ) {
31
+ $options['type'] = $type;
32
+
33
+ if ( FactoryForms329_Form::isControl($type) ) {
34
+ self::renderControl($type, $options);
35
+ } elseif ( FactoryForms329_Form::isControlHolder($type) ) {
36
+ self::renderHolder($type, $options);
37
+ } else {
38
+ print_r($options);
39
+ die('The control type was not found: ' . $type );
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Renders a given control.
45
+ *
46
+ * @since 1.0.0
47
+ * @param type $type A control type.
48
+ * @param type $options Control options.
49
+ * @return void
50
+ */
51
+ public static function renderControl($type, $options) {
52
+ FactoryForms329_Form::connectAssetsForItem( $options );
53
+
54
+ $data = self::$_registeredControls[$type];
55
+ require_once ($data['include']);
56
+ $object = new $data['class']( $options );
57
+ $object->html();
58
+ }
59
+
60
+ /**
61
+ * Renders a given control holder.
62
+ *
63
+ * @since 1.0.0
64
+ * @param type $type A holder type.
65
+ * @param type $options Holder options.
66
+ * @return void
67
+ */
68
+ public static function renderHolder($type, $options) {
69
+ FactoryForms329_Form::connectAssetsForItem( $options );
70
+
71
+ $data = self::$_registeredHolders[$type];
72
+ require_once ($data['include']);
73
+ $object = new $data['class']( $options );
74
+ $object->html();
75
+ }
76
+
77
+ /**
78
+ * A helper method to extract control options (items) by a given name.
79
+ *
80
+ * @since 3.0.5
81
+ * @param string $controlName a control name to search
82
+ * @param mixed $options a set of contol options
83
+ * @return null|string
84
+ */
85
+ public static function extractControlOptions( $controlName, $options = array() ) {
86
+
87
+ foreach($options as $itemOptions) {
88
+
89
+ if ( isset( $itemOptions['name'] ) && $itemOptions['name'] == $controlName ) {
90
+ return $itemOptions;
91
+ }
92
+
93
+ if ( isset( $itemOptions['items'] ) && is_array( $itemOptions['items'] ) ) {
94
+ $result = self::extractControlOptions( $controlName, $itemOptions['items'] );
95
+ if ( $result ) return $result;
96
+ }
97
+ }
98
+
99
+ return null;
100
+ }
101
+ }
libs/factory/forms/includes/complex-control.class.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the base class for all complex controls.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2014, OnePress Ltd
7
+ *
8
+ * @package factory-forms
9
+ * @since 1.0.0
10
+ */
11
+
12
+ /**
13
+ * The base class for all controls.
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ abstract class FactoryForms329_ComplexControl extends FactoryForms329_Control {
18
+
19
+ /**
20
+ * Is this element a complex control?
21
+ *
22
+ * @since 1.0.0
23
+ * @var bool
24
+ */
25
+ public $isComplexControl = true;
26
+
27
+ /**
28
+ * Contains a set of internal controls.
29
+ *
30
+ * @since 1.0.0
31
+ * @var FactoryForms329_Control[]
32
+ */
33
+ public $innerControls = array();
34
+
35
+ /**
36
+ * Sets a provider for the control.
37
+ *
38
+ * @since 1.0.0
39
+ * @param IFactoryForms329_ValueProvider $provider
40
+ * @return void
41
+ */
42
+ public function setProvider( $provider ) {
43
+ $this->provider = $provider;
44
+
45
+ foreach( $this->innerControls as $control ) {
46
+ $control->setProvider( $provider );
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Returns a control name used to save data with a provider.
52
+ *
53
+ * The method can return if the control have several elements.
54
+ *
55
+ * @since 1.0.0
56
+ * @return string[]|string|null A control name.
57
+ */
58
+ public function getName()
59
+ {
60
+ $names = array();
61
+
62
+ foreach( $this->innerControls as $control ) {
63
+ $innerNames = $control->getName();
64
+ if ( is_array($innerNames) ) $names = array_merge($names, $innerNames );
65
+ else $names[] = $innerNames;
66
+ }
67
+
68
+ return $names;
69
+ }
70
+
71
+ /**
72
+ * Returns an array of value to save received after submission of a form.
73
+ *
74
+ * @see getSubmitValue
75
+ *
76
+ * The array has the following format:
77
+ * array(
78
+ * 'control-name1' => 'value1',
79
+ * 'control-name2__sub-name1' => 'value2'
80
+ * 'control-name2__sub-name2' => 'value3'
81
+ * )
82
+ *
83
+ * @since 3.1.0
84
+ * @return mixed[]
85
+ */
86
+ public function getValuesToSave() {
87
+ $values = array();
88
+
89
+ foreach( $this->innerControls as $control ) {
90
+ $innerValues = $control->getValuesToSave();
91
+ if ( is_array($innerValues) ) $values = array_merge( $values, $innerValues );
92
+ else $values[] = $innerValues;
93
+ }
94
+
95
+ return $values;
96
+ }
97
+
98
+ /**
99
+ * Returns an initial value of control that is used to render the control first time.
100
+ *
101
+ * @since 1.0.0
102
+ * @return mixed;
103
+ */
104
+ public function getValue( $index = null, $multiple = false ) {
105
+
106
+ $values = array();
107
+ foreach( $this->innerControls as $control ) {
108
+ $innerValues = array_merge($values, $control->getValue() );
109
+ if ( is_array($innerValues) ) $values = array_merge($values, $innerValues );
110
+ else $values[] = $innerValues;
111
+ }
112
+
113
+ if ( $index !== null ) { return $values[$index]; }
114
+ else { return $values; }
115
+ }
116
+
117
+ }
libs/factory/forms/includes/control-holder.class.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the base class for all control holder
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
+ * The base class for control holders.
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ abstract class FactoryForms329_ControlHolder extends FactoryForms329_Control {
18
+
19
+ /**
20
+ * Holder Elements.
21
+ *
22
+ * @since 1.0.0
23
+ * @var FactoryForms329_FormElement[]
24
+ */
25
+ protected $elements = array();
26
+
27
+ /**
28
+ * Is this element a control holder?
29
+ *
30
+ * @since 1.0.0
31
+ * @var bool
32
+ */
33
+ public $isHolder = true;
34
+
35
+ /**
36
+ * Creates a new instance of control holder.
37
+ *
38
+ * @since 1.0.0
39
+ * @param mixed[] $options A holder options.
40
+ * @param FactoryForms329_Form $form A parent form.
41
+ */
42
+ public function __construct($options, $form) {
43
+ parent::__construct($options, $form);
44
+ $this->elements = $form->createElements( $options['items'] );
45
+ foreach( $this->elements as $val ) {
46
+ $val->parent = $this;
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Returns holder elements.
52
+ *
53
+ * @since 1.0.0
54
+ * @return FactoryForms329_FormElement[].
55
+ */
56
+ public function getElements() {
57
+ return $this->elements;
58
+ }
59
+
60
+ /**
61
+ * Renders the form or a given control holder.
62
+ *
63
+ * @since 1.0.0
64
+ * @param $holder A control holder to render.
65
+ * @return void
66
+ */
67
+ function render() {
68
+
69
+ $this->beforeRendering();
70
+
71
+ $isFirstItem = true;
72
+
73
+ foreach( $this->elements as $element ) {
74
+ $element->setOption('isFirst', $isFirstItem);
75
+ if ( $isFirstItem ) $isFirstItem = false;
76
+
77
+ do_action('factory_form_before_element_' . $element->getName() );
78
+
79
+ // if a current item is a control holder
80
+ if ( $element->isHolder ) {
81
+
82
+ $this->form->layout->beforeHolder( $element );
83
+ $element->render();
84
+ $this->form->layout->afterHolder( $element );
85
+
86
+ // if a current item is an input control
87
+ } elseif ( $element->isControl ) {
88
+
89
+ $this->form->layout->beforeControl( $element );
90
+ $element->render();
91
+ $this->form->layout->afterControl( $element );
92
+
93
+ // if a current item is a custom form element
94
+ } elseif ( $element->isCustom ) {
95
+
96
+ $element->render();
97
+
98
+ // otherwise, show the error
99
+ } else {
100
+ print_r($element);
101
+ echo( '[ERROR] Invalid item.' );
102
+ }
103
+
104
+ do_action('factory_form_after_element_' . $element->getName() );
105
+ }
106
+
107
+ $this->afterRendering();
108
+ }
109
+
110
+ /**
111
+ * Rendering a beginning of a holder.
112
+ *
113
+ * @since 1.0.0
114
+ * @return void
115
+ */
116
+ public function beforeRendering(){}
117
+
118
+ /**
119
+ * Rendering an end of a holder.
120
+ *
121
+ * @since 1.0.0
122
+ * @return void
123
+ */
124
+ public function afterRendering(){}
125
+
126
+ /**
127
+ * Rendering some html before an inner holder.
128
+ *
129
+ * @since 1.0.0
130
+ * @return void
131
+ */
132
+ public function beforeInnerHolder(){}
133
+
134
+ /**
135
+ * Rendering some html after an inner holder.
136
+ *
137
+ * @since 1.0.0
138
+ * @return void
139
+ */
140
+ public function afterInnerHolder(){}
141
+
142
+
143
+ public function beforeInnerElement(){}
144
+
145
+ /**
146
+ * Rendering some html after an inner element.
147
+ *
148
+ * @since 1.0.0
149
+ * @return void
150
+ */
151
+ public function afterInnerElement(){}
152
+ }
libs/factory/forms/includes/control.class.php ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the base class for all controls.
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
+ * The base class for all controls.
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ abstract class FactoryForms329_Control extends FactoryForms329_FormElement {
18
+
19
+ /**
20
+ * Is this element a control?
21
+ *
22
+ * @since 1.0.0
23
+ * @var bool
24
+ */
25
+ public $isControl = true;
26
+
27
+ /**
28
+ * Is this element a complex control?
29
+ *
30
+ * @since 1.0.0
31
+ * @var bool
32
+ */
33
+ public $isComplexControl = false;
34
+
35
+ /**
36
+ * A provider that is used to get values.
37
+ *
38
+ * @since 1.0.0
39
+ * @var IFactoryValueProvider
40
+ */
41
+ protected $provider = null;
42
+
43
+ /**
44
+ * Create a new instance of the control.
45
+ *
46
+ * @since 1.0.0
47
+ * @return void
48
+ */
49
+ public function __construct($options, $form, $provider = null)
50
+ {
51
+ parent::__construct($options, $form);
52
+ $this->provider = $provider;
53
+ }
54
+
55
+ /**
56
+ * Sets a provider for the control.
57
+ *
58
+ * @since 1.0.0
59
+ * @param IFactoryForms329_ValueProvider $provider
60
+ * @return void
61
+ */
62
+ public function setProvider($provider)
63
+ {
64
+ $this->provider = $provider;
65
+ }
66
+
67
+ /**
68
+ * Returns a control name used to save data with a provider.
69
+ *
70
+ * The method can return if the control have several elements.
71
+ *
72
+ * @since 1.0.0
73
+ * @return string[]|string|null A control name.
74
+ */
75
+ public function getName()
76
+ {
77
+ return isset($this->options['name'])
78
+ ? $this->options['name']
79
+ : null;
80
+ }
81
+
82
+ /**
83
+ * Prints a control name used to save data with a provider.
84
+ *
85
+ * @since 1.0.0
86
+ * @return void
87
+ */
88
+ protected function printName()
89
+ {
90
+ $name = $this->getName();
91
+ if( is_array($name) ) {
92
+ echo $name[0];
93
+ } else echo $name;
94
+ }
95
+
96
+ /**
97
+ * Returns a control scope.
98
+ *
99
+ * @since 1.0.0
100
+ * @return string|null A control scope.
101
+ */
102
+ public function getScope()
103
+ {
104
+ return isset($this->options['scope'])
105
+ ? $this->options['scope']
106
+ : null;
107
+ }
108
+
109
+ /**
110
+ * Prints a control scope.
111
+ *
112
+ * @since 1.0.0
113
+ * @return void
114
+ */
115
+ protected function printScope()
116
+ {
117
+ echo $this->getScope();
118
+ }
119
+
120
+ /**
121
+ * Returns a name of control on a form (scope + _ + name)
122
+ *
123
+ * @since 1.0.0
124
+ * @return string|null A control name on a form.
125
+ */
126
+ public function getNameOnForm($name = null)
127
+ {
128
+ $scope = $this->getScope();
129
+ $name = !$name
130
+ ? $this->getName()
131
+ : $name;
132
+
133
+ if( is_array($name) ) {
134
+ $names = array();
135
+ foreach($name as $item) {
136
+ $names[] = empty($scope)
137
+ ? $item
138
+ : $scope . '_' . $item;
139
+ }
140
+
141
+ return $names;
142
+ }
143
+
144
+ if( empty($scope) ) {
145
+ return $name;
146
+ }
147
+ if( empty($name) ) {
148
+ return null;
149
+ }
150
+
151
+ return $scope . '_' . $name;
152
+ }
153
+
154
+ /**
155
+ * Prints a control name on a form.
156
+ *
157
+ * @since 1.0.0
158
+ * @return void
159
+ */
160
+ public function printNameOnForm()
161
+ {
162
+ $name = $this->getNameOnForm();
163
+ if( is_array($name) ) {
164
+ echo $name[0];
165
+ } else echo $name;
166
+ }
167
+
168
+ /**
169
+ * Returns a submit value of the control by a given name.
170
+ *
171
+ * @since 1.0.0
172
+ * @return mixed
173
+ */
174
+ public function getSubmitValue($name, $subName)
175
+ {
176
+ $nameOnForm = $this->getNameOnForm($name);
177
+ $value = isset($_POST[$nameOnForm])
178
+ ? $_POST[$nameOnForm]
179
+ : null;
180
+ if( is_array($value) ) {
181
+ $value = implode(',', $value);
182
+ }
183
+
184
+ return sanitize_text_field($value);
185
+ }
186
+
187
+ /**
188
+ * Returns an array of value to save received after submission of a form.
189
+ *
190
+ * @see getSubmitValue
191
+ *
192
+ * The array has the following format:
193
+ * array(
194
+ * 'control-name1' => 'value1',
195
+ * 'control-name2__sub-name1' => 'value2'
196
+ * 'control-name2__sub-name2' => 'value3'
197
+ * )
198
+ *
199
+ * @since 3.1.0
200
+ * @return mixed[]
201
+ */
202
+ public function getValuesToSave()
203
+ {
204
+ $name = $this->getName();
205
+
206
+ if( is_array($name) ) {
207
+ $i = 0;
208
+
209
+ foreach($name as $singleName) {
210
+ $subName = $this->getSubName($singleName);
211
+ if( !$subName ) {
212
+ $subName = $i;
213
+ $i++;
214
+ }
215
+ $values[$singleName] = $this->getSubmitValue($singleName, $subName);
216
+ }
217
+
218
+ return $values;
219
+ }
220
+
221
+ $values[$name] = $this->getSubmitValue($name, null);
222
+
223
+ return $values;
224
+ }
225
+
226
+ /**
227
+ * Returns an initial value of control that is used to render the control first time.
228
+ *
229
+ * @since 1.0.0
230
+ * @return mixed;
231
+ */
232
+ public function getValue($index = null, $multiple = false)
233
+ {
234
+ if( isset($this->options['value']) ) {
235
+ if( is_array($this->options['value']) ) {
236
+ if( $index !== null ) {
237
+ return $this->options['value'][$index];
238
+ } else return $this->options['value'];
239
+ } else {
240
+ return $this->options['value'];
241
+ }
242
+ }
243
+
244
+ $default = null;
245
+ if( isset($this->options['default']) ) {
246
+ if( is_array($this->options['default']) ) {
247
+ if( $index !== null ) {
248
+ $default = $this->options['default'][$index];
249
+ } else $default = $this->options['default'];
250
+ } else {
251
+ $default = $this->options['default'];
252
+ }
253
+ }
254
+
255
+ if( $this->provider ) {
256
+ $name = $this->getName();
257
+
258
+ if( is_array($name) ) {
259
+
260
+ $values = array();
261
+ $i = 0;
262
+
263
+ foreach($name as $singleName) {
264
+ $subName = $this->getSubName($singleName);
265
+ if( !$subName ) {
266
+ $subName = $i;
267
+ $i++;
268
+ }
269
+ $values[$subName] = $this->provider->getValue($singleName, isset($default[$subName])
270
+ ? $default[$subName]
271
+ : null);
272
+ }
273
+
274
+ if( $index !== null ) {
275
+ return $values[$index];
276
+ }
277
+
278
+ return $values;
279
+ } else {
280
+ return $this->provider->getValue($this->getName(), $default, $multiple);
281
+ }
282
+ }
283
+
284
+ return $default;
285
+ }
286
+
287
+ /**
288
+ * Shows the control.
289
+ *
290
+ * @since 1.0.0
291
+ * @return void
292
+ */
293
+ public function render()
294
+ {
295
+ $this->addCssClass('factory-from-control-' . $this->type);
296
+ $isActive = $this->provider->getValue($this->getOption('name') . '_is_active', $this->getOption('isActive', 1));
297
+
298
+ // if the control is off, then ignore it
299
+ $off = $this->getOption('off', false);
300
+ if( $off ) {
301
+ return;
302
+ }
303
+
304
+ ?>
305
+ <input type="hidden" class="factory-control-is-active" name="<?php echo $this->getOption('name') ?>_is_active" value="<?php echo $isActive ?>"/>
306
+ <?php
307
+
308
+ $this->beforeHtml();
309
+ $this->html();
310
+ $this->afterHtml();
311
+ }
312
+
313
+ /**
314
+ * A virtual method that is executed before rendering html markup of the control.
315
+ *
316
+ * @since 1.0.0
317
+ * @return void
318
+ */
319
+ protected function beforeHtml()
320
+ {
321
+ }
322
+
323
+ /**
324
+ * A virtual method that is executed after rendering html markup of the control.
325
+ *
326
+ * @since 1.0.0
327
+ * @return void
328
+ */
329
+ protected function afterHtml()
330
+ {
331
+ }
332
+
333
+ /**
334
+ * Renders the html markup for the control.
335
+ *
336
+ * @since 1.0.0
337
+ * @return void
338
+ */
339
+ public function html()
340
+ {
341
+ }
342
+
343
+ /**
344
+ * Returns a layout option.
345
+ *
346
+ * @since 1.0.0
347
+ * @param type $optionName A layout option to return.
348
+ * @param type $default A default value to return if the option doesn't exist.
349
+ * @return mixed
350
+ */
351
+ public function getLayoutOption($optionName, $default)
352
+ {
353
+ if( !isset($this->options['layout']) ) {
354
+ return $default;
355
+ }
356
+ if( !isset($this->options['layout'][$optionName]) ) {
357
+ return $default;
358
+ }
359
+
360
+ return $this->options['layout'][$optionName];
361
+ }
362
+
363
+ /**
364
+ * Splits the control name by '__' and return the right part.
365
+ *
366
+ * For example, if the $controlName is 'control__color', then returns 'color'.
367
+ * Throws an error if the control name cannot be splitted.
368
+ *
369
+ * @since 3.1.0
370
+ * @param string $controlName
371
+ * @return string
372
+ */
373
+ protected function getSubName($controlName)
374
+ {
375
+
376
+ $parts = explode('__', $controlName, 2);
377
+ if( !isset($parts[1]) ) {
378
+ return null;
379
+ }
380
+
381
+ return $parts[1];
382
+ }
383
+ }
libs/factory/forms/includes/custom-element.class.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the base class for all custom elements.
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
+ * The base class for all controls.
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ abstract class FactoryForms329_CustomElement extends FactoryForms329_FormElement {
18
+
19
+ /**
20
+ * Is this element a custom form element?
21
+ *
22
+ * @since 1.0.0
23
+ * @var bool
24
+ */
25
+ public $isCustom = true;
26
+
27
+ public function render() {
28
+
29
+ // if the control is off, then ignore it
30
+ $off = $this->getOption('off', false);
31
+ if ( $off ) return;
32
+
33
+ $this->html();
34
+ }
35
+ }
libs/factory/forms/includes/form-element.class.php ADDED
@@ -0,0 +1,405 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the base class for all form element (controls, holders).
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
+ * The base class for all form element (controls, holders).
14
+ *
15
+ * Provides several methods to build html markup of an element.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ abstract class FactoryForms329_FormElement {
20
+
21
+ /**
22
+ * A type of an elemnt.
23
+ *
24
+ * @since 1.0.0
25
+ * @var boolean
26
+ */
27
+ protected $type = null;
28
+
29
+ /**
30
+ * An html attribute builder.
31
+ *
32
+ * @since 1.0.0
33
+ * @var FactoryForms329_HtmlAttributeBuilder
34
+ */
35
+ private $htmlBuilder;
36
+
37
+ /**
38
+ * Element options.
39
+ *
40
+ * @since 1.0.0
41
+ * @var array
42
+ */
43
+ public $options = array();
44
+
45
+ /**
46
+ * A parent form.
47
+ *
48
+ * @since 1.0.0
49
+ * @var FactoryForms329_Form
50
+ */
51
+ protected $form;
52
+
53
+ /**
54
+ * A form layout.
55
+ *
56
+ * @since 1.0.0
57
+ * @var FactoryForms329_FormLayout
58
+ */
59
+ protected $layout;
60
+
61
+ /**
62
+ * Is this element a control?
63
+ *
64
+ * @since 1.0.0
65
+ * @var bool
66
+ */
67
+ public $isControl = false;
68
+
69
+ /**
70
+ * Is this element a control holder?
71
+ *
72
+ * @since 1.0.0
73
+ * @var bool
74
+ */
75
+ public $isHolder = false;
76
+
77
+ /**
78
+ * Is this element a custom form element?
79
+ *
80
+ * @since 1.0.0
81
+ * @var bool
82
+ */
83
+ public $isCustom = false;
84
+
85
+ /**
86
+ * Creates a new instance of a form element.
87
+ *
88
+ * @since 1.0.0
89
+ * @param mixed[] $options A holder options.
90
+ * @param FactoryForms329_Form $form A parent form.
91
+ */
92
+ public function __construct($options, $form)
93
+ {
94
+ $this->options = $options;
95
+ $this->form = $form;
96
+ $this->layout = $form->layout;
97
+
98
+ $this->htmlBuilder = new FactoryForms329_HtmlAttributeBuilder();
99
+
100
+ if( isset($this->options['cssClass']) ) {
101
+ $this->htmlBuilder->addCssClass($this->options['cssClass']);
102
+ }
103
+
104
+ if( isset($this->options['htmlData']) ) {
105
+ foreach($this->options['htmlData'] as $dataKey => $dataValue) {
106
+ $this->htmlBuilder->addHtmlData($dataKey, $dataValue);
107
+ }
108
+ }
109
+
110
+ if( isset($this->options['htmlAttrs']) ) {
111
+ foreach($this->options['htmlAttrs'] as $attrKey => $attrValue) {
112
+ $this->htmlBuilder->addHtmlAttr($attrKey, $attrValue);
113
+ }
114
+ }
115
+
116
+ $this->addCssClass('factory-' . $this->type);
117
+ }
118
+
119
+
120
+ /**
121
+ * Sets options for the control.
122
+ *
123
+ * @since 1.0.0
124
+ * @param mixed[] $options
125
+ * @return void
126
+ */
127
+ public function setOptions($options)
128
+ {
129
+ $this->options = $options;
130
+ }
131
+
132
+ /**
133
+ * Gets options of the control.
134
+ *
135
+ * @since 1.0.0
136
+ * @return mixed[] $options
137
+ */
138
+ public function getOptions()
139
+ {
140
+ return $this->options;
141
+ }
142
+
143
+ /**
144
+ * Sets a new value for a given option.
145
+ *
146
+ * @since 1.0.0
147
+ * @param type $name An option name to set.
148
+ * @param type $value A value to set.
149
+ * @return void
150
+ */
151
+ public function setOption($name, $value)
152
+ {
153
+ $this->options[$name] = $value;
154
+ }
155
+
156
+ /**
157
+ * Gets an option value or default.
158
+ *
159
+ * @since 1.0.0
160
+ * @param mixed $name An option name to get.
161
+ * @param mixed $default A default value/
162
+ * @return mixed
163
+ */
164
+ public function getOption($name, $default = null)
165
+ {
166
+ return isset($this->options[$name])
167
+ ? $this->options[$name]
168
+ : $default;
169
+ }
170
+
171
+ /**
172
+ * Prints an option value or default.
173
+ *
174
+ * @since 1.0.0
175
+ * @param mixed $name An option name to get.
176
+ * @param mixed $default A default value/
177
+ * @return void
178
+ */
179
+ public function option($name, $default = null)
180
+ {
181
+ $value = $this->getOption($name, $default);
182
+ echo $value;
183
+ }
184
+
185
+ /**
186
+ * Adds a new CSS class for the element.
187
+ *
188
+ * @since 1.0.0
189
+ * @return void
190
+ */
191
+ public function addCssClass($class)
192
+ {
193
+ $this->htmlBuilder->addCssClass($class);
194
+ }
195
+
196
+ /**
197
+ * Prints CSS classes of the element.
198
+ *
199
+ * @since 1.0.0
200
+ * @return void
201
+ */
202
+ protected function cssClass()
203
+ {
204
+ $this->htmlBuilder->printCssClass();
205
+ }
206
+
207
+ /**
208
+ * Adds a new html attribute.
209
+ *
210
+ * @since 1.0.0
211
+ * @param type $attrName
212
+ * @param type $attrValue
213
+ * @return void
214
+ */
215
+ protected function addHtmlData($dataKey, $dataValue)
216
+ {
217
+ return $this->htmlBuilder->addHtmlData($dataKey, $dataValue);
218
+ }
219
+
220
+ /**
221
+ * Adds a new html attribute.
222
+ *
223
+ * @since 1.0.0
224
+ * @param type $attrName
225
+ * @param type $attrValue
226
+ * @return void
227
+ */
228
+ protected function addHtmlAttr($attrName, $attrValue)
229
+ {
230
+ return $this->htmlBuilder->addHtmlAttr($attrName, $attrValue);
231
+ }
232
+
233
+ /**
234
+ * Prints all html attributes, including css classes and data.
235
+ *
236
+ * @since 1.0.0
237
+ * @return void
238
+ */
239
+ protected function attrs()
240
+ {
241
+ return $this->htmlBuilder->printAttrs();
242
+ }
243
+
244
+ /**
245
+ * Returns an element title.
246
+ *
247
+ * @since 1.0.0
248
+ * @return string
249
+ */
250
+ public function getTitle()
251
+ {
252
+ if( isset($this->options['title']) ) {
253
+ return $this->options['title'];
254
+ }
255
+
256
+ return false;
257
+ }
258
+
259
+ /**
260
+ * Returns true if an element has title.
261
+ *
262
+ * @since 1.0.0
263
+ * @return bool
264
+ */
265
+ public function hasTitle()
266
+ {
267
+ $title = $this->getTitle();
268
+
269
+ return !empty($title);
270
+ }
271
+
272
+ /**
273
+ * Prints an element title.
274
+ *
275
+ * @since 1.0.0
276
+ * @return void
277
+ */
278
+ public function title()
279
+ {
280
+ echo $this->getTitle();
281
+ }
282
+
283
+ /**
284
+ * Returns an element hint.
285
+ *
286
+ * @since 1.0.0
287
+ * @return string
288
+ */
289
+ public function getHint()
290
+ {
291
+ if( isset($this->options['hint']) ) {
292
+ return $this->options['hint'];
293
+ }
294
+
295
+ return false;
296
+ }
297
+
298
+ /**
299
+ * Returns true if an element has hint.
300
+ *
301
+ * @since 1.0.0
302
+ * @return bool
303
+ */
304
+ public function hasHint()
305
+ {
306
+ $hint = $this->getHint();
307
+
308
+ return !empty($hint);
309
+ }
310
+
311
+ /**
312
+ * Prints an element hint.
313
+ *
314
+ * @since 1.0.0
315
+ * @return void
316
+ */
317
+ public function hint($esc = false)
318
+ {
319
+ echo $esc
320
+ ? esc_html($this->getHint())
321
+ : $this->getHint();
322
+ }
323
+
324
+ /**
325
+ * Returns an element name.
326
+ *
327
+ * @since 1.0.0
328
+ * @return string
329
+ */
330
+ public function getName()
331
+ {
332
+
333
+ if( empty($this->options['name']) && !empty($this->options['title']) ) {
334
+ $this->options['name'] = str_replace(' ', '-', $this->options['title']);
335
+ $this->options['name'] = strtolower($this->options['name']);
336
+ }
337
+
338
+ if( !isset($this->options['name']) ) {
339
+ $this->options['name'] = $this->type . '-' . rand();
340
+ }
341
+
342
+ return $this->options['name'];
343
+ }
344
+
345
+ /**
346
+ * Prints an element name.
347
+ *
348
+ * @since 1.0.0
349
+ * @return void
350
+ */
351
+ public function name()
352
+ {
353
+ echo $this->getName();
354
+ }
355
+
356
+ /**
357
+ * Returns an element type.
358
+ *
359
+ * @since 1.0.0
360
+ * @return string
361
+ */
362
+ public function getType()
363
+ {
364
+ return $this->type;
365
+ }
366
+
367
+ /**
368
+ * Returns an element icon.
369
+ *
370
+ * @since 1.0.0
371
+ * @return string
372
+ */
373
+ public function getIcon()
374
+ {
375
+ if( isset($this->options['icon']) ) {
376
+ return $this->options['icon'];
377
+ }
378
+
379
+ return false;
380
+ }
381
+
382
+ /**
383
+ * Returns true if an element has a icon.
384
+ *
385
+ * @since 1.0.0
386
+ * @return bool
387
+ */
388
+ public function hasIcon()
389
+ {
390
+ $icon = $this->getIcon();
391
+
392
+ return !empty($icon);
393
+ }
394
+
395
+ /**
396
+ * Prints an element icon.
397
+ *
398
+ * @since 1.0.0
399
+ * @return void
400
+ */
401
+ public function icon()
402
+ {
403
+ echo $this->getIcon();
404
+ }
405
+ }
libs/factory/forms/includes/form-layout.class.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the base class for all form layouts.
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
+ * The base class for all form layouts.
14
+ */
15
+ abstract class FactoryForms329_FormLayout extends FactoryForms329_Holder {
16
+
17
+ /**
18
+ * A form layout name.
19
+ *
20
+ * @since 1.0.0
21
+ * @var string
22
+ */
23
+ protected $name = 'default';
24
+
25
+ /**
26
+ * A holder type.
27
+ *
28
+ * @since 1.0.0
29
+ * @var string
30
+ */
31
+ protected $type = 'form-layout';
32
+
33
+ /**
34
+ * Creates a new instance of a form layout.
35
+ *
36
+ * @since 1.0.0
37
+ * @param mixed[] $options A holder options.
38
+ * @param FactoryForms329_Form $form A parent form.
39
+ */
40
+ public function __construct($options, $form) {
41
+
42
+ $options['name'] = $this->name;
43
+ $options['items'] = $form->getItems();
44
+
45
+ parent::__construct($options, $form);
46
+
47
+ $this->addCssClass('factory-forms-329-' . $this->type);
48
+ $this->addCssClass('factory-forms-329-' . $this->name);
49
+ }
50
+
51
+ /**
52
+ * Renders a beginning of a form.
53
+ *
54
+ * @since 1.0.0
55
+ * @return void
56
+ */
57
+ public function beforeRendering() {
58
+ echo '<div '; $this->attrs(); echo '>';
59
+ }
60
+
61
+ /**
62
+ * Renders the end of a form.
63
+ *
64
+ * @since 1.0.0
65
+ * @return void
66
+ */
67
+ public function afterRendering() {
68
+ echo '</div>';
69
+ }
70
+
71
+ /**
72
+ * Rendering some html before a holder.
73
+ *
74
+ * @since 1.0.0
75
+ * @return void
76
+ */
77
+ public function beforeHolder( $element ) {}
78
+
79
+ /**
80
+ * Rendering some html after a holder.
81
+ *
82
+ * @since 1.0.0
83
+ * @return void
84
+ */
85
+ public function afterHolder( $element ) {}
86
+
87
+ /**
88
+ * Rendering some html before a contol.
89
+ *
90
+ * @since 1.0.0
91
+ * @return void
92
+ */
93
+ public function beforeControl( $element ) {}
94
+
95
+ /**
96
+ * Rendering some html after a contol.
97
+ *
98
+ * @since 1.0.0
99
+ * @return void
100
+ */
101
+ public function afterControl( $element ) {}
102
+ }
libs/factory/forms/includes/form.class.php ADDED
@@ -0,0 +1,686 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains a class that represnets an abstraction for forms.
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
+ // creating a license manager for each plugin created via the factory
13
+ add_action('factory_forms_329_plugin_created', 'factory_forms_329_plugin_created');
14
+ function factory_forms_329_plugin_created($plugin)
15
+ {
16
+ $plugin->forms = new FactoryForms329_Manager($plugin);
17
+ }
18
+
19
+ class FactoryForms329_Manager {
20
+
21
+ // ----------------------------------------------------
22
+ // Static fields and methods
23
+ // ----------------------------------------------------
24
+
25
+ /**
26
+ * This array contains data to use a respective control.
27
+ *
28
+ * @since 1.0.0
29
+ * @var array
30
+ */
31
+ public static $registeredControls = array();
32
+
33
+ /**
34
+ * Registers a new control.
35
+ *
36
+ * @since 1.0.0
37
+ * @param mixed[] $item Control data having the following format:
38
+ * type => a control type
39
+ * class => a control php class
40
+ * include => a path to include control code
41
+ * @return void
42
+ */
43
+ public function registerControl($item)
44
+ {
45
+ self::$registeredControls[$item['type']] = $item;
46
+ require_once $item['include'];
47
+ }
48
+
49
+ /**
50
+ * Registers a set of new controls.
51
+ *
52
+ * @see FactoryForms329_Form::registerControl()
53
+ *
54
+ * @since 1.0.0
55
+ * @return void
56
+ */
57
+ public function registerControls($data)
58
+ {
59
+ foreach($data as $item)
60
+ $this->registerControl($item);
61
+ }
62
+
63
+ /**
64
+ * This array contains holder data to use a respective control holder.
65
+ *
66
+ * @since 1.0.0
67
+ * @var array
68
+ */
69
+ public static $registeredHolders = array();
70
+
71
+ /**
72
+ * Registers a new holder.
73
+ *
74
+ * @since 1.0.0
75
+ * @param mixed[] $item Holder data having the follwoin format:
76
+ * type => a control holder type
77
+ * class => a control holder php class
78
+ * include => a path to include control holder code
79
+ * @return void
80
+ */
81
+ public function registerHolder($item)
82
+ {
83
+ self::$registeredHolders[$item['type']] = $item;
84
+ require_once $item['include'];
85
+ }
86
+
87
+ /**
88
+ * Registers a set of new holder controls.
89
+ *
90
+ * @see FactoryForms329_Form::registerHolder()
91
+ *
92
+ * @since 1.0.0
93
+ * @return void
94
+ */
95
+ public function registerHolders($data)
96
+ {
97
+ foreach($data as $item)
98
+ $this->registerHolder($item);
99
+ }
100
+
101
+ /**
102
+ * This array contains custom form element data to use a respective elements.
103
+ *
104
+ * @since 1.0.0
105
+ * @var array
106
+ */
107
+ public static $registeredCustomElements = array();
108
+
109
+ /**
110
+ * Registers a new custom form element.
111
+ *
112
+ * @since 1.0.0
113
+ * @return void
114
+ */
115
+ public function registerCustomElement($item)
116
+ {
117
+ self::$registeredCustomElements[$item['type']] = $item;
118
+ require_once $item['include'];
119
+ }
120
+
121
+ /**
122
+ * Registers a set of new custom form elements.
123
+ *
124
+ * @see FactoryForms329_Form::registerCustomElement()
125
+ *
126
+ * @since 1.0.0
127
+ * @return void
128
+ */
129
+ public function registerCustomElements($data)
130
+ {
131
+ foreach($data as $item)
132
+ $this->registerCustomElement($item);
133
+ }
134
+
135
+ /**
136
+ * Contains a set of layouts registered for forms.
137
+ *
138
+ * @since 1.0.0
139
+ * @var mixed[]
140
+ */
141
+ public static $formLayouts = array();
142
+
143
+ /**
144
+ * Registers a new layout for forms.
145
+ *
146
+ * @since 1.0.0
147
+ * @param type $data A layout data. Has the following format:
148
+ * name => a name of the layout
149
+ * class => a layout php class
150
+ * include => a path to include layout code
151
+ * @return void
152
+ */
153
+ public function registerFormLayout($data)
154
+ {
155
+ self::$formLayouts[$data['name']] = $data;
156
+ }
157
+
158
+ /**
159
+ * Extra propery that determines which UI is used in the admin panel.
160
+ *
161
+ * @since 1.0.0
162
+ * @var string
163
+ */
164
+ public static $temper;
165
+
166
+ /**
167
+ * A flat to register control only once.
168
+ *
169
+ * @since 3.0.7
170
+ * @var bool
171
+ */
172
+ public static $controlsRegistered = false;
173
+ }
174
+
175
+ /**
176
+ * An abstraction for forms.
177
+ */
178
+ class FactoryForms329_Form {
179
+
180
+ // ----------------------------------------------------
181
+ // Object fields and methods
182
+ // ----------------------------------------------------
183
+
184
+ /**
185
+ * A value provider of the form that is used to save and load values.
186
+ *
187
+ * @since 1.0.0
188
+ * @var IFactoryValueProvider
189
+ */
190
+ private $provider;
191
+
192
+ /**
193
+ * A prefix that will be used for names of input fields in the form.
194
+ *
195
+ * @since 1.0.0
196
+ * @var string
197
+ */
198
+ public $scope;
199
+
200
+ /**
201
+ * A form name that is used to call hooks and filter data.
202
+ *
203
+ * @since 1.0.0
204
+ * @var string
205
+ */
206
+ public $name = 'default';
207
+
208
+ /**
209
+ * It's not yet input controls. The array contains names of input controls and their
210
+ * options that are used to render and process input controls.
211
+ *
212
+ * @since 1.0.0
213
+ * @var mixed[]
214
+ */
215
+ protected $items = array();
216
+
217
+ /**
218
+ * Full set of input controls available after building the form.
219
+ *
220
+ * The array contains objects.
221
+ *
222
+ * @since 1.0.0
223
+ * @var mixed[]
224
+ */
225
+ private $controls = array();
226
+
227
+ /**
228
+ * A layout for the form.
229
+ *
230
+ * @since 1.0.0
231
+ * @var string
232
+ */
233
+ public $formLayout;
234
+
235
+ /**
236
+ * A current form layout used to render a form.
237
+ *
238
+ * @since 1.0.0
239
+ * @var FactoryForms329_FormLayout
240
+ */
241
+ public $layout;
242
+
243
+
244
+ /**
245
+ * Creates a new instance of a form.
246
+ *
247
+ * @since 1.0.0
248
+ * @param string $options Contains form options to setup.
249
+ */
250
+ public function __construct($options = array(), $plugin = null)
251
+ {
252
+ global $wp_version;
253
+
254
+ // register controls once, when the first form is created
255
+ if( !FactoryForms329_Manager::$controlsRegistered ) {
256
+ do_action('factory_forms_329_register_controls', $plugin);
257
+ do_action('factory_forms_register_controls', $plugin);
258
+ if( !empty($plugin) )
259
+ do_action('factory_forms_register_controls_' . $plugin->pluginName, $plugin);
260
+ FactoryForms329_Manager::$controlsRegistered = true;
261
+ }
262
+
263
+ //$isFlat = version_compare( $wp_version, '3.8', '>=' );
264
+ $isFlat = true;
265
+
266
+ $this->scope = isset($options['scope'])
267
+ ? $options['scope']
268
+ : null;
269
+ $this->name = isset($options['name'])
270
+ ? $options['name']
271
+ : $this->name;
272
+
273
+ if( isset($options['formLayout']) ) {
274
+ $this->formLayout = $options['formLayout'];
275
+ } else {
276
+ $this->formLayout = 'bootstrap-3';
277
+ }
278
+
279
+ if( !FactoryForms329_Manager::$temper )
280
+ FactoryForms329_Manager::$temper = $isFlat
281
+ ? 'flat'
282
+ : 'volumetric';
283
+ }
284
+
285
+ /**
286
+ * Sets a provider for the control.
287
+ *
288
+ * @since 1.0.0
289
+ * @param IFactoryForms329_ValueProvider $provider
290
+ * @return void
291
+ */
292
+ public function setProvider($provider)
293
+ {
294
+ $this->provider = $provider;
295
+ }
296
+
297
+ /**
298
+ * Adds items into the form.
299
+ *
300
+ * It's base method to use during configuration form.
301
+ *
302
+ * @since 1.0.0
303
+ * @param array $array An array of items.
304
+ */
305
+ public function add($array)
306
+ {
307
+
308
+ if( (bool)count(array_filter(array_keys($array), 'is_string')) ) {
309
+ $this->items[] = $array;
310
+ } else {
311
+ $this->items = array_merge($this->items, $array);
312
+ }
313
+ }
314
+
315
+ /**
316
+ * Returns items to render.
317
+ *
318
+ * Has the follwoing hooks:
319
+ * 'factory_form_items' ( $formName, $items ) to filter form controls before building.
320
+ *
321
+ * @since 1.0.0
322
+ * @return mixed[] Items to render.
323
+ */
324
+ public function getItems()
325
+ {
326
+ return apply_filters('factory_form_items', $this->items, $this->name);
327
+ }
328
+
329
+ /**
330
+ * Returns form controls (control objects).
331
+ *
332
+ * @since 1.0.0
333
+ * @return mixed[]
334
+ */
335
+ public function getControls()
336
+ {
337
+ if( !empty($this->controls) )
338
+ return $this->controls;
339
+ $this->createControls();
340
+
341
+ return $this->controls;
342
+ }
343
+
344
+ /**
345
+ * Builds a form items to the control objects ready to use.
346
+ *
347
+ * @since 1.0.0
348
+ * @return void
349
+ */
350
+ public function createControls($holder = null)
351
+ {
352
+ $items = ($holder == null)
353
+ ? $this->getItems()
354
+ : $holder['items'];
355
+
356
+ foreach($items as $item) {
357
+
358
+ if( $this->isControlHolder($item) && $this->isControl($item) ) {
359
+
360
+ $this->controls[] = $this->createControl($item);
361
+ $this->createControls($item);
362
+ // if a current item is a control holder
363
+ } elseif( $this->isControlHolder($item) ) {
364
+
365
+ $this->createControls($item);
366
+ // if a current item is an input control
367
+ } elseif( $this->isControl($item) ) {
368
+
369
+ $this->controls[] = $this->createControl($item);
370
+ // if a current item is an input control
371
+ } elseif( $this->isCustomElement($item) ) {
372
+
373
+ // nothing
374
+
375
+ // otherwise, show the error
376
+ } else {
377
+ print_r($item);
378
+ die('[ERROR] Invalid item.');
379
+ }
380
+ }
381
+
382
+ return $this->controls;
383
+ }
384
+
385
+ /**
386
+ * Create an element.
387
+ *
388
+ * @since 1.0.0
389
+ * @param type $item Item data.
390
+ * @return FactoryFrom_FormElement|null A form element.
391
+ */
392
+ public function createElement($item)
393
+ {
394
+
395
+ if( $this->isControl($item) ) {
396
+ return $this->createControl($item);
397
+ } elseif( $this->isControlHolder($item) ) {
398
+ return $this->createHolder($item);
399
+ } elseif( $this->isCustomElement($item) ) {
400
+ return $this->createCustomElement($item);
401
+ } else {
402
+ printf('[ERROR] The element with the type <strong>%s</strong> was not found.', $item['type']);
403
+ exit;
404
+ }
405
+ }
406
+
407
+ /**
408
+ * Creates a set of elements.
409
+ *
410
+ * @since 1.0.0
411
+ * @param mixed[] $item Data of items.
412
+ * @return FactoryFrom_FormElement[] Created elements.
413
+ */
414
+ public function createElements($items = array())
415
+ {
416
+ $objects = array();
417
+ foreach($items as $item)
418
+ $objects[] = $this->createElement($item);
419
+
420
+ return $objects;
421
+ }
422
+
423
+ /**
424
+ * Create a control.
425
+ *
426
+ * @since 1.0.0
427
+ * @param type $item Item data.
428
+ * @return FactoryFrom_Control A control object.
429
+ */
430
+ public function createControl($item)
431
+ {
432
+ $object = null;
433
+
434
+ if( is_array($item) ) {
435
+
436
+ $controlData = FactoryForms329_Manager::$registeredControls[$item['type']];
437
+
438
+ require_once($controlData['include']);
439
+
440
+ $options = $item;
441
+ $options['scope'] = $this->scope;
442
+
443
+ $object = new $controlData['class']($options, $this);
444
+ } elseif( gettype($item) == 'object' ) {
445
+ $object = $item;
446
+ } else {
447
+ print_r($item);
448
+ die('[ERROR] Invalid input control.');
449
+ }
450
+
451
+ $object->setProvider($this->provider);
452
+
453
+ return $object;
454
+ }
455
+
456
+ /**
457
+ * Create a control holder.
458
+ *
459
+ * @since 1.0.0
460
+ * @param type $item Item data.
461
+ * @return FactoryForms329_Holder A control holder object.
462
+ */
463
+ public function createHolder($item)
464
+ {
465
+ $object = null;
466
+
467
+ if( is_array($item) ) {
468
+
469
+ $holderData = FactoryForms329_Manager::$registeredHolders[$item['type']];
470
+ require_once($holderData['include']);
471
+
472
+ $object = new $holderData['class']($item, $this);
473
+ } elseif( gettype($item) == 'object' ) {
474
+ $object = $item;
475
+ } else {
476
+ print_r($item);
477
+ die('[ERROR] Invalid control holder.');
478
+ }
479
+
480
+ return $object;
481
+ }
482
+
483
+ /**
484
+ * Create a custom form element.
485
+ *
486
+ * @since 1.0.0
487
+ * @param type $item Item data.
488
+ * @return FactoryForms329_FormElement A custom form element object.
489
+ */
490
+ public function createCustomElement($item)
491
+ {
492
+ $object = null;
493
+
494
+ if( is_array($item) ) {
495
+
496
+ $data = FactoryForms329_Manager::$registeredCustomElements[$item['type']];
497
+ require_once($data['include']);
498
+
499
+ $options = $item;
500
+ $object = new $data['class']($options, $this);
501
+ } elseif( gettype($item) == 'object' ) {
502
+ $object = $item;
503
+ } else {
504
+ print_r($item);
505
+ die('[ERROR] Invalid custom form element.');
506
+ }
507
+
508
+ return $object;
509
+ }
510
+
511
+ /**
512
+ * Renders a form.
513
+ *
514
+ * @since 1.0.0
515
+ * @param mixed[] $options Options for a form layout.
516
+ * @return void
517
+ */
518
+ public function html($options = array())
519
+ {
520
+
521
+ if( !isset(FactoryForms329_Manager::$formLayouts[$this->formLayout]) ) {
522
+ die(sprintf('[ERROR] The form layout %s was not found.', $this->formLayout));
523
+ }
524
+
525
+ // include a render code
526
+ $layoutData = FactoryForms329_Manager::$formLayouts[$this->formLayout];
527
+ require_once($layoutData['include']);
528
+
529
+ $this->connectAssets();
530
+
531
+ if( $this->provider )
532
+ $this->provider->init();
533
+ $layout = new $layoutData['class']($options, $this);
534
+ $this->layout = $layout;
535
+ $this->layout->render();
536
+ }
537
+
538
+ /**
539
+ * Connects assets (css and js).
540
+ *
541
+ * @since 1.0.0
542
+ * @param mixed[] $options Options for a form layout.
543
+ * @return void
544
+ */
545
+ private function connectAssets()
546
+ {
547
+
548
+ $this->connectAssetsForItems();
549
+ $layoutData = FactoryForms329_Manager::$formLayouts[$this->formLayout];
550
+
551
+ if( $layoutData['name'] == 'default' ) {
552
+ if( isset($layoutData['style']) ) {
553
+ wp_enqueue_style('factory-form-000-default-layout', $layoutData['style']);
554
+ }
555
+ if( isset($layoutData['script']) ) {
556
+ wp_enqueue_script('factory-form-000-default-layout-', $layoutData['script']);
557
+ }
558
+ } else {
559
+ if( isset($layoutData['style']) ) {
560
+ wp_enqueue_style('factory-form-layout-' . $layoutData['name'], $layoutData['style']);
561
+ }
562
+ if( isset($layoutData['script']) ) {
563
+ wp_enqueue_script('factory-form-layout-' . $layoutData['name'], $layoutData['script']);
564
+ }
565
+ }
566
+ }
567
+
568
+
569
+ /**
570
+ * Connects scripts and styles of form items.
571
+ *
572
+ * @since 1.0.0
573
+ * @param mixed[] $items Items for which it's nessesary to connect scripts and styles.
574
+ * @return void
575
+ */
576
+ public static function connectAssetsForItems($items = array())
577
+ {
578
+ foreach($items as $item)
579
+ self::connectAssetsForItem($item);
580
+ }
581
+
582
+ /**
583
+ * Connects scripts and styles of form item.
584
+ *
585
+ * @since 1.0.0
586
+ * @param mixed[] $item Item for which it's nessesary to connect scripts and styles.
587
+ * @return void
588
+ */
589
+ public static function connectAssetsForItem($item)
590
+ {
591
+ if( !is_array($item) )
592
+ return;
593
+
594
+ $type = $item['type'];
595
+
596
+ $haystack = array();
597
+ if( self::isControl($type) ) {
598
+ $haystack = FactoryForms329_Manager::$registerControls;
599
+ } elseif( self::isControlHolder($type) )
600
+ $haystack = FactoryForms329_Manager::$registeredHolders;
601
+
602
+ if( isset($haystack[$type]) ) {
603
+ if( isset($haystack[$type]['style']) ) {
604
+ $style = $haystack[$type]['style'];
605
+ if( !wp_style_is($style) ) {
606
+ wp_enqueue_style('factory-form-control-' . $type, $style);
607
+ }
608
+ }
609
+ if( isset($haystack[$type]['script']) ) {
610
+ $script = $haystack[$type]['script'];
611
+ if( !wp_script_is($script) ) {
612
+ wp_enqueue_script('factory-form-control-' . $type, $script, array('jquery'));
613
+ }
614
+ }
615
+ }
616
+
617
+ if( isset($item['items']) ) {
618
+ self::connectAssetsForItem($item['items']);
619
+ }
620
+ }
621
+
622
+ /**
623
+ * Saves form data by using a specified value provider.
624
+ *
625
+ * @since 1.0.0
626
+ * @return mixed
627
+ */
628
+ public function save()
629
+ {
630
+ if( !$this->provider )
631
+ return null;
632
+
633
+ $controls = $this->getControls();
634
+ foreach($controls as $control) {
635
+
636
+ $values = $control->getValuesToSave();
637
+ foreach($values as $keyToSave => $valueToSave) {
638
+ $this->provider->setValue($keyToSave, $valueToSave);
639
+ }
640
+
641
+ $nameOption = $control->getOption('name') . '_is_active';
642
+ $isActive = (isset($_POST[$nameOption]) && intval($_POST[$nameOption]) == 0)
643
+ ? 0
644
+ : 1;
645
+ $this->provider->setValue($nameOption, $isActive);
646
+ }
647
+
648
+ return $this->provider->saveChanges();
649
+ }
650
+
651
+ /**
652
+ * Returns true if a given item is an input control item.
653
+ *
654
+ * @since 1.0.0
655
+ * @param mixed[] $item
656
+ * @return bool
657
+ */
658
+ public static function isControl($item)
659
+ {
660
+ return isset(FactoryForms329_Manager::$registeredControls[$item['type']]);
661
+ }
662
+
663
+ /**
664
+ * Returns true if a given item is an control holder item.
665
+ *
666
+ * @since 1.0.0
667
+ * @param mixed[] $item
668
+ * @return bool
669
+ */
670
+ public static function isControlHolder($item)
671
+ {
672
+ return isset(FactoryForms329_Manager::$registeredHolders[$item['type']]);
673
+ }
674
+
675
+ /**
676
+ * Returns true if a given item is html markup.
677
+ *
678
+ * @since 1.0.0
679
+ * @param mixed[] $item
680
+ * @return bool
681
+ */
682
+ public static function isCustomElement($item)
683
+ {
684
+ return isset(FactoryForms329_Manager::$registeredCustomElements[$item['type']]);
685
+ }
686
+ }
libs/factory/forms/includes/holder.class.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the base class for all control holder
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
+ * The base class for control holders.
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ abstract class FactoryForms329_Holder extends FactoryForms329_FormElement {
18
+
19
+ /**
20
+ * Holder Elements.
21
+ *
22
+ * @since 1.0.0
23
+ * @var FactoryForms329_FormElement[]
24
+ */
25
+ protected $elements = array();
26
+
27
+ /**
28
+ * Is this element a control holder?
29
+ *
30
+ * @since 1.0.0
31
+ * @var bool
32
+ */
33
+ public $isHolder = true;
34
+
35
+ /**
36
+ * Creates a new instance of control holder.
37
+ *
38
+ * @since 1.0.0
39
+ * @param mixed[] $options A holder options.
40
+ * @param FactoryForms329_Form $form A parent form.
41
+ */
42
+ public function __construct($options, $form) {
43
+ parent::__construct($options, $form);
44
+ $this->elements = $form->createElements( $options['items'] );
45
+ }
46
+
47
+ /**
48
+ * Returns holder elements.
49
+ *
50
+ * @since 1.0.0
51
+ * @return FactoryForms329_FormElement[].
52
+ */
53
+ public function getElements() {
54
+ return $this->elements;
55
+ }
56
+
57
+ /**
58
+ * Renders the form or a given control holder.
59
+ *
60
+ * @since 1.0.0
61
+ * @param $holder A control holder to render.
62
+ * @return void
63
+ */
64
+ function render() {
65
+
66
+ $this->beforeRendering();
67
+
68
+ $isFirstItem = true;
69
+
70
+ foreach( $this->elements as $element ) {
71
+ $element->setOption('isFirst', $isFirstItem);
72
+ if ( $isFirstItem ) $isFirstItem = false;
73
+
74
+ do_action('factory_form_before_element_' . $element->getOption('name') );
75
+
76
+ // if a current item is a control holder
77
+ if ( $element->isHolder ) {
78
+
79
+ $this->form->layout->beforeHolder( $element );
80
+ $element->render();
81
+ $this->form->layout->afterHolder( $element );
82
+
83
+ // if a current item is an input control
84
+ } elseif ( $element->isControl ) {
85
+
86
+ $this->form->layout->beforeControl( $element );
87
+ $element->render();
88
+ $this->form->layout->afterControl( $element );
89
+
90
+ // if a current item is a custom form element
91
+ } elseif ( $element->isCustom ) {
92
+
93
+ $element->render();
94
+
95
+ // otherwise, show the error
96
+ } else {
97
+ print_r($element);
98
+ echo( '[ERROR] Invalid item.' );
99
+ }
100
+
101
+ do_action('factory_form_after_element_' . $element->getOption('name') );
102
+ }
103
+
104
+ $this->afterRendering();
105
+ }
106
+
107
+ /**
108
+ * Rendering a beginning of a holder.
109
+ *
110
+ * @since 1.0.0
111
+ * @return void
112
+ */
113
+ protected function beforeRendering(){}
114
+
115
+ /**
116
+ * Rendering an end of a holder.
117
+ *
118
+ * @since 1.0.0
119
+ * @return void
120
+ */
121
+ protected function afterRendering(){}
122
+
123
+ /**
124
+ * Rendering some html before an inner holder.
125
+ *
126
+ * @since 1.0.0
127
+ * @return void
128
+ */
129
+ protected function beforeInnerHolder(){}
130
+
131
+ /**
132
+ * Rendering some html after an inner holder.
133
+ *
134
+ * @since 1.0.0
135
+ * @return void
136
+ */
137
+ protected function afterInnerHolder(){}
138
+
139
+
140
+ protected function beforeInnerElement(){}
141
+
142
+ /**
143
+ * Rendering some html after an inner element.
144
+ *
145
+ * @since 1.0.0
146
+ * @return void
147
+ */
148
+ protected function afterInnerElement(){}
149
+ }
libs/factory/forms/includes/html-builder.class.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains Html Attribute Builder.
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
+ * Html Attribute Builder
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class FactoryForms329_HtmlAttributeBuilder {
18
+
19
+ /**
20
+ * An array to store css classes.
21
+ *
22
+ * @since 1.0.0
23
+ * @var string[]
24
+ */
25
+ protected $cssClasses = array();
26
+
27
+ /**
28
+ * An array to store html attributes.
29
+ *
30
+ * @since 1.0.0
31
+ * @var string[]
32
+ */
33
+ protected $htmlAttrs = array();
34
+
35
+ /**
36
+ * An array to store html data.
37
+ *
38
+ * @since 1.0.0
39
+ * @var string[]
40
+ */
41
+ protected $htmlData = array();
42
+
43
+ /**
44
+ * Adds a new CSS class.
45
+ *
46
+ * @since 1.0.0
47
+ * @return void
48
+ */
49
+ public function addCssClass( $class ) {
50
+ if (!is_array($class)) {
51
+ $this->cssClasses[] = $class;
52
+ } else {
53
+ $this->cssClasses = array_merge( $this->cssClasses, $class );
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Prints CSS classes.
59
+ *
60
+ * @since 1.0.0
61
+ * @return void
62
+ */
63
+ public function printCssClass() {
64
+ echo implode(' ', $this->cssClasses);
65
+ }
66
+
67
+ /**
68
+ * Adds a new html data item.
69
+ *
70
+ * @since 1.0.0
71
+ * @param string $dataKey
72
+ * @param string $dataValue
73
+ * @return void
74
+ */
75
+ public function addHtmlData( $dataKey, $dataValue ) {
76
+ $this->htmlData[$dataKey] = $dataValue;
77
+ }
78
+
79
+ /**
80
+ * Prints html data items.
81
+ *
82
+ * @since 1.0.0
83
+ * @return void
84
+ */
85
+ public function printHtmlData() {
86
+ foreach($this->htmlData as $key => $value) {
87
+ echo 'data-' . $key . '="' . $value . '" ';
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Adds a new html attribute.
93
+ *
94
+ * @since 1.0.0
95
+ * @param type $attrName
96
+ * @param type $attrValue
97
+ * @return void
98
+ */
99
+ public function addHtmlAttr( $attrName, $attrValue ) {
100
+ $this->htmlAttrs[$attrName] = $attrValue;
101
+ }
102
+
103
+ /**
104
+ * Prints all html attributes, including css classes and data.
105
+ *
106
+ * @since 1.0.0
107
+ * @return void
108
+ */
109
+ public function printAttrs() {
110
+ $attrs = $this->htmlAttrs;
111
+
112
+ if ( !empty($this->cssClasses) ) $attrs['class'] = implode(' ', $this->cssClasses);
113
+
114
+ foreach( $this->htmlData as $dataKey => $dataValue) {
115
+ $attrs['data-'.$dataKey] = $dataValue;
116
+ }
117
+
118
+ foreach($attrs as $key => $value) {
119
+ echo $key . '="' . $value . '" ';
120
+ }
121
+ }
122
+ }
libs/factory/forms/includes/providers/meta-value-provider.class.php ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Factory Meta Value Provider.
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
+ * Factory Meta Value Provider
14
+ *
15
+ * This provide works with meta values like a lazy key-value storage and
16
+ * provides methods to commit changes on demand. It increases perfomance on form saving.
17
+ *
18
+ * @since 1.0.0
19
+ */
20
+ class FactoryForms329_MetaValueProvider implements IFactoryForms329_ValueProvider
21
+ {
22
+ /**
23
+ * Values to save $metaName => $metaValue
24
+ * @var array
25
+ */
26
+ private $values = array();
27
+
28
+ /**
29
+ * Chanched meta keys (indexed array)
30
+ * @var array
31
+ */
32
+ private $keys = array();
33
+
34
+ private $meta = array();
35
+ public $scope;
36
+
37
+ /**
38
+ * Creates a new instance of a meta value provider.
39
+ *
40
+ * @global type $post
41
+ * @param type $options
42
+ */
43
+ public function __construct( $options = array() ) {
44
+ global $post;
45
+
46
+ $this->scope = ( isset( $options['scope'] ) ) ? $options['scope'] : null;
47
+ $this->scope = preg_replace('/\_meta\_box$/', '', $this->formatCamelCase( $this->scope ) );
48
+
49
+ $this->postId = ( isset( $options['postId'] ) ) ? $options['postId'] : $post->ID;
50
+
51
+ // the second parameter for compatibility with wordpress 3.0
52
+ $temp = get_post_meta( $this->postId, '' );
53
+
54
+ foreach($temp as $key => &$content) {
55
+ if ( strpos( $key, $this->scope ) === 0 ) {
56
+ $this->meta[$key] = $content;
57
+ }
58
+ }
59
+ }
60
+
61
+ /**
62
+ * Initizalize an instance of the provider.
63
+ * This method should be invoked before the provider usage.
64
+ *
65
+ * @param type $scope Scope is prefix that is added to all meta keys.
66
+ * @param type $postId Post id we will use meta data or empty for current post.
67
+ */
68
+ public function init( $postId = false ) {
69
+ global $post;
70
+
71
+ $this->postId = $postId ? $postId : $post->ID;
72
+
73
+ // the second parameter for compatibility with wordpress 3.0
74
+ $temp = get_post_meta( $this->postId, '' );
75
+ foreach($temp as $key => &$content) {
76
+ if ( strpos( $key, $this->scope ) === 0 ) {
77
+ $this->meta[$key] = $content;
78
+ }
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Saves changes into a database.
84
+ * The method is optimized for bulk updates.
85
+ */
86
+ public function saveChanges() {
87
+
88
+
89
+ $this->deleteValues();
90
+ $this->insertValues();
91
+
92
+ /**
93
+ foreach ($this->values as $key => $value) {
94
+ update_post_meta($this->postId, $key, $value);
95
+ }
96
+ */
97
+ }
98
+
99
+ /**
100
+ * Removes all actual values from a database.
101
+ */
102
+ private function deleteValues() {
103
+ if ( count( $this->keys ) == 0 ) return;
104
+
105
+ global $wpdb;
106
+
107
+ $keys = array();
108
+ for($i = 0; $i < count($this->keys); $i++) {
109
+ $keys[] = '\'' . $this->keys[$i] . '\'';
110
+ }
111
+
112
+ $clause = implode( ',', $keys );
113
+ $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id={$this->postId} AND meta_key IN ($clause)");
114
+ }
115
+
116
+ /**
117
+ * Inserts new values by using bulk insert directly into a database.
118
+ */
119
+ private function insertValues() {
120
+ global $wpdb;
121
+
122
+ $sql = "INSERT INTO {$wpdb->postmeta} (post_id, meta_key, meta_value) VALUES ";
123
+ $rows = array();
124
+
125
+ foreach($this->values as $metaKey=>$metaValue) {
126
+ if ( is_array( $metaValue ) ) {
127
+ foreach( $metaValue as $value ) {
128
+ $rows[] = $wpdb->prepare( '(%d,%s,%s)' , $this->postId, $metaKey, $value );
129
+ }
130
+ } else {
131
+ $rows[] = $wpdb->prepare( '(%d,%s,%s)' , $this->postId, $metaKey, $metaValue );
132
+ }
133
+ }
134
+
135
+ if( empty($rows) ) {
136
+ return;
137
+ }
138
+
139
+ $sql = $sql . implode( ',', $rows );
140
+ $wpdb->query($sql);
141
+ }
142
+
143
+ public function getValue($name, $default = null, $multiple = false ) {
144
+
145
+ if ( is_array( $name ) ) {
146
+
147
+ $values = array();
148
+ $index = 0;
149
+
150
+ foreach($name as $item) {
151
+ $itemDefault = ( $default && is_array($default) && isset($default[$index]) )
152
+ ? $default[$index] : null;
153
+
154
+ $values[] = $this->getValueBySingleName($item, $itemDefault, $multiple);
155
+ $index++;
156
+ }
157
+ return $values;
158
+ }
159
+
160
+ $value = $this->getValueBySingleName($name, $default, $multiple);
161
+ return $value;
162
+ }
163
+
164
+ protected function getValueBySingleName( $singleName, $default = null, $multiple = false ) {
165
+
166
+ $value = isset( $this->meta[$this->scope . '_' . $singleName] )
167
+ ? ( $multiple ) ? $this->meta[$this->scope . '_' . $singleName] : $this->meta[$this->scope . '_' . $singleName][0]
168
+ : $default;
169
+
170
+ if ($value === 'true') $value = 1;
171
+ if ($value === 'false') $value = 0;
172
+
173
+ return $value;
174
+ }
175
+
176
+ public function setValue($name, $value) {
177
+
178
+ if ( is_array( $name ) ) {
179
+ $index = 0;
180
+
181
+ foreach($name as $item) {
182
+ $itemValue = ( $value && is_array($value) && isset($value[$index]) )
183
+ ? $value[$index] : null;
184
+
185
+ $this->setValueBySingleName($item, $itemValue);
186
+ $index++;
187
+ }
188
+
189
+ return;
190
+ }
191
+
192
+ $this->setValueBySingleName($name, $value);
193
+ return;
194
+ }
195
+
196
+ protected function setValueBySingleName( $singleName, $singeValue ) {
197
+ $name = $this->scope . '_' . $singleName;
198
+
199
+ if ( is_array( $singeValue ) ) {
200
+
201
+ foreach ($singeValue as $index => $value) {
202
+
203
+ $singeValue[$index] = empty( $singeValue[$index] )
204
+ ? $singeValue[$index]
205
+ : stripslashes ( $singeValue[$index] );
206
+ }
207
+
208
+ $value = $singeValue;
209
+ } else {
210
+ $value = empty( $singeValue ) ? $singeValue : stripslashes ( $singeValue );
211
+ }
212
+
213
+ $this->values[$name] = $value;
214
+ $this->keys[] = $name;
215
+ }
216
+
217
+ private function formatCamelCase( $string ) {
218
+ $output = "";
219
+ foreach( str_split( $string ) as $char ) {
220
+ if ( strtoupper( $char ) == $char && !in_array($char, array('_', '-'))) {
221
+ $output .= "_";
222
+ }
223
+ $output .= $char;
224
+ }
225
+ $output = strtolower($output);
226
+ return $output;
227
+ }
228
+ }
libs/factory/forms/includes/providers/options-value-provider.class.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains the class of Factory Option Value Provider.
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
+ * Factory Options Value Provider
14
+ *
15
+ * This provide stores form values in the wordpress options.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ class FactoryForms329_OptionsValueProvider implements IFactoryForms329_ValueProvider
20
+ {
21
+ /**
22
+ * Values to save $optionName => $optionValue
23
+ *
24
+ * @since 1.0.0
25
+ * @var mixed[]
26
+ */
27
+ private $values = array();
28
+
29
+ /**
30
+ * A prefix that will be added to all option names.
31
+ *
32
+ * @since 1.0.0
33
+ * @var string
34
+ */
35
+ public $scope;
36
+
37
+ /**
38
+ * Creates a new instance of an options value provider.
39
+ */
40
+ public function __construct( $options = array() ) {
41
+ $this->scope = ( isset( $options['scope'] ) ) ? $options['scope'] : null;
42
+ }
43
+
44
+ /**
45
+ * @since 1.0.0
46
+ */
47
+ public function init() {
48
+ // nothing to do
49
+ }
50
+
51
+ /**
52
+ * @since 1.0.0
53
+ */
54
+ public function saveChanges() {
55
+ // nothing to do
56
+ }
57
+
58
+ public function getValue($name, $default = null, $multiple = false ) {
59
+ $name = ( !empty( $this->scope ) ) ? $this->scope . '_' . $name : $name;
60
+ $value = get_option($name, $default);
61
+
62
+ if ($value === 'true') $value = 1;
63
+ if ($value === 'false') $value = 0;
64
+
65
+ return $value;
66
+ }
67
+
68
+ public function setValue($name, $value) {
69
+ $name = ( !empty( $this->scope ) ) ? $this->scope . '_' . $name : $name;
70
+ $value = empty( $value ) ? $value : stripslashes ( $value );
71
+ update_option($name, $value);
72
+ }
73
+ }
libs/factory/forms/includes/providers/value-provider.interface.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains an interface for all value provides.
4
+ *
5
+ * A value provider is a provide to get and save values to some stores (database, metadata and so on).
6
+ *
7
+ * @author Paul Kashtanoff <paul@byonepress.com>
8
+ * @copyright (c) 2013, OnePress Ltd
9
+ *
10
+ * @package factory-forms
11
+ * @since 1.0.0
12
+ */
13
+
14
+ /**
15
+ * The interface for all value provides.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ interface IFactoryForms329_ValueProvider {
20
+
21
+ /**
22
+ * Inits a form a provider to get data from a storage.
23
+ *
24
+ * @since 1.0.0
25
+ * @return void
26
+ */
27
+ public function init();
28
+
29
+ /**
30
+ * Commits all changes.
31
+ *
32
+ * @since 1.0.0
33
+ * @return void
34
+ */
35
+ public function saveChanges();
36
+
37
+ /**
38
+ * Gets a value by its name.
39
+ *
40
+ * @since 1.0.0
41
+ * @param string $name A value name to get.
42
+ * @param mixed $default A default to return if a given name doesn't exist.
43
+ * @return mixed
44
+ */
45
+ public function getValue( $name, $default = null, $multiple = false );
46
+
47
+ /**
48
+ * Sets a value by its name.
49
+ *
50
+ * @since 1.0.0
51
+ * @param seting $name A value name to set.
52
+ * @param mixed $value A value to set.
53
+ * @return void
54
+ */
55
+ public function setValue( $name, $value );
56
+ }
libs/factory/forms/langs/factory_forms_329-fr-FR.mo ADDED
Binary file
libs/factory/forms/langs/factory_forms_329-fr-FR.po ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: factory_forms\n"
4
+ "POT-Creation-Date: 2017-11-09 10:37+0300\n"
5
+ "PO-Revision-Date: 2017-11-09 18:37+0300\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
8
+ "Language: fr\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
+
20
+ #: controls/checkbox.php:125
21
+ msgid "On"
22
+ msgstr "On"
23
+
24
+ #: controls/checkbox.php:128
25
+ msgid "Off"
26
+ msgstr "Off"
27
+
28
+ #: controls/dropdown.php:126 controls/list.php:89 controls/list.php:127
29
+ msgid "The list is empty."
30
+ msgstr "La liste est vide."
31
+
32
+ #: controls/dropdown.php:258 controls/dropdown.php:330
33
+ msgid "- empty -"
34
+ msgstr "- vide -"
35
+
36
+ #: controls/font.php:73 controls/google-font.php:41
37
+ msgid "(use default website font)"
38
+ msgstr "(utiliser la police de site par défaut)"
39
+
40
+ #: controls/font.php:76
41
+ msgid "Sans Serif:"
42
+ msgstr "Sans Serif:"
43
+
44
+ #: controls/font.php:127
45
+ msgid "Serif:"
46
+ msgstr "Serif:"
47
+
48
+ #: controls/font.php:177
49
+ msgid "Monospaced:"
50
+ msgstr "Monospaced:"
51
+
52
+ #: controls/google-font.php:44
53
+ msgid "Standard:"
54
+ msgstr "Standard:"
55
+
56
+ #: controls/google-font.php:53
57
+ msgid "Google Fonts:"
58
+ msgstr "Google Fonts:"
59
+
60
+ #: controls/google-font.php:94
61
+ msgid "Unable to retrieve the list of Google Fonts."
62
+ msgstr "Impossible de récupérer la liste des polices Google."
63
+
64
+ #: controls/google-font.php:101
65
+ msgid "Invalide response from the Google Fonts API."
66
+ msgstr "Réponse invalidée de l'API Google Fonts."
67
+
68
+ #: controls/google-font.php:110
69
+ msgid "Unexpected error. The list of Google Fonts are empty."
70
+ msgstr "Erreur inattendue. La liste des polices Google est vide."
71
+
72
+ #: controls/gradient.php:59
73
+ msgid "vertical"
74
+ msgstr "verticale"
75
+
76
+ #: controls/gradient.php:60
77
+ msgid "horizontal"
78
+ msgstr "horizontale"
79
+
80
+ #: controls/holders/more-link.php:47
81
+ msgid "hide extra options"
82
+ msgstr "masquer les options supplémentaires"
83
+
84
+ #: controls/paddings-editor.php:53
85
+ msgid "Select a side and move the slider to set up:"
86
+ msgstr "Sélectionnez un côté et déplacez le curseur pour configurer:"
87
+
88
+ #: controls/pattern.php:90
89
+ msgid "Change color"
90
+ msgstr "Changer de couleur"
91
+
92
+ #: controls/pattern.php:92
93
+ msgid "re-color"
94
+ msgstr "re-color"
95
+
96
+ #: controls/pattern.php:99
97
+ msgid "Select color:"
98
+ msgstr "Sélectionnez couleur:"
99
+
100
+ #: controls/pattern.php:102
101
+ msgid "Changing the color may takes a minute or more. Please be patient."
102
+ msgstr ""
103
+ "Changer la couleur peut prendre une minute ou plus. S'll vous plaît "
104
+ "soyez patient."
libs/factory/forms/langs/factory_forms_329-ru_RU.mo ADDED
Binary file
libs/factory/forms/langs/factory_forms_329-ru_RU.po ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: factory_forms\n"
4
+ "POT-Creation-Date: 2014-08-24 17:39+0400\n"
5
+ "PO-Revision-Date: 2014-08-24 17:49+0400\n"
6
+ "Last-Translator: \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.6.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: E:\\cloud\\Dropbox\\OnePress\\Products\\Topic\\Plugin "
19
+ "- Opt-In Panda for Wordpress\\wp-content\\plugins\\optinpanda-next\\libs"
20
+ "\\factory\\forms\n"
21
+
22
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
23
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/checkbox.php:55
24
+ msgid "On"
25
+ msgstr "Вкл"
26
+
27
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
28
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/checkbox.php:56
29
+ msgid "Off"
30
+ msgstr "Выкл"
31
+
32
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
33
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/font.php:33
34
+ msgid "(use default website font)"
35
+ msgstr "(шрифт сайта по умолчанию)"
36
+
37
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
38
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/font.php:35
39
+ msgid "Sans Serif:"
40
+ msgstr "Группа Sans Serif:"
41
+
42
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
43
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/font.php:58
44
+ msgid "Serif:"
45
+ msgstr "Группа Serif:"
46
+
47
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
48
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/font.php:78
49
+ msgid "Monospaced:"
50
+ msgstr "Группа Monospaced:"
51
+
52
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
53
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/gradient.php:54
54
+ msgid "vertical"
55
+ msgstr "вертикальный"
56
+
57
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
58
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/gradient.php:55
59
+ msgid "horizontal"
60
+ msgstr "горизонтальный"
61
+
62
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
63
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/holders/more-link.php:47
64
+ msgid "hide extra options"
65
+ msgstr "скрыть дополнительные настроки"
66
+
67
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
68
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/paddings-editor.php:51
69
+ msgid "Select a side and move the slider to set up:"
70
+ msgstr "Выберите сторону и переместите ползунок:"
71
+
72
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
73
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/pattern.php:78
74
+ msgid "Change color"
75
+ msgstr "Выбрать цвет"
76
+
77
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
78
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/pattern.php:80
79
+ msgid "re-color"
80
+ msgstr "Перекрасить"
81
+
82
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
83
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/pattern.php:89
84
+ msgid "Select color:"
85
+ msgstr "Выберите цвет:"
86
+
87
+ #: E:\cloud\Dropbox\OnePress\Products\Topic\Plugin - Opt-In Panda for
88
+ #: Wordpress\wp-content\plugins\optinpanda-next\libs\factory\forms/controls/pattern.php:91
89
+ msgid "Changing the color may takes a minute or more. Please be patient."
90
+ msgstr ""
91
+ "В некоторых случаях изменение цвета может занять около минуты. Пожалуйста, "
92
+ "будьте терпеливы."
93
+
94
+ #~ msgid "Upload Pattern"
95
+ #~ msgstr "Добавить шаблон"
libs/factory/forms/layouts/bootstrap-2/bootstrap-2.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains a form layout based on Twitter Bootstrap 2
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
+ * A form layout based on Twitter Bootstrap 2
14
+ */
15
+ class FactoryForms329_Bootstrap2FormLayout extends FactoryForms329_FormLayout {
16
+
17
+ public $name = 'default';
18
+
19
+ /**
20
+ * Creates a new instance of a bootstrap3 form layout.
21
+ *
22
+ * @since 1.0.0
23
+ * @param mixed[] $options A holder options.
24
+ * @param FactoryForms329_Form $form A parent form.
25
+ */
26
+ public function __construct($options, $form) {
27
+ parent::__construct($options, $form);
28
+ $this->addCssClass('factory-bootstrap-330');
29
+ }
30
+
31
+ /**
32
+ * Renders a beginning of a form.
33
+ *
34
+ * @since 1.0.0
35
+ * @return void
36
+ */
37
+ public function beforeRendering() {
38
+ ?>
39
+ <div <?php $this->attrs() ?>>
40
+ <div class="form-horizontal">
41
+ <?php
42
+ }
43
+
44
+ /**
45
+ * Renders the end of a form.
46
+ *
47
+ * @since 1.0.0
48
+ * @return void
49
+ */
50
+ public function afterRendering() {
51
+ ?>
52
+ </div>
53
+ </div>
54
+ <?php
55
+ }
56
+
57
+ public function beforeControl( $control ) {
58
+ if ( $control->getType() == 'hidden' ) return;
59
+
60
+ $themeClass = '';
61
+ if ( isset($control->options['theme']) ) $themeClass = $control->options['theme'];
62
+
63
+ $controlName = $control->getName();
64
+ $controlNameClass = $controlName ? 'factory-control-' . $controlName : '';
65
+ ?>
66
+ <div class="control-group <?php echo $themeClass ?> <?php echo $controlNameClass ?>">
67
+ <label for="<?php $control->printNameOnForm() ?>" class="control-label">
68
+ <?php if ( $control->hasIcon() ) { ?>
69
+ <img class="control-icon" src="<?php $control->icon() ?>" />
70
+ <?php } ?>
71
+ <?php $control->title() ?>
72
+ <?php if ( $control->hasHint() && $control->getLayoutOption('hint-position', 'bottom') == 'left' ) { ?>
73
+ <div class="help-block"><?php $control->hint() ?></div>
74
+ <?php } ?>
75
+ </label>
76
+ <div class="controls">
77
+ <?php
78
+ }
79
+
80
+ public function afterControl( $control ) {
81
+ if ( $control->getType() == 'hidden' ) return;
82
+ ?>
83
+ <?php if ( $control->hasHint() && $control->getLayoutOption('hint-position', 'bottom') == 'bottom' ) { ?>
84
+ <div class="help-block">
85
+ <?php $control->hint() ?>
86
+ </div>
87
+ <?php } ?>
88
+ </div>
89
+ </div>
90
+ <?php
91
+ }
92
+ }
libs/factory/forms/layouts/bootstrap-3/bootstrap-3.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The file contains a form layout based on Twitter Bootstrap 3
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
+ * A form layout based on Twitter Bootstrap 3
14
+ */
15
+ class FactoryForms329_Bootstrap3FormLayout extends FactoryForms329_FormLayout {
16
+
17
+ public $name = 'default';
18
+
19
+ /**
20
+ * Creates a new instance of a bootstrap3 form layout.
21
+ *
22
+ * @since 1.0.0
23
+ * @param mixed[] $options A holder options.
24
+ * @param FactoryForms329_Form $form A parent form.
25
+ */
26
+ public function __construct($options, $form)
27
+ {
28
+ parent::__construct($options, $form);
29
+ $this->addCssClass('factory-bootstrap');
30
+ if( isset($options['cssClass']) ) {
31
+ $this->addCssClass($options['cssClass']);
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Renders a beginning of a form.
37
+ *
38
+ * @since 1.0.0
39
+ * @return void
40
+ */
41
+ public function beforeRendering()
42
+ {
43
+ ?>
44
+ <div <?php $this->attrs() ?>>
45
+ <div class="form-horizontal">
46
+ <?php
47
+ }
48
+
49
+ /**
50
+ * Renders the end of a form.
51
+ *
52
+ * @since 1.0.0
53
+ * @return void
54
+ */
55
+ public function afterRendering()
56
+ {
57
+ ?>
58
+ </div>
59
+ </div>
60
+ <?php
61
+ }
62
+
63
+ /**
64
+ * @param object $control
65
+ */
66
+ public function beforeControl($control)
67
+ {
68
+ if( $control->getType() == 'hidden' ) {
69
+ return;
70
+ }
71
+
72
+ $themeClass = '';
73
+ if( isset($control->options['theme']) ) {
74
+ $themeClass = $control->options['theme'];
75
+ }
76
+
77
+ $controlName = $control->getOption('name');
78
+ $controlNameClass = $controlName
79
+ ? 'factory-control-' . $controlName
80
+ : '';
81
+
82
+ $col_left = $control->getLayoutOption('column-left', '2');
83
+ $col_right = $control->getLayoutOption('column-right', '10');
84
+ ?>
85
+ <div class="form-group form-group-<?php echo $control->type ?> <?php echo $themeClass ?> <?php echo $controlNameClass ?>">
86
+ <label for="<?php $control->printNameOnForm() ?>" class="col-sm-<?= $col_left ?> control-label">
87
+ <?php if( $control->hasIcon() ) { ?>
88
+ <img class="control-icon" src="<?php $control->icon() ?>"/>
89
+ <?php } ?>
90
+ <?php
91
+ $hintType = $control->getLayoutOption('hint-type', 'default');
92
+
93
+ $control->title();
94
+ if( $control->hasHint() ) {
95
+ if( $hintType == 'icon' ): ?>
96
+ <?php $hintIconColor = $control->getLayoutOption('hint-icon-color', 'green'); ?>
97
+ <span class="factory-hint-icon factory-hint-icon-<?= $hintIconColor ?>" data-toggle="factory-tooltip" data-placement="right" title="<?php $control->hint(true) ?>">
98
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAQAAABKmM6bAAAAUUlEQVQIHU3BsQ1AQABA0X/komIrnQHYwyhqQ1hBo9KZRKL9CBfeAwy2ri42JA4mPQ9rJ6OVt0BisFM3Po7qbEliru7m/FkY+TN64ZVxEzh4ndrMN7+Z+jXCAAAAAElFTkSuQmCC" alt=""/>
99
+
100
+ </span>
101
+ <?php endif; ?>
102
+ <?php if( $control->getLayoutOption('hint-position', 'bottom') == 'left' ): ?>
103
+ <div class="help-block"><?php $control->hint() ?></div>
104
+ <?php endif; ?>
105
+ <?php } ?>
106
+ </label>
107
+ <div class="control-group col-sm-<?= $col_right ?>">
108
+ <?php
109
+ }
110
+
111
+ /**
112
+ * @param object $control
113
+ */
114
+ public function afterControl($control)
115
+ {
116
+ if( $control->getType() == 'hidden' ) {
117
+ return;
118
+ }
119
+ ?>
120
+ <?php if( $control->getOption('after', false) ) { ?>
121
+ <span class="factory-after">
122
+ <?php $control->option('after') ?>
123
+ </span>
124
+ <?php } ?>
125
+
126
+ <?php
127
+ $hintType = $control->getLayoutOption('hint-type', 'default');
128
+ if( $control->hasHint() && $hintType == 'default' && $control->getLayoutOption('hint-position', 'bottom') == 'bottom' ):
129
+ ?>
130
+ <div class="help-block">
131
+ <?php $control->hint() ?>
132
+ </div>
133
+ <?php endif; ?>
134
+ </div>
135
+ </div>
136
+ <?php
137
+ }
138
+
139
+ public function startRow($index, $total)
140
+ {
141
+ ?>
142
+ <div class='factory-row factory-row-<?php echo $index ?> factory-row-<?php echo $index ?>-of-<?php echo $total ?>'>
143
+ <div class="form-group form-group">
144
+ <?php
145
+ }
146
+
147
+ public function endRow($index, $total)
148
+ {
149
+ ?>
150
+ </div>
151
+ </div>
152
+ <?php
153
+ }
154
+
155
+ public function startColumn($control, $index, $total)
156
+ {
157
+ $index = $total == 2
158
+ ? 4
159
+ : 3;
160
+ $name = $control->getNameOnForm();
161
+ ?>
162
+ <label for="<?php echo $name ?>" class="col-sm-2 control-label control-label-<?php echo $name ?>">
163
+ <?php if( $control->hasIcon() ) { ?>
164
+ <img class="control-icon" src="<?php $control->icon() ?>"/>
165
+ <?php } ?>
166
+ <?php $control->title() ?>
167
+ <?php if( $control->hasHint() && $control->getLayoutOption('hint-position', 'bottom') == 'left' ) { ?>
168
+ <div class="help-block"><?php $control->hint() ?></div>
169
+ <?php } ?>
170
+ </label>
171
+ <div class="control-group control-group-<?php echo $name ?> col-sm-<?php echo $index ?>">
172
+ <?php
173
+ }
174
+
175
+ public function endColumn($control, $index, $total)
176
+ {
177
+ ?>
178
+ <?php if( $control->getOption('after', false) ) { ?>
179
+ <span class="factory-after">
180
+ <?php $control->option('after') ?>
181
+ </span>
182
+ <?php } ?>
183
+ <?php if( $control->hasHint() && $control->getLayoutOption('hint-position', 'bottom') == 'bottom' ) { ?>
184
+ <div class="help-block">
185
+ <?php $control->hint() ?>
186
+ </div>
187
+ <?php } ?>
188
+ </div>
189
+ <?php
190
+ }
191
+ }
libs/factory/pages/boot.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Factory Pages
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>, Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2013, OnePress Ltd, (c) 2017 Webcraftic Ltd
7
+ *
8
+ * @package core
9
+ * @since 1.0.1
10
+ */
11
+
12
+ // module provides function only for the admin area
13
+ if( !is_admin() ) {
14
+ return;
15
+ }
16
+
17
+ if( defined('FACTORY_PAGES_322_LOADED') ) {
18
+ return;
19
+ }
20
+ define('FACTORY_PAGES_322_LOADED', true);
21
+
22
+ define('FACTORY_PAGES_322_DIR', dirname(__FILE__));
23
+ define('FACTORY_PAGES_322_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_322', false, dirname(plugin_basename(__FILE__)) . '/langs');
30
+
31
+ require(FACTORY_PAGES_322_DIR . '/pages.php');
32
+ require(FACTORY_PAGES_322_DIR . '/includes/request.class.php');
33
+ require(FACTORY_PAGES_322_DIR . '/includes/page.class.php');
34
+ require(FACTORY_PAGES_322_DIR . '/includes/admin-page.class.php');
35
+ require(FACTORY_PAGES_322_DIR . '/templates/impressive-page.class.php');
36
+
libs/factory/pages/includes/admin-page.class.php ADDED
@@ -0,0 +1,413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FactoryPages322_AdminPage extends FactoryPages322_Page {
4
+
5
+ /**
6
+ * Visible page title.
7
+ * For example: 'License Manager'
8
+ * @var string
9
+ */
10
+ public $pageTitle;
11
+
12
+ /**
13
+ * Visible title in menu.
14
+ * For example: 'License Manager'
15
+ * @var string
16
+ */
17
+ public $menuTitle = null;
18
+
19
+ /**
20
+ * If set, an extra sub menu will be created with another title.
21
+ * @var type
22
+ */
23
+ public $menuSubTitle = null;
24
+
25
+ /**
26
+ * Menu icon (only if a page is placed as a main menu).
27
+ * For example: '~/assets/img/menu-icon.png'
28
+ * For example dashicons: '\f321'
29
+ * @var string
30
+ */
31
+ public $menuIcon = null;
32
+
33
+ /**
34
+ * Menu position (only if a page is placed as a main menu).
35
+ * @link http://codex.wordpress.org/Function_Reference/add_menu_page
36
+ * @var string
37
+ */
38
+ public $menuPosition = null;
39
+
40
+ /**
41
+ * Menu type. Set it to add the page to the specified type menu.
42
+ * For example: 'post'
43
+ * @var type
44
+ */
45
+ public $menuPostType = null;
46
+
47
+ /**
48
+ * if specified the page will be added to the given menu target as a submenu.
49
+ * For example: 'edit.php?post_type=custom-post-type'
50
+ * @var string
51
+ */
52
+ public $menuTarget = null;
53
+
54
+ /**
55
+ * if true, then admin.php is used as a base url.
56
+ * @var bool
57
+ */
58
+ public $customTarget = false;
59
+
60
+ /**
61
+ * Capabilities for roles that have access to work with this page.
62
+ * Leave it empty to use inherited capabilities for custom post type menu.
63
+ * @link http://codex.wordpress.org/Roles_and_Capabilities
64
+ * @var array An array of the capabilities.
65
+ */
66
+ public $capabilitiy = null;
67
+
68
+ /**
69
+ * If true, the page will not added to the admin menu.
70
+ * @var bool
71
+ */
72
+ public $internal = false;
73
+
74
+ /**
75
+ * If true, the page will not be cretaed.
76
+ *
77
+ * @since 3.0.6
78
+ * @var bool
79
+ */
80
+ public $hidden = false;
81
+
82
+ /**
83
+ * Link title for plugin action menu
84
+ *
85
+ * @var string/null
86
+ */
87
+ public $titlePluginActionLink = null;
88
+
89
+ /**
90
+ * If true, add settings link in plugins list
91
+ * https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name)
92
+ * @var bool
93
+ */
94
+ public $addLinkToPluginActions = false;
95
+
96
+ public function __construct($plugin = null)
97
+ {
98
+ parent::__construct($plugin);
99
+ $this->configure();
100
+
101
+ $this->id = empty($this->id)
102
+ ? str_replace('adminpage', '', strtolower(get_class($this)))
103
+ : $this->id;
104
+
105
+ if( $this->addLinkToPluginActions ) {
106
+ // plugin settings link
107
+ add_filter("plugin_action_links_" . $plugin->relativePath, array($this, 'addLinkToPluginActions'));
108
+ }
109
+ }
110
+
111
+ /**
112
+ * May be used to configure the page before uts usage.
113
+ */
114
+ public function configure()
115
+ {
116
+ }
117
+
118
+ /**
119
+ * Includes the Factory Bootstrap assets for a current page.
120
+ *
121
+ * @param string $hook
122
+ * @return void
123
+ */
124
+ public function actionAdminBootstrapScripts($hook)
125
+ {
126
+ $this->scripts->connect('bootstrap');
127
+ $this->styles->connect('bootstrap');
128
+ }
129
+
130
+ /**
131
+ * Includes the assets for a current page (all assets except Factory Bootstrap assets).
132
+ *
133
+ * @param string $hook
134
+ * @return void
135
+ */
136
+ public function actionAdminScripts($hook)
137
+ {
138
+ $this->scripts->connect();
139
+ $this->styles->connect();
140
+ }
141
+
142
+ public function getResultId()
143
+ {
144
+ if( $this->plugin ) {
145
+ return $this->id . '-' . $this->plugin->pluginName;
146
+ }
147
+
148
+ return $this->id;
149
+ }
150
+
151
+ /**
152
+ * Registers admin page for the admin menu.
153
+ */
154
+ public function connect()
155
+ {
156
+ $resultId = $this->getResultId();
157
+
158
+ $this->hidden = apply_filters('factory_page_is_hidden_' . $resultId, $this->hidden);
159
+ if( $this->hidden ) {
160
+ return;
161
+ }
162
+
163
+ $this->internal = apply_filters('factory_page_is_internal_' . $resultId, $this->internal);
164
+ if( $this->internal ) {
165
+ $this->menuTarget = null;
166
+ $this->menuPostType = null;
167
+ }
168
+
169
+ // makes redirect to the page
170
+ $controller = isset($_GET['fy_page'])
171
+ ? sanitize_text_field($_GET['fy_page'])
172
+ : null;
173
+ if( $controller && $controller == $this->id ) {
174
+ $plugin = isset($_GET['fy_plugin'])
175
+ ? sanitize_text_field($_GET['fy_plugin'])
176
+ : null;
177
+
178
+ if( $this->plugin->pluginName == $plugin ) {
179
+ $action = isset($_GET['fy_action'])
180
+ ? sanitize_text_field($_GET['fy_action'])
181
+ : 'index';
182
+ $isAjax = isset($_GET['fy_ajax']);
183
+
184
+ if( $isAjax ) {
185
+
186
+ $this->executeByName($action);
187
+ exit;
188
+ } else {
189
+
190
+ $params = array();
191
+ foreach($_GET as $key => $value) {
192
+ $params[$key] = sanitize_text_field($value);
193
+ }
194
+
195
+ unset($params['fy_page']);
196
+ unset($params['fy_plugin']);
197
+ unset($params['fy_action']);
198
+
199
+ $this->redirectToAction($action, $params);
200
+ }
201
+ }
202
+ }
203
+
204
+ // executes an action
205
+ if( $this->current() ) {
206
+ ob_start();
207
+ $action = isset($_GET['action'])
208
+ ? sanitize_text_field($_GET['action'])
209
+ : 'index';
210
+ $this->executeByName($action);
211
+ $this->result = ob_get_contents();
212
+ ob_end_clean();
213
+ }
214
+
215
+ // calls scripts and styles, adds pages to menu
216
+ if( isset($_GET['page']) && $_GET['page'] == $resultId ) {
217
+ $this->assets($this->scripts, $this->styles);
218
+
219
+ if( !$this->scripts->isEmpty('bootstrap') || !$this->styles->isEmpty('bootstrap') ) {
220
+ add_action('factory_bootstrap_enqueue_scripts_' . $this->plugin->pluginName, array(
221
+ $this,
222
+ 'actionAdminBootstrapScripts'
223
+ ));
224
+ }
225
+
226
+ // includes styles and scripts
227
+ if( !$this->scripts->isEmpty() || !$this->styles->isEmpty() ) {
228
+ add_action('admin_enqueue_scripts', array($this, 'actionAdminScripts'));
229
+ }
230
+ }
231
+
232
+ // if this page for a custom menu page
233
+ if( $this->menuPostType ) {
234
+ $this->menuTarget = 'edit.php?post_type=' . $this->menuPostType;
235
+ if( empty($this->capabilitiy) ) {
236
+ $this->capabilitiy = 'edit_' . $this->menuPostType;
237
+ }
238
+ }
239
+
240
+ // sets default capabilities
241
+ if( empty($this->capabilitiy) ) {
242
+ $this->capabilitiy = 'manage_options';
243
+ }
244
+
245
+ $this->pageTitle = !$this->pageTitle
246
+ ? $this->menuTitle
247
+ : $this->pageTitle;
248
+ $this->menuTitle = !$this->menuTitle
249
+ ? $this->pageTitle
250
+ : $this->menuTitle;
251
+
252
+ $this->pageTitle = apply_filters('factory_page_title_' . $resultId, $this->pageTitle);
253
+ $this->menuTitle = apply_filters('factory_menu_title_' . $resultId, $this->menuTitle);
254
+
255
+ // submenu
256
+ if( $this->menuTarget ) {
257
+
258
+ add_submenu_page($this->menuTarget, $this->pageTitle, $this->menuTitle, $this->capabilitiy, $resultId, array(
259
+ $this,
260
+ 'show'
261
+ ));
262
+ // global menu
263
+ } else {
264
+
265
+ add_menu_page($this->pageTitle, $this->menuTitle, $this->capabilitiy, $resultId, array(
266
+ $this,
267
+ 'show'
268
+ ), null, $this->menuPosition);
269
+
270
+ if( !empty($this->menuSubTitle) ) {
271
+
272
+ add_submenu_page($resultId, $this->menuSubTitle, $this->menuSubTitle, $this->capabilitiy, $resultId, array(
273
+ $this,
274
+ 'show'
275
+ ));
276
+ }
277
+
278
+ add_action('admin_head', array($this, 'actionAdminHead'));
279
+ }
280
+ }
281
+
282
+ protected function current()
283
+ {
284
+
285
+ if( !isset($_GET['page']) ) {
286
+ return false;
287
+ }
288
+ $resultId = $this->getResultId();
289
+ if( $resultId == $_GET['page'] ) {
290
+ return true;
291
+ }
292
+
293
+ return false;
294
+ }
295
+
296
+ protected function redirectToAction($action, $queryArgs = array())
297
+ {
298
+
299
+ wp_redirect($this->getActionUrl($action, $queryArgs));
300
+ exit;
301
+ }
302
+
303
+ public function actionUrl($action = null, $queryArgs = array())
304
+ {
305
+ echo $this->getActionUrl($action, $queryArgs);
306
+ }
307
+
308
+ public function getActionUrl($action = null, $queryArgs = array())
309
+ {
310
+ $baseUrl = $this->getBaseUrl();
311
+
312
+ if( !empty($action) ) {
313
+ $queryArgs['action'] = $action;
314
+ }
315
+ $url = add_query_arg($queryArgs, $baseUrl);
316
+
317
+ return $url;
318
+ }
319
+
320
+ protected function getBaseUrl()
321
+ {
322
+ $resultId = $this->getResultId();
323
+
324
+ if( $this->menuTarget ) {
325
+ if( $this->customTarget ) {
326
+ return admin_url('admin.php') . '?page=' . $resultId;
327
+ }
328
+
329
+ return $this->menuTarget . '&page=' . $resultId;
330
+ } else {
331
+ return 'admin.php?&page=' . $resultId;
332
+ }
333
+ }
334
+
335
+ public function actionAdminHead()
336
+ {
337
+ $resultId = $this->getResultId();
338
+
339
+ if( !empty($this->menuIcon) ) {
340
+
341
+ if( preg_match('/\\\f\d{3}/', $this->menuIcon) ) {
342
+ $iconCode = $this->menuIcon;
343
+ } else {
344
+ $iconUrl = str_replace('~/', $this->plugin->pluginUrl . '/', $this->menuIcon);
345
+ }
346
+ }
347
+
348
+ global $wp_version;
349
+ if( version_compare($wp_version, '3.7.3', '>') ) {
350
+ ?>
351
+ <style type="text/css" media="screen">
352
+ <?php if ( !empty($iconUrl) ) { ?>
353
+
354
+ a.toplevel_page_<?php echo $resultId ?> .wp-menu-image {
355
+ background: url('<?php echo $iconUrl ?>') no-repeat 10px -30px !important;
356
+ }
357
+
358
+ <?php } ?>
359
+
360
+ a.toplevel_page_<?php echo $resultId ?> .wp-menu-image:before {
361
+ content: "<?php echo !empty($iconCode) ? $iconCode : ''; ?>" !important;
362
+ }
363
+
364
+ a.toplevel_page_<?php echo $resultId ?>:hover .wp-menu-image,
365
+ a.toplevel_page_<?php echo $resultId ?>.wp-has-current-submenu .wp-menu-image,
366
+ a.toplevel_page_<?php echo $resultId ?>.current .wp-menu-image {
367
+ background-position: 10px 2px !important;
368
+ }
369
+ </style>
370
+ <?php } else { ?>
371
+ <style type="text/css" media="screen">
372
+ a.toplevel_page_<?php echo $resultId ?> .wp-menu-image {
373
+ background: url('<?php echo $iconUrl ?>') no-repeat 6px -33px !important;
374
+ }
375
+
376
+ a.toplevel_page_<?php echo $resultId ?>:hover .wp-menu-image,
377
+ a.toplevel_page_<?php echo $resultId ?>.current .wp-menu-image {
378
+ background-position: 6px -1px !important;
379
+ }
380
+ </style>
381
+ <?php
382
+ }
383
+
384
+ if( $this->internal ) {
385
+ ?>
386
+ <style type="text/css" media="screen">
387
+ li.toplevel_page_<?php echo $resultId ?> {
388
+ display: none;
389
+ }
390
+ </style>
391
+ <?php
392
+ }
393
+ }
394
+
395
+
396
+ /**
397
+ * Add settings link in plugins list
398
+ *
399
+ * @param $links
400
+ * @return mixed
401
+ */
402
+ function addLinkToPluginActions($links)
403
+ {
404
+ $linkTitle = !empty($this->titlePluginActionLink)
405
+ ? $this->titlePluginActionLink
406
+ : $this->menuTitle;
407
+
408
+ $settings_link = '<a href="' . $this->getBaseUrl() . '">' . $linkTitle . '</a>';
409
+ array_unshift($links, $settings_link);
410
+
411
+ return $links;
412
+ }
413
+ }
libs/factory/pages/includes/page.class.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FactoryPages322_Page {
4
+
5
+ /**
6
+ * Current Factory Plugin.
7
+ * @var Factory326_Plugin
8
+ */
9
+ public $plugin;
10
+
11
+ /**
12
+ * Page id used to call.
13
+ * @var string
14
+ */
15
+ public $id;
16
+
17
+ public function __construct($plugin = null)
18
+ {
19
+ $this->plugin = $plugin;
20
+ $this->request = new FactoryPages322_Request();
21
+
22
+ if( $plugin ) {
23
+ $this->scripts = $this->plugin->newScriptList();
24
+ $this->styles = $this->plugin->newStyleList();
25
+ } else {
26
+
27
+ $coreVersion = isset($this->deps['factory_core'])
28
+ ? $this->deps['factory_core']
29
+ : null;
30
+ if( empty($coreVersion) ) {
31
+ throw new Exception ("The version of the 'factory_core' is not specified in the var \$deps for the page '{$this->id}'.");
32
+ }
33
+
34
+ $scriptsClass = 'Factory' . $coreVersion . '_ScriptList';
35
+ $stylesClass = 'Factory' . $coreVersion . '_StyleList';
36
+
37
+ $this->scripts = new $scriptsClass();
38
+ $this->styles = new $stylesClass();
39
+ }
40
+ }
41
+
42
+ public function assets($scripts, $styles)
43
+ {
44
+ }
45
+
46
+ /**
47
+ * Shows page.
48
+ */
49
+ public function show()
50
+ {
51
+
52
+ if( $this->result ) {
53
+ echo $this->result;
54
+ } else {
55
+ $action = isset($_GET['action'])
56
+ ? $_GET['action']
57
+ : 'index';
58
+ $this->executeByName($action);
59
+ }
60
+ }
61
+
62
+ public function executeByName($action)
63
+ {
64
+ if( preg_match('/[-_]+/', $action) ) {
65
+ $action = $this->dashesToCamelCase($action, false);
66
+ }
67
+ $actionFunction = $action . 'Action';
68
+
69
+ $cancel = $this->OnActionExecuting($action);
70
+ if( $cancel === false ) {
71
+ return;
72
+ }
73
+
74
+ if( !method_exists($this, $actionFunction) ) {
75
+ $actionFunction = 'indexAction';
76
+ }
77
+
78
+ call_user_func_array(array($this, $actionFunction), array());
79
+ $this->OnActionExected($action);
80
+ }
81
+
82
+ protected function dashesToCamelCase($string, $capitalizeFirstCharacter = false)
83
+ {
84
+ $str = str_replace(' ', '', ucwords(preg_replace('/[-_]/', ' ', $string)));
85
+
86
+ if( !$capitalizeFirstCharacter ) {
87
+ $str[0] = strtolower($str[0]);
88
+ }
89
+
90
+ if( empty($str) ) {
91
+ throw new Exception('Dashed to camelcase parse error.');
92
+ }
93
+
94
+ return $str;
95
+ }
96
+
97
+ protected function OnActionExecuting($action)
98
+ {
99
+ }
100
+
101
+ protected function OnActionExected($action)
102
+ {
103
+ }
104
+
105
+ protected function script($path)
106
+ {
107
+ wp_enqueue_script($path, $path, array('jquery'), false, true);
108
+ }
109
+
110
+ /**
111
+ * Renders a template.
112
+ * @param string $path
113
+ * @param mixed $model
114
+ */
115
+ protected function template($path, $model, $bodyContent = null)
116
+ {
117
+ $layout = null;
118
+ $file = $this->plugin->templateRoot . '/' . $path . '.tpl.php';
119
+
120
+ ob_start();
121
+ include($file);
122
+ $content = ob_get_contents();
123
+ ob_end_clean();
124
+
125
+ if( !empty($content) ) {
126
+ $content = str_replace('{pagebody}', $bodyContent, $content);
127
+ }
128
+
129
+ if( !empty($layout) ) {
130
+ $this->template($layout, $model, $content);
131
+ } else {
132
+ echo $content;
133
+ }
134
+ }
135
+ }
libs/factory/pages/includes/request.class.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FactoryPages322_Request {
4
+
5
+ /**
6
+ * @param null $param
7
+ * @param bool|string $sanitize true/false or sanitize function name
8
+ * @param bool $default
9
+ * @param string $method_name
10
+ * @return array|bool|mixed
11
+ */
12
+ private function getBody($param = null, $sanitize = false, $default = false, $method_name = 'REQUEST')
13
+ {
14
+ $sanitize_function_name = 'sanitize_text_field';
15
+ $method = $_REQUEST;
16
+
17
+ switch( mb_strtoupper($method_name) ) {
18
+ case 'GET':
19
+ $method = $_GET;
20
+ break;
21
+ case 'POST':
22
+ $method = $_POST;
23
+ break;
24
+ }
25
+
26
+ if( !empty($sanitize) && is_string($sanitize) && $sanitize !== $sanitize_function_name ) {
27
+ $sanitize_function_name = $sanitize;
28
+ }
29
+
30
+ if( !function_exists($sanitize_function_name) ) {
31
+ throw new Exception('Function ' . $sanitize_function_name . 'is undefined.');
32
+ }
33
+
34
+ if( !empty($param) ) {
35
+ if( isset($method[$param]) && !empty($method[$param]) ) {
36
+ return !empty($sanitize)
37
+ ? call_user_func($sanitize_function_name, $method[$param])
38
+ : $method[$param];
39
+ }
40
+
41
+ return $default;
42
+ }
43
+
44
+ return !empty($sanitize)
45
+ ? array_map($sanitize_function_name, $_GET)
46
+ : $method;
47
+ }
48
+
49
+ /**
50
+ * @param bool|string see method getBody
51
+ * @param array $default
52
+ * @return mixed|null
53
+ */
54
+ public function requestAll($sanitize = false, $default = array())
55
+ {
56
+ return $this->getBody(null, $sanitize, $default);
57
+ }
58
+
59
+ /**
60
+ * @param $param
61
+ * @param bool|string see method getBody
62
+ * @param bool $default
63
+ * @return mixed|null
64
+ */
65
+ public function request($param, $default = false, $sanitize = false)
66
+ {
67
+ return $this->getBody($param, $sanitize, $default);
68
+ }
69
+
70
+ /**
71
+ * @param bool|string see method getBody
72
+ * @param array $default
73
+ * @return mixed|null
74
+ */
75
+ public function getAll($sanitize = false, $default = array())
76
+ {
77
+ return $this->getBody(null, $sanitize, $default, 'get');
78
+ }
79
+
80
+ /**
81
+ * @param null $param
82
+ * @param bool|string see method getBody
83
+ * @param bool $default
84
+ * @return mixed|null
85
+ */
86
+ public function get($param, $default = false, $sanitize = false)
87
+ {
88
+ return $this->getBody($param, $sanitize, $default, 'get');
89
+ }
90
+
91
+ /**
92
+ * @param bool|string see method getBody
93
+ * @param array $default
94
+ * @return mixed|null
95
+ */
96
+ public function postAll($sanitize = false, $default = array())
97
+ {
98
+ return $this->getBody(null, $sanitize, $default, 'post');
99
+ }
100
+
101
+ /**
102
+ * @param $param
103
+ * @param bool|string see method getBody
104
+ * @param bool $default
105
+ * @return mixed|null
106
+ */
107
+ public function post($param, $default = false, $sanitize = false)
108
+ {
109
+ return $this->getBody($param, $sanitize, $default, 'post');
110
+ }
111
+ }
libs/factory/pages/langs/factory_pages_322-fr_FR.mo ADDED
Binary file
libs/factory/pages/langs/factory_pages_322-fr_FR.po ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: clearfy\n"
4
+ "POT-Creation-Date: 2017-11-09 10:33+0300\n"
5
+ "PO-Revision-Date: 2017-11-09 19:04+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: fr\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
+
20
+ #: templates/impressive-page.class.php:45
21
+ msgid "Settings"
22
+ msgstr "Paramètres"
23
+
24
+ #: templates/impressive-page.class.php:170
25
+ msgid ""
26
+ "It seems that a caching/performance plugin is active on this site. Please "
27
+ "manually invalidate that plugin's cache after making any changes to the "
28
+ "settings below."
29
+ msgstr ""
30
+ "Il semble qu'un plugin cache / performance soit actif sur ce site. Veuillez "
31
+ "invalider manuellement le cache de ce plugin après avoir apporté des "
32
+ "modifications aux paramètres ci-dessous."
33
+
34
+ #: templates/impressive-page.class.php:187
35
+ msgid "The settings have been updated successfully!"
36
+ msgstr "Les paramètres ont été mis à jour avec succès!"
37
+
38
+ #: templates/impressive-page.class.php:251
39
+ msgid "Page"
40
+ msgstr "Page"
41
+
42
+ #: templates/impressive-page.class.php:256
43
+ msgid "Save settings"
44
+ msgstr "Enregistrer les paramètres"
45
+
46
+ #: templates/impressive-page.class.php:328
47
+ msgid "You do not have permission to edit page."
48
+ msgstr "Vous n'êtes pas autorisé à modifier la page."
49
+
50
+ #: templates/impressive-page.class.php:403
51
+ msgid ""
52
+ "A neutral setting that can not harm your site, but you must be sure that you "
53
+ "need to use it."
54
+ msgstr ""
55
+ "Un paramètre neutre qui ne peut pas nuire à votre site, mais vous devez être "
56
+ "sûr que vous devez l'utiliser."
57
+
58
+ #: templates/impressive-page.class.php:407
59
+ msgid ""
60
+ "When set this option, you must be careful. Plugins and themes may depend on "
61
+ "this function. You must be sure that you can disable this feature for the "
62
+ "site."
63
+ msgstr ""
64
+ "Lorsque vous définissez cette option, vous devez faire attention. Les "
65
+ "plugins et les thèmes peuvent dépendre de cette fonction. Vous devez être "
66
+ "sûr que vous pouvez désactiver cette fonctionnalité pour le site."
67
+
68
+ #: templates/impressive-page.class.php:411
69
+ msgid "Absolutely safe setting, We recommend to use."
70
+ msgstr "Réglage absolument sûr, nous recommandons d'utiliser."
71
+
72
+ #: templates/impressive-page.class.php:416
73
+ msgid "Hover to the icon to get help for the feature you selected."
74
+ msgstr "Passez à l'icône pour obtenir de l'aide sur la fonction sélectionnée."
75
+
76
+ #: templates/impressive-page.class.php:432
77
+ msgid "Do you want the plugin to improved and update?"
78
+ msgstr "Voulez-vous que le plugin pour améliorer et mettre à jour?"
79
+
80
+ #: templates/impressive-page.class.php:435
81
+ msgid ""
82
+ "Help the author, leave a review on wordpress.org. Thanks to feedback, I will "
83
+ "know that the plugin is really useful to you and is needed."
84
+ msgstr ""
85
+ "Aidez l'auteur, laissez un commentaire sur wordpress.org. Grâce aux retours, "
86
+ "je saurai que le plugin est vraiment utile et nécessaire."
87
+
88
+ #: templates/impressive-page.class.php:437
89
+ msgid "And also write your ideas on how to extend or improve the plugin."
90
+ msgstr ""
91
+ "Et écrivez aussi vos idées sur la façon d'étendre ou d'améliorer le plugin."
92
+
93
+ #: templates/impressive-page.class.php:442
94
+ msgid "Go rate us and push ideas"
95
+ msgstr "Allez nous évaluer et pousser des idées"
96
+
97
+ #: templates/impressive-page.class.php:454
98
+ msgid "Donation for plug-in development"
99
+ msgstr "Don pour le développement du plug-in"
libs/factory/pages/langs/factory_pages_322-ru_RU.mo ADDED
Binary file
libs/factory/pages/langs/factory_pages_322-ru_RU.po ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: clearfy\n"
4
+ "POT-Creation-Date: 2017-10-14 13:52+0300\n"
5
+ "PO-Revision-Date: 2017-11-17 07:31+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
+
20
+ #: templates/impressive-page.class.php:45
21
+ msgid "Settings"
22
+ msgstr "Настройки"
23
+
24
+ #: templates/impressive-page.class.php:170
25
+ msgid ""
26
+ "It seems that a caching/performance plugin is active on this site. Please "
27
+ "manually invalidate that plugin's cache after making any changes to the "
28
+ "settings below."
29
+ msgstr ""
30
+ "Похоже, что Вы используете плагин кэширования или ускорения блога. Не "
31
+ "забудьте после изменения любых настроек, очистить кэш вручную!"
32
+
33
+ #: templates/impressive-page.class.php:187
34
+ msgid "The settings have been updated successfully!"
35
+ msgstr "Настройки были успешно обновлены!"
36
+
37
+ #: templates/impressive-page.class.php:251
38
+ msgid "Page"
39
+ msgstr "Страница"
40
+
41
+ #: templates/impressive-page.class.php:256
42
+ msgid "Save settings"
43
+ msgstr "Сохранить настройки"
44
+
45
+ #: templates/impressive-page.class.php:328
46
+ msgid "You do not have permission to edit page."
47
+ msgstr "У вас недостаточно прав, для редактирования этой страницы."
48
+
49
+ #: templates/impressive-page.class.php:403
50
+ msgid ""
51
+ "A neutral setting that can not harm your site, but you must be sure that you "
52
+ "need to use it."
53
+ msgstr ""
54
+ "Нейтральная настройка, которая не может нанести вред вашему сайту, но вы "
55
+ "должны быть уверены, что вам нужно ее использовать."
56
+
57
+ #: templates/impressive-page.class.php:407
58
+ msgid ""
59
+ "When set this option, you must be careful. Plugins and themes may depend on "
60
+ "this function. You must be sure that you can disable this feature for the "
61
+ "site."
62
+ msgstr ""
63
+ "При включении этой настройки, вы должны быть осторожны. Некоторые плагины и "
64
+ "темы могут зависеть от этой функции. Вы должны быть уверены, что эту функцию "
65
+ "можно отключить для сайта."
66
+
67
+ #: templates/impressive-page.class.php:411
68
+ msgid "Absolutely safe setting, We recommend to use."
69
+ msgstr "Абсолютно безопасная настройка, рекомендуем использовать."
70
+
71
+ #: templates/impressive-page.class.php:416
72
+ msgid "Hover to the icon to get help for the feature you selected."
73
+ msgstr ""
74
+ "Наведите указатель мыши на значок, чтобы получить справку по выбранной "
75
+ "функции."
76
+
77
+ #: templates/impressive-page.class.php:432
78
+ msgid "Do you want the plugin to improved and update?"
79
+ msgstr "Вы хотите, чтобы плагин улучшался и обновлялся?"
80
+
81
+ #: templates/impressive-page.class.php:435
82
+ msgid ""
83
+ "Help the author, leave a review on wordpress.org. Thanks to feedback, I will "
84
+ "know that the plugin is really useful to you and is needed."
85
+ msgstr ""
86
+ "Помогите автору, оставьте отзыв на wordpress.org. Благодаря отзывам, я буду "
87
+ "знать, что плагин действительно полезен для вас и необходим."
88
+
89
+ #: templates/impressive-page.class.php:437
90
+ msgid "And also write your ideas on how to extend or improve the plugin."
91
+ msgstr "А также напишите свои идеи о том, как расширить или улучшить плагин."
92
+
93
+ #: templates/impressive-page.class.php:442
94
+ msgid "Go rate us and push ideas"
95
+ msgstr "Оставить отзыв или поделиться идеей"
96
+
97
+ #: templates/impressive-page.class.php:454
98
+ msgid "Donation for plug-in development"
99
+ msgstr "Пожертвования на развитие плагина"
libs/factory/pages/pages.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * A group of classes and methods to create and manage pages.
4
+ *
5
+ * @author Paul Kashtanoff <paul@byonepress.com>
6
+ * @copyright (c) 2013, OnePress Ltd
7
+ *
8
+ * @package core
9
+ * @since 1.0.0
10
+ */
11
+
12
+ add_action('admin_menu', 'FactoryPages322::actionAdminMenu');
13
+
14
+ /**
15
+ * A base class to manage pages.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ class FactoryPages322 {
20
+
21
+ private static $pages = array();
22
+
23
+ public static function register( $plugin, $className ) {
24
+ if ( !isset( self::$pages[$plugin->pluginName] ) ) self::$pages[$plugin->pluginName] = array();
25
+ self::$pages[$plugin->pluginName][] = new $className( $plugin );
26
+ }
27
+
28
+ public static function actionAdminMenu() {
29
+ if ( empty(self::$pages) ) return;
30
+
31
+ foreach(self::$pages as $pluginPages) {
32
+ foreach($pluginPages as $page) {
33
+ $page->connect();
34
+ }
35
+ }
36
+ }
37
+
38
+ public static function getIds( $plugin ){
39
+ if ( !isset( self::$pages[$plugin->pluginName] ) ) return array();
40
+
41
+ $result = array();
42
+ foreach(self::$pages[$plugin->pluginName] as $page) $result[] = $page->getResultId();
43
+ return $result;
44
+ }
45
+ }
46
+
47
+ function factory_pages_322_get_page_id( $plugin, $pureId ) {
48
+ return $pureId . '-' . $plugin->pluginName;
49
+ }
libs/factory/pages/templates/assets/css/impressive.page.template.css ADDED
@@ -0,0 +1,355 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * General styles
3
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
+ * @copyright Alex Kovalev 23.08.2017
5
+ */
6
+ #WBCR .wbcr-factory-impressive-page-template-000 {
7
+ position: relative;
8
+ /**
9
+ Content sections
10
+ */
11
+ /**
12
+ Widget in the sidebar of the plugin
13
+ */
14
+ }
15
+ #WBCR .wbcr-factory-impressive-page-template-000 .form-group label {
16
+ font-weight: normal;
17
+ }
18
+ #WBCR .wbcr-factory-impressive-page-template-000 .form-horizontal .control-label {
19
+ max-width: 300px;
20
+ }
21
+ #WBCR .wbcr-factory-impressive-page-template-000 .factory-control-buttons {
22
+ text-align: right;
23
+ padding-right: 20px;
24
+ }
25
+ #WBCR .wbcr-factory-impressive-page-template-000 .factory-from-control-list label span {
26
+ display: inline-block;
27
+ vertical-align: bottom;
28
+ }
29
+ #WBCR .wbcr-factory-impressive-page-template-000 .factory-from-control-list label span input[type="checkbox"],
30
+ #WBCR .wbcr-factory-impressive-page-template-000 .factory-from-control-list label span input[type="checkbox"]:focus {
31
+ outline: none;
32
+ }
33
+ #WBCR .wbcr-factory-impressive-page-template-000 .alert {
34
+ margin: 0px;
35
+ margin-bottom: 20px;
36
+ font-weight: bold;
37
+ padding: 10px;
38
+ margin-top: -15px !important;
39
+ }
40
+ #WBCR .wbcr-factory-impressive-page-template-000 .hint-warnign-color {
41
+ color: #ffeb3b;
42
+ }
43
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-premium-color {
44
+ color: #ffc107;
45
+ }
46
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-header {
47
+ padding: 20px 20px 40px;
48
+ }
49
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-recomended-text {
50
+ display: block;
51
+ font-size: 11px;
52
+ font-weight: lighter;
53
+ color: #179347;
54
+ }
55
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-options,
56
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page {
57
+ position: relative;
58
+ background: #e6e6e6;
59
+ overflow: hidden;
60
+ }
61
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-options:after,
62
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page:after {
63
+ display: block;
64
+ content: '';
65
+ clear: both;
66
+ }
67
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap {
68
+ margin-left: 230px;
69
+ padding: 120px 0 20px 20px;
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;
76
+ top: 0;
77
+ left: 0;
78
+ right: 0;
79
+ overflow: hidden;
80
+ background-color: #32373c;
81
+ color: #fff;
82
+ border-radius: 5px 5px 0 0;
83
+ }
84
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .updated,
85
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .notice {
86
+ display: none !important;
87
+ }
88
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-header-logo {
89
+ float: left;
90
+ padding: 25px 0;
91
+ font-size: 20px;
92
+ line-height: 30px;
93
+ font-weight: 400;
94
+ text-align: center;
95
+ background-color: #464b50;
96
+ color: #ccc;
97
+ padding-left: 25px;
98
+ margin-right: 10px;
99
+ background: none;
100
+ }
101
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-header-title {
102
+ display: inline-block;
103
+ vertical-align: middle;
104
+ }
105
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-header-title h2 {
106
+ font-size: 18px;
107
+ line-height: 30px;
108
+ font-weight: 300;
109
+ margin-top: 26px;
110
+ padding: 0 !important;
111
+ overflow: hidden;
112
+ white-space: nowrap;
113
+ text-overflow: ellipsis;
114
+ color: #fff;
115
+ }
116
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-control {
117
+ position: relative;
118
+ float: right;
119
+ margin: 12px;
120
+ }
121
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-control input[type="submit"] {
122
+ display: inline-block;
123
+ vertical-align: top;
124
+ font-size: 13px;
125
+ font-weight: 600;
126
+ line-height: 20px;
127
+ text-transform: uppercase;
128
+ margin: 10px 0 0;
129
+ padding: 8px 30px;
130
+ cursor: pointer;
131
+ position: relative;
132
+ overflow: hidden;
133
+ border: none;
134
+ border-radius: 50px;
135
+ box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08) inset;
136
+ background-color: #f1f1f1;
137
+ color: inherit;
138
+ transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
139
+ text-align: center;
140
+ outline: none;
141
+ z-index: 3;
142
+ }
143
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-control input[type="submit"].wbcr-factory-type-save {
144
+ box-shadow: none;
145
+ min-width: 200px;
146
+ background-color: #8bc34a;
147
+ color: #fff;
148
+ }
149
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-control input[type="submit"].wbcr-factory-type-save:hover {
150
+ background: #9dbb7b;
151
+ color: #fff;
152
+ }
153
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-header .wbcr-factory-control input[type="submit"].wbcr-factory-type-save:active {
154
+ box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.3);
155
+ }
156
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar {
157
+ float: left;
158
+ vertical-align: top;
159
+ width: 230px;
160
+ background: #e6e6e6;
161
+ }
162
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul {
163
+ padding: 0;
164
+ margin-bottom: 0;
165
+ margin-top: 80px;
166
+ }
167
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab {
168
+ display: block;
169
+ background: #efefef;
170
+ margin: 1px 0;
171
+ }
172
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a {
173
+ display: block;
174
+ width: 100%;
175
+ padding: 20px 20px;
176
+ font-size: 12px;
177
+ color: #9a9a9a;
178
+ text-decoration: none;
179
+ text-transform: uppercase;
180
+ }
181
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:hover {
182
+ background: #f7f6f6;
183
+ }
184
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a,
185
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:active,
186
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:hover,
187
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:active,
188
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:focus {
189
+ outline: 0 !important;
190
+ box-shadow: none !important;
191
+ }
192
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab {
193
+ background: #fff;
194
+ }
195
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab a {
196
+ color: #222;
197
+ }
198
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-content-section,
199
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-right-sidebar-section {
200
+ display: inline-block;
201
+ vertical-align: top;
202
+ }
203
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-content-section {
204
+ width: 59%;
205
+ }
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;
212
+ margin: -40px 0 -20px;
213
+ background-color: #f9f9f9;
214
+ box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.1);
215
+ }
216
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-right-sidebar-section .wbcr-factory-sidebar-widget {
217
+ margin: 0 0 20px;
218
+ }
219
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget {
220
+ display: inline-block;
221
+ min-height: 230px;
222
+ width: 100%;
223
+ margin-top: 20px;
224
+ background-color: #fff;
225
+ padding: 20px 15px;
226
+ vertical-align: top;
227
+ }
228
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget.wbcr-factory-hide {
229
+ display: none;
230
+ }
231
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget.wbcr-factory-warning {
232
+ background: #fff4d0;
233
+ }
234
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget.wbcr-factory-danger {
235
+ background: #e2ffc0;
236
+ }
237
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget.wbcr-factory-success {
238
+ background: #ffebe9;
239
+ }
240
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget .wbcr-factory-hint-icon-simple {
241
+ display: inline-block;
242
+ width: 16px;
243
+ height: 16px;
244
+ line-height: 13px;
245
+ padding: 0;
246
+ font-size: 11px;
247
+ text-align: center;
248
+ color: #fff;
249
+ background: #E91E63;
250
+ border-radius: 3px;
251
+ }
252
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget .wbcr-factory-simple-grey {
253
+ background: #E91E63;
254
+ }
255
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget .wbcr-factory-simple-red {
256
+ background: #9e9e9e;
257
+ }
258
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget .wbcr-factory-simple-green {
259
+ background: #8bc34a;
260
+ }
261
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget .wbcr-factory-icon-5stars {
262
+ display: block;
263
+ width: 80px;
264
+ height: 17px;
265
+ background: url('../img/5-stars22.png') no-repeat;
266
+ vertical-align: middle;
267
+ margin-bottom: 5px;
268
+ }
269
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget #wbcr-factory-paypal-donation-form input[type="image"] {
270
+ display: block;
271
+ margin: 30px auto 0;
272
+ outline: none;
273
+ }
274
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget #wbcr-factory-paypal-donation-form input[type="image"] :focus,
275
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget #wbcr-factory-paypal-donation-form input[type="image"] :active {
276
+ box-shadow: none;
277
+ }
278
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-sidebar-widget #wbcr-factory-paypal-donation-form .wbcr-factory-donation-price {
279
+ font-size: 50px;
280
+ margin-top: 30px;
281
+ text-align: center;
282
+ font-weight: 600;
283
+ color: #8BC34A;
284
+ }
285
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-more_features .wbcr-factory-feature-box {
286
+ min-height: 240px;
287
+ margin-bottom: 20px;
288
+ text-align: center;
289
+ background: #fdfcf7;
290
+ padding: 30px;
291
+ border: 1px solid #f3f1e7;
292
+ }
293
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-more_features .wbcr-factory-feature-box .dashicons {
294
+ width: 50px;
295
+ height: 50px;
296
+ font-size: 50px;
297
+ color: #FFC107;
298
+ line-height: normal;
299
+ }
300
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-more_features .wbcr-factory-feature-box h3 {
301
+ color: #7b6111;
302
+ }
303
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-more_features .wbcr-factory-feature-box p {
304
+ color: #9e9e9e;
305
+ }
306
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-more_features .wbcr-factory-buttons-wrap {
307
+ margin-top: 20px;
308
+ text-align: center;
309
+ }
310
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-more_features .wbcr-factory-premium-button {
311
+ display: inline-block;
312
+ padding: 20px 60px;
313
+ background-color: #FFC107;
314
+ color: #866605;
315
+ text-decoration: none;
316
+ text-transform: uppercase;
317
+ font-weight: bold;
318
+ transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
319
+ }
320
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-more_features .wbcr-factory-premium-button:hover {
321
+ background-color: #ffce3a;
322
+ }
323
+ #WBCR .wbcr-factory-impressive-page-template-000 #wbcr-factory-confirm-dialog {
324
+ padding: 20px;
325
+ background: #ffffff;
326
+ }
327
+ #WBCR .wbcr-factory-impressive-page-template-000 #wbcr-factory-confirm-dialog .updated,
328
+ #WBCR .wbcr-factory-impressive-page-template-000 #wbcr-factory-confirm-dialog .alert {
329
+ display: none;
330
+ }
331
+ #WBCR .wbcr-factory-impressive-page-template-000 #wbcr-factory-confirm-dialog h2 {
332
+ font-size: 18px;
333
+ margin-top: 10px;
334
+ }
335
+ #WBCR .wbcr-factory-impressive-page-template-000 #wbcr-factory-confirm-dialog .wbcr-factory-confirm-description {
336
+ padding: 10px;
337
+ background: #ffedeb;
338
+ border: 1px solid #ffdfdc;
339
+ margin: 15px 0;
340
+ }
341
+ #WBCR .wbcr-factory-impressive-page-template-000 #wbcr-factory-confirm-dialog .wbcr-factory-confirm-hint {
342
+ margin-bottom: 15px;
343
+ color: #7b7b7b;
344
+ }
345
+ @media screen and (max-width: 950px) {
346
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar {
347
+ width: 70px;
348
+ }
349
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a {
350
+ font-size: 0;
351
+ }
352
+ #WBCR .wbcr-factory-impressive-page-template-000 .wbcr-factory-page-inner-wrap {
353
+ margin-left: 70px;
354
+ }
355
+ }
libs/factory/pages/templates/assets/css/impressive.page.template.less ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * General styles
3
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
+ * @copyright Alex Kovalev 23.08.2017
5
+ */
6
+
7
+ #WBCR {
8
+ .wbcr-factory-impressive-page-template-000 {
9
+ position: relative;
10
+
11
+ .form-group label {
12
+ font-weight: normal;
13
+ }
14
+
15
+ .form-horizontal .control-label {
16
+ max-width: 300px;
17
+ }
18
+
19
+ .factory-control-buttons {
20
+ text-align: right;
21
+ padding-right: 20px;
22
+ }
23
+
24
+ .factory-from-control-list {
25
+ label {
26
+ span {
27
+ display: inline-block;
28
+ vertical-align: bottom;
29
+ input[type="checkbox"], input[type="checkbox"]:focus {
30
+ outline: none;
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ .alert {
37
+ margin: 0px;
38
+ margin-bottom: 20px;
39
+ font-weight: bold;
40
+ padding: 10px;
41
+ margin-top: -15px !important;
42
+ }
43
+
44
+ .hint-warnign-color {
45
+ color: #ffeb3b;
46
+ }
47
+
48
+ .wbcr-factory-premium-color {
49
+ color: #ffc107;
50
+ }
51
+
52
+ .wbcr-factory-header {
53
+ padding: 20px 20px 40px;
54
+ }
55
+
56
+ .wbcr-factory-recomended-text {
57
+ display: block;
58
+ font-size: 11px;
59
+ font-weight: lighter;
60
+ color: #179347;
61
+ }
62
+
63
+ .wbcr-factory-options, .wbcr-factory-page {
64
+ position: relative;
65
+ background: #e6e6e6;
66
+ overflow: hidden;
67
+ //padding-left: 230px;
68
+
69
+ form.form-horizontal {
70
+ //min-height: 500px;
71
+ //position: relative;
72
+ //padding: 0 0 50px 100px;
73
+ }
74
+
75
+ &:after {
76
+ display: block;
77
+ content: '';
78
+ clear: both;
79
+ }
80
+ }
81
+
82
+ .wbcr-factory-page {
83
+ //min-height: 500px;
84
+ // padding: 80px 20px 50px 230px;
85
+ }
86
+
87
+ .wbcr-factory-page-inner-wrap {
88
+ //float: left;
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 {
100
+ position: absolute;
101
+ z-index: 13;
102
+ top: 0;
103
+ left: 0;
104
+ right: 0;
105
+ overflow: hidden;
106
+ background-color: #32373c;
107
+ color: #fff;
108
+ border-radius: 5px 5px 0 0;
109
+
110
+ .updated, .notice {
111
+ display: none !important;
112
+ }
113
+
114
+ .wbcr-factory-header-logo {
115
+ float: left;
116
+ padding: 25px 0;
117
+ font-size: 20px;
118
+ line-height: 30px;
119
+ font-weight: 400;
120
+ text-align: center;
121
+ //width: 170px;
122
+ background-color: #464b50;
123
+ color: #ccc;
124
+ padding-left: 25px;
125
+ margin-right: 10px;
126
+ background: none;
127
+ }
128
+
129
+ .wbcr-factory-header-title {
130
+ display: inline-block;
131
+ vertical-align: middle;
132
+ h2 {
133
+ font-size: 18px;
134
+ line-height: 30px;
135
+ font-weight: 300;
136
+ margin-top: 26px;
137
+ padding: 0 !important;
138
+ //margin: 0 !important;
139
+ overflow: hidden;
140
+ white-space: nowrap;
141
+ text-overflow: ellipsis;
142
+ color: #fff;
143
+ }
144
+ }
145
+
146
+ .wbcr-factory-control {
147
+ position: relative;
148
+ float: right;
149
+ margin: 12px;
150
+
151
+ input[type="submit"] {
152
+ display: inline-block;
153
+ vertical-align: top;
154
+ font-size: 13px;
155
+ font-weight: 600;
156
+ line-height: 20px;
157
+ text-transform: uppercase;
158
+ margin: 10px 0 0;
159
+ padding: 8px 30px;
160
+ cursor: pointer;
161
+ position: relative;
162
+ overflow: hidden;
163
+ border: none;
164
+ border-radius: 50px;
165
+ box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08) inset;
166
+ background-color: #f1f1f1;
167
+ color: inherit;
168
+ transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
169
+ text-align: center;
170
+ outline: none;
171
+ z-index: 3;
172
+
173
+ &.wbcr-factory-type-save {
174
+ box-shadow: none;
175
+ min-width: 200px;
176
+ background-color: #8bc34a;
177
+ color: #fff;
178
+ &:hover {
179
+ background: #9dbb7b;
180
+ color: #fff;
181
+ }
182
+ &:active {
183
+ box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.3);
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ }
190
+
191
+ .wbcr-factory-left-navigation-bar {
192
+ //display: inline-block;
193
+ float: left;
194
+ vertical-align: top;
195
+ width: 230px;
196
+ background: #e6e6e6;
197
+
198
+ ul {
199
+ padding: 0;
200
+ margin-bottom: 0;
201
+ margin-top: 80px;
202
+ .wbcr-factory-nav-tab {
203
+ display: block;
204
+ background: #efefef;
205
+ //padding: 15px 20px;
206
+ margin: 1px 0;
207
+ a {
208
+ display: block;
209
+ width: 100%;
210
+ padding: 20px 20px;
211
+ font-size: 12px;
212
+ color: #9a9a9a;
213
+ text-decoration: none;
214
+ text-transform: uppercase;
215
+ &:hover {
216
+ background: #f7f6f6;
217
+ }
218
+ &, &:active, &:hover, &:active, &:focus {
219
+ outline: 0 !important;
220
+ box-shadow: none !important;
221
+ }
222
+
223
+ }
224
+ &.wbcr-factory-active-tab {
225
+ background: #fff;
226
+ a {
227
+ color: #222;
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ /**
235
+ Content sections
236
+ */
237
+ .wbcr-factory-content-section, .wbcr-factory-right-sidebar-section {
238
+ display: inline-block;
239
+ vertical-align: top;
240
+ }
241
+
242
+ .wbcr-factory-content-section {
243
+ width: 59%;
244
+ &.wbcr-fullwidth {
245
+ width: 100%;
246
+ }
247
+ }
248
+
249
+ .wbcr-factory-right-sidebar-section {
250
+ width: 40%;
251
+ padding: 20px;
252
+ margin: -40px 0 -20px;
253
+ background-color: #f9f9f9;
254
+ box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.1);
255
+
256
+ .wbcr-factory-sidebar-widget {
257
+ margin: 0 0 20px;
258
+ }
259
+ }
260
+
261
+ /**
262
+ Widget in the sidebar of the plugin
263
+ */
264
+ .wbcr-factory-sidebar-widget {
265
+ display: inline-block;
266
+ min-height: 230px;
267
+ width: 100%;
268
+ margin-top: 20px;
269
+ background-color: #fff;
270
+ padding: 20px 15px;
271
+ vertical-align: top;
272
+
273
+ &.wbcr-factory-hide {
274
+ display: none;
275
+ }
276
+
277
+ &.wbcr-factory-warning {
278
+ background: #fff4d0;
279
+ }
280
+
281
+ &.wbcr-factory-danger {
282
+ background: #e2ffc0;
283
+ }
284
+
285
+ &.wbcr-factory-success {
286
+ background: #ffebe9;
287
+ }
288
+
289
+ .wbcr-factory-hint-icon-simple {
290
+ display: inline-block;
291
+ width: 16px;
292
+ height: 16px;
293
+ line-height: 13px;
294
+ padding: 0;
295
+ font-size: 11px;
296
+ text-align: center;
297
+ color: #fff;
298
+ background: #E91E63;
299
+ border-radius: 3px;
300
+ }
301
+ .wbcr-factory-simple-grey {
302
+ background: #E91E63;
303
+ }
304
+ .wbcr-factory-simple-red {
305
+ background: #9e9e9e;
306
+ }
307
+ .wbcr-factory-simple-green {
308
+ background: #8bc34a;
309
+ }
310
+
311
+ .wbcr-factory-icon-5stars {
312
+ display: block;
313
+ width: 80px;
314
+ height: 17px;
315
+ background: url('../img/5-stars22.png') no-repeat;
316
+ vertical-align: middle;
317
+ margin-bottom: 5px;
318
+ }
319
+
320
+ #wbcr-factory-paypal-donation-form {
321
+ input[type="image"] {
322
+ display: block;
323
+ margin: 30px auto 0;
324
+ outline: none;
325
+ :focus, :active {
326
+ box-shadow: none;
327
+ }
328
+ }
329
+ .wbcr-factory-donation-price {
330
+ font-size: 50px;
331
+ margin-top: 30px;
332
+ text-align: center;
333
+ font-weight: 600;
334
+ color: #8BC34A;
335
+ }
336
+ }
337
+ }
338
+
339
+ .wbcr-factory-page-more_features {
340
+ .wbcr-factory-feature-box {
341
+ //margin: 20px 0 0 20px;
342
+ min-height: 240px;
343
+ margin-bottom: 20px;
344
+ text-align: center;
345
+ background: #fdfcf7;
346
+ padding: 30px;
347
+ border: 1px solid #f3f1e7;
348
+ .dashicons {
349
+ width: 50px;
350
+ height: 50px;
351
+ font-size: 50px;
352
+ color: #FFC107;
353
+ line-height: normal;
354
+ }
355
+ h3 {
356
+ color: #7b6111;
357
+ }
358
+ p {
359
+ color: #9e9e9e;
360
+ }
361
+ }
362
+
363
+ .wbcr-factory-buttons-wrap {
364
+ margin-top: 20px;
365
+ text-align: center;
366
+ }
367
+
368
+ .wbcr-factory-premium-button {
369
+ display: inline-block;
370
+ padding: 20px 60px;
371
+ background-color: #FFC107;
372
+ color: #866605;
373
+ text-decoration: none;
374
+ text-transform: uppercase;
375
+ font-weight: bold;
376
+ transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
377
+ &:hover {
378
+ background-color: #ffce3a
379
+ }
380
+ }
381
+ }
382
+
383
+ #wbcr-factory-confirm-dialog {
384
+ padding: 20px;
385
+ background: #ffffff;
386
+
387
+ .updated, .alert {
388
+ display: none;
389
+ }
390
+ h2 {
391
+ font-size: 18px;
392
+ margin-top: 10px;
393
+ }
394
+ .wbcr-factory-confirm-description {
395
+ padding: 10px;
396
+ background: #ffedeb;
397
+ border: 1px solid #ffdfdc;
398
+ margin: 15px 0;
399
+ }
400
+ .wbcr-factory-confirm-hint {
401
+ margin-bottom: 15px;
402
+ color: #7b7b7b;
403
+ }
404
+ }
405
+ }
406
+ }
407
+
408
+ @media screen and (max-width: 950px) {
409
+ #WBCR {
410
+ .wbcr-factory-impressive-page-template-000 {
411
+ .wbcr-factory-left-navigation-bar {
412
+ width: 70px;
413
+
414
+ ul {
415
+ .wbcr-factory-nav-tab {
416
+ a {
417
+ font-size: 0;
418
+ }
419
+ }
420
+ }
421
+ }
422
+ .wbcr-factory-page-inner-wrap {
423
+ margin-left: 70px;
424
+ }
425
+
426
+ }
427
+ }
428
+ }
libs/factory/pages/templates/assets/img/5-stars22.png ADDED
Binary file
libs/factory/pages/templates/assets/img/paypal-donate.png ADDED
Binary file
libs/factory/pages/templates/assets/img/webcraftic-plugin-icon.png ADDED
Binary file
libs/factory/pages/templates/impressive-page.class.php ADDED
@@ -0,0 +1,625 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Impressive page themplate class
5
+ * Author: Webcraftic <wordpress.webraftic@gmail.com>
6
+ * Version: 1.0.0
7
+ */
8
+ abstract class FactoryPages322_ImpressiveThemplate extends FactoryPages322_AdminPage {
9
+
10
+ /**
11
+ * The id of the page in the admin menu.
12
+ *
13
+ * Mainly used to navigate between pages.
14
+ * @see FactoryPages322_AdminPage
15
+ *
16
+ * @since 1.0.0
17
+ * @var string
18
+ */
19
+
20
+ //public $menuTarget = 'options-general.php';
21
+
22
+ public $internal = true;
23
+
24
+ public $type = 'options';
25
+
26
+ public $page_menu_dashicon = null;
27
+
28
+ public $page_menu_position = 10;
29
+
30
+ public $show_page_title = true;
31
+
32
+ public $show_right_sidebar_in_options = false;
33
+
34
+ public $show_bottom_sidebar = true;
35
+
36
+ public function __construct(Factory326_Plugin $plugin)
37
+ {
38
+
39
+ $this->menuIcon = FACTORY_PAGES_322_URL . '/templates/assets/img/webcraftic-plugin-icon.png';
40
+
41
+ parent::__construct($plugin);
42
+
43
+ global $factory_impressive_page_menu;
44
+
45
+ $dashicon = (!empty($this->page_menu_dashicon))
46
+ ? ' ' . $this->page_menu_dashicon
47
+ : '';
48
+
49
+ $this->titlePluginActionLink = __('Settings', 'factory_pages_322');
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
+
64
+ public function __call($name, $arguments)
65
+ {
66
+ if( substr($name, 0, 3) == 'get' ) {
67
+ $called_method_name = 'show' . substr($name, 3);
68
+ if( method_exists($this, $called_method_name) ) {
69
+ ob_start();
70
+
71
+ $this->$called_method_name($arguments);
72
+ $content = ob_get_contents();
73
+ ob_end_clean();
74
+
75
+ return $content;
76
+ }
77
+ }
78
+
79
+ return null;
80
+ }
81
+
82
+ /**
83
+ * Requests assets (js and css) for the page.
84
+ *
85
+ * @see FactoryPages322_AdminPage
86
+ *
87
+ * @since 1.0.0
88
+ * @return void
89
+ */
90
+ public function assets($scripts, $styles)
91
+ {
92
+
93
+ $this->scripts->request('jquery');
94
+
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(FACTORY_PAGES_322_URL . '/templates/assets/css/impressive.page.template.css');
114
+ //$this->styles->add('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
115
+ }
116
+
117
+
118
+ public function getMenuTitle()
119
+ {
120
+ return $this->menuTitle;
121
+ }
122
+
123
+ public function getPageTitle()
124
+ {
125
+ return $this->getMenuTitle();
126
+ }
127
+
128
+ public function getPluginTitle()
129
+ {
130
+ return $this->plugin->pluginTitle;
131
+ }
132
+
133
+ public function getPageUrl()
134
+ {
135
+ return $this->getBaseUrl();
136
+ }
137
+
138
+ /**
139
+ * Get options with namespace
140
+ * @param $option_name
141
+ * @param bool $default
142
+ * @return mixed|void
143
+ */
144
+ public function getOption($option_name, $default = false)
145
+ {
146
+ return get_option($this->plugin->pluginName . '_' . $option_name, $default);
147
+ }
148
+
149
+ protected function getBaseUrl()
150
+ {
151
+ $resultId = $this->getResultId();
152
+
153
+ if( $this->menuTarget ) {
154
+ return add_query_arg(array('page' => $resultId), admin_url($this->menuTarget));
155
+ } else {
156
+ return add_query_arg(array('page' => $resultId), admin_url('admin.php'));
157
+ }
158
+ }
159
+
160
+ /**
161
+ * Shows a page or options
162
+ *
163
+ * @sinve 1.0.0
164
+ * @return void
165
+ */
166
+ public function indexAction()
167
+ {
168
+ global $factory_impressive_page_menu;
169
+
170
+ if( 'options' === $factory_impressive_page_menu[$this->plugin->pluginName][$this->getResultId()]['type'] ) {
171
+ $this->showOptions();
172
+ } else {
173
+ $this->showPage();
174
+ }
175
+ }
176
+
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.", 'factory_pages_322'));
181
+ }*/
182
+ }
183
+
184
+ public function printWarningNotice($message)
185
+ {
186
+ echo '<div class="alert alert-warning wbcr-factory-warning-notice"><p>' . $message . '</p></div>';
187
+ }
188
+
189
+ protected function showActionsNotice()
190
+ {
191
+ $notices = array(
192
+ array(
193
+ 'conditions' => array(
194
+ $this->plugin->pluginName . '_saved' => '1'
195
+ ),
196
+ 'type' => 'success',
197
+ 'message' => __('The settings have been updated successfully!', 'factory_pages_322') . (WP_CACHE
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.", 'factory_pages_322')
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;
207
+
208
+ if( isset($notice['conditions']) && !empty($notice['conditions']) ) {
209
+ foreach($notice['conditions'] as $condition_name => $value) {
210
+ if( !isset($_REQUEST[$condition_name]) || $_REQUEST[$condition_name] != $value ) {
211
+ $show_message = false;
212
+ }
213
+ }
214
+ }
215
+ if( !$show_message ) {
216
+ continue;
217
+ }
218
+
219
+ $notice_type = isset($notice['type'])
220
+ ? $notice['type']
221
+ : 'success';
222
+ ?>
223
+ <div id="message" class="alert alert-<?= $notice_type ?>" style="margin-top:-40px;margin-bottom:40px;">
224
+ <p><?= $notice['message'] ?></p>
225
+ </div>
226
+ <?php
227
+ }
228
+ }
229
+
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($factory_impressive_page_menu[$this->plugin->pluginName], 'factory_page_menu_sort');
240
+
241
+ ?>
242
+ <ul>
243
+ <?php foreach($factory_impressive_page_menu[$this->plugin->pluginName] as $pageScreen => $page) { ?>
244
+ <li class="wbcr-factory-nav-tab <?php if( $pageScreen === $this->getResultId() ) {
245
+ echo 'wbcr-factory-active-tab';
246
+ } ?>">
247
+ <a href="<?php echo $page['url'] ?>" id="<?= $this->getResultId() ?>-tab"><?php echo $page['title'] ?></a>
248
+ </li><?php } ?>
249
+ </ul>
250
+ <?php
251
+ }
252
+
253
+ protected function showHeader()
254
+ {
255
+ ?>
256
+ <div class="wbcr-factory-page-header">
257
+ <div class="wbcr-factory-header-logo"><?= $this->getPluginTitle(); ?>
258
+ <span class="version"><?= $this->plugin->version ?> </span>
259
+ <?php if( $this->show_page_title ): ?><span class="dash">—</span><?php endif; ?>
260
+ </div>
261
+ <?php if( $this->show_page_title ): ?>
262
+ <div class="wbcr-factory-header-title">
263
+ <h2><?php _e('Page') ?>: <?= $this->getPageTitle() ?></h2>
264
+ </div>
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', 'factory_pages_322'); ?>">
269
+ <?php wp_nonce_field('wbcr_factory_save_action', 'wbcr_factory_save'); ?>
270
+ </div><?php endif; ?>
271
+ </div>
272
+ <?php
273
+ }
274
+
275
+ protected function showRightSidebar()
276
+ {
277
+ $widgets = apply_filters('wbcr_factory_imppage_right_sidebar_widgets', array(
278
+ 'info_widget' => $this->getInfoWidget(),
279
+ 'rating_widget' => $this->getRatingWidget(),
280
+ 'donate_widget' => $this->getDonateWidget()
281
+ ), $this->id);
282
+
283
+ if( empty($widgets) ) {
284
+ return;
285
+ }
286
+
287
+ foreach($widgets as $widget_content):
288
+ echo $widget_content;
289
+ endforeach;
290
+ }
291
+
292
+ protected function showBottomSidebar()
293
+ {
294
+
295
+ $widgets = apply_filters('wbcr_factory_imppage_bottom_sidebar_widgets', array(
296
+ 'info_widget' => $this->getInfoWidget(),
297
+ 'rating_widget' => $this->getRatingWidget(),
298
+ 'donate_widget' => $this->getDonateWidget()
299
+ ), $this->id);
300
+
301
+ if( empty($widgets) ) {
302
+ return;
303
+ }
304
+ ?>
305
+ <div class="row">
306
+ <div class="wbcr-factory-top-sidebar">
307
+ <?php foreach($widgets as $widget_content): ?>
308
+ <div class="col-sm-4">
309
+ <?= $widget_content ?>
310
+ </div>
311
+ <?php endforeach; ?>
312
+ </div>
313
+ <?php
314
+ }
315
+
316
+ protected function showOptions()
317
+ {
318
+
319
+ global $factory_impressive_page_menu;
320
+
321
+ $form = new FactoryForms329_Form(array(
322
+ 'scope' => $this->plugin->pluginName,
323
+ 'name' => $this->getResultId() . "-options"
324
+ ), $this->plugin);
325
+
326
+ $form->setProvider(new FactoryForms329_OptionsValueProvider(array(
327
+ 'scope' => $this->plugin->pluginName
328
+ )));
329
+
330
+ $options = $this->getOptions();
331
+
332
+ if( isset($options[0]) && isset($options[0]['items']) && is_array($options[0]['items']) ) {
333
+
334
+ array_unshift($options[0]['items'], array(
335
+ 'type' => 'html',
336
+ 'html' => array($this, 'warningNotice')
337
+ ));
338
+
339
+ foreach($options[0]['items'] as $key => $value) {
340
+
341
+ if( $value['type'] == 'div' ) {
342
+ if( isset($options[0]['items'][$key]['items']) && !empty($options[0]['items'][$key]['items']) ) {
343
+ foreach($options[0]['items'][$key]['items'] as $group_key => $group_value) {
344
+ $options[0]['items'][$key]['items'][$group_key]['layout']['column-left'] = '6';
345
+ $options[0]['items'][$key]['items'][$group_key]['layout']['column-right'] = '6';
346
+ }
347
+
348
+ continue;
349
+ }
350
+ }
351
+
352
+ if( in_array($value['type'], array(
353
+ 'checkbox',
354
+ 'textarea',
355
+ 'integer',
356
+ 'textbox',
357
+ 'dropdown',
358
+ 'list'
359
+ )) ) {
360
+ $options[0]['items'][$key]['layout']['column-left'] = '6';
361
+ $options[0]['items'][$key]['layout']['column-right'] = '6';
362
+ }
363
+ }
364
+ }
365
+
366
+ $form->add($options);
367
+
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.', 'factory_pages_322'));
372
+ exit;
373
+ }
374
+
375
+ //todo: hook factory_impressive_page_before_save is deprecated
376
+ factory_326_do_action_deprecated('factory_impressive_page_before_save', array($form), '1.1.3', 'wbcr_factory_imppage_before_save');
377
+ do_action('wbcr_factory_imppage_before_save', $form);
378
+
379
+ $form->save();
380
+
381
+ // todo: test cache control
382
+ if( function_exists('w3tc_pgcache_flush') ) {
383
+ w3tc_pgcache_flush();
384
+ } elseif( function_exists('wp_cache_clear_cache') ) {
385
+ wp_cache_clear_cache();
386
+ } elseif( function_exists('rocket_clean_files') ) {
387
+ rocket_clean_files(esc_url($_SERVER['HTTP_REFERER']));
388
+ } else if( isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache') ) {
389
+ $GLOBALS['wp_fastest_cache']->deleteCache();
390
+ }
391
+
392
+ //todo: hook factory_impressive_page_saved is deprecated
393
+ factory_326_do_action_deprecated('factory_impressive_page_saved', array($form), '1.1.3', 'wbcr_factory_imppage_saved');
394
+ do_action('wbcr_factory_imppage_saved', $form);
395
+
396
+ $this->redirectToAction('index', array(
397
+ $this->plugin->pluginName . '_saved' => 1
398
+ ));
399
+ }
400
+
401
+ ?>
402
+ <div id="WBCR" class="wrap">
403
+ <div class="wbcr-factory-impressive-page-template-000 factory-bootstrap-330 factory-fontawesome-000">
404
+ <div class="wbcr-factory-options wbcr-factory-options-<?= $this->id ?>">
405
+ <div class="wbcr-factory-left-navigation-bar">
406
+ <?php $this->showPageMenu() ?>
407
+ </div>
408
+ <?php
409
+ $min_height = sizeof($factory_impressive_page_menu[$this->plugin->pluginName]) * 69;
410
+ ?>
411
+ <div class="wbcr-factory-page-inner-wrap" style="min-height:<?= $min_height ?>px">
412
+ <div class="wbcr-factory-content-section<?php if( !$this->show_right_sidebar_in_options ): echo ' wbcr-fullwidth'; endif ?>">
413
+ <form method="post" class="form-horizontal">
414
+ <?php $this->showHeader(); ?>
415
+ <?php $this->showActionsNotice(); ?>
416
+ <?php $form->html(); ?>
417
+ </form>
418
+ </div>
419
+ <?php if( $this->show_right_sidebar_in_options ): ?>
420
+ <div class="wbcr-factory-right-