WordPress Online Booking and Scheduling Plugin – Bookly - Version 2.0.1

Version Description

  • WordPress 4.0 support
  • Fixed translation into French
  • Fixed cron notifications
  • Fixed Google Calendar formatting
  • Clear plugin data upon uninstalling
Download this release

Release Info

Developer Ladela
Plugin Icon 128x128 WordPress Online Booking and Scheduling Plugin – Bookly
Version 2.0.1
Comparing to
See all releases

Version 2.0.1

Files changed (103) hide show
  1. backend/AB_Backend.php +229 -0
  2. backend/modules/appearance/AB_AppearanceController.php +81 -0
  3. backend/modules/appearance/resources/css/appearance.css +25 -0
  4. backend/modules/appearance/resources/js/appearance.js +320 -0
  5. backend/modules/appearance/templates/_1_service.php +195 -0
  6. backend/modules/appearance/templates/_2_time.php +108 -0
  7. backend/modules/appearance/templates/_3_details.php +48 -0
  8. backend/modules/appearance/templates/_4_payment.php +41 -0
  9. backend/modules/appearance/templates/_5_done.php +15 -0
  10. backend/modules/appearance/templates/_progress_tracker.php +24 -0
  11. backend/modules/appearance/templates/index.php +85 -0
  12. backend/modules/calendar/AB_CalendarController.php +674 -0
  13. backend/modules/calendar/forms/AB_AppointmentForm.php +23 -0
  14. backend/modules/calendar/resources/css/calendar.css +175 -0
  15. backend/modules/calendar/resources/css/chosen-sprite.png +0 -0
  16. backend/modules/calendar/resources/css/chosen-sprite@2x.png +0 -0
  17. backend/modules/calendar/resources/css/chosen.css +437 -0
  18. backend/modules/calendar/resources/css/jquery-ui-1.10.1.css +1174 -0
  19. backend/modules/calendar/resources/css/jquery.weekcalendar.css +287 -0
  20. backend/modules/calendar/resources/images/box-small.png +0 -0
  21. backend/modules/calendar/resources/images/calendar.png +0 -0
  22. backend/modules/calendar/resources/images/calendar1.png +0 -0
  23. backend/modules/calendar/resources/images/chosen-sprite.png +0 -0
  24. backend/modules/calendar/resources/images/information.png +0 -0
  25. backend/modules/calendar/resources/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  26. backend/modules/calendar/resources/images/user-white.png +0 -0
  27. backend/modules/calendar/resources/images/user.png +0 -0
  28. backend/modules/calendar/resources/js/calendar.js +525 -0
  29. backend/modules/calendar/resources/js/calendar_daypicker.js +126 -0
  30. backend/modules/calendar/resources/js/calendar_weekpicker.js +168 -0
  31. backend/modules/calendar/resources/js/chosen.jquery.js +1229 -0
  32. backend/modules/calendar/resources/js/jquery.weekcalendar.js +2951 -0
  33. backend/modules/calendar/resources/js/ng-app.js +379 -0
  34. backend/modules/calendar/templates/appointment_form.php +93 -0
  35. backend/modules/calendar/templates/calendar.php +127 -0
  36. backend/modules/customer/AB_CustomerController.php +206 -0
  37. backend/modules/customer/forms/AB_CustomerForm.php +28 -0
  38. backend/modules/customer/resources/js/ng-app.js +226 -0
  39. backend/modules/customer/templates/index.php +106 -0
  40. backend/modules/customer/templates/ng-new_customer_dialog.php +49 -0
  41. backend/modules/export/AB_ExportController.php +123 -0
  42. backend/modules/export/templates/index.php +47 -0
  43. backend/modules/notifications/AB_NotificationsController.php +62 -0
  44. backend/modules/notifications/templates/_tags_client_info.php +48 -0
  45. backend/modules/notifications/templates/_tags_evening_after.php +40 -0
  46. backend/modules/notifications/templates/_tags_evening_next_day.php +40 -0
  47. backend/modules/notifications/templates/_tags_event_next_day.php +8 -0
  48. backend/modules/notifications/templates/_tags_provider_info.php +60 -0
  49. backend/modules/notifications/templates/index.php +122 -0
  50. backend/modules/payment/AB_PaymentController.php +59 -0
  51. backend/modules/payment/templates/_alert.php +4 -0
  52. backend/modules/payment/templates/index.php +80 -0
  53. backend/modules/service/AB_ServiceController.php +174 -0
  54. backend/modules/service/forms/AB_CategoryForm.php +25 -0
  55. backend/modules/service/forms/AB_ServiceForm.php +46 -0
  56. backend/modules/service/resources/css/service.css +53 -0
  57. backend/modules/service/resources/js/service.js +289 -0
  58. backend/modules/service/templates/index.php +60 -0
  59. backend/modules/service/templates/list.php +31 -0
  60. backend/modules/service/templates/list_item.php +96 -0
  61. backend/modules/settings/AB_SettingsController.php +153 -0
  62. backend/modules/settings/forms/AB_BusinessHoursForm.php +59 -0
  63. backend/modules/settings/forms/AB_CompanyForm.php +58 -0
  64. backend/modules/settings/forms/AB_PaymentsForm.php +19 -0
  65. backend/modules/settings/resources/js/settings.js +116 -0
  66. backend/modules/settings/templates/_companyForm.php +49 -0
  67. backend/modules/settings/templates/_generalForm.php +103 -0
  68. backend/modules/settings/templates/_holidaysForm.php +24 -0
  69. backend/modules/settings/templates/_hoursForm.php +31 -0
  70. backend/modules/settings/templates/_paymentsForm.php +68 -0
  71. backend/modules/settings/templates/_purchaseCodeForm.php +26 -0
  72. backend/modules/settings/templates/admin_notice.php +17 -0
  73. backend/modules/settings/templates/index.php +32 -0
  74. backend/modules/staff/AB_StaffController.php +318 -0
  75. backend/modules/staff/forms/AB_StaffMemberEditForm.php +40 -0
  76. backend/modules/staff/forms/AB_StaffMemberForm.php +50 -0
  77. backend/modules/staff/forms/AB_StaffMemberNewForm.php +13 -0
  78. backend/modules/staff/forms/AB_StaffScheduleForm.php +46 -0
  79. backend/modules/staff/forms/AB_StaffScheduleItemBreakForm.php +27 -0
  80. backend/modules/staff/forms/AB_StaffServicesForm.php +136 -0
  81. backend/modules/staff/forms/widget/AB_TimeChoiceWidget.php +84 -0
  82. backend/modules/staff/resources/css/staff.css +27 -0
  83. backend/modules/staff/resources/js/staff.js +419 -0
  84. backend/modules/staff/templates/edit.php +161 -0
  85. backend/modules/staff/templates/holidays.php +25 -0
  86. backend/modules/staff/templates/list.php +33 -0
  87. backend/modules/staff/templates/list_item.php +5 -0
  88. backend/modules/staff/templates/new.php +36 -0
  89. backend/modules/staff/templates/schedule.php +179 -0
  90. backend/modules/staff/templates/services.php +70 -0
  91. backend/modules/tinymce/AB_TinyMCE_Plugin.php +67 -0
  92. backend/modules/tinymce/resources/images/calendar.png +0 -0
  93. backend/modules/tinymce/resources/images/menu-icon.png +0 -0
  94. backend/modules/tinymce/templates/popup.php +384 -0
  95. backend/resources/bootstrap/css/bootstrap-editable.css +655 -0
  96. backend/resources/bootstrap/css/bootstrap.css +6278 -0
  97. backend/resources/bootstrap/css/bootstrap.min.css +865 -0
  98. backend/resources/bootstrap/img/clear.png +0 -0
  99. backend/resources/bootstrap/img/glyphicons-halflings-white.png +0 -0
  100. backend/resources/bootstrap/img/glyphicons-halflings.png +0 -0
  101. backend/resources/bootstrap/img/loading.gif +0 -0
  102. backend/resources/bootstrap/js/bootstrap-editable.min.js +7 -0
  103. backend/resources/bootstrap/js/bootstrap.js +1804 -0
backend/AB_Backend.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include 'modules/appearance/AB_AppearanceController.php';
6
+ include 'modules/staff/AB_StaffController.php';
7
+ include 'modules/service/AB_ServiceController.php';
8
+ include 'modules/calendar/AB_CalendarController.php';
9
+ include 'modules/payment/AB_PaymentController.php';
10
+ include 'modules/notifications/AB_NotificationsController.php';
11
+ include 'modules/settings/AB_SettingsController.php';
12
+ include 'modules/customer/AB_CustomerController.php';
13
+ include 'modules/tinymce/AB_TinyMCE_Plugin.php';
14
+ include 'modules/export/AB_ExportController.php';
15
+
16
+ class AB_Backend {
17
+
18
+ public function __construct() {
19
+ add_action( 'admin_menu', array( $this, 'addAdminMenu' ) );
20
+ // Appearance
21
+ $this->apearanceController = new AB_AppearanceController();
22
+ // Staff members
23
+ $this->staffController = new AB_StaffController();
24
+ // Services
25
+ $this->serviceController = new AB_ServiceController();
26
+ // Calendar
27
+ $this->calendarController = new AB_CalendarController();
28
+ // Payments
29
+ $this->paymentController = new AB_PaymentController();
30
+ // Notifications
31
+ $this->notificationsController = new AB_NotificationsController();
32
+ // Settings
33
+ $this->settingsController = new AB_SettingsController();
34
+ // Customers
35
+ $this->customerController = new AB_CustomerController();
36
+ // Frontend booking ajax requests
37
+ $this->bookingController = new AB_BookingController();
38
+ // Export
39
+ $this->exportController = new AB_ExportController();
40
+
41
+ add_action( 'wp_loaded', array( $this, 'init' ) );
42
+ add_action( 'admin_init', array( $this, 'addTinyMCEPlugin' ) );
43
+ add_action( 'admin_notices', array( $this->settingsController, 'showAdminNotice' ) );
44
+ }
45
+
46
+ public function addTinyMCEPlugin() {
47
+ /** @var WP_User $current_user */
48
+ global $current_user;
49
+ new AB_TinyMCE_Plugin();
50
+ }
51
+
52
+ public function init() {
53
+ if ( !session_id() ) {
54
+ @session_start();
55
+ }
56
+
57
+ if ( isset( $_POST[ 'action' ] ) ) {
58
+ switch ( $_POST[ 'action' ] ) {
59
+ case 'ab_update_staff':
60
+ $this->staffController->updateStaff();
61
+ break;
62
+ }
63
+ }
64
+
65
+ // for Appearance\Services\Settings all CSS and JS must be located directly in <HEAD>
66
+ if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ab-system-appearance' ) { // Appearance
67
+ // include StyleSheets
68
+ //wp_enqueue_style( 'ab-reset', plugins_url( 'css/ab-reset.css', dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ) );
69
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', __FILE__ ) );
70
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', __FILE__ ) );
71
+ wp_enqueue_style( 'ab-bootstrap-editable', plugins_url( 'resources/bootstrap/css/bootstrap-editable.css', __FILE__ ) );
72
+ wp_enqueue_style( 'ab-ladda-themeless', plugins_url( 'css/ladda-themeless.min.css',
73
+ dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ) );
74
+ wp_enqueue_style( 'ab-ladda-min', plugins_url( 'css/ladda.min.css',
75
+ dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ) );
76
+ wp_enqueue_style( 'ab-frontend-style', plugins_url( 'css/ab_frontend_style.css',
77
+ dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ) );
78
+ wp_enqueue_style( 'ab-columnizer', plugins_url( 'css/ab-columnizer.css',
79
+ dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ) );
80
+ wp_enqueue_style( 'ab-pickadate', plugins_url( 'css/pickadate.classic.css',
81
+ dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ) );
82
+ wp_enqueue_style( 'ab-columnizer', plugins_url( 'resources/css/ab-columnizer.css',
83
+ dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ) );
84
+ wp_enqueue_style( 'wp-color-picker' );
85
+ wp_enqueue_style( 'ab-appearance', plugins_url( 'modules/appearance/resources/css/appearance.css', __FILE__ ) );
86
+ // include JavaScript
87
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js',
88
+ __FILE__ ), array( 'jquery' ) );
89
+ wp_enqueue_script( 'ab-bootstrap-editable', plugins_url( 'resources/bootstrap/js/bootstrap-editable.min.js',
90
+ __FILE__ ), array( 'jquery' ) );
91
+ wp_enqueue_script( 'ab-appearance',
92
+ plugins_url( 'modules/appearance/resources/js/appearance.js', __FILE__ ),
93
+ array( 'jquery' )
94
+ );
95
+ wp_enqueue_script( 'ab-pickadate', plugins_url( 'js/pickadate.legacy.min.js',
96
+ dirname(__FILE__). '../../frontend/resources/AB_Frontend.php' ), array( 'jquery' ) );
97
+ wp_localize_script( 'ab-pickadate', 'BooklyL10n', array(
98
+ 'today' => __( 'Today', 'ab' ),
99
+ 'month' => array(
100
+ 'January' => __( 'January', 'ab' ),
101
+ 'February' => __( 'February', 'ab' ),
102
+ 'March' => __( 'March', 'ab' ),
103
+ 'April' => __( 'April', 'ab' ),
104
+ 'May' => __( 'May', 'ab' ),
105
+ 'June' => __( 'June', 'ab' ),
106
+ 'July' => __( 'July', 'ab' ),
107
+ 'August' => __( 'August', 'ab' ),
108
+ 'September' => __( 'September', 'ab' ),
109
+ 'October' => __( 'October', 'ab' ),
110
+ 'November' => __( 'November', 'ab' ),
111
+ 'December' => __( 'December', 'ab' )
112
+ ),
113
+ 'day' => array(
114
+ 'Sun' => __( 'Sun', 'ab' ),
115
+ 'Mon' => __( 'Mon', 'ab' ),
116
+ 'Tue' => __( 'Tue', 'ab' ),
117
+ 'Wed' => __( 'Wed', 'ab' ),
118
+ 'Thu' => __( 'Thu', 'ab' ),
119
+ 'Fri' => __( 'Fri', 'ab' ),
120
+ 'Sat' => __( 'Sat', 'ab' )
121
+ )
122
+ ) );
123
+ wp_enqueue_script( 'wp-color-picker' );
124
+ } elseif ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ab-system-services' ) { // Services
125
+ // include StyleSheets
126
+ wp_enqueue_style( 'wp-color-picker' );
127
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', __FILE__ ) );
128
+ wp_enqueue_style( 'ab-service', plugins_url( 'modules/service/resources/css/service.css', __FILE__ ) );
129
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', __FILE__ ) );
130
+ // include JavaScript
131
+ wp_enqueue_script( 'wp-color-picker' );
132
+ wp_enqueue_script( 'ab-popup', plugins_url( 'resources/js/ab_popup.js', __FILE__ ), array( 'jquery' ) );
133
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', __FILE__ ), array( 'jquery' ) );
134
+ wp_enqueue_script( 'ab-service', plugins_url( 'modules/service/resources/js/service.js', __FILE__ ), array( 'jquery' ) );
135
+ wp_localize_script( 'ab-service', 'BooklyL10n', array(
136
+ 'are_you_sure' => __( 'Are you sure?', 'ab' ),
137
+ 'please_select_at_least_one_service' => __( 'Please select at least one service.', 'ab'),
138
+ ) );
139
+ } elseif ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ab-system-settings' ) { // Settings
140
+ // include StyleSheets
141
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', __FILE__ ) );
142
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', __FILE__ ) );
143
+ wp_enqueue_style( 'ab-jCal', plugins_url( 'resources/css/jCal.css', __FILE__ ) );
144
+ // include JavaScript
145
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', __FILE__ ), array( 'jquery' ) );
146
+ wp_enqueue_script( 'ab-settings', plugins_url( 'modules/settings/resources/js/settings.js', __FILE__ ), array( 'jquery' ) );
147
+ wp_enqueue_script( 'ab-jCal', plugins_url( 'resources/js/jCal.js', __FILE__ ), array( 'jquery' ) );
148
+ wp_localize_script( 'ab-jCal', 'BooklyL10n', array(
149
+ 'we_are_not_working' => __( 'We are not working on this day', 'ab' ),
150
+ 'repeat' => __( 'Repeat every year', 'ab' ),
151
+ 'month' => array(
152
+ 'January' => __( 'January', 'ab' ),
153
+ 'February' => __( 'February', 'ab' ),
154
+ 'March' => __( 'March', 'ab' ),
155
+ 'April' => __( 'April', 'ab' ),
156
+ 'May' => __( 'May', 'ab' ),
157
+ 'June' => __( 'June', 'ab' ),
158
+ 'July' => __( 'July', 'ab' ),
159
+ 'August' => __( 'August', 'ab' ),
160
+ 'September' => __( 'September', 'ab' ),
161
+ 'October' => __( 'October', 'ab' ),
162
+ 'November' => __( 'November', 'ab' ),
163
+ 'December' => __( 'December', 'ab' )
164
+ ),
165
+ 'day' => array(
166
+ 'Mon' => __( 'Mon', 'ab' ),
167
+ 'Tue' => __( 'Tue', 'ab' ),
168
+ 'Wed' => __( 'Wed', 'ab' ),
169
+ 'Thu' => __( 'Thu', 'ab' ),
170
+ 'Fri' => __( 'Fri', 'ab' ),
171
+ 'Sat' => __( 'Sat', 'ab' ),
172
+ 'Sun' => __( 'Sun', 'ab' )
173
+ )
174
+ ) );
175
+ }
176
+ }
177
+
178
+ public function addAdminMenu() {
179
+ /** @var wpdb $wpdb */
180
+ global $wpdb;
181
+ /** @var WP_User $current_user */
182
+ global $current_user;
183
+
184
+ // translated submenu pages
185
+ $calendar = __( 'Calendar', 'ab' );
186
+ $staff_members = __( 'Staff members', 'ab' );
187
+ $services = __( 'Services', 'ab' );
188
+ $customers = __( 'Customers', 'ab' );
189
+ $notifications = __( 'Notifications', 'ab' );
190
+ $payments = __( 'Payments', 'ab' );
191
+ $appearance = __( 'Appearance', 'ab' );
192
+ $settings = __( 'Settings', 'ab' );
193
+ $export = __( 'Export', 'ab' );
194
+
195
+ if ( in_array( 'administrator', $current_user->roles )
196
+ || $wpdb->get_var( $wpdb->prepare(
197
+ 'SELECT COUNT(id) AS numb FROM ab_staff WHERE wp_user_id = %d', $current_user->ID
198
+ ) ) ) {
199
+ if ( function_exists( 'add_options_page' ) ) {
200
+ $dynamic_position = '80.0000001' . mt_rand( 1, 1000 ); // position always is under `Settings`
201
+ add_menu_page( 'Bookly', 'Bookly', 'read', 'ab-system',
202
+ array( $this->staffController, 'renderStaffMembers'),
203
+ plugins_url('resources/images/menu.png', __FILE__), $dynamic_position );
204
+ add_submenu_page( 'ab-system', $calendar, $calendar, 'read', 'ab-system-calendar',
205
+ array( $this->calendarController, 'renderCalendar' ) );
206
+ add_submenu_page( 'ab-system', $staff_members, $staff_members, 'manage_options', 'ab-system-staff',
207
+ array( $this->staffController, 'renderStaffMembers' ) );
208
+ add_submenu_page( 'ab-system', $services, $services, 'manage_options', 'ab-system-services',
209
+ array( $this->serviceController, 'index' ) );
210
+ add_submenu_page( 'ab-system', $customers, $customers, 'manage_options', 'ab-system-customers',
211
+ array( $this->customerController, 'index' ) );
212
+ add_submenu_page( 'ab-system', $notifications, $notifications, 'manage_options', 'ab-system-notifications',
213
+ array( $this->notificationsController, 'index' ) );
214
+ add_submenu_page( 'ab-system', $payments, $payments, 'manage_options', 'ab-system-payments',
215
+ array( $this->paymentController, 'index' ) );
216
+ add_submenu_page( 'ab-system', $appearance, $appearance, 'manage_options', 'ab-system-appearance',
217
+ array( $this->apearanceController, 'index' ) );
218
+ add_submenu_page( 'ab-system', $settings, $settings, 'manage_options', 'ab-system-settings',
219
+ array( $this->settingsController, 'index' ) );
220
+ add_submenu_page( 'ab-system', $export, $export, 'manage_options', 'ab-system-export',
221
+ array( $this->exportController, 'index' ) );
222
+
223
+ global $submenu;
224
+ unset( $submenu[ 'ab-system' ][ 0 ] );
225
+ }
226
+ }
227
+ }
228
+
229
+ }
backend/modules/appearance/AB_AppearanceController.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ /**
6
+ * Class AB_AppearanceController
7
+ */
8
+ class AB_AppearanceController extends AB_Controller {
9
+
10
+ /**
11
+ * Default Action
12
+ */
13
+ public function index() {
14
+ // initialize steps (tabs)
15
+ $this->steps = array(
16
+ 1 => get_option( 'ab_appearance_text_step_service' ),
17
+ 2 => get_option( 'ab_appearance_text_step_time' ),
18
+ 3 => get_option( 'ab_appearance_text_step_details' ),
19
+ 4 => get_option( 'ab_appearance_text_step_payment' ),
20
+ 5 => get_option( 'ab_appearance_text_step_done' )
21
+ );
22
+
23
+ // render general layout
24
+ $this->render( 'index' );
25
+ } // index
26
+
27
+ /**
28
+ * Update options
29
+ */
30
+ public function executeUpdateAppearanceOptions() {
31
+ if ( count( $this->getPost() ) ) {
32
+ $get_option = $this->getParameter( 'options' );
33
+ $options = array(
34
+ // Info text.
35
+ 'ab_appearance_text_info_first_step' => $get_option[ 'text_info_first_step' ],
36
+ 'ab_appearance_text_info_second_step' => $get_option[ 'text_info_second_step' ],
37
+ 'ab_appearance_text_info_third_step' => $get_option[ 'text_info_third_step' ],
38
+ 'ab_appearance_text_info_fourth_step' => $get_option[ 'text_info_fourth_step' ],
39
+ 'ab_appearance_text_info_fifth_step' => $get_option[ 'text_info_fifth_step' ],
40
+ // Color.
41
+ 'ab_appearance_color' => $get_option[ 'color' ],
42
+ // Step, label and option texts.
43
+ 'ab_appearance_text_step_service' => $get_option[ 'text_step_service' ],
44
+ 'ab_appearance_text_step_time' => $get_option[ 'text_step_time' ],
45
+ 'ab_appearance_text_step_details' => $get_option[ 'text_step_details' ],
46
+ 'ab_appearance_text_step_payment' => $get_option[ 'text_step_payment' ],
47
+ 'ab_appearance_text_step_done' => $get_option[ 'text_step_done' ],
48
+ 'ab_appearance_text_label_category' => $get_option[ 'text_label_category' ],
49
+ 'ab_appearance_text_label_service' => $get_option[ 'text_label_service' ],
50
+ 'ab_appearance_text_label_employee' => $get_option[ 'text_label_employee' ],
51
+ 'ab_appearance_text_label_select_date' => $get_option[ 'text_label_select_date' ],
52
+ 'ab_appearance_text_label_start_from' => $get_option[ 'text_label_start_from' ],
53
+ 'ab_appearance_text_label_finish_by' => $get_option[ 'text_label_finish_by' ],
54
+ 'ab_appearance_text_label_name' => $get_option[ 'text_label_name' ],
55
+ 'ab_appearance_text_label_phone' => $get_option[ 'text_label_phone' ],
56
+ 'ab_appearance_text_label_email' => $get_option[ 'text_label_email' ],
57
+ 'ab_appearance_text_label_notes' => $get_option[ 'text_label_notes' ],
58
+ 'ab_appearance_text_option_service' => $get_option[ 'text_option_service' ],
59
+ 'ab_appearance_text_option_category' => $get_option[ 'text_option_category' ],
60
+ 'ab_appearance_text_option_employee' => $get_option[ 'text_option_employee' ],
61
+ // Checkboxes.
62
+ 'ab_appearance_show_progress_tracker' => $get_option[ 'progress_tracker' ],
63
+ );
64
+
65
+ // Save options.
66
+ foreach ( $options as $option_name => $option_value ) {
67
+ update_option( $option_name, $option_value );
68
+ }
69
+ }
70
+ exit;
71
+ } // executeUpdateAppearanceOptions
72
+
73
+ /**
74
+ * Override parent method to add 'wp_ajax_ab_' prefix
75
+ * so current 'execute*' methods look nicer.
76
+ */
77
+ protected function registerWpActions( $prefix = '' ) {
78
+ parent::registerWpActions( 'wp_ajax_ab_' );
79
+ } // registerWpActions
80
+
81
+ } // AB_AppearanceController
backend/modules/appearance/resources/css/appearance.css ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Backend-Appearance */
2
+
3
+ div.controls {
4
+ float: right;
5
+ margin-right: 15px;
6
+ margin-top: 10px;
7
+ }
8
+
9
+ span.spinner {
10
+ float: left;
11
+ margin-right: 20px;
12
+ }
13
+
14
+ div.ab-second-step-buttons div.ab-first-step-buttons div.ab-third-step-buttons div.ab-fourth-step-buttons div.ab-fifth-step-buttons {
15
+ float: left;
16
+ margin-left: 395px;
17
+ }
18
+
19
+ div.ab-second-step-buttons input.ab-back-forth-button {
20
+ /* styles */
21
+ }
22
+
23
+ div.ab-second-step-options {
24
+ /* styles */
25
+ }
backend/modules/appearance/resources/js/appearance.js ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+ var // Progress Tracker
3
+ $progress_tracker_option = $('input#ab-progress-tracker-checkbox'),
4
+ // Tabs
5
+ $tabs = $('div.tabbable').find('.nav-tabs'),
6
+ $tab_content = $('div.tab-content'),
7
+ // Buttons.
8
+ $update_button = $('#update_button'),
9
+ $reset_button = $('#reset_button'),
10
+ // Texts.
11
+ $text_step_service = $('#ab-text-step-service'),
12
+ $text_step_time = $('#ab-text-step-time'),
13
+ $text_step_details = $('#ab-text-step-details'),
14
+ $text_step_payment = $('#ab-text-step-payment'),
15
+ $text_step_done = $('#ab-text-step-done'),
16
+ $text_label_category = $('#ab-text-label-category'),
17
+ $text_option_category = $('#ab-text-option-category'),
18
+ $text_option_service = $('#ab-text-option-service'),
19
+ $text_option_employee = $('#ab-text-option-employee'),
20
+ $text_label_service = $('#ab-text-label-service'),
21
+ $text_label_employee = $('#ab-text-label-employee'),
22
+ $text_label_select_date = $('#ab-text-label-select_date'),
23
+ $text_label_start_from = $('#ab-text-label-start_from'),
24
+ $text_label_finish_by = $('#ab-text-label-finish_by'),
25
+ $text_label_name = $('#ab-text-label-name'),
26
+ $text_label_phone = $('#ab-text-label-phone'),
27
+ $text_label_email = $('#ab-text-label-email'),
28
+ $text_label_notes = $('#ab-text-label-notes'),
29
+ $text_info_service = $('#ab-text-info-first'),
30
+ $text_info_time = $('#ab-text-info-second'),
31
+ $text_info_details = $('#ab-text-info-third'),
32
+ $text_info_payment = $('#ab-text-info-fourth'),
33
+ $text_info_done = $('#ab-text-info-fifth'),
34
+ $color_picker = $('.wp-color-picker'),
35
+ $ab_editable = $('.ab_editable');
36
+
37
+ // menu fix for WP 3.8.1
38
+ $('#toplevel_page_ab-system > ul').css('margin-left', '0px');
39
+
40
+ // Tabs
41
+ $tabs.find('.ab-step-tabs').on('click', function() {
42
+ var $step_id = $(this).data('step-id');
43
+ // hide all other tab content and show only current
44
+ $tab_content.children('div[data-step-id!="' + $step_id + '"]').removeClass('active').hide();
45
+ $tab_content.children('div[data-step-id="' + $step_id + '"]').addClass('active').show();
46
+ }).filter('li:first').trigger('click');
47
+
48
+ // Apply color from color picker.
49
+ var applyColor = function() {
50
+ var color_important = $color_picker.wpColorPicker('color') + '!important';
51
+ $('div.ab-progress-tracker').find('li.ab-step-tabs').filter('.active').find('a').css('color', $color_picker.wpColorPicker('color'));
52
+ $('div.ab-progress-tracker').find('li.ab-step-tabs').filter('.active').find('div.step').css('background', $color_picker.wpColorPicker('color'));
53
+ $('.ab-mobile-step_1 label').css('color', $color_picker.wpColorPicker('color'));
54
+ $('.ab-next-step, .ab-mobile-next-step').css('background', $color_picker.wpColorPicker('color'));
55
+ $('.ab-week-days label').css('background-color', $color_picker.wpColorPicker('color'));
56
+ $('.pickadate__calendar').attr('style', 'background: ' + color_important);
57
+ $('.pickadate__header').attr('style', 'border-bottom: ' + '1px solid ' + color_important);
58
+ // $('.pickadate__nav--next, .pickadate__nav--prev').attr('style', 'border-left: 6px solid ' + color_important);
59
+ // $('.pickadate__nav--next:before').attr('style', 'border-left: 6px solid ' + color_important);
60
+ // $('.pickadate__nav--prev:before').attr('style', 'border-right: 6px solid ' + color_important);
61
+ // $('.pickadate__day:hover').attr('style', 'color: ' + color_important);
62
+ // $('.pickadate__day--selected:hover').attr('style', '');
63
+ $('.pickadate__day--selected').attr('style', 'color: ' + color_important);
64
+ $('.pickadate__button--clear').attr('style', 'color: ' + color_important);
65
+ $('.pickadate__button--today').attr('style', 'color: ' + color_important);
66
+ $('.ab-columnizer .ab-available-day').css({
67
+ 'background': $color_picker.wpColorPicker('color'),
68
+ 'border-color': $color_picker.wpColorPicker('color')
69
+ });
70
+ $('.ab-time-no-resize').css('background-color', $color_picker.wpColorPicker('color'));
71
+ $('.ab-columnizer .ab-available-hour').off().hover(
72
+ function() { // mouse-on
73
+ $(this).css({
74
+ 'color': $color_picker.wpColorPicker('color'),
75
+ 'border': '2px solid ' + $color_picker.wpColorPicker('color')
76
+ });
77
+ $(this).find('.ab-hour-icon').css({
78
+ 'border-color': $color_picker.wpColorPicker('color'),
79
+ 'color': $color_picker.wpColorPicker('color')
80
+ });
81
+ $(this).find('.ab-hour-icon > span').css({
82
+ 'background': $color_picker.wpColorPicker('color')
83
+ });
84
+ },
85
+ function() { // mouse-out
86
+ $(this).css({
87
+ 'color': '#333333',
88
+ 'border': '1px solid ' + '#cccccc'
89
+ });
90
+ $(this).find('.ab-hour-icon').css({
91
+ 'border-color': '#333333',
92
+ 'color': '#cccccc'
93
+ });
94
+ $(this).find('.ab-hour-icon > span').css({
95
+ 'background': '#cccccc'
96
+ });
97
+ }
98
+ );
99
+ $('div.ab-details-list > label.ab-formLabel').css('color', $color_picker.wpColorPicker('color'));
100
+ $('.ab-to-second-step, .ab-to-fourth-step, .ab-to-third-step, .ab-final-step')
101
+ .css('background', $color_picker.wpColorPicker('color'));
102
+ };
103
+ $color_picker.wpColorPicker({
104
+ change : function() {
105
+ applyColor();
106
+ }
107
+ });
108
+
109
+ $('.ab-requested-date-from').pickadate({
110
+ dateMin: true,
111
+ clear: false,
112
+ onRender: function() {
113
+ applyColor();
114
+ }
115
+ });
116
+
117
+ // Update options.
118
+ $update_button.on('click', function() {
119
+ var data = {
120
+ action: 'ab_update_appearance_options',
121
+ options: {
122
+ // Color.
123
+ 'color' : $color_picker.wpColorPicker('color'),
124
+ // Info text.
125
+ 'text_info_first_step' : $.trim($text_info_service.text()),
126
+ 'text_info_second_step' : $.trim($text_info_time.text()),
127
+ 'text_info_third_step' : $.trim($text_info_details.text()),
128
+ 'text_info_fourth_step' : $.trim($text_info_payment.text()),
129
+ 'text_info_fifth_step' : $.trim($text_info_done.text()),
130
+ // Step and label texts.
131
+ 'text_step_service' : $.trim($text_step_service.text()),
132
+ 'text_step_time' : $.trim($text_step_time.text()),
133
+ 'text_step_details' : $.trim($text_step_details.text()),
134
+ 'text_step_payment' : $.trim($text_step_payment.text()),
135
+ 'text_step_done' : $.trim($text_step_done.text()),
136
+ 'text_label_category' : $.trim($text_label_category.text()),
137
+ 'text_label_service' : $.trim($text_label_service.text()),
138
+ 'text_label_employee' : $.trim($text_label_employee.text()),
139
+ 'text_label_select_date' : $.trim($text_label_select_date.text()),
140
+ 'text_label_start_from' : $.trim($text_label_start_from.text()),
141
+ 'text_label_finish_by' : $.trim($text_label_finish_by.text()),
142
+ 'text_label_name' : $.trim($text_label_name.text()),
143
+ 'text_label_phone' : $.trim($text_label_phone.text()),
144
+ 'text_label_email' : $.trim($text_label_email.text()),
145
+ 'text_label_notes' : $.trim($text_label_notes.text()),
146
+ 'text_option_category' : $.trim($text_option_category.text()),
147
+ 'text_option_service' : $.trim($text_option_service.text()),
148
+ 'text_option_employee' : $.trim($text_option_employee.text()),
149
+ // Checkboxes.
150
+ 'progress_tracker' : Number($('#ab-progress-tracker-checkbox').is(':checked'))
151
+ } // options
152
+ }; // data
153
+
154
+ // update data and show spinner while updating
155
+ $('#update_spinner').show();
156
+ $.post(ajaxurl, data, function (response) {
157
+ $('#update_spinner').hide();
158
+ $('.alert').show();
159
+ });
160
+ });
161
+
162
+ // Reset options to defaults.
163
+ $reset_button.on('click', function() {
164
+ // Reset color.
165
+ $color_picker.wpColorPicker('color', $color_picker.data('selected'));
166
+
167
+ // Reset texts.
168
+ jQuery.each($('.editable'), function() {
169
+ var $default_value = $(this).data('default'),
170
+ $steps = $(this).data('link-class');
171
+
172
+ $(this).text($default_value); //default value for texts
173
+ $('.' + $steps).text($default_value); //default value for steps
174
+ $(this).editable('setValue', $default_value); // default value for editable inputs
175
+ });
176
+
177
+ // default value for multiple inputs
178
+ $text_label_category.editable('setValue', {
179
+ label: $text_label_category.text(),
180
+ option: $text_option_category.text(),
181
+ id_option: $text_label_category.data('link-class')
182
+ });
183
+
184
+ $text_label_service.editable('setValue', {
185
+ label: $text_label_service.text(),
186
+ option: $text_option_service.text(),
187
+ id_option: $text_label_service.data('link-class')
188
+ });
189
+
190
+ $text_label_employee.editable('setValue', {
191
+ label: $text_label_employee.text(),
192
+ option: $text_option_employee.text(),
193
+ id_option: $text_label_employee.data('link-class')
194
+ });
195
+
196
+ });
197
+
198
+ $progress_tracker_option.change(function(){
199
+ $(this).is(':checked') ? $('div.ab-progress-tracker').show() : $('div.ab-progress-tracker').hide();
200
+ }).trigger('change');
201
+
202
+ // Clickable week-days.
203
+ $('.ab-week-day').on('change', function () {
204
+ var self = $(this);
205
+ if (self.is(':checked') && !self.parent().hasClass('active')) {
206
+ self.parent().addClass('active');
207
+ } else if (self.parent().hasClass('active')) {
208
+ self.parent().removeClass('active')
209
+ }
210
+ });
211
+
212
+ /**
213
+ * Helper functions.
214
+ */
215
+ function nl2br(str, is_xhtml) {
216
+ var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>';
217
+ return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ breakTag +'$2');
218
+ }
219
+ function escapeHtml(string) {
220
+ var entityMap = {
221
+ "&": "&amp;",
222
+ "<": "&lt;",
223
+ ">": "&gt;",
224
+ '"': '&quot;',
225
+ "'": '&#39;',
226
+ "/": '&#x2F;'
227
+ };
228
+ return String(string).replace(/[&<>"'\/]/g, function (s) {
229
+ return entityMap[s];
230
+ });
231
+ }
232
+
233
+ var multiple = function (options) {
234
+ this.init('multiple', options, multiple.defaults);
235
+ };
236
+
237
+ //inherit from Abstract input
238
+ $.fn.editableutils.inherit(multiple, $.fn.editabletypes.abstractinput);
239
+
240
+ $.extend(multiple.prototype, {
241
+ render: function() {
242
+ this.$input = this.$tpl.find('input');
243
+ },
244
+
245
+ value2html: function(value, element) {
246
+ if(!value) {
247
+ $(element).empty();
248
+ return;
249
+ }
250
+ $(element).text(value.label);
251
+ $('#' + value.id_option).text(value.option);
252
+ },
253
+
254
+ activate: function () {
255
+ this.$input.filter('[name="label"]').focus();
256
+ },
257
+
258
+ value2input: function(value) {
259
+ if(!value) {
260
+ return;
261
+ }
262
+ this.$input.filter('[name="label"]').val(value.label);
263
+ this.$input.filter('[name="option"]').val(value.option);
264
+ this.$input.filter('[name="id_option"]').val(value.id_option);
265
+ },
266
+
267
+ input2value: function() {
268
+ return {
269
+ label: this.$input.filter('[name="label"]').val(),
270
+ option: this.$input.filter('[name="option"]').val(),
271
+ id_option: this.$input.filter('[name="id_option"]').val()
272
+ };
273
+ }
274
+ });
275
+
276
+ multiple.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, {
277
+ tpl: '<div class="editable-multiple"><label><input type="text" name="label" class="input-medium"></label></div>'+
278
+ '<div style="margin-top:5px;" class="editable-multiple"><label><input type="text" name="option" class="input-medium"><input type="hidden" name="id_option"></label></div>',
279
+
280
+ inputclass: ''
281
+ });
282
+
283
+ $.fn.editabletypes.multiple = multiple;
284
+
285
+ $text_label_category.editable({
286
+ value: {
287
+ label: $text_label_category.text(),
288
+ option: $text_option_category.text(),
289
+ id_option: $text_label_category.data('link-class')
290
+ }
291
+ });
292
+ $text_label_service.editable({
293
+ value: {
294
+ label: $text_label_service.text(),
295
+ option: $text_option_service.text(),
296
+ id_option: $text_label_service.data('link-class')
297
+ }
298
+ });
299
+ $text_label_employee.editable({
300
+ value: {
301
+ label: $text_label_employee.text(),
302
+ option: $text_option_employee.text(),
303
+ id_option: $text_label_employee.data('link-class')
304
+ }
305
+ });
306
+
307
+ $('#ab-text-info-first').add('#ab-text-info-second').add('#ab-text-info-third').add('#ab-text-info-fourth').add('#ab-text-info-fifth').editable({placement: 'right', emptytext: ''});
308
+ $ab_editable.editable({emptytext: ''});
309
+
310
+ $.fn.editableform.template = '<form class="form-inline editableform"> <div class="control-group"> <div> <div class="editable-input"></div><div class="editable-buttons"></div></div><div style="margin-top: 10px;" class="editable-notes"></div><div class="editable-error-block"></div></div> </form>';
311
+
312
+ $ab_editable.on('shown', function(e, editable) {
313
+ $('.editable-notes').html($(e.target).data('notes'));
314
+ });
315
+
316
+ $("span[data-link-class^='text_step_']").on('save', function(e, params) {
317
+ $("span[data-link-class='" + $(e.target).data('link-class') + "']").editable('setValue', params.newValue);
318
+ $("span." + $(e.target).data('link-class')).text(params.newValue);
319
+ });
320
+ }); // jQuery
backend/modules/appearance/templates/_1_service.php ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+
3
+ <div class="ab-booking-form" style="overflow: hidden">
4
+
5
+ <!-- Progress Tracker-->
6
+ <?php $step = 1; include '_progress_tracker.php'; ?>
7
+
8
+ <div class="ab-wrapper-content">
9
+ <div style="margin-bottom: 15px!important;" class="ab-row-fluid">
10
+ <span data-inputclass="input-xxlarge" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_info_first_step' ) ); ?>" data-link-class="ab-text-info-first" class="ab-text-info-first-preview ab-bold ab_editable" id="ab-text-info-first" data-rows="7" data-type="textarea" data-pk="1"><?php echo esc_html( get_option( 'ab_appearance_text_info_first_step' ) ) ?></span>
11
+ </div>
12
+ <div class=ab-service-form>
13
+ <div class="ab-mobile-step_1 ab-row-fluid">
14
+ <div class="ab-category-list ab-left">
15
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_category' ); ?>" data-link-class="ab-text-option-category" class="ab-category-title text_category_label" id="ab-text-label-category" data-type="multiple" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_category' )) ?></label>
16
+ <div class="ab-select-wrap">
17
+ <select class="select-list ab-select-mobile ab-select-category" style="width: 100%">
18
+ <option value="" class="editable" id="ab-text-option-category" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_option_category' ) ); ?>"><?php echo esc_attr( get_option( 'ab_appearance_text_option_category' ) ); ?></option>
19
+ <option value="1">Cosmetic Dentistry</option>
20
+ <option value="2">Invisalign</option>
21
+ <option value="3">Orthodontics</option>
22
+ <option value="4">Dentures</option>
23
+ </select>
24
+ </div>
25
+ </div>
26
+ <div class="ab-category-list ab-category-list-center ab-left">
27
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_service' ); ?>" data-link-class="ab-text-option-service" class="ab-category-title text_service_label" id="ab-text-label-service" data-type="multiple" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_service' )) ?></label>
28
+ <div class="ab-select-wrap">
29
+ <select class="select-list ab-select-mobile ab-select-service" style="width: 100%">
30
+ <option value="" class="editable" id="ab-text-option-service" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_option_service' ) ); ?>"><?php echo esc_attr( get_option( 'ab_appearance_text_option_service' ) ); ?></option>
31
+ <option value="1">Crown and Bridge</option>
32
+ <option value="2">Teeth Whitening</option>
33
+ <option value="3">Veneers</option>
34
+ <option value="4">Invisalign (invisable braces)</option>
35
+ <option value="5">Orthodontics (braces)</option>
36
+ <option value="6">Wisdom tooth Removal</option>
37
+ <option value="7">Root Canal Treatment</option>
38
+ <option value="8">Dentures</option>
39
+ </select>
40
+ </div>
41
+ </div>
42
+ <div class="ab-category-list ab-left">
43
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_employee' ); ?>" data-link-class="ab-text-option-employee" class="ab-category-title text_employee_label" id="ab-text-label-employee" data-type="multiple" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_employee' )) ?></label>
44
+ <div class="ab-select-wrap">
45
+ <select class="select-list ab-select-mobile ab-select-employee" style="width: 100%">
46
+ <option value="" class="editable" id="ab-text-option-employee" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_option_employee' ) ); ?>"><?php echo esc_attr( get_option( 'ab_appearance_text_option_employee' ) ); ?></option>
47
+ <option value="1">Nick Knight</option>
48
+ <option value="2">Jane Howard</option>
49
+ <option value="3">Ashley Stamp</option>
50
+ <option value="4">Bradley Tannen</option>
51
+ <option value="5">Wayne Turner</option>
52
+ <option value="6">Emily Taylor</option>
53
+ <option value="7">Hugh Canberg</option>
54
+ <option value="8">Jim Gonzalez</option>
55
+ <option value="9">Nancy Stinson</option>
56
+ <option value="10">Marry Murphy</option>
57
+ </select>
58
+ </div>
59
+ </div>
60
+ <button class="ab-right ab-mobile-next-step ladda-button orange zoom-in" onclick="return false">
61
+ <span><?php _e( 'Next', 'ab' ) ?></span>
62
+ </button>
63
+ </div>
64
+ <div class="ab-mobile-step_2">
65
+ <div class="ab-row-fluid">
66
+ <div class="ab-left ab-available-date">
67
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_select_date' ); ?>" data-link-class="text_select_date_label" class="text_select_date_label ab_editable" id="ab-text-label-select_date" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_select_date' )) ?></label>
68
+ <div class="ab-input-wrap">
69
+ <span class="ab-requested-date-wrap">
70
+ <input style="height: 30px!important;" class="ab-requested-date-from select-list" type="text" value="29 November, 2013">
71
+ </span>
72
+ </div>
73
+ </div>
74
+ <div class="ab-left ab-available-days">
75
+ <ul class="ab-week-days">
76
+ <li>
77
+ <div class="ab-bold"><?php _e('Sun', 'ab' ) ?></div>
78
+ <!-- #11055: all days are checked by default -->
79
+ <label class="active">
80
+ <input class="ab-week-day ab-week-day-1" value="1" checked="checked" type="checkbox">
81
+ </label>
82
+ </li>
83
+ <li>
84
+ <div class="ab-bold"><?php _e( 'Mon', 'ab' ) ?></div>
85
+ <!-- #11055: all days are checked by default -->
86
+ <label class="active">
87
+ <input class="ab-week-day ab-week-day-2" value="2" checked="checked" type="checkbox">
88
+ </label>
89
+ </li>
90
+ <li>
91
+ <div class="ab-bold"><?php _e( 'Tue', 'ab' ) ?></div>
92
+ <!-- #11055: all days are checked by default -->
93
+ <label class="active">
94
+ <input class="ab-week-day ab-week-day-3" value="3" checked="checked" type="checkbox">
95
+ </label>
96
+ </li>
97
+ <li>
98
+ <div class="ab-bold"><?php _e( 'Wed', 'ab' ) ?></div>
99
+ <!-- #11055: all days are checked by default -->
100
+ <label class="active">
101
+ <input class="ab-week-day ab-week-day-4" value="4" checked="checked" type="checkbox">
102
+ </label>
103
+ </li>
104
+ <li>
105
+ <div class="ab-bold"><?php _e( 'Thu', 'ab' ) ?></div>
106
+ <!-- #11055: all days are checked by default -->
107
+ <label class="active">
108
+ <input class="ab-week-day ab-week-day-5" value="5" checked="checked" type="checkbox">
109
+ </label>
110
+ </li>
111
+ <li>
112
+ <div class="ab-bold"><?php _e( 'Fri', 'ab' ) ?></div>
113
+ <!-- #11055: all days are checked by default -->
114
+ <label class="active">
115
+ <input class="ab-week-day ab-week-day-6" value="6" checked="checked" type="checkbox">
116
+ </label>
117
+ </li>
118
+ <li>
119
+ <div class="ab-bold"><?php _e( 'Sat', 'ab' ) ?></div>
120
+ <!-- #11055: all days are checked by default -->
121
+ <label class="active">
122
+ <input class="ab-week-day ab-week-day-7" value="7" checked="checked" type="checkbox">
123
+ </label>
124
+ </li>
125
+ </ul>
126
+ </div>
127
+ <div class="ab-left ab-time-range">
128
+ <div class="ab-left ab-time-from">
129
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_start_from' ); ?>" data-link-class="text_start_from_label" class="text_start_from_label ab_editable" id="ab-text-label-start_from" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_start_from' )) ?></label>
130
+ <div class="ab-select-wrap">
131
+ <select class="select-list ab-requested-time-from" style="width: auto">
132
+ <option value="00:00">12:00 am</option>
133
+ <option value="01:00">1:00 am</option>
134
+ <option value="02:00">2:00 am</option>
135
+ <option value="03:00">3:00 am</option>
136
+ <option value="04:00">4:00 am</option>
137
+ <option value="05:00">5:00 am</option>
138
+ <option value="06:00">6:00 am</option>
139
+ <option value="07:00">7:00 am</option>
140
+ <option value="08:00" selected="selected">8:00 am</option>
141
+ <option value="09:00">9:00 am</option>
142
+ <option value="10:00">10:00 am</option>
143
+ <option value="11:00">11:00 am</option>
144
+ <option value="12:00">12:00 pm</option>
145
+ <option value="13:00">1:00 pm</option>
146
+ <option value="14:00">2:00 pm</option>
147
+ <option value="15:00">3:00 pm</option>
148
+ <option value="16:00">4:00 pm</option>
149
+ <option value="17:00">5:00 pm</option>
150
+ <option value="18:00">6:00 pm</option>
151
+ <option value="19:00">7:00 pm</option>
152
+ <option value="20:00">8:00 pm</option>
153
+ <option value="21:00">9:00 pm</option>
154
+ <option value="22:00">10:00 pm</option>
155
+ <option value="23:00">11:00 pm</option>
156
+ </select>
157
+ </div>
158
+ </div>
159
+ <div class="ab-left ab-time-to">
160
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_finish_by' ); ?>" data-link-class="text_finish_by_label" class="text_finish_by_label ab_editable" id="ab-text-label-finish_by" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_finish_by' )) ?></label>
161
+ <div class="ab-select-wrap">
162
+ <select class="select-list ab-requested-time-to" style="width: auto">
163
+ <option value="09:00">9:00 am</option>
164
+ <option value="10:00">10:00 am</option>
165
+ <option value="11:00">11:00 am</option>
166
+ <option value="12:00">12:00 pm</option>
167
+ <option value="13:00">1:00 pm</option>
168
+ <option value="14:00">2:00 pm</option>
169
+ <option value="15:00">3:00 pm</option>
170
+ <option value="16:00">4:00 pm</option>
171
+ <option value="17:00">5:00 pm</option>
172
+ <option value="18:00">6:00 pm</option>
173
+ <option value="19:00">7:00 pm</option>
174
+ <option value="20:00">8:00 pm</option>
175
+ <option value="21:00">9:00 pm</option>
176
+ <option value="22:00">10:00 pm</option>
177
+ <option value="23:00">11:00 pm</option>
178
+ <option value="23:59">12:00 am</option>
179
+ </select>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ <div class="ab-row-fluid ab-nav-steps last-row ab-clear">
185
+ <button class="ab-right ab-mobile-prev-step ladda-button orange zoom-in">
186
+ <span><?php _e( 'Back', 'ab' ) ?></span>
187
+ </button>
188
+ <button class="ab-right ab-next-step ladda-button orange zoom-in">
189
+ <span><?php _e( 'Next', 'ab' ) ?></span>
190
+ </button>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ </div>
backend/modules/appearance/templates/_2_time.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <!-- ab-booking-info-second-preview -->
3
+ <div id="ab-booking-form" class="ab-booking-form" style="overflow: hidden">
4
+ <!-- Progress Tracker-->
5
+ <?php $step = 2; include '_progress_tracker.php'; ?>
6
+
7
+ <div style="margin-bottom: 15px!important;" class="ab-row-fluid">
8
+ <span data-inputclass="input-xxlarge" data-notes="<?php _e( '<b>[[SERVICE_NAME]]</b> - name of service, <b>[[STAFF_NAME]]</b> - name of staff', 'ab' ); ?>" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_info_second_step' ) ) ?>" data-link-class="ab-text-info-second" class="ab-text-info-second-preview ab-row-fluid ab_editable" id="ab-text-info-second" data-type="textarea" data-pk="1"><?php echo esc_html( get_option( 'ab_appearance_text_info_second_step' ) ) ?></span>
9
+ </div>
10
+ <!-- timeslots -->
11
+ <div class="ab-columnizer-wrap" style="height: 400px;">
12
+ <div class="ab-columnizer">
13
+ <div class="ab-time-screen">
14
+ <div class="ab-column">
15
+ <button class="ab-available-day ab-first-child" value="">Wed, Jul 31</button>
16
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:00 pm</button>
17
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:15 pm</button>
18
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:30 pm</button>
19
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:45 pm</button>
20
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:00 pm</button>
21
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:15 pm</button>
22
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:30 pm</button>
23
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:45 pm</button>
24
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:00 pm</button>
25
+ </div>
26
+ <div class="ab-column">
27
+ <button class="ab-available-hour ab-first-child"><i class="ab-hour-icon"><span></span></i>3:15 pm</button>
28
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:30 pm</button>
29
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:45 pm</button>
30
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:00 pm</button>
31
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:15 pm</button>
32
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:30 pm</button>
33
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:45 pm</button>
34
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>5:00 pm</button>
35
+ <button class="ab-available-day ab-first-child" value="">Thu, Aug 01</button>
36
+ <button class="ab-available-hour ab-last-child"><i class="ab-hour-icon"><span></span></i>10:00 am</button>
37
+ </div>
38
+ <div class="ab-column">
39
+ <button class="ab-available-hour ab-first-child"><i class="ab-hour-icon"><span></span></i>10:15 am</button>
40
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>10:30 am</button>
41
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>10:45 am</button>
42
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:00 am</button>
43
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:15 am</button>
44
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:30 am</button>
45
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:45 am</button>
46
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>12:00 pm</button>
47
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>12:15 pm</button>
48
+ <button class="ab-available-hour ab-last-child""><i class="ab-hour-icon"><span></span></i>12:30 pm</button>
49
+ </div>
50
+ <div class="ab-column">
51
+ <button class="ab-available-hour ab-first-child"><i class="ab-hour-icon"><span></span></i>12:45 pm</button>
52
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:00 pm</button>
53
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:15 pm</button>
54
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:30 pm</button>
55
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:45 pm</button>
56
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:00 pm</button>
57
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:15 pm</button>
58
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:30 pm</button>
59
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:45 pm</button>
60
+ <button class="ab-available-hour ab-last-child"><i class="ab-hour-icon"><span></span></i>5:00 pm</button>
61
+ </div>
62
+ <div class="ab-column">
63
+ <button class="ab-available-day ab-first-child" value="">Fri, Aug 02</button>
64
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:00 pm</button>
65
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:15 pm</button>
66
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:30 pm</button>
67
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>1:45 pm</button>
68
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:00 pm</button>
69
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:15 pm</button>
70
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:30 pm</button>
71
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>2:45 pm</button>
72
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:00 pm</button>
73
+ </div>
74
+ <div class="ab-column">
75
+ <button class="ab-available-hour ab-first-child"><i class="ab-hour-icon"><span></span></i>3:15 pm</button>
76
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:30 pm</button>
77
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>3:45 pm</button>
78
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:00 pm</button>
79
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:15 pm</button>
80
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:30 pm</button>
81
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>4:45 pm</button>
82
+ <button class=ab-available-hour><i class="ab-hour-icon"><span></span></i>5:00 pm</button>
83
+ <button class="ab-available-day ab-first-child" value="">Sat, Aug 03</button>
84
+ <button class="ab-available-hour ab-last-child"><i class="ab-hour-icon"><span></span></i>10:00 am</button>
85
+ </div>
86
+ <div class="ab-column">
87
+ <button class="ab-available-hour ab-first-child"><i class="ab-hour-icon"><span></span></i>10:15 am</button>
88
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>10:30 am</button>
89
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>10:45 am</button>
90
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:00 am</button>
91
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:15 am</button>
92
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:30 am</button>
93
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>11:45 am</button>
94
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>12:00 pm</button>
95
+ <button class="ab-available-hour"><i class="ab-hour-icon"><span></span></i>12:15 pm</button>
96
+ <button class="ab-available-hour ab-last-child""><i class="ab-hour-icon"><span></span></i>12:30 pm</button>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ <div class="ab-time-buttons ab-row-fluid ab-nav-steps last-row ab-clear">
102
+ <a href="javascript:void(0)" class="ab-time-no-resize ab-time-next ab-right"></a>
103
+ <a href="javascript:void(0)" class="ab-time-no-resize ab-time-prev ab-right"></a>
104
+ <button class="ab-time-no-resize ab-left ab-to-first-step ladda-button orange zoom-in">
105
+ <span><?php _e( 'Back', 'ab' ) ?></span>
106
+ </button>
107
+ </div>
108
+ </div>
backend/modules/appearance/templates/_3_details.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <!-- ab-booking-info-third-preview -->
3
+ <div class="ab-booking-form" style="overflow: hidden">
4
+ <!-- Progress Tracker-->
5
+ <?php $step = 3; include '_progress_tracker.php'; ?>
6
+
7
+ <div style="margin-bottom: 15px!important;" class="ab-row-fluid">
8
+ <span data-inputclass="input-xxlarge" data-notes = "<?php _e( '<b>[[STAFF_NAME]]</b> - name of staff, <b>[[SERVICE_NAME]]</b> - name of service,', 'ab' );?> <br> <?php _e( '<b>[[SERVICE_TIME]]</b> - time of service, <b>[[SERVICE_DATE]]</b> - date of service', 'ab' );?> <br> <?php _e( '<b>[[SERVICE_PRICE]]</b> - price of service.', 'ab' ); ?>" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_info_third_step' ) ) ?>" data-link-class="ab-text-info-third" class="ab-text-info-third-preview ab-row-fluid ab_editable" id="ab-text-info-third" data-type="textarea" data-pk="1"><?php echo esc_html( get_option( 'ab_appearance_text_info_third_step' ) ) ?></span>
9
+ </div>
10
+ <form class="ab-your-details-form ab-row-fluid">
11
+ <div class="ab-details-list ab-left">
12
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_name' ); ?>" data-link-class="text_name_label" class="ab-formLabel text_name_label ab_editable" id="ab-text-label-name" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_name' )) ?></label>
13
+ <div class="ab-details-wrap">
14
+ <input class="ab-full-name" type="text" value="" maxlength="60">
15
+ </div>
16
+ <div class="ab-full-name-error ab-bold"></div>
17
+ </div>
18
+ <div class="ab-details-list ab-left">
19
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_phone' ); ?>" data-link-class="text_phone_label" class="ab-formLabel text_phone_label ab_editable" id="ab-text-label-phone" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_phone' )) ?></label>
20
+ <div class="ab-details-wrap">
21
+ <input class="ab-user-phone" maxlength="30" type="text" value="">
22
+ </div>
23
+ <div class="ab-user-phone-error ab-bold"></div>
24
+ </div>
25
+ <div class="ab-details-list ab-left">
26
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_email' ); ?>" data-link-class="text_email_label" class="ab-formLabel text_email_label ab_editable" id="ab-text-label-email" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_email' )) ?></label>
27
+ <div class="ab-details-wrap" style="margin-right: 0">
28
+ <input class="ab-user-email" maxlength="40" type="text" value="">
29
+ </div>
30
+ <div class="ab-user-email-error ab-bold"></div>
31
+ </div>
32
+ <div class="ab-clear"></div>
33
+ <div class="ab-details-list ab-textarea">
34
+ <label data-default="<?php echo get_option( 'ab_appearance_text_label_notes' ); ?>" data-link-class="text_notes_label" class="ab-formLabel text_notes_label ab_editable" id="ab-text-label-notes" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_label_notes' )) ?></label>
35
+ <div style="margin: 5px 2px 0 0">
36
+ <textarea rows="6" class="ab-user-notes"></textarea>
37
+ </div>
38
+ </div>
39
+ </form>
40
+ <div class="ab-row-fluid last-row ab-nav-steps ab-clear">
41
+ <button class="ab-left ab-to-second-step ladda-button orange zoom-in" style="margin-right: 10px;">
42
+ <span><?php _e( 'Back', 'ab' ) ?></span>
43
+ </button>
44
+ <button class="ab-right ab-to-fourth-step ladda-button orange zoom-in">
45
+ <span><?php _e( 'Next', 'ab' ) ?></span>
46
+ </button>
47
+ </div>
48
+ </div>
backend/modules/appearance/templates/_4_payment.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <!-- ab-booking-info-third-preview -->
3
+ <div class="ab-booking-form" style="overflow: hidden">
4
+ <!-- Progress Tracker-->
5
+ <?php $step = 4; include '_progress_tracker.php'; ?>
6
+ <div style="margin-bottom: 15px!important;" class="ab-row-fluid">
7
+ <span data-inputclass="input-xxlarge" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_info_fourth_step' ) ) ?>" data-link-class="ab-text-info-fourth" class="ab-text-info-fourth-preview ab-row-fluid ab_editable" id="ab-text-info-fourth" data-type="textarea" data-pk="1"><?php echo esc_html( get_option( 'ab_appearance_text_info_fourth_step' ) ) ?></span>
8
+ </div>
9
+ <!-- payment -->
10
+ <div class="ab-payment">
11
+ <!-- label -->
12
+ <div class="ab-row-fluid">
13
+ <label>
14
+ <input type="radio" name="payment" class="ab-local-payment" checked="checked" value="local"/>
15
+ <?php _e( 'I will pay locally', 'ab' ) ?>
16
+ </label>
17
+ </div>
18
+ <div class="ab-row-fluid">
19
+ <label>
20
+ <input type="radio" name="payment" class="ab-paypal-payment" value="paypal"/>
21
+ <?php _e( 'I will pay now with PayPal', 'ab' ) ?>
22
+ </label>
23
+ </div>
24
+ <!-- buttons -->
25
+ <div class="ab-local-pay-button ab-row-fluid ab-nav-steps last-row">
26
+ <button class="ab-left ab-to-third-step ladda-button orange zoom-in" style="margin-right: 10px;">
27
+ <span><?php _e( 'Back', 'ab' ) ?></span>
28
+ </button>
29
+ <button class="ab-right ab-final-step ladda-button orange zoom-in">
30
+ <span><?php _e( 'Next', 'ab' ) ?></span>
31
+ </button>
32
+ </div>
33
+ </div>
34
+ </div>
35
+
36
+ <!-- fourth step options -->
37
+ <div class="ab-fourth-step-options">
38
+ <!-- booking-info -->
39
+ <div class="ab-booking-details">
40
+ </div>
41
+ </div>
backend/modules/appearance/templates/_5_done.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <!-- ab-booking-info-third-preview -->
3
+ <div class="ab-booking-form" style="overflow: hidden">
4
+ <!-- Progress Tracker-->
5
+ <?php $step = 5; include '_progress_tracker.php'; ?>
6
+ <div style="margin-bottom: 15px!important;" class="ab-row-fluid">
7
+ <span data-inputclass="input-xxlarge" data-link-class="ab-text-info-fifth" class="ab-text-info-fifth-preview ab_editable" data-default="<?php echo esc_attr( get_option( 'ab_appearance_text_info_fifth_step' ) ) ?>" id="ab-text-info-fifth" data-type="textarea" data-pk="1"><?php echo nl2br( esc_html( get_option( 'ab_appearance_text_info_fifth_step' ) ) ) ?></span>
8
+ </div>
9
+ </div>
10
+
11
+ <!-- fifth step options -->
12
+ <div class="ab-fifth-step-options">
13
+ <div class="ab-booking-details">
14
+ </div>
15
+ </div>
backend/modules/appearance/templates/_progress_tracker.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ab-progress-tracker">
2
+ <ul class="ab-progress-bar nav-3">
3
+ <li class="ab-step-tabs first active">
4
+ <a href="javascript:void(0)">1. <span data-default="<?php echo get_option( 'ab_appearance_text_step_service' ); ?>" data-link-class="text_step_1" class="text_service ab_editable" id="ab-text-step-service" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_step_service' )) ?></span></a>
5
+ <div class="step"></div>
6
+ </li>
7
+ <li class="ab-step-tabs<?php if ($step >= 2): ?> active<?php endif ?>">
8
+ <a href="javascript:void(0)">2. <span data-default="<?php echo get_option( 'ab_appearance_text_step_time' ); ?>" data-link-class="text_step_2" class="text_time text_step_2 ab_editable" id="ab-text-step-time" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_step_time' )) ?></span></a>
9
+ <div class="step"></div>
10
+ </li>
11
+ <li class="ab-step-tabs<?php if ($step >= 3): ?> active<?php endif ?>">
12
+ <a href="javascript:void(0)">3. <span data-default="<?php echo get_option( 'ab_appearance_text_step_details' ); ?>" data-link-class="text_step_3" class="text_details text_step_3 ab_editable" id="ab-text-step-details" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_step_details' )) ?></span></a>
13
+ <div class="step"></div>
14
+ </li>
15
+ <li class="ab-step-tabs<?php if ($step >= 4): ?> active<?php endif ?>">
16
+ <a href="javascript:void(0)">4. <span data-default="<?php echo get_option( 'ab_appearance_text_step_payment' ); ?>" data-link-class="text_step_4" class="text_payment ab_editable" id="ab-text-step-payment" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_step_payment' )) ?></span></a>
17
+ <div class="step"></div>
18
+ </li>
19
+ <li class="ab-step-tabs last<?php if ($step >= 5): ?> active<?php endif ?>">
20
+ <a href="javascript:void(0)">5. <span data-default="<?php echo get_option( 'ab_appearance_text_step_done' ); ?>" data-link-class="text_step_5" class="text_done ab_editable" id="ab-text-step-done" data-type="text" data-pk="1"><?php echo esc_html(get_option( 'ab_appearance_text_step_done' )) ?></span></a>
21
+ <div class="step"></div>
22
+ </li>
23
+ </ul>
24
+ </div>
backend/modules/appearance/templates/index.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+
3
+ <div class="ab-title">
4
+ <div class="alert" style="font-size: 14px; display: none;">
5
+ <button type="button" class="close" onclick="jQuery('.alert').hide()">&times;</button>
6
+ <?php _e( 'Settings saved.', 'ab' ); ?>
7
+ </div>
8
+ <?php _e( 'Appearance', 'ab' ) ?>
9
+ </div>
10
+
11
+ <input type=text class="wp-color-picker appearance-color-picker" name=color
12
+ value="<?php echo get_option( 'ab_appearance_color' ) ?>"
13
+ data-selected="<?php echo get_option( 'ab_appearance_color' ) ?>" />
14
+
15
+ <div style="max-width: 960px;">
16
+ <form method=post id=common_settings style="margin-right: 15px">
17
+ <legend id=main_form>
18
+ <div>
19
+ <input id=ab-progress-tracker-checkbox name=ab-progress-tracker-checkbox <?php if (get_option( 'ab_appearance_show_progress_tracker' )): ?>checked=checked<?php endif ?> type=checkbox />
20
+ <label style="display: inline" for="progress_tracker">
21
+ <b><?php _e( 'Show form progress tracker', 'ab' ) ?></b>
22
+ </label>
23
+ </div>
24
+ </legend>
25
+ </form>
26
+ <!-- Tabs -->
27
+ <div class=tabbable style="margin-top: 20px;">
28
+ <ul class="nav nav-tabs ab-nav-tabs">
29
+ <?php foreach ( $steps as $step_id => $step_name ): ?>
30
+ <li class="ab-step-tab-<?php echo $step_id ?> ab-step-tabs<?php if ( $step_id == 1 ): ?> active<?php endif ?>" data-step-id="<?php echo $step_id ?>">
31
+ <a href="#" data-toggle=tab><?php echo $step_id ?>. <span class="text_step_<?php echo $step_id ?>" ><?php echo esc_html( $step_name ) ?></span></a>
32
+ </li>
33
+ <?php endforeach ?>
34
+ </ul>
35
+ <!-- Tabs-Content -->
36
+ <div class=tab-content>
37
+ <?php foreach ( $steps as $step_id => $step_name ) : ?>
38
+ <div class="tab-pane-<?php echo $step_id ?><?php if ( $step_id == 1 ): ?> active<?php endif ?>" data-step-id="<?php echo $step_id ?>">
39
+ <?php
40
+ // Render unique data per step
41
+ switch ( $step_id ) {
42
+ // Service
43
+ case 1:
44
+ include '_1_service.php';
45
+ break;
46
+ // Time
47
+ case 2:
48
+ include '_2_time.php';
49
+ break;
50
+ // Details
51
+ case 3:
52
+ include '_3_details.php';
53
+ break;
54
+ // Payment
55
+ case 4:
56
+ include '_4_payment.php';
57
+ break;
58
+ // Done
59
+ case 5:
60
+ include '_5_done.php';
61
+ break;
62
+ }
63
+ ?>
64
+ </div>
65
+ <?php endforeach ?>
66
+ </div>
67
+ <div style="float:right;margin-right:20px;">
68
+ <p><?php _e('Click on the underlined text to edit.', 'ab') ?></p>
69
+ </div>
70
+ <div class="clear"></div>
71
+ <!-- controls -->
72
+ <div class=controls>
73
+ <!-- spinner -->
74
+ <span id="update_spinner" class="spinner"></span>
75
+ <!-- update button -->
76
+ <button id="update_button" class="btn btn-info ab-update-button ab-appearance-update">
77
+ <?php _e( 'Update', 'ab' ) ?>
78
+ </button>
79
+ <!-- reset button -->
80
+ <button id="reset_button" class="ab-reset-form ab-appearance-reset" type="reset">
81
+ <?php _e( 'Reset', 'ab' ) ?>
82
+ </button>
83
+ </div>
84
+ </div>
85
+ </div>
backend/modules/calendar/AB_CalendarController.php ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ $path_to_entities = dirname(__FILE__) . '/../../../lib/entities/';
6
+
7
+ include 'forms/AB_AppointmentForm.php';
8
+ include $path_to_entities . 'AB_ScheduleItem.php';
9
+
10
+ /**
11
+ * Class AB_CalendarController
12
+ *
13
+ * @property $collection
14
+ * @property $staff_services
15
+ * @property $startDate
16
+ * @property $period_start
17
+ * @property $period_end
18
+ * @property $customers
19
+ * @property $staff_id
20
+ * @property $service_id
21
+ * @property $customer_id
22
+ * @property $staff_collection
23
+ * @property $date_interval_not_available
24
+ * @property $date_interval_warning
25
+ * @property $notes
26
+ */
27
+ class AB_CalendarController extends AB_Controller {
28
+
29
+ public function renderCalendar() {
30
+ wp_enqueue_style( 'ab-jquery-ui-css', plugins_url( 'resources/css/jquery-ui-1.10.1.css', __FILE__ ) );
31
+ wp_enqueue_style( 'ab-weekcalendar', plugins_url( 'resources/css/jquery.weekcalendar.css', __FILE__ ) );
32
+ wp_enqueue_style( 'ab-calendar', plugins_url( 'resources/css/calendar.css', __FILE__ ) );
33
+ wp_enqueue_style( 'ab-chosen', plugins_url( 'resources/css/chosen.css', __FILE__ ) );
34
+
35
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', dirname(__FILE__).'/../../AB_Backend.php' ) );
36
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', dirname( dirname( __FILE__ ) ) ) );
37
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', dirname( dirname( __FILE__ ) ) ), array( 'jquery' ) );
38
+ wp_enqueue_script( 'ab-date', plugins_url( 'resources/js/date.js', dirname(__FILE__).'/../../AB_Backend.php' ), array( 'jquery' ) );
39
+ wp_enqueue_script( 'ab-chosen', plugins_url( 'resources/js/chosen.jquery.js', __FILE__ ) );
40
+
41
+ wp_enqueue_script(
42
+ 'ab-weekcalendar',
43
+ plugins_url( 'resources/js/jquery.weekcalendar.js', __FILE__ ),
44
+ array(
45
+ 'jquery',
46
+ 'jquery-ui-widget',
47
+ 'jquery-ui-dialog',
48
+ 'jquery-ui-button',
49
+ 'jquery-ui-draggable',
50
+ 'jquery-ui-droppable',
51
+ 'jquery-ui-resizable',
52
+ 'jquery-ui-datepicker'
53
+ )
54
+ );
55
+ wp_enqueue_script( 'ab-calendar_daypicker', plugins_url( 'resources/js/calendar_daypicker.js', __FILE__ ), array( 'jquery' ) );
56
+ wp_enqueue_script( 'ab-calendar_weekpicker', plugins_url( 'resources/js/calendar_weekpicker.js', __FILE__ ), array( 'jquery' ) );
57
+ wp_enqueue_script( 'ab-calendar', plugins_url( 'resources/js/calendar.js', __FILE__ ), array( 'jquery', 'ab-calendar_daypicker', 'ab-calendar_weekpicker' ) );
58
+ wp_enqueue_script( 'ab-angularjs', plugins_url( 'resources/js/angular-1.0.6.min.js', dirname( dirname( __FILE__ ) ) ) );
59
+ wp_enqueue_script( 'ab-angularui', plugins_url( 'resources/js/angular-ui-0.4.0.min.js', dirname( dirname( __FILE__ ) ) ) );
60
+ wp_enqueue_script( 'ab-ng-app', plugins_url( 'resources/js/ng-app.js', __FILE__ ), array( 'jquery' ) );
61
+ wp_enqueue_script( 'ab-ng-new_customer_dialog', plugins_url( 'resources/js/ng-new_customer_dialog.js', dirname( dirname(__FILE__) ) ), array( 'jquery', 'ab-angularjs' ) );
62
+ wp_localize_script( 'ab-ng-app', 'BooklyL10n', array(
63
+ 'new_appointment' => __( 'New appointment', 'ab' ),
64
+ 'edit_appointment' => __( 'Edit appointment', 'ab' ),
65
+ 'are_you_sure' => __( 'Are you sure?', 'ab' ),
66
+ 'phone' => __( 'Phone', 'ab' ),
67
+ 'email' => __( 'Email', 'ab' ),
68
+ 'timeslotsPerHour' => 60 / get_option('ab_settings_time_slot_length'),
69
+ 'shortMonths' => array(
70
+ __( 'Jan', 'ab' ),
71
+ __( 'Feb', 'ab' ),
72
+ __( 'Mar', 'ab' ),
73
+ __( 'Apr', 'ab' ),
74
+ __( 'May', 'ab' ),
75
+ __( 'Jun', 'ab' ),
76
+ __( 'Jul', 'ab' ),
77
+ __( 'Aug', 'ab' ),
78
+ __( 'Sep', 'ab' ),
79
+ __( 'Oct', 'ab' ),
80
+ __( 'Nov', 'ab' ),
81
+ __( 'Dec', 'ab' ),
82
+ ),
83
+ 'longMonths' => array(
84
+ __( 'January', 'ab' ),
85
+ __( 'February', 'ab' ),
86
+ __( 'March', 'ab' ),
87
+ __( 'April', 'ab' ),
88
+ __( 'May', 'ab' ),
89
+ __( 'June', 'ab' ),
90
+ __( 'July', 'ab' ),
91
+ __( 'August', 'ab' ),
92
+ __( 'September', 'ab' ),
93
+ __( 'October', 'ab' ),
94
+ __( 'November', 'ab' ),
95
+ __( 'December', 'ab' )
96
+ ),
97
+ 'shortDays' => array(
98
+ __( 'Sun', 'ab' ),
99
+ __( 'Mon', 'ab' ),
100
+ __( 'Tue', 'ab' ),
101
+ __( 'Wed', 'ab' ),
102
+ __( 'Thu', 'ab' ),
103
+ __( 'Fri', 'ab' ),
104
+ __( 'Sat', 'ab' )
105
+ ),
106
+ 'longDays' => array(
107
+ __( 'Sunday', 'ab' ),
108
+ __( 'Monday', 'ab' ),
109
+ __( 'Tuesday', 'ab' ),
110
+ __( 'Wednesday', 'ab' ),
111
+ __( 'Thursday', 'ab' ),
112
+ __( 'Friday', 'ab' ),
113
+ __( 'Saturday', 'ab' ),
114
+ ),
115
+ 'PM' => __( 'PM', 'ab' ),
116
+ 'AM' => __( 'AM', 'ab' ),
117
+ 'Week' => __( 'Week', 'ab' ) . ': ',
118
+ 'dateFormat' => $this->dateFormatTojQueryUIDatePickerFormat(),
119
+ ));
120
+
121
+ $user_id = get_current_user_id();
122
+ if ( is_super_admin( $user_id ) ) {
123
+ $this->collection = $this->getWpdb()->get_results( "SELECT * FROM ab_staff" );
124
+ } else {
125
+ $this->collection = $this->getWpdb()->get_results( $this->getWpdb()->prepare( "SELECT * FROM ab_staff s WHERE s.wp_user_id = %d", array($user_id) ) );
126
+ }
127
+
128
+ $this->render( 'calendar' );
129
+ }
130
+ /**
131
+ * Get data for WeekCalendar in `week` mode.
132
+ *
133
+ * @return json
134
+ */
135
+ public function executeWeekStaffAppointments() {
136
+ $result = array( 'events' => array(), 'freebusys' => array() );
137
+ $staff_id = $this->getParameter( 'staff_id' );
138
+ if ( $staff_id ) {
139
+ $staff = new AB_Staff();
140
+ $staff->load( $staff_id );
141
+
142
+ $start_date = $this->_post['start_date'];
143
+ $end_date = $this->_post['end_date'];
144
+
145
+ $staff_appointments = $staff->getAppointments( $start_date, $end_date );
146
+ foreach ( $staff_appointments as $appointment ) {
147
+ $result['events'][] = $this->getAppointment( $appointment );
148
+ }
149
+
150
+ $wpdb = $this->getWpdb();
151
+ $schedule = $wpdb->get_results( $wpdb->prepare(
152
+ 'SELECT
153
+ ssi.*,
154
+ si.id - 1 AS "day_index",
155
+ si.name AS "day_name"
156
+ FROM `ab_staff_schedule_item` ssi
157
+ LEFT JOIN `ab_schedule_item` si ON ssi.schedule_item_id = si.id
158
+ WHERE ssi.staff_id = %d',
159
+ $staff_id
160
+ ) );
161
+
162
+ $holidays = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM ab_holiday WHERE staff_id = %d OR staff_id IS NULL', $staff_id ) );
163
+
164
+ if ( ! empty( $schedule ) ) {
165
+ $wp_week_start_day = get_option( 'start_of_week', 1 );
166
+ $schedule_start_day = $schedule[0]->id - 1;
167
+
168
+ // if wp week start day is higher than our
169
+ // cut the list into 2 parts (before and after wp wp week start day)
170
+ // move the second part of the list above the first one
171
+ if ( $wp_week_start_day > $schedule_start_day ) {
172
+ $schedule_start = array_slice( $schedule, 0, $wp_week_start_day );
173
+ $schedule_end = array_slice( $schedule, $wp_week_start_day );
174
+ $schedule = $schedule_end;
175
+
176
+ foreach ( $schedule_start as $schedule_item ) {
177
+ $schedule[] = $schedule_item;
178
+ }
179
+ }
180
+
181
+ $active_schedule_items_ids = array();
182
+
183
+ foreach ( $schedule as $item ) {
184
+ // if start time is NULL we consider that the day is "OFF"
185
+ if ( null !== $item->start_time ) {
186
+ if ($item->day_name == 'Sunday' && $wp_week_start_day == 0){
187
+ $date = date( 'Y-m-d', strtotime( $item->day_name . ' last week', strtotime( $start_date ) ) );
188
+ }else{
189
+ $date = date( 'Y-m-d', strtotime( $item->day_name . ' this week', strtotime( $start_date ) ) );
190
+ }
191
+ $startDate = new DateTime( $date . ' ' . $item->start_time );
192
+ $endDate = new DateTime( $date . ' ' . $item->end_time );
193
+ // Skip holidays
194
+ foreach ( $holidays as $holiday ) {
195
+ $holidayDate = new DateTime($holiday->holiday);
196
+ if ( $holiday->repeat_event ) {
197
+ if ($holidayDate->format('m-d') == $startDate->format('m-d')) {
198
+ continue 2;
199
+ }
200
+ } else {
201
+ if ($holidayDate->format('Y-m-d') == $startDate->format('Y-m-d')) {
202
+ continue 2;
203
+ }
204
+ }
205
+ }
206
+
207
+ // get available day parts
208
+ $result['freebusys'][] = $this->getFreeBusy( $startDate, $endDate, true );
209
+ $active_schedule_items_ids[] = $item->id;
210
+ }
211
+ }
212
+
213
+ if ( empty( $active_schedule_items_ids ) ) {
214
+ $active_schedule_items_ids = array( 0 );
215
+ }
216
+
217
+ $schedule_breaks = $wpdb->get_results(
218
+ 'SELECT
219
+ sib.*,
220
+ si.id - 1 AS "day_index",
221
+ si.name AS "day_name"
222
+ FROM `ab_schedule_item_break` sib
223
+ LEFT JOIN `ab_staff_schedule_item` ssi ON sib.staff_schedule_item_id = ssi.id
224
+ LEFT JOIN `ab_schedule_item` si ON ssi.schedule_item_id = si.id
225
+ WHERE sib.staff_schedule_item_id IN (' . implode( ', ', $active_schedule_items_ids ) . ')'
226
+ );
227
+
228
+ foreach ( $schedule_breaks as $break_item ) {
229
+ $date = date( 'Y-m-d', strtotime( $break_item->day_name . ' this week', strtotime( $start_date ) ) );
230
+ $startDate = new DateTime( $date . ' ' . $break_item->start_time );
231
+ $endDate = new DateTime( $date . ' ' . $break_item->end_time );
232
+
233
+ // get breaks
234
+ $result['freebusys'][] = $this->getFreeBusy( $startDate, $endDate, false );
235
+ }
236
+ }
237
+ }
238
+ echo json_encode( $result );
239
+ exit;
240
+ }
241
+
242
+ /**
243
+ * Get data for WeekCalendar in `day` mode.
244
+ *
245
+ * @return json
246
+ */
247
+ public function executeDayStaffAppointments() {
248
+ $result = array( 'events' => array(), 'freebusys' => array() );
249
+ $staff_ids = $this->getParameter( 'staff_id' );
250
+ if (is_array($staff_ids)) {
251
+ $wpdb = $this->getWpdb();
252
+
253
+ $start_date = $this->_post['start_date'];
254
+
255
+ $appointments = $wpdb->get_results( sprintf(
256
+ 'SELECT
257
+ a.id,
258
+ a.start_date,
259
+ a.end_date,
260
+ a.notes,
261
+ a.customer_id AS "customer_id",
262
+ s.title,
263
+ s.color,
264
+ staff.id AS "staff_id",
265
+ staff.full_name AS "staff_fullname"
266
+ FROM ab_appointment a
267
+ LEFT JOIN ab_service s ON a.service_id = s.id
268
+ LEFT JOIN ab_staff staff ON a.staff_id = staff.id
269
+ WHERE DATE(a.start_date) = DATE("%s") AND staff_id IN (%s)
270
+ GROUP BY a.id',
271
+ mysql_real_escape_string($start_date),
272
+ implode(',', array_merge(array(0), array_map('intval', $staff_ids)))
273
+ ) );
274
+
275
+ foreach ( $appointments as $appointment ) {
276
+ $result['events'][] = $this->getAppointment( $appointment, $appointment->staff_id, $day_view = true );
277
+ }
278
+
279
+ $schedule = $wpdb->get_results(
280
+ 'SELECT
281
+ ssi.*,
282
+ s.id AS "staff_id"
283
+ FROM `ab_staff_schedule_item` ssi
284
+ LEFT JOIN `ab_schedule_item` si ON ssi.schedule_item_id = si.id
285
+ LEFT JOIN `ab_staff` s ON ssi.staff_id = s.id
286
+ WHERE si.name = DATE_FORMAT(DATE("' . $start_date . '"), "%W")
287
+ AND ssi.start_time IS NOT NULL'
288
+ );
289
+
290
+ $active_schedule_items_ids = array();
291
+
292
+ foreach ( $schedule as $item ) {
293
+ $startDate = new DateTime(date( 'Y-m-d', strtotime( $start_date ) ) . ' ' . $item->start_time);
294
+ $endDate = new DateTime(date( 'Y-m-d', strtotime( $start_date ) ) . ' ' . $item->end_time);
295
+
296
+ $holidays = $wpdb->get_results($wpdb->prepare(
297
+ 'SELECT * FROM ab_holiday WHERE staff_id = %d and ((`repeat_event` = 0 and DATE_FORMAT( `holiday` , "%%Y-%%m-%%d" ) = %s) or (`repeat_event` = 1 and DATE_FORMAT( `holiday` , "%%Y-%%m" ) = %s))',
298
+ array($item->staff_id, $startDate->format('Y-m-d'), $startDate->format('m-d')))
299
+ );
300
+ if (!$holidays){
301
+ $result['freebusys'][] = $this->getFreeBusy( $startDate, $endDate, true, $item->staff_id );
302
+ $active_schedule_items_ids[] = $item->id;
303
+ }
304
+ }
305
+
306
+ if ( empty($active_schedule_items_ids) ) {
307
+ $active_schedule_items_ids = array( 0 );
308
+ }
309
+
310
+ $schedule_breaks = $wpdb->get_results(
311
+ 'SELECT
312
+ sib.*,
313
+ s.id AS "staff_id"
314
+ FROM `ab_schedule_item_break` sib
315
+ LEFT JOIN `ab_staff_schedule_item` ssi ON sib.staff_schedule_item_id = ssi.id
316
+ LEFT JOIN `ab_schedule_item` si ON ssi.schedule_item_id = si.id
317
+ LEFT JOIN `ab_staff` s ON ssi.staff_id = s.id
318
+ WHERE sib.staff_schedule_item_id IN (' . implode( ', ', $active_schedule_items_ids ) . ')'
319
+ );
320
+
321
+ foreach ( $schedule_breaks as $break_item ) {
322
+ $startDate = new DateTime(date( 'Y-m-d', strtotime( $start_date ) ) . ' ' . $break_item->start_time);
323
+ $endDate = new DateTime(date( 'Y-m-d', strtotime( $start_date ) ) . ' ' . $break_item->end_time);
324
+
325
+ $result['freebusys'][] = $this->getFreeBusy( $startDate, $endDate, false, $break_item->staff_id );
326
+ }
327
+ }
328
+ echo json_encode( $result );
329
+ exit;
330
+ }
331
+
332
+ /**
333
+ * Get data needed for appointment form initialisation.
334
+ */
335
+ public function executeGetDataForAppointmentForm() {
336
+ $wpdb = $this->getWpdb();
337
+ $user_id = get_current_user_id();
338
+ $result = array(
339
+ 'staff' => array(),
340
+ 'customers' => array(),
341
+ 'time' => array(),
342
+ 'time_interval' => get_option( 'ab_settings_time_slot_length' ) * 60
343
+ );
344
+
345
+ // Staff list.
346
+ if ( is_super_admin( $user_id ) ) {
347
+ $staff = $wpdb->get_results( 'SELECT `id`, `full_name` FROM `ab_staff`', ARRAY_A );
348
+ } else {
349
+ $staff = $wpdb->get_results( $wpdb->prepare(
350
+ 'SELECT `id`, `full_name` FROM `ab_staff` WHERE `wp_user_id` = %d',
351
+ array( $user_id )
352
+ ), ARRAY_A );
353
+ }
354
+ foreach ( $staff as $st ) {
355
+ $services = $wpdb->get_results( $wpdb->prepare(
356
+ 'SELECT
357
+ `service`.`id`,
358
+ `service`.`title`,
359
+ `service`.`duration`
360
+ FROM `ab_service` `service`
361
+ LEFT JOIN `ab_staff_service` `ss` ON `ss`.`service_id` = `service`.`id`
362
+ LEFT JOIN `ab_staff` `staff` ON `ss`.`staff_id` = `staff`.`id`
363
+ WHERE `staff`.`id` = %d',
364
+ $st[ 'id' ]
365
+ ), ARRAY_A );
366
+ array_walk($services, create_function('&$a', '$a[\'title\'] = sprintf(\'%s (%s)\', $a[\'title\'], AB_Service::durationToString($a[\'duration\']));'));
367
+ $result[ 'staff' ][] = array(
368
+ 'id' => $st[ 'id' ],
369
+ 'full_name' => $st[ 'full_name' ],
370
+ 'services' => $services
371
+ );
372
+ }
373
+
374
+ // Customers list.
375
+ $customers = $this->getWpdb()->get_results(
376
+ 'SELECT * FROM `ab_customer` WHERE name <> "" OR phone <> "" OR email <> "" ORDER BY name',
377
+ ARRAY_A
378
+ );
379
+ $customer = new AB_Customer();
380
+ foreach ($customers as $customer_data) {
381
+ $customer->setData( $customer_data );
382
+
383
+ $name = $customer->get('name');
384
+ if ($customer->get('email') && $customer->get('phone')){
385
+ $name .= ' (' . $customer->get('email') . ', ' . $customer->get('phone') . ')';
386
+ }elseif($customer->get('email')){
387
+ $name .= ' (' . $customer->get('email') . ')';
388
+ }elseif($customer->get('phone')){
389
+ $name .= ' (' . $customer->get('phone') . ')';
390
+ }
391
+
392
+ $result[ 'customers' ][] = array(
393
+ 'id' => $customer->get('id'),
394
+ 'name' => $name,
395
+ );
396
+ }
397
+
398
+ // Time list.
399
+ $tf = get_option( 'time_format' );
400
+ $ts_length = get_option( 'ab_settings_time_slot_length' );
401
+ $time_start = new AB_DateTime( AB_StaffScheduleItem::WORKING_START_TIME, new DateTimeZone( 'UTC' ) );
402
+ $time_end = new AB_DateTime( AB_StaffScheduleItem::WORKING_END_TIME, new DateTimeZone( 'UTC' ) );
403
+
404
+ // Run the loop.
405
+ while ( $time_start->format( 'U' ) <= $time_end->format( 'U' ) ) {
406
+ $result[ 'time' ][ ] = array(
407
+ 'value' => $time_start->format( 'H:i' ),
408
+ 'title' => date_i18n( $tf, $time_start->format( 'U' ) )
409
+ );
410
+ $time_start->modify( '+' . $ts_length . ' min' );
411
+ }
412
+
413
+ echo json_encode( $result );
414
+ exit (0);
415
+ }
416
+
417
+ /**
418
+ * Get appointment data when editing the appointment.
419
+ */
420
+ public function executeGetDataForAppointment() {
421
+ $response = array( 'status' => 'error', 'data' => array() );
422
+
423
+ $appointment = new AB_Appointment();
424
+ if ( $appointment->load( $this->_post['id'] ) ) {
425
+ $response[ 'status' ] = 'ok';
426
+ $response[ 'data' ][ 'service_id' ] = $appointment->get( 'service_id' );
427
+ $response[ 'data' ][ 'customer_id' ] = $appointment->get( 'customer_id' );
428
+ $response[ 'data' ][ 'notes' ] = $appointment->get( 'notes' );
429
+ }
430
+
431
+ echo json_encode( $response );
432
+ exit ( 0 );
433
+ }
434
+
435
+ /**
436
+ * Save appointment form (for both create and edit).
437
+ */
438
+ public function executeSaveAppointmentForm() {
439
+ global $wpdb;
440
+
441
+ $response = array( 'status' => 'error' );
442
+
443
+ $start_date = $this->_post['start_date'];
444
+ $end_date = $this->_post['end_date'];
445
+ $staff_id = $this->_post['staff_id'];
446
+ $service_id = $this->_post['service_id'] ? $this->_post['service_id'] : null;
447
+ $customer_id = $this->_post['customer_id'] ? $this->_post['customer_id'] : null;
448
+ $appointment_id = $this->_post['id'] ? $this->_post['id'] : 0;
449
+ $notes = $this->_post['notes'] ? $this->_post['notes'] : '';
450
+
451
+ if ( !$this->dateIntervalIsAvailableForAppointment( $start_date, $end_date, $staff_id, $appointment_id ) ) {
452
+ $response[ 'errors' ] = array( 'date_interval_not_available' => true );
453
+ } else {
454
+ $appointment = new AB_Appointment();
455
+ if ( $appointment_id ) {
456
+ // edit
457
+ $appointment->load( $appointment_id );
458
+ }
459
+ $appointment->set( 'start_date', $start_date );
460
+ $appointment->set( 'end_date', $end_date );
461
+ $appointment->set( 'staff_id', $staff_id );
462
+ $appointment->set( 'service_id', $service_id );
463
+ $appointment->set( 'customer_id', $customer_id );
464
+ $appointment->set( 'notes', $notes );
465
+
466
+ if ( $appointment->save() !== false ) {
467
+ $startDate = new DateTime( $appointment->get( 'start_date' ) );
468
+ $endDate = new DateTime( $appointment->get( 'end_date' ) );
469
+ $employee = new AB_Staff();
470
+ $employee->load( $staff_id );
471
+ $service = new AB_Service();
472
+ $service->load( $service_id );
473
+ $response[ 'status' ] = 'ok';
474
+ $desc = array();
475
+ $customer = $this->getCustomer( $this->getParameter( 'customer_id' ) );
476
+
477
+ foreach ( array( 'name', 'phone', 'email' ) as $data_entry ) {
478
+ $entry_value = $customer->get( $data_entry );
479
+ if ( $entry_value ) {
480
+ $desc[] = '<div class="wc-employee">' . esc_html( $entry_value ) . '</div>';
481
+ }
482
+ }
483
+
484
+ if ( $appointment->get( 'notes' ) ) {
485
+ $desc[] = '<div class="wc-notes">' . $appointment->notes . '</div>';
486
+ }
487
+
488
+ $response[ 'data' ] = array(
489
+ 'id' => (int)$appointment->get( 'id' ),
490
+ 'start' => $startDate->format( 'm/d/Y H:i' ),
491
+ 'end' => $endDate->format( 'm/d/Y H:i' ),
492
+ 'desc' => implode('', $desc),
493
+ 'title' => $service->get( 'title' ) ? $service->get( 'title' ) : __( 'Untitled', 'ab' ),
494
+ 'color' => $service->get( 'color' ),
495
+ 'userId' => (int)$appointment->get( 'staff_id' ),
496
+ );
497
+
498
+ $staff = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ab_staff WHERE id = %d', $staff_id ) );
499
+ } else {
500
+ $response[ 'errors' ] = array( 'unknown' => true );
501
+ }
502
+ }
503
+
504
+ echo json_encode( $response );
505
+ exit ( 0 );
506
+ }
507
+
508
+ public function executeCheckAppointmentDateSelection() {
509
+ $start_date = $this->getParameter('start_date');
510
+ $end_date = $this->getParameter('end_date');
511
+ $staff_id = $this->getParameter('staff_id');
512
+ $service_id = $this->getParameter('service_id');
513
+ $appointment_id = $this->getParameter('appointment_id');
514
+ $timestamp_diff = strtotime( $end_date ) - strtotime( $start_date );
515
+
516
+ $result = array(
517
+ 'date_interval_not_available' => false,
518
+ 'date_interval_warning' => false,
519
+ );
520
+
521
+ if ( !$this->dateIntervalIsAvailableForAppointment( $start_date, $end_date, $staff_id, $appointment_id ) ) {
522
+ $result['date_interval_not_available'] = true;
523
+ }
524
+
525
+ if ( $service_id ) {
526
+ $service = new AB_Service();
527
+ $service->load( $service_id );
528
+
529
+ $duration = $service->get( 'duration' );
530
+
531
+ // service duration interval is not equal to
532
+ $result['date_interval_warning'] = ($timestamp_diff != $duration);
533
+ }
534
+
535
+ echo json_encode( $result );
536
+ exit;
537
+ }
538
+
539
+ public function executeDeleteAppointment() {
540
+ $appointment = new AB_Appointment();
541
+ $appointment->load( $this->_post['appointment_id'] );
542
+ $appointment->delete();
543
+ exit;
544
+ }
545
+
546
+ private function dateIntervalIsAvailableForAppointment( $start_date, $end_date, $staff_id, $appointment_id ) {
547
+ return ! is_object( $this->getWpdb()->get_row( $this->getWpdb()->prepare(
548
+ 'SELECT * FROM `ab_appointment`
549
+ WHERE (
550
+ start_date > %s AND start_date < %s
551
+ OR (end_date > %s AND end_date < %s)
552
+ OR (start_date < %s AND end_date > %s)
553
+ OR (start_date = %s OR end_date = %s)
554
+ )
555
+ AND staff_id = %d
556
+ AND id <> %d',
557
+ $start_date,
558
+ $end_date,
559
+ $start_date,
560
+ $end_date,
561
+ $start_date,
562
+ $end_date,
563
+ $start_date,
564
+ $end_date,
565
+ $staff_id,
566
+ $appointment_id
567
+ ) ) );
568
+ }
569
+
570
+ /**
571
+ * @param $id
572
+ *
573
+ * @return AB_Customer
574
+ */
575
+ public function getCustomer( $id ) {
576
+ $customer = new AB_Customer();
577
+ $customer_data = $this->getWpdb()->get_row( $this->getWpdb()->prepare(
578
+ 'SELECT * FROM `ab_customer` WHERE id = %d', $id
579
+ ) );
580
+ // populate customer with data
581
+ if ( $customer_data ) {
582
+ $customer->setData( $customer_data );
583
+ }
584
+
585
+ return $customer;
586
+ }
587
+
588
+ /**
589
+ * Get appointment data
590
+ *
591
+ * @param stdClass $appointment
592
+ * @param null $user_id
593
+ * @param bool $day_view
594
+ *
595
+ * @return array
596
+ */
597
+ private function getAppointment( stdClass $appointment, $user_id = null, $day_view = false ) {
598
+ $startDate = new DateTime( $appointment->start_date );
599
+ $endDate = new DateTime( $appointment->end_date );
600
+ $customer = $this->getCustomer( $appointment->customer_id );
601
+ $desc = array();
602
+
603
+ foreach ( array( 'name', 'phone', 'email' ) as $data_entry ) {
604
+ $entry_value = $customer->get( $data_entry );
605
+ if ( $entry_value ) {
606
+ $desc[] = '<div class="wc-employee">' . esc_html( $entry_value ) . '</div>';
607
+ }
608
+ }
609
+
610
+ if ($appointment->notes) {
611
+ $desc[] = '<div class="wc-notes">' . nl2br( esc_html( $appointment->notes ) ) . '</div>';
612
+ }
613
+
614
+ $appointment_data = array(
615
+ 'id' => $appointment->id,
616
+ 'start' => $startDate->format( 'm/d/Y H:i' ),
617
+ 'end' => $endDate->format( 'm/d/Y H:i' ),
618
+ 'title' => $appointment->title ? esc_html( $appointment->title ) : __( 'Untitled', 'ab' ),
619
+ 'desc' => implode('', $desc),
620
+ 'color' => $appointment->color,
621
+ );
622
+ // if needed to be rendered for a specific user
623
+ // pass the the user id
624
+ if ( null !== $user_id ) {
625
+ $appointment_data['userId'] = $user_id;
626
+ }
627
+ return $appointment_data;
628
+ }
629
+
630
+ /**
631
+ * Get free busy data
632
+ *
633
+ * @param DateTime $startDate
634
+ * @param DateTime $endDate
635
+ * @param $free
636
+ * @param null $user_id
637
+ *
638
+ * @return array
639
+ */
640
+ private function getFreeBusy( DateTime $startDate, DateTime $endDate, $free, $user_id = null ) {
641
+ $freebusy_data = array(
642
+ 'start' => $startDate->format( 'm/d/Y H:i' ),
643
+ 'end' => $endDate->format( 'm/d/Y H:i' ),
644
+ 'free' => $free
645
+ );
646
+ // if needed to be rendered for a specific user
647
+ // pass the the user id
648
+ if ( null !== $user_id ) {
649
+ $freebusy_data['userId'] = $user_id;
650
+ }
651
+ return $freebusy_data;
652
+ }
653
+
654
+ private function dateFormatTojQueryUIDatePickerFormat() {
655
+ $chars = array(
656
+ // Day
657
+ 'd' => 'dd', 'j' => 'd', 'l' => 'DD', 'D' => 'D',
658
+ // Month
659
+ 'm' => 'mm', 'n' => 'm', 'F' => 'MM', 'M' => 'M',
660
+ // Year
661
+ 'Y' => 'yy', 'y' => 'y',
662
+ );
663
+
664
+ return strtr((string)get_option('date_format'), $chars);
665
+ }
666
+
667
+ /**
668
+ * Override parent method to add 'wp_ajax_ab_' prefix
669
+ * so current 'execute*' methods look nicer.
670
+ */
671
+ protected function registerWpActions( $prefix = '' ) {
672
+ parent::registerWpActions( 'wp_ajax_ab_' );
673
+ }
674
+ }
backend/modules/calendar/forms/AB_AppointmentForm.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include dirname(__FILE__) . '/../../../../lib/entities/AB_Appointment.php';
6
+
7
+ /**
8
+ * Class AB_AppointmentForm
9
+ */
10
+ class AB_AppointmentForm extends AB_Form {
11
+
12
+ /**
13
+ * Constructor.
14
+ */
15
+ public function __construct() {
16
+ parent::$entity_class = 'AB_Appointment';
17
+ parent::__construct();
18
+ }
19
+
20
+ public function configure() {
21
+ //$this->setFields( array() );
22
+ }
23
+ }
backend/modules/calendar/resources/css/calendar.css ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* calendar nav */
3
+ .ab-calendar-day, .ab-calendar-week, .ab-calendar-today, .btn-list, .btn-dropdown {
4
+ display: inline-block;
5
+ padding: 2px 10px;
6
+ margin-bottom: 0;
7
+ font-size: 12px;
8
+ line-height: 20px;
9
+ color: #fff;
10
+ text-align: center;
11
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
12
+ vertical-align: middle;
13
+ cursor: pointer;
14
+ background-color: #21759b;
15
+ background-image: -webkit-gradient(linear,left top,left bottom,from(#2a95c5),to(#21759b));
16
+ background-image: -webkit-linear-gradient(top,#2a95c5,#21759b);
17
+ background-image: -moz-linear-gradient(top,#2a95c5,#21759b);
18
+ background-image: -ms-linear-gradient(top,#2a95c5,#21759b);
19
+ background-image: -o-linear-gradient(top,#2a95c5,#21759b);
20
+ background-image: linear-gradient(to bottom,#2a95c5,#21759b);
21
+ background-repeat: repeat-x;
22
+ border: 1px solid #21759b;
23
+ border-color: #e6e6e6 #e6e6e6 #1e6a8d;
24
+ border-bottom-color: #b3b3b3;
25
+ -webkit-border-radius: 4px;
26
+ -moz-border-radius: 4px;
27
+ border-radius: 4px;
28
+ -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
29
+ moz-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
30
+ box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
31
+ }
32
+ .ab-calendar-day { border-bottom-right-radius: 0px; border-top-right-radius: 0px; margin-top: 0; }
33
+ .ab-calendar-week { border-bottom-left-radius: 0px; border-top-left-radius: 0px; margin-left: -3px; margin-top: 0; border-left: 0; }
34
+ .ab-calendar-today { margin: 0 5px; border-radius: 3px; }
35
+ .ab-nav-calendar { height: 30px; }
36
+ .ab-nav-calendar .ab-button-active {
37
+ background: #1f6a8c;
38
+ }
39
+ .ab-nav-calendar .ab-popup-wrapper { margin-left: 10px; }
40
+ .ab-popup-table td { white-space: nowrap; padding: 5px; border: 0!important; }
41
+ .ab-popup-table td > p { margin: 0; }
42
+
43
+ .ab-btn-group .btn-list,
44
+ .ab-btn-group .btn-dropdown {
45
+ margin: 0;
46
+ border: 0;
47
+ float: left;
48
+ position: relative;
49
+ }
50
+ .ab-btn-group .btn-list {
51
+ border-bottom-right-radius: 0px;
52
+ border-top-right-radius: 0px;
53
+ padding-left: 25px;
54
+ }
55
+ .ab-btn-group .btn-dropdown {
56
+ font-size: 9px;
57
+ padding-left: 0;
58
+ border-bottom-left-radius: 0px;
59
+ border-top-left-radius: 0px;
60
+ }
61
+ .ab-icon-button {
62
+ position: absolute;
63
+ top: 3px;
64
+ left: 3px;
65
+ width: 15px;
66
+ height: 15px;
67
+ }
68
+ .ab-icon-button.ab-services {
69
+ background: url("../images/box-small.png") 2px 2px no-repeat;
70
+ }
71
+ .ab-icon-button.ab-staff {
72
+ background: url("../images/user-white.png") 0 2px no-repeat;
73
+ }
74
+
75
+ /** week picker */
76
+ .ab-week-picker-wrapper { width: auto; position: relative; margin-right: 15px; }
77
+ .ab-week-picker-wrapper .ab-week-picker { clear: both; left: -1px; position: absolute; top: 30px; z-index: 1; display: none; }
78
+ .ab-week-picker-data { border-radius: 3px; background: url("../images/calendar.png") 2px 4px no-repeat; padding: 4px 7px 4px 25px; height: 16px; border: 1px solid black; }
79
+ #appendedPrependedInput { width: 340px; background-color: #FFFFFF; cursor: default; }
80
+
81
+ /** appointment dialog */
82
+ .ab-appointment-popup .ui-widget-header {
83
+ background: none!important;
84
+ border: none!important;
85
+ border-bottom: 1px solid #eee!important;
86
+ margin: -5px -5px 15px -5px!important;
87
+ font-size: 24.5px!important;
88
+ font-family: sans-serif!important;
89
+ line-height: 26px!important;
90
+ padding: 9px 15px!important;
91
+ }
92
+ .ab-appointment-popup .ui-widget-header .ui-state-hover { background: none!important; border: none!important; }
93
+
94
+ .ab-appointment-popup .loading-indicator img { display: block; margin: 20px auto; }
95
+ .ab-appointment-popup .dialog-button-wrapper { }
96
+
97
+ .ab-appointment-popup .dialog-content .ab-appointment-field-value { width: 110px; vertical-align: top; }
98
+ .ab-appointment-popup .dialog-content td { padding-top: 7px; text-align: left; white-space: nowrap; }
99
+ .ab-appointment-popup .dialog-content select { width: auto; max-width: 100%; }
100
+ .ab-appointment-popup .dialog-content { color: #333333!important; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif!important; font-size: 14px!important; }
101
+ .ab-appointment-popup .dialog-content .ab-reset-form { color: #21759b; }
102
+ .ab-appointment-popup .dialog-content .ab-reset-form:hover { color: #d54e21; }
103
+
104
+ /** calendars */
105
+ #day_calendar_wrapper { margin-top: 55px; }
106
+
107
+ #date_interval_warning_msg { color: #21759B }
108
+ #date_interval_not_available_msg { color: red }
109
+
110
+ /** wp elements */
111
+ #update-nag, .update-nag, #wpfooter { display: none; }
112
+ #wpbody-content { padding-bottom: 0; }
113
+
114
+ .ab-date-picker { border: 1px solid black!important; padding: 4px 4px 4px 7px; border-radius: 3px; width: 65px; }
115
+ .ab-date-paginator { margin-left: 10px; }
116
+ .ab-date-paginator > a {
117
+ float: left;
118
+ text-decoration: none;
119
+ color: black;
120
+ padding: 4px 2px;
121
+ display: block;
122
+ border: 1px solid black;
123
+ margin-left: -1px;
124
+ width: 18px;
125
+ text-align: center;
126
+ }
127
+ .ab-date-paginator > a.first {
128
+ border-bottom-left-radius: 10px;
129
+ -webkit-border-bottom-left-radius: 10px;
130
+ -moz-border-bottom-left-radius: 10px;
131
+ -o-border-bottom-left-radius: 10px;
132
+ border-top-left-radius: 10px;
133
+ -webkit-border-top-left-radius: 10px;
134
+ -moz-border-top-left-radius: 10px;
135
+ -o-border-top-left-radius: 10px;
136
+ }
137
+ .ab-date-paginator > a.last {
138
+ border-bottom-right-radius: 10px;
139
+ -webkit-border-bottom-right-radius: 10px;
140
+ -moz-border-bottom-right-radius: 10px;
141
+ -o-border-bottom-right-radius: 10px;
142
+ border-top-right-radius: 10px;
143
+ -webkit-border-top-right-radius: 10px;
144
+ -moz-border-top-right-radius: 10px;
145
+ -o-border-top-right-radius: 10px;
146
+ }
147
+ .wc-cal-event {
148
+ background-color: #DDDDDD;
149
+ line-height: 16px!important;
150
+ }
151
+ .wc-cal-event .wc-time {
152
+ background-color : #DDDDDD;
153
+ border-left-color : #DDDDDD;
154
+ border-right-color : #DDDDDD;
155
+ border-top-color : #DDDDDD;
156
+ border-bottom-color : #ABABAB;
157
+ }
158
+
159
+ .wc-information {
160
+ background: url("../images/information.png") no-repeat scroll 1px 2px transparent;
161
+ float: right;
162
+ height: 16px;
163
+ width: 16px;
164
+ z-index: 20;
165
+ }
166
+
167
+ .wc-service-name, .wc-employee {
168
+ padding: 3px 0;
169
+ }
170
+
171
+ .right-margin { margin-right: 10px; }
172
+ .pagination { margin: 0!important; }
173
+
174
+ .nav-tabs > .active > a { background: #1f6a8c!important; color: white!important; border-left: 0!important; }
175
+ .ab-date-calendar { padding-left: 25px!important; background: url("../images/calendar.png") 5px 8px no-repeat; }
backend/modules/calendar/resources/css/chosen-sprite.png ADDED
Binary file
backend/modules/calendar/resources/css/chosen-sprite@2x.png ADDED
Binary file
backend/modules/calendar/resources/css/chosen.css ADDED
@@ -0,0 +1,437 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.2.0
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2014 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
+ .chosen-container * {
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ }
30
+ .chosen-container .chosen-drop {
31
+ position: absolute;
32
+ top: 100%;
33
+ left: -9999px;
34
+ z-index: 1010;
35
+ width: 100%;
36
+ border: 1px solid #aaa;
37
+ border-top: 0;
38
+ background: #fff;
39
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
40
+ }
41
+ .chosen-container.chosen-with-drop .chosen-drop {
42
+ left: 0;
43
+ }
44
+ .chosen-container a {
45
+ cursor: pointer;
46
+ }
47
+
48
+ /* @end */
49
+ /* @group Single Chosen */
50
+ .chosen-container-single .chosen-single {
51
+ position: relative;
52
+ display: block;
53
+ overflow: hidden;
54
+ padding: 0 0 0 8px;
55
+ height: 25px;
56
+ border: 1px solid #aaa;
57
+ border-radius: 5px;
58
+ background-color: #fff;
59
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
60
+ background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
61
+ background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
62
+ background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
63
+ background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
64
+ background-clip: padding-box;
65
+ box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
66
+ color: #444;
67
+ text-decoration: none;
68
+ white-space: nowrap;
69
+ line-height: 24px;
70
+ }
71
+ .chosen-container-single .chosen-default {
72
+ color: #999;
73
+ }
74
+ .chosen-container-single .chosen-single span {
75
+ display: block;
76
+ overflow: hidden;
77
+ margin-right: 26px;
78
+ text-overflow: ellipsis;
79
+ white-space: nowrap;
80
+ }
81
+ .chosen-container-single .chosen-single-with-deselect span {
82
+ margin-right: 38px;
83
+ }
84
+ .chosen-container-single .chosen-single abbr {
85
+ position: absolute;
86
+ top: 6px;
87
+ right: 26px;
88
+ display: block;
89
+ width: 12px;
90
+ height: 12px;
91
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
92
+ font-size: 1px;
93
+ }
94
+ .chosen-container-single .chosen-single abbr:hover {
95
+ background-position: -42px -10px;
96
+ }
97
+ .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
98
+ background-position: -42px -10px;
99
+ }
100
+ .chosen-container-single .chosen-single div {
101
+ position: absolute;
102
+ top: 0;
103
+ right: 0;
104
+ display: block;
105
+ width: 18px;
106
+ height: 100%;
107
+ }
108
+ .chosen-container-single .chosen-single div b {
109
+ display: block;
110
+ width: 100%;
111
+ height: 100%;
112
+ background: url('chosen-sprite.png') no-repeat 0px 2px;
113
+ }
114
+ .chosen-container-single .chosen-search {
115
+ position: relative;
116
+ z-index: 1010;
117
+ margin: 0;
118
+ padding: 3px 4px;
119
+ white-space: nowrap;
120
+ }
121
+ .chosen-container-single .chosen-search input[type="text"] {
122
+ margin: 1px 0;
123
+ padding: 4px 20px 4px 5px;
124
+ width: 100%;
125
+ height: auto;
126
+ outline: 0;
127
+ border: 1px solid #aaa;
128
+ background: white url('chosen-sprite.png') no-repeat 100% -20px;
129
+ background: url('chosen-sprite.png') no-repeat 100% -20px;
130
+ font-size: 1em;
131
+ font-family: sans-serif;
132
+ line-height: normal;
133
+ border-radius: 0;
134
+ }
135
+ .chosen-container-single .chosen-drop {
136
+ margin-top: -1px;
137
+ border-radius: 0 0 4px 4px;
138
+ background-clip: padding-box;
139
+ }
140
+ .chosen-container-single.chosen-container-single-nosearch .chosen-search {
141
+ position: absolute;
142
+ left: -9999px;
143
+ }
144
+
145
+ /* @end */
146
+ /* @group Results */
147
+ .chosen-container .chosen-results {
148
+ color: #444;
149
+ position: relative;
150
+ overflow-x: hidden;
151
+ overflow-y: auto;
152
+ margin: 0 4px 4px 0;
153
+ padding: 0 0 0 4px;
154
+ max-height: 240px;
155
+ -webkit-overflow-scrolling: touch;
156
+ }
157
+ .chosen-container .chosen-results li {
158
+ display: none;
159
+ margin: 0;
160
+ padding: 5px 6px;
161
+ list-style: none;
162
+ line-height: 15px;
163
+ word-wrap: break-word;
164
+ -webkit-touch-callout: none;
165
+ }
166
+ .chosen-container .chosen-results li.active-result {
167
+ display: list-item;
168
+ cursor: pointer;
169
+ }
170
+ .chosen-container .chosen-results li.disabled-result {
171
+ display: list-item;
172
+ color: #ccc;
173
+ cursor: default;
174
+ }
175
+ .chosen-container .chosen-results li.highlighted {
176
+ background-color: #3875d7;
177
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
178
+ background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
179
+ background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
180
+ background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
181
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
182
+ color: #fff;
183
+ }
184
+ .chosen-container .chosen-results li.no-results {
185
+ color: #777;
186
+ display: list-item;
187
+ background: #f4f4f4;
188
+ }
189
+ .chosen-container .chosen-results li.group-result {
190
+ display: list-item;
191
+ font-weight: bold;
192
+ cursor: default;
193
+ }
194
+ .chosen-container .chosen-results li.group-option {
195
+ padding-left: 15px;
196
+ }
197
+ .chosen-container .chosen-results li em {
198
+ font-style: normal;
199
+ text-decoration: underline;
200
+ }
201
+
202
+ /* @end */
203
+ /* @group Multi Chosen */
204
+ .chosen-container-multi .chosen-choices {
205
+ position: relative;
206
+ overflow: hidden;
207
+ margin: 0;
208
+ padding: 0 5px;
209
+ width: 100%;
210
+ height: auto !important;
211
+ height: 1%;
212
+ border: 1px solid #aaa;
213
+ background-color: #fff;
214
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
215
+ background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
216
+ background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
217
+ background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
218
+ background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
219
+ cursor: text;
220
+ }
221
+ .chosen-container-multi .chosen-choices li {
222
+ float: left;
223
+ list-style: none;
224
+ }
225
+ .chosen-container-multi .chosen-choices li.search-field {
226
+ margin: 0;
227
+ padding: 0;
228
+ white-space: nowrap;
229
+ }
230
+ .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
231
+ margin: 1px 0;
232
+ padding: 0;
233
+ height: 25px;
234
+ outline: 0;
235
+ border: 0 !important;
236
+ background: transparent !important;
237
+ box-shadow: none;
238
+ color: #999;
239
+ font-size: 100%;
240
+ font-family: sans-serif;
241
+ line-height: normal;
242
+ border-radius: 0;
243
+ }
244
+ .chosen-container-multi .chosen-choices li.search-choice {
245
+ position: relative;
246
+ margin: 3px 5px 3px 0;
247
+ padding: 3px 20px 3px 5px;
248
+ border: 1px solid #aaa;
249
+ max-width: 100%;
250
+ border-radius: 3px;
251
+ background-color: #eeeeee;
252
+ 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));
253
+ background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
254
+ background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
255
+ background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
256
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
257
+ background-size: 100% 19px;
258
+ background-repeat: repeat-x;
259
+ background-clip: padding-box;
260
+ box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
261
+ color: #333;
262
+ line-height: 13px;
263
+ cursor: default;
264
+ }
265
+ .chosen-container-multi .chosen-choices li.search-choice span {
266
+ word-wrap: break-word;
267
+ }
268
+ .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
269
+ position: absolute;
270
+ top: 4px;
271
+ right: 3px;
272
+ display: block;
273
+ width: 12px;
274
+ height: 12px;
275
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
276
+ font-size: 1px;
277
+ }
278
+ .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
279
+ background-position: -42px -10px;
280
+ }
281
+ .chosen-container-multi .chosen-choices li.search-choice-disabled {
282
+ padding-right: 5px;
283
+ border: 1px solid #ccc;
284
+ background-color: #e4e4e4;
285
+ 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));
286
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
287
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
288
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
289
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
290
+ color: #666;
291
+ }
292
+ .chosen-container-multi .chosen-choices li.search-choice-focus {
293
+ background: #d4d4d4;
294
+ }
295
+ .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
296
+ background-position: -42px -10px;
297
+ }
298
+ .chosen-container-multi .chosen-results {
299
+ margin: 0;
300
+ padding: 0;
301
+ }
302
+ .chosen-container-multi .chosen-drop .result-selected {
303
+ display: list-item;
304
+ color: #ccc;
305
+ cursor: default;
306
+ }
307
+
308
+ /* @end */
309
+ /* @group Active */
310
+ .chosen-container-active .chosen-single {
311
+ border: 1px solid #5897fb;
312
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
313
+ }
314
+ .chosen-container-active.chosen-with-drop .chosen-single {
315
+ border: 1px solid #aaa;
316
+ -moz-border-radius-bottomright: 0;
317
+ border-bottom-right-radius: 0;
318
+ -moz-border-radius-bottomleft: 0;
319
+ border-bottom-left-radius: 0;
320
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
321
+ background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
322
+ background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
323
+ background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
324
+ background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
325
+ box-shadow: 0 1px 0 #fff inset;
326
+ }
327
+ .chosen-container-active.chosen-with-drop .chosen-single div {
328
+ border-left: none;
329
+ background: transparent;
330
+ }
331
+ .chosen-container-active.chosen-with-drop .chosen-single div b {
332
+ background-position: -18px 2px;
333
+ }
334
+ .chosen-container-active .chosen-choices {
335
+ border: 1px solid #5897fb;
336
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
337
+ }
338
+ .chosen-container-active .chosen-choices li.search-field input[type="text"] {
339
+ color: #222 !important;
340
+ }
341
+
342
+ /* @end */
343
+ /* @group Disabled Support */
344
+ .chosen-disabled {
345
+ opacity: 0.5 !important;
346
+ cursor: default;
347
+ }
348
+ .chosen-disabled .chosen-single {
349
+ cursor: default;
350
+ }
351
+ .chosen-disabled .chosen-choices .search-choice .search-choice-close {
352
+ cursor: default;
353
+ }
354
+
355
+ /* @end */
356
+ /* @group Right to Left */
357
+ .chosen-rtl {
358
+ text-align: right;
359
+ }
360
+ .chosen-rtl .chosen-single {
361
+ overflow: visible;
362
+ padding: 0 8px 0 0;
363
+ }
364
+ .chosen-rtl .chosen-single span {
365
+ margin-right: 0;
366
+ margin-left: 26px;
367
+ direction: rtl;
368
+ }
369
+ .chosen-rtl .chosen-single-with-deselect span {
370
+ margin-left: 38px;
371
+ }
372
+ .chosen-rtl .chosen-single div {
373
+ right: auto;
374
+ left: 3px;
375
+ }
376
+ .chosen-rtl .chosen-single abbr {
377
+ right: auto;
378
+ left: 26px;
379
+ }
380
+ .chosen-rtl .chosen-choices li {
381
+ float: right;
382
+ }
383
+ .chosen-rtl .chosen-choices li.search-field input[type="text"] {
384
+ direction: rtl;
385
+ }
386
+ .chosen-rtl .chosen-choices li.search-choice {
387
+ margin: 3px 5px 3px 0;
388
+ padding: 3px 5px 3px 19px;
389
+ }
390
+ .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
391
+ right: auto;
392
+ left: 4px;
393
+ }
394
+ .chosen-rtl.chosen-container-single-nosearch .chosen-search,
395
+ .chosen-rtl .chosen-drop {
396
+ left: 9999px;
397
+ }
398
+ .chosen-rtl.chosen-container-single .chosen-results {
399
+ margin: 0 0 4px 4px;
400
+ padding: 0 4px 0 0;
401
+ }
402
+ .chosen-rtl .chosen-results li.group-option {
403
+ padding-right: 15px;
404
+ padding-left: 0;
405
+ }
406
+ .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
407
+ border-right: none;
408
+ }
409
+ .chosen-rtl .chosen-search input[type="text"] {
410
+ padding: 4px 5px 4px 20px;
411
+ background: white url('chosen-sprite.png') no-repeat -30px -20px;
412
+ background: url('chosen-sprite.png') no-repeat -30px -20px;
413
+ direction: rtl;
414
+ }
415
+ .chosen-rtl.chosen-container-single .chosen-single div b {
416
+ background-position: 6px 2px;
417
+ }
418
+ .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
419
+ background-position: -12px 2px;
420
+ }
421
+
422
+ /* @end */
423
+ /* @group Retina compatibility */
424
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
425
+ .chosen-rtl .chosen-search input[type="text"],
426
+ .chosen-container-single .chosen-single abbr,
427
+ .chosen-container-single .chosen-single div b,
428
+ .chosen-container-single .chosen-search input[type="text"],
429
+ .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
430
+ .chosen-container .chosen-results-scroll-down span,
431
+ .chosen-container .chosen-results-scroll-up span {
432
+ background-image: url('chosen-sprite@2x.png') !important;
433
+ background-size: 52px 37px !important;
434
+ background-repeat: no-repeat !important;
435
+ }
436
+ }
437
+ /* @end */
backend/modules/calendar/resources/css/jquery-ui-1.10.1.css ADDED
@@ -0,0 +1,1174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.10.1 - 2013-02-15
2
+ * http://jqueryui.com
3
+ * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
4
+ * Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
5
+
6
+ /* Layout helpers
7
+ ----------------------------------*/
8
+ .ui-helper-hidden {
9
+ display: none;
10
+ }
11
+ .ui-helper-hidden-accessible {
12
+ border: 0;
13
+ clip: rect(0 0 0 0);
14
+ height: 1px;
15
+ margin: -1px;
16
+ overflow: hidden;
17
+ padding: 0;
18
+ position: absolute;
19
+ width: 1px;
20
+ }
21
+ .ui-helper-reset {
22
+ margin: 0;
23
+ padding: 0;
24
+ border: 0;
25
+ outline: 0;
26
+ line-height: 1.3;
27
+ text-decoration: none;
28
+ font-size: 100%;
29
+ list-style: none;
30
+ }
31
+ .ui-helper-clearfix:before,
32
+ .ui-helper-clearfix:after {
33
+ content: "";
34
+ display: table;
35
+ border-collapse: collapse;
36
+ }
37
+ .ui-helper-clearfix:after {
38
+ clear: both;
39
+ }
40
+ .ui-helper-clearfix {
41
+ min-height: 0; /* support: IE7 */
42
+ }
43
+ .ui-helper-zfix {
44
+ width: 100%;
45
+ height: 100%;
46
+ top: 0;
47
+ left: 0;
48
+ position: absolute;
49
+ opacity: 0;
50
+ filter:Alpha(Opacity=0);
51
+ }
52
+
53
+ .ui-front {
54
+ z-index: 100;
55
+ }
56
+
57
+
58
+ /* Interaction Cues
59
+ ----------------------------------*/
60
+ .ui-state-disabled {
61
+ cursor: default !important;
62
+ }
63
+
64
+
65
+ /* Icons
66
+ ----------------------------------*/
67
+
68
+ /* states and images */
69
+ .ui-icon {
70
+ display: block;
71
+ text-indent: -99999px;
72
+ overflow: hidden;
73
+ background-repeat: no-repeat;
74
+ }
75
+
76
+
77
+ /* Misc visuals
78
+ ----------------------------------*/
79
+
80
+ /* Overlays */
81
+ .ui-widget-overlay {
82
+ position: fixed;
83
+ top: 0;
84
+ left: 0;
85
+ width: 100%;
86
+ height: 100%;
87
+ }
88
+ .ui-accordion .ui-accordion-header {
89
+ display: block;
90
+ cursor: pointer;
91
+ position: relative;
92
+ margin-top: 2px;
93
+ padding: .5em .5em .5em .7em;
94
+ min-height: 0; /* support: IE7 */
95
+ }
96
+ .ui-accordion .ui-accordion-icons {
97
+ padding-left: 2.2em;
98
+ }
99
+ .ui-accordion .ui-accordion-noicons {
100
+ padding-left: .7em;
101
+ }
102
+ .ui-accordion .ui-accordion-icons .ui-accordion-icons {
103
+ padding-left: 2.2em;
104
+ }
105
+ .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
106
+ position: absolute;
107
+ left: .5em;
108
+ top: 50%;
109
+ margin-top: -8px;
110
+ }
111
+ .ui-accordion .ui-accordion-content {
112
+ padding: 1em 2.2em;
113
+ border-top: 0;
114
+ overflow: auto;
115
+ }
116
+ .ui-autocomplete {
117
+ position: absolute;
118
+ top: 0;
119
+ left: 0;
120
+ cursor: default;
121
+ }
122
+ .ui-button {
123
+ display: inline-block;
124
+ position: relative;
125
+ padding: 0;
126
+ line-height: normal;
127
+ margin-right: .1em;
128
+ cursor: pointer;
129
+ vertical-align: middle;
130
+ text-align: center;
131
+ overflow: visible; /* removes extra width in IE */
132
+ }
133
+ .ui-button,
134
+ .ui-button:link,
135
+ .ui-button:visited,
136
+ .ui-button:hover,
137
+ .ui-button:active {
138
+ text-decoration: none;
139
+ }
140
+ /* to make room for the icon, a width needs to be set here */
141
+ .ui-button-icon-only {
142
+ width: 2.2em;
143
+ }
144
+ /* button elements seem to need a little more width */
145
+ button.ui-button-icon-only {
146
+ width: 2.4em;
147
+ }
148
+ .ui-button-icons-only {
149
+ width: 3.4em;
150
+ }
151
+ button.ui-button-icons-only {
152
+ width: 3.7em;
153
+ }
154
+
155
+ /* button text element */
156
+ .ui-button .ui-button-text {
157
+ display: block;
158
+ line-height: normal;
159
+ }
160
+ .ui-button-text-only .ui-button-text {
161
+ padding: .4em 1em;
162
+ }
163
+ .ui-button-icon-only .ui-button-text,
164
+ .ui-button-icons-only .ui-button-text {
165
+ padding: .4em;
166
+ text-indent: -9999999px;
167
+ }
168
+ .ui-button-text-icon-primary .ui-button-text,
169
+ .ui-button-text-icons .ui-button-text {
170
+ padding: .4em 1em .4em 2.1em;
171
+ }
172
+ .ui-button-text-icon-secondary .ui-button-text,
173
+ .ui-button-text-icons .ui-button-text {
174
+ padding: .4em 2.1em .4em 1em;
175
+ }
176
+ .ui-button-text-icons .ui-button-text {
177
+ padding-left: 2.1em;
178
+ padding-right: 2.1em;
179
+ }
180
+ /* no icon support for input elements, provide padding by default */
181
+ input.ui-button {
182
+ padding: .4em 1em;
183
+ }
184
+
185
+ /* button icon element(s) */
186
+ .ui-button-icon-only .ui-icon,
187
+ .ui-button-text-icon-primary .ui-icon,
188
+ .ui-button-text-icon-secondary .ui-icon,
189
+ .ui-button-text-icons .ui-icon,
190
+ .ui-button-icons-only .ui-icon {
191
+ position: absolute;
192
+ top: 50%;
193
+ margin-top: -8px;
194
+ }
195
+ .ui-button-icon-only .ui-icon {
196
+ left: 50%;
197
+ margin-left: -8px;
198
+ }
199
+ .ui-button-text-icon-primary .ui-button-icon-primary,
200
+ .ui-button-text-icons .ui-button-icon-primary,
201
+ .ui-button-icons-only .ui-button-icon-primary {
202
+ left: .5em;
203
+ }
204
+ .ui-button-text-icon-secondary .ui-button-icon-secondary,
205
+ .ui-button-text-icons .ui-button-icon-secondary,
206
+ .ui-button-icons-only .ui-button-icon-secondary {
207
+ right: .5em;
208
+ }
209
+
210
+ /* button sets */
211
+ .ui-buttonset {
212
+ margin-right: 7px;
213
+ }
214
+ .ui-buttonset .ui-button {
215
+ margin-left: 0;
216
+ margin-right: -.3em;
217
+ }
218
+
219
+ /* workarounds */
220
+ /* reset extra padding in Firefox, see h5bp.com/l */
221
+ input.ui-button::-moz-focus-inner,
222
+ button.ui-button::-moz-focus-inner {
223
+ border: 0;
224
+ padding: 0;
225
+ }
226
+ .ui-datepicker {
227
+ width: 17em;
228
+ padding: .2em .2em 0;
229
+ display: none;
230
+ }
231
+ .ui-datepicker .ui-datepicker-header {
232
+ position: relative;
233
+ padding: .2em 0;
234
+ }
235
+ .ui-datepicker .ui-datepicker-prev,
236
+ .ui-datepicker .ui-datepicker-next {
237
+ position: absolute;
238
+ top: 2px;
239
+ width: 1.8em;
240
+ height: 1.8em;
241
+ }
242
+ .ui-datepicker .ui-datepicker-prev-hover,
243
+ .ui-datepicker .ui-datepicker-next-hover {
244
+ top: 1px;
245
+ }
246
+ .ui-datepicker .ui-datepicker-prev {
247
+ left: 2px;
248
+ }
249
+ .ui-datepicker .ui-datepicker-next {
250
+ right: 2px;
251
+ }
252
+ .ui-datepicker .ui-datepicker-prev-hover {
253
+ left: 1px;
254
+ }
255
+ .ui-datepicker .ui-datepicker-next-hover {
256
+ right: 1px;
257
+ }
258
+ .ui-datepicker .ui-datepicker-prev span,
259
+ .ui-datepicker .ui-datepicker-next span {
260
+ display: block;
261
+ position: absolute;
262
+ left: 50%;
263
+ margin-left: -8px;
264
+ top: 50%;
265
+ margin-top: -8px;
266
+ }
267
+ .ui-datepicker .ui-datepicker-title {
268
+ margin: 0 2.3em;
269
+ line-height: 1.8em;
270
+ text-align: center;
271
+ }
272
+ .ui-datepicker .ui-datepicker-title select {
273
+ font-size: 1em;
274
+ margin: 1px 0;
275
+ }
276
+ .ui-datepicker select.ui-datepicker-month-year {
277
+ width: 100%;
278
+ }
279
+ .ui-datepicker select.ui-datepicker-month,
280
+ .ui-datepicker select.ui-datepicker-year {
281
+ width: 49%;
282
+ }
283
+ .ui-datepicker table {
284
+ width: 100%;
285
+ font-size: .9em;
286
+ border-collapse: collapse;
287
+ margin: 0 0 .4em;
288
+ }
289
+ .ui-datepicker th {
290
+ padding: .7em .3em;
291
+ text-align: center;
292
+ font-weight: bold;
293
+ border: 0;
294
+ }
295
+ .ui-datepicker td {
296
+ border: 0;
297
+ padding: 1px;
298
+ }
299
+ .ui-datepicker td span,
300
+ .ui-datepicker td a {
301
+ display: block;
302
+ padding: .2em;
303
+ text-align: right;
304
+ text-decoration: none;
305
+ }
306
+ .ui-datepicker .ui-datepicker-buttonpane {
307
+ background-image: none;
308
+ margin: .7em 0 0 0;
309
+ padding: 0 .2em;
310
+ border-left: 0;
311
+ border-right: 0;
312
+ border-bottom: 0;
313
+ }
314
+ .ui-datepicker .ui-datepicker-buttonpane button {
315
+ float: right;
316
+ margin: .5em .2em .4em;
317
+ cursor: pointer;
318
+ padding: .2em .6em .3em .6em;
319
+ width: auto;
320
+ overflow: visible;
321
+ }
322
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
323
+ float: left;
324
+ }
325
+
326
+ /* with multiple calendars */
327
+ .ui-datepicker.ui-datepicker-multi {
328
+ width: auto;
329
+ }
330
+ .ui-datepicker-multi .ui-datepicker-group {
331
+ float: left;
332
+ }
333
+ .ui-datepicker-multi .ui-datepicker-group table {
334
+ width: 95%;
335
+ margin: 0 auto .4em;
336
+ }
337
+ .ui-datepicker-multi-2 .ui-datepicker-group {
338
+ width: 50%;
339
+ }
340
+ .ui-datepicker-multi-3 .ui-datepicker-group {
341
+ width: 33.3%;
342
+ }
343
+ .ui-datepicker-multi-4 .ui-datepicker-group {
344
+ width: 25%;
345
+ }
346
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
347
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
348
+ border-left-width: 0;
349
+ }
350
+ .ui-datepicker-multi .ui-datepicker-buttonpane {
351
+ clear: left;
352
+ }
353
+ .ui-datepicker-row-break {
354
+ clear: both;
355
+ width: 100%;
356
+ font-size: 0;
357
+ }
358
+
359
+ /* RTL support */
360
+ .ui-datepicker-rtl {
361
+ direction: rtl;
362
+ }
363
+ .ui-datepicker-rtl .ui-datepicker-prev {
364
+ right: 2px;
365
+ left: auto;
366
+ }
367
+ .ui-datepicker-rtl .ui-datepicker-next {
368
+ left: 2px;
369
+ right: auto;
370
+ }
371
+ .ui-datepicker-rtl .ui-datepicker-prev:hover {
372
+ right: 1px;
373
+ left: auto;
374
+ }
375
+ .ui-datepicker-rtl .ui-datepicker-next:hover {
376
+ left: 1px;
377
+ right: auto;
378
+ }
379
+ .ui-datepicker-rtl .ui-datepicker-buttonpane {
380
+ clear: right;
381
+ }
382
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button {
383
+ float: left;
384
+ }
385
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
386
+ .ui-datepicker-rtl .ui-datepicker-group {
387
+ float: right;
388
+ }
389
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
390
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
391
+ border-right-width: 0;
392
+ border-left-width: 1px;
393
+ }
394
+ .ui-dialog {
395
+ position: absolute;
396
+ top: 0;
397
+ left: 0;
398
+ padding: .2em;
399
+ outline: 0;
400
+ }
401
+ .ui-dialog .ui-dialog-titlebar {
402
+ padding: .4em 1em;
403
+ position: relative;
404
+ }
405
+ .ui-dialog .ui-dialog-title {
406
+ float: left;
407
+ margin: .1em 0;
408
+ white-space: nowrap;
409
+ width: 90%;
410
+ overflow: hidden;
411
+ text-overflow: ellipsis;
412
+ }
413
+ .ui-dialog .ui-dialog-titlebar-close {
414
+ position: absolute;
415
+ right: .3em;
416
+ top: 50%;
417
+ width: 21px;
418
+ margin: -10px 0 0 0;
419
+ padding: 1px;
420
+ height: 20px;
421
+ }
422
+ .ui-dialog .ui-dialog-content {
423
+ position: relative;
424
+ border: 0;
425
+ padding: .5em 1em;
426
+ background: none;
427
+ overflow: auto;
428
+ }
429
+ .ui-dialog .ui-dialog-buttonpane {
430
+ text-align: left;
431
+ border-width: 1px 0 0 0;
432
+ background-image: none;
433
+ margin-top: .5em;
434
+ padding: .3em 1em .5em .4em;
435
+ }
436
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
437
+ float: right;
438
+ }
439
+ .ui-dialog .ui-dialog-buttonpane button {
440
+ margin: .5em .4em .5em 0;
441
+ cursor: pointer;
442
+ }
443
+ .ui-dialog .ui-resizable-se {
444
+ width: 12px;
445
+ height: 12px;
446
+ right: -5px;
447
+ bottom: -5px;
448
+ background-position: 16px 16px;
449
+ }
450
+ .ui-draggable .ui-dialog-titlebar {
451
+ cursor: move;
452
+ }
453
+ .ui-menu {
454
+ list-style: none;
455
+ padding: 2px;
456
+ margin: 0;
457
+ display: block;
458
+ outline: none;
459
+ }
460
+ .ui-menu .ui-menu {
461
+ margin-top: -3px;
462
+ position: absolute;
463
+ }
464
+ .ui-menu .ui-menu-item {
465
+ margin: 0;
466
+ padding: 0;
467
+ width: 100%;
468
+ }
469
+ .ui-menu .ui-menu-divider {
470
+ margin: 5px -2px 5px -2px;
471
+ height: 0;
472
+ font-size: 0;
473
+ line-height: 0;
474
+ border-width: 1px 0 0 0;
475
+ }
476
+ .ui-menu .ui-menu-item a {
477
+ text-decoration: none;
478
+ display: block;
479
+ padding: 2px .4em;
480
+ line-height: 1.5;
481
+ min-height: 0; /* support: IE7 */
482
+ font-weight: normal;
483
+ }
484
+ .ui-menu .ui-menu-item a.ui-state-focus,
485
+ .ui-menu .ui-menu-item a.ui-state-active {
486
+ font-weight: normal;
487
+ margin: -1px;
488
+ }
489
+
490
+ .ui-menu .ui-state-disabled {
491
+ font-weight: normal;
492
+ margin: .4em 0 .2em;
493
+ line-height: 1.5;
494
+ }
495
+ .ui-menu .ui-state-disabled a {
496
+ cursor: default;
497
+ }
498
+
499
+ /* icon support */
500
+ .ui-menu-icons {
501
+ position: relative;
502
+ }
503
+ .ui-menu-icons .ui-menu-item a {
504
+ position: relative;
505
+ padding-left: 2em;
506
+ }
507
+
508
+ /* left-aligned */
509
+ .ui-menu .ui-icon {
510
+ position: absolute;
511
+ top: .2em;
512
+ left: .2em;
513
+ }
514
+
515
+ /* right-aligned */
516
+ .ui-menu .ui-menu-icon {
517
+ position: static;
518
+ float: right;
519
+ }
520
+ .ui-progressbar {
521
+ height: 2em;
522
+ text-align: left;
523
+ overflow: hidden;
524
+ }
525
+ .ui-progressbar .ui-progressbar-value {
526
+ margin: -1px;
527
+ height: 100%;
528
+ }
529
+ .ui-progressbar .ui-progressbar-overlay {
530
+ background: url("images/animated-overlay.gif");
531
+ height: 100%;
532
+ filter: alpha(opacity=25);
533
+ opacity: 0.25;
534
+ }
535
+ .ui-progressbar-indeterminate .ui-progressbar-value {
536
+ background-image: none;
537
+ }
538
+ .ui-resizable {
539
+ position: relative;
540
+ }
541
+ .ui-resizable-handle {
542
+ position: absolute;
543
+ font-size: 0.1px;
544
+ display: block;
545
+ }
546
+ .ui-resizable-disabled .ui-resizable-handle,
547
+ .ui-resizable-autohide .ui-resizable-handle {
548
+ display: none;
549
+ }
550
+ .ui-resizable-n {
551
+ cursor: n-resize;
552
+ height: 7px;
553
+ width: 100%;
554
+ top: -5px;
555
+ left: 0;
556
+ }
557
+ .ui-resizable-s {
558
+ cursor: s-resize;
559
+ height: 7px;
560
+ width: 100%;
561
+ bottom: -5px;
562
+ left: 0;
563
+ }
564
+ .ui-resizable-e {
565
+ cursor: e-resize;
566
+ width: 7px;
567
+ right: -5px;
568
+ top: 0;
569
+ height: 100%;
570
+ }
571
+ .ui-resizable-w {
572
+ cursor: w-resize;
573
+ width: 7px;
574
+ left: -5px;
575
+ top: 0;
576
+ height: 100%;
577
+ }
578
+ .ui-resizable-se {
579
+ cursor: se-resize;
580
+ width: 12px;
581
+ height: 12px;
582
+ right: 1px;
583
+ bottom: 1px;
584
+ }
585
+ .ui-resizable-sw {
586
+ cursor: sw-resize;
587
+ width: 9px;
588
+ height: 9px;
589
+ left: -5px;
590
+ bottom: -5px;
591
+ }
592
+ .ui-resizable-nw {
593
+ cursor: nw-resize;
594
+ width: 9px;
595
+ height: 9px;
596
+ left: -5px;
597
+ top: -5px;
598
+ }
599
+ .ui-resizable-ne {
600
+ cursor: ne-resize;
601
+ width: 9px;
602
+ height: 9px;
603
+ right: -5px;
604
+ top: -5px;
605
+ }
606
+ .ui-selectable-helper {
607
+ position: absolute;
608
+ z-index: 100;
609
+ border: 1px dotted black;
610
+ }
611
+ .ui-slider {
612
+ position: relative;
613
+ text-align: left;
614
+ }
615
+ .ui-slider .ui-slider-handle {
616
+ position: absolute;
617
+ z-index: 2;
618
+ width: 1.2em;
619
+ height: 1.2em;
620
+ cursor: default;
621
+ }
622
+ .ui-slider .ui-slider-range {
623
+ position: absolute;
624
+ z-index: 1;
625
+ font-size: .7em;
626
+ display: block;
627
+ border: 0;
628
+ background-position: 0 0;
629
+ }
630
+
631
+ /* For IE8 - See #6727 */
632
+ .ui-slider.ui-state-disabled .ui-slider-handle,
633
+ .ui-slider.ui-state-disabled .ui-slider-range {
634
+ filter: inherit;
635
+ }
636
+
637
+ .ui-slider-horizontal {
638
+ height: .8em;
639
+ }
640
+ .ui-slider-horizontal .ui-slider-handle {
641
+ top: -.3em;
642
+ margin-left: -.6em;
643
+ }
644
+ .ui-slider-horizontal .ui-slider-range {
645
+ top: 0;
646
+ height: 100%;
647
+ }
648
+ .ui-slider-horizontal .ui-slider-range-min {
649
+ left: 0;
650
+ }
651
+ .ui-slider-horizontal .ui-slider-range-max {
652
+ right: 0;
653
+ }
654
+
655
+ .ui-slider-vertical {
656
+ width: .8em;
657
+ height: 100px;
658
+ }
659
+ .ui-slider-vertical .ui-slider-handle {
660
+ left: -.3em;
661
+ margin-left: 0;
662
+ margin-bottom: -.6em;
663
+ }
664
+ .ui-slider-vertical .ui-slider-range {
665
+ left: 0;
666
+ width: 100%;
667
+ }
668
+ .ui-slider-vertical .ui-slider-range-min {
669
+ bottom: 0;
670
+ }
671
+ .ui-slider-vertical .ui-slider-range-max {
672
+ top: 0;
673
+ }
674
+ .ui-spinner {
675
+ position: relative;
676
+ display: inline-block;
677
+ overflow: hidden;
678
+ padding: 0;
679
+ vertical-align: middle;
680
+ }
681
+ .ui-spinner-input {
682
+ border: none;
683
+ background: none;
684
+ color: inherit;
685
+ padding: 0;
686
+ margin: .2em 0;
687
+ vertical-align: middle;
688
+ margin-left: .4em;
689
+ margin-right: 22px;
690
+ }
691
+ .ui-spinner-button {
692
+ width: 16px;
693
+ height: 50%;
694
+ font-size: .5em;
695
+ padding: 0;
696
+ margin: 0;
697
+ text-align: center;
698
+ position: absolute;
699
+ cursor: default;
700
+ display: block;
701
+ overflow: hidden;
702
+ right: 0;
703
+ }
704
+ /* more specificity required here to overide default borders */
705
+ .ui-spinner a.ui-spinner-button {
706
+ border-top: none;
707
+ border-bottom: none;
708
+ border-right: none;
709
+ }
710
+ /* vertical centre icon */
711
+ .ui-spinner .ui-icon {
712
+ position: absolute;
713
+ margin-top: -8px;
714
+ top: 50%;
715
+ left: 0;
716
+ }
717
+ .ui-spinner-up {
718
+ top: 0;
719
+ }
720
+ .ui-spinner-down {
721
+ bottom: 0;
722
+ }
723
+
724
+ /* TR overrides */
725
+ .ui-spinner .ui-icon-triangle-1-s {
726
+ /* need to fix icons sprite */
727
+ background-position: -65px -16px;
728
+ }
729
+ .ui-tabs {
730
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
731
+ padding: .2em;
732
+ }
733
+ .ui-tabs .ui-tabs-nav {
734
+ margin: 0;
735
+ padding: .2em .2em 0;
736
+ }
737
+ .ui-tabs .ui-tabs-nav li {
738
+ list-style: none;
739
+ float: left;
740
+ position: relative;
741
+ top: 0;
742
+ margin: 1px .2em 0 0;
743
+ border-bottom: 0;
744
+ padding: 0;
745
+ white-space: nowrap;
746
+ }
747
+ .ui-tabs .ui-tabs-nav li a {
748
+ float: left;
749
+ padding: .5em 1em;
750
+ text-decoration: none;
751
+ }
752
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active {
753
+ margin-bottom: -1px;
754
+ padding-bottom: 1px;
755
+ }
756
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
757
+ .ui-tabs .ui-tabs-nav li.ui-state-disabled a,
758
+ .ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
759
+ cursor: text;
760
+ }
761
+ .ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
762
+ .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
763
+ cursor: pointer;
764
+ }
765
+ .ui-tabs .ui-tabs-panel {
766
+ display: block;
767
+ border-width: 0;
768
+ padding: 1em 1.4em;
769
+ background: none;
770
+ }
771
+ .ui-tooltip {
772
+ padding: 8px;
773
+ position: absolute;
774
+ z-index: 9999;
775
+ max-width: 300px;
776
+ -webkit-box-shadow: 0 0 5px #aaa;
777
+ box-shadow: 0 0 5px #aaa;
778
+ }
779
+ body .ui-tooltip {
780
+ border-width: 2px;
781
+ }
782
+
783
+ /* Component containers
784
+ ----------------------------------*/
785
+ .ui-widget {
786
+ font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
787
+ font-size: 1.1em/*{fsDefault}*/;
788
+ }
789
+ .ui-widget .ui-widget {
790
+ font-size: 1em;
791
+ }
792
+ .ui-widget input,
793
+ .ui-widget select,
794
+ .ui-widget textarea,
795
+ .ui-widget button {
796
+ font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
797
+ font-size: 1em;
798
+ }
799
+ .ui-widget-content {
800
+ border: 1px solid #aaaaaa/*{borderColorContent}*/;
801
+ background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/;
802
+ color: #222222/*{fcContent}*/;
803
+ }
804
+ .ui-widget-content a {
805
+ color: #222222/*{fcContent}*/;
806
+ }
807
+ .ui-widget-header {
808
+ border: 1px solid #aaaaaa/*{borderColorHeader}*/;
809
+ background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/;
810
+ color: #222222/*{fcHeader}*/;
811
+ font-weight: bold;
812
+ }
813
+ .ui-widget-header a {
814
+ color: #222222/*{fcHeader}*/;
815
+ }
816
+
817
+ /* Interaction states
818
+ ----------------------------------*/
819
+ .ui-state-default,
820
+ .ui-widget-content .ui-state-default,
821
+ .ui-widget-header .ui-state-default {
822
+ border: 1px solid #d3d3d3/*{borderColorDefault}*/;
823
+ background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/;
824
+ font-weight: normal/*{fwDefault}*/;
825
+ color: #555555/*{fcDefault}*/;
826
+ }
827
+ .ui-state-default a,
828
+ .ui-state-default a:link,
829
+ .ui-state-default a:visited {
830
+ color: #555555/*{fcDefault}*/;
831
+ text-decoration: none;
832
+ }
833
+ .ui-state-hover,
834
+ .ui-widget-content .ui-state-hover,
835
+ .ui-widget-header .ui-state-hover,
836
+ .ui-state-focus,
837
+ .ui-widget-content .ui-state-focus,
838
+ .ui-widget-header .ui-state-focus {
839
+ border: 1px solid #999999/*{borderColorHover}*/;
840
+ background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/;
841
+ font-weight: normal/*{fwDefault}*/;
842
+ color: #212121/*{fcHover}*/;
843
+ }
844
+ .ui-state-hover a,
845
+ .ui-state-hover a:hover,
846
+ .ui-state-hover a:link,
847
+ .ui-state-hover a:visited {
848
+ color: #212121/*{fcHover}*/;
849
+ text-decoration: none;
850
+ }
851
+ .ui-state-active,
852
+ .ui-widget-content .ui-state-active,
853
+ .ui-widget-header .ui-state-active {
854
+ border: 1px solid #aaaaaa/*{borderColorActive}*/;
855
+ background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/;
856
+ font-weight: normal/*{fwDefault}*/;
857
+ color: #212121/*{fcActive}*/;
858
+ }
859
+ .ui-state-active a,
860
+ .ui-state-active a:link,
861
+ .ui-state-active a:visited {
862
+ color: #212121/*{fcActive}*/;
863
+ text-decoration: none;
864
+ }
865
+
866
+ /* Interaction Cues
867
+ ----------------------------------*/
868
+ .ui-state-highlight,
869
+ .ui-widget-content .ui-state-highlight,
870
+ .ui-widget-header .ui-state-highlight {
871
+ border: 1px solid #fcefa1/*{borderColorHighlight}*/;
872
+ background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/;
873
+ color: #363636/*{fcHighlight}*/;
874
+ }
875
+ .ui-state-highlight a,
876
+ .ui-widget-content .ui-state-highlight a,
877
+ .ui-widget-header .ui-state-highlight a {
878
+ color: #363636/*{fcHighlight}*/;
879
+ }
880
+ .ui-state-error,
881
+ .ui-widget-content .ui-state-error,
882
+ .ui-widget-header .ui-state-error {
883
+ border: 1px solid #cd0a0a/*{borderColorError}*/;
884
+ background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/;
885
+ color: #cd0a0a/*{fcError}*/;
886
+ }
887
+ .ui-state-error a,
888
+ .ui-widget-content .ui-state-error a,
889
+ .ui-widget-header .ui-state-error a {
890
+ color: #cd0a0a/*{fcError}*/;
891
+ }
892
+ .ui-state-error-text,
893
+ .ui-widget-content .ui-state-error-text,
894
+ .ui-widget-header .ui-state-error-text {
895
+ color: #cd0a0a/*{fcError}*/;
896
+ }
897
+ .ui-priority-primary,
898
+ .ui-widget-content .ui-priority-primary,
899
+ .ui-widget-header .ui-priority-primary {
900
+ font-weight: bold;
901
+ }
902
+ .ui-priority-secondary,
903
+ .ui-widget-content .ui-priority-secondary,
904
+ .ui-widget-header .ui-priority-secondary {
905
+ opacity: .7;
906
+ filter:Alpha(Opacity=70);
907
+ font-weight: normal;
908
+ }
909
+ .ui-state-disabled,
910
+ .ui-widget-content .ui-state-disabled,
911
+ .ui-widget-header .ui-state-disabled {
912
+ opacity: .35;
913
+ filter:Alpha(Opacity=35);
914
+ background-image: none;
915
+ }
916
+ .ui-state-disabled .ui-icon {
917
+ filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
918
+ }
919
+
920
+ /* Icons
921
+ ----------------------------------*/
922
+
923
+ /* states and images */
924
+ .ui-icon {
925
+ width: 16px;
926
+ height: 16px;
927
+ background-position: 16px 16px;
928
+ }
929
+ .ui-icon,
930
+ .ui-widget-content .ui-icon {
931
+ background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/;
932
+ }
933
+ .ui-widget-header .ui-icon {
934
+ background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/;
935
+ }
936
+ .ui-state-default .ui-icon {
937
+ background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/;
938
+ }
939
+ .ui-state-hover .ui-icon,
940
+ .ui-state-focus .ui-icon {
941
+ background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/;
942
+ }
943
+ .ui-state-active .ui-icon {
944
+ background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/;
945
+ }
946
+ .ui-state-highlight .ui-icon {
947
+ background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/;
948
+ }
949
+ .ui-state-error .ui-icon,
950
+ .ui-state-error-text .ui-icon {
951
+ background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/;
952
+ }
953
+
954
+ /* positioning */
955
+ .ui-icon-carat-1-n { background-position: 0 0; }
956
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
957
+ .ui-icon-carat-1-e { background-position: -32px 0; }
958
+ .ui-icon-carat-1-se { background-position: -48px 0; }
959
+ .ui-icon-carat-1-s { background-position: -64px 0; }
960
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
961
+ .ui-icon-carat-1-w { background-position: -96px 0; }
962
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
963
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
964
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
965
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
966
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
967
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
968
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
969
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
970
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
971
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
972
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
973
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
974
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
975
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
976
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
977
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
978
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
979
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
980
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
981
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
982
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
983
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
984
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
985
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
986
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
987
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
988
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
989
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
990
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
991
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
992
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
993
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
994
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
995
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
996
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
997
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
998
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
999
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1000
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1001
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1002
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1003
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1004
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1005
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1006
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1007
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1008
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1009
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1010
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1011
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1012
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1013
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1014
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1015
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1016
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1017
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1018
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1019
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
1020
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1021
+ .ui-icon-extlink { background-position: -32px -80px; }
1022
+ .ui-icon-newwin { background-position: -48px -80px; }
1023
+ .ui-icon-refresh { background-position: -64px -80px; }
1024
+ .ui-icon-shuffle { background-position: -80px -80px; }
1025
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
1026
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1027
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
1028
+ .ui-icon-folder-open { background-position: -16px -96px; }
1029
+ .ui-icon-document { background-position: -32px -96px; }
1030
+ .ui-icon-document-b { background-position: -48px -96px; }
1031
+ .ui-icon-note { background-position: -64px -96px; }
1032
+ .ui-icon-mail-closed { background-position: -80px -96px; }
1033
+ .ui-icon-mail-open { background-position: -96px -96px; }
1034
+ .ui-icon-suitcase { background-position: -112px -96px; }
1035
+ .ui-icon-comment { background-position: -128px -96px; }
1036
+ .ui-icon-person { background-position: -144px -96px; }
1037
+ .ui-icon-print { background-position: -160px -96px; }
1038
+ .ui-icon-trash { background-position: -176px -96px; }
1039
+ .ui-icon-locked { background-position: -192px -96px; }
1040
+ .ui-icon-unlocked { background-position: -208px -96px; }
1041
+ .ui-icon-bookmark { background-position: -224px -96px; }
1042
+ .ui-icon-tag { background-position: -240px -96px; }
1043
+ .ui-icon-home { background-position: 0 -112px; }
1044
+ .ui-icon-flag { background-position: -16px -112px; }
1045
+ .ui-icon-calendar { background-position: -32px -112px; }
1046
+ .ui-icon-cart { background-position: -48px -112px; }
1047
+ .ui-icon-pencil { background-position: -64px -112px; }
1048
+ .ui-icon-clock { background-position: -80px -112px; }
1049
+ .ui-icon-disk { background-position: -96px -112px; }
1050
+ .ui-icon-calculator { background-position: -112px -112px; }
1051
+ .ui-icon-zoomin { background-position: -128px -112px; }
1052
+ .ui-icon-zoomout { background-position: -144px -112px; }
1053
+ .ui-icon-search { background-position: -160px -112px; }
1054
+ .ui-icon-wrench { background-position: -176px -112px; }
1055
+ .ui-icon-gear { background-position: -192px -112px; }
1056
+ .ui-icon-heart { background-position: -208px -112px; }
1057
+ .ui-icon-star { background-position: -224px -112px; }
1058
+ .ui-icon-link { background-position: -240px -112px; }
1059
+ .ui-icon-cancel { background-position: 0 -128px; }
1060
+ .ui-icon-plus { background-position: -16px -128px; }
1061
+ .ui-icon-plusthick { background-position: -32px -128px; }
1062
+ .ui-icon-minus { background-position: -48px -128px; }
1063
+ .ui-icon-minusthick { background-position: -64px -128px; }
1064
+ .ui-icon-close { background-position: -80px -128px; }
1065
+ .ui-icon-closethick { background-position: -96px -128px; }
1066
+ .ui-icon-key { background-position: -112px -128px; }
1067
+ .ui-icon-lightbulb { background-position: -128px -128px; }
1068
+ .ui-icon-scissors { background-position: -144px -128px; }
1069
+ .ui-icon-clipboard { background-position: -160px -128px; }
1070
+ .ui-icon-copy { background-position: -176px -128px; }
1071
+ .ui-icon-contact { background-position: -192px -128px; }
1072
+ .ui-icon-image { background-position: -208px -128px; }
1073
+ .ui-icon-video { background-position: -224px -128px; }
1074
+ .ui-icon-script { background-position: -240px -128px; }
1075
+ .ui-icon-alert { background-position: 0 -144px; }
1076
+ .ui-icon-info { background-position: -16px -144px; }
1077
+ .ui-icon-notice { background-position: -32px -144px; }
1078
+ .ui-icon-help { background-position: -48px -144px; }
1079
+ .ui-icon-check { background-position: -64px -144px; }
1080
+ .ui-icon-bullet { background-position: -80px -144px; }
1081
+ .ui-icon-radio-on { background-position: -96px -144px; }
1082
+ .ui-icon-radio-off { background-position: -112px -144px; }
1083
+ .ui-icon-pin-w { background-position: -128px -144px; }
1084
+ .ui-icon-pin-s { background-position: -144px -144px; }
1085
+ .ui-icon-play { background-position: 0 -160px; }
1086
+ .ui-icon-pause { background-position: -16px -160px; }
1087
+ .ui-icon-seek-next { background-position: -32px -160px; }
1088
+ .ui-icon-seek-prev { background-position: -48px -160px; }
1089
+ .ui-icon-seek-end { background-position: -64px -160px; }
1090
+ .ui-icon-seek-start { background-position: -80px -160px; }
1091
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1092
+ .ui-icon-seek-first { background-position: -80px -160px; }
1093
+ .ui-icon-stop { background-position: -96px -160px; }
1094
+ .ui-icon-eject { background-position: -112px -160px; }
1095
+ .ui-icon-volume-off { background-position: -128px -160px; }
1096
+ .ui-icon-volume-on { background-position: -144px -160px; }
1097
+ .ui-icon-power { background-position: 0 -176px; }
1098
+ .ui-icon-signal-diag { background-position: -16px -176px; }
1099
+ .ui-icon-signal { background-position: -32px -176px; }
1100
+ .ui-icon-battery-0 { background-position: -48px -176px; }
1101
+ .ui-icon-battery-1 { background-position: -64px -176px; }
1102
+ .ui-icon-battery-2 { background-position: -80px -176px; }
1103
+ .ui-icon-battery-3 { background-position: -96px -176px; }
1104
+ .ui-icon-circle-plus { background-position: 0 -192px; }
1105
+ .ui-icon-circle-minus { background-position: -16px -192px; }
1106
+ .ui-icon-circle-close { background-position: -32px -192px; }
1107
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1108
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1109
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1110
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1111
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1112
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1113
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1114
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1115
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
1116
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
1117
+ .ui-icon-circle-check { background-position: -208px -192px; }
1118
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1119
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1120
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
1121
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1122
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1123
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
1124
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1125
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1126
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1127
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1128
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1129
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1130
+
1131
+
1132
+ /* Misc visuals
1133
+ ----------------------------------*/
1134
+
1135
+ /* Corner radius */
1136
+ .ui-corner-all,
1137
+ .ui-corner-top,
1138
+ .ui-corner-left,
1139
+ .ui-corner-tl {
1140
+ border-top-left-radius: 4px/*{cornerRadius}*/;
1141
+ }
1142
+ .ui-corner-all,
1143
+ .ui-corner-top,
1144
+ .ui-corner-right,
1145
+ .ui-corner-tr {
1146
+ border-top-right-radius: 4px/*{cornerRadius}*/;
1147
+ }
1148
+ .ui-corner-all,
1149
+ .ui-corner-bottom,
1150
+ .ui-corner-left,
1151
+ .ui-corner-bl {
1152
+ border-bottom-left-radius: 4px/*{cornerRadius}*/;
1153
+ }
1154
+ .ui-corner-all,
1155
+ .ui-corner-bottom,
1156
+ .ui-corner-right,
1157
+ .ui-corner-br {
1158
+ border-bottom-right-radius: 4px/*{cornerRadius}*/;
1159
+ }
1160
+
1161
+ /* Overlays */
1162
+ .ui-widget-overlay {
1163
+ background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/;
1164
+ opacity: .3/*{opacityOverlay}*/;
1165
+ filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/;
1166
+ }
1167
+ .ui-widget-shadow {
1168
+ margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/;
1169
+ padding: 8px/*{thicknessShadow}*/;
1170
+ background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/;
1171
+ opacity: .3/*{opacityShadow}*/;
1172
+ filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/;
1173
+ border-radius: 8px/*{cornerRadiusShadow}*/;
1174
+ }
backend/modules/calendar/resources/css/jquery.weekcalendar.css ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wc-container {
2
+ font-size: 14px;
3
+ font-family: arial, helvetica;
4
+ }
5
+
6
+ .wc-toolbar {
7
+ padding: 1em;
8
+ font-size:0.8em;
9
+ }
10
+
11
+ .wc-toolbar .wc-nav {
12
+ float:left;
13
+ }
14
+
15
+ .wc-toolbar .wc-display {
16
+ float: right;
17
+ }
18
+
19
+ .wc-toolbar button {
20
+ margin-top: 0;
21
+ margin-bottom: 0;
22
+ }
23
+
24
+ .wc-toolbar .wc-title {
25
+ text-align: center;
26
+ padding:0;
27
+ margin:0;
28
+ }
29
+
30
+ .wc-container table {
31
+ border-collapse: collapse;
32
+ border-spacing: 0;
33
+ }
34
+ .wc-container table td {
35
+ margin: 0;
36
+ padding: 0;
37
+ }
38
+
39
+ .wc-header {
40
+ background: #eee;
41
+ border-width:1px 0;
42
+ border-style:solid;
43
+ }
44
+ .wc-header table{
45
+ width: 100%;
46
+ table-layout:fixed;
47
+ }
48
+
49
+ .wc-grid-timeslot-header,
50
+ .wc-header .wc-time-column-header {
51
+ width: 45px;
52
+ }
53
+
54
+ .wc-header .wc-scrollbar-shim {
55
+ /* this width replace js */
56
+ }
57
+
58
+ .wc-header .wc-day-column-header {
59
+ text-align: center;
60
+ padding: 0.4em;
61
+ }
62
+
63
+ .wc-header .wc-user-header{
64
+ text-align: center;
65
+ padding: 0.4em 0;
66
+ overflow:hidden;
67
+ }
68
+ .wc-grid-timeslot-header {
69
+ background: #eee;
70
+ }
71
+
72
+
73
+
74
+ .wc-scrollable-grid {
75
+ overflow: auto;
76
+ overflow-x: hidden !important;
77
+ overflow-y: auto !important;
78
+ position: relative;
79
+ background-color: #fff;
80
+ width: 100%;
81
+ }
82
+
83
+
84
+ table.wc-time-slots {
85
+ width: 100%;
86
+ table-layout: fixed;
87
+ cursor: default;
88
+ overflow:hidden;
89
+ }
90
+
91
+ .wc-day-column {
92
+ width: 13.5%;
93
+ overflow: visible;
94
+ vertical-align: top;
95
+ }
96
+ .wc-day-column-header{border-width: 0 0 0 3px; border-style: solid;border-color:#aaaaaa;}
97
+ .wc-scrollable-grid .wc-day-column-last,
98
+ .wc-scrollable-grid .wc-day-column-middle{border-width: 0 0 0 1px; border-style: dashed;}
99
+ .wc-scrollable-grid .wc-day-column-first{border-width: 0 0 0 3px; border-style: double;}
100
+
101
+ .wc-day-column-inner {
102
+ width: 100%;
103
+ position:relative;
104
+ }
105
+
106
+ .wc-no-height-wrapper{
107
+ position:relative;
108
+ overflow: visible;
109
+ height: 0px;
110
+ }
111
+
112
+ .wc-time-slot-wrapper {
113
+ /* top: 3px;*/
114
+ }
115
+ .wc-oddeven-wrapper .wc-full-height-column{
116
+ /* top: 2px; */
117
+ /* Modern Browsers */ opacity: 0.4;
118
+ /* IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
119
+ /* IE 5-7 */ filter: alpha(opacity=40);
120
+ /* Netscape */ -moz-opacity: 0.4;
121
+ /* Safari 1 */ -khtml-opacity: 0.4;
122
+ }
123
+ .wc-freebusy-wrapper .wc-freebusy{
124
+ /* top: 1px;*/
125
+ /* Modern Browsers */ opacity: 0.4;
126
+ /* IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
127
+ /* IE 5-7 */ filter: alpha(opacity=40);
128
+ /* Netscape */ -moz-opacity: 0.4;
129
+ /* Safari 1 */ -khtml-opacity: 0.4;
130
+ }
131
+
132
+ .wc-time-slots {
133
+ position: absolute;
134
+ width: 100%;
135
+ }
136
+
137
+ .wc-column-odd,
138
+ .wc-column-even.ui-state-hover{background-image:none;border:none;}
139
+
140
+ .wc-header .wc-today.ui-state-active{background-image:none;}
141
+ .wc-header .wc-today.wc-day-column-header{border-width:0 3px; border-style: solid;}
142
+ .wc-header .wc-user-header{border-width:0;}
143
+
144
+ .wc-time-slots .wc-day-column.ui-state-default{background:transparent;}
145
+ .wc-time-slots .wc-today.ui-state-active{background-image:none;}
146
+ .wc-header .wc-today.ui-state-active.wc-day-column-middle{border-width:0;}
147
+ .wc-header .wc-today.ui-state-active.wc-day-column-first{border-left-width:3px;}
148
+ .wc-header .wc-today.ui-state-active.wc-day-column-last{border-right-width:3px;}
149
+
150
+ .wc-full-height-column{
151
+ display:block;
152
+ /* width:100%;*/
153
+ }
154
+
155
+
156
+ .wc-time-header-cell {
157
+ padding: 5px;
158
+ height: 80px; /* reference height */
159
+ }
160
+
161
+
162
+ .wc-time-slot {
163
+ border-bottom: 1px dotted #ddd;
164
+ }
165
+
166
+ .wc-hour-header {
167
+ text-align: right;
168
+ }
169
+ .wc-hour-header.ui-state-active,
170
+ .wc-hour-header.ui-state-default{
171
+ border-width:0 0 1px 0;
172
+ }
173
+
174
+ .wc-hour-end, .wc-hour-header {
175
+ border-bottom: 1px solid #ccc;
176
+ color: #555;
177
+
178
+ }
179
+
180
+ .wc-business-hours {
181
+ background-color: #E6EEF1;
182
+ border-bottom: 1px solid #ccc;
183
+ color: #333;
184
+ font-size: 1.4em;
185
+
186
+ }
187
+
188
+ .wc-business-hours .wc-am-pm {
189
+ font-size: 0.6em;
190
+ }
191
+
192
+ .wc-day-header-cell {
193
+ text-align: center;
194
+ vertical-align: middle;
195
+ padding: 5px;
196
+ }
197
+
198
+
199
+
200
+ .wc-time-slot-header .wc-header-cell {
201
+ text-align: right;
202
+ padding-right: 10px;
203
+ }
204
+
205
+ .wc-cal-event {
206
+ background-color: #68a1e5;
207
+ /* Modern Browsers */ opacity: 0.8;
208
+ /* IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
209
+ /* IE 5-7 */ filter: alpha(opacity=80);
210
+ /* Netscape */ -moz-opacity: 0.8;
211
+ /* Safari 1 */ -khtml-opacity: 0.8;
212
+ position: absolute;
213
+ text-align: center;
214
+ overflow: hidden;
215
+ cursor: pointer;
216
+ color: #fff;
217
+ width: 100%;
218
+ display: none;
219
+ }
220
+
221
+
222
+ .wc-cal-event-delete {
223
+ float: right;
224
+ cursor: pointer;
225
+ width: 16px;
226
+ height: 16px;
227
+ }
228
+
229
+ .wc-cal-event.ui-resizable-resizing {
230
+ cursor: s-resize;
231
+ }
232
+
233
+ .wc-cal-event .wc-time {
234
+ background-color: #2b72d0;
235
+ border: 1px solid #1b62c0;
236
+ color: #fff;
237
+ padding: 0;
238
+ font-weight: bold;
239
+ }
240
+
241
+ .wc-container .ui-draggable .wc-time {
242
+ cursor: move;
243
+ }
244
+
245
+ .wc-cal-event .wc-title {
246
+ position: relative;
247
+ }
248
+
249
+ .wc-container .ui-resizable-s {
250
+ height: 10px;
251
+ line-height: 10px;
252
+ bottom: -2px;
253
+ font-size: .75em;
254
+ }
255
+
256
+
257
+ .wc-container .ui-draggable-dragging {
258
+ z-index: 1000;
259
+ }
260
+
261
+ .free-busy-free{}
262
+ .free-busy-busy{
263
+ background:url("../images/ui-bg_flat_0_aaaaaa_40x100.png") repeat scroll 50% 50% #666666;
264
+ }
265
+
266
+ /** hourLine */
267
+
268
+ .wc-hourline {
269
+ height: 0pt;
270
+ border-top: 2px solid #FF7F6E;
271
+ overflow: hidden;
272
+ position: absolute;
273
+ width: inherit;
274
+ }
275
+
276
+ /* IE6 hacks */
277
+ * html .wc-no-height-wrapper{position:absolute;}
278
+ * html .wc-time-slot-wrapper{top:3px;}
279
+ * html .wc-grid-row-oddeven{top:2px;}
280
+ * html .wc-grid-row-freebusy{top:1px;}
281
+
282
+ /* IE7 hacks */
283
+ *:first-child+html .wc-no-height-wrapper{position:relative;}
284
+ *:first-child+html .wc-time-slot-wrapper{top:3px;}
285
+ *:first-child+html .wc-grid-row-oddeven{top:2px;}
286
+ *:first-child+html .wc-grid-row-freebusy{top:1px;}
287
+ *:first-child+html .wc-time-slots .wc-today{/* due to rendering issues, no background */background:none;}
backend/modules/calendar/resources/images/box-small.png ADDED
Binary file
backend/modules/calendar/resources/images/calendar.png ADDED
Binary file
backend/modules/calendar/resources/images/calendar1.png ADDED
Binary file
backend/modules/calendar/resources/images/chosen-sprite.png ADDED
Binary file
backend/modules/calendar/resources/images/information.png ADDED
Binary file
backend/modules/calendar/resources/images/ui-bg_flat_0_aaaaaa_40x100.png ADDED
Binary file
backend/modules/calendar/resources/images/user-white.png ADDED
Binary file
backend/modules/calendar/resources/images/user.png ADDED
Binary file
backend/modules/calendar/resources/js/calendar.js ADDED
@@ -0,0 +1,525 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function ($) {
2
+ var $week_calendar_wrapper = $('#week_calendar_wrapper'),
3
+ $week_calendar = $week_calendar_wrapper.find('.ab-calendar-element'),
4
+ $tabs = $week_calendar_wrapper.find('.nav-tabs'),
5
+ $day_calendar_wrapper = $('#day_calendar_wrapper'),
6
+ $day_calendar = $day_calendar_wrapper.find('.ab-calendar-element'),
7
+ $first_day_of_week = parseInt($('#ab_calendar_data_holder .ab-calendar-first-day').text(), 10),
8
+ $time_format = $('#ab_calendar_data_holder .ab-calendar-time-format').text(),
9
+ $staff_tabs = $('.ab-calendar-tab'),
10
+ // Staff filter vars
11
+ $staff_filter_button = $('#ab-staff-button'),
12
+ $all_staff_option = $('#ab-filter-all-staff'),
13
+ $staff_option = $('.ab-staff-option'),
14
+
15
+ $calendar_common_options = {
16
+ timeslotsPerHour: BooklyL10n.timeslotsPerHour,
17
+ timeslotHeight: 25,
18
+ scrollToHourMillis : 0,
19
+ businessHours: {start: 8, end: 18},
20
+ firstDayOfWeek: $first_day_of_week,
21
+ hourLine: true,
22
+ displayFreeBusys: true,
23
+ useShortDayNames: true,
24
+ showHeader: false,
25
+ headerSeparator: '',
26
+ dateFormat: ', M d',
27
+ timeFormat: $time_format,
28
+ use24Hour: ($time_format.toLowerCase().indexOf('a') == -1),
29
+ newEventText: BooklyL10n.new_appointment,
30
+ allowEventDelete: true,
31
+ draggable: function(calEvent, element) {
32
+ return false;
33
+ },
34
+ resizable: function(calEvent, element) {
35
+ return false;
36
+ },
37
+ eventDelete: function(calEvent, element, dayFreeBusyManager, calendar, clickEvent) {
38
+ if (confirm(BooklyL10n.are_you_sure)) {
39
+ $.post(ajaxurl, {'action' : 'ab_delete_appointment', 'appointment_id' : calEvent.id }, function () {
40
+ calendar.weekCalendar('removeEvent', calEvent.id);
41
+ });
42
+ }
43
+ },
44
+ eventRender : function(calEvent, $event) {
45
+ $event.css('backgroundColor', calEvent.color);
46
+ $event.find('.wc-time').css({
47
+ backgroundColor : calEvent.color,
48
+ borderLeftColor : calEvent.color,
49
+ borderRightColor : calEvent.color,
50
+ borderTopColor : calEvent.color,
51
+ borderBottomColor : '#ABABAB'
52
+ });
53
+ },
54
+ eventAfterRender : function(calEvent, $calEventList) {
55
+ $calEventList.each(function () {
56
+ var $calEvent = $(this);
57
+ var titleHeight = $calEvent.find('.wc-title').height();
58
+ var origHeight = $calEvent.height();
59
+
60
+ if ( origHeight < titleHeight ) {
61
+ var $info = $('<div class="wc-information"/>');
62
+ var $delete = $('.wc-cal-event-delete', $calEvent);
63
+
64
+ $delete.hide();
65
+ $('.wc-time', $calEvent).prepend($info);
66
+
67
+ // mouse handlers
68
+ $info.on('mouseenter', function () {
69
+ $calEvent.css({height: (titleHeight + 30), 'z-index': 1});
70
+ $info.hide();
71
+ $delete.show();
72
+ });
73
+ $calEvent.on('mouseleave', function () {
74
+ $calEvent.css({height: origHeight, 'z-index': 'auto'});
75
+ $delete.hide();
76
+ $info.show();
77
+ });
78
+ }
79
+ });
80
+ },
81
+ eventBody : function(calEvent, calendar) {
82
+ var body = '<div class="wc-service-name">' + calEvent.title + '</div>';
83
+ if (calEvent.desc) {
84
+ body += calEvent.desc;
85
+ }
86
+ return body;
87
+ }
88
+ },
89
+ $week_calendar_options = {
90
+ daysToShow: 7,
91
+ eventNew: function(calEvent, element, dayFreeBusyManager, calendar, mouseupEvent) {
92
+ element.hide().remove();
93
+ showAppointmentDialog(
94
+ null,
95
+ $week_calendar_wrapper.find('.ab-calendar-tab.active').data('staff-id'),
96
+ calEvent.start,
97
+ null,
98
+ calendar,
99
+ 'week'
100
+ );
101
+ },
102
+ eventClick: function(calEvent, element, dayFreeBusyManager, calendar, clickEvent) {
103
+ showAppointmentDialog(
104
+ calEvent.id,
105
+ $week_calendar_wrapper.find('.ab-calendar-tab.active').data('staff-id'),
106
+ calEvent.start,
107
+ calEvent.end,
108
+ calendar,
109
+ 'week'
110
+ );
111
+ },
112
+ data: function(start, end, callback) {
113
+ $.post(
114
+ ajaxurl,
115
+ {
116
+ action : 'ab_week_staff_appointments',
117
+ start_date : getFormattedDateForCalendar(start),
118
+ end_date : getFormattedDateForCalendar(end),
119
+ staff_id : $week_calendar_wrapper.find('.ab-calendar-tab.active').data('staff-id')
120
+ },
121
+ function (response) {
122
+ var appointments = $.map(response.events, function(value) {
123
+ return {
124
+ id : parseInt(value.id, 10),
125
+ start : new Date(value.start),
126
+ end : new Date(value.end),
127
+ title : value.title,
128
+ desc : value.desc,
129
+ color : value.color
130
+ };
131
+ });
132
+ var free_busys = $.map(response.freebusys, function(value) {
133
+ return {
134
+ start : new Date(value.start),
135
+ end : new Date(value.end),
136
+ free : value.free
137
+ };
138
+ });
139
+
140
+ callback({ events: appointments, freebusys: free_busys });
141
+ },
142
+ 'json'
143
+ );
144
+ },
145
+ height: function() {
146
+ var $window_height = $(window).height(),
147
+ $wp_admin_bar_height = $('#wpadminbar').height(),
148
+ $ab_calendar_header_height = $('#ab_calendar_header').height(),
149
+ $ab_calendar_tabs_height = $('#week_calendar_wrapper .tabbable').outerHeight(true),
150
+ $height_to_reduce = $wp_admin_bar_height + $ab_calendar_header_height + $ab_calendar_tabs_height,
151
+ $wrap = $('#wpbody-content .wrap');
152
+
153
+ if ($wrap.css('margin-top')) {
154
+ $height_to_reduce += parseInt($wrap.css('margin-top').replace('px', ''), 10);
155
+ }
156
+
157
+ if ($wrap.css('margin-bottom')) {
158
+ $height_to_reduce += parseInt($wrap.css('margin-bottom').replace('px', ''), 10);
159
+ }
160
+
161
+ return $window_height - $height_to_reduce;
162
+ }
163
+ },
164
+ $day_calendar_options = {
165
+ data: function(start, end, callback) {
166
+ var selected_staff_ids = [];
167
+ $('.ab-staff-option:checked').each(function() {
168
+ selected_staff_ids.push(this.value);
169
+ });
170
+ var data = {
171
+ action : 'ab_day_staff_appointments',
172
+ start_date : getFormattedDateForCalendar(start),
173
+ staff_id : selected_staff_ids
174
+ };
175
+ $.post(
176
+ ajaxurl, data, function (response) {
177
+ var appointments = $.map(response.events, function(value) {
178
+ return {
179
+ id : parseInt(value.id, 10),
180
+ start : new Date(value.start),
181
+ end : new Date(value.end),
182
+ title : value.title,
183
+ color : value.color,
184
+ desc : value.desc,
185
+ userId : parseInt(value.userId, 10)
186
+ };
187
+ });
188
+ var free_busys = $.map(response.freebusys, function(value) {
189
+ return {
190
+ start : new Date(value.start),
191
+ end : new Date(value.end),
192
+ free : value.free,
193
+ userId : parseInt(value.userId, 10)
194
+ };
195
+ });
196
+
197
+ callback({ events: appointments, freebusys: free_busys });
198
+ },
199
+ 'json'
200
+ );
201
+ },
202
+ users: [],
203
+ getUserId: function(user, index, calendar) {
204
+ return user.staff_id;
205
+ },
206
+ getUserName: function(user, index, calendar) {
207
+ return user.full_name;
208
+ },
209
+ daysToShow: 1,
210
+ height: function() {
211
+ var $window_height = $(window).height(),
212
+ $wp_admin_bar_height = $('#wpadminbar').height(),
213
+ $ab_calendar_header_height = $('#ab_calendar_header').height(),
214
+ $height_to_reduce = $wp_admin_bar_height + $ab_calendar_header_height + $('#day_calendar_wrapper').outerHeight(true),
215
+ $wrap = $('#wpbody-content .wrap');
216
+
217
+ if ($wrap.css('margin-top')) {
218
+ $height_to_reduce += parseInt($wrap.css('margin-top').replace('px', ''), 10);
219
+ }
220
+
221
+ if ($wrap.css('margin-bottom')) {
222
+ $height_to_reduce += parseInt($wrap.css('margin-bottom').replace('px', ''), 10);
223
+ }
224
+
225
+ return $window_height - $height_to_reduce;
226
+ },
227
+ eventNew: function(calEvent, element, dayFreeBusyManager, calendar, mouseupEvent) {
228
+ element.hide().remove();
229
+ showAppointmentDialog(
230
+ null,
231
+ calEvent.userId,
232
+ calEvent.start,
233
+ null,
234
+ calendar,
235
+ 'day'
236
+ );
237
+ },
238
+ eventClick: function(calEvent, element, dayFreeBusyManager, calendar, clickEvent) {
239
+ showAppointmentDialog(
240
+ calEvent.id,
241
+ calEvent.userId,
242
+ calEvent.start,
243
+ calEvent.end,
244
+ calendar,
245
+ 'day'
246
+ );
247
+ }
248
+ };
249
+
250
+ // Datepickers.
251
+ var week_picker = new WeekPicker();
252
+ var day_picker = new DayPicker();
253
+ week_picker.attachCalendar($week_calendar);
254
+
255
+ // week calendar
256
+ $week_calendar.weekCalendar($.extend({}, $calendar_common_options, $week_calendar_options));
257
+
258
+ // click on tabs
259
+ $tabs.find('.ab-calendar-tab').on('click', function(e) {
260
+ e.stopPropagation();
261
+ $('.ab-calendar-tab').removeClass('active');
262
+ $(this).addClass('active');
263
+ // prevents console error of initialization
264
+ $week_calendar.weekCalendar(); $week_calendar.weekCalendar('refresh');
265
+ });
266
+
267
+ // today
268
+ $('.ab-nav-calendar .ab-calendar-today').on('click', function(){
269
+ var $active_view_button = $('.ab-nav-calendar .ab-calendar-switch-view.ab-button-active');
270
+ if ($active_view_button.hasClass('ab-calendar-day')) {
271
+ day_picker.setDate(new Date());
272
+ } else {
273
+ week_picker.setDate(new Date());
274
+ }
275
+ });
276
+
277
+ // day/week view
278
+ $('.ab-nav-calendar .ab-calendar-switch-view').on('click', function() {
279
+ var $this = $(this);
280
+
281
+ if ($this.hasClass('ab-button-active')) {
282
+ return false;
283
+ }
284
+ $('.ab-nav-calendar .ab-calendar-switch-view').not($this).removeClass('ab-button-active');
285
+ $('.ab-nav-calendar .ab-calendar-today').removeClass('ab-button-active');
286
+ $this.addClass('ab-button-active');
287
+
288
+ // Switch to day-view
289
+ if ($this.hasClass('ab-calendar-day')) {
290
+ $week_calendar_wrapper.hide();
291
+ $week_calendar.remove();
292
+ week_picker.hide();
293
+
294
+ var $day_calendar_container = $day_calendar_wrapper.find('.ab-calendar-element-container'),
295
+ date_from_week_picker = week_picker.getStartDate(),
296
+
297
+ /**
298
+ * Checks if current date belongs to selected week of week-picker
299
+ *
300
+ * @return bool
301
+ */
302
+ is_current_week = function() {
303
+ var now_date = new Date(),
304
+ first_day_of_week = startAndEndOfWeek(date_from_week_picker).first_day_of_week,
305
+ last_day_of_week = startAndEndOfWeek(date_from_week_picker).last_day_of_week;
306
+
307
+ return first_day_of_week <= now_date && now_date <= last_day_of_week;
308
+ },
309
+
310
+ /**
311
+ * result is an object of dates for start (monday)
312
+ * and end (sunday) of week based on supplied date object
313
+ *
314
+ * @return object
315
+ */
316
+ startAndEndOfWeek = function(date) {
317
+ var result = {
318
+ first_day_of_week : null,
319
+ last_day_of_week : null
320
+ };
321
+
322
+ // If no date object supplied, use current date
323
+ // Copy date so don't modify supplied date
324
+ var now = date ? new Date(date) : new Date();
325
+
326
+ // set time to some convenient value
327
+ now.setHours(0, 0, 0, 0);
328
+
329
+ // Get the previous Monday
330
+ var monday = new Date(now);
331
+ monday.setDate(monday.getDate() - monday.getDay() + 1);
332
+
333
+ // Get next Sunday
334
+ var sunday = new Date(now);
335
+ sunday.setDate(sunday.getDate() - sunday.getDay() + 7);
336
+
337
+ // set result's days
338
+ result.first_day_of_week = monday;
339
+ result.last_day_of_week = sunday;
340
+
341
+ return result;
342
+ };
343
+
344
+ // Set visible users.
345
+ var users = [];
346
+ $('.ab-staff-option:checked').each(function() {
347
+ users.push({staff_id: parseInt(this.value), full_name: $(this).next().text()});
348
+ });
349
+ $day_calendar = $('<div class="ab-calendar-element" />').appendTo($day_calendar_container);
350
+ $day_calendar.weekCalendar($.extend({date: date_from_week_picker}, $calendar_common_options, $day_calendar_options, {users: users}));
351
+ $day_calendar_wrapper.show();
352
+
353
+ day_picker.attachCalendar($day_calendar);
354
+
355
+ // if week is current - set current date, otherwise set date from week-picker
356
+ is_current_week() ?
357
+ day_picker.setDate(new Date(), true) :
358
+ day_picker.setDate(date_from_week_picker, true);
359
+
360
+ day_picker.show();
361
+
362
+ // styles-fixing
363
+ $('td.wc-scrollbar-shim').hide();
364
+ // Switch to week view
365
+ } else {
366
+ $day_calendar_wrapper.hide();
367
+ $day_calendar.remove();
368
+ day_picker.hide();
369
+
370
+ var $week_calendar_container = $week_calendar_wrapper.find('.ab-calendar-element-container'),
371
+ date_from_day_picker = day_picker.getDate();
372
+
373
+ // Show tabs based on selected staff members.
374
+ var active_set = false;
375
+ $staff_option.each(function() {
376
+ if (this.checked) {
377
+ $('.ab-staff-tab-' + this.value).show().toggleClass('active', active_set === false);
378
+ active_set = true;
379
+ } else {
380
+ $('.ab-staff-tab-' + this.value).hide().removeClass('active');
381
+ }
382
+ });
383
+
384
+ $week_calendar = $('<div class="ab-calendar-element" />').appendTo($week_calendar_container);
385
+ if (active_set) {
386
+ $week_calendar_wrapper.show();
387
+ }
388
+ $week_calendar.weekCalendar($.extend({date: date_from_day_picker}, $calendar_common_options, $week_calendar_options));
389
+ scrollShim = document.querySelector('.wc-scrollbar-shim');
390
+ if ( scrollShim !== null ) scrollShim.style.width = scrollWidth + 'px';
391
+
392
+ // Set date from day calendar
393
+ week_picker.setDate(date_from_day_picker, false);
394
+ week_picker.attachCalendar($week_calendar);
395
+ week_picker.show();
396
+ } // end of Week View
397
+ });
398
+
399
+ // Staff filter
400
+ $('.ab-staff-filter-button').on('click', function (e) {
401
+ e.stopPropagation();
402
+ var menu = $(this).parent().find('.dropdown-menu');
403
+ if (menu.hasClass('open')) {
404
+ menu.removeClass('open').hide();
405
+ } else {
406
+ menu.addClass('open').show();
407
+ }
408
+ });
409
+
410
+ $('.dropdown-menu').on('click', function (e) {
411
+ e.stopPropagation();
412
+ });
413
+
414
+ $all_staff_option.on('change', function () {
415
+ $staff_option.prop('checked', this.checked);
416
+ if (this.checked) {
417
+ $staff_option.filter(':first').trigger('change');
418
+ $staff_tabs.show();
419
+ } else {
420
+ $week_calendar_wrapper.hide();
421
+ $day_calendar_wrapper.hide();
422
+ }
423
+ });
424
+
425
+ $staff_option.on('change', function (e) {
426
+ var self = $(this),
427
+ $tab = $('.ab-staff-tab-' + self.val()),
428
+ $active_tab = $('ul.nav-tabs').find('li.active'),
429
+ is_day = $('button.ab-calendar-day').hasClass('ab-button-active'),
430
+ staff_option_checked = parseInt($staff_option.filter(':checked').length),
431
+ unchecked_options = [];
432
+
433
+ $all_staff_option.prop('checked', $staff_option.filter(':not(:checked)').length == 0);
434
+
435
+ if (is_day) { // Day
436
+ // checkboxes
437
+ if (staff_option_checked) {
438
+ $day_calendar_wrapper.show();
439
+ // Refresh visible users in calendar.
440
+ var users = [];
441
+ $('.ab-staff-option:checked').each(function() {
442
+ users.push({staff_id: parseInt(this.value), full_name: $(this).next().text()});
443
+ });
444
+ $day_calendar.weekCalendar('option', 'users', users);
445
+ $day_calendar.weekCalendar('refresh');
446
+ // css-fix
447
+ $('td.wc-scrollbar-shim').hide();
448
+ } else { // No staff selected
449
+ $day_calendar_wrapper.hide();
450
+ }
451
+ } else { // Week
452
+ if (this.checked) {
453
+ $tab.show().click();
454
+ $staff_option.each(function(k, v) {
455
+ if ($(v).is(':not(:checked)') && !unchecked_options[$(v).val()]) {
456
+ unchecked_options.push($(v).val());
457
+ }
458
+ });
459
+ $active_tab.parent().find('li').each(function(k, v) {
460
+ unchecked_options.forEach(function(option) {
461
+ if ($(v).data('staff-id') == option) {
462
+ $('ul.nav-tabs').find('li').filter('[data-staff-id="' + option + '"]').hide();
463
+ }
464
+ });
465
+ });
466
+ } else {
467
+ $tab.hide();
468
+ $active_tab.is(':visible') ? $active_tab.click() : $staff_tabs.filter(':visible').filter(':first').click();
469
+ }
470
+ staff_option_checked ? $week_calendar_wrapper.show() : $week_calendar_wrapper.hide();
471
+ }
472
+
473
+ // Changes staff filter button name
474
+ var selected_staff_numb = $staff_option.filter(':checked').length;
475
+ if (selected_staff_numb == 0) {
476
+ $staff_filter_button.text('No staff selected');
477
+ } else if (selected_staff_numb == 1) {
478
+ $staff_filter_button.text($("label[for='" + $staff_option.filter(':checked').attr('id') + "']").text());
479
+ } else {
480
+ $staff_filter_button.text(selected_staff_numb + ' staff members');
481
+ }
482
+ });
483
+
484
+ // End staff filter
485
+
486
+ /**
487
+ * Get formatted date(php: Y-m-d H:i:s) for calendar
488
+ *
489
+ * @param date
490
+ * @return {String}
491
+ */
492
+ function getFormattedDateForCalendar(date) {
493
+ var $hours = date.getHours(), $minutes = date.getMinutes();
494
+
495
+ if ($hours < 10) {
496
+ $hours = '0' + $hours;
497
+ }
498
+
499
+ if ($minutes < 10) {
500
+ $minutes = '0' + $minutes;
501
+ }
502
+
503
+ return $.datepicker.formatDate( 'yy-mm-dd ', date ) + $hours + ':' + $minutes + ':00';
504
+ }
505
+
506
+
507
+ /*
508
+ * scroll width
509
+ *
510
+ * not null for preventing console errors when no one staff exists
511
+ */
512
+ var scroll = document.querySelector('.wc-scrollable-grid'),
513
+ scrollShim = document.querySelector('.wc-scrollbar-shim'),
514
+ scrollWidth = scroll !== null ? scroll.offsetWidth - scroll.clientWidth : 0;
515
+
516
+ if ( scrollShim !== null ) scrollShim.style.width = scrollWidth + 'px';
517
+
518
+ /* firefox bug border */
519
+ if ( $.browser.mozilla )
520
+ $('.wc-time-column-header:first-child').css('width','43px');
521
+
522
+ $('#email_notification').on('click', function() {
523
+ $('#email_notification_text').show();
524
+ });
525
+ });
backend/modules/calendar/resources/js/calendar_daypicker.js ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Day calendar datepicker.
3
+ */
4
+ function DayPicker() {
5
+ // Private functions and variables.
6
+ var widget = {
7
+ $container : null,
8
+ $month_days : null,
9
+ $prev_date_handler : null,
10
+ $next_date_handler : null,
11
+ $picker : null, // jQuery UI DatePicker.
12
+ $calendar : null, // WeekCalendar instance.
13
+ first_day : null,
14
+ rebuildDayLine : function(date) {
15
+ var timestamp = +date / 1000,
16
+ seconds_in_day = 60 * 60 * 24;
17
+ for (var i = 1; i <= 7; ++ i) {
18
+ var next_day_timestamp = (timestamp + (i * seconds_in_day)) * 1000,
19
+ next_day = new Date(next_day_timestamp),
20
+ $day_of_month = jQuery(this.$month_days.get(i - 1));
21
+ $day_of_month
22
+ .text(next_day.getDate())
23
+ .data('date_timestamp', next_day_timestamp / 1000);
24
+ }
25
+ },
26
+ /**
27
+ * Constructor.
28
+ */
29
+ init : function() {
30
+ this.$container = jQuery('div#day-calendar-picker');
31
+ this.$month_days = this.$container.find('.ab-day-of-month');
32
+ this.$prev_date_handler = this.$container.find('.ab-week-picker-arrow-prev');
33
+ this.$next_date_handler = this.$container.find('.ab-week-picker-arrow-next');
34
+ this.$picker = this.$container.find('#appendedInput');
35
+ this.first_day = this.$container.data('first_day');
36
+ // Init datepicker.
37
+ this.$picker.datepicker({
38
+ dateFormat : BooklyL10n['dateFormat'],
39
+ showOtherMonths : true,
40
+ selectOtherMonths : true,
41
+ firstDay : widget.first_day,
42
+ monthNames : BooklyL10n['longMonths'],
43
+ monthNamesShort : BooklyL10n['shortMonths'],
44
+ dayNames : BooklyL10n['longDays'],
45
+ dayNamesMin : BooklyL10n['shortDays'],
46
+ dayNamesShort : BooklyL10n['shortDays'],
47
+ onSelect : function() {
48
+ var date = widget.$picker.datepicker('getDate');
49
+ widget.rebuildDayLine(date);
50
+ if (widget.$calendar) {
51
+ widget.$calendar.weekCalendar('gotoWeek', date);
52
+ }
53
+ widget.$month_days.parent().removeClass('active');
54
+ }
55
+ });
56
+ // Handle events.
57
+ this.$month_days.on('click', function(e) {
58
+ e.preventDefault();
59
+ var $clicked = jQuery(this),
60
+ $clicked_day_date = new Date(parseInt($clicked.data('date_timestamp'), 10) * 1000);
61
+ widget.rebuildDayLine($clicked_day_date);
62
+ widget.$picker.datepicker('setDate', $clicked_day_date);
63
+ widget.$month_days.parent().removeClass('active');
64
+ $clicked.parent().addClass('active');
65
+ if (widget.$calendar) {
66
+ widget.$calendar.weekCalendar('gotoWeek', $clicked_day_date);
67
+ }
68
+ });
69
+ this.$prev_date_handler.on('click', function() {
70
+ var date = new Date();
71
+ date.setDate(widget.$picker.datepicker('getDate').getDate() - 1);
72
+ widget.rebuildDayLine(date);
73
+ widget.$picker.datepicker('setDate', date);
74
+ if (widget.$calendar) {
75
+ widget.$calendar.weekCalendar('gotoWeek', date);
76
+ }
77
+ });
78
+ this.$next_date_handler.on('click', function() {
79
+ var date = new Date();
80
+ date.setDate(widget.$picker.datepicker('getDate').getDate() + 1);
81
+ widget.rebuildDayLine(date);
82
+ widget.$picker.datepicker('setDate', date);
83
+ if (widget.$calendar) {
84
+ widget.$calendar.weekCalendar('gotoWeek', date);
85
+ }
86
+ });
87
+ }
88
+ };
89
+
90
+ // Init.
91
+ widget.init();
92
+
93
+ // Return public methods.
94
+ return {
95
+ show : function() {
96
+ widget.$container.show();
97
+ },
98
+ hide : function() {
99
+ widget.$container.hide();
100
+ },
101
+
102
+ /**
103
+ * Set specific date to the widget (and update $calendar if update_week_calendar is true).
104
+ *
105
+ * @param date
106
+ * @param update_week_calendar
107
+ */
108
+ setDate : function(date, update_week_calendar) {
109
+ widget.rebuildDayLine(date);
110
+ widget.$picker.datepicker('setDate', date);
111
+ if (widget.$calendar && (update_week_calendar === undefined || update_week_calendar)) {
112
+ widget.$calendar.weekCalendar('gotoWeek', date);
113
+ }
114
+ },
115
+ getDate : function() {
116
+ return widget.$picker.datepicker('getDate');
117
+ },
118
+ /**
119
+ * Attach WeekCalendar to the picker.
120
+ * @param WeekCalendar $calendar
121
+ */
122
+ attachCalendar : function($calendar) {
123
+ widget.$calendar = $calendar;
124
+ }
125
+ };
126
+ }
backend/modules/calendar/resources/js/calendar_weekpicker.js ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Week calendar datepicker.
3
+ */
4
+ function WeekPicker() {
5
+ // Private functions and variables.
6
+ var widget = {
7
+ $container : null,
8
+ $picker : null, // jQuery UI DatePicker.
9
+ $output : null, // Place to display week-start and week-end dates.
10
+ $calendar : null, // WeekCalendar instance.
11
+ start_date : null,
12
+ end_date : null,
13
+ first_day : null,
14
+ date_format : null,
15
+ /**
16
+ * Set start and end dates based on Date object.
17
+ * @param Date date.
18
+ */
19
+ updateStartAndEndDates : function(date) {
20
+ var seconds_in_one_day = 86400000;
21
+ var days_to_rewind = date.getDay() <= 0 ? 7 - this.first_day : date.getDay() - this.first_day;
22
+ var days_to_add = 6;
23
+ this.start_date = new Date(date.valueOf() - days_to_rewind * seconds_in_one_day); //rewind to start day
24
+ this.end_date = new Date(this.start_date.valueOf() + days_to_add * seconds_in_one_day); //add 6 days to get last day
25
+ },
26
+ /**
27
+ * Highlight all days in currently selected week.
28
+ */
29
+ highlightSelectedWeek : function() {
30
+ window.setTimeout(function () {
31
+ widget.$picker.find('.ui-datepicker-current-day a').addClass('ui-state-active')
32
+ }, 1);
33
+ },
34
+ /**
35
+ * Display start and end dates of the selected week.
36
+ * @param Date start_date
37
+ * @param Date end_date
38
+ */
39
+ outputFormattedDate : function() {
40
+ // show formatted date values
41
+ var formatted_start_date = jQuery.datepicker.formatDate(this.date_format, this.start_date, {monthNamesShort: BooklyL10n['shortMonths'], monthNames : BooklyL10n['longMonths']}),
42
+ formatted_end_date = jQuery.datepicker.formatDate(this.date_format, this.end_date, {monthNamesShort: BooklyL10n['shortMonths'], monthNames : BooklyL10n['longMonths']});
43
+ this.$output.val(BooklyL10n['Week'] + formatted_start_date + ' - ' + formatted_end_date);
44
+ },
45
+ /**
46
+ * Set specific date to the widget (and update $calendar if update_week_calendar is true).
47
+ *
48
+ * @param date
49
+ * @param update_week_calendar
50
+ */
51
+ setDate : function(date, update_week_calendar) {
52
+ this.updateStartAndEndDates(date);
53
+ this.$picker.datepicker('setDate', date);
54
+ this.outputFormattedDate();
55
+ this.highlightSelectedWeek();
56
+ if (this.$calendar && (update_week_calendar === undefined || update_week_calendar)) {
57
+ this.$calendar.weekCalendar('gotoWeek', this.start_date);
58
+ }
59
+ },
60
+ /**
61
+ * Constructor.
62
+ */
63
+ init : function() {
64
+ this.$container = jQuery('div#week-calendar-picker');
65
+ this.$picker = this.$container.find('div.ab-week-picker');
66
+ this.$output = this.$container.find('input.ab-date-calendar');
67
+ this.first_day = this.$container.data('first_day');
68
+ this.date_format = BooklyL10n['dateFormat'];
69
+ // Init start and end dates.
70
+ this.updateStartAndEndDates(new Date());
71
+ // Init datepicker.
72
+ this.$picker.datepicker({
73
+ showOtherMonths : true,
74
+ selectOtherMonths : true,
75
+ firstDay : widget.first_day,
76
+ monthNames : BooklyL10n['longMonths'],
77
+ monthNamesShort : BooklyL10n['shortMonths'],
78
+ dayNames : BooklyL10n['longDays'],
79
+ dayNamesMin : BooklyL10n['shortDays'],
80
+ dayNamesShort : BooklyL10n['shortDays'],
81
+ onSelect : function(dateText, inst) {
82
+ widget.updateStartAndEndDates(widget.$picker.datepicker('getDate'));
83
+ widget.outputFormattedDate();
84
+ widget.highlightSelectedWeek();
85
+ if (widget.$calendar) {
86
+ widget.$calendar.weekCalendar('gotoWeek', widget.start_date);
87
+ }
88
+ },
89
+ beforeShowDay : function(date) {
90
+ var cssClass = '';
91
+ if ((date >= widget.start_date || date.getDate() == widget.start_date.getDate()) && date <= widget.end_date) {
92
+ cssClass = 'ui-datepicker-current-day';
93
+ }
94
+ return [true, cssClass];
95
+ },
96
+ onChangeMonthYear : function(year, month, inst) {
97
+ widget.highlightSelectedWeek();
98
+ }
99
+ });
100
+ this.highlightSelectedWeek();
101
+ // Display start and end dates.
102
+ this.outputFormattedDate();
103
+ // Handle events.
104
+ this.$container
105
+ .on('mousemove', '.ui-datepicker-calendar tr', function() {
106
+ jQuery(this).find('td a').addClass('ui-state-hover');
107
+ })
108
+ .on('mouseleave', '.ui-datepicker-calendar tr', function() {
109
+ jQuery(this).find('td a').removeClass('ui-state-hover');
110
+ });
111
+ jQuery('body').click(function(e) {
112
+ jQuery('.dropdown-menu:visible').removeClass('open').hide();
113
+ if (widget.$picker.is(':visible')) {
114
+ widget.$picker.hide();
115
+ }
116
+ });
117
+ this.$picker.click(function(e) {
118
+ e.stopPropagation();
119
+ });
120
+ // open week picker
121
+ this.$output.on('click', function(e) {
122
+ widget.$picker.show();
123
+ e.stopPropagation();
124
+ });
125
+ // do not close week picker when the previous or next arrow is clicked
126
+ this.$container.find('.prev, .next').on('click', function(e) {
127
+ e.stopPropagation();
128
+ });
129
+ // handle click on the "previous week" arrow
130
+ this.$container.find('.prev').on('click', function() {
131
+ var date = widget.$picker.datepicker('getDate');
132
+ date.addDays(-7);
133
+ widget.setDate(date);
134
+ });
135
+ // handle click on the "next week" arrow
136
+ this.$container.find('.next').on('click', function() {
137
+ var date = widget.$picker.datepicker('getDate');
138
+ date.addDays(7);
139
+ widget.setDate(date);
140
+ });
141
+ }
142
+ };
143
+
144
+ // Init.
145
+ widget.init();
146
+ // Return public methods.
147
+ return {
148
+ show : function() {
149
+ widget.$container.show();
150
+ },
151
+ hide : function() {
152
+ widget.$container.hide();
153
+ },
154
+ setDate : function(date, update_week_calendar) {
155
+ widget.setDate(date, update_week_calendar);
156
+ },
157
+ getStartDate : function() {
158
+ return widget.start_date;
159
+ },
160
+ /**
161
+ * Attach WeekCalendar to the picker.
162
+ * @param WeekCalendar $calendar
163
+ */
164
+ attachCalendar : function($calendar) {
165
+ widget.$calendar = $calendar;
166
+ }
167
+ };
168
+ }
backend/modules/calendar/resources/js/chosen.jquery.js ADDED
@@ -0,0 +1,1229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.2.0
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2014 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, 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
+ zregex = new RegExp(escapedSearchText, 'i');
318
+ regex = this.get_search_regex(escapedSearchText);
319
+ _ref = this.results_data;
320
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
321
+ option = _ref[_i];
322
+ option.search_match = false;
323
+ results_group = null;
324
+ if (this.include_option_in_results(option)) {
325
+ if (option.group) {
326
+ option.group_match = false;
327
+ option.active_options = 0;
328
+ }
329
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
330
+ results_group = this.results_data[option.group_array_index];
331
+ if (results_group.active_options === 0 && results_group.search_match) {
332
+ results += 1;
333
+ }
334
+ results_group.active_options += 1;
335
+ }
336
+ if (!(option.group && !this.group_search)) {
337
+ option.search_text = option.group ? option.label : option.text;
338
+ option.search_match = this.search_string_match(option.search_text, regex);
339
+ if (option.search_match && !option.group) {
340
+ results += 1;
341
+ }
342
+ if (option.search_match) {
343
+ if (searchText.length) {
344
+ startpos = option.search_text.search(zregex);
345
+ text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
346
+ option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
347
+ }
348
+ if (results_group != null) {
349
+ results_group.group_match = true;
350
+ }
351
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
352
+ option.search_match = true;
353
+ }
354
+ }
355
+ }
356
+ }
357
+ this.result_clear_highlight();
358
+ if (results < 1 && searchText.length) {
359
+ this.update_results_content("");
360
+ return this.no_results(searchText);
361
+ } else {
362
+ this.update_results_content(this.results_option_build());
363
+ return this.winnow_results_set_highlight();
364
+ }
365
+ };
366
+
367
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
368
+ var regex_anchor;
369
+ regex_anchor = this.search_contains ? "" : "^";
370
+ return new RegExp(regex_anchor + escaped_search_string, 'i');
371
+ };
372
+
373
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
374
+ var part, parts, _i, _len;
375
+ if (regex.test(search_string)) {
376
+ return true;
377
+ } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
378
+ parts = search_string.replace(/\[|\]/g, "").split(" ");
379
+ if (parts.length) {
380
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
381
+ part = parts[_i];
382
+ if (regex.test(part)) {
383
+ return true;
384
+ }
385
+ }
386
+ }
387
+ }
388
+ };
389
+
390
+ AbstractChosen.prototype.choices_count = function() {
391
+ var option, _i, _len, _ref;
392
+ if (this.selected_option_count != null) {
393
+ return this.selected_option_count;
394
+ }
395
+ this.selected_option_count = 0;
396
+ _ref = this.form_field.options;
397
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
398
+ option = _ref[_i];
399
+ if (option.selected) {
400
+ this.selected_option_count += 1;
401
+ }
402
+ }
403
+ return this.selected_option_count;
404
+ };
405
+
406
+ AbstractChosen.prototype.choices_click = function(evt) {
407
+ evt.preventDefault();
408
+ if (!(this.results_showing || this.is_disabled)) {
409
+ return this.results_show();
410
+ }
411
+ };
412
+
413
+ AbstractChosen.prototype.keyup_checker = function(evt) {
414
+ var stroke, _ref;
415
+ stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
416
+ this.search_field_scale();
417
+ switch (stroke) {
418
+ case 8:
419
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
420
+ return this.keydown_backstroke();
421
+ } else if (!this.pending_backstroke) {
422
+ this.result_clear_highlight();
423
+ return this.results_search();
424
+ }
425
+ break;
426
+ case 13:
427
+ evt.preventDefault();
428
+ if (this.results_showing) {
429
+ return this.result_select(evt);
430
+ }
431
+ break;
432
+ case 27:
433
+ if (this.results_showing) {
434
+ this.results_hide();
435
+ }
436
+ return true;
437
+ case 9:
438
+ case 38:
439
+ case 40:
440
+ case 16:
441
+ case 91:
442
+ case 17:
443
+ break;
444
+ default:
445
+ return this.results_search();
446
+ }
447
+ };
448
+
449
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
450
+ var _this = this;
451
+ return setTimeout((function() {
452
+ return _this.results_search();
453
+ }), 50);
454
+ };
455
+
456
+ AbstractChosen.prototype.container_width = function() {
457
+ if (this.options.width != null) {
458
+ return this.options.width;
459
+ } else {
460
+ return "" + this.form_field.offsetWidth + "px";
461
+ }
462
+ };
463
+
464
+ AbstractChosen.prototype.include_option_in_results = function(option) {
465
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
466
+ return false;
467
+ }
468
+ if (!this.display_disabled_options && option.disabled) {
469
+ return false;
470
+ }
471
+ if (option.empty) {
472
+ return false;
473
+ }
474
+ return true;
475
+ };
476
+
477
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
478
+ this.touch_started = true;
479
+ return this.search_results_mouseover(evt);
480
+ };
481
+
482
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
483
+ this.touch_started = false;
484
+ return this.search_results_mouseout(evt);
485
+ };
486
+
487
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
488
+ if (this.touch_started) {
489
+ return this.search_results_mouseup(evt);
490
+ }
491
+ };
492
+
493
+ AbstractChosen.prototype.outerHTML = function(element) {
494
+ var tmp;
495
+ if (element.outerHTML) {
496
+ return element.outerHTML;
497
+ }
498
+ tmp = document.createElement("div");
499
+ tmp.appendChild(element);
500
+ return tmp.innerHTML;
501
+ };
502
+
503
+ AbstractChosen.browser_is_supported = function() {
504
+ if (window.navigator.appName === "Microsoft Internet Explorer") {
505
+ return document.documentMode >= 8;
506
+ }
507
+ if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
508
+ return false;
509
+ }
510
+ if (/Android/i.test(window.navigator.userAgent)) {
511
+ if (/Mobile/i.test(window.navigator.userAgent)) {
512
+ return false;
513
+ }
514
+ }
515
+ return true;
516
+ };
517
+
518
+ AbstractChosen.default_multiple_text = "Select Some Options";
519
+
520
+ AbstractChosen.default_single_text = "Select an Option";
521
+
522
+ AbstractChosen.default_no_result_text = "No results match";
523
+
524
+ return AbstractChosen;
525
+
526
+ })();
527
+
528
+ $ = jQuery;
529
+
530
+ $.fn.extend({
531
+ chosen: function(options) {
532
+ if (!AbstractChosen.browser_is_supported()) {
533
+ return this;
534
+ }
535
+ return this.each(function(input_field) {
536
+ var $this, chosen;
537
+ $this = $(this);
538
+ chosen = $this.data('chosen');
539
+ if (options === 'destroy' && chosen instanceof Chosen) {
540
+ chosen.destroy();
541
+ } else if (!(chosen instanceof Chosen)) {
542
+ $this.data('chosen', new Chosen(this, options));
543
+ }
544
+ });
545
+ }
546
+ });
547
+
548
+ Chosen = (function(_super) {
549
+ __extends(Chosen, _super);
550
+
551
+ function Chosen() {
552
+ _ref = Chosen.__super__.constructor.apply(this, arguments);
553
+ return _ref;
554
+ }
555
+
556
+ Chosen.prototype.setup = function() {
557
+ this.form_field_jq = $(this.form_field);
558
+ this.current_selectedIndex = this.form_field.selectedIndex;
559
+ return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
560
+ };
561
+
562
+ Chosen.prototype.set_up_html = function() {
563
+ var container_classes, container_props;
564
+ container_classes = ["chosen-container"];
565
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
566
+ if (this.inherit_select_classes && this.form_field.className) {
567
+ container_classes.push(this.form_field.className);
568
+ }
569
+ if (this.is_rtl) {
570
+ container_classes.push("chosen-rtl");
571
+ }
572
+ container_props = {
573
+ 'class': container_classes.join(' '),
574
+ 'style': "width: " + (this.container_width()) + ";",
575
+ 'title': this.form_field.title
576
+ };
577
+ if (this.form_field.id.length) {
578
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
579
+ }
580
+ this.container = $("<div />", container_props);
581
+ if (this.is_multiple) {
582
+ 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>');
583
+ } else {
584
+ 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>');
585
+ }
586
+ this.form_field_jq.hide().after(this.container);
587
+ this.dropdown = this.container.find('div.chosen-drop').first();
588
+ this.search_field = this.container.find('input').first();
589
+ this.search_results = this.container.find('ul.chosen-results').first();
590
+ this.search_field_scale();
591
+ this.search_no_results = this.container.find('li.no-results').first();
592
+ if (this.is_multiple) {
593
+ this.search_choices = this.container.find('ul.chosen-choices').first();
594
+ this.search_container = this.container.find('li.search-field').first();
595
+ } else {
596
+ this.search_container = this.container.find('div.chosen-search').first();
597
+ this.selected_item = this.container.find('.chosen-single').first();
598
+ }
599
+ this.results_build();
600
+ this.set_tab_index();
601
+ this.set_label_behavior();
602
+ return this.form_field_jq.trigger("chosen:ready", {
603
+ chosen: this
604
+ });
605
+ };
606
+
607
+ Chosen.prototype.register_observers = function() {
608
+ var _this = this;
609
+ this.container.bind('touchstart.chosen', function(evt) {
610
+ _this.container_mousedown(evt);
611
+ });
612
+ this.container.bind('touchend.chosen', function(evt) {
613
+ _this.container_mouseup(evt);
614
+ });
615
+ this.container.bind('mousedown.chosen', function(evt) {
616
+ _this.container_mousedown(evt);
617
+ });
618
+ this.container.bind('mouseup.chosen', function(evt) {
619
+ _this.container_mouseup(evt);
620
+ });
621
+ this.container.bind('mouseenter.chosen', function(evt) {
622
+ _this.mouse_enter(evt);
623
+ });
624
+ this.container.bind('mouseleave.chosen', function(evt) {
625
+ _this.mouse_leave(evt);
626
+ });
627
+ this.search_results.bind('mouseup.chosen', function(evt) {
628
+ _this.search_results_mouseup(evt);
629
+ });
630
+ this.search_results.bind('mouseover.chosen', function(evt) {
631
+ _this.search_results_mouseover(evt);
632
+ });
633
+ this.search_results.bind('mouseout.chosen', function(evt) {
634
+ _this.search_results_mouseout(evt);
635
+ });
636
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
637
+ _this.search_results_mousewheel(evt);
638
+ });
639
+ this.search_results.bind('touchstart.chosen', function(evt) {
640
+ _this.search_results_touchstart(evt);
641
+ });
642
+ this.search_results.bind('touchmove.chosen', function(evt) {
643
+ _this.search_results_touchmove(evt);
644
+ });
645
+ this.search_results.bind('touchend.chosen', function(evt) {
646
+ _this.search_results_touchend(evt);
647
+ });
648
+ this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
649
+ _this.results_update_field(evt);
650
+ });
651
+ this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
652
+ _this.activate_field(evt);
653
+ });
654
+ this.form_field_jq.bind("chosen:open.chosen", function(evt) {
655
+ _this.container_mousedown(evt);
656
+ });
657
+ this.form_field_jq.bind("chosen:close.chosen", function(evt) {
658
+ _this.input_blur(evt);
659
+ });
660
+ this.search_field.bind('blur.chosen', function(evt) {
661
+ _this.input_blur(evt);
662
+ });
663
+ this.search_field.bind('keyup.chosen', function(evt) {
664
+ _this.keyup_checker(evt);
665
+ });
666
+ this.search_field.bind('keydown.chosen', function(evt) {
667
+ _this.keydown_checker(evt);
668
+ });
669
+ this.search_field.bind('focus.chosen', function(evt) {
670
+ _this.input_focus(evt);
671
+ });
672
+ this.search_field.bind('cut.chosen', function(evt) {
673
+ _this.clipboard_event_checker(evt);
674
+ });
675
+ this.search_field.bind('paste.chosen', function(evt) {
676
+ _this.clipboard_event_checker(evt);
677
+ });
678
+ if (this.is_multiple) {
679
+ return this.search_choices.bind('click.chosen', function(evt) {
680
+ _this.choices_click(evt);
681
+ });
682
+ } else {
683
+ return this.container.bind('click.chosen', function(evt) {
684
+ evt.preventDefault();
685
+ });
686
+ }
687
+ };
688
+
689
+ Chosen.prototype.destroy = function() {
690
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
691
+ if (this.search_field[0].tabIndex) {
692
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
693
+ }
694
+ this.container.remove();
695
+ this.form_field_jq.removeData('chosen');
696
+ return this.form_field_jq.show();
697
+ };
698
+
699
+ Chosen.prototype.search_field_disabled = function() {
700
+ this.is_disabled = this.form_field_jq[0].disabled;
701
+ if (this.is_disabled) {
702
+ this.container.addClass('chosen-disabled');
703
+ this.search_field[0].disabled = true;
704
+ if (!this.is_multiple) {
705
+ this.selected_item.unbind("focus.chosen", this.activate_action);
706
+ }
707
+ return this.close_field();
708
+ } else {
709
+ this.container.removeClass('chosen-disabled');
710
+ this.search_field[0].disabled = false;
711
+ if (!this.is_multiple) {
712
+ return this.selected_item.bind("focus.chosen", this.activate_action);
713
+ }
714
+ }
715
+ };
716
+
717
+ Chosen.prototype.container_mousedown = function(evt) {
718
+ if (!this.is_disabled) {
719
+ if (evt && evt.type === "mousedown" && !this.results_showing) {
720
+ evt.preventDefault();
721
+ }
722
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
723
+ if (!this.active_field) {
724
+ if (this.is_multiple) {
725
+ this.search_field.val("");
726
+ }
727
+ $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
728
+ this.results_show();
729
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
730
+ evt.preventDefault();
731
+ this.results_toggle();
732
+ }
733
+ return this.activate_field();
734
+ }
735
+ }
736
+ };
737
+
738
+ Chosen.prototype.container_mouseup = function(evt) {
739
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
740
+ return this.results_reset(evt);
741
+ }
742
+ };
743
+
744
+ Chosen.prototype.search_results_mousewheel = function(evt) {
745
+ var delta;
746
+ if (evt.originalEvent) {
747
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
748
+ }
749
+ if (delta != null) {
750
+ evt.preventDefault();
751
+ if (evt.type === 'DOMMouseScroll') {
752
+ delta = delta * 40;
753
+ }
754
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
755
+ }
756
+ };
757
+
758
+ Chosen.prototype.blur_test = function(evt) {
759
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
760
+ return this.close_field();
761
+ }
762
+ };
763
+
764
+ Chosen.prototype.close_field = function() {
765
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
766
+ this.active_field = false;
767
+ this.results_hide();
768
+ this.container.removeClass("chosen-container-active");
769
+ this.clear_backstroke();
770
+ this.show_search_field_default();
771
+ return this.search_field_scale();
772
+ };
773
+
774
+ Chosen.prototype.activate_field = function() {
775
+ this.container.addClass("chosen-container-active");
776
+ this.active_field = true;
777
+ this.search_field.val(this.search_field.val());
778
+ return this.search_field.focus();
779
+ };
780
+
781
+ Chosen.prototype.test_active_click = function(evt) {
782
+ var active_container;
783
+ active_container = $(evt.target).closest('.chosen-container');
784
+ if (active_container.length && this.container[0] === active_container[0]) {
785
+ return this.active_field = true;
786
+ } else {
787
+ return this.close_field();
788
+ }
789
+ };
790
+
791
+ Chosen.prototype.results_build = function() {
792
+ this.parsing = true;
793
+ this.selected_option_count = null;
794
+ this.results_data = SelectParser.select_to_array(this.form_field);
795
+ if (this.is_multiple) {
796
+ this.search_choices.find("li.search-choice").remove();
797
+ } else if (!this.is_multiple) {
798
+ this.single_set_selected_text();
799
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
800
+ this.search_field[0].readOnly = true;
801
+ this.container.addClass("chosen-container-single-nosearch");
802
+ } else {
803
+ this.search_field[0].readOnly = false;
804
+ this.container.removeClass("chosen-container-single-nosearch");
805
+ }
806
+ }
807
+ this.update_results_content(this.results_option_build({
808
+ first: true
809
+ }));
810
+ this.search_field_disabled();
811
+ this.show_search_field_default();
812
+ this.search_field_scale();
813
+ return this.parsing = false;
814
+ };
815
+
816
+ Chosen.prototype.result_do_highlight = function(el) {
817
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
818
+ if (el.length) {
819
+ this.result_clear_highlight();
820
+ this.result_highlight = el;
821
+ this.result_highlight.addClass("highlighted");
822
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
823
+ visible_top = this.search_results.scrollTop();
824
+ visible_bottom = maxHeight + visible_top;
825
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
826
+ high_bottom = high_top + this.result_highlight.outerHeight();
827
+ if (high_bottom >= visible_bottom) {
828
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
829
+ } else if (high_top < visible_top) {
830
+ return this.search_results.scrollTop(high_top);
831
+ }
832
+ }
833
+ };
834
+
835
+ Chosen.prototype.result_clear_highlight = function() {
836
+ if (this.result_highlight) {
837
+ this.result_highlight.removeClass("highlighted");
838
+ }
839
+ return this.result_highlight = null;
840
+ };
841
+
842
+ Chosen.prototype.results_show = function() {
843
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
844
+ this.form_field_jq.trigger("chosen:maxselected", {
845
+ chosen: this
846
+ });
847
+ return false;
848
+ }
849
+ this.container.addClass("chosen-with-drop");
850
+ this.results_showing = true;
851
+ this.search_field.focus();
852
+ this.search_field.val(this.search_field.val());
853
+ this.winnow_results();
854
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
855
+ chosen: this
856
+ });
857
+ };
858
+
859
+ Chosen.prototype.update_results_content = function(content) {
860
+ return this.search_results.html(content);
861
+ };
862
+
863
+ Chosen.prototype.results_hide = function() {
864
+ if (this.results_showing) {
865
+ this.result_clear_highlight();
866
+ this.container.removeClass("chosen-with-drop");
867
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
868
+ chosen: this
869
+ });
870
+ }
871
+ return this.results_showing = false;
872
+ };
873
+
874
+ Chosen.prototype.set_tab_index = function(el) {
875
+ var ti;
876
+ if (this.form_field.tabIndex) {
877
+ ti = this.form_field.tabIndex;
878
+ this.form_field.tabIndex = -1;
879
+ return this.search_field[0].tabIndex = ti;
880
+ }
881
+ };
882
+
883
+ Chosen.prototype.set_label_behavior = function() {
884
+ var _this = this;
885
+ this.form_field_label = this.form_field_jq.parents("label");
886
+ if (!this.form_field_label.length && this.form_field.id.length) {
887
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
888
+ }
889
+ if (this.form_field_label.length > 0) {
890
+ return this.form_field_label.bind('click.chosen', function(evt) {
891
+ if (_this.is_multiple) {
892
+ return _this.container_mousedown(evt);
893
+ } else {
894
+ return _this.activate_field();
895
+ }
896
+ });
897
+ }
898
+ };
899
+
900
+ Chosen.prototype.show_search_field_default = function() {
901
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
902
+ this.search_field.val(this.default_text);
903
+ return this.search_field.addClass("default");
904
+ } else {
905
+ this.search_field.val("");
906
+ return this.search_field.removeClass("default");
907
+ }
908
+ };
909
+
910
+ Chosen.prototype.search_results_mouseup = function(evt) {
911
+ var target;
912
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
913
+ if (target.length) {
914
+ this.result_highlight = target;
915
+ this.result_select(evt);
916
+ return this.search_field.focus();
917
+ }
918
+ };
919
+
920
+ Chosen.prototype.search_results_mouseover = function(evt) {
921
+ var target;
922
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
923
+ if (target) {
924
+ return this.result_do_highlight(target);
925
+ }
926
+ };
927
+
928
+ Chosen.prototype.search_results_mouseout = function(evt) {
929
+ if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
930
+ return this.result_clear_highlight();
931
+ }
932
+ };
933
+
934
+ Chosen.prototype.choice_build = function(item) {
935
+ var choice, close_link,
936
+ _this = this;
937
+ choice = $('<li />', {
938
+ "class": "search-choice"
939
+ }).html("<span>" + item.html + "</span>");
940
+ if (item.disabled) {
941
+ choice.addClass('search-choice-disabled');
942
+ } else {
943
+ close_link = $('<a />', {
944
+ "class": 'search-choice-close',
945
+ 'data-option-array-index': item.array_index
946
+ });
947
+ close_link.bind('click.chosen', function(evt) {
948
+ return _this.choice_destroy_link_click(evt);
949
+ });
950
+ choice.append(close_link);
951
+ }
952
+ return this.search_container.before(choice);
953
+ };
954
+
955
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
956
+ evt.preventDefault();
957
+ evt.stopPropagation();
958
+ if (!this.is_disabled) {
959
+ return this.choice_destroy($(evt.target));
960
+ }
961
+ };
962
+
963
+ Chosen.prototype.choice_destroy = function(link) {
964
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
965
+ this.show_search_field_default();
966
+ if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
967
+ this.results_hide();
968
+ }
969
+ link.parents('li').first().remove();
970
+ return this.search_field_scale();
971
+ }
972
+ };
973
+
974
+ Chosen.prototype.results_reset = function() {
975
+ this.reset_single_select_options();
976
+ this.form_field.options[0].selected = true;
977
+ this.single_set_selected_text();
978
+ this.show_search_field_default();
979
+ this.results_reset_cleanup();
980
+ this.form_field_jq.trigger("change");
981
+ if (this.active_field) {
982
+ return this.results_hide();
983
+ }
984
+ };
985
+
986
+ Chosen.prototype.results_reset_cleanup = function() {
987
+ this.current_selectedIndex = this.form_field.selectedIndex;
988
+ return this.selected_item.find("abbr").remove();
989
+ };
990
+
991
+ Chosen.prototype.result_select = function(evt) {
992
+ var high, item;
993
+ if (this.result_highlight) {
994
+ high = this.result_highlight;
995
+ this.result_clear_highlight();
996
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
997
+ this.form_field_jq.trigger("chosen:maxselected", {
998
+ chosen: this
999
+ });
1000
+ return false;
1001
+ }
1002
+ if (this.is_multiple) {
1003
+ high.removeClass("active-result");
1004
+ } else {
1005
+ this.reset_single_select_options();
1006
+ }
1007
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
1008
+ item.selected = true;
1009
+ this.form_field.options[item.options_index].selected = true;
1010
+ this.selected_option_count = null;
1011
+ if (this.is_multiple) {
1012
+ this.choice_build(item);
1013
+ } else {
1014
+ this.single_set_selected_text(item.text);
1015
+ }
1016
+ if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1017
+ this.results_hide();
1018
+ }
1019
+ this.search_field.val("");
1020
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1021
+ this.form_field_jq.trigger("change", {
1022
+ 'selected': this.form_field.options[item.options_index].value
1023
+ });
1024
+ }
1025
+ this.current_selectedIndex = this.form_field.selectedIndex;
1026
+ return this.search_field_scale();
1027
+ }
1028
+ };
1029
+
1030
+ Chosen.prototype.single_set_selected_text = function(text) {
1031
+ if (text == null) {
1032
+ text = this.default_text;
1033
+ }
1034
+ if (text === this.default_text) {
1035
+ this.selected_item.addClass("chosen-default");
1036
+ } else {
1037
+ this.single_deselect_control_build();
1038
+ this.selected_item.removeClass("chosen-default");
1039
+ }
1040
+ return this.selected_item.find("span").text(text);
1041
+ };
1042
+
1043
+ Chosen.prototype.result_deselect = function(pos) {
1044
+ var result_data;
1045
+ result_data = this.results_data[pos];
1046
+ if (!this.form_field.options[result_data.options_index].disabled) {
1047
+ result_data.selected = false;
1048
+ this.form_field.options[result_data.options_index].selected = false;
1049
+ this.selected_option_count = null;
1050
+ this.result_clear_highlight();
1051
+ if (this.results_showing) {
1052
+ this.winnow_results();
1053
+ }
1054
+ this.form_field_jq.trigger("change", {
1055
+ deselected: this.form_field.options[result_data.options_index].value
1056
+ });
1057
+ this.search_field_scale();
1058
+ return true;
1059
+ } else {
1060
+ return false;
1061
+ }
1062
+ };
1063
+
1064
+ Chosen.prototype.single_deselect_control_build = function() {
1065
+ if (!this.allow_single_deselect) {
1066
+ return;
1067
+ }
1068
+ if (!this.selected_item.find("abbr").length) {
1069
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1070
+ }
1071
+ return this.selected_item.addClass("chosen-single-with-deselect");
1072
+ };
1073
+
1074
+ Chosen.prototype.get_search_text = function() {
1075
+ if (this.search_field.val() === this.default_text) {
1076
+ return "";
1077
+ } else {
1078
+ return $('<div/>').text($.trim(this.search_field.val())).html();
1079
+ }
1080
+ };
1081
+
1082
+ Chosen.prototype.winnow_results_set_highlight = function() {
1083
+ var do_high, selected_results;
1084
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1085
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1086
+ if (do_high != null) {
1087
+ return this.result_do_highlight(do_high);
1088
+ }
1089
+ };
1090
+
1091
+ Chosen.prototype.no_results = function(terms) {
1092
+ var no_results_html;
1093
+ no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1094
+ no_results_html.find("span").first().html(terms);
1095
+ this.search_results.append(no_results_html);
1096
+ return this.form_field_jq.trigger("chosen:no_results", {
1097
+ chosen: this
1098
+ });
1099
+ };
1100
+
1101
+ Chosen.prototype.no_results_clear = function() {
1102
+ return this.search_results.find(".no-results").remove();
1103
+ };
1104
+
1105
+ Chosen.prototype.keydown_arrow = function() {
1106
+ var next_sib;
1107
+ if (this.results_showing && this.result_highlight) {
1108
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
1109
+ if (next_sib) {
1110
+ return this.result_do_highlight(next_sib);
1111
+ }
1112
+ } else {
1113
+ return this.results_show();
1114
+ }
1115
+ };
1116
+
1117
+ Chosen.prototype.keyup_arrow = function() {
1118
+ var prev_sibs;
1119
+ if (!this.results_showing && !this.is_multiple) {
1120
+ return this.results_show();
1121
+ } else if (this.result_highlight) {
1122
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
1123
+ if (prev_sibs.length) {
1124
+ return this.result_do_highlight(prev_sibs.first());
1125
+ } else {
1126
+ if (this.choices_count() > 0) {
1127
+ this.results_hide();
1128
+ }
1129
+ return this.result_clear_highlight();
1130
+ }
1131
+ }
1132
+ };
1133
+
1134
+ Chosen.prototype.keydown_backstroke = function() {
1135
+ var next_available_destroy;
1136
+ if (this.pending_backstroke) {
1137
+ this.choice_destroy(this.pending_backstroke.find("a").first());
1138
+ return this.clear_backstroke();
1139
+ } else {
1140
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
1141
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1142
+ this.pending_backstroke = next_available_destroy;
1143
+ if (this.single_backstroke_delete) {
1144
+ return this.keydown_backstroke();
1145
+ } else {
1146
+ return this.pending_backstroke.addClass("search-choice-focus");
1147
+ }
1148
+ }
1149
+ }
1150
+ };
1151
+
1152
+ Chosen.prototype.clear_backstroke = function() {
1153
+ if (this.pending_backstroke) {
1154
+ this.pending_backstroke.removeClass("search-choice-focus");
1155
+ }
1156
+ return this.pending_backstroke = null;
1157
+ };
1158
+
1159
+ Chosen.prototype.keydown_checker = function(evt) {
1160
+ var stroke, _ref1;
1161
+ stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1162
+ this.search_field_scale();
1163
+ if (stroke !== 8 && this.pending_backstroke) {
1164
+ this.clear_backstroke();
1165
+ }
1166
+ switch (stroke) {
1167
+ case 8:
1168
+ this.backstroke_length = this.search_field.val().length;
1169
+ break;
1170
+ case 9:
1171
+ if (this.results_showing && !this.is_multiple) {
1172
+ this.result_select(evt);
1173
+ }
1174
+ this.mouse_on_container = false;
1175
+ break;
1176
+ case 13:
1177
+ if (this.results_showing) {
1178
+ evt.preventDefault();
1179
+ }
1180
+ break;
1181
+ case 32:
1182
+ if (this.disable_search) {
1183
+ evt.preventDefault();
1184
+ }
1185
+ break;
1186
+ case 38:
1187
+ evt.preventDefault();
1188
+ this.keyup_arrow();
1189
+ break;
1190
+ case 40:
1191
+ evt.preventDefault();
1192
+ this.keydown_arrow();
1193
+ break;
1194
+ }
1195
+ };
1196
+
1197
+ Chosen.prototype.search_field_scale = function() {
1198
+ var div, f_width, h, style, style_block, styles, w, _i, _len;
1199
+ if (this.is_multiple) {
1200
+ h = 0;
1201
+ w = 0;
1202
+ style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1203
+ styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1204
+ for (_i = 0, _len = styles.length; _i < _len; _i++) {
1205
+ style = styles[_i];
1206
+ style_block += style + ":" + this.search_field.css(style) + ";";
1207
+ }
1208
+ div = $('<div />', {
1209
+ 'style': style_block
1210
+ });
1211
+ div.text(this.search_field.val());
1212
+ $('body').append(div);
1213
+ w = div.width() + 25;
1214
+ div.remove();
1215
+ f_width = this.container.outerWidth();
1216
+ if (w > f_width - 10) {
1217
+ w = f_width - 10;
1218
+ }
1219
+ return this.search_field.css({
1220
+ 'width': w + 'px'
1221
+ });
1222
+ }
1223
+ };
1224
+
1225
+ return Chosen;
1226
+
1227
+ })(AbstractChosen);
1228
+
1229
+ }).call(this);
backend/modules/calendar/resources/js/jquery.weekcalendar.js ADDED
@@ -0,0 +1,2951 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery.weekCalendar v2.0-dev
3
+ *
4
+ * for support join us at the google group:
5
+ * - http://groups.google.com/group/jquery-week-calendar
6
+ * have a look to the wiki for documentation:
7
+ * - http://wiki.github.com/themouette/jquery-week-calendar/
8
+ * something went bad ? report an issue:
9
+ * - http://github.com/themouette/jquery-week-calendar/issues
10
+ * get the last version on github:
11
+ * - http://github.com/themouette/jquery-week-calendar
12
+ *
13
+ * Copyright (c) 2009 Rob Monie
14
+ * Copyright (c) 2010 Julien MUETTON
15
+ * Dual licensed under the MIT and GPL licenses:
16
+ * http://www.opensource.org/licenses/mit-license.php
17
+ * http://www.gnu.org/licenses/gpl.html
18
+ *
19
+ * If you're after a monthly calendar plugin, check out this one :
20
+ * http://arshaw.com/fullcalendar/
21
+ */
22
+
23
+ (function($) {
24
+ // check the jquery version
25
+ var _v = $.fn.jquery.split('.'),
26
+ _jQuery14OrLower = (10 * _v[0] + _v[1]) < 15;
27
+
28
+ $.widget('ui.weekCalendar', (function() {
29
+ var _currentAjaxCall, _hourLineTimeout;
30
+
31
+ return {
32
+ options: {
33
+ date: new Date(),
34
+ timeFormat: null,
35
+ dateFormat: 'M d, Y',
36
+ alwaysDisplayTimeMinutes: true,
37
+ use24Hour: false,
38
+ daysToShow: 7,
39
+ minBodyHeight: 100,
40
+ firstDayOfWeek: function(calendar) {
41
+ if ($(calendar).weekCalendar('option', 'daysToShow') != 5) {
42
+ return 0;
43
+ } else {
44
+ //workweek
45
+ return 1;
46
+ }
47
+ }, // 0 = Sunday, 1 = Monday, 2 = Tuesday, ... , 6 = Saturday
48
+ useShortDayNames: false,
49
+ timeSeparator: ' to ',
50
+ startParam: 'start',
51
+ endParam: 'end',
52
+ businessHours: {start: 8, end: 18, limitDisplay: false},
53
+ newEventText: 'New Event',
54
+ timeslotHeight: 20,
55
+ defaultEventLength: 2,
56
+ timeslotsPerHour: 4,
57
+ minDate: null,
58
+ maxDate: null,
59
+ showHeader: true,
60
+ buttons: true,
61
+ buttonText: {
62
+ today: 'today',
63
+ lastWeek: 'previous',
64
+ nextWeek: 'next'
65
+ },
66
+ switchDisplay: {},
67
+ scrollToHourMillis: 500,
68
+ allowEventDelete: false,
69
+ allowCalEventOverlap: false,
70
+ overlapEventsSeparate: false,
71
+ totalEventsWidthPercentInOneColumn: 100,
72
+ readonly: false,
73
+ allowEventCreation: true,
74
+ hourLine: false,
75
+ deletable: function(calEvent, element) {
76
+ return true;
77
+ },
78
+ draggable: function(calEvent, element) {
79
+ return true;
80
+ },
81
+ resizable: function(calEvent, element) {
82
+ return true;
83
+ },
84
+ eventClick: function(calEvent, element, dayFreeBusyManager,
85
+ calendar, clickEvent) {
86
+ },
87
+ eventRender: function(calEvent, element) {
88
+ return element;
89
+ },
90
+ eventAfterRender: function(calEvent, element) {
91
+ return element;
92
+ },
93
+ eventRefresh: function(calEvent, element) {
94
+ return element;
95
+ },
96
+ eventDrag: function(calEvent, element) {
97
+ },
98
+ eventDrop: function(calEvent, element) {
99
+ },
100
+ eventResize: function(calEvent, element) {
101
+ },
102
+ eventNew: function(calEvent, element, dayFreeBusyManager,
103
+ calendar, mouseupEvent) {
104
+ },
105
+ eventMouseover: function(calEvent, $event) {
106
+ },
107
+ eventMouseout: function(calEvent, $event) {
108
+ },
109
+ eventDelete: function(calEvent, element, dayFreeBusyManager,
110
+ calendar, clickEvent) {
111
+ calendar.weekCalendar('removeEvent',calEvent.id);
112
+ },
113
+ calendarBeforeLoad: function(calendar) {
114
+ },
115
+ calendarAfterLoad: function(calendar) {
116
+ },
117
+ noEvents: function() {
118
+ },
119
+ eventHeader: function(calEvent, calendar) {
120
+ var options = calendar.weekCalendar('option');
121
+ var one_hour = 3600000;
122
+ var displayTitleWithTime = calEvent.end.getTime() - calEvent.start.getTime() <= (one_hour / options.timeslotsPerHour);
123
+ if (displayTitleWithTime) {
124
+ return calendar.weekCalendar(
125
+ 'formatTime', calEvent.start) +
126
+ ': ' + calEvent.title;
127
+ } else {
128
+ return calendar.weekCalendar(
129
+ 'formatTime', calEvent.start) +
130
+ options.timeSeparator +
131
+ calendar.weekCalendar(
132
+ 'formatTime', calEvent.end);
133
+ }
134
+ },
135
+ eventBody: function(calEvent, calendar) {
136
+ return calEvent.title;
137
+ },
138
+ shortMonths: BooklyL10n['shortMonths'],
139
+ longMonths: BooklyL10n['longMonths'],
140
+ shortDays: BooklyL10n['shortDays'],
141
+ longDays: BooklyL10n['longDays'],
142
+ /* multi-users options */
143
+ /**
144
+ * the available users for calendar.
145
+ * if you want to display users separately, enable the
146
+ * showAsSeparateUsers option.
147
+ * if you provide a list of user and do not enable showAsSeparateUsers
148
+ * option, then only the events that belongs to one or several of
149
+ * given users will be displayed
150
+ * @type {array}
151
+ */
152
+ users: [],
153
+ /**
154
+ * should the calendar be displayed with separate column for each
155
+ * users.
156
+ * note that this option does nothing if you do not provide at least
157
+ * one user.
158
+ * @type {boolean}
159
+ */
160
+ showAsSeparateUsers: true,
161
+ /**
162
+ * callback used to read user id from a user object.
163
+ * @param {Object} user the user to retrieve the id from.
164
+ * @param {number} index the user index from user list.
165
+ * @param {jQuery} calendar the calendar object.
166
+ * @return {int|String} the user id.
167
+ */
168
+ getUserId: function(user, index, calendar) {
169
+ return index;
170
+ },
171
+ /**
172
+ * callback used to read user name from a user object.
173
+ * @param {Object} user the user to retrieve the name from.
174
+ * @param {number} index the user index from user list.
175
+ * @param {jQuery} calendar the calendar object.
176
+ * @return {String} the user name.
177
+ */
178
+ getUserName: function(user, index, calendar) {
179
+ return user;
180
+ },
181
+ /**
182
+ * reads the id(s) of user(s) for who the event should be displayed.
183
+ * @param {Object} calEvent the calEvent to read informations from.
184
+ * @param {jQuery} calendar the calendar object.
185
+ * @return {number|String|Array} the user id(s) to appened events for.
186
+ */
187
+ getEventUserId: function(calEvent, calendar) {
188
+ return calEvent.userId;
189
+ },
190
+ /**
191
+ * sets user id(s) to the calEvent
192
+ * @param {Object} calEvent the calEvent to set informations to.
193
+ * @param {jQuery} calendar the calendar object.
194
+ * @return {Object} the calEvent with modified user id.
195
+ */
196
+ setEventUserId: function(userId, calEvent, calendar) {
197
+ calEvent.userId = userId;
198
+ return calEvent;
199
+ },
200
+ /* freeBusy options */
201
+ /**
202
+ * should the calendar display freebusys ?
203
+ * @type {boolean}
204
+ */
205
+ displayFreeBusys: false,
206
+ /**
207
+ * read the id(s) for who the freebusy is available
208
+ * @param {Object} calEvent the calEvent to read informations from.
209
+ * @param {jQuery} calendar the calendar object.
210
+ * @return {number|String|Array} the user id(s) to appened events for.
211
+ */
212
+ getFreeBusyUserId: function(calFreeBusy, calendar) {
213
+ return calFreeBusy.userId;
214
+ },
215
+ /**
216
+ * the default freeBusy object, used to manage default state
217
+ * @type {Object}
218
+ */
219
+ defaultFreeBusy: {free: false},
220
+ /**
221
+ * function used to display the freeBusy element
222
+ * @type {Function}
223
+ * @param {Object} freeBusy the freeBusy timeslot to render.
224
+ * @param {jQuery} $freeBusy the freeBusy HTML element.
225
+ * @param {jQuery} calendar the calendar element.
226
+ */
227
+ freeBusyRender: function(freeBusy, $freeBusy, calendar) {
228
+ if (!freeBusy.free) {
229
+ $freeBusy.addClass('free-busy-busy');
230
+ }
231
+ else {
232
+ $freeBusy.addClass('free-busy-free');
233
+ }
234
+ return $freeBusy;
235
+ },
236
+ /* other options */
237
+ /**
238
+ * true means start on first day of week, false means starts on
239
+ * startDate.
240
+ * @param {jQuery} calendar the calendar object.
241
+ * @type {Function|bool}
242
+ */
243
+ startOnFirstDayOfWeek: function(calendar) {
244
+ return $(calendar).weekCalendar('option', 'daysToShow') >= 5;
245
+ },
246
+ /**
247
+ * should the columns be rendered alternatively using odd/even
248
+ * class
249
+ * @type {boolean}
250
+ */
251
+ displayOddEven: false,
252
+ textSize: 13,
253
+ /**
254
+ * the title attribute for the calendar. possible placeholders are:
255
+ * <ul>
256
+ * <li>%start%</li>
257
+ * <li>%end%</li>
258
+ * <li>%date%</li>
259
+ * </ul>
260
+ * @type {Function|string}
261
+ * @param {number} option daysToShow.
262
+ * @return {String} the title attribute for the calendar.
263
+ */
264
+ title: '%start% - %end%',
265
+ /**
266
+ * default options to pass to callback
267
+ * you can pass a function returning an object or a litteral object
268
+ * @type {object|function(#calendar)}
269
+ */
270
+ jsonOptions: {},
271
+ headerSeparator: '<br />',
272
+ /**
273
+ * returns formatted header for day display
274
+ * @type {function(date,calendar)}
275
+ */
276
+ getHeaderDate: null,
277
+ preventDragOnEventCreation: false,
278
+ /**
279
+ * the event on which to bind calendar resize
280
+ * @type {string}
281
+ */
282
+ resizeEvent: 'resize.weekcalendar'
283
+ },
284
+
285
+ /***********************
286
+ * Initialise calendar *
287
+ ***********************/
288
+ _create: function() {
289
+ var self = this;
290
+ self._computeOptions();
291
+ self._setupEventDelegation();
292
+ self._renderCalendar();
293
+ self._loadCalEvents();
294
+ self._resizeCalendar();
295
+
296
+ if (this.options.resizeEvent) {
297
+ $(window).unbind(this.options.resizeEvent);
298
+ $(window).bind(this.options.resizeEvent, function() {
299
+ self._resizeCalendar();
300
+ });
301
+ }
302
+
303
+ },
304
+
305
+ /********************
306
+ * public functions *
307
+ ********************/
308
+ /*
309
+ * Refresh the events for the currently displayed week.
310
+ */
311
+ refresh: function() {
312
+ //reload with existing week
313
+ this._loadCalEvents(this.element.data('startDate'));
314
+ },
315
+
316
+ /*
317
+ * Clear all events currently loaded into the calendar
318
+ */
319
+ clear: function() {
320
+ this._clearCalendar();
321
+ },
322
+
323
+ /*
324
+ * Go to this week
325
+ */
326
+ today: function() {
327
+ this._clearCalendar();
328
+ this._loadCalEvents(new Date());
329
+ },
330
+
331
+ /*
332
+ * Go to the previous week relative to the currently displayed week
333
+ */
334
+ prevWeek: function() {
335
+ //minus more than 1 day to be sure we're in previous week - account for daylight savings or other anomolies
336
+ var newDate = new Date(this.element.data('startDate').getTime() - (MILLIS_IN_WEEK / 6));
337
+ this._clearCalendar();
338
+ this._loadCalEvents(newDate);
339
+ },
340
+
341
+ /*
342
+ * Go to the next week relative to the currently displayed week
343
+ */
344
+ nextWeek: function() {
345
+ //add 8 days to be sure of being in prev week - allows for daylight savings or other anomolies
346
+ var newDate = new Date(this.element.data('startDate').getTime() + MILLIS_IN_WEEK + MILLIS_IN_DAY);
347
+ this._clearCalendar();
348
+ this._loadCalEvents(newDate);
349
+ },
350
+
351
+ /*
352
+ * Reload the calendar to whatever week the date passed in falls on.
353
+ */
354
+ gotoWeek: function(date) {
355
+ this._clearCalendar();
356
+ this._loadCalEvents(date);
357
+ },
358
+
359
+ /*
360
+ * Reload the calendar to whatever week the date passed in falls on.
361
+ */
362
+ gotoDate: function(date) {
363
+ this._clearCalendar();
364
+ this._loadCalEvents(date);
365
+ },
366
+
367
+ /**
368
+ * change the number of days to show
369
+ */
370
+ setDaysToShow: function(daysToShow) {
371
+ var self = this;
372
+ var hour = self._getCurrentScrollHour();
373
+ self.options.daysToShow = daysToShow;
374
+ $(self.element).html('');
375
+ self._renderCalendar();
376
+ self._loadCalEvents();
377
+ self._resizeCalendar();
378
+ self._scrollToHour(hour, false);
379
+
380
+ if (this.options.resizeEvent) {
381
+ $(window).unbind(this.options.resizeEvent);
382
+ $(window).bind(this.options.resizeEvent, function() {
383
+ self._resizeCalendar();
384
+ });
385
+ }
386
+ },
387
+
388
+ /*
389
+ * Remove an event based on it's id
390
+ */
391
+ removeEvent: function(eventId) {
392
+
393
+ var self = this;
394
+
395
+ self.element.find('.wc-cal-event').each(function() {
396
+ if ($(this).data('calEvent').id === eventId) {
397
+ $(this).remove();
398
+ return false;
399
+ }
400
+ });
401
+
402
+ //this could be more efficient rather than running on all days regardless...
403
+ self.element.find('.wc-day-column-inner').each(function() {
404
+ self._adjustOverlappingEvents($(this));
405
+ });
406
+ },
407
+
408
+ /*
409
+ * Removes any events that have been added but not yet saved (have no id).
410
+ * This is useful to call after adding a freshly saved new event.
411
+ */
412
+ removeUnsavedEvents: function() {
413
+
414
+ var self = this;
415
+
416
+ self.element.find('.wc-new-cal-event').each(function() {
417
+ $(this).remove();
418
+ });
419
+
420
+ //this could be more efficient rather than running on all days regardless...
421
+ self.element.find('.wc-day-column-inner').each(function() {
422
+ self._adjustOverlappingEvents($(this));
423
+ });
424
+ },
425
+
426
+ /*
427
+ * update an event in the calendar. If the event exists it refreshes
428
+ * it's rendering. If it's a new event that does not exist in the calendar
429
+ * it will be added.
430
+ */
431
+ updateEvent: function(calEvent) {
432
+ this._updateEventInCalendar(calEvent);
433
+ },
434
+
435
+ /*
436
+ * Returns an array of timeslot start and end times based on
437
+ * the configured grid of the calendar. Returns in both date and
438
+ * formatted time based on the 'timeFormat' config option.
439
+ */
440
+ getTimeslotTimes: function(date) {
441
+ var options = this.options;
442
+ var firstHourDisplayed = options.businessHours.limitDisplay ? options.businessHours.start : 0;
443
+ var startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), firstHourDisplayed);
444
+
445
+ var times = [],
446
+ startMillis = startDate.getTime();
447
+ for (var i = 0; i < options.timeslotsPerDay; i++) {
448
+ var endMillis = startMillis + options.millisPerTimeslot;
449
+ times[i] = {
450
+ start: new Date(startMillis),
451
+ startFormatted: this.formatTime(new Date(startMillis), options.timeFormat),
452
+ end: new Date(endMillis),
453
+ endFormatted: this.formatTime(new Date(endMillis), options.timeFormat)
454
+ };
455
+ startMillis = endMillis;
456
+ }
457
+ return times;
458
+ },
459
+
460
+ formatDate: function(date, format) {
461
+ if (format) {
462
+ return this._formatDate(date, format);
463
+ } else {
464
+ return this._formatDate(date, this.options.dateFormat);
465
+ }
466
+ },
467
+
468
+ formatTime: function(date, format) {
469
+ if (format) {
470
+ return this._formatDate(date, format);
471
+ } else if (this.options.timeFormat) {
472
+ return this._formatDate(date, this.options.timeFormat);
473
+ } else if (this.options.use24Hour) {
474
+ return this._formatDate(date, 'H:i');
475
+ } else {
476
+ return this._formatDate(date, 'h:i a');
477
+ }
478
+ },
479
+
480
+ serializeEvents: function() {
481
+ var self = this;
482
+ var calEvents = [];
483
+
484
+ self.element.find('.wc-cal-event').each(function() {
485
+ calEvents.push($(this).data('calEvent'));
486
+ });
487
+ return calEvents;
488
+ },
489
+
490
+ next: function() {
491
+ if (this._startOnFirstDayOfWeek()) {
492
+ return this.nextWeek();
493
+ }
494
+ var newDate = new Date(this.element.data('startDate').getTime());
495
+ newDate.setDate(newDate.getDate() + this.options.daysToShow);
496
+
497
+ this._clearCalendar();
498
+ this._loadCalEvents(newDate);
499
+ },
500
+
501
+ prev: function() {
502
+ if (this._startOnFirstDayOfWeek()) {
503
+ return this.prevWeek();
504
+ }
505
+ var newDate = new Date(this.element.data('startDate').getTime());
506
+ newDate.setDate(newDate.getDate() - this.options.daysToShow);
507
+
508
+ this._clearCalendar();
509
+ this._loadCalEvents(newDate);
510
+ },
511
+ getCurrentFirstDay: function() {
512
+ return this._dateFirstDayOfWeek(this.options.date || new Date());
513
+ },
514
+ getCurrentLastDay: function() {
515
+ return this._addDays(this.getCurrentFirstDay(), this.options.daysToShow - 1);
516
+ },
517
+
518
+ /*********************
519
+ * private functions *
520
+ *********************/
521
+ _setOption: function(key, value) {
522
+ var self = this;
523
+ if (self.options[key] != value) {
524
+ // event callback change, no need to re-render the events
525
+ if (key == 'beforeEventNew') {
526
+ self.options[key] = value;
527
+ return;
528
+ }
529
+
530
+ // this could be made more efficient at some stage by caching the
531
+ // events array locally in a store but this should be done in conjunction
532
+ // with a proper binding model.
533
+
534
+ var currentEvents = self.element.find('.wc-cal-event').map(function() {
535
+ return $(this).data('calEvent');
536
+ });
537
+
538
+ var newOptions = {};
539
+ newOptions[key] = value;
540
+ self._renderEvents({events: currentEvents, options: newOptions}, self.element.find('.wc-day-column-inner'));
541
+ }
542
+ },
543
+
544
+ // compute dynamic options based on other config values
545
+ _computeOptions: function() {
546
+ var options = this.options;
547
+ if (options.businessHours.limitDisplay) {
548
+ options.timeslotsPerDay = options.timeslotsPerHour * (options.businessHours.end - options.businessHours.start);
549
+ options.millisToDisplay = (options.businessHours.end - options.businessHours.start) * 3600000; // 60 * 60 * 1000
550
+ options.millisPerTimeslot = options.millisToDisplay / options.timeslotsPerDay;
551
+ } else {
552
+ options.timeslotsPerDay = options.timeslotsPerHour * 24;
553
+ options.millisToDisplay = MILLIS_IN_DAY;
554
+ options.millisPerTimeslot = MILLIS_IN_DAY / options.timeslotsPerDay;
555
+ }
556
+ },
557
+
558
+ /*
559
+ * Resize the calendar scrollable height based on the provided function in options.
560
+ */
561
+ _resizeCalendar: function() {
562
+ var options = this.options;
563
+ if (options && $.isFunction(options.height)) {
564
+ var calendarHeight = options.height(this.element);
565
+ var headerHeight = this.element.find('.wc-header').outerHeight();
566
+ var navHeight = this.element.find('.wc-toolbar').outerHeight();
567
+ var scrollContainerHeight = Math.max(calendarHeight - navHeight - headerHeight, options.minBodyHeight);
568
+ var timeslotHeight = this.element.find('.wc-time-slots').outerHeight();
569
+ this.element.find('.wc-scrollable-grid').height(scrollContainerHeight);
570
+ if (timeslotHeight <= scrollContainerHeight) {
571
+ this.element.find('.wc-scrollbar-shim').width(0);
572
+ }
573
+ this._trigger('resize', this.element);
574
+ }
575
+ },
576
+
577
+ _findScrollBarWidth: function() {
578
+ var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body');
579
+ var child = parent.children();
580
+ var width = child.innerWidth() - child.height(99).innerWidth();
581
+ parent.remove();
582
+ return width || /* default to 16 that is the average */ 16;
583
+ },
584
+
585
+ /*
586
+ * configure calendar interaction events that are able to use event
587
+ * delegation for greater efficiency
588
+ */
589
+ _setupEventDelegation: function() {
590
+ var self = this;
591
+ var options = this.options;
592
+
593
+ this.element.click(function(event) {
594
+ var $target = $(event.target),
595
+ freeBusyManager;
596
+
597
+ // click is disabled
598
+ if ($target.data('preventClick')) {
599
+ return;
600
+ }
601
+
602
+ var $calEvent = $target.hasClass('wc-cal-event') ?
603
+ $target :
604
+ $target.parents('.wc-cal-event');
605
+ if (!$calEvent.length || !$calEvent.data('calEvent')) {
606
+ return;
607
+ }
608
+
609
+ freeBusyManager = self.getFreeBusyManagerForEvent($calEvent.data('calEvent'));
610
+
611
+ if (options.allowEventDelete && $target.hasClass('wc-cal-event-delete')) {
612
+ options.eventDelete($calEvent.data('calEvent'), $calEvent, freeBusyManager, self.element, event);
613
+ } else {
614
+ options.eventClick($calEvent.data('calEvent'), $calEvent, freeBusyManager, self.element, event);
615
+ }
616
+ }).mouseover(function(event) {
617
+ var $target = $(event.target);
618
+ var $calEvent = $target.hasClass('wc-cal-event') ?
619
+ $target :
620
+ $target.parents('.wc-cal-event');
621
+
622
+ if (!$calEvent.length || !$calEvent.data('calEvent')) {
623
+ return;
624
+ }
625
+
626
+ if (self._isDraggingOrResizing($calEvent)) {
627
+ return;
628
+ }
629
+
630
+ options.eventMouseover($calEvent.data('calEvent'), $calEvent, event);
631
+ }).mouseout(function(event) {
632
+ var $target = $(event.target);
633
+ var $calEvent = $target.hasClass('wc-cal-event') ?
634
+ $target :
635
+ $target.parents('.wc-cal-event');
636
+
637
+ if (!$calEvent.length || !$calEvent.data('calEvent')) {
638
+ return;
639
+ }
640
+
641
+ if (self._isDraggingOrResizing($calEvent)) {
642
+ return;
643
+ }
644
+
645
+ options.eventMouseout($calEvent.data('calEvent'), $calEvent, event);
646
+ });
647
+ },
648
+
649
+ /**
650
+ * check if a ui draggable or resizable is currently being dragged or
651
+ * resized.
652
+ */
653
+ _isDraggingOrResizing: function($target) {
654
+ return $target.hasClass('ui-draggable-dragging') ||
655
+ $target.hasClass('ui-resizable-resizing');
656
+ },
657
+
658
+ /*
659
+ * Render the main calendar layout
660
+ */
661
+ _renderCalendar: function() {
662
+ var $calendarContainer, $weekDayColumns;
663
+ var self = this;
664
+ var options = this.options;
665
+
666
+ $calendarContainer = $('<div class=\"ui-widget wc-container\">').appendTo(self.element);
667
+
668
+ //render the different parts
669
+ // nav links
670
+ self._renderCalendarButtons($calendarContainer);
671
+ // header
672
+ self._renderCalendarHeader($calendarContainer);
673
+ // body
674
+ self._renderCalendarBody($calendarContainer);
675
+
676
+ $weekDayColumns = $calendarContainer.find('.wc-day-column-inner');
677
+ $weekDayColumns.each(function(i, val) {
678
+ if (!options.readonly) {
679
+ self._addDroppableToWeekDay($(this));
680
+ if (options.allowEventCreation) {
681
+ self._setupEventCreationForWeekDay($(this));
682
+ }
683
+ }
684
+ });
685
+ },
686
+
687
+ /**
688
+ * render the nav buttons on top of the calendar
689
+ */
690
+ _renderCalendarButtons: function($calendarContainer) {
691
+ var self = this, options = this.options;
692
+ if ( !options.showHeader ) return;
693
+ if (options.buttons) {
694
+ var calendarNavHtml = '';
695
+
696
+ calendarNavHtml += '<div class=\"ui-widget-header wc-toolbar\">';
697
+ calendarNavHtml += '<div class=\"wc-display\"></div>';
698
+ calendarNavHtml += '<div class=\"wc-nav\">';
699
+ calendarNavHtml += '<button class=\"wc-prev\">' + options.buttonText.lastWeek + '</button>';
700
+ calendarNavHtml += '<button class=\"wc-today\">' + options.buttonText.today + '</button>';
701
+ calendarNavHtml += '<button class=\"wc-next\">' + options.buttonText.nextWeek + '</button>';
702
+ calendarNavHtml += '</div>';
703
+ calendarNavHtml += '<h1 class=\"wc-title\"></h1>';
704
+ calendarNavHtml += '</div>';
705
+
706
+ $(calendarNavHtml).appendTo($calendarContainer);
707
+
708
+ $calendarContainer.find('.wc-nav .wc-today')
709
+ .button({
710
+ icons: {primary: 'ui-icon-home'}})
711
+ .click(function() {
712
+ self.today();
713
+ return false;
714
+ });
715
+
716
+ $calendarContainer.find('.wc-nav .wc-prev')
717
+ .button({
718
+ text: false,
719
+ icons: {primary: 'ui-icon-seek-prev'}})
720
+ .click(function() {
721
+ self.element.weekCalendar('prev');
722
+ return false;
723
+ });
724
+
725
+ $calendarContainer.find('.wc-nav .wc-next')
726
+ .button({
727
+ text: false,
728
+ icons: {primary: 'ui-icon-seek-next'}})
729
+ .click(function() {
730
+ self.element.weekCalendar('next');
731
+ return false;
732
+ });
733
+
734
+ // now add buttons to switch display
735
+ if (this.options.switchDisplay && $.isPlainObject(this.options.switchDisplay)) {
736
+ var $container = $calendarContainer.find('.wc-display');
737
+ $.each(this.options.switchDisplay, function(label, option) {
738
+ var _id = 'wc-switch-display-' + option;
739
+ var _input = $('<input type="radio" id="' + _id + '" name="wc-switch-display" class="wc-switch-display"/>');
740
+ var _label = $('<label for="' + _id + '"></label>');
741
+ _label.html(label);
742
+ _input.val(option);
743
+ if (parseInt(self.options.daysToShow, 10) === parseInt(option, 10)) {
744
+ _input.attr('checked', 'checked');
745
+ }
746
+ $container
747
+ .append(_input)
748
+ .append(_label);
749
+ });
750
+ $container.find('input').change(function() {
751
+ self.setDaysToShow(parseInt($(this).val(), 10));
752
+ });
753
+ }
754
+ $calendarContainer.find('.wc-nav, .wc-display').buttonset();
755
+ var _height = $calendarContainer.find('.wc-nav').outerHeight();
756
+ $calendarContainer.find('.wc-title')
757
+ .height(_height)
758
+ .css('line-height', _height + 'px');
759
+ }else{
760
+ var calendarNavHtml = '';
761
+ calendarNavHtml += '<div class=\"ui-widget-header wc-toolbar\">';
762
+ calendarNavHtml += '<h1 class=\"wc-title\"></h1>';
763
+ calendarNavHtml += '</div>';
764
+ $(calendarNavHtml).appendTo($calendarContainer);
765
+
766
+ }
767
+ },
768
+
769
+ /**
770
+ * render the calendar header, including date and user header
771
+ */
772
+ _renderCalendarHeader: function($calendarContainer) {
773
+ var self = this, options = this.options,
774
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
775
+ rowspan = '', colspan = '', calendarHeaderHtml;
776
+
777
+ if (showAsSeparatedUser) {
778
+ rowspan = ' rowspan=\"2\"';
779
+ colspan = ' colspan=\"' + options.users.length + '\" ';
780
+ }
781
+
782
+ //first row
783
+ calendarHeaderHtml = '<div class=\"ui-widget-content wc-header\">';
784
+ calendarHeaderHtml += '<table><tbody><tr><td class=\"wc-time-column-header\" style=\"width:44px\"></td>';
785
+ for (var i = 1; i <= options.daysToShow; i++) {
786
+ calendarHeaderHtml += '<td class=\"wc-day-column-header wc-day-' + i + '\"' + colspan + '></td>';
787
+ }
788
+ calendarHeaderHtml += '<td class=\"wc-scrollbar-shim\"' + rowspan + '></td></tr>';
789
+
790
+ //users row
791
+ if (showAsSeparatedUser) {
792
+ calendarHeaderHtml += '<tr><td class=\"wc-time-column-header\"></td>';
793
+ var uLength = options.users.length,
794
+ _headerClass = '';
795
+
796
+ for (var i = 1; i <= options.daysToShow; i++) {
797
+ for (var j = 0; j < uLength; j++) {
798
+ _headerClass = [];
799
+ if (j == 0) {
800
+ _headerClass.push('wc-day-column-first');
801
+ }
802
+ if (j == uLength - 1) {
803
+ _headerClass.push('wc-day-column-last');
804
+ }
805
+ if (!_headerClass.length) {
806
+ _headerClass = 'wc-day-column-middle';
807
+ }
808
+ else {
809
+ _headerClass = _headerClass.join(' ');
810
+ }
811
+ calendarHeaderHtml += '<td class=\"' + _headerClass + ' wc-user-header wc-day-' + i + ' wc-user-' + self._getUserIdFromIndex(j) + '\">';
812
+ // calendarHeaderHtml+= "<div class=\"wc-user-header wc-day-" + i + " wc-user-" + self._getUserIdFromIndex(j) +"\" >";
813
+ calendarHeaderHtml += self._getUserName(j);
814
+ // calendarHeaderHtml+= "</div>";
815
+ calendarHeaderHtml += '</td>';
816
+ }
817
+ }
818
+ calendarHeaderHtml += '</tr>';
819
+ }
820
+ //close the header
821
+ calendarHeaderHtml += '</tbody></table></div>';
822
+
823
+ $(calendarHeaderHtml).appendTo($calendarContainer);
824
+ },
825
+
826
+ /**
827
+ * render the calendar body.
828
+ * Calendar body is composed of several distinct parts.
829
+ * Each part is displayed in a separated row to ease rendering.
830
+ * for further explanations, see each part rendering function.
831
+ */
832
+ _renderCalendarBody: function($calendarContainer) {
833
+ var self = this, options = this.options,
834
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
835
+ $calendarBody, $calendarTableTbody;
836
+ // create the structure
837
+ $calendarBody = '<div class=\"wc-scrollable-grid\">';
838
+ $calendarBody += '<table class=\"wc-time-slots\">';
839
+ $calendarBody += '<tbody>';
840
+ $calendarBody += '</tbody>';
841
+ $calendarBody += '</table>';
842
+ $calendarBody += '</div>';
843
+ $calendarBody = $($calendarBody);
844
+ $calendarTableTbody = $calendarBody.find('tbody');
845
+
846
+ self._renderCalendarBodyTimeSlots($calendarTableTbody);
847
+ self._renderCalendarBodyOddEven($calendarTableTbody);
848
+ self._renderCalendarBodyFreeBusy($calendarTableTbody);
849
+ self._renderCalendarBodyEvents($calendarTableTbody);
850
+
851
+ $calendarBody.appendTo($calendarContainer);
852
+
853
+ //set the column height
854
+ $calendarContainer.find('.wc-full-height-column').height(options.timeslotHeight * options.timeslotsPerDay);
855
+ //set the timeslot height
856
+ $calendarContainer.find('.wc-time-slot').height(options.timeslotHeight - 1); //account for border
857
+ //init the time row header height
858
+ /**
859
+ TODO if total height for an hour is less than 11px, there is a display problem.
860
+ Find a way to handle it
861
+ */
862
+ $calendarContainer.find('.wc-time-header-cell').css({
863
+ height: (options.timeslotHeight * options.timeslotsPerHour) - 11,
864
+ padding: 5
865
+ });
866
+ //add the user data to every impacted column
867
+ if (showAsSeparatedUser) {
868
+ for (var i = 0, uLength = options.users.length; i < uLength; i++) {
869
+ $calendarContainer.find('.wc-user-' + self._getUserIdFromIndex(i))
870
+ .data('wcUser', options.users[i])
871
+ .data('wcUserIndex', i)
872
+ .data('wcUserId', self._getUserIdFromIndex(i));
873
+ }
874
+ }
875
+ },
876
+
877
+ /**
878
+ * render the timeslots separation
879
+ */
880
+ _renderCalendarBodyTimeSlots: function($calendarTableTbody) {
881
+ var options = this.options,
882
+ renderRow, i, j,
883
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
884
+ start = (options.businessHours.limitDisplay ? options.businessHours.start : 0),
885
+ end = (options.businessHours.limitDisplay ? options.businessHours.end : 24),
886
+ rowspan = 1;
887
+
888
+ //calculate the rowspan
889
+ if (options.displayOddEven) { rowspan += 1; }
890
+ if (options.displayFreeBusys) { rowspan += 1; }
891
+ if (rowspan > 1) {
892
+ rowspan = ' rowspan=\"' + rowspan + '\"';
893
+ }
894
+ else {
895
+ rowspan = '';
896
+ }
897
+
898
+ renderRow = '<tr class=\"wc-grid-row-timeslot\">';
899
+ renderRow += '<td class=\"wc-grid-timeslot-header\"' + rowspan + '></td>';
900
+ renderRow += '<td colspan=\"' + options.daysToShow * (showAsSeparatedUser ? options.users.length : 1) + '\">';
901
+ renderRow += '<div class=\"wc-no-height-wrapper wc-time-slot-wrapper\">';
902
+ renderRow += '<div class=\"wc-time-slots\">';
903
+
904
+ for (i = start; i < end; i++) {
905
+ for (j = 0; j < options.timeslotsPerHour - 1; j++) {
906
+ renderRow += '<div class=\"wc-time-slot\"></div>';
907
+ }
908
+ renderRow += '<div class=\"wc-time-slot wc-hour-end\"></div>';
909
+ }
910
+
911
+ renderRow += '</div>';
912
+ renderRow += '</div>';
913
+ renderRow += '</td>';
914
+ renderRow += '</tr>';
915
+
916
+ $(renderRow).appendTo($calendarTableTbody);
917
+ },
918
+
919
+ /**
920
+ * render the odd even columns
921
+ */
922
+ _renderCalendarBodyOddEven: function($calendarTableTbody) {
923
+ if (this.options.displayOddEven) {
924
+ var options = this.options,
925
+ renderRow = '<tr class=\"wc-grid-row-oddeven\">',
926
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
927
+ oddEven,
928
+ // let's take advantage of the jquery ui framework
929
+ oddEvenClasses = {'odd': 'wc-column-odd', 'even': 'ui-state-hover wc-column-even'};
930
+
931
+ //now let's display oddEven placeholders
932
+ for (var i = 1; i <= options.daysToShow; i++) {
933
+ if (!showAsSeparatedUser) {
934
+ oddEven = (oddEven == 'odd' ? 'even' : 'odd');
935
+ renderRow += '<td class=\"wc-day-column day-' + i + '\">';
936
+ renderRow += '<div class=\"wc-no-height-wrapper wc-oddeven-wrapper\">';
937
+ renderRow += '<div class=\"wc-full-height-column ' + oddEvenClasses[oddEven] + '\"></div>';
938
+ renderRow += '</div>';
939
+ renderRow += '</td>';
940
+ }
941
+ else {
942
+ var uLength = options.users.length;
943
+ for (var j = 0; j < uLength; j++) {
944
+ oddEven = (oddEven == 'odd' ? 'even' : 'odd');
945
+ renderRow += '<td class=\"wc-day-column day-' + i + '\">';
946
+ renderRow += '<div class=\"wc-no-height-wrapper wc-oddeven-wrapper\">';
947
+ renderRow += '<div class=\"wc-full-height-column ' + oddEvenClasses[oddEven] + '\" ></div>';
948
+ renderRow += '</div>';
949
+ renderRow += '</td>';
950
+ }
951
+ }
952
+ }
953
+ renderRow += '</tr>';
954
+
955
+ $(renderRow).appendTo($calendarTableTbody);
956
+ }
957
+ },
958
+
959
+ /**
960
+ * render the freebusy placeholders
961
+ */
962
+ _renderCalendarBodyFreeBusy: function($calendarTableTbody) {
963
+ if (this.options.displayFreeBusys) {
964
+ var self = this, options = this.options,
965
+ renderRow = '<tr class=\"wc-grid-row-freebusy\">',
966
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length;
967
+ renderRow += '</td>';
968
+
969
+ //now let's display freebusy placeholders
970
+ for (var i = 1; i <= options.daysToShow; i++) {
971
+ if (options.displayFreeBusys) {
972
+ if (!showAsSeparatedUser) {
973
+ renderRow += '<td class=\"wc-day-column day-' + i + '\">';
974
+ renderRow += '<div class=\"wc-no-height-wrapper wc-freebusy-wrapper\">';
975
+ renderRow += '<div class=\"wc-full-height-column wc-column-freebusy wc-day-' + i + '\"></div>';
976
+ renderRow += '</div>';
977
+ renderRow += '</td>';
978
+ }
979
+ else {
980
+ var uLength = options.users.length;
981
+ for (var j = 0; j < uLength; j++) {
982
+ renderRow += '<td class=\"wc-day-column day-' + i + '\">';
983
+ renderRow += '<div class=\"wc-no-height-wrapper wc-freebusy-wrapper\">';
984
+ renderRow += '<div class=\"wc-full-height-column wc-column-freebusy wc-day-' + i;
985
+ renderRow += ' wc-user-' + self._getUserIdFromIndex(j) + '\">';
986
+ renderRow += '</div>';
987
+ renderRow += '</div>';
988
+ renderRow += '</td>';
989
+ }
990
+ }
991
+ }
992
+ }
993
+
994
+ renderRow += '</tr>';
995
+
996
+ $(renderRow).appendTo($calendarTableTbody);
997
+ }
998
+ },
999
+
1000
+ /**
1001
+ * render the calendar body for event placeholders
1002
+ */
1003
+ _renderCalendarBodyEvents: function($calendarTableTbody) {
1004
+ var self = this, options = this.options,
1005
+ renderRow,
1006
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
1007
+ start = (options.businessHours.limitDisplay ? options.businessHours.start : 0),
1008
+ end = (options.businessHours.limitDisplay ? options.businessHours.end : 24);
1009
+ renderRow = '<tr class=\"wc-grid-row-events\">';
1010
+ renderRow += '<td class=\"wc-grid-timeslot-header\">';
1011
+ for (var i = start; i < end; i++) {
1012
+ var bhClass = (options.businessHours.start <= i && options.businessHours.end > i) ? 'ui-state-active wc-business-hours' : 'ui-state-default';
1013
+ renderRow += '<div class=\"wc-hour-header ' + bhClass + '\">';
1014
+ if (options.use24Hour) {
1015
+ renderRow += '<div class=\"wc-time-header-cell\">' + self._24HourForIndex(i) + '</div>';
1016
+ }
1017
+ else {
1018
+ renderRow += '<div class=\"wc-time-header-cell\">' + self._hourForIndex(i) + '<span class=\"wc-am-pm\">' + self._amOrPm(i) + '</span></div>';
1019
+ }
1020
+ renderRow += '</div>';
1021
+ }
1022
+ renderRow += '</td>';
1023
+
1024
+ //now let's display events placeholders
1025
+ var _columnBaseClass = 'ui-state-default wc-day-column';
1026
+ for (var i = 1; i <= options.daysToShow; i++) {
1027
+ if (!showAsSeparatedUser) {
1028
+ renderRow += '<td class=\"' + _columnBaseClass + ' wc-day-column-first wc-day-column-last day-' + i + '\">';
1029
+ renderRow += '<div class=\"wc-full-height-column wc-day-column-inner day-' + i + '\"></div>';
1030
+ renderRow += '</td>';
1031
+ }
1032
+ else {
1033
+ var uLength = options.users.length;
1034
+ var columnclass;
1035
+ for (var j = 0; j < uLength; j++) {
1036
+ columnclass = [];
1037
+ if (j == 0) {
1038
+ columnclass.push('wc-day-column-first');
1039
+ }
1040
+ if (j == uLength - 1) {
1041
+ columnclass.push('wc-day-column-last');
1042
+ }
1043
+ if (!columnclass.length) {
1044
+ columnclass = 'wc-day-column-middle';
1045
+ }
1046
+ else {
1047
+ columnclass = columnclass.join(' ');
1048
+ }
1049
+ renderRow += '<td class=\"' + _columnBaseClass + ' ' + columnclass + ' day-' + i + '\">';
1050
+ renderRow += '<div class=\"wc-full-height-column wc-day-column-inner day-' + i;
1051
+ renderRow += ' wc-user-' + self._getUserIdFromIndex(j) + '\">';
1052
+ renderRow += '</div>';
1053
+ renderRow += '</td>';
1054
+ }
1055
+ }
1056
+ }
1057
+
1058
+ renderRow += '</tr>';
1059
+
1060
+ $(renderRow).appendTo($calendarTableTbody);
1061
+ },
1062
+
1063
+ /*
1064
+ * setup mouse events for capturing new events
1065
+ */
1066
+ _setupEventCreationForWeekDay: function($weekDay) {
1067
+ var self = this;
1068
+ var options = this.options;
1069
+ $weekDay.mousedown(function(event) {
1070
+ var $target = $(event.target);
1071
+ if ($target.hasClass('wc-day-column-inner')) {
1072
+
1073
+ var $newEvent = $('<div class=\"wc-cal-event wc-new-cal-event wc-new-cal-event-creating\"></div>');
1074
+
1075
+ $newEvent.css({lineHeight: (options.timeslotHeight - 2) + 'px', fontSize: (options.timeslotHeight / 2) + 'px'});
1076
+ $target.append($newEvent);
1077
+
1078
+ var columnOffset = $target.offset().top;
1079
+ var clickY = event.pageY - columnOffset;
1080
+ var clickYRounded = (clickY - (clickY % options.timeslotHeight)) / options.timeslotHeight;
1081
+ var topPosition = clickYRounded * options.timeslotHeight;
1082
+ $newEvent.css({top: topPosition});
1083
+
1084
+ if (!options.preventDragOnEventCreation) {
1085
+ $target.bind('mousemove.newevent', function(event) {
1086
+ $newEvent.show();
1087
+ $newEvent.addClass('ui-resizable-resizing');
1088
+ var height = Math.round(event.pageY - columnOffset - topPosition);
1089
+ var remainder = height % options.timeslotHeight;
1090
+ //snap to closest timeslot
1091
+ if (remainder < 0) {
1092
+ var useHeight = height - remainder;
1093
+ $newEvent.css('height', useHeight < options.timeslotHeight ? options.timeslotHeight : useHeight);
1094
+ } else {
1095
+ $newEvent.css('height', height + (options.timeslotHeight - remainder));
1096
+ }
1097
+ }).mouseup(function() {
1098
+ $target.unbind('mousemove.newevent');
1099
+ $newEvent.addClass('ui-corner-all');
1100
+ });
1101
+ }
1102
+ }
1103
+
1104
+ }).mouseup(function(event) {
1105
+ var $target = $(event.target);
1106
+
1107
+ var $weekDay = $target.closest('.wc-day-column-inner');
1108
+ var $newEvent = $weekDay.find('.wc-new-cal-event-creating');
1109
+
1110
+ if ($newEvent.length) {
1111
+ var createdFromSingleClick = !$newEvent.hasClass('ui-resizable-resizing');
1112
+
1113
+ //if even created from a single click only, default height
1114
+ if (createdFromSingleClick) {
1115
+ $newEvent.css({height: options.timeslotHeight * options.defaultEventLength}).show();
1116
+ }
1117
+ var top = parseInt($newEvent.css('top'));
1118
+ var eventDuration = self._getEventDurationFromPositionedEventElement($weekDay, $newEvent, top);
1119
+
1120
+ $newEvent.remove();
1121
+ var newCalEvent = {start: eventDuration.start, end: eventDuration.end, title: options.newEventText};
1122
+ var showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length;
1123
+
1124
+ if (showAsSeparatedUser) {
1125
+ newCalEvent = self._setEventUserId(newCalEvent, $weekDay.data('wcUserId'));
1126
+ }
1127
+ else if (!options.showAsSeparateUsers && options.users && options.users.length == 1) {
1128
+ newCalEvent = self._setEventUserId(newCalEvent, self._getUserIdFromIndex(0));
1129
+ }
1130
+
1131
+ var freeBusyManager = self.getFreeBusyManagerForEvent(newCalEvent);
1132
+
1133
+ var $renderedCalEvent = self._renderEvent(newCalEvent, $weekDay);
1134
+
1135
+ if (!options.allowCalEventOverlap) {
1136
+ self._adjustForEventCollisions($weekDay, $renderedCalEvent, newCalEvent, newCalEvent);
1137
+ self._positionEvent($weekDay, $renderedCalEvent);
1138
+ } else {
1139
+ self._adjustOverlappingEvents($weekDay);
1140
+ }
1141
+
1142
+ var proceed = self._trigger('beforeEventNew', event, {
1143
+ 'calEvent': newCalEvent,
1144
+ 'createdFromSingleClick': createdFromSingleClick,
1145
+ 'calendar': self.element
1146
+ });
1147
+ if (proceed) {
1148
+ options.eventNew(newCalEvent, $renderedCalEvent, freeBusyManager, self.element, event);
1149
+ }
1150
+ else {
1151
+ $($renderedCalEvent).remove();
1152
+ }
1153
+ }
1154
+ });
1155
+ },
1156
+
1157
+ /*
1158
+ * load calendar events for the week based on the date provided
1159
+ */
1160
+ _loadCalEvents: function(dateWithinWeek) {
1161
+
1162
+ var date, weekStartDate, weekEndDate, $weekDayColumns;
1163
+ var self = this;
1164
+ var options = this.options;
1165
+ date = this._fixMinMaxDate(dateWithinWeek || options.date);
1166
+ // if date is not provided
1167
+ // or was not set
1168
+ // or is different than old one
1169
+ if ((!date || !date.getTime) ||
1170
+ (!options.date || !options.date.getTime) ||
1171
+ date.getTime() != options.date.getTime()
1172
+ ) {
1173
+ // trigger the changedate event
1174
+ this._trigger('changedate', this.element, date);
1175
+ }
1176
+ this.options.date = date;
1177
+ weekStartDate = self._dateFirstDayOfWeek(date);
1178
+ weekEndDate = self._dateLastMilliOfWeek(date);
1179
+
1180
+ options.calendarBeforeLoad(self.element);
1181
+
1182
+ self.element.data('startDate', weekStartDate);
1183
+ self.element.data('endDate', weekEndDate);
1184
+
1185
+ $weekDayColumns = self.element.find('.wc-day-column-inner');
1186
+
1187
+ self._updateDayColumnHeader($weekDayColumns);
1188
+
1189
+ //load events by chosen means
1190
+ if (typeof options.data == 'string') {
1191
+ if (options.loading) {
1192
+ options.loading(true);
1193
+ }
1194
+ if (_currentAjaxCall) {
1195
+ // first abort current request.
1196
+ if (!_jQuery14OrLower) {
1197
+ _currentAjaxCall.abort();
1198
+ } else {
1199
+ // due to the fact that jquery 1.4 does not detect a request was
1200
+ // aborted, we need to replace the onreadystatechange and
1201
+ // execute the "complete" callback.
1202
+ _currentAjaxCall.onreadystatechange = null;
1203
+ _currentAjaxCall.abort();
1204
+ _currentAjaxCall = null;
1205
+ if (options.loading) {
1206
+ options.loading(false);
1207
+ }
1208
+ }
1209
+ }
1210
+ var jsonOptions = self._getJsonOptions();
1211
+ jsonOptions[options.startParam || 'start'] = Math.round(weekStartDate.getTime() / 1000);
1212
+ jsonOptions[options.endParam || 'end'] = Math.round(weekEndDate.getTime() / 1000);
1213
+ _currentAjaxCall = $.ajax({
1214
+ url: options.data,
1215
+ data: jsonOptions,
1216
+ dataType: 'json',
1217
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
1218
+ // only prevent error with jQuery 1.5
1219
+ // see issue #34. thanks to dapplebeforedawn
1220
+ // (https://github.com/themouette/jquery-week-calendar/issues#issue/34)
1221
+ // for 1.5+, aborted request mean errorThrown == 'abort'
1222
+ // for prior version it means !errorThrown && !XMLHttpRequest.status
1223
+ // fixes #55
1224
+ if (errorThrown != 'abort' && XMLHttpRequest.status != 0) {
1225
+ alert('unable to get data, error:' + textStatus);
1226
+ }
1227
+ },
1228
+ success: function(data) {
1229
+ self._renderEvents(data, $weekDayColumns);
1230
+ },
1231
+ complete: function() {
1232
+ _currentAjaxCall = null;
1233
+ if (options.loading) {
1234
+ options.loading(false);
1235
+ }
1236
+ }
1237
+ });
1238
+ }
1239
+ else if ($.isFunction(options.data)) {
1240
+ options.data(weekStartDate, weekEndDate,
1241
+ function(data) {
1242
+ self._renderEvents(data, $weekDayColumns);
1243
+ if ($('.wc-hourline', self.element).length) {
1244
+ self._scrollToHour(new Date().getHours() + 1, true);
1245
+ } else {
1246
+ if (data.events.length) {
1247
+ self._scrollToHour(data.events[0].start.getHours() + 1, true);
1248
+ } else if (data.freebusys.length) {
1249
+ self._scrollToHour(data.freebusys[0].start.getHours() + 1, true);
1250
+ }
1251
+ }
1252
+ });
1253
+ }
1254
+ else if (options.data) {
1255
+ self._renderEvents(options.data, $weekDayColumns);
1256
+ }
1257
+
1258
+ self._disableTextSelect($weekDayColumns);
1259
+ },
1260
+
1261
+ /**
1262
+ * Draws a thin line which indicates the current time.
1263
+ */
1264
+ _drawCurrentHourLine: function() {
1265
+ var d = new Date(),
1266
+ options = this.options,
1267
+ businessHours = options.businessHours;
1268
+
1269
+ // first, we remove the old hourline if it exists
1270
+ $('.wc-hourline', this.element).remove();
1271
+
1272
+ // the line does not need to be displayed
1273
+ if (businessHours.limitDisplay && d.getHours() > businessHours.end) {
1274
+ return;
1275
+ }
1276
+
1277
+ // then we recreate it
1278
+ var paddingStart = businessHours.limitDisplay ? businessHours.start : 0;
1279
+ var nbHours = d.getHours() - paddingStart + d.getMinutes() / 60;
1280
+ var positionTop = nbHours * options.timeslotHeight * options.timeslotsPerHour;
1281
+ var lineWidth = $('.wc-scrollable-grid .wc-today', this.element).width() + 3;
1282
+
1283
+ $('.wc-scrollable-grid .wc-today', this.element).append(
1284
+ $('<div>', {
1285
+ 'class': 'wc-hourline',
1286
+ style: 'top: ' + positionTop + 'px; width: ' + lineWidth + 'px'
1287
+ })
1288
+ );
1289
+ },
1290
+
1291
+ /*
1292
+ * update the display of each day column header based on the calendar week
1293
+ */
1294
+ _updateDayColumnHeader: function($weekDayColumns) {
1295
+ var self = this;
1296
+ var options = this.options;
1297
+ var currentDay = self._cloneDate(self.element.data('startDate'));
1298
+ var showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length;
1299
+ var todayClass = 'ui-state-active wc-today';
1300
+
1301
+ self.element.find('.wc-header td.wc-day-column-header').each(function(i, val) {
1302
+ $(this).html(self._getHeaderDate(currentDay));
1303
+ if (self._isToday(currentDay)) {
1304
+ $(this).addClass(todayClass);
1305
+ } else {
1306
+ $(this).removeClass(todayClass);
1307
+ }
1308
+ currentDay = self._addDays(currentDay, 1);
1309
+
1310
+ });
1311
+
1312
+ currentDay = self._cloneDate(self.element.data('startDate'));
1313
+ if (showAsSeparatedUser)
1314
+ {
1315
+ self.element.find('.wc-header td.wc-user-header').each(function(i, val) {
1316
+ if (self._isToday(currentDay)) {
1317
+ $(this).addClass(todayClass);
1318
+ } else {
1319
+ $(this).removeClass(todayClass);
1320
+ }
1321
+ currentDay = ((i + 1) % options.users.length) ? currentDay : self._addDays(currentDay, 1);
1322
+ });
1323
+ }
1324
+
1325
+ currentDay = self._cloneDate(self.element.data('startDate'));
1326
+
1327
+ $weekDayColumns.each(function(i, val) {
1328
+
1329
+ $(this).data('startDate', self._cloneDate(currentDay));
1330
+ $(this).data('endDate', new Date(currentDay.getTime() + (MILLIS_IN_DAY)));
1331
+ if (self._isToday(currentDay)) {
1332
+ $(this).parent()
1333
+ .addClass(todayClass)
1334
+ .removeClass('ui-state-default');
1335
+ } else {
1336
+ $(this).parent()
1337
+ .removeClass(todayClass)
1338
+ .addClass('ui-state-default');
1339
+ }
1340
+
1341
+ if (!showAsSeparatedUser || !((i + 1) % options.users.length)) {
1342
+ currentDay = self._addDays(currentDay, 1);
1343
+ }
1344
+ });
1345
+
1346
+ //now update the freeBusy placeholders
1347
+ if (options.displayFreeBusys) {
1348
+ currentDay = self._cloneDate(self.element.data('startDate'));
1349
+ self.element.find('.wc-grid-row-freebusy .wc-column-freebusy').each(function(i, val) {
1350
+ $(this).data('startDate', self._cloneDate(currentDay));
1351
+ $(this).data('endDate', new Date(currentDay.getTime() + (MILLIS_IN_DAY)));
1352
+ if (!showAsSeparatedUser || !((i + 1) % options.users.length)) {
1353
+ currentDay = self._addDays(currentDay, 1);
1354
+ }
1355
+ });
1356
+ }
1357
+
1358
+ // now update the calendar title
1359
+ if (this.options.title) {
1360
+ var date = this.options.date,
1361
+ start = self._cloneDate(self.element.data('startDate')),
1362
+ end = self._dateLastDayOfWeek(new Date(this._cloneDate(self.element.data('endDate')).getTime() - (MILLIS_IN_DAY))),
1363
+ title = this._getCalendarTitle(),
1364
+ date_format = options.dateFormat;
1365
+
1366
+ // replace the placeholders contained in the title
1367
+ title = title.replace('%start%', self._formatDate(start, date_format));
1368
+ title = title.replace('%end%', self._formatDate(end, date_format));
1369
+ title = title.replace('%date%', self._formatDate(date, date_format));
1370
+
1371
+ $('.wc-toolbar .wc-title', self.element).html(title);
1372
+ }
1373
+ //self._clearFreeBusys();
1374
+ },
1375
+
1376
+ /**
1377
+ * Gets the calendar raw title.
1378
+ */
1379
+ _getCalendarTitle: function() {
1380
+ if ($.isFunction(this.options.title)) {
1381
+ return this.options.title(this.options.daysToShow);
1382
+ }
1383
+
1384
+ return this.options.title || '';
1385
+ },
1386
+
1387
+ /**
1388
+ * Render the events into the calendar
1389
+ */
1390
+ _renderEvents: function(data, $weekDayColumns) {
1391
+ var self = this;
1392
+ var options = this.options;
1393
+ var eventsToRender, nbRenderedEvents = 0;
1394
+
1395
+ if (data.options) {
1396
+ var updateLayout = false;
1397
+ // update options
1398
+ $.each(data.options, function(key, value) {
1399
+ if (value !== options[key]) {
1400
+ options[key] = value;
1401
+ updateLayout = updateLayout || $.ui.weekCalendar.updateLayoutOptions[key];
1402
+ }
1403
+ });
1404
+
1405
+ self._computeOptions();
1406
+
1407
+ if (updateLayout) {
1408
+ var hour = self._getCurrentScrollHour();
1409
+ self.element.empty();
1410
+ self._renderCalendar();
1411
+ $weekDayColumns = self.element.find('.wc-time-slots .wc-day-column-inner');
1412
+ self._updateDayColumnHeader($weekDayColumns);
1413
+ self._resizeCalendar();
1414
+ self._scrollToHour(hour, false);
1415
+ }
1416
+ }
1417
+ this._clearCalendar();
1418
+
1419
+ if ($.isArray(data)) {
1420
+ eventsToRender = self._cleanEvents(data);
1421
+ } else if (data.events) {
1422
+ eventsToRender = self._cleanEvents(data.events);
1423
+ self._renderFreeBusys(data);
1424
+ }
1425
+
1426
+ $.each(eventsToRender, function(i, calEvent) {
1427
+ // render a multi day event as various event :
1428
+ // thanks to http://github.com/fbeauchamp/jquery-week-calendar
1429
+ var initialStart = new Date(calEvent.start);
1430
+ var initialEnd = new Date(calEvent.end);
1431
+ var maxHour = self.options.businessHours.limitDisplay ? self.options.businessHours.end : 24;
1432
+ var minHour = self.options.businessHours.limitDisplay ? self.options.businessHours.start : 0;
1433
+ var start = new Date(initialStart);
1434
+ var startDate = self._formatDate(start, 'Ymd');
1435
+ var endDate = self._formatDate(initialEnd, 'Ymd');
1436
+ var $weekDay;
1437
+ var isMultiday = false;
1438
+
1439
+ while (startDate < endDate) {
1440
+ calEvent.start = start;
1441
+
1442
+ // end of this virual calEvent is set to the end of the day
1443
+ calEvent.end.setFullYear(start.getFullYear());
1444
+ calEvent.end.setDate(start.getDate());
1445
+ calEvent.end.setMonth(start.getMonth());
1446
+ calEvent.end.setHours(maxHour, 0, 0);
1447
+
1448
+ if (($weekDay = self._findWeekDayForEvent(calEvent, $weekDayColumns))) {
1449
+ self._renderEvent(calEvent, $weekDay);
1450
+ nbRenderedEvents += 1;
1451
+ }
1452
+
1453
+ // start is set to the begin of the new day
1454
+ start.setDate(start.getDate() + 1);
1455
+ start.setHours(minHour, 0, 0);
1456
+
1457
+ startDate = self._formatDate(start, 'Ymd');
1458
+ isMultiday = true;
1459
+ }
1460
+
1461
+ if (start <= initialEnd) {
1462
+ calEvent.start = start;
1463
+ calEvent.end = initialEnd;
1464
+
1465
+ if (((isMultiday && calEvent.start.getTime() != calEvent.end.getTime()) || !isMultiday) && ($weekDay = self._findWeekDayForEvent(calEvent, $weekDayColumns))) {
1466
+ self._renderEvent(calEvent, $weekDay);
1467
+ nbRenderedEvents += 1;
1468
+ }
1469
+ }
1470
+
1471
+ // put back the initial start date
1472
+ calEvent.start = initialStart;
1473
+ });
1474
+
1475
+ $weekDayColumns.each(function() {
1476
+ self._adjustOverlappingEvents($(this));
1477
+ });
1478
+
1479
+ options.calendarAfterLoad(self.element);
1480
+
1481
+ _hourLineTimeout && clearInterval(_hourLineTimeout);
1482
+
1483
+ if (options.hourLine) {
1484
+ self._drawCurrentHourLine();
1485
+
1486
+ _hourLineTimeout = setInterval(function() {
1487
+ self._drawCurrentHourLine();
1488
+ }, 60 * 1000); // redraw the line each minute
1489
+ }
1490
+
1491
+ !nbRenderedEvents && options.noEvents();
1492
+ },
1493
+
1494
+ /*
1495
+ * Render a specific event into the day provided. Assumes correct
1496
+ * day for calEvent date
1497
+ */
1498
+ _renderEvent: function(calEvent, $weekDay) {
1499
+ var self = this;
1500
+ var options = this.options;
1501
+ if (calEvent.start.getTime() > calEvent.end.getTime()) {
1502
+ return; // can't render a negative height
1503
+ }
1504
+
1505
+ var eventClass, eventHtml, $calEventList, $modifiedEvent;
1506
+
1507
+ eventClass = calEvent.id ? 'wc-cal-event' : 'wc-cal-event wc-new-cal-event';
1508
+ eventHtml = '<div class=\"' + eventClass + ' ui-corner-all\">';
1509
+ eventHtml += '<div class=\"wc-time ui-corner-top\"></div>';
1510
+ eventHtml += '<div class=\"wc-title\"></div></div>';
1511
+
1512
+ $weekDay.each(function() {
1513
+ var $calEvent = $(eventHtml);
1514
+ $modifiedEvent = options.eventRender(calEvent, $calEvent);
1515
+ $calEvent = $modifiedEvent ? $modifiedEvent.appendTo($(this)) : $calEvent.appendTo($(this));
1516
+ $calEvent.css({lineHeight: (options.textSize + 2) + 'px', fontSize: options.textSize + 'px'});
1517
+
1518
+ self._refreshEventDetails(calEvent, $calEvent);
1519
+ self._positionEvent($(this), $calEvent);
1520
+
1521
+ //add to event list
1522
+ if ($calEventList) {
1523
+ $calEventList = $calEventList.add($calEvent);
1524
+ }
1525
+ else {
1526
+ $calEventList = $calEvent;
1527
+ }
1528
+ });
1529
+ $calEventList.show();
1530
+
1531
+ if (!options.readonly && options.resizable(calEvent, $calEventList)) {
1532
+ self._addResizableToCalEvent(calEvent, $calEventList, $weekDay);
1533
+ }
1534
+ if (!options.readonly && options.draggable(calEvent, $calEventList)) {
1535
+ self._addDraggableToCalEvent(calEvent, $calEventList);
1536
+ }
1537
+ options.eventAfterRender(calEvent, $calEventList);
1538
+
1539
+ return $calEventList;
1540
+
1541
+ },
1542
+ addEvent: function() {
1543
+ return this._renderEvent.apply(this, arguments);
1544
+ },
1545
+
1546
+ _adjustOverlappingEvents: function($weekDay) {
1547
+ var self = this;
1548
+ if (self.options.allowCalEventOverlap) {
1549
+ var groupsList = self._groupOverlappingEventElements($weekDay);
1550
+ $.each(groupsList, function() {
1551
+ var curGroups = this;
1552
+ $.each(curGroups, function(groupIndex) {
1553
+ var curGroup = this;
1554
+
1555
+ // do we want events to be displayed as overlapping
1556
+ if (self.options.overlapEventsSeparate) {
1557
+ var newWidth = self.options.totalEventsWidthPercentInOneColumn / curGroups.length;
1558
+ var newLeft = groupIndex * newWidth;
1559
+ } else {
1560
+ // TODO what happens when the group has more than 10 elements
1561
+ var newWidth = self.options.totalEventsWidthPercentInOneColumn - ((curGroups.length - 1) * 10);
1562
+ var newLeft = groupIndex * 10;
1563
+ }
1564
+ $.each(curGroup, function() {
1565
+ // bring mouseovered event to the front
1566
+ if (!self.options.overlapEventsSeparate) {
1567
+ $(this).bind('mouseover.z-index', function() {
1568
+ var $elem = $(this);
1569
+ $.each(curGroup, function() {
1570
+ $(this).css({'z-index': '1'});
1571
+ });
1572
+ $elem.css({'z-index': '3'});
1573
+ });
1574
+ }
1575
+ $(this).css({width: newWidth + '%', left: newLeft + '%', right: 0});
1576
+ });
1577
+ });
1578
+ });
1579
+ }
1580
+ },
1581
+
1582
+
1583
+ /*
1584
+ * Find groups of overlapping events
1585
+ */
1586
+ _groupOverlappingEventElements: function($weekDay) {
1587
+ var $events = $weekDay.find('.wc-cal-event:visible');
1588
+ var sortedEvents = $events.sort(function(a, b) {
1589
+ return $(a).data('calEvent').start.getTime() - $(b).data('calEvent').start.getTime();
1590
+ });
1591
+
1592
+ var lastEndTime = new Date(0, 0, 0);
1593
+ var groups = [];
1594
+ var curGroups = [];
1595
+ var $curEvent;
1596
+ $.each(sortedEvents, function() {
1597
+ $curEvent = $(this);
1598
+ //checks, if the current group list is not empty, if the overlapping is finished
1599
+ if (curGroups.length > 0) {
1600
+ if (lastEndTime.getTime() <= $curEvent.data('calEvent').start.getTime()) {
1601
+ //finishes the current group list by adding it to the resulting list of groups and cleans it
1602
+
1603
+ groups.push(curGroups);
1604
+ curGroups = [];
1605
+ }
1606
+ }
1607
+
1608
+ //finds the first group to fill with the event
1609
+ for (var groupIndex = 0; groupIndex < curGroups.length; groupIndex++) {
1610
+ if (curGroups[groupIndex].length > 0) {
1611
+ //checks if the event starts after the end of the last event of the group
1612
+ if (curGroups[groupIndex][curGroups[groupIndex].length - 1].data('calEvent').end.getTime() <= $curEvent.data('calEvent').start.getTime()) {
1613
+ curGroups[groupIndex].push($curEvent);
1614
+ if (lastEndTime.getTime() < $curEvent.data('calEvent').end.getTime()) {
1615
+ lastEndTime = $curEvent.data('calEvent').end;
1616
+ }
1617
+ return;
1618
+ }
1619
+ }
1620
+ }
1621
+ //if not found, creates a new group
1622
+ curGroups.push([$curEvent]);
1623
+ if (lastEndTime.getTime() < $curEvent.data('calEvent').end.getTime()) {
1624
+ lastEndTime = $curEvent.data('calEvent').end;
1625
+ }
1626
+ });
1627
+ //adds the last groups in result
1628
+ if (curGroups.length > 0) {
1629
+ groups.push(curGroups);
1630
+ }
1631
+ return groups;
1632
+ },
1633
+
1634
+
1635
+ /*
1636
+ * find the weekday in the current calendar that the calEvent falls within
1637
+ */
1638
+ _findWeekDayForEvent: function(calEvent, $weekDayColumns) {
1639
+
1640
+ var $weekDay,
1641
+ options = this.options,
1642
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
1643
+ user_ids = this._getEventUserId(calEvent);
1644
+
1645
+ if (!$.isArray(user_ids)) {
1646
+ user_ids = [user_ids];
1647
+ }
1648
+
1649
+ $weekDayColumns.each(function(index, curDay) {
1650
+ if ($(this).data('startDate').getTime() <= calEvent.start.getTime() &&
1651
+ $(this).data('endDate').getTime() >= calEvent.end.getTime() &&
1652
+ (!showAsSeparatedUser || $.inArray($(this).data('wcUserId'), user_ids) !== -1)
1653
+ ) {
1654
+ if ($weekDay) {
1655
+ $weekDay = $weekDay.add($(curDay));
1656
+ }
1657
+ else {
1658
+ $weekDay = $(curDay);
1659
+ }
1660
+ }
1661
+ });
1662
+
1663
+ return $weekDay;
1664
+ },
1665
+
1666
+ /*
1667
+ * update the events rendering in the calendar. Add if does not yet exist.
1668
+ */
1669
+ _updateEventInCalendar: function(calEvent) {
1670
+ var self = this;
1671
+ self._cleanEvent(calEvent);
1672
+
1673
+ if (calEvent.id) {
1674
+ self.element.find('.wc-cal-event').each(function() {
1675
+ if ($(this).data('calEvent').id === calEvent.id || $(this).hasClass('wc-new-cal-event')) {
1676
+ $(this).remove();
1677
+ // return false;
1678
+ }
1679
+ });
1680
+ }
1681
+
1682
+ var $weekDays = self._findWeekDayForEvent(calEvent, self.element.find('.wc-grid-row-events .wc-day-column-inner'));
1683
+ if ($weekDays) {
1684
+ $weekDays.each(function(index, weekDay) {
1685
+ var $weekDay = $(weekDay);
1686
+ var $calEvent = self._renderEvent(calEvent, $weekDay);
1687
+ self._adjustForEventCollisions($weekDay, $calEvent, calEvent, calEvent);
1688
+ // self._refreshEventDetails(calEvent, $calEvent);
1689
+ // self._positionEvent($weekDay, $calEvent);
1690
+ self._adjustOverlappingEvents($weekDay);
1691
+ });
1692
+ }
1693
+ },
1694
+
1695
+ /*
1696
+ * Position the event element within the weekday based on it's start / end dates.
1697
+ */
1698
+ _positionEvent: function($weekDay, $calEvent) {
1699
+ var options = this.options;
1700
+ var calEvent = $calEvent.data('calEvent');
1701
+ var pxPerMillis = $weekDay.height() / options.millisToDisplay;
1702
+ var firstHourDisplayed = options.businessHours.limitDisplay ? options.businessHours.start : 0;
1703
+ var startMillis = this._getDSTdayShift(calEvent.start).getTime() - this._getDSTdayShift(new Date(calEvent.start.getFullYear(), calEvent.start.getMonth(), calEvent.start.getDate(), firstHourDisplayed)).getTime();
1704
+ var eventMillis = this._getDSTdayShift(calEvent.end).getTime() - this._getDSTdayShift(calEvent.start).getTime();
1705
+ var pxTop = pxPerMillis * startMillis;
1706
+ var pxHeight = pxPerMillis * eventMillis;
1707
+ //var pxHeightFallback = pxPerMillis * (60 / options.timeslotsPerHour) * 60 * 1000;
1708
+ $calEvent.css({top: pxTop, height: pxHeight || (pxPerMillis * 3600000 / options.timeslotsPerHour)});
1709
+ },
1710
+
1711
+ /*
1712
+ * Determine the actual start and end times of a calevent based on it's
1713
+ * relative position within the weekday column and the starting hour of the
1714
+ * displayed calendar.
1715
+ */
1716
+ _getEventDurationFromPositionedEventElement: function($weekDay, $calEvent, top) {
1717
+ var options = this.options;
1718
+ var startOffsetMillis = options.businessHours.limitDisplay ? options.businessHours.start * 3600000 : 0;
1719
+ var start = new Date($weekDay.data('startDate').getTime() + startOffsetMillis + Math.round(top / options.timeslotHeight) * options.millisPerTimeslot);
1720
+ var end = new Date(start.getTime() + ($calEvent.height() / options.timeslotHeight) * options.millisPerTimeslot);
1721
+ return {start: this._getDSTdayShift(start, -1), end: this._getDSTdayShift(end, -1)};
1722
+ },
1723
+
1724
+ /*
1725
+ * If the calendar does not allow event overlap, adjust the start or end date if necessary to
1726
+ * avoid overlapping of events. Typically, shortens the resized / dropped event to it's max possible
1727
+ * duration based on the overlap. If no satisfactory adjustment can be made, the event is reverted to
1728
+ * it's original location.
1729
+ */
1730
+ _adjustForEventCollisions: function($weekDay, $calEvent, newCalEvent, oldCalEvent, maintainEventDuration) {
1731
+ var options = this.options;
1732
+
1733
+ if (options.allowCalEventOverlap) {
1734
+ return;
1735
+ }
1736
+ var adjustedStart, adjustedEnd;
1737
+ var self = this;
1738
+
1739
+ $weekDay.find('.wc-cal-event').not($calEvent).each(function() {
1740
+ var currentCalEvent = $(this).data('calEvent');
1741
+
1742
+ //has been dropped onto existing event overlapping the end time
1743
+ if (newCalEvent.start.getTime() < currentCalEvent.end.getTime() &&
1744
+ newCalEvent.end.getTime() >= currentCalEvent.end.getTime()) {
1745
+
1746
+ adjustedStart = currentCalEvent.end;
1747
+ }
1748
+
1749
+
1750
+ //has been dropped onto existing event overlapping the start time
1751
+ if (newCalEvent.end.getTime() > currentCalEvent.start.getTime() &&
1752
+ newCalEvent.start.getTime() <= currentCalEvent.start.getTime()) {
1753
+
1754
+ adjustedEnd = currentCalEvent.start;
1755
+ }
1756
+ //has been dropped inside existing event with same or larger duration
1757
+ if (oldCalEvent.resizable == false ||
1758
+ (newCalEvent.end.getTime() <= currentCalEvent.end.getTime() &&
1759
+ newCalEvent.start.getTime() >= currentCalEvent.start.getTime())) {
1760
+
1761
+ adjustedStart = oldCalEvent.start;
1762
+ adjustedEnd = oldCalEvent.end;
1763
+ return false;
1764
+ }
1765
+
1766
+ });
1767
+
1768
+
1769
+ newCalEvent.start = adjustedStart || newCalEvent.start;
1770
+
1771
+ if (adjustedStart && maintainEventDuration) {
1772
+ newCalEvent.end = new Date(adjustedStart.getTime() + (oldCalEvent.end.getTime() - oldCalEvent.start.getTime()));
1773
+ self._adjustForEventCollisions($weekDay, $calEvent, newCalEvent, oldCalEvent);
1774
+ } else {
1775
+ newCalEvent.end = adjustedEnd || newCalEvent.end;
1776
+ }
1777
+
1778
+
1779
+ //reset if new cal event has been forced to zero size
1780
+ if (newCalEvent.start.getTime() >= newCalEvent.end.getTime()) {
1781
+ newCalEvent.start = oldCalEvent.start;
1782
+ newCalEvent.end = oldCalEvent.end;
1783
+ }
1784
+
1785
+ $calEvent.data('calEvent', newCalEvent);
1786
+ },
1787
+
1788
+ /**
1789
+ * Add draggable capabilities to an event
1790
+ */
1791
+ _addDraggableToCalEvent: function(calEvent, $calEvent) {
1792
+ var options = this.options;
1793
+
1794
+ $calEvent.draggable({
1795
+ handle: '.wc-time',
1796
+ containment: 'div.wc-time-slots',
1797
+ snap: '.wc-day-column-inner',
1798
+ snapMode: 'inner',
1799
+ snapTolerance: options.timeslotHeight - 1,
1800
+ revert: 'invalid',
1801
+ opacity: 0.5,
1802
+ grid: [$calEvent.outerWidth() + 1, options.timeslotHeight],
1803
+ start: function(event, ui) {
1804
+ var $calEvent = ui.draggable || ui.helper;
1805
+ options.eventDrag(calEvent, $calEvent);
1806
+ }
1807
+ });
1808
+ },
1809
+
1810
+ /*
1811
+ * Add droppable capabilites to weekdays to allow dropping of calEvents only
1812
+ */
1813
+ _addDroppableToWeekDay: function($weekDay) {
1814
+ var self = this;
1815
+ var options = this.options;
1816
+ $weekDay.droppable({
1817
+ accept: '.wc-cal-event',
1818
+ drop: function(event, ui) {
1819
+ var $calEvent = ui.draggable;
1820
+ var top = Math.round(parseInt(ui.position.top));
1821
+ var eventDuration = self._getEventDurationFromPositionedEventElement($weekDay, $calEvent, top);
1822
+ var calEvent = $calEvent.data('calEvent');
1823
+ var newCalEvent = $.extend(true, {}, calEvent, {start: eventDuration.start, end: eventDuration.end});
1824
+ var showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length;
1825
+ if (showAsSeparatedUser) {
1826
+ // we may have dragged the event on column with a new user.
1827
+ // nice way to handle that is:
1828
+ // - get the newly dragged on user
1829
+ // - check if user is part of the event
1830
+ // - if yes, nothing changes, if not, find the old owner to remove it and add new one
1831
+ var newUserId = $weekDay.data('wcUserId');
1832
+ var userIdList = self._getEventUserId(calEvent);
1833
+ var oldUserId = $(ui.draggable.parents('.wc-day-column-inner').get(0)).data('wcUserId');
1834
+ if (!$.isArray(userIdList)) {
1835
+ userIdList = [userIdList];
1836
+ }
1837
+ if ($.inArray(newUserId, userIdList) == -1) {
1838
+ // remove old user
1839
+ var _index = $.inArray(oldUserId, userIdList);
1840
+ userIdList.splice(_index, 1);
1841
+ // add new user ?
1842
+ if ($.inArray(newUserId, userIdList) == -1) {
1843
+ userIdList.push(newUserId);
1844
+ }
1845
+ }
1846
+ newCalEvent = self._setEventUserId(newCalEvent, ((userIdList.length == 1) ? userIdList[0] : userIdList));
1847
+ }
1848
+ self._adjustForEventCollisions($weekDay, $calEvent, newCalEvent, calEvent, true);
1849
+ var $weekDayColumns = self.element.find('.wc-day-column-inner');
1850
+
1851
+ //trigger drop callback
1852
+ options.eventDrop(newCalEvent, calEvent, $calEvent);
1853
+
1854
+ var $newEvent = self._renderEvent(newCalEvent, self._findWeekDayForEvent(newCalEvent, $weekDayColumns));
1855
+ $calEvent.hide();
1856
+
1857
+ $calEvent.data('preventClick', true);
1858
+
1859
+ var $weekDayOld = self._findWeekDayForEvent($calEvent.data('calEvent'), self.element.find('.wc-time-slots .wc-day-column-inner'));
1860
+
1861
+ if ($weekDayOld.data('startDate') != $weekDay.data('startDate')) {
1862
+ self._adjustOverlappingEvents($weekDayOld);
1863
+ }
1864
+ self._adjustOverlappingEvents($weekDay);
1865
+
1866
+ setTimeout(function() {
1867
+ $calEvent.remove();
1868
+ }, 1000);
1869
+
1870
+ }
1871
+ });
1872
+ },
1873
+
1874
+ /*
1875
+ * Add resizable capabilities to a calEvent
1876
+ */
1877
+ _addResizableToCalEvent: function(calEvent, $calEvent, $weekDay) {
1878
+ var self = this;
1879
+ var options = this.options;
1880
+ $calEvent.resizable({
1881
+ grid: options.timeslotHeight,
1882
+ containment: $weekDay,
1883
+ handles: 's',
1884
+ minHeight: options.timeslotHeight,
1885
+ stop: function(event, ui) {
1886
+ var $calEvent = ui.element;
1887
+ var newEnd = new Date($calEvent.data('calEvent').start.getTime() + Math.max(1, Math.round(ui.size.height / options.timeslotHeight)) * options.millisPerTimeslot);
1888
+ if (self._needDSTdayShift($calEvent.data('calEvent').start, newEnd))
1889
+ newEnd = self._getDSTdayShift(newEnd, -1);
1890
+ var newCalEvent = $.extend(true, {}, calEvent, {start: calEvent.start, end: newEnd});
1891
+ self._adjustForEventCollisions($weekDay, $calEvent, newCalEvent, calEvent);
1892
+
1893
+ //trigger resize callback
1894
+ options.eventResize(newCalEvent, calEvent, $calEvent);
1895
+ self._refreshEventDetails(newCalEvent, $calEvent);
1896
+ self._positionEvent($weekDay, $calEvent);
1897
+ self._adjustOverlappingEvents($weekDay);
1898
+ $calEvent.data('preventClick', true);
1899
+ setTimeout(function() {
1900
+ $calEvent.removeData('preventClick');
1901
+ }, 500);
1902
+ }
1903
+ });
1904
+ $('.ui-resizable-handle', $calEvent).text('=');
1905
+ },
1906
+
1907
+ /*
1908
+ * Refresh the displayed details of a calEvent in the calendar
1909
+ */
1910
+ _refreshEventDetails: function(calEvent, $calEvent) {
1911
+ var prefix = '';
1912
+ if (!this.options.readonly &&
1913
+ this.options.allowEventDelete &&
1914
+ this.options.deletable(calEvent,$calEvent)) {
1915
+ prefix = '<div class="wc-cal-event-delete ui-icon ui-icon-close"></div>';
1916
+ }
1917
+ $calEvent.find('.wc-time').html(prefix + this.options.eventHeader(calEvent, this.element));
1918
+ $calEvent.find('.wc-title').html(this.options.eventBody(calEvent, this.element));
1919
+
1920
+ $calEvent.data('calEvent', calEvent);
1921
+ this.options.eventRefresh(calEvent, $calEvent);
1922
+ },
1923
+
1924
+ /*
1925
+ * Clear all cal events from the calendar
1926
+ */
1927
+ _clearCalendar: function() {
1928
+ this.element.find('.wc-day-column-inner div').remove();
1929
+ this._clearFreeBusys();
1930
+ },
1931
+
1932
+ /*
1933
+ * Scroll the calendar to a specific hour
1934
+ */
1935
+ _scrollToHour: function(hour, animate) {
1936
+ var self = this;
1937
+ var options = this.options;
1938
+ var $scrollable = this.element.find('.wc-scrollable-grid');
1939
+ var slot = hour;
1940
+ if (self.options.businessHours.limitDisplay) {
1941
+ if (hour <= self.options.businessHours.start) {
1942
+ slot = 0;
1943
+ } else if (hour >= self.options.businessHours.end) {
1944
+ slot = self.options.businessHours.end - self.options.businessHours.start - 1;
1945
+ } else {
1946
+ slot = hour - self.options.businessHours.start;
1947
+ }
1948
+ }
1949
+
1950
+ var $target = this.element.find('.wc-grid-timeslot-header .wc-hour-header:eq(' + slot + ')');
1951
+
1952
+ $scrollable.animate({scrollTop: 0}, 0, function() {
1953
+ var targetOffset = $target.offset().top;
1954
+ var scroll = targetOffset - $scrollable.offset().top - $target.outerHeight();
1955
+ if (animate) {
1956
+ $scrollable.animate({scrollTop: scroll}, options.scrollToHourMillis);
1957
+ }
1958
+ else {
1959
+ $scrollable.animate({scrollTop: scroll}, 0);
1960
+ }
1961
+ });
1962
+ },
1963
+
1964
+ /*
1965
+ * find the hour (12 hour day) for a given hour index
1966
+ */
1967
+ _hourForIndex: function(index) {
1968
+ if (index === 0) { //midnight
1969
+ return 12;
1970
+ } else if (index < 13) { //am
1971
+ return index;
1972
+ } else { //pm
1973
+ return index - 12;
1974
+ }
1975
+ },
1976
+
1977
+ _24HourForIndex: function(index) {
1978
+ if (index === 0) { //midnight
1979
+ return '00';
1980
+ } else if (index < 10) {
1981
+ return '0' + index;
1982
+ } else {
1983
+ return index;
1984
+ }
1985
+ },
1986
+
1987
+ _amOrPm: function(hourOfDay) {
1988
+ return hourOfDay < 12 ? BooklyL10n['AM'] : BooklyL10n['PM'];
1989
+ },
1990
+
1991
+ _isToday: function(date) {
1992
+ var clonedDate = this._cloneDate(date);
1993
+ this._clearTime(clonedDate);
1994
+ var today = new Date();
1995
+ this._clearTime(today);
1996
+ return today.getTime() === clonedDate.getTime();
1997
+ },
1998
+
1999
+ /*
2000
+ * Clean events to ensure correct format
2001
+ */
2002
+ _cleanEvents: function(events) {
2003
+ var self = this;
2004
+ $.each(events, function(i, event) {
2005
+ self._cleanEvent(event);
2006
+ });
2007
+ return events;
2008
+ },
2009
+
2010
+ /*
2011
+ * Clean specific event
2012
+ */
2013
+ _cleanEvent: function(event) {
2014
+ if (event.date) {
2015
+ event.start = event.date;
2016
+ }
2017
+ event.start = this._cleanDate(event.start);
2018
+ event.end = this._cleanDate(event.end);
2019
+ if (!event.end) {
2020
+ event.end = this._addDays(this._cloneDate(event.start), 1);
2021
+ }
2022
+ },
2023
+
2024
+ /*
2025
+ * Disable text selection of the elements in different browsers
2026
+ */
2027
+ _disableTextSelect: function($elements) {
2028
+ $elements.each(function() {
2029
+ if ($.browser.mozilla) {//Firefox
2030
+ $(this).css('MozUserSelect', 'none');
2031
+ } else if ($.browser.msie) {//IE
2032
+ $(this).bind('selectstart', function() {
2033
+ return false;
2034
+ });
2035
+ } else {//Opera, etc.
2036
+ $(this).mousedown(function() {
2037
+ return false;
2038
+ });
2039
+ }
2040
+ });
2041
+ },
2042
+
2043
+ /*
2044
+ * returns the date on the first millisecond of the week
2045
+ */
2046
+ _dateFirstDayOfWeek: function(date) {
2047
+ var self = this;
2048
+ var midnightCurrentDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
2049
+ var adjustedDate = new Date(midnightCurrentDate);
2050
+ adjustedDate.setDate(adjustedDate.getDate() - self._getAdjustedDayIndex(midnightCurrentDate));
2051
+
2052
+ return adjustedDate;
2053
+ },
2054
+
2055
+ /*
2056
+ * returns the date on the first millisecond of the last day of the week
2057
+ */
2058
+ _dateLastDayOfWeek: function(date) {
2059
+ var self = this;
2060
+ var midnightCurrentDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
2061
+ var adjustedDate = new Date(midnightCurrentDate);
2062
+ var daysToAdd = (self.options.daysToShow - 1 - self._getAdjustedDayIndex(midnightCurrentDate));
2063
+ adjustedDate.setDate(adjustedDate.getDate() + daysToAdd);
2064
+
2065
+ return adjustedDate;
2066
+ },
2067
+
2068
+ /**
2069
+ * fix the date if it is not within given options
2070
+ * minDate and maxDate
2071
+ */
2072
+ _fixMinMaxDate: function(date) {
2073
+ var minDate, maxDate;
2074
+ date = this._cleanDate(date);
2075
+
2076
+ // not less than minDate
2077
+ if (this.options.minDate) {
2078
+ minDate = this._cleanDate(this.options.minDate);
2079
+ // midnight on minDate
2080
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
2081
+ if (date.getTime() < minDate.getTime()) {
2082
+ this._trigger('reachedmindate', this.element, date);
2083
+ }
2084
+ date = this._cleanDate(Math.max(date.getTime(), minDate.getTime()));
2085
+ }
2086
+
2087
+ // not more than maxDate
2088
+ if (this.options.maxDate) {
2089
+ maxDate = this._cleanDate(this.options.maxDate);
2090
+ // apply correction for max date if not startOnFirstDayOfWeek
2091
+ // to make sure no further date is displayed.
2092
+ // otherwise, the complement will still be shown
2093
+ if (!this._startOnFirstDayOfWeek()) {
2094
+ var day = maxDate.getDate() - this.options.daysToShow + 1;
2095
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), day);
2096
+ }
2097
+ // microsecond before midnight on maxDate
2098
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
2099
+ if (date.getTime() > maxDate.getTime()) {
2100
+ this._trigger('reachedmaxdate', this.element, date);
2101
+ }
2102
+ date = this._cleanDate(Math.min(date.getTime(), maxDate.getTime()));
2103
+ }
2104
+
2105
+ return date;
2106
+ },
2107
+
2108
+ /*
2109
+ * gets the index of the current day adjusted based on options
2110
+ */
2111
+ _getAdjustedDayIndex: function(date) {
2112
+ if (!this._startOnFirstDayOfWeek()) {
2113
+ return 0;
2114
+ }
2115
+
2116
+ var midnightCurrentDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
2117
+ var currentDayOfStandardWeek = midnightCurrentDate.getDay();
2118
+ var days = [0, 1, 2, 3, 4, 5, 6];
2119
+ this._rotate(days, this._firstDayOfWeek());
2120
+ return days[currentDayOfStandardWeek];
2121
+ },
2122
+
2123
+ _firstDayOfWeek: function() {
2124
+ if ($.isFunction(this.options.firstDayOfWeek)) {
2125
+ return this.options.firstDayOfWeek(this.element);
2126
+ }
2127
+ return this.options.firstDayOfWeek;
2128
+ },
2129
+
2130
+ /*
2131
+ * returns the date on the last millisecond of the week
2132
+ */
2133
+ _dateLastMilliOfWeek: function(date) {
2134
+ var lastDayOfWeek = this._dateLastDayOfWeek(date);
2135
+ lastDayOfWeek = this._cloneDate(lastDayOfWeek);
2136
+ lastDayOfWeek.setDate(lastDayOfWeek.getDate() + 1);
2137
+ return lastDayOfWeek;
2138
+
2139
+ },
2140
+
2141
+ /*
2142
+ * Clear the time components of a date leaving the date
2143
+ * of the first milli of day
2144
+ */
2145
+ _clearTime: function(d) {
2146
+ d.setHours(0);
2147
+ d.setMinutes(0);
2148
+ d.setSeconds(0);
2149
+ d.setMilliseconds(0);
2150
+ return d;
2151
+ },
2152
+
2153
+ /*
2154
+ * add specific number of days to date
2155
+ */
2156
+ _addDays: function(d, n, keepTime) {
2157
+ d.setDate(d.getDate() + n);
2158
+ if (keepTime) {
2159
+ return d;
2160
+ }
2161
+ return this._clearTime(d);
2162
+ },
2163
+
2164
+ /*
2165
+ * Rotate an array by specified number of places.
2166
+ */
2167
+ _rotate: function(a /*array*/, p /* integer, positive integer rotate to the right, negative to the left... */) {
2168
+ for (var l = a.length, p = (Math.abs(p) >= l && (p %= l), p < 0 && (p += l), p), i, x; p; p = (Math.ceil(l / p) - 1) * p - l + (l = p)) {
2169
+ for (i = l; i > p; x = a[--i], a[i] = a[i - p], a[i - p] = x) {}
2170
+ }
2171
+ return a;
2172
+ },
2173
+
2174
+ _cloneDate: function(d) {
2175
+ return new Date(d.getTime());
2176
+ },
2177
+
2178
+ /**
2179
+ * Return a Date instance for different representations.
2180
+ * Valid representations are:
2181
+ * * timestamps
2182
+ * * Date objects
2183
+ * * textual representations (only these accepted by the Date
2184
+ * constructor)
2185
+ *
2186
+ * @return {Date} The clean date object.
2187
+ */
2188
+ _cleanDate: function(d) {
2189
+ if (typeof d === 'string') {
2190
+ // if is numeric
2191
+ if (!isNaN(Number(d))) {
2192
+ return this._cleanDate(parseInt(d, 10));
2193
+ }
2194
+
2195
+ // this is a human readable date
2196
+ return Date.parse(d) || new Date(d);
2197
+ }
2198
+
2199
+ if (typeof d == 'number') {
2200
+ return new Date(d);
2201
+ }
2202
+
2203
+ return d;
2204
+ },
2205
+
2206
+ /*
2207
+ * date formatting is adapted from
2208
+ * http://jacwright.com/projects/javascript/date_format
2209
+ */
2210
+ _formatDate: function(date, format) {
2211
+ var returnStr = '';
2212
+ for (var i = 0; i < format.length; i++) {
2213
+ var curChar = format.charAt(i);
2214
+ if (i != 0 && format.charAt(i - 1) == '\\') {
2215
+ returnStr += curChar;
2216
+ }
2217
+ else if (this._replaceChars[curChar]) {
2218
+ returnStr += this._replaceChars[curChar](date, this);
2219
+ } else if (curChar != '\\') {
2220
+ returnStr += curChar;
2221
+ }
2222
+ }
2223
+ return returnStr;
2224
+ },
2225
+
2226
+ _replaceChars: {
2227
+ // Day
2228
+ d: function(date) { return (date.getDate() < 10 ? '0' : '') + date.getDate(); },
2229
+ D: function(date, calendar) { return calendar.options.shortDays[date.getDay()]; },
2230
+ j: function(date) { return date.getDate(); },
2231
+ l: function(date, calendar) { return calendar.options.longDays[date.getDay()]; },
2232
+ N: function(date) { var _d = date.getDay(); return _d ? _d : 7; },
2233
+ S: function(date) { return (date.getDate() % 10 == 1 && date.getDate() != 11 ? 'st' : (date.getDate() % 10 == 2 && date.getDate() != 12 ? 'nd' : (date.getDate() % 10 == 3 && date.getDate() != 13 ? 'rd' : 'th'))); },
2234
+ w: function(date) { return date.getDay(); },
2235
+ z: function(date) { var d = new Date(date.getFullYear(), 0, 1); return Math.ceil((date - d) / 86400000); }, // Fixed now
2236
+ // Week
2237
+ W: function(date) { var d = new Date(date.getFullYear(), 0, 1); return Math.ceil((((date - d) / 86400000) + d.getDay() + 1) / 7); }, // Fixed now
2238
+ // Month
2239
+ F: function(date, calendar) { return calendar.options.longMonths[date.getMonth()]; },
2240
+ m: function(date) { return (date.getMonth() < 9 ? '0' : '') + (date.getMonth() + 1); },
2241
+ M: function(date, calendar) { return calendar.options.shortMonths[date.getMonth()]; },
2242
+ n: function(date) { return date.getMonth() + 1; },
2243
+ t: function(date) { var d = date; return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate() }, // Fixed now, gets #days of date
2244
+ // Year
2245
+ L: function(date) { var year = date.getFullYear(); return (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)); }, // Fixed now
2246
+ o: function(date) { var d = new Date(date.valueOf()); d.setDate(d.getDate() - ((date.getDay() + 6) % 7) + 3); return d.getFullYear();}, //Fixed now
2247
+ Y: function(date) { return date.getFullYear(); },
2248
+ y: function(date) { return ('' + date.getFullYear()).substr(2); },
2249
+ // Time
2250
+ a: function(date) { return date.getHours() < 12 ? BooklyL10n['AM'] : BooklyL10n['PM']; },
2251
+ A: function(date) { return date.getHours() < 12 ? BooklyL10n['AM'] : BooklyL10n['PM']; },
2252
+ B: function(date) { return Math.floor((((date.getUTCHours() + 1) % 24) + date.getUTCMinutes() / 60 + date.getUTCSeconds() / 3600) * 1000 / 24); }, // Fixed now
2253
+ g: function(date) { return date.getHours() % 12 || 12; },
2254
+ G: function(date) { return date.getHours(); },
2255
+ h: function(date) { return ((date.getHours() % 12 || 12) < 10 ? '0' : '') + (date.getHours() % 12 || 12); },
2256
+ H: function(date) { return (date.getHours() < 10 ? '0' : '') + date.getHours(); },
2257
+ i: function(date) { return (date.getMinutes() < 10 ? '0' : '') + date.getMinutes(); },
2258
+ s: function(date) { return (date.getSeconds() < 10 ? '0' : '') + date.getSeconds(); },
2259
+ u: function(date) { var m = date.getMilliseconds(); return (m < 10 ? '00' : (m < 100 ? '0' : '')) + m; },
2260
+ // Timezone
2261
+ e: function(date) { return 'Not Yet Supported'; },
2262
+ I: function(date) { return 'Not Yet Supported'; },
2263
+ O: function(date) { return (-date.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(date.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(date.getTimezoneOffset() / 60)) + '00'; },
2264
+ P: function(date) { return (-date.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(date.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(date.getTimezoneOffset() / 60)) + ':00'; }, // Fixed now
2265
+ T: function(date) { var m = date.getMonth(); date.setMonth(0); var result = date.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/, '$1'); date.setMonth(m); return result;},
2266
+ Z: function(date) { return -date.getTimezoneOffset() * 60; },
2267
+ // Full Date/Time
2268
+ c: function(date, calendar) { return calendar._formatDate(date, 'Y-m-d\\TH:i:sP'); }, // Fixed now
2269
+ r: function(date, calendar) { return calendar._formatDate(date, 'D, d M Y H:i:s O'); },
2270
+ U: function(date) { return date.getTime() / 1000; }
2271
+ },
2272
+
2273
+ /* USER MANAGEMENT FUNCTIONS */
2274
+
2275
+ getUserForId: function(id) {
2276
+ return $.extend({}, this.options.users[this._getUserIndexFromId(id)]);
2277
+ },
2278
+
2279
+ /**
2280
+ * return the user name for header
2281
+ */
2282
+ _getUserName: function(index) {
2283
+ var self = this;
2284
+ var options = this.options;
2285
+ var user = options.users[index];
2286
+ if ($.isFunction(options.getUserName)) {
2287
+ return options.getUserName(user, index, self.element);
2288
+ }
2289
+ else {
2290
+ return user;
2291
+ }
2292
+ },
2293
+ /**
2294
+ * return the user id for given index
2295
+ */
2296
+ _getUserIdFromIndex: function(index) {
2297
+ var self = this;
2298
+ var options = this.options;
2299
+ if ($.isFunction(options.getUserId)) {
2300
+ return options.getUserId(options.users[index], index, self.element);
2301
+ }
2302
+ return index;
2303
+ },
2304
+ /**
2305
+ * returns the associated user index for given ID
2306
+ */
2307
+ _getUserIndexFromId: function(id) {
2308
+ var self = this;
2309
+ var options = this.options;
2310
+ for (var i = 0; i < options.users.length; i++) {
2311
+ if (self._getUserIdFromIndex(i) == id) {
2312
+ return i;
2313
+ }
2314
+ }
2315
+ return 0;
2316
+ },
2317
+ /**
2318
+ * return the user ids for given calEvent.
2319
+ * default is calEvent.userId field.
2320
+ */
2321
+ _getEventUserId: function(calEvent) {
2322
+ var self = this;
2323
+ var options = this.options;
2324
+ if (options.showAsSeparateUsers && options.users && options.users.length) {
2325
+ if ($.isFunction(options.getEventUserId)) {
2326
+ return options.getEventUserId(calEvent, self.element);
2327
+ }
2328
+ return calEvent.userId;
2329
+ }
2330
+ return [];
2331
+ },
2332
+ /**
2333
+ * sets the event user id on given calEvent
2334
+ * default is calEvent.userId field.
2335
+ */
2336
+ _setEventUserId: function(calEvent, userId) {
2337
+ var self = this;
2338
+ var options = this.options;
2339
+ if ($.isFunction(options.setEventUserId)) {
2340
+ return options.setEventUserId(userId, calEvent, self.element);
2341
+ }
2342
+ calEvent.userId = userId;
2343
+ return calEvent;
2344
+ },
2345
+ /**
2346
+ * return the user ids for given freeBusy.
2347
+ * default is freeBusy.userId field.
2348
+ */
2349
+ _getFreeBusyUserId: function(freeBusy) {
2350
+ var self = this;
2351
+ var options = this.options;
2352
+ if ($.isFunction(options.getFreeBusyUserId)) {
2353
+ return options.getFreeBusyUserId(freeBusy.getOption(), self.element);
2354
+ }
2355
+ return freeBusy.getOption('userId');
2356
+ },
2357
+
2358
+ /* FREEBUSY MANAGEMENT */
2359
+
2360
+ /**
2361
+ * ckean the free busy managers and remove all the freeBusy
2362
+ */
2363
+ _clearFreeBusys: function() {
2364
+ if (this.options.displayFreeBusys) {
2365
+ var self = this,
2366
+ options = this.options,
2367
+ $freeBusyPlaceholders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy');
2368
+ $freeBusyPlaceholders.each(function() {
2369
+ $(this).data('wcFreeBusyManager', new FreeBusyManager({
2370
+ start: self._cloneDate($(this).data('startDate')),
2371
+ end: self._cloneDate($(this).data('endDate')),
2372
+ defaultFreeBusy: options.defaultFreeBusy || {}
2373
+ }));
2374
+ });
2375
+ self.element.find('.wc-grid-row-freebusy .wc-freebusy').remove();
2376
+ }
2377
+ },
2378
+ /**
2379
+ * retrieve placeholders for given freebusy
2380
+ */
2381
+ _findWeekDaysForFreeBusy: function(freeBusy, $weekDays) {
2382
+ var $returnWeekDays,
2383
+ options = this.options,
2384
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
2385
+ self = this,
2386
+ userList = self._getFreeBusyUserId(freeBusy);
2387
+ if (!$.isArray(userList)) {
2388
+ userList = userList != 'undefined' ? [userList] : [];
2389
+ }
2390
+ if (!$weekDays) {
2391
+ $weekDays = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy');
2392
+ }
2393
+ $weekDays.each(function() {
2394
+ var manager = $(this).data('wcFreeBusyManager'),
2395
+ has_overlap = manager.isWithin(freeBusy.getStart()) ||
2396
+ manager.isWithin(freeBusy.getEnd()) ||
2397
+ freeBusy.isWithin(manager.getStart()) ||
2398
+ freeBusy.isWithin(manager.getEnd()),
2399
+ userId = $(this).data('wcUserId');
2400
+ if (has_overlap && (!showAsSeparatedUser || ($.inArray(userId, userList) != -1))) {
2401
+ $returnWeekDays = $returnWeekDays ? $returnWeekDays.add($(this)) : $(this);
2402
+ }
2403
+ });
2404
+ return $returnWeekDays;
2405
+ },
2406
+
2407
+ /**
2408
+ * used to render all freeBusys
2409
+ */
2410
+ _renderFreeBusys: function(freeBusys) {
2411
+ if (this.options.displayFreeBusys) {
2412
+ var self = this,
2413
+ $freeBusyPlaceholders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'),
2414
+ freebusysToRender;
2415
+ //insert freebusys to dedicated placeholders freebusy managers
2416
+ if ($.isArray(freeBusys)) {
2417
+ freebusysToRender = self._cleanFreeBusys(freeBusys);
2418
+ } else if (freeBusys.freebusys) {
2419
+ freebusysToRender = self._cleanFreeBusys(freeBusys.freebusys);
2420
+ }
2421
+ else {
2422
+ freebusysToRender = [];
2423
+ }
2424
+
2425
+ $.each(freebusysToRender, function(index, freebusy) {
2426
+ var $placeholders = self._findWeekDaysForFreeBusy(freebusy, $freeBusyPlaceholders);
2427
+ if ($placeholders) {
2428
+ $placeholders.each(function() {
2429
+ var manager = $(this).data('wcFreeBusyManager');
2430
+ manager.insertFreeBusy(new FreeBusy(freebusy.getOption()));
2431
+ $(this).data('wcFreeBusyManager', manager);
2432
+ });
2433
+ }
2434
+ });
2435
+
2436
+ //now display freebusys on place holders
2437
+ self._refreshFreeBusys($freeBusyPlaceholders);
2438
+ }
2439
+ },
2440
+ /**
2441
+ * refresh freebusys for given placeholders
2442
+ */
2443
+ _refreshFreeBusys: function($freeBusyPlaceholders) {
2444
+ if (this.options.displayFreeBusys && $freeBusyPlaceholders) {
2445
+ var self = this,
2446
+ options = this.options,
2447
+ start = (options.businessHours.limitDisplay ? options.businessHours.start : 0),
2448
+ end = (options.businessHours.limitDisplay ? options.businessHours.end : 24);
2449
+
2450
+ $freeBusyPlaceholders.each(function() {
2451
+ var $placehoder = $(this);
2452
+ var s = self._cloneDate($placehoder.data('startDate')),
2453
+ e = self._cloneDate(s);
2454
+ s.setHours(start);
2455
+ e.setHours(end);
2456
+ $placehoder.find('.wc-freebusy').remove();
2457
+ $.each($placehoder.data('wcFreeBusyManager').getFreeBusys(s, e), function() {
2458
+ self._renderFreeBusy(this, $placehoder);
2459
+ });
2460
+ });
2461
+ }
2462
+ },
2463
+ /**
2464
+ * render a freebusy item on dedicated placeholders
2465
+ */
2466
+ _renderFreeBusy: function(freeBusy, $freeBusyPlaceholder) {
2467
+ if (this.options.displayFreeBusys) {
2468
+ var self = this,
2469
+ options = this.options,
2470
+ freeBusyHtml = '<div class="wc-freebusy"></div>';
2471
+
2472
+ var $fb = $(freeBusyHtml);
2473
+ $fb.data('wcFreeBusy', new FreeBusy(freeBusy.getOption()));
2474
+ this._positionFreeBusy($freeBusyPlaceholder, $fb);
2475
+ $fb = options.freeBusyRender(freeBusy.getOption(), $fb, self.element);
2476
+ if ($fb) {
2477
+ $fb.appendTo($freeBusyPlaceholder);
2478
+ }
2479
+ }
2480
+ },
2481
+ /*
2482
+ * Position the freebusy element within the weekday based on it's start / end dates.
2483
+ */
2484
+ _positionFreeBusy: function($placeholder, $freeBusy) {
2485
+ var options = this.options;
2486
+ var freeBusy = $freeBusy.data('wcFreeBusy');
2487
+ var pxPerMillis = $placeholder.height() / options.millisToDisplay;
2488
+ var firstHourDisplayed = options.businessHours.limitDisplay ? options.businessHours.start : 0;
2489
+ var startMillis = freeBusy.getStart().getTime() - new Date(freeBusy.getStart().getFullYear(), freeBusy.getStart().getMonth(), freeBusy.getStart().getDate(), firstHourDisplayed).getTime();
2490
+ var eventMillis = freeBusy.getEnd().getTime() - freeBusy.getStart().getTime();
2491
+ var pxTop = pxPerMillis * startMillis;
2492
+ var pxHeight = pxPerMillis * eventMillis;
2493
+ $freeBusy.css({top: pxTop, height: pxHeight});
2494
+ },
2495
+ /*
2496
+ * Clean freebusys to ensure correct format
2497
+ */
2498
+ _cleanFreeBusys: function(freebusys) {
2499
+ var self = this,
2500
+ freeBusyToReturn = [];
2501
+ if (!$.isArray(freebusys)) {
2502
+ var freebusys = [freebusys];
2503
+ }
2504
+ $.each(freebusys, function(i, freebusy) {
2505
+ freeBusyToReturn.push(new FreeBusy(self._cleanFreeBusy(freebusy)));
2506
+ });
2507
+ return freeBusyToReturn;
2508
+ },
2509
+
2510
+ /*
2511
+ * Clean specific freebusy
2512
+ */
2513
+ _cleanFreeBusy: function(freebusy) {
2514
+ if (freebusy.date) {
2515
+ freebusy.start = freebusy.date;
2516
+ }
2517
+ freebusy.start = this._cleanDate(freebusy.start);
2518
+ freebusy.end = this._cleanDate(freebusy.end);
2519
+ return freebusy;
2520
+ },
2521
+
2522
+ /**
2523
+ * retrives the first freebusy manager matching demand.
2524
+ */
2525
+ getFreeBusyManagersFor: function(date, users) {
2526
+ var calEvent = {
2527
+ start: date,
2528
+ end: date
2529
+ };
2530
+ this._setEventUserId(calEvent, users);
2531
+ return this.getFreeBusyManagerForEvent(calEvent);
2532
+ },
2533
+ /**
2534
+ * retrives the first freebusy manager for given event.
2535
+ */
2536
+ getFreeBusyManagerForEvent: function(newCalEvent) {
2537
+ var self = this,
2538
+ options = this.options,
2539
+ freeBusyManager;
2540
+ if (options.displayFreeBusys) {
2541
+ var $freeBusyPlaceHoders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'),
2542
+ freeBusy = new FreeBusy({start: newCalEvent.start, end: newCalEvent.end}),
2543
+ showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length,
2544
+ userId = showAsSeparatedUser ? self._getEventUserId(newCalEvent) : null;
2545
+ if (!$.isArray(userId)) {
2546
+ userId = [userId];
2547
+ }
2548
+ $freeBusyPlaceHoders.each(function() {
2549
+ var manager = $(this).data('wcFreeBusyManager'),
2550
+ has_overlap = manager.isWithin(freeBusy.getEnd()) ||
2551
+ manager.isWithin(freeBusy.getEnd()) ||
2552
+ freeBusy.isWithin(manager.getStart()) ||
2553
+ freeBusy.isWithin(manager.getEnd());
2554
+ if (has_overlap && (!showAsSeparatedUser || $.inArray($(this).data('wcUserId'), userId) != -1)) {
2555
+ freeBusyManager = $(this).data('wcFreeBusyManager');
2556
+ return false;
2557
+ }
2558
+ });
2559
+ }
2560
+ return freeBusyManager;
2561
+ },
2562
+ /**
2563
+ * appends the freebusys to replace the old ones.
2564
+ * @param {array|object} freeBusys freebusy(s) to apply.
2565
+ */
2566
+ updateFreeBusy: function(freeBusys) {
2567
+ var self = this,
2568
+ options = this.options;
2569
+ if (options.displayFreeBusys) {
2570
+ var $toRender,
2571
+ $freeBusyPlaceHoders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'),
2572
+ _freeBusys = self._cleanFreeBusys(freeBusys);
2573
+
2574
+ $.each(_freeBusys, function(index, _freeBusy) {
2575
+
2576
+ var $weekdays = self._findWeekDaysForFreeBusy(_freeBusy, $freeBusyPlaceHoders);
2577
+ //if freebusy has a placeholder
2578
+ if ($weekdays && $weekdays.length) {
2579
+ $weekdays.each(function(index, day) {
2580
+ var manager = $(day).data('wcFreeBusyManager');
2581
+ manager.insertFreeBusy(_freeBusy);
2582
+ $(day).data('wcFreeBusyManager', manager);
2583
+ });
2584
+ $toRender = $toRender ? $toRender.add($weekdays) : $weekdays;
2585
+ }
2586
+ });
2587
+ self._refreshFreeBusys($toRender);
2588
+ }
2589
+ },
2590
+
2591
+ /* NEW OPTIONS MANAGEMENT */
2592
+
2593
+ /**
2594
+ * checks wether or not the calendar should be displayed starting on first day of week
2595
+ */
2596
+ _startOnFirstDayOfWeek: function() {
2597
+ return jQuery.isFunction(this.options.startOnFirstDayOfWeek) ? this.options.startOnFirstDayOfWeek(this.element) : this.options.startOnFirstDayOfWeek;
2598
+ },
2599
+
2600
+ /**
2601
+ * finds out the current scroll to apply it when changing the view
2602
+ */
2603
+ _getCurrentScrollHour: function() {
2604
+ var self = this;
2605
+ var options = this.options;
2606
+ var $scrollable = this.element.find('.wc-scrollable-grid');
2607
+ var scroll = $scrollable.scrollTop();
2608
+ if (self.options.businessHours.limitDisplay) {
2609
+ scroll = scroll + options.businessHours.start * options.timeslotHeight * options.timeslotsPerHour;
2610
+ }
2611
+ return Math.round(scroll / (options.timeslotHeight * options.timeslotsPerHour)) + 1;
2612
+ },
2613
+ _getJsonOptions: function() {
2614
+ if ($.isFunction(this.options.jsonOptions)) {
2615
+ return $.extend({}, this.options.jsonOptions(this.element));
2616
+ }
2617
+ if ($.isPlainObject(this.options.jsonOptions)) {
2618
+ return $.extend({}, this.options.jsonOptions);
2619
+ }
2620
+ return {};
2621
+ },
2622
+ _getHeaderDate: function(date) {
2623
+ var options = this.options;
2624
+ if (options.getHeaderDate && $.isFunction(options.getHeaderDate))
2625
+ {
2626
+ return options.getHeaderDate(date, this.element);
2627
+ }
2628
+ var dayName = options.useShortDayNames ? options.shortDays[date.getDay()] : options.longDays[date.getDay()];
2629
+ return dayName + (options.headerSeparator) + this._formatDate(date, options.dateFormat);
2630
+ },
2631
+
2632
+
2633
+
2634
+ /**
2635
+ * returns corrected date related to DST problem
2636
+ */
2637
+ _getDSTdayShift: function(date, shift) {
2638
+ var start = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0);
2639
+ var offset1 = start.getTimezoneOffset();
2640
+ var offset2 = date.getTimezoneOffset();
2641
+ if (offset1 == offset2)
2642
+ return date;
2643
+ shift = shift ? shift : 1;
2644
+ return new Date(date.getTime() - shift * (offset1 > offset2 ? -1 : 1) * (Math.max(offset1, offset2) - Math.min(offset1, offset2)) * 60000);
2645
+ },
2646
+ _needDSTdayShift: function(date1, date2) {
2647
+ return date1.getTimezoneOffset() != date2.getTimezoneOffset();
2648
+ }
2649
+
2650
+
2651
+
2652
+ }; // end of widget function return
2653
+ })() //end of widget function closure execution
2654
+ ); // end of $.widget("ui.weekCalendar"...
2655
+
2656
+ $.extend($.ui.weekCalendar, {
2657
+ version: '2.0-dev',
2658
+ updateLayoutOptions: {
2659
+ startOnFirstDayOfWeek: true,
2660
+ firstDayOfWeek: true,
2661
+ daysToShow: true,
2662
+ displayOddEven: true,
2663
+ timeFormat: true,
2664
+ dateFormat: true,
2665
+ use24Hour: true,
2666
+ useShortDayNames: true,
2667
+ businessHours: true,
2668
+ timeslotHeight: true,
2669
+ timeslotsPerHour: true,
2670
+ buttonText: true,
2671
+ height: true,
2672
+ shortMonths: true,
2673
+ longMonths: true,
2674
+ shortDays: true,
2675
+ longDays: true,
2676
+ textSize: true,
2677
+ users: true,
2678
+ showAsSeparateUsers: true,
2679
+ displayFreeBusys: true
2680
+ }
2681
+ });
2682
+
2683
+ var MILLIS_IN_DAY = 86400000;
2684
+ var MILLIS_IN_WEEK = MILLIS_IN_DAY * 7;
2685
+
2686
+ /* FREE BUSY MANAGERS */
2687
+ var FreeBusyProto = {
2688
+ getStart: function() {return this.getOption('start')},
2689
+ getEnd: function() {return this.getOption('end')},
2690
+ getOption: function() {
2691
+ if (!arguments.length) { return this.options }
2692
+ if (typeof(this.options[arguments[0]]) !== 'undefined') {
2693
+ return this.options[arguments[0]];
2694
+ }
2695
+ else if (typeof(arguments[1]) !== 'undefined') {
2696
+ return arguments[1];
2697
+ }
2698
+ return null;
2699
+ },
2700
+ setOption: function(key, value) {
2701
+ if (arguments.length == 1) {
2702
+ $.extend(this.options, arguments[0]);
2703
+ return this;
2704
+ }
2705
+ this.options[key] = value;
2706
+ return this;
2707
+ },
2708
+ isWithin: function(dateTime) {return Math.floor(dateTime.getTime() / 1000) >= Math.floor(this.getStart().getTime() / 1000) && Math.floor(dateTime.getTime() / 1000) <= Math.floor(this.getEnd().getTime() / 1000)},
2709
+ isValid: function() {return this.getStart().getTime() < this.getEnd().getTime()}
2710
+ };
2711
+
2712
+ /**
2713
+ * @constructor
2714
+ * single user freebusy manager.
2715
+ */
2716
+ var FreeBusy = function(options) {
2717
+ this.options = $.extend({}, options || {});
2718
+ };
2719
+ $.extend(FreeBusy.prototype, FreeBusyProto);
2720
+
2721
+ var FreeBusyManager = function(options) {
2722
+ this.options = $.extend({
2723
+ defaultFreeBusy: {}
2724
+ }, options || {});
2725
+ this.freeBusys = [];
2726
+ this.freeBusys.push(new FreeBusy($.extend({
2727
+ start: this.getStart(),
2728
+ end: this.getEnd()
2729
+ }, this.options.defaultFreeBusy)));
2730
+ };
2731
+ $.extend(FreeBusyManager.prototype, FreeBusyProto, {
2732
+ /**
2733
+ * return matching freeBusys.
2734
+ * if you do not pass any argument, returns all freebusys.
2735
+ * if you only pass a start date, only matchinf freebusy will be returned.
2736
+ * if you pass 2 arguments, then all freebusys available within the time period will be returned
2737
+ * @param {Date} start [optionnal] if you do not pass end date, will return the freeBusy within which this date falls.
2738
+ * @param {Date} end [optionnal] the date where to stop the search.
2739
+ * @return {Array} an array of FreeBusy matching arguments.
2740
+ */
2741
+ getFreeBusys: function() {
2742
+ switch (arguments.length) {
2743
+ case 0:
2744
+ return this.freeBusys;
2745
+ case 1:
2746
+ var freeBusy = [];
2747
+ var start = arguments[0];
2748
+ if (!this.isWithin(start)) {
2749
+ return freeBusy;
2750
+ }
2751
+ $.each(this.freeBusys, function() {
2752
+ if (this.isWithin(start)) {
2753
+ freeBusy.push(this);
2754
+ }
2755
+ if (Math.floor(this.getEnd().getTime() / 1000) > Math.floor(start.getTime() / 1000)) {
2756
+ return false;
2757
+ }
2758
+ });
2759
+ return freeBusy;
2760
+ default:
2761
+ //we assume only 2 first args are revealants
2762
+ var freeBusy = [];
2763
+ var start = arguments[0], end = arguments[1];
2764
+ var tmpFreeBusy = new FreeBusy({start: start, end: end});
2765
+ if (end.getTime() < start.getTime() || this.getStart().getTime() > end.getTime() || this.getEnd().getTime() < start.getTime()) {
2766
+ return freeBusy;
2767
+ }
2768
+ $.each(this.freeBusys, function() {
2769
+ if (this.getStart().getTime() >= end.getTime()) {
2770
+ return false;
2771
+ }
2772
+ if (tmpFreeBusy.isWithin(this.getStart()) && tmpFreeBusy.isWithin(this.getEnd())) {
2773
+ freeBusy.push(this);
2774
+ }
2775
+ else if (this.isWithin(tmpFreeBusy.getStart()) && this.isWithin(tmpFreeBusy.getEnd())) {
2776
+ var _f = new FreeBusy(this.getOption());
2777
+ _f.setOption('end', tmpFreeBusy.getEnd());
2778
+ _f.setOption('start', tmpFreeBusy.getStart());
2779
+ freeBusy.push(_f);
2780
+ }
2781
+ else if (this.isWithin(tmpFreeBusy.getStart()) && this.getStart().getTime() < start.getTime()) {
2782
+ var _f = new FreeBusy(this.getOption());
2783
+ _f.setOption('start', tmpFreeBusy.getStart());
2784
+ freeBusy.push(_f);
2785
+ }
2786
+ else if (this.isWithin(tmpFreeBusy.getEnd()) && this.getEnd().getTime() > end.getTime()) {
2787
+ var _f = new FreeBusy(this.getOption());
2788
+ _f.setOption('end', tmpFreeBusy.getEnd());
2789
+ freeBusy.push(_f);
2790
+ }
2791
+ });
2792
+ return freeBusy;
2793
+ }
2794
+ },
2795
+ insertFreeBusy: function(freeBusy) {
2796
+ var freeBusy = new FreeBusy(freeBusy.getOption());
2797
+ //first, if inserted freebusy is bigger than manager
2798
+ if (freeBusy.getStart().getTime() < this.getStart().getTime()) {
2799
+ freeBusy.setOption('start', this.getStart());
2800
+ }
2801
+ if (freeBusy.getEnd().getTime() > this.getEnd().getTime()) {
2802
+ freeBusy.setOption('end', this.getEnd());
2803
+ }
2804
+ var start = freeBusy.getStart(), end = freeBusy.getEnd(),
2805
+ startIndex = 0, endIndex = this.freeBusys.length - 1,
2806
+ newFreeBusys = [];
2807
+ var pushNewFreeBusy = function(_f) {if (_f.isValid()) newFreeBusys.push(_f);};
2808
+
2809
+ $.each(this.freeBusys, function(index) {
2810
+ //within the loop, we have following vars:
2811
+ // curFreeBusyItem: the current iteration freeBusy, part of manager freeBusys list
2812
+ // start: the insterted freeBusy start
2813
+ // end: the inserted freebusy end
2814
+ var curFreeBusyItem = this;
2815
+ if (curFreeBusyItem.isWithin(start) && curFreeBusyItem.isWithin(end)) {
2816
+ /*
2817
+ we are in case where inserted freebusy fits in curFreeBusyItem:
2818
+ curFreeBusyItem: *-----------------------------*
2819
+ freeBusy: *-------------*
2820
+ obviously, start and end indexes are this item.
2821
+ */
2822
+ startIndex = index;
2823
+ endIndex = index;
2824
+ if (start.getTime() == curFreeBusyItem.getStart().getTime() && end.getTime() == curFreeBusyItem.getEnd().getTime()) {
2825
+ /*
2826
+ in this case, inserted freebusy is exactly curFreeBusyItem:
2827
+ curFreeBusyItem: *-----------------------------*
2828
+ freeBusy: *-----------------------------*
2829
+
2830
+ just replace curFreeBusyItem with freeBusy.
2831
+ */
2832
+ var _f1 = new FreeBusy(freeBusy.getOption());
2833
+ pushNewFreeBusy(_f1);
2834
+ }
2835
+ else if (start.getTime() == curFreeBusyItem.getStart().getTime()) {
2836
+ /*
2837
+ in this case inserted freebusy starts with curFreeBusyItem:
2838
+ curFreeBusyItem: *-----------------------------*
2839
+ freeBusy: *--------------*
2840
+
2841
+ just replace curFreeBusyItem with freeBusy AND the rest.
2842
+ */
2843
+ var _f1 = new FreeBusy(freeBusy.getOption());
2844
+ var _f2 = new FreeBusy(curFreeBusyItem.getOption());
2845
+ _f2.setOption('start', end);
2846
+ pushNewFreeBusy(_f1);
2847
+ pushNewFreeBusy(_f2);
2848
+ }
2849
+ else if (end.getTime() == curFreeBusyItem.getEnd().getTime()) {
2850
+ /*
2851
+ in this case inserted freebusy ends with curFreeBusyItem:
2852
+ curFreeBusyItem: *-----------------------------*
2853
+ freeBusy: *--------------*
2854
+
2855
+ just replace curFreeBusyItem with before part AND freeBusy.
2856
+ */
2857
+ var _f1 = new FreeBusy(curFreeBusyItem.getOption());
2858
+ _f1.setOption('end', start);
2859
+ var _f2 = new FreeBusy(freeBusy.getOption());
2860
+ pushNewFreeBusy(_f1);
2861
+ pushNewFreeBusy(_f2);
2862
+ }
2863
+ else {
2864
+ /*
2865
+ in this case inserted freebusy is within curFreeBusyItem:
2866
+ curFreeBusyItem: *-----------------------------*
2867
+ freeBusy: *--------------*
2868
+
2869
+ just replace curFreeBusyItem with before part AND freeBusy AND the rest.
2870
+ */
2871
+ var _f1 = new FreeBusy(curFreeBusyItem.getOption());
2872
+ var _f2 = new FreeBusy(freeBusy.getOption());
2873
+ var _f3 = new FreeBusy(curFreeBusyItem.getOption());
2874
+ _f1.setOption('end', start);
2875
+ _f3.setOption('start', end);
2876
+ pushNewFreeBusy(_f1);
2877
+ pushNewFreeBusy(_f2);
2878
+ pushNewFreeBusy(_f3);
2879
+ }
2880
+ /*
2881
+ as work is done, no need to go further.
2882
+ return false
2883
+ */
2884
+ return false;
2885
+ }
2886
+ else if (curFreeBusyItem.isWithin(start) && curFreeBusyItem.getEnd().getTime() != start.getTime()) {
2887
+ /*
2888
+ in this case, inserted freebusy starts within curFreeBusyItem:
2889
+ curFreeBusyItem: *----------*
2890
+ freeBusy: *-------------------*
2891
+
2892
+ set start index AND insert before part, we'll insert freebusy later
2893
+ */
2894
+ if (curFreeBusyItem.getStart().getTime() != start.getTime()) {
2895
+ var _f1 = new FreeBusy(curFreeBusyItem.getOption());
2896
+ _f1.setOption('end', start);
2897
+ pushNewFreeBusy(_f1);
2898
+ }
2899
+ startIndex = index;
2900
+ }
2901
+ else if (curFreeBusyItem.isWithin(end) && curFreeBusyItem.getStart().getTime() != end.getTime()) {
2902
+ /*
2903
+ in this case, inserted freebusy starts within curFreeBusyItem:
2904
+ curFreeBusyItem: *----------*
2905
+ freeBusy: *-------------------*
2906
+
2907
+ set end index AND insert freebusy AND insert after part if needed
2908
+ */
2909
+ pushNewFreeBusy(new FreeBusy(freeBusy.getOption()));
2910
+ if (end.getTime() < curFreeBusyItem.getEnd().getTime()) {
2911
+ var _f1 = new FreeBusy(curFreeBusyItem.getOption());
2912
+ _f1.setOption('start', end);
2913
+ pushNewFreeBusy(_f1);
2914
+ }
2915
+ endIndex = index;
2916
+ return false;
2917
+ }
2918
+ });
2919
+ //now compute arguments
2920
+ var tmpFB = this.freeBusys;
2921
+ this.freeBusys = [];
2922
+
2923
+ if (startIndex) {
2924
+ this.freeBusys = this.freeBusys.concat(tmpFB.slice(0, startIndex));
2925
+ }
2926
+ this.freeBusys = this.freeBusys.concat(newFreeBusys);
2927
+ if (endIndex < tmpFB.length) {
2928
+ this.freeBusys = this.freeBusys.concat(tmpFB.slice(endIndex + 1));
2929
+ }
2930
+ /* if(start.getDate() == 1){
2931
+ console.info('insert from '+freeBusy.getStart() +' to '+freeBusy.getEnd());
2932
+ console.log('index from '+ startIndex + ' to ' + endIndex);
2933
+ var str = [];
2934
+ $.each(tmpFB, function(i){str.push(i + ": " + this.getStart().getHours() + ' > ' + this.getEnd().getHours() + ' ' + (this.getOption('free') ? 'free' : 'busy'))});
2935
+ console.log(str.join('\n'));
2936
+
2937
+ console.log('insert');
2938
+ var str = [];
2939
+ $.each(newFreeBusys, function(i){str.push(this.getStart().getHours() + ' > ' + this.getEnd().getHours())});
2940
+ console.log(str.join(', '));
2941
+
2942
+ console.log('results');
2943
+ var str = [];
2944
+ $.each(this.freeBusys, function(i){str.push(i + ": " + this.getStart().getHours() + ' > ' + this.getEnd().getHours() + ' ' + (this.getOption('free') ? 'free' :'busy'))});
2945
+ console.log(str.join('\n'));
2946
+ }*/
2947
+ return this;
2948
+ }
2949
+ });
2950
+
2951
+ })(jQuery);
backend/modules/calendar/resources/js/ng-app.js ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function() {
2
+
3
+ var module = angular.module('appointmentForm', ['ui', 'newCustomerDialog']);
4
+
5
+ /**
6
+ * DataSource service.
7
+ */
8
+ module.factory('dataSource', function($q, $rootScope, $filter) {
9
+ var ds = {
10
+ data : {
11
+ staff : [],
12
+ customers : [],
13
+ time : [],
14
+ time_interval : 900
15
+ },
16
+ form : {
17
+ id : null,
18
+ staff : null,
19
+ service : null,
20
+ date : null,
21
+ start_time : null,
22
+ end_time : null,
23
+ customer : null,
24
+ notes : null
25
+ },
26
+ loadData : function() {
27
+ var deferred = $q.defer();
28
+ jQuery.get(
29
+ ajaxurl,
30
+ { action : 'ab_get_data_for_appointment_form' },
31
+ function(data) {
32
+ ds.data = data;
33
+ if (data.staff.length) {
34
+ ds.form.staff = data.staff[0];
35
+ }
36
+ ds.form.start_time = data.time[0];
37
+ ds.form.end_time = data.time[1];
38
+ $rootScope.$apply(deferred.resolve);
39
+ },
40
+ 'json'
41
+ );
42
+ return deferred.promise;
43
+ },
44
+ findStaff : function(id) {
45
+ var result = null;
46
+ jQuery.each(ds.data.staff, function(key, item) {
47
+ if (item.id == id) {
48
+ result = item;
49
+ return false;
50
+ }
51
+ });
52
+ return result;
53
+ },
54
+ findService : function(staff_id, id) {
55
+ var result = null;
56
+ var staff = ds.findStaff(staff_id);
57
+ if (staff !== null) {
58
+ jQuery.each(staff.services, function(key, item) {
59
+ if (item.id == id) {
60
+ result = item;
61
+ return false;
62
+ }
63
+ });
64
+ }
65
+ return result;
66
+ },
67
+ findTime : function(date) {
68
+ var result = null;
69
+ var value_to_find = $filter('date')(date, 'HH:mm');
70
+ jQuery.each(ds.data.time, function(key, item) {
71
+ if (item.value === value_to_find) {
72
+ result = item;
73
+ return false;
74
+ }
75
+ });
76
+ return result;
77
+ },
78
+ findCustomer : function(id) {
79
+ var result = null;
80
+ jQuery.each(ds.data.customers, function(key, item) {
81
+ if (item.id == id) {
82
+ result = item;
83
+ return false;
84
+ }
85
+ });
86
+ return result;
87
+ },
88
+ getDataForEndTime : function() {
89
+ var result = [];
90
+ jQuery.each(ds.data.time, function(key, item) {
91
+ if (
92
+ ds.form.start_time === null ||
93
+ item.value > ds.form.start_time.value
94
+ ) {
95
+ result.push(item);
96
+ }
97
+ });
98
+ return result;
99
+ },
100
+ setEndTimeBasedOnService : function() {
101
+ var i = jQuery.inArray(ds.form.start_time, ds.data.time);
102
+ var d = ds.form.service ? ds.form.service.duration : ds.data.time_interval;
103
+ if (i !== -1) {
104
+ for (; i < ds.data.time.length; ++ i) {
105
+ d -= ds.data.time_interval;
106
+ if (d < 0) {
107
+ break;
108
+ }
109
+ }
110
+ ds.form.end_time = ds.data.time[i];
111
+ }
112
+ },
113
+ getStartAndEndDates : function() {
114
+ var date = $filter('date')(ds.form.date, 'yyyy-MM-dd');
115
+ return {
116
+ start_date : date + ' ' + ds.form.start_time.value,
117
+ end_date : date + ' ' + ds.form.end_time.value
118
+ };
119
+ }
120
+ };
121
+
122
+ return ds;
123
+ });
124
+
125
+ /**
126
+ * Controller for "create/edit appointment" dialog form.
127
+ */
128
+ module.controller('appointmentDialogCtrl', function($scope, $element, dataSource) {
129
+ // Set up initial data.
130
+ $scope.loading = true;
131
+ $scope.$week_calendar = null;
132
+ $scope.calendar_mode = 'week';
133
+ // Set up data source.
134
+ $scope.dataSource = dataSource;
135
+ $scope.form = dataSource.form; // shortcut
136
+ // Populate data source.
137
+ dataSource.loadData().then(function() {
138
+ $scope.loading = false;
139
+ });
140
+ // Error messages.
141
+ $scope.errors = {};
142
+ // Id of the staff whos events are currently being edited/created.
143
+ var current_staff_id = null;
144
+
145
+ /**
146
+ * Prepare the form for new event.
147
+ *
148
+ * @param Date start_date
149
+ */
150
+ $scope.configureNewForm = function(staff_id, start_date) {
151
+ jQuery.extend($scope.form, {
152
+ id : null,
153
+ staff : dataSource.findStaff(staff_id),
154
+ service : null,
155
+ date : start_date,
156
+ start_time : dataSource.findTime(start_date),
157
+ end_time : null,
158
+ customer : null,
159
+ notes : null
160
+ });
161
+ $scope.errors = {};
162
+ dataSource.setEndTimeBasedOnService();
163
+ current_staff_id = staff_id;
164
+ };
165
+
166
+ /**
167
+ * Prepare the form for editing event.
168
+ */
169
+ $scope.configureEditForm = function(appointment_id, staff_id, start_date, end_date) {
170
+ $scope.loading = true;
171
+ jQuery.post(
172
+ ajaxurl,
173
+ { action : 'ab_get_data_for_appointment', id : appointment_id },
174
+ function(response) {
175
+ $scope.$apply(function($scope) {
176
+ if (response.status === 'ok') {
177
+ jQuery.extend($scope.form, {
178
+ id : appointment_id,
179
+ staff : $scope.dataSource.findStaff(staff_id),
180
+ service : $scope.dataSource.findService(staff_id, response.data.service_id),
181
+ date : start_date,
182
+ start_time : $scope.dataSource.findTime(start_date),
183
+ end_time : $scope.dataSource.findTime(end_date),
184
+ customer : $scope.dataSource.findCustomer(response.data.customer_id),
185
+ notes : response.data.notes
186
+ });
187
+ }
188
+ $scope.loading = false;
189
+ });
190
+ },
191
+ 'json'
192
+ );
193
+ $scope.errors = {};
194
+ current_staff_id = staff_id;
195
+ };
196
+
197
+ var checkTimeInterval = function() {
198
+ var dates = $scope.dataSource.getStartAndEndDates();
199
+ jQuery.get(
200
+ ajaxurl,
201
+ {
202
+ action : 'ab_check_appointment_date_selection',
203
+ start_date : dates.start_date,
204
+ end_date : dates.end_date,
205
+ appointment_id : $scope.form.id,
206
+ staff_id : $scope.form.staff ? $scope.form.staff.id : null,
207
+ service_id : $scope.form.service ? $scope.form.service.id : null
208
+ },
209
+ function(response){
210
+ $scope.$apply(function($scope) {
211
+ $scope.errors = response;
212
+ });
213
+ },
214
+ 'json'
215
+ );
216
+ };
217
+
218
+ $scope.onServiceChange = function() {
219
+ $scope.dataSource.setEndTimeBasedOnService();
220
+ checkTimeInterval();
221
+ };
222
+
223
+ $scope.onStartTimeChange = function() {
224
+ $scope.dataSource.setEndTimeBasedOnService();
225
+ checkTimeInterval();
226
+ };
227
+
228
+ $scope.onEndTimeChange = function() {
229
+ checkTimeInterval();
230
+ };
231
+
232
+ $scope.processForm = function() {
233
+ $scope.loading = true;
234
+ var dates = $scope.dataSource.getStartAndEndDates();
235
+ jQuery.post(
236
+ ajaxurl,
237
+ {
238
+ action : 'ab_save_appointment_form',
239
+ id : $scope.form.id,
240
+ staff_id : $scope.form.staff ? $scope.form.staff.id : null,
241
+ service_id : $scope.form.service ? $scope.form.service.id : null,
242
+ start_date : dates.start_date,
243
+ end_date : dates.end_date,
244
+ customer_id : $scope.form.customer ? $scope.form.customer.id : null,
245
+ notes : $scope.form.notes
246
+ },
247
+ function (response) {
248
+ $scope.$apply(function($scope) {
249
+ if (response.status === 'ok') {
250
+ if ($scope.$week_calendar) {
251
+ if ($scope.calendar_mode === 'day' || current_staff_id === response.data.userId) {
252
+ // Update/create event in current calendar when:
253
+ // - current view mode is "day"
254
+ // OR
255
+ // - ID of event owner matches the ID of active staff ("week" mode)
256
+ $scope.$week_calendar.weekCalendar('updateEvent', response.data);
257
+ } else {
258
+ // Else switch to the event owner tab ("week" mode).
259
+ jQuery('li.ab-staff-tab-' + response.data.userId).click();
260
+ }
261
+ }
262
+ // Close the dialog.
263
+ $element.dialog('close');
264
+ } else {
265
+ $scope.errors = response.errors;
266
+ }
267
+ $scope.loading = false;
268
+ });
269
+ },
270
+ 'json'
271
+ );
272
+ };
273
+
274
+ // On 'Cancel' button click.
275
+ $scope.closeDialog = function() {
276
+ // Close the dialog.
277
+ $element.dialog('close');
278
+ };
279
+
280
+ $scope.createCustomer = function(customer) {
281
+ // Add new customer to the list.
282
+ n_customer = {id : customer.id, name : customer.name};
283
+ if (customer.email && customer.phone){
284
+ n_customer.name += ' (' + customer.email + ', ' + customer.phone + ')';
285
+ }else if(customer.phone){
286
+ n_customer.name += ' (' + customer.phone + ')';
287
+ }else if(customer.email){
288
+ n_customer.name += ' (' + customer.email + ')';
289
+ }
290
+
291
+ dataSource.data.customers.push(n_customer);
292
+ // Make it selected.
293
+ dataSource.form.customer = n_customer;
294
+ };
295
+
296
+ $scope.dateOptions = {
297
+ dateFormat : 'M, dd yy',
298
+ dayNamesMin : BooklyL10n['shortDays'],
299
+ monthNames : BooklyL10n['longMonths'],
300
+ monthNamesShort : BooklyL10n['shortMonths']
301
+ };
302
+ });
303
+
304
+ /**
305
+ * Directive for slide up/down.
306
+ */
307
+ module.directive('mySlideUp', function() {
308
+ return function(scope, element, attrs) {
309
+ element.hide();
310
+ // watch the expression, and update the UI on change.
311
+ scope.$watch(attrs.mySlideUp, function(value) {
312
+ if (value) {
313
+ element.delay(0).slideDown();
314
+ } else {
315
+ element.slideUp();
316
+ }
317
+ });
318
+ };
319
+ });
320
+
321
+ module.directive('chosen',function(){
322
+ var linker = function(scope,element,attrs) {
323
+ scope.$watch(attrs['chosen'], function() {
324
+ element.trigger("chosen:updated");
325
+ });
326
+
327
+ scope.$watch(attrs['ngModel'], function() {
328
+ element.trigger("chosen:updated");
329
+ });
330
+
331
+ element.chosen({
332
+ search_contains : true,
333
+ width : '400px'
334
+ });
335
+ };
336
+
337
+ return {
338
+ restrict:'A',
339
+ link: linker
340
+ }
341
+ });
342
+
343
+ /**
344
+ * Directive for Popover jQuery plugin.
345
+ */
346
+ module.directive('popover', function() {
347
+ return function(scope, element, attrs) {
348
+ element.popover({
349
+ trigger : 'hover',
350
+ content : attrs.popover,
351
+ html : true
352
+ });
353
+ };
354
+ });
355
+
356
+ })();
357
+
358
+ var showAppointmentDialog = function(appointment_id, staff_id, start_date, end_date, calendar, mode) {
359
+ var $scope = angular.element(document.getElementById('ab_appointment_dialog')).scope();
360
+ var title = null;
361
+ $scope.$apply(function($scope){
362
+ $scope.$week_calendar = calendar;
363
+ $scope.calendar_mode = mode;
364
+ if (appointment_id) {
365
+ $scope.configureEditForm(appointment_id, staff_id, start_date, end_date);
366
+ title = BooklyL10n['edit_appointment'];
367
+ } else {
368
+ $scope.configureNewForm(staff_id, start_date);
369
+ title = BooklyL10n['new_appointment'];
370
+ }
371
+ });
372
+ jQuery('#ab_appointment_dialog').dialog({
373
+ width: 700,
374
+ position: ['center', 150],
375
+ modal: true,
376
+ dialogClass: 'ab-appointment-popup',
377
+ title: title
378
+ });
379
+ };
backend/modules/calendar/templates/appointment_form.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div ng-controller=appointmentDialogCtrl id=ab_appointment_dialog style="display: none">
2
+
3
+ <div ng-hide=loading class=dialog-content>
4
+ <form ng-submit=processForm() class=form-horizontal>
5
+
6
+ <div class=control-group>
7
+ <label class=control-label><?php _e('Provider', 'ab') ?></label>
8
+ <div class=controls>
9
+ <select class="field" ng-model=form.staff ng-options="s.full_name for s in dataSource.data.staff"></select>
10
+ </div>
11
+ </div>
12
+
13
+ <div class=control-group>
14
+ <label class=control-label><?php _e('Service', 'ab') ?></label>
15
+ <div class=controls>
16
+ <select class="field" ng-model=form.service ng-options="s.title for s in form.staff.services" ng-change=onServiceChange()>
17
+ <option value=""><?php _e('-- Select a service --', 'ab') ?></option>
18
+ </select>
19
+ </div>
20
+ </div>
21
+
22
+ <div class=control-group>
23
+ <label class=control-label><?php _e('Date', 'ab') ?></label>
24
+ <div class=controls>
25
+ <input class="field" type=text ng-model=form.date ui-date="dateOptions" />
26
+ </div>
27
+ </div>
28
+
29
+ <div class=control-group>
30
+ <label class=control-label><?php _e('Period', 'ab') ?></label>
31
+ <div class=controls>
32
+ <div my-slide-up=errors.date_interval_not_available id=date_interval_not_available_msg>
33
+ <?php _e( 'The selected period is occupied by another appointment!', 'ab' ) ?>
34
+ </div>
35
+ <select class="field-col-2" ng-model=form.start_time ng-options="t.title for t in dataSource.data.time" ng-change=onStartTimeChange()></select>
36
+ <span><?php _e( ' to ', 'ab' ) ?></span>
37
+ <select class="field-col-2" ng-model=form.end_time ng-options="t.title for t in dataSource.getDataForEndTime()" ng-change=onEndTimeChange()></select>
38
+ <div my-slide-up=errors.date_interval_warning id=date_interval_warning_msg>
39
+ <?php _e( 'The selected period does\'t match default duration for the selected service!', 'ab' ) ?>
40
+ </div>
41
+ </div>
42
+ </div>
43
+
44
+ <div class=control-group>
45
+ <label class=control-label><?php _e('Customer', 'ab') ?></label>
46
+ <div class=controls>
47
+ <select class="field" data-placeholder="<?php _e('-- Select a customer --', 'ab') ?>" class="chzn-select" chosen="dataSource.data.customers"
48
+ ng-model="form.customer" ng-options="c.name for c in dataSource.data.customers">
49
+ </select>
50
+ <div new-customer-dialog=createCustomer(customer) backdrop=false btn-class=""></div>
51
+ </div>
52
+ </div>
53
+
54
+ <div class=control-group>
55
+ <label class=control-label><?php _e('Notes', 'ab') ?></label>
56
+ <div class=controls>
57
+ <textarea class="field" ng-model=form.notes></textarea>
58
+ </div>
59
+ </div>
60
+
61
+ <div class=control-group>
62
+ <label class=control-label></label>
63
+ <div class=controls>
64
+ <input style="margin-top: 0" type="checkbox" id="email_notification" /> <?php _e('Send email notifications', 'ab') ?>
65
+ <img
66
+ src="<?php echo plugins_url( 'resources/images/help.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>"
67
+ alt=""
68
+ class="ab-help-info"
69
+ popover="<?php echo esc_attr(__('If email notifications are enabled and you want the customer or the staff member to be notified about this appointment after saving, tick this checkbox before clicking Save.', 'ab')) ?>"
70
+ style="width:16px;margin-left:0;"
71
+ />
72
+ <div id="email_notification_text" style="display: none; margin-top: 10px;"><?php _e('This function is disabled in the light verison of Bookly. If you find the plugin useful for your business please consider buying a licence for the full version. It costs just $35 and for this money you will get many useful functions, lifetime free update and excellent support! More information can be found here'); ?>: <a href="http://bookly.ladela.com" target="_blank">http://bookly.ladela.com</a></div>
73
+ </div>
74
+ </div>
75
+
76
+ <div class=control-group>
77
+ <label class=control-label></label>
78
+ <div class=controls>
79
+ <div class=dialog-button-wrapper>
80
+ <input type=submit class="btn btn-info ab-update-button" value="<?php _e('Save') ?>" />
81
+ <a ng-click=closeDialog() class=ab-reset-form href=""><?php _e('Cancel') ?></a>
82
+ </div>
83
+ </div>
84
+ </div>
85
+
86
+ </form>
87
+ </div>
88
+
89
+ <div ng-show=loading class=loading-indicator>
90
+ <img src="<?php echo plugins_url('resources/images/ajax_loader_32x32.gif', dirname(__FILE__) . '/../../../AB_Backend.php') ?>" alt="" />
91
+ </div>
92
+
93
+ </div>
backend/modules/calendar/templates/calendar.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ // wp start day
4
+ $week_start_day = get_option('start_of_week', 1);
5
+ ?>
6
+ <div ng-app=appointmentForm class="wrap">
7
+ <div id="ab_calendar_header">
8
+ <h2><?php _e('Calendar', 'ab') ?></h2>
9
+ <div class="ab-nav-calendar">
10
+ <div class="btn-group right-margin left">
11
+ <button class="btn btn-info ab-calendar-switch-view ab-calendar-day"><?php _e('Day','ab') ?></button>
12
+ <button class="btn btn-info ab-calendar-switch-view ab-calendar-week ab-button-active"><?php _e('Week','ab') ?></button>
13
+ </div>
14
+ <button class="btn btn-info ab-calendar-today right-margin left"><?php _e('Today','ab') ?></button>
15
+ <div id="week-calendar-picker" class="ab-week-picker-wrapper left right-margin" data-first_day="<?php echo $week_start_day ?>">
16
+ <div class="input-prepend input-append">
17
+ <span class="ab-week-picker-arrow prev add-on col-arrow">&#9668;</span>
18
+ <input class="span2 ab-date-calendar" readonly="readonly" id="appendedPrependedInput" size="16" type="text" value="" />
19
+ <span class="ab-week-picker-arrow next add-on col-arrow">&#9658;</span>
20
+ </div>
21
+ <div class="ab-week-picker"></div>
22
+ </div>
23
+ <div id="day-calendar-picker" class="ab-week-picker-wrapper left right-margin" style="display: none;" data-first_day="<?php echo $week_start_day ?>">
24
+ <div class="pagination left">
25
+ <ul>
26
+ <li><a href="#" class="ab-week-picker-arrow-prev">&#9668;</a></li>
27
+ <li><a style="padding: 0" href="#"></a></li>
28
+ </ul>
29
+ </div>
30
+ <div class="input-append left" style="margin-right:-1px">
31
+ <input style="width:131px;margin-left:-2px;border-radius:0" class="span2" id="appendedInput" size="16" type="text" value="" /><span style="border-radius:0" class="add-on col-arrow">▼</span>
32
+ </div>
33
+ <div class="pagination left">
34
+ <ul>
35
+ <?php for ( $i = 1; $i <= 7; ++ $i ) : ?>
36
+ <li>
37
+ <a href="#" class="ab-day-of-month" <?php if ( 1 == $i ) : ?> style="border-radius:0"<?php endif; ?>></a>
38
+ </li>
39
+ <?php endfor; ?>
40
+ <li><a href="#" class="ab-week-picker-arrow-next">&#9658;</a></li>
41
+ </ul>
42
+ </div>
43
+ </div>
44
+ <!--div class="btn-group right right-margin">
45
+ <a class="btn btn-info" href="#"><i class="icon-user icon-white"></i><?php _e(' All services','ab') ?></a>
46
+ <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
47
+ <ul class="dropdown-menu">
48
+ <li>
49
+ <a href="javascript:void(0)">
50
+ <input style="margin-right: 5px;" type="checkbox" id="" class="all-staff left">
51
+ <label for=""><?php _e('All staff','ab') ?></label>
52
+ </a>
53
+ </li>
54
+ </ul>
55
+ </div-->
56
+ <div class="btn-group pull-right">
57
+ <a class="btn btn-info ab-staff-filter-button" href="javascript:void(0)">
58
+ <i class="icon-user icon-white"></i>
59
+ <span id="ab-staff-button">
60
+ <?php
61
+ $staff_numb = count($collection);
62
+ if ($staff_numb == 0) {
63
+ _e(' No staff selected','ab');
64
+ } else if ($staff_numb == 1) {
65
+ echo $collection[0]->full_name;
66
+ } else {
67
+ echo $staff_numb . ' '. __('staff members','ab');
68
+ }
69
+ ?>
70
+ </span>
71
+ </a>
72
+ <a class="btn btn-info dropdown-toggle ab-staff-filter-button" href="javascript:void(0)"><span class="caret"></span></a>
73
+ <ul class="dropdown-menu pull-right">
74
+ <li>
75
+ <a href="javascript:void(0)">
76
+ <input style="margin-right: 5px;" type="checkbox" checked="checked" id="ab-filter-all-staff" class="left">
77
+ <label for="ab-filter-all-staff"><?php _e('All staff','ab') ?></label>
78
+ </a>
79
+ <?php foreach ($collection as $staff) : ?>
80
+ <a style="padding-left: 35px;" href="javascript:void(0)">
81
+ <input style="margin-right: 5px;" type="checkbox" checked="checked" id="ab-filter-staff-<?php echo $staff->id ?>" value="<?php echo $staff->id ?>" class="ab-staff-option left">
82
+ <label style="padding-right: 15px;" for="ab-filter-staff-<?php echo $staff->id ?>"><?php echo $staff->full_name ?></label>
83
+ </a>
84
+ <?php endforeach ?>
85
+ </li>
86
+ </ul>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <?php if ( $collection ) : ?>
91
+ <?php
92
+ $user_names = array();
93
+ $user_ids = array();
94
+ ?>
95
+ <div id="week_calendar_wrapper">
96
+ <div class="tabbable" style="margin-top: 20px;">
97
+ <ul class="nav nav-tabs" style="margin-bottom:0;border-bottom: 6px solid #1f6a8c">
98
+ <?php foreach ($collection as $i => $staff) : ?>
99
+ <li class="ab-staff-tab-<?php echo $staff->id ?> ab-calendar-tab<?php echo 0 == $i ? ' active' : '' ?>" data-staff-id="<?php echo $staff->id ?>">
100
+ <a href="#" data-toggle="tab"><?php echo $staff->full_name ?></a>
101
+ </li>
102
+ <?php
103
+ $user_names[] = $staff->full_name;
104
+ $user_ids[] = $staff->id;
105
+ ?>
106
+ <?php endforeach ?>
107
+ </ul>
108
+ </div>
109
+ <div class="ab-calendar-element-container">
110
+ <div class="ab-calendar-element"></div>
111
+ </div>
112
+ </div>
113
+ <div id="day_calendar_wrapper" style="display: none">
114
+ <div class="ab-calendar-element-container">
115
+ <div class="ab-calendar-element"></div>
116
+ </div>
117
+ </div>
118
+ <?php include 'appointment_form.php' ?>
119
+ </div>
120
+ <span id="staff_ids" style="display: none"><?php echo json_encode($user_ids) ?></span>
121
+ <span id="ab_calendar_data_holder" style="display: none">
122
+ <span class="ab-calendar-first-day"><?php echo $week_start_day ?></span>
123
+ <span class="ab-calendar-time-format"><?php echo get_option( 'time_format' ) ?></span>
124
+ <span class="ab-calendar-users"><?php echo implode( '|', $user_names ) ?></span>
125
+ </span>
126
+ <?php endif; ?>
127
+ </div>
backend/modules/customer/AB_CustomerController.php ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include 'forms/AB_CustomerForm.php';
6
+
7
+ class AB_CustomerController extends AB_Controller {
8
+
9
+ public function index() {
10
+ if (count($this->getPost())){
11
+ $this->importCustomers();
12
+ }
13
+
14
+ $path = dirname( dirname(__FILE__) );
15
+
16
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', $path ) );
17
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', $path ) );
18
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', $path ), array( 'jquery' ) );
19
+ wp_enqueue_script( 'ab-angularjs', plugins_url( 'resources/js/angular-1.0.6.min.js', $path ) );
20
+ wp_enqueue_script( 'ab-angularui', plugins_url( 'resources/js/angular-ui-0.4.0.min.js', $path ) );
21
+ wp_enqueue_script( 'ab-ng-sanitize', plugins_url( 'resources/js/angular-sanitize-1.0.6.min.js', $path ) );
22
+ wp_enqueue_script( 'ab-ng-app', plugins_url( 'resources/js/ng-app.js', __FILE__ ), array( 'jquery', 'ab-angularjs', 'ab-angularui', 'ab-ng-sanitize' ) );
23
+ wp_enqueue_script( 'ab-ng-new_customer_dialog', plugins_url( 'resources/js/ng-new_customer_dialog.js', dirname(__FILE__) . '/../../AB_Backend.php' ), array( 'jquery', 'ab-angularjs' ) );
24
+
25
+ $this->render('index');
26
+ }
27
+
28
+ /**
29
+ * Get Amount of Payments via PayPal and Last and Total Appointments
30
+ *
31
+ * @param string $query
32
+ * @return mixed $query
33
+ */
34
+ public function getCustomerData( $query ) {
35
+ $wpdb = $this->getWpdb();
36
+ $query = $wpdb->get_results( $query );
37
+ if ( count( $query ) ) {
38
+ foreach( $query as $num => $customer_data ) {
39
+ // get Total Appointments
40
+ $query[ $num ]->total_appointments = $wpdb->get_var("
41
+ SELECT COUNT(a.id) as total_appointments
42
+ FROM ab_appointment a
43
+ WHERE a.customer_id = {$customer_data->id}
44
+ ");
45
+ // get Last Appointment
46
+ $query[ $num ]->last_appointment = $wpdb->get_var("
47
+ SELECT MAX(a.start_date) as last_appointment
48
+ FROM ab_appointment a
49
+ WHERE a.customer_id = {$customer_data->id}
50
+ ");
51
+ $query[ $num ]->last_appointment = AB_CommonUtils::getFormattedDateTime(
52
+ $query[ $num ]->last_appointment
53
+ );
54
+
55
+ $query[ $num ]->payments = 0;
56
+ }
57
+ }
58
+ return $query;
59
+ } // getCustomerData
60
+
61
+ /**
62
+ * Get list of customers.
63
+ */
64
+ public function executeGetCustomers() {
65
+ $response = array(
66
+ 'status' => 'ok',
67
+ 'data' => array(
68
+ 'customers' => array(),
69
+ 'total' => 0,
70
+ 'pages' => 0,
71
+ 'active_page' => 0,
72
+ )
73
+ );
74
+
75
+ $page = (int) ( $this->_post[ 'page' ] ? $this->_post[ 'page' ] : 1 );
76
+ $sort = in_array( $this->_post[ 'sort' ], array( 'name', 'phone', 'email' ) ) ? $this->_post[ 'sort' ] : 'name';
77
+ $order = in_array( $this->_post[ 'order' ], array( 'asc', 'desc' )) ? $this->_post[ 'order' ] : 'asc';
78
+ $filter = $this->_post[ 'filter' ] ? $this->_post[ 'filter' ] : '';
79
+
80
+ $items_per_page = 20;
81
+ $total = $this->getWpdb()->get_var( 'SELECT COUNT(*) FROM `ab_customer`' );
82
+ $pages = ceil( $total / $items_per_page );
83
+ if ( $page < 1 || $page > $pages ) {
84
+ $page = 1;
85
+ }
86
+
87
+ if ( $total ) {
88
+ $query = 'SELECT * FROM `ab_customer`';
89
+
90
+ // WHERE
91
+ if ( $filter !== '' ) {
92
+ $query .= " WHERE name LIKE '%{$filter}%' OR phone LIKE '%{$filter}%' OR email LIKE '%{$filter}%'";
93
+ }
94
+ // ORDER BY
95
+ $query .= " ORDER BY {$sort} {$order}";
96
+ // LIMIT
97
+ $start = ( $page - 1) * $items_per_page;
98
+ $query .= " LIMIT {$start}, {$items_per_page}";
99
+ $customer_data = self::getCustomerData( $query );
100
+ // Populate response.
101
+ $response[ 'data' ][ 'customers' ] = $customer_data;
102
+ $response[ 'data' ][ 'total' ] = $total;
103
+ $response[ 'data' ][ 'pages' ] = $pages;
104
+ $response[ 'data' ][ 'active_page' ] = $page;
105
+ }
106
+
107
+ echo json_encode( $response );
108
+ exit ( 0 );
109
+ }
110
+
111
+ /**
112
+ * Create or edit a customer.
113
+ */
114
+ public function executeSaveCustomer() {
115
+ $response = array();
116
+ $form = new AB_CustomerForm();
117
+
118
+ do {
119
+ if ( $this->_post[ 'name' ] !== '' ) {
120
+ $form->bind( $this->getPost() );
121
+ /** @var AB_Customer $customer */
122
+ $customer = $form->save();
123
+ if ( $customer ) {
124
+ $response[ 'status' ] = 'ok';
125
+ $response[ 'customer' ] = array(
126
+ 'id' => $customer->id,
127
+ 'name' => $customer->name,
128
+ 'phone' => $customer->phone,
129
+ 'email' => $customer->email,
130
+ 'notes' => $customer->notes,
131
+ 'jsonString' => json_encode( array(
132
+ 'name' => $customer->name,
133
+ 'phone' => $customer->phone,
134
+ 'email' => $customer->email,
135
+ 'notes' => $customer->notes
136
+ ) )
137
+ );
138
+ break;
139
+ }
140
+ }
141
+ $response[ 'status' ] = 'error';
142
+ $response[ 'errors' ] = array( 'name' => array( 'required' ) );
143
+ } while ( 0 );
144
+
145
+ echo json_encode( $response );
146
+ exit ( 0 );
147
+ }
148
+
149
+ /**
150
+ * Import customers from CSV.
151
+ */
152
+ private function importCustomers() {
153
+ $csv_mimetypes = array(
154
+ 'text/csv',
155
+ 'application/csv',
156
+ 'text/comma-separated-values',
157
+ 'application/excel',
158
+ 'application/vnd.ms-excel',
159
+ 'application/vnd.msexcel'
160
+ );
161
+
162
+ if (in_array($this->_files['importCustomers']['type'], $csv_mimetypes)) {
163
+ $file = fopen($this->_files['importCustomers']['tmp_name'], "r");
164
+ while ($line = fgetcsv($file)){
165
+ if (!empty($line[0])){
166
+ $customer = new AB_Customer();
167
+ $customer->set('name', $line[0]);
168
+ if (isset($line[1])){
169
+ $customer->set('phone', $line[1]);
170
+ }
171
+ if (isset($line[2])){
172
+ $customer->set('email', $line[2]);
173
+ }
174
+ $customer->save();
175
+ }
176
+ }
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Get angulars template for new customer dialog.
182
+ */
183
+ public function executeGetNgNewCustomerDialogTemplate() {
184
+ $this->render( 'ng-new_customer_dialog' );
185
+ exit ( 0 );
186
+ }
187
+
188
+ /**
189
+ * Delete a customer.
190
+ */
191
+ public function executeDeleteCustomer() {
192
+ if ( $this->_post[ 'id' ] !== '' ) {
193
+ $this->getWpdb()->query($this->getWpdb()->prepare("DELETE FROM ab_customer WHERE id = %d",
194
+ $this->_post[ 'id' ]
195
+ ));
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Override parent method to add 'wp_ajax_ab_' prefix
201
+ * so current 'execute*' methods look nicer.
202
+ */
203
+ protected function registerWpActions( $prefix = '' ) {
204
+ parent::registerWpActions( 'wp_ajax_ab_' );
205
+ }
206
+ }
backend/modules/customer/forms/AB_CustomerForm.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include dirname(__FILE__) . '/../../../../lib/entities/AB_Customer.php';
6
+
7
+ /**
8
+ * Class AB_CustomerForm
9
+ */
10
+ class AB_CustomerForm extends AB_Form {
11
+
12
+ /**
13
+ * Constructor.
14
+ */
15
+ public function __construct() {
16
+ parent::$entity_class = 'AB_Customer';
17
+ parent::__construct();
18
+ }
19
+
20
+ public function configure() {
21
+ $this->setFields(array(
22
+ 'name',
23
+ 'phone',
24
+ 'email',
25
+ 'notes'
26
+ ));
27
+ }
28
+ }
backend/modules/customer/resources/js/ng-app.js ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function() {
2
+
3
+ var module = angular.module('customers', ['ui', 'newCustomerDialog', 'ngSanitize']);
4
+
5
+ module.factory('dataSource', function($q, $rootScope) {
6
+ var ds = {
7
+ customers : [],
8
+ total : 0,
9
+ pages : [],
10
+ form : {
11
+ new_customer : {
12
+ name : null,
13
+ phone : null,
14
+ email : null,
15
+ notes : null
16
+ }
17
+ },
18
+ loadData : function(params) {
19
+ var deferred = $q.defer();
20
+ jQuery.ajax({
21
+ url : ajaxurl,
22
+ type : 'POST',
23
+ data : jQuery.extend({ action : 'ab_get_customers' }, params),
24
+ dataType : 'json',
25
+ success : function(response) {
26
+ if (response.status === 'ok') {
27
+ ds.customers = response.data.customers;
28
+ ds.total = response.data.total;
29
+ ds.pages = [];
30
+ for (var i = 0; i < response.data.pages; ++ i) {
31
+ ds.pages.push({
32
+ number : i + 1,
33
+ active : response.data.active_page == i + 1
34
+ });
35
+ }
36
+ }
37
+ $rootScope.$apply(deferred.resolve);
38
+ },
39
+ error : function() {
40
+ ds.customers = [];
41
+ ds.total = 0;
42
+ $rootScope.$apply(deferred.resolve);
43
+ }
44
+ });
45
+ return deferred.promise;
46
+ }
47
+ };
48
+
49
+ return ds;
50
+ });
51
+
52
+ module.controller('customersCtrl', function($scope, dataSource) {
53
+ // Set up initial data.
54
+ var params = {
55
+ page : 1,
56
+ sort : 'name',
57
+ order : 'asc',
58
+ filter : ''
59
+ };
60
+ $scope.loading = true;
61
+ $scope.css_class = {
62
+ name : 'asc',
63
+ phone : '',
64
+ email : '',
65
+ notes : '',
66
+ last_appointment : '',
67
+ total_appointments : '',
68
+ payments : ''
69
+ };
70
+ // Set up data source (data will be loaded in reload function).
71
+ $scope.dataSource = dataSource;
72
+
73
+ $scope.reload = function( opt ) {
74
+ $scope.loading = true;
75
+ if (opt !== undefined) {
76
+ if (opt.sort !== undefined) {
77
+ if (params.sort === opt.sort) {
78
+ // Toggle order when sorting by the same field.
79
+ params.order = params.order === 'asc' ? 'desc' : 'asc';
80
+ } else {
81
+ params.order = 'asc';
82
+ }
83
+ $scope.css_class = {
84
+ name : '',
85
+ phone : '',
86
+ email : '',
87
+ notes : '',
88
+ last_appointment : '',
89
+ total_appointments : '',
90
+ payments : ''
91
+ };
92
+ $scope.css_class[opt.sort] = params.order;
93
+ }
94
+ jQuery.extend(params, opt);
95
+ }
96
+ dataSource.loadData(params).then(function() {
97
+ $scope.loading = false;
98
+ });
99
+ };
100
+
101
+ var filter_delay = null;
102
+ $scope.$watch('filter', function() {
103
+ if (filter_delay !== null) {
104
+ clearTimeout(filter_delay);
105
+ }
106
+ filter_delay = setTimeout(function() {
107
+ filter_delay = null;
108
+ $scope.$apply(function($scope) {
109
+ $scope.reload({filter: $scope.filter});
110
+ });
111
+ }, 400);
112
+ });
113
+
114
+ /**
115
+ * Edit customer.
116
+ *
117
+ * @param object customer
118
+ * @param object params
119
+ */
120
+ $scope.saveCustomer = function(customer, params) {
121
+ customer.edit_name = false;
122
+ customer.edit_phone = false;
123
+ customer.edit_email = false;
124
+ customer.edit_notes = false;
125
+ customer.errors = {};
126
+
127
+ $scope.loading = true;
128
+ jQuery.ajax({
129
+ url : ajaxurl,
130
+ type : 'POST',
131
+ data : {
132
+ action : 'ab_save_customer',
133
+ id : customer.id,
134
+ name : customer.name,
135
+ phone : customer.phone,
136
+ email : customer.email,
137
+ notes : customer.notes
138
+ },
139
+ dataType : 'json',
140
+ success : function(response) {
141
+ $scope.$apply(function($scope) {
142
+ if (response.status === 'error') {
143
+ jQuery.each(response.errors, function(field, errors) {
144
+ customer.errors[field] = {};
145
+ customer['edit_' + field] = true;
146
+ jQuery.each(errors, function(key, error) {
147
+ customer.errors[field][error] = true;
148
+ });
149
+ });
150
+ }
151
+ $scope.loading = false;
152
+ });
153
+ },
154
+ error : function(response) {
155
+ $scope.$apply(function($scope) {
156
+ $scope.loading = false;
157
+ });
158
+ }
159
+ });
160
+ };
161
+
162
+ /**
163
+ * Callback for creating new customer.
164
+ *
165
+ * @param object customer
166
+ */
167
+ $scope.createCustomer = function(customer) {
168
+ dataSource.customers.push(customer);
169
+ $scope.reload(params.page);
170
+ };
171
+
172
+ /**
173
+ * Delete customer.
174
+ *
175
+ * @param customer
176
+ */
177
+ $scope.deleteCustomer = function(customer) {
178
+ if (confirm('Are you sure ?')) {
179
+ jQuery.ajax({
180
+ url : ajaxurl,
181
+ type : 'POST',
182
+ data : {
183
+ action : 'ab_delete_customer',
184
+ id : customer.id
185
+ },
186
+ dataType : 'json',
187
+ success : function(response) {
188
+ $scope.$apply(function($scope) {
189
+ jQuery.each(dataSource.customers, function(index, value) {
190
+ if(value.id == customer.id) {
191
+ dataSource.customers.splice(index, 1);
192
+ $scope.reload(params.page);
193
+ return false;
194
+ }
195
+ });
196
+ });
197
+ }
198
+ });
199
+ }
200
+ };
201
+ });
202
+
203
+ /**
204
+ * Directive for setting focus to element.
205
+ */
206
+ module.directive('focusMe', function($timeout) {
207
+ return {
208
+ link: function(scope, element, attrs) {
209
+ scope.$watch(attrs.focusMe, function(value) {
210
+ if (value) {
211
+ $timeout(function() {
212
+ element[0].focus();
213
+ });
214
+ }
215
+ });
216
+ }
217
+ };
218
+ });
219
+
220
+ module.filter('nl2br', function() {
221
+ return function(input) {
222
+ return ('' + input).split('\n').join('<br>');
223
+ };
224
+ });
225
+
226
+ })();
backend/modules/customer/templates/index.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ab-title"><?php _e( 'Customers', 'ab' ); ?></div>
2
+ <div ng-app=customers ng-controller=customersCtrl style="min-width: 800px;" class="form-horizontal ng-cloak">
3
+
4
+ <div class="control-group left">
5
+ <label class=control-label><?php _e( 'Quick search customer', 'ab' ) ?></label>
6
+ <div class=controls>
7
+ <input type=text ng-model=filter />
8
+ </div>
9
+ </div>
10
+
11
+ <div style="margin-left: 50%;">
12
+ <div style="display: inline;" new-customer-dialog=createCustomer(customer) backdrop=true btn-class="btn btn-info"></div>
13
+ <div style="display: inline;" btn-class="btn btn-info">
14
+ <a href=#ab_import_customers_dialog class="btn btn-info" data-toggle=modal><?php _e( 'Import' , 'ab' ) ?></a>
15
+ <div id=ab_import_customers_dialog class="modal hide fade" tabindex=-1 role=dialog aria-labelledby=myModalLabel aria-hidden=true>
16
+ <div class=dialog-content>
17
+ <form class=form-horizontal enctype="multipart/form-data" action="?page=ab-system-customers" method="POST">
18
+ <div class=modal-header>
19
+ <button type=button class=close data-dismiss=modal aria-hidden=true>×</button>
20
+ <h3 id=myModalLabel><?php _e( 'Import', 'ab' ) ?></h3>
21
+ </div>
22
+ <div class=modal-body>
23
+ <div class=control-group>
24
+ <label class=control-label>Note: </label>
25
+ <div class=controls>
26
+ You may import list of clients in CSV format. The file needs to have three columns: Name, Phone and Email.
27
+ </div>
28
+ </div>
29
+ <div class=control-group>
30
+ <label class=control-label><?php _e( 'Select file:' , 'ab' ) ?></label>
31
+ <div class=controls>
32
+ <input name="importCustomers" type="file" id="importCustomers">
33
+ </div>
34
+ </div>
35
+ </div>
36
+ <div class=modal-footer>
37
+ <div class=ab-modal-button>
38
+ <input type="hidden" name="import">
39
+ <input type="submit" class="btn btn-info ab-popup-save ab-update-button" value="<?php _e( 'Import' , 'ab' ) ?>" />
40
+ <button class=ab-reset-form data-dismiss=modal aria-hidden=true><?php _e( 'Cancel' , 'ab' ) ?></button>
41
+ </div>
42
+ </div>
43
+ </form>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+
49
+ <table id=ab_customers_list class="table table-striped" cellspacing=0 cellpadding=0 border=0 style="clear: both;">
50
+ <thead>
51
+ <tr>
52
+ <th width=150 ng-class=css_class.name><a href="" ng-click=reload({sort:'name'})><?php _e( 'Name', 'ab' ); ?></a></th>
53
+ <th width=100 ng-class=css_class.phone><a href="" ng-click=reload({sort:'phone'})><?php _e( 'Phone', 'ab' ); ?></a></th>
54
+ <th width=150 ng-class=css_class.email><a href="" ng-click=reload({sort:'email'})><?php _e( 'Email', 'ab' ); ?></a></th>
55
+ <th width=150 ng-class=css_class.notes><a href="" ><?php _e( 'Notes', 'ab' ); ?></a></th>
56
+ <th width=150 ng-class=css_class.last_appointment><a href="" ng-click=reload({sort:'last_appointment'})><?php _e( 'Last appointment', 'ab' ); ?></a></th>
57
+ <th width=150 ng-class=css_class.total_appointments><a href="" ng-click=reload({sort:'total_appointments'})><?php _e( 'Total appointments', 'ab'); ?></a></th>
58
+ <th width=150 ng-class=css_class.payments><a href="" ng-click=reload({sort:'payments'})><?php _e( 'Payments', 'ab'); ?></a></th>
59
+ </tr>
60
+ </thead>
61
+ <tbody>
62
+ <tr ng-repeat="customer in dataSource.customers">
63
+ <td>
64
+ <div ng-click="customer.edit_name = true" ng-hide=customer.edit_name class=displayed-value>{{customer.name}}</div>
65
+ <span ng-show=customer.errors.name.required><?php _e( 'Required', 'ab' ) ?></span>
66
+ <input class=ab-value ng-model=customer.name ui-event="{blur:'saveCustomer(customer)'}" ng-show=customer.edit_name focus-me=customer.edit_name required />
67
+ </td>
68
+ <td class="ab-phone">
69
+ <div ng-click="customer.edit_phone = true" ng-hide=customer.edit_phone class=displayed-value>{{customer.phone}}</div>
70
+ <input class=ab-value ng-model=customer.phone ui-event="{blur:'saveCustomer(customer)'}" ng-show=customer.edit_phone focus-me=customer.edit_phone />
71
+ </td>
72
+ <td>
73
+ <div ng-click="customer.edit_email = true" ng-hide=customer.edit_email class=displayed-value>{{customer.email}}</div>
74
+ <input class=ab-value ng-model=customer.email ui-event="{blur:'saveCustomer(customer)'}" ng-show=customer.edit_email focus-me=customer.edit_email />
75
+ </td>
76
+ <td>
77
+ <div ng-click="customer.edit_notes = true" ng-hide=customer.edit_notes class=displayed-value ng-bind-html="customer.notes | nl2br"></div>
78
+ <textarea class=ab-value ng-model="customer.notes" ui-event="{blur:'saveCustomer(customer)'}" ng-show=customer.edit_notes focus-me=customer.edit_notes></textarea>
79
+ </td>
80
+ <td>
81
+ <div ng-model=customer.last_appointment class=displayed-value>{{customer.last_appointment}}</div>
82
+ </td>
83
+ <td>
84
+ <div ng-model=customer.total_appointments class=displayed-value>{{customer.total_appointments}}</div>
85
+ </td>
86
+ <td>
87
+ <div ng-model=customer.payments class=displayed-value>{{customer.payments}}</div>
88
+ </td>
89
+ <td><a href="" ng-click="deleteCustomer(customer)" role="button" class="btn btn-danger" id="{{customer.id}}" name="customer_delete"><?php _e( 'Delete', 'ab' ) ?></a></td>
90
+ </tr>
91
+ <tr ng-hide="dataSource.customers.length || loading"><td colspan=6><?php _e( 'No customers', 'ab' ); ?></td></tr>
92
+ </tbody>
93
+ </table>
94
+ <div class="btn-toolbar" ng-hide="dataSource.pages.length == 1">
95
+ <div class="btn-group">
96
+ <button ng-click=reload({page:page.number}) class="btn" ng-repeat="page in dataSource.pages" ng-switch on=page.active>
97
+ <span ng-switch-when=true>{{page.number}}</span>
98
+ <a href="" ng-switch-default>{{page.number}}</a>
99
+ </button>
100
+ </div>
101
+ </div>
102
+ <div ng-show=loading class=loading-indicator>
103
+ <img src="<?php echo plugins_url('resources/images/ajax_loader_32x32.gif', dirname(__FILE__) . '/../../../AB_Backend.php') ?>" alt="" />
104
+ </div>
105
+
106
+ </div>
backend/modules/customer/templates/ng-new_customer_dialog.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div>
2
+ <a href=#ab_new_customer_dialog class="{{btn_class}}" data-toggle=modal data-backdrop={{backdrop}}><?php _e( 'New customer' , 'ab' ) ?></a>
3
+ <div id=ab_new_customer_dialog class="modal hide fade" tabindex=-1 role=dialog aria-labelledby=myModalLabel aria-hidden=true>
4
+ <div class=dialog-content>
5
+ <form class=form-horizontal ng-hide=loading>
6
+ <div class=modal-header>
7
+ <button type=button class=close data-dismiss=modal aria-hidden=true>×</button>
8
+ <h3 id=myModalLabel><?php _e( 'New Customer', 'ab' ) ?></h3>
9
+ </div>
10
+ <div class=modal-body>
11
+ <div class=control-group>
12
+ <label class=control-label><?php _e( 'Name' , 'ab' ) ?></label>
13
+ <div class=controls>
14
+ <input type=text ng-model=form.name required />
15
+ <span style="font-size: 11px;color: red" ng-show=errors.name.required><?php _e( 'Required' , 'ab' ) ?></span>
16
+ </div>
17
+ </div>
18
+ <div class=control-group>
19
+ <label class=control-label><?php _e( 'Phone' , 'ab' ) ?></label>
20
+ <div class=controls>
21
+ <input type=text ng-model=form.phone />
22
+ </div>
23
+ </div>
24
+ <div class=control-group>
25
+ <label class=control-label><?php _e( 'Email' , 'ab' ) ?></label>
26
+ <div class=controls>
27
+ <input type=text ng-model=form.email />
28
+ </div>
29
+ </div>
30
+ <div class=control-group>
31
+ <label class=control-label><?php _e( 'Notes' , 'ab' ) ?></label>
32
+ <div class=controls>
33
+ <textarea ng-model=form.notes></textarea>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ <div class=modal-footer>
38
+ <div class=ab-modal-button>
39
+ <button ng-click=processForm() class="btn btn-info ab-popup-save ab-update-button"><?php _e( 'Save customer' , 'ab' ) ?></button>
40
+ <button class=ab-reset-form data-dismiss=modal aria-hidden=true><?php _e( 'Cancel' , 'ab' ) ?></button>
41
+ </div>
42
+ </div>
43
+ </form>
44
+ <div ng-show=loading class=loading-indicator>
45
+ <img src="<?php echo plugins_url( 'resources/images/ajax_loader_32x32.gif', dirname(__FILE__) . '/../../../AB_Backend.php' ) ?>" alt="" />
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
backend/modules/export/AB_ExportController.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ /**
6
+ * Class AB_ExportController
7
+ */
8
+ class AB_ExportController extends AB_Controller {
9
+
10
+ public function index() {
11
+ $path = dirname( dirname( __FILE__ ) );
12
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', $path ) );
13
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', $path ) );
14
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', $path ), array( 'jquery' ) );
15
+ wp_enqueue_script( 'ab-date', plugins_url( 'resources/js/date.js', $path ), array( 'jquery' ) );
16
+ wp_enqueue_script( 'ab-daterangepicker-js', plugins_url( 'resources/js/daterangepicker.js', $path ), array( 'jquery' ) );
17
+ wp_enqueue_style( 'ab-daterangepicker-css', plugins_url( 'resources/css/daterangepicker.css', $path ) );
18
+ wp_enqueue_script( 'ab-bootstrap-select-js', plugins_url( 'resources/js/bootstrap-select.min.js', $path ));
19
+ wp_enqueue_style( 'ab-bootstrap-select-css', plugins_url( 'resources/css/bootstrap-select.min.css', $path ));
20
+ wp_localize_script( 'ab-daterangepicker-js', 'BooklyL10n', array(
21
+ 'today' => __( 'Today', 'ab' ),
22
+ 'yesterday' => __( 'Yesterday', 'ab' ),
23
+ 'last_7' => __( 'Last 7 Days', 'ab' ),
24
+ 'last_30' => __( 'Last 30 Days', 'ab' ),
25
+ 'this_month' => __( 'This Month', 'ab' ),
26
+ 'last_month' => __( 'Last Month', 'ab' ),
27
+ 'custom_range' => __( 'Custom Range', 'ab' ),
28
+ 'apply' => __( 'Apply', 'ab' ),
29
+ 'clear' => __( 'Clear', 'ab' ),
30
+ 'to' => __( 'To', 'ab' ),
31
+ 'from' => __( 'From', 'ab' ),
32
+ 'month' => array(
33
+ 0 => __( 'January', 'ab' ),
34
+ 1 => __( 'February', 'ab' ),
35
+ 2 => __( 'March', 'ab' ),
36
+ 3 => __( 'April', 'ab' ),
37
+ 4 => __( 'May', 'ab' ),
38
+ 5 => __( 'June', 'ab' ),
39
+ 6 => __( 'July', 'ab' ),
40
+ 7 => __( 'August', 'ab' ),
41
+ 8 => __( 'September', 'ab' ),
42
+ 9 => __( 'October', 'ab' ),
43
+ 10 => __( 'November', 'ab' ),
44
+ 11 => __( 'December', 'ab' )
45
+ ),
46
+ 'day' => array(
47
+ 'Mon' => __( 'Mon', 'ab' ),
48
+ 'Tue' => __( 'Tue', 'ab' ),
49
+ 'Wed' => __( 'Wed', 'ab' ),
50
+ 'Thu' => __( 'Thu', 'ab' ),
51
+ 'Fri' => __( 'Fri', 'ab' ),
52
+ 'Sat' => __( 'Sat', 'ab' ),
53
+ 'Sun' => __( 'Sun', 'ab' )
54
+ )
55
+ ));
56
+ $this->render( 'index' );
57
+ } // index
58
+
59
+
60
+ /**
61
+ * Export Appointment to CSV
62
+ */
63
+ public function executeExportToCSV ( ) {
64
+ $_post = $this->getPost();
65
+ $start_date = new DateTime($_post['date_start']);
66
+ $start_date = $start_date->format('Y-m-d H:i:s');
67
+ $end_date = new DateTime($_post['date_end']);
68
+ $end_date->modify( '+1 day' );
69
+ $end_date = $end_date->format('Y-m-d H:i:s');
70
+
71
+ header('Content-Type: text/csv; charset=' . (WPLANG == 'ru_RU') ? 'windows-1251': 'utf-8');
72
+ header('Content-Disposition: attachment; filename=appointment.csv');
73
+
74
+ if (WPLANG == 'ru_RU'){
75
+ $headings = array(
76
+ iconv('utf-8', 'windows-1251', __('Customer name', 'ab')),
77
+ iconv('utf-8', 'windows-1251', __('Service title', 'ab')),
78
+ iconv('utf-8', 'windows-1251', __('Start date', 'ab')),
79
+ iconv('utf-8', 'windows-1251', __('End date', 'ab')),
80
+ iconv('utf-8', 'windows-1251', __('Notes', 'ab')));
81
+ }else{
82
+ $headings = array(
83
+ __('Customer name', 'ab'),
84
+ __('Service title', 'ab'),
85
+ __('Start date', 'ab'),
86
+ __('End date', 'ab'),
87
+ __('Notes', 'ab'));
88
+ }
89
+ $output = fopen('php://output', 'w');
90
+ fputcsv($output, $headings);
91
+
92
+ $appointments = $this->getWpdb()->get_results("
93
+ SELECT c.name AS customer_name,
94
+ s.title AS service_title,
95
+ a.start_date AS start_date,
96
+ a.end_date AS end_date,
97
+ a.notes AS notes
98
+ FROM ab_appointment a
99
+ LEFT JOIN ab_service s ON a.service_id = s.id
100
+ LEFT JOIN ab_customer c ON a.customer_id = c.id
101
+ WHERE a.start_date between '{$start_date}' AND '{$end_date}'
102
+ ORDER BY a.start_date DESC
103
+ ", ARRAY_A);
104
+
105
+ foreach( $appointments as $appointment ) {
106
+ if (WPLANG == 'ru_RU'){
107
+ $appointment['customer_name'] = iconv('utf-8', 'windows-1251', $appointment['customer_name']);
108
+ $appointment['notes'] = iconv('utf-8', 'windows-1251', $appointment['notes']);
109
+ $appointment['service_title'] = iconv('utf-8', 'windows-1251', $appointment['service_title']);
110
+ }
111
+ fputcsv($output, $appointment);
112
+ }
113
+ fclose($output);
114
+ exit();
115
+ }
116
+ /**
117
+ * Override parent method to add 'wp_ajax_ab_' prefix
118
+ * so current 'execute*' methods look nicer.
119
+ */
120
+ protected function registerWpActions( $prefix = '' ) {
121
+ parent::registerWpActions( 'wp_ajax_ab_' );
122
+ }
123
+ }
backend/modules/export/templates/index.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ab-title"><?php _e( 'Export appointments', 'ab' ); ?></div>
2
+ <div class=ab-nav-payment>
3
+ <form action="<?php echo get_admin_url(); ?>admin-ajax.php?action=ab_export_to_csv" method="post" style="margin: 0">
4
+ <div id=reportrange class="pull-left ab-reportrange" style="margin-bottom: 10px">
5
+
6
+ <i class="icon-calendar icon-large"></i>
7
+ <span data-date="<?php echo date( 'F j, Y', strtotime( '-30 day' ) ) ?> - <?php echo date( 'F j, Y' ) ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( '-30 day' ) ) ?> - <?php echo date_i18n( get_option( 'date_format' ) ) ?></span> <b style="margin-top: 8px;" class=caret></b>
8
+
9
+ </div>
10
+ <input type="hidden" id="date_start" name="date_start" value="<?php echo date_i18n( get_option( 'date_format' ) ) ?>"/>
11
+ <input type="hidden" id="date_end" name="date_end" value="<?php echo date_i18n( get_option( 'date_format' ) ) ?>"/>
12
+ <input type="submit" class="btn btn-info right-margin left" value="<?php _e('Export to CSV','ab') ?>">
13
+ </form>
14
+
15
+ </div>
16
+ <script type="text/javascript">
17
+ jQuery(function($) {
18
+ var data = {},
19
+ $report_range = $('#reportrange span'),
20
+ picker_ranges = {},
21
+ l10nRanges = {
22
+ response: function(start, end) {
23
+ return $.post(ajaxurl, {action: 'ab_l10n_ranges', start: start, end: end});
24
+ },
25
+ l10n: function(start, end) {
26
+ this.response(start, end).done(function(response) {
27
+ var ranges = JSON.parse(response);
28
+ $report_range.data('date', start.toString('MMMM d, yyyy') + ' - ' + end.toString('MMMM d, yyyy'));
29
+ $report_range.html(ranges.start + ' - ' + ranges.end);
30
+ });
31
+ }
32
+ };
33
+
34
+ picker_ranges[BooklyL10n.today] = ['today', 'today'];
35
+ picker_ranges[BooklyL10n.yesterday] = ['yesterday', 'yesterday'];
36
+ picker_ranges[BooklyL10n.last_7] = [Date.today().add({ days: -6 }), 'today'];
37
+ picker_ranges[BooklyL10n.last_30] = [Date.today().add({ days: -30 }), 'today','selected'];
38
+ picker_ranges[BooklyL10n.this_month] = [Date.today().moveToFirstDayOfMonth(), Date.today().moveToLastDayOfMonth()];
39
+ picker_ranges[BooklyL10n.last_month] = [Date.today().moveToFirstDayOfMonth().add({ months: -1 }), Date.today().moveToFirstDayOfMonth().add({ days: -1 })];
40
+
41
+ $('#reportrange').daterangepicker({ranges: picker_ranges}, function(start, end) {
42
+ l10nRanges.l10n(start, end);
43
+ $('#date_start').val(start);
44
+ $('#date_end').val(end);
45
+ });
46
+ });
47
+ </script>
backend/modules/notifications/AB_NotificationsController.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class AB_NotificationsController extends AB_Controller {
6
+
7
+ public function index() {
8
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', dirname(__FILE__).'/../../AB_Backend.php' ) );
9
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', dirname(__FILE__).'/../../AB_Backend.php' ) );
10
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', dirname(__FILE__).'/../../AB_Backend.php' ), array( 'jquery' ) );
11
+
12
+ $this->notifications = array(
13
+ 'client_info' => array(
14
+ 'name' => __( 'Notification to Customer about Appointment details', 'ab' ),
15
+ 'subject' => __( 'Your appointment information', 'ab' ),
16
+ 'message' => wpautop( __("Dear [[CLIENT_NAME]].\n\nThis is confirmation that you have booked [[SERVICE_NAME]].\n\nWe are waiting you at [[COMPANY_ADDRESS]] on [[APPOINTMENT_DATE]] at [[APPOINTMENT_TIME]].\n\nThank you for choosing our company.\n\n[[COMPANY_NAME]]\n[[COMPANY_PHONE]]\n[[COMPANY_WEBSITE]]", 'ab' ) ),
17
+ ),
18
+ 'provider_info' => array(
19
+ 'name' => __( 'Notification to Staff Member about Appointment details', 'ab' ),
20
+ 'subject' => __( 'New booking information', 'ab' ),
21
+ 'message' => wpautop( __( "Hello.\n\nYou have new booking.\n\nService: [[SERVICE_NAME]]\nDate: [[APPOINTMENT_DATE]]\nTime: [[APPOINTMENT_TIME]]\nClient name: [[CLIENT_NAME]]\nClient phone: [[CLIENT_PHONE]]\nClient email: [[CLIENT_EMAIL]]\nClient notes: [[CLIENT_NOTES]]", 'ab' ) ),
22
+ ),
23
+ 'evening_next_day' => array(
24
+ 'name' => __( 'Evening reminder to Customer about next day Appointment', 'ab' ),
25
+ 'subject' => __( 'Your appointment at [[COMPANY_NAME]]', 'ab' ),
26
+ 'message' => wpautop( __( "Dear [[CLIENT_NAME]].\n\nWe would like to remind you that you have booked [[SERVICE_NAME]] tomorrow on [[APPOINTMENT_TIME]]. We are waiting you at [[COMPANY_ADDRESS]].\n\nThank you for choosing our company.\n\n[[COMPANY_NAME]]\n[[COMPANY_PHONE]]\n[[COMPANY_WEBSITE]]", 'ab' ) ),
27
+ ),
28
+ 'evening_after' => array(
29
+ 'name' => __( 'Follow-up message on the day after Appointment', 'ab' ),
30
+ 'subject' => __( 'Your visit to [[COMPANY_NAME]]', 'ab' ),
31
+ 'message' => wpautop( __( "Dear [[CLIENT_NAME]].\n\nThank you for choosing [[COMPANY_NAME]]. We hope you were satisfied with your [[SERVICE_NAME]].\n\nThank you and we look forward to seeing you again soon.\n\n[[COMPANY_NAME]]\n[[COMPANY_PHONE]]\n[[COMPANY_WEBSITE]]", 'ab' ) ),
32
+ ),
33
+ 'event_next_day' => array(
34
+ 'name' => __( 'Evening notification with the next day agenda to Staff Member', 'ab' ),
35
+ 'subject' => __( 'Your agenda for [[TOMORROW_DATE]]', 'ab' ),
36
+ 'message' => wpautop( __( "Hello.\n\nYour agenda for tomorrow is:\n\n[[NEXT_DAY_AGENDA]]", 'ab' ) ),
37
+ )
38
+ );
39
+
40
+ $this->settings = array(
41
+ 'media_buttons' => false,
42
+ 'tinymce' => array(
43
+ 'theme_advanced_buttons1' => 'formatselect,|,bold,italic,underline,|,' .
44
+ 'bullist,blockquote,|,justifyleft,justifycenter' .
45
+ ',justifyright,justifyfull,|,link,unlink,|' .
46
+ ',spellchecker,wp_fullscreen,wp_adv'
47
+ )
48
+ );
49
+
50
+ $this->render( 'index' );
51
+ }
52
+
53
+ // Protected methods.
54
+
55
+ /**
56
+ * Override parent method to add 'wp_ajax_ab_' prefix
57
+ * so current 'execute*' methods look nicer.
58
+ */
59
+ protected function registerWpActions( $prefix = '' ) {
60
+ parent::registerWpActions( 'wp_ajax_ab_' );
61
+ }
62
+ }
backend/modules/notifications/templates/_tags_client_info.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <tr>
2
+ <th><?php _e('Subject', 'ab') ?></th>
3
+ <th><?php _e('Message', 'ab') ?></th>
4
+ </tr>
5
+ <tr>
6
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
7
+ <td><?php _e('[[CLIENT_NAME]] - name of client', 'ab') ?></td>
8
+ </tr>
9
+ <tr>
10
+ <td></td>
11
+ <td><?php _e('[[STAFF_NAME]] - name of staff', 'ab') ?></td>
12
+ </tr>
13
+ <tr>
14
+ <td></td>
15
+ <td><?php _e('[[APPOINTMENT_DATE]] - date of appointment', 'ab') ?></td>
16
+ </tr>
17
+ <tr>
18
+ <td></td>
19
+ <td><?php _e('[[APPOINTMENT_TIME]] - time of appointment', 'ab') ?></td>
20
+ </tr>
21
+ <tr>
22
+ <td></td>
23
+ <td><?php _e('[[SERVICE_NAME]] - name of service', 'ab') ?></td>
24
+ </tr>
25
+ <tr>
26
+ <td></td>
27
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
28
+ </tr>
29
+ <tr>
30
+ <td></td>
31
+ <td><?php _e('[[COMPANY_LOGO]] - company logo', 'ab') ?></td>
32
+ </tr>
33
+ <tr>
34
+ <td></td>
35
+ <td><?php _e('[[COMPANY_ADDRESS]] - address of your company', 'ab') ?></td>
36
+ </tr>
37
+ <tr>
38
+ <td></td>
39
+ <td><?php _e('[[COMPANY_PHONE]] - company phone', 'ab') ?></td>
40
+ </tr>
41
+ <tr>
42
+ <td></td>
43
+ <td><?php _e('[[COMPANY_WEBSITE]] - this web-site address', 'ab') ?></td>
44
+ </tr>
45
+ <tr>
46
+ <td></td>
47
+ <td><?php _e('[[CANCEL_APPOINTMENT]] - cancel appointment link', 'ab') ?></td>
48
+ </tr>
backend/modules/notifications/templates/_tags_evening_after.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <tr>
2
+ <th><?php _e('Subject', 'ab') ?></th>
3
+ <th><?php _e('Message', 'ab') ?></th>
4
+ </tr>
5
+ <tr>
6
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
7
+ <td><?php _e('[[CLIENT_NAME]] - name of client', 'ab') ?></td>
8
+ </tr>
9
+ <tr>
10
+ <td></td>
11
+ <td><?php _e('[[APPOINTMENT_DATE]] - date of appointment', 'ab') ?></td>
12
+ </tr>
13
+ <tr>
14
+ <td></td>
15
+ <td><?php _e('[[APPOINTMENT_TIME]] - time of appointment', 'ab') ?></td>
16
+ </tr>
17
+ <tr>
18
+ <td></td>
19
+ <td><?php _e('[[SERVICE_NAME]] - name of service', 'ab') ?></td>
20
+ </tr>
21
+ <tr>
22
+ <td></td>
23
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
24
+ </tr>
25
+ <tr>
26
+ <td></td>
27
+ <td><?php _e('[[COMPANY_LOGO]] - company logo', 'ab') ?></td>
28
+ </tr>
29
+ <tr>
30
+ <td></td>
31
+ <td><?php _e('[[COMPANY_ADDRESS]] - address of your company', 'ab') ?></td>
32
+ </tr>
33
+ <tr>
34
+ <td></td>
35
+ <td><?php _e('[[COMPANY_PHONE]] - company phone', 'ab') ?></td>
36
+ </tr>
37
+ <tr>
38
+ <td></td>
39
+ <td><?php _e('[[COMPANY_WEBSITE]] - this web-site address', 'ab') ?></td>
40
+ </tr>
backend/modules/notifications/templates/_tags_evening_next_day.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <tr>
2
+ <th><?php _e('Subject', 'ab') ?></th>
3
+ <th><?php _e('Message', 'ab') ?></th>
4
+ </tr>
5
+ <tr>
6
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
7
+ <td><?php _e('[[CLIENT_NAME]] - name of client', 'ab') ?></td>
8
+ </tr>
9
+ <tr>
10
+ <td></td>
11
+ <td><?php _e('[[APPOINTMENT_DATE]] - date of appointment', 'ab') ?></td>
12
+ </tr>
13
+ <tr>
14
+ <td></td>
15
+ <td><?php _e('[[APPOINTMENT_TIME]] - time of appointment', 'ab') ?></td>
16
+ </tr>
17
+ <tr>
18
+ <td></td>
19
+ <td><?php _e('[[SERVICE_NAME]] - name of service', 'ab') ?></td>
20
+ </tr>
21
+ <tr>
22
+ <td></td>
23
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
24
+ </tr>
25
+ <tr>
26
+ <td></td>
27
+ <td><?php _e('[[COMPANY_LOGO]] - company logo', 'ab') ?></td>
28
+ </tr>
29
+ <tr>
30
+ <td></td>
31
+ <td><?php _e('[[COMPANY_ADDRESS]] - address of your company', 'ab') ?></td>
32
+ </tr>
33
+ <tr>
34
+ <td></td>
35
+ <td><?php _e('[[COMPANY_PHONE]] - company phone', 'ab') ?></td>
36
+ </tr>
37
+ <tr>
38
+ <td></td>
39
+ <td><?php _e('[[COMPANY_WEBSITE]] - this web-site address', 'ab') ?></td>
40
+ </tr>
backend/modules/notifications/templates/_tags_event_next_day.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <tr>
2
+ <th><?php _e('Subject', 'ab') ?></th>
3
+ <th><?php _e('Message', 'ab') ?></th>
4
+ </tr>
5
+ <tr>
6
+ <td><?php _e('[[TOMORROW_DATE]] - date of next day', 'ab') ?></td>
7
+ <td><?php _e('[[NEXT_DAY_AGENDA]] - staff agenda for next day', 'ab') ?></td>
8
+ </tr>
backend/modules/notifications/templates/_tags_provider_info.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <tr>
2
+ <th><?php _e('Subject', 'ab') ?></th>
3
+ <th><?php _e('Message', 'ab') ?></th>
4
+ </tr>
5
+ <tr>
6
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
7
+ <td><?php _e('[[CLIENT_NAME]] - name of client', 'ab') ?></td>
8
+ </tr>
9
+ <tr>
10
+ <td></td>
11
+ <td><?php _e('[[CLIENT_PHONE]] - сlient phone', 'ab') ?></td>
12
+ </tr>
13
+ <tr>
14
+ <td></td>
15
+ <td><?php _e('[[CLIENT_EMAIL]] - сlient email', 'ab') ?></td>
16
+ </tr>
17
+ <tr>
18
+ <td></td>
19
+ <td><?php _e('[[CLIENT_NOTES]] - сlient notes', 'ab') ?></td>
20
+ </tr>
21
+ <tr>
22
+ <td></td>
23
+ <td><?php _e('[[STAFF_NAME]] - name of staff', 'ab') ?></td>
24
+ </tr>
25
+ <tr>
26
+ <td></td>
27
+ <td><?php _e('[[APPOINTMENT_DATE]] - date of appointment', 'ab') ?></td>
28
+ </tr>
29
+ <tr>
30
+ <td></td>
31
+ <td><?php _e('[[APPOINTMENT_TIME]] - time of appointment', 'ab') ?></td>
32
+ </tr>
33
+ <tr>
34
+ <td></td>
35
+ <td><?php _e('[[SERVICE_NAME]] - name of service', 'ab') ?></td>
36
+ </tr>
37
+ <tr>
38
+ <td></td>
39
+ <td><?php _e('[[COMPANY_NAME]] - name of the company', 'ab') ?></td>
40
+ </tr>
41
+ <tr>
42
+ <td></td>
43
+ <td><?php _e('[[COMPANY_LOGO]] - company logo', 'ab') ?></td>
44
+ </tr>
45
+ <tr>
46
+ <td></td>
47
+ <td><?php _e('[[COMPANY_ADDRESS]] - address of your company', 'ab') ?></td>
48
+ </tr>
49
+ <tr>
50
+ <td></td>
51
+ <td><?php _e('[[COMPANY_PHONE]] - company phone', 'ab') ?></td>
52
+ </tr>
53
+ <tr>
54
+ <td></td>
55
+ <td><?php _e('[[COMPANY_WEBSITE]] - this web-site address', 'ab') ?></td>
56
+ </tr>
57
+ <tr>
58
+ <td></td>
59
+ <td><?php _e('[[CANCEL_APPOINTMENT]] - cancel appointment link', 'ab') ?></td>
60
+ </tr>
backend/modules/notifications/templates/index.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div class="ab-title"><?php _e('Notifications','ab') ?></div>
3
+ <div style="min-width: 800px;margin-top: -20px">
4
+ <form method="post">
5
+ <div class="ab-notifications">
6
+ <?php
7
+ $sender_name = get_option( 'ab_settings_sender_name' ) == '' ?
8
+ get_option( 'blogname' ) : get_option( 'ab_settings_sender_name' );
9
+ $sender_email = get_option( 'ab_settings_sender_email' ) == '' ?
10
+ get_option( 'admin_email' ) : get_option( 'ab_settings_sender_email' );
11
+ ?>
12
+ <!-- sender name -->
13
+ <label for="sender_name" style="display: inline;"><?php _e( 'Sender name', 'ab' ); ?></label>
14
+ <input id="sender_name" name="sender_name" class="ab-sender" type="text" value="<?php echo $sender_name ; ?>"/><br>
15
+ <!-- sender email -->
16
+ <label for="sender_email" style="display: inline;"><?php _e( 'Sender email', 'ab' ); ?></label>
17
+ <input id="sender_email" name="sender_email" class="ab-sender" type="text" value="<?php echo $sender_email; ?>"/>
18
+ </div>
19
+ <?php foreach ( $notifications as $k => $slug ): ?>
20
+ <div class="ab-notifications">
21
+ <div class="ab-toggle-arrow"></div>
22
+ <legend id='legend_<?php echo $k; ?>_active'>
23
+ <input type=checkbox id="<?php echo $k; ?>_active" type="checkbox" value="1" name=<?php echo $k; ?>[active]"/>
24
+ <label for='<?php echo $k; ?>_active'><?php echo $slug['name']; ?></label>
25
+ </legend>
26
+ <div class="ab-form-field">
27
+ <div class="ab-form-row">
28
+ <label class='ab-form-label'><?php __( 'Subject','ab'); ?></label><input type='text' size='70' value='<?php echo $slug['subject']; ?>'/>
29
+ </div>
30
+ <div id="message_editor" class="ab-form-row">
31
+ <label class="ab-form-label" style="margin-top: 35px;"><?php _e( 'Message', 'ab' ) ?></label>
32
+ <?php wp_editor( $slug['message'], $k . '_message', array_merge(array('name' => $k . '[message]'), $settings) ) ?>
33
+ </div>
34
+ <?php if ('provider_info' == $k): ?>
35
+ <div class='ab-form-row'>
36
+ <label class='ab-form-label'></label>
37
+ <div class='left'>
38
+ <legend>
39
+ <input type=checkbox />
40
+ <label> <?php _e('Send copy to administrators', 'ab');?></label>
41
+ </legend>
42
+ </div>
43
+ </div>
44
+ <?php endif ?>
45
+ <div class="ab-form-row">
46
+ <label class="ab-form-label"><?php _e( 'Tags ','ab' ) ?></label>
47
+ <div class="ab-tags-form left">
48
+ <table>
49
+ <tbody>
50
+ <?php include "_tags_{$k}.php"; ?>
51
+ </tbody>
52
+ </table>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <?php endforeach; ?>
58
+ <div class="ab-notifications" style="border: 0">
59
+ <input type="submit" value="<?php _e( 'Save Changes', 'ab' )?>" class="btn btn-info ab-update-button" />
60
+ <button class="ab-reset-form" type="reset"><?php _e( 'Reset', 'ab' )?></button>
61
+ </div>
62
+ </form>
63
+ </div>
64
+
65
+ <div class="modal fade" id="light_notice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
66
+ <div class="modal-dialog">
67
+ <div class="modal-content">
68
+ <div class="modal-header">
69
+ <h4 class="modal-title">Notice</h4>
70
+ </div>
71
+ <div class="modal-body">
72
+ <?php _e('This function is disabled in the light verison of Bookly. If you find the plugin useful for your business please consider buying a licence for the full version. It costs just $35 and for this money you will get many useful functions, lifetime free update and excellent support! More information can be found here'); ?>: <a href="http://bookly.ladela.com" target="_blank">http://bookly.ladela.com</a>
73
+ </div>
74
+ <div class="modal-footer">
75
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
76
+ </div>
77
+ </div><!-- /.modal-content -->
78
+ </div><!-- /.modal-dialog -->
79
+ </div><!-- /.modal -->
80
+
81
+ <script type="text/javascript">
82
+ jQuery(function($) {
83
+ // menu fix for WP 3.8.1
84
+ $('#toplevel_page_ab-system > ul').css('margin-left', '0px');
85
+ // Show-hide Notifications
86
+ $('input:checkbox[id!=_active]').each(function() {
87
+ $(this).change(function() {
88
+ if ( $(this).attr('checked') ) {
89
+ $(this).parent().next('div.ab-form-field').show(200);
90
+ $(this).parents('.ab-notifications').find('.ab-toggle-arrow').css('background','url(<?php echo plugins_url( 'resources/images/notifications-arrow-up.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>) 100% 0 no-repeat');
91
+ } else {
92
+ $(this).parent().next('div.ab-form-field').hide(200);
93
+ $(this).parents('.ab-notifications').find('.ab-toggle-arrow').css('background','url(<?php echo plugins_url( 'resources/images/notifications-arrow-down.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>) 100% 0 no-repeat');
94
+ }
95
+ }).change();
96
+ });
97
+ $('.ab-toggle-arrow').click(function() {
98
+ $(this).nextAll('.ab-form-field').toggle(200, function() {
99
+ if ( $('.ab-form-field').css('display') == 'block' ) {
100
+ $(this).prevAll('.ab-toggle-arrow').css('background','url(<?php echo plugins_url( 'resources/images/notifications-arrow-up.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>) 100% 0 no-repeat');
101
+ } else {
102
+ $(this).prevAll('.ab-toggle-arrow').css('background','url(<?php echo plugins_url( 'resources/images/notifications-arrow-down.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>) 100% 0 no-repeat');
103
+ }
104
+ });
105
+ });
106
+ // filter sender name and email
107
+ var escapeXSS = function (infected) {
108
+ var regexp = /([<|(]("[^"]*"|'[^']*'|[^'">])*[>|)])/gi;
109
+ return infected.replace(regexp, '');
110
+ };
111
+ $('input.ab-sender').on('change', function() {
112
+ var $val = $(this).val();
113
+ $(this).val(escapeXSS($val));
114
+ });
115
+
116
+ $("input[id$='_active']").change(function(){
117
+ if ($(this).is(':checked')){
118
+ $('#light_notice').modal('show');
119
+ }
120
+ });
121
+ });
122
+ </script>
backend/modules/payment/AB_PaymentController.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class AB_PaymentController extends AB_Controller {
6
+
7
+ public function index() {
8
+ $path = dirname( dirname( __FILE__ ) );
9
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', $path ) );
10
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', $path ) );
11
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', $path ), array( 'jquery' ) );
12
+ wp_enqueue_script( 'ab-date', plugins_url( 'resources/js/date.js', $path ), array( 'jquery' ) );
13
+ wp_enqueue_script( 'ab-daterangepicker-js', plugins_url( 'resources/js/daterangepicker.js', $path ), array( 'jquery' ) );
14
+ wp_enqueue_style( 'ab-daterangepicker-css', plugins_url( 'resources/css/daterangepicker.css', $path ) );
15
+ wp_enqueue_script( 'ab-bootstrap-select-js', plugins_url( 'resources/js/bootstrap-select.min.js', $path ));
16
+ wp_enqueue_style( 'ab-bootstrap-select-css', plugins_url( 'resources/css/bootstrap-select.min.css', $path ));
17
+ wp_localize_script( 'ab-daterangepicker-js', 'BooklyL10n', array(
18
+ 'today' => __( 'Today', 'ab' ),
19
+ 'yesterday' => __( 'Yesterday', 'ab' ),
20
+ 'last_7' => __( 'Last 7 Days', 'ab' ),
21
+ 'last_30' => __( 'Last 30 Days', 'ab' ),
22
+ 'this_month' => __( 'This Month', 'ab' ),
23
+ 'last_month' => __( 'Last Month', 'ab' ),
24
+ 'custom_range' => __( 'Custom Range', 'ab' ),
25
+ 'apply' => __( 'Apply', 'ab' ),
26
+ 'clear' => __( 'Clear', 'ab' ),
27
+ 'to' => __( 'To', 'ab' ),
28
+ 'from' => __( 'From', 'ab' ),
29
+ 'month' => array(
30
+ 0 => __( 'January', 'ab' ),
31
+ 1 => __( 'February', 'ab' ),
32
+ 2 => __( 'March', 'ab' ),
33
+ 3 => __( 'April', 'ab' ),
34
+ 4 => __( 'May', 'ab' ),
35
+ 5 => __( 'June', 'ab' ),
36
+ 6 => __( 'July', 'ab' ),
37
+ 7 => __( 'August', 'ab' ),
38
+ 8 => __( 'September', 'ab' ),
39
+ 9 => __( 'October', 'ab' ),
40
+ 10 => __( 'November', 'ab' ),
41
+ 11 => __( 'December', 'ab' )
42
+ ),
43
+ 'day' => array(
44
+ 'Mon' => __( 'Mon', 'ab' ),
45
+ 'Tue' => __( 'Tue', 'ab' ),
46
+ 'Wed' => __( 'Wed', 'ab' ),
47
+ 'Thu' => __( 'Thu', 'ab' ),
48
+ 'Fri' => __( 'Fri', 'ab' ),
49
+ 'Sat' => __( 'Sat', 'ab' ),
50
+ 'Sun' => __( 'Sun', 'ab' )
51
+ )
52
+ ));
53
+
54
+ $this->types = $this->customers = $this->providers = $this->services = array();
55
+
56
+ $this->render( 'index' );
57
+ }
58
+
59
+ }
backend/modules/payment/templates/_alert.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div id="ab_filter_error" class="alert alert-error" >
3
+ <?php _e('This function is disabled in the light verison of Bookly. If you find the plugin useful for your business please consider buying a licence for the full version. It costs just $35 and for this money you will get many useful functions, lifetime free update and excellent support! More information can be found here'); ?>: <a href="http://bookly.ladela.com" target="_blank">http://bookly.ladela.com</a>
4
+ </div>
backend/modules/payment/templates/index.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div class=ab-title><?php _e( 'Payments','ab' ) ?></div>
3
+ <div style="min-width: 800px;margin-right: 15px;">
4
+ <div class=ab-nav-payment>
5
+ <div class=row-fluid>
6
+ <div id=reportrange class="pull-left ab-reportrange" style="margin-bottom: 10px">
7
+ <i class="icon-calendar icon-large"></i>
8
+ <span data-date="<?php echo date( 'F j, Y', strtotime( '-30 day' ) ) ?> - <?php echo date( 'F j, Y' ) ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( '-30 day' ) ) ?> - <?php echo date_i18n( get_option( 'date_format' ) ) ?></span> <b style="margin-top: 8px;" class=caret></b>
9
+ </div>
10
+ <div class=pull-left>
11
+ <select id=ab-type-filter class=selectpicker>
12
+ <option value="-1"><?php _e( 'All payment types', 'ab' ) ?></option>
13
+ <?php foreach ( $types as $type ): ?>
14
+ <option value="<?php esc_attr_e( $type ) ?>"><?php echo $type == 'paypal' ? 'PayPal' : __( 'Local', 'ab' ) ?></option>
15
+ <?php endforeach ?>
16
+ </select>
17
+ <select id=ab-customer-filter class=selectpicker>
18
+ <option value="-1"><?php _e( 'All customers', 'ab' ) ?></option>
19
+ <?php foreach ( $customers as $customer ): ?>
20
+ <option><?php esc_html_e( $customer ) ?></option>
21
+ <?php endforeach ?>
22
+ </select>
23
+ <select id=ab-provider-filter class=selectpicker>
24
+ <option value="-1"><?php _e( 'All providers', 'ab' ) ?></option>
25
+ <?php foreach ( $providers as $provider ): ?>
26
+ <option><?php esc_html_e( $provider ) ?></option>
27
+ <?php endforeach ?>
28
+ </select>
29
+ <select id=ab-service-filter class=selectpicker>
30
+ <option value="-1"><?php _e( 'All services', 'ab' ) ?></option>
31
+ <?php foreach ( $services as $service ): ?>
32
+ <option><?php esc_html_e( $service ) ?></option>
33
+ <?php endforeach ?>
34
+ </select>
35
+ <a id=ab-filter-submit style="margin:0 0 10px 5px;" href="#" class="btn btn-primary"><?php _e( 'Filter', 'ab' ) ?></a>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div id=ab-alert-div class=alert style="display: none"></div>
40
+ <table class="table table-bordered" cellspacing=0 cellpadding=0 border=0 id=ab_payments_list style="clear: both;">
41
+ <thead>
42
+ <tr>
43
+ <th width=150 class="desc active" order-by=created><a href="javascript:void(0)"><?php _e( 'Date', 'ab' ) ?></a></th>
44
+ <th width=100 order-by=type><a href="javascript:void(0)"><?php _e( 'Type', 'ab' ) ?></a></th>
45
+ <th width=150 order-by=customer><a href="javascript:void(0)"><?php _e( 'Customer', 'ab' ) ?></a></th>
46
+ <th width=150 order-by=provider><a href="javascript:void(0)"><?php _e( 'Provider', 'ab' ) ?></a></th>
47
+ <th width=150 order-by=service><a href="javascript:void(0)"><?php _e( 'Service', 'ab' ) ?></a></th>
48
+ <th width=50 order-by=amount><a href="javascript:void(0)"><?php _e( 'Amount', 'ab') ?></a></th>
49
+ <th width=150 order-by=date><a href="javascript:void(0)"><?php _e( 'Appointment Date', 'ab' ) ?></a></th>
50
+ </tr>
51
+ </thead>
52
+ <tbody id=ab-tb-body>
53
+ </tbody>
54
+ </table>
55
+ <?php include '_alert.php'; ?>
56
+ </div>
57
+
58
+ <script type="text/javascript">
59
+ jQuery(function($) {
60
+ var data = {},
61
+ $report_range = $('#reportrange span'),
62
+ picker_ranges = {},
63
+ l10nRanges = {};
64
+
65
+ picker_ranges[BooklyL10n.today] = ['today', 'today'];
66
+ picker_ranges[BooklyL10n.yesterday] = ['yesterday', 'yesterday'];
67
+ picker_ranges[BooklyL10n.last_7] = [Date.today().add({ days: -6 }), 'today'];
68
+ picker_ranges[BooklyL10n.last_30] = [Date.today().add({ days: -30 }), 'today','selected'];
69
+ picker_ranges[BooklyL10n.this_month] = [Date.today().moveToFirstDayOfMonth(), Date.today().moveToLastDayOfMonth()];
70
+ picker_ranges[BooklyL10n.last_month] = [Date.today().moveToFirstDayOfMonth().add({ months: -1 }), Date.today().moveToFirstDayOfMonth().add({ days: -1 })];
71
+
72
+ $('.selectpicker').selectpicker({style: 'btn-info', size: 5});
73
+
74
+
75
+ $('#reportrange').daterangepicker({ranges: picker_ranges}, function(start, end) {
76
+ l10nRanges.l10n(start, end);
77
+ });
78
+
79
+ });
80
+ </script>
backend/modules/service/AB_ServiceController.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include 'forms/AB_CategoryForm.php';
6
+ include 'forms/AB_ServiceForm.php';
7
+
8
+ /**
9
+ * Class AB_ServiceController
10
+ */
11
+ class AB_ServiceController extends AB_Controller {
12
+
13
+ /**
14
+ *
15
+ */
16
+ public function index() {
17
+ $this->staff_collection = $this->getStaffCollection();
18
+ $this->category_collection = $this->getCategoryCollection();
19
+ $this->service_collection = $this->getServiceCollection();
20
+ $this->render( 'index' );
21
+ }
22
+
23
+ /**
24
+ *
25
+ */
26
+ public function executeCategoryServices() {
27
+ $this->setDataForServiceList();
28
+ $this->render( 'list' );
29
+ exit;
30
+ }
31
+
32
+ /**
33
+ *
34
+ */
35
+ public function executeCategoryForm() {
36
+ $this->form = new AB_CategoryForm();
37
+
38
+ if ( count( $this->getPost() ) ) {
39
+ $this->form->bind( $this->getPost() );
40
+ if ( $category = $this->form->save() ) {
41
+ echo "<div class='ab-category-item' data-id='{$category->id}'>
42
+ <span class='left displayed-value'>{$category->name}</span>
43
+ <a href='#' class='left ab-hidden ab-edit'></a>
44
+ <input class=value type=text name=name value='{$category->name}' style='display: none' />
45
+ <a href='#' class='left ab-hidden ab-delete'></a></div>";
46
+ exit;
47
+ }
48
+ }
49
+ exit;
50
+ }
51
+
52
+ /**
53
+ * Update category.
54
+ */
55
+ public function executeUpdateCategory() {
56
+ $form = new AB_CategoryForm();
57
+ $form->bind( $this->getPost() );
58
+ $form->save();
59
+ }
60
+
61
+ /**
62
+ * Delete category.
63
+ */
64
+
65
+
66
+ public function executeDeleteCategory() {
67
+ $category = new AB_Category();
68
+ $category->set( 'id', $this->getParameter( 'id', 0 ) );
69
+ $category->delete();
70
+ }
71
+
72
+
73
+ public function executeAddService() {
74
+ $form = new AB_ServiceForm();
75
+ $form->bind( $this->getPost() );
76
+ $service = $form->save();
77
+ $this->setDataForServiceList( $service->get( 'category_id' ) );
78
+ $this->render( 'list' );
79
+ exit;
80
+ }
81
+
82
+ public function executeRemoveServices() {
83
+ $_post = $this->getPost();
84
+ $service_ids = isset( $_post['service_ids'] ) ? $_post['service_ids'] : array();
85
+ if ( is_array( $service_ids ) && ! empty( $service_ids ) ) {
86
+ $this->getWpdb()->query('DELETE FROM ab_service WHERE id IN (' . implode(', ', $service_ids) . ')');
87
+ }
88
+ }
89
+
90
+ public function executeAssignStaff() {
91
+ $_post = $this->getPost();
92
+ $service_id = isset( $_post['service_id'] ) ? $_post['service_id'] : 0;
93
+ $staff_ids = isset( $_post['staff_ids'] ) ? $_post['staff_ids'] : array();
94
+
95
+ if ( $service_id ) {
96
+ $wpDb = $this->getWpdb();
97
+ $wpDb->query( $wpDb->prepare( 'DELETE FROM ab_staff_service WHERE service_id = %d', $service_id ) );
98
+ $service = new AB_Service();
99
+ if ( ! empty( $staff_ids ) && $service->load( $service_id ) ) {
100
+ foreach ( $staff_ids as $staff_id ) {
101
+ $staff_service = new AB_StaffService();
102
+ $staff_service->set( 'staff_id', $staff_id );
103
+ $staff_service->set( 'service_id', $service_id );
104
+ $staff_service->set( 'price', $service->get( 'price' ) );
105
+ $staff_service->save();
106
+ }
107
+ }
108
+ echo count( $staff_ids );
109
+ exit;
110
+ }
111
+ }
112
+
113
+ public function executeUpdateServiceValue() {
114
+ $form = new AB_ServiceForm();
115
+ $form->bind($this->getPost());
116
+ $form->save();
117
+ }
118
+
119
+ private function setDataForServiceList( $category_id = 0 ) {
120
+ if (!$category_id) {
121
+ $category_id = isset( $_GET['category_id'] ) ? intval( $_GET['category_id'] ) : 0;
122
+ }
123
+
124
+ $this->service_collection = $this->getServiceCollection($category_id);
125
+ $this->staff_collection = $this->getStaffCollection();
126
+ $this->category_collection = $this->getCategoryCollection();
127
+ }
128
+
129
+ private function getCategoryCollection() {
130
+ return $this->getWpdb()->get_results( "SELECT * FROM ab_category" );
131
+ }
132
+
133
+ private function getStaffCollection() {
134
+ return $this->getWpdb()->get_results( "SELECT * FROM ab_staff" );
135
+ }
136
+
137
+ private function getServiceCollection( $id = 0 ) {
138
+ if ( $id ) {
139
+ $query = $this->getWpdb()->prepare(
140
+ 'SELECT
141
+ service.*,
142
+ COUNT(staff.id) AS "total_staff",
143
+ GROUP_CONCAT(DISTINCT staff.id) AS "staff_ids"
144
+ FROM ab_service service
145
+ LEFT JOIN ab_staff_service staff_service ON service.id = staff_service.service_id
146
+ LEFT JOIN ab_staff staff ON staff.id = staff_service.staff_id
147
+ WHERE service.category_id = %d
148
+ GROUP BY service.id, "total_staff"',
149
+ $id
150
+ );
151
+ } else {
152
+ $query = 'SELECT
153
+ service.*,
154
+ COUNT(staff.id) AS "total_staff",
155
+ GROUP_CONCAT(DISTINCT staff.id) AS "staff_ids"
156
+ FROM ab_service service
157
+ LEFT JOIN ab_staff_service staff_service ON service.id = staff_service.service_id
158
+ LEFT JOIN ab_staff staff ON staff.id = staff_service.staff_id
159
+ GROUP BY service.id, "total_staff"';
160
+ }
161
+ return $this->getWpdb()->get_results($query);
162
+ }
163
+
164
+ // Protected methods.
165
+
166
+ /**
167
+ * Override parent method to add 'wp_ajax_ab_' prefix
168
+ * so current 'execute*' methods look nicer.
169
+ */
170
+ protected function registerWpActions( $prefix = '' ) {
171
+ parent::registerWpActions( 'wp_ajax_ab_' );
172
+ }
173
+
174
+ }
backend/modules/service/forms/AB_CategoryForm.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ /**
6
+ * Class AB_CategoryForm
7
+ */
8
+ class AB_CategoryForm extends AB_Form {
9
+
10
+ /**
11
+ * Constructor.
12
+ */
13
+ public function __construct() {
14
+ parent::$entity_class = 'AB_Category';
15
+ parent::__construct();
16
+ }
17
+
18
+ /**
19
+ * Configure the form.
20
+ */
21
+ public function configure() {
22
+ $this->setFields( array( 'name' ) );
23
+ }
24
+
25
+ }
backend/modules/service/forms/AB_ServiceForm.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include dirname(__FILE__) . '/../../../../lib/entities/AB_Service.php';
6
+
7
+ /**
8
+ * Class AB_ServiceForm
9
+ */
10
+ class AB_ServiceForm extends AB_Form {
11
+
12
+ /**
13
+ * Constructor.
14
+ */
15
+ public function __construct() {
16
+ parent::$entity_class = 'AB_Service';
17
+ parent::__construct();
18
+ }
19
+
20
+ public function configure() {
21
+ $this->setFields(array('id', 'title', 'duration', 'price', 'category_id', 'color'));
22
+ }
23
+
24
+ /**
25
+ * Bind values to form.
26
+ *
27
+ * @param array $post
28
+ * @param array $files
29
+ */
30
+ public function bind( array $post, array $files = array() ) {
31
+ if ( array_key_exists('category_id', $post) && !$post['category_id'] ) {
32
+ $post['category_id'] = null;
33
+ }
34
+ parent::bind($post, $files);
35
+ }
36
+
37
+ public function save() {
38
+ if ( $this->isNew() ) {
39
+ $colors = array('#B0171F', '#DA70D6', '#BF3EFF', '#8470FF', '#4876FF', '#63B8FF', '#00B2EE', '#00F5FF', '#00C78C', '#BDFCC9', '#B4EEB4', '#7CFC00', '#ADFF2F', '#FFFFF0', '#CDCDB4', '#FFFF00', '#FFF68F', '#F0E68C', '#E3CF57', '#FFEBCD', '#FF8C00', '#EE4000', '#FA8072', '#F08080', '#CD0000');
40
+ // when adding new service - set its color randomly
41
+ $this->data[ 'color' ] = $colors[mt_rand(0, count($colors) - 1)];
42
+ }
43
+
44
+ return parent::save();
45
+ }
46
+ }
backend/modules/service/resources/css/service.css ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ab-category-item {
2
+ width: 110px;
3
+ padding: 10px;
4
+ padding-left: 50px;
5
+ vertical-align: middle;
6
+ -moz-border-radius: 5px;
7
+ border-radius: 5px;
8
+ cursor: pointer;
9
+ }
10
+ .ab-active {
11
+ background-color: #ccc;
12
+ }
13
+
14
+ .wp-picker-container .iris-picker {
15
+ border-color: black;
16
+ margin-left: 35px;
17
+ margin-top: 6px;
18
+ }
19
+
20
+ #services_list .service-color-wrapper .wp-picker-open + .wp-picker-input-wrap {
21
+ display: block;
22
+ margin-left: 50px;
23
+ margin-top: 20px;
24
+ }
25
+
26
+ .wp-picker-container, .wp-picker-container:active {
27
+ display: inline-block;
28
+ outline: 0 none;
29
+ position: absolute;
30
+ margin-top: 3px;
31
+ }
32
+
33
+ /** Services list **/
34
+ #ab_services_wrapper .list-wrapper { min-width: 590px }
35
+ #ab_services_wrapper .list-wrapper .list-actions { overflow: hidden; margin-top: 10px; }
36
+ #ab_services_wrapper .list-wrapper .list-actions .add-service { float: left }
37
+ #ab_services_wrapper .list-wrapper .list-actions .delete { float: right }
38
+
39
+ #services_list td.last,
40
+ #services_list th.last { width: 16px; vertical-align: middle; }
41
+ #services_list th, #services_list td { padding:5px }
42
+ #services_list select { width: auto; margin: 0; }
43
+ #services_list .service-color-cell { width: 28px; }
44
+ #services_list .service-color-wrapper .wp-color-result { padding-left: 25px; margin: 0; top: auto; }
45
+ #services_list .service-color-wrapper .wp-color-result.wp-picker-open { top: auto }
46
+ #services_list .service-color-wrapper .wp-color-result:after { top: auto; content: none; }
47
+ #services_list .service-color-wrapper .wp-color-result.wp-picker-open:after { content: none }
48
+ #services_list .service-color-wrapper .wp-picker-open + .wp-picker-input-wrap { display: block; visibility: hidden; margin-top: -25px; margin-left: 34px; }
49
+ #services_list .service-color-wrapper .button { margin-left: 0 }
50
+
51
+ #new_category_popup .ab-popup { width: 187px }
52
+ .staff-popup-wrapper .staff-row { white-space: nowrap; margin: 0; }
53
+
backend/modules/service/resources/js/service.js ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+ var $no_result = $('#ab_services_wrapper .no-result');
3
+
4
+ // On new category form submit.
5
+ $('#new-category-form').on('submit', function(event) {
6
+ var data = $(this).serialize();
7
+ $.post(ajaxurl, data, function(response) {
8
+ $('.ab-category-item-list').append(response);
9
+ $('#new_category_popup').ab_popup('close');
10
+ // add created category to services
11
+ $.each($('#services_list').find('select[name="category_id"]'), function(key, value) {
12
+ var $new_category = $('.ab-category-item:last');
13
+ $(value).append('<option value="' + $new_category.data('id') + '">'
14
+ + $new_category.find('input').val() + ' </option>');
15
+ });
16
+ });
17
+ return false;
18
+ });
19
+
20
+ // Preventing multiple creation of new category by pressing Enter-key
21
+ $('input[value="ab_category_form"]').parent().find('input:first').one('keypress', function(e) {
22
+ var code = (e.keyCode ? e.keyCode : e.which);
23
+ if (code == 13) {
24
+ $(this).trigger(e).blur();
25
+ }
26
+ });
27
+
28
+ // Categories list delegated events.
29
+ $('#ab-categories-list')
30
+
31
+ // On category item click.
32
+ .on('click', '.ab-category-item', function() {
33
+ var $clicked = $(this);
34
+ $.get(ajaxurl, {action:'ab_category_services', category_id: $clicked.data('id')}, function(response) {
35
+ $('.ab-category-item').not($clicked).removeClass('ab-active');
36
+ $('.ab-category-title').text($clicked.text());
37
+ $clicked.addClass('ab-active');
38
+ refreshList(response);
39
+ });
40
+ })
41
+
42
+ // On edit category click.
43
+ .on('click', '.ab-category-item .ab-edit', function(e) {
44
+ // Keep category item click from being executed.
45
+ e.stopPropagation();
46
+ // Prevent navigating to '#'.
47
+ e.preventDefault();
48
+ // Hide edit button.
49
+ $(this).hide()
50
+ // Hide displayed category name and delete button.
51
+ .siblings('.displayed-value, .ab-delete').hide().end()
52
+ // Show input field.
53
+ .nextAll('.value').show().focus();
54
+ })
55
+
56
+ // On blur of category edit input.
57
+ .on('blur', '.ab-category-item input.value', function() {
58
+ var $this = $(this),
59
+ $item = $this.closest('.ab-category-item'),
60
+ field = $this.attr('name'),
61
+ value = $this.attr('value'),
62
+ id = $item.data('id');
63
+ if (value) {
64
+ var data = { action: 'ab_update_category', id: id };
65
+ data[field] = value;
66
+ $.post(ajaxurl, data, function(response) {
67
+ // Hide input field.
68
+ $this.hide()
69
+ // Show modified category name.
70
+ .prevAll('.displayed-value').text(value).show().end()
71
+ // Show edit and delete buttons.
72
+ .siblings('.ab-edit, .ab-delete').show();
73
+ // update edited category's name for services
74
+ $.each($('#services_list').find('select[name="category_id"]'), function(k, v) {
75
+ $(v).find('option:selected[value="' + id + '"]').text(value);
76
+ });
77
+ });
78
+ }
79
+ })
80
+
81
+ // On delete category click.
82
+ .on('click', '.ab-category-item .ab-delete', function(e) {
83
+ // Keep category item click from being executed.
84
+ e.stopPropagation();
85
+ // Prevent navigating to '#'.
86
+ e.preventDefault();
87
+ // Ask user if he is sure.
88
+ if (confirm(BooklyL10n.are_you_sure)) {
89
+ var $item = $(this).closest('.ab-category-item');
90
+ var data = { action: 'ab_delete_category', id: $item.data('id') };
91
+ $.post(ajaxurl, data, function(response) {
92
+ // Remove category item from Services
93
+ $.each($('#services_list').find('select[name="category_id"]'), function(key, value) {
94
+ $(value).find('option[value="' + $item.data('id') + '"]').remove();
95
+ });
96
+ // Remove category item from DOM.
97
+ $item.remove();
98
+ if ($item.is('.ab-active')) {
99
+ location.reload(true);
100
+ }
101
+ });
102
+ }
103
+ });
104
+
105
+
106
+ // Services list delegated events.
107
+ $('#ab_services_wrapper')
108
+
109
+ // On click on editable cell.
110
+ .on('click', '.editable-cell div.displayed-value', function() {
111
+ var $this = $(this);
112
+ $this.hide().next('.value').show();
113
+ // Fix FF accidental blur of input[type=number].
114
+ setTimeout( function() { $this.next('.value').focus(); }, 100 );
115
+ })
116
+
117
+ // On blur of input in editable cell.
118
+ .on('blur', '.editable-cell input.value', function() {
119
+ var $this = $(this),
120
+ field = $this.attr('name'),
121
+ value = $this.attr('value'),
122
+ id = $this.parents('.service-row').attr('id');
123
+ if (value) {
124
+ var data = { action: 'ab_update_service_value', id: id };
125
+ data[field] = value;
126
+ $.post(ajaxurl, data, function(response) {
127
+ $this.hide();
128
+ $this.prev('.displayed-value').text(value).show();
129
+ });
130
+ }
131
+ })
132
+
133
+ // On change in 'Duration' or 'Category' drop-down lists.
134
+ .on('change', 'select', function() {
135
+ var $this = $(this),
136
+ field = $this.attr('name'),
137
+ value = $this.val(),
138
+ $row = $this.parents('.service-row'),
139
+ id = $row.attr('id');
140
+ if (value) {
141
+ var data = { action: 'ab_update_service_value', id: id };
142
+ data[field] = value;
143
+ $.post(ajaxurl, data, function(response) {
144
+ if ($this.attr('name') == 'category_id') {
145
+ var services_category_id = parseInt($('.ab-category-item.ab-active').data('id')),
146
+ selected_category_id = parseInt(value);
147
+ if (services_category_id && selected_category_id != services_category_id) {
148
+ if ($('#services_list > tbody > tr').length == 1) {
149
+ $('#services_list > tbody > tr').remove();
150
+ $('#services_list').hide();
151
+ $no_result.show();
152
+ } else {
153
+ $row.removeClass('last').prev().addClass('last');
154
+ $row.remove();
155
+ }
156
+ }
157
+ }
158
+ });
159
+ }
160
+ })
161
+
162
+ // On click on 'Add Service' button.
163
+ .on('click', 'a.add-service', function(e) {
164
+ e.preventDefault();
165
+ var selected_category_id = $('#ab-categories-list .ab-active').data('id'),
166
+ data = { action: 'ab_add_service' };
167
+ if (selected_category_id) {
168
+ data['category_id'] = selected_category_id;
169
+ }
170
+ $.post(ajaxurl, data, function(response) {
171
+ refreshList(response);
172
+ });
173
+ })
174
+
175
+ // On change in `select row` checkbox.
176
+ .on('change', 'input.row-checker', function() {
177
+ if ($(this).attr('checked')) {
178
+ $(this).parents('.service-row').addClass('checked');
179
+ } else {
180
+ $(this).parents('.service-row').removeClass('checked');
181
+ }
182
+ })
183
+
184
+ // On click on 'Delete' button.
185
+ .on('click', 'a.delete', function(e){
186
+ e.preventDefault();
187
+ var $checked_rows = $('#services_list .service-row.checked');
188
+ if (!$checked_rows.length) {
189
+ alert(BooklyL10n.please_select_at_least_one_service);
190
+ return false;
191
+ }
192
+ var selected_category_id = $('#ab-categories-list .ab-active').data('id'),
193
+ data = { action: 'ab_remove_services' },
194
+ row_ids = [];
195
+ $checked_rows.each(function() {
196
+ row_ids.push($(this).attr('id'));
197
+ });
198
+ if (selected_category_id) {
199
+ data['category_id'] = selected_category_id;
200
+ }
201
+ data['service_ids[]'] = row_ids;
202
+ $.post(ajaxurl, data, function() {
203
+ $checked_rows.fadeOut(700, function() {
204
+ $(this).each(function() {
205
+ if ($(this).hasClass('last')) {
206
+ $(this).removeClass('last').prev().addClass('last');
207
+ }
208
+ });
209
+ $(this).remove();
210
+ $('#services_list .service-row').removeClass('even odd').each(function(index, value) {
211
+ if (index % 2) {
212
+ $(this).addClass('even');
213
+ } else {
214
+ $(this).addClass('odd');
215
+ }
216
+ });
217
+ if (!$('#services_list > tbody > tr').length) {
218
+ $('#services_list').hide();
219
+ $no_result.show();
220
+ }
221
+ });
222
+ });
223
+ })
224
+
225
+ // On change in `select staff` checkbox.
226
+ .on('change', 'input.all-staff, input.staff', function(){
227
+ var $this = $(this),
228
+ $row = $this.parents('.service-row'),
229
+ staff_ids = [],
230
+ data = { action: 'ab_assign_staff', service_id: $row.attr('id') };
231
+ if ($this.hasClass('all-staff')) {
232
+ $row.find('.staff').prop('checked', $this.prop('checked'));
233
+ } else {
234
+ $row.find('.all-staff').prop(
235
+ 'checked',
236
+ $row.find('.staff:not(:checked)').length == 0
237
+ );
238
+ }
239
+ $row.find('.staff:checked').each(function(){
240
+ staff_ids.push($(this).val());
241
+ });
242
+ data['staff_ids[]'] = staff_ids;
243
+ $.post(ajaxurl, data, function(response) {
244
+ if (response) {
245
+ $row.find('.staff-count').text(response);
246
+ }
247
+ });
248
+ });
249
+
250
+ function refreshList(response) {
251
+ var $list = $('#ab-services-list');
252
+ $list.html(response);
253
+ doNotCloseDropDowns();
254
+ initColorPicker($list.find('.service-color'));
255
+
256
+ if (response) {
257
+ $no_result.hide();
258
+ } else {
259
+ $no_result.show();
260
+ }
261
+ }
262
+
263
+ function initColorPicker($jquery_collection) {
264
+ $jquery_collection.wpColorPicker({
265
+ change: function() {
266
+ var data = {
267
+ action :'ab_update_service_value',
268
+ id : $(this).parents('.service-row').first().attr('id')
269
+ };
270
+ data['color'] = $(this).wpColorPicker('color');
271
+ $.post(ajaxurl, data);
272
+ }
273
+ });
274
+ }
275
+
276
+ function doNotCloseDropDowns() {
277
+ $('#ab-services-list .dropdown-menu').on('click', function(e) {
278
+ e.stopPropagation();
279
+ });
280
+ }
281
+
282
+ initColorPicker($('.service-color'));
283
+ doNotCloseDropDowns();
284
+
285
+ $.ajaxSetup({
286
+ mode: 'abort',
287
+ port: 'ab_service'
288
+ });
289
+ });
backend/modules/service/templates/index.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div class="ab-title"><?php _e('Services', 'ab') ?></div>
3
+ <div style="min-width: 800px;">
4
+ <div class="ab-left-bar">
5
+ <div id="ab-categories-list">
6
+ <div class="ab-category-item ab-active ab-main-category-item" data-id=""><?php _e('All Services','ab') ?></div>
7
+ <div class="ab-category-item-list">
8
+ <?php if (count($category_collection)): ?>
9
+ <?php foreach ($category_collection as $category):?>
10
+ <div class="ab-category-item" data-id="<?php echo $category->id ?>">
11
+ <span class="left displayed-value"><?php esc_html_e( $category->name ) ?></span>
12
+ <a href="#" class="left ab-hidden ab-edit"></a>
13
+ <input class="value ab-value" type="text" name="name" value="<?php esc_attr_e( $category->name ) ?>" style="display: none" />
14
+ <a href="#" class="left ab-hidden ab-delete"></a>
15
+ </div>
16
+ <?php endforeach ?>
17
+ <?php endif ?>
18
+ </div>
19
+ </div>
20
+ <input type="hidden" id="color" />
21
+ <div id="new_category_popup" class="ab-popup-wrapper">
22
+ <input class="btn btn-info ab-popup-trigger" data- type="submit" value="<?php _e('New Category','ab') ?>" />
23
+ <div class="ab-popup" style="display: none">
24
+ <div class="ab-arrow"></div>
25
+ <div class="ab-content">
26
+ <form method="post" id="new-category-form">
27
+ <table class="form-horizontal">
28
+ <tr>
29
+ <td>
30
+ <input class="ab-clear-text" style="width: 170px" type="text" name="name" />
31
+ <input type="hidden" name="action" value="ab_category_form" />
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <td>
36
+ <input type="submit" class="btn btn-info ab-popup-save ab-update-button" value="<?php _e('Save category','ab') ?>" />
37
+ <a class="ab-popup-close" href="#"><?php _e('Cancel','ab') ?></a>
38
+ </td>
39
+ </tr>
40
+ </table>
41
+ <a class="ab-popup-close ab-popup-close-icon" href="#"></a>
42
+ </form>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <div class="ab-right-content" id="ab_services_wrapper">
48
+ <h2 class="ab-category-title"><?php _e('All services','ab') ?></h2>
49
+ <div class="no-result"<?php if (count($category_collection)) : ?> style="display: none"<?php endif; ?>><?php _e( 'No services found. Please add services.','ab' ) ?></div>
50
+ <div class="list-wrapper">
51
+ <div id="ab-services-list">
52
+ <?php include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'list.php' ?>
53
+ </div>
54
+ <div class="list-actions">
55
+ <a class="add-service btn btn-info" href="#"><?php _e('Add Service','ab') ?></a>
56
+ <a class="delete btn btn-info" href="#"><?php _e('Delete','ab') ?></a>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
backend/modules/service/templates/list.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <?php if ( count( $service_collection ) ) : ?>
3
+ <table class="table table-striped" cellspacing="0" cellpadding="0" border="0" id="services_list">
4
+ <thead>
5
+ <tr>
6
+ <th class="first">&nbsp;</th>
7
+ <th><?php echo _e( 'Title', 'ab' ) ?></th>
8
+ <th width='95'><?php echo _e( 'Duration', 'ab' ) ?></th>
9
+ <th><?php echo _e( 'Price', 'ab' ) ?></th>
10
+ <th width='65'><?php echo _e( 'Staff', 'ab' ) ?></th>
11
+ <th><?php echo _e( 'Category', 'ab' ) ?></th>
12
+ <th class="last">&nbsp;</th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ <?php
17
+ foreach ( $service_collection as $i => $service ) {
18
+ $row_class = 'service-row ';
19
+ $row_class .= $i % 2 ? 'even' : 'odd';
20
+ if ( 0 == $i ) {
21
+ $row_class .= ' first';
22
+ }
23
+ if ( ! isset( $service_collection[$i + 1] ) ) {
24
+ $row_class .= ' last';
25
+ }
26
+ include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'list_item.php';
27
+ }
28
+ ?>
29
+ </tbody>
30
+ </table>
31
+ <?php endif ?>
backend/modules/service/templates/list_item.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <tr id="<?php echo $service->id ?>" class="<?php echo $row_class ?>">
3
+ <td class="first service-color-cell">
4
+ <div class="service-color-wrapper">
5
+ <input type="hidden" class="service-color" name="color" value="<?php echo $service->color ?>" />
6
+ </div>
7
+ </td>
8
+ <td class="title editable-cell">
9
+ <?php if ( $service->title ) : ?>
10
+ <div class="displayed-value"><?php esc_html_e( $service->title ) ?></div>
11
+ <input class="value ab-value" type="text" name="title" value="<?php esc_attr_e( $service->title ) ?>" style="display: none" />
12
+ <?php else : ?>
13
+ <div class="displayed-value" style="display: none"></div>
14
+ <input class="value ab-value" type="text" name="title" />
15
+ <?php endif; ?>
16
+ </td>
17
+ <td>
18
+ <select name="duration">
19
+ <?php
20
+ $time_interval = get_option( 'ab_settings_time_slot_length' );
21
+ ?>
22
+ <!-- Build service duration choices with the range from Time Interval Option to 12. -->
23
+ <?php for ( $j = $time_interval; $j <= 720; $j += $time_interval ) : ?>
24
+ <?php
25
+ $duration = $j * 60;
26
+ $duration_output = AB_Service::durationToString( $duration );
27
+ $selected = $service->duration == $duration ? ' selected="selected"' : '';
28
+ ?>
29
+ <option value="<?php echo $duration ?>"<?php echo $selected ?>>
30
+ <?php echo $duration_output ?>
31
+ </option>
32
+ <?php endfor; ?>
33
+ </select>
34
+ </td>
35
+ <td align='right' class="editable-cell price">
36
+ <div class="displayed-value ab-rtext"><?php echo $service->price ?></div>
37
+ <?php if ( $service->price ) : ?>
38
+ <input class="value ab-text-focus" type="number" min="0.00" step="any" name="price" value="<?php esc_attr_e( $service->price ) ?>" style="display: none" />
39
+ <?php else : ?>
40
+ <input class="value ab-text-focus" type="number" min="0.00" step="any" name="price" />
41
+ <?php endif; ?>
42
+ </td>
43
+ <td>
44
+ <?php if ( count( $staff_collection ) ) : ?>
45
+ <div class="btn-group">
46
+ <?php
47
+ $assigned_staff_ids = $service->staff_ids ? explode(',', $service->staff_ids) : array();
48
+ $all_staff_selected = count( $assigned_staff_ids ) == count( $staff_collection );
49
+ ?>
50
+ <button class="btn btn-info"><i class="icon-user icon-white"></i> <span class=staff-count><?php echo $service->total_staff ?></span></button>
51
+ <button class="btn btn-info dropdown-toggle" data-toggle="dropdown">
52
+ <span class="caret"></span>
53
+ </button>
54
+ <ul class="dropdown-menu">
55
+ <li>
56
+ <a href="javascript:void(0)">
57
+ <input type="checkbox" id="service_<?php echo $service->id ?>_all_staff" class="all-staff"<?php if ( $all_staff_selected ) : ?> checked="checked" <?php endif; ?> />
58
+ <label class="inline" for="service_<?php echo $service->id ?>_all_staff"><?php _e('All staff','ab') ?></label>
59
+ </a>
60
+ </li>
61
+ <?php foreach ( $staff_collection as $i => $staff ) : ?>
62
+ <li>
63
+ <a href="javascript:void(0)" style="padding-left: 30px">
64
+ <?php $staff_checked = in_array( $staff->id, $assigned_staff_ids ) ?>
65
+ <input type="checkbox" name="staff_ids[]" class="staff" id="service_<?php echo $service->id ?>_staff_<?php echo $i ?>" value="<?php echo $staff->id ?>"<?php if ( $staff_checked ) : ?> checked="checked"<?php endif; ?>/>
66
+ <label class="inline" for="service_<?php echo $service->id ?>_staff_<?php echo $i ?>">
67
+ <?php esc_html_e( $staff->full_name ) ?>
68
+ </label>
69
+ </a>
70
+ </li>
71
+ <?php endforeach; ?>
72
+ </ul>
73
+ </div>
74
+ <?php else : ?>
75
+ &nbsp;
76
+ <?php endif; ?>
77
+ </td>
78
+ <td>
79
+ <?php if ( count( $category_collection ) ) : ?>
80
+ <select name="category_id">
81
+ <option value="0"></option>
82
+ <?php foreach ( $category_collection as $category ) : ?>
83
+ <?php $selected = $category->id == $service->category_id ? ' selected="selected"' : '' ?>
84
+ <option value="<?php echo $category->id ?>"<?php echo $selected ?>>
85
+ <?php esc_html_e( $category->name ) ?>
86
+ </option>
87
+ <?php endforeach; ?>
88
+ </select>
89
+ <?php else: ?>
90
+ &nbsp;
91
+ <?php endif; ?>
92
+ </td>
93
+ <td class="last">
94
+ <input type="checkbox" class="row-checker" />
95
+ </td>
96
+ </tr>
backend/modules/settings/AB_SettingsController.php ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include 'forms/AB_CompanyForm.php';
6
+ include 'forms/AB_PaymentsForm.php';
7
+ include 'forms/AB_BusinessHoursForm.php';
8
+
9
+ /**
10
+ * Class AB_SettingsController
11
+ */
12
+ class AB_SettingsController extends AB_Controller {
13
+
14
+ public function index() {
15
+ // save the settings
16
+ if ( count( $this->getPost() ) ) {
17
+ // Payments form
18
+ if ( isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] == '_payments' ) {
19
+ $this->form = new AB_PaymentsForm();
20
+ $this->message_p = __( 'Settings saved.', 'ab' );
21
+
22
+ // Business hours form
23
+ } elseif ( isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] == '_hours' ) {
24
+ $this->form = new AB_BusinessHoursForm();
25
+ $this->message_h = __( 'Settings saved.', 'ab' );
26
+ }
27
+ // Purchase Code Form
28
+ elseif ( isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] == '_purchase_code' ) {
29
+ update_option( 'ab_envato_purchase_code', esc_html( $this->getParameter( 'ab_envato_purchase_code' ) ) );
30
+ $this->message_pc = __( 'Settings saved.', 'ab' );
31
+ } elseif ( isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] == '_general' ) {
32
+ $ab_settings_time_slot_length = $this->getParameter( 'ab_settings_time_slot_length' );
33
+ if ( in_array( $ab_settings_time_slot_length, array( 10, 15, 20, 30, 60 ) ) ) {
34
+ update_option( 'ab_settings_time_slot_length', $ab_settings_time_slot_length );
35
+ }
36
+ update_option( 'ab_settings_no_current_day_appointments', (int)$this->getParameter( 'ab_settings_no_current_day_appointments' ) );
37
+ update_option( 'ab_settings_use_client_time_zone', (int)$this->getParameter( 'ab_settings_use_client_time_zone' ) );
38
+ update_option( 'ab_settings_cancel_page_url', $this->getParameter( 'ab_settings_cancel_page_url' ) );
39
+ $this->message_g = __( 'Settings saved.', 'ab' );
40
+ }
41
+ // Holidays form
42
+ elseif ( isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] == '_holidays' ) {
43
+ // Company form
44
+ } else {
45
+ $this->form = new AB_CompanyForm();
46
+ $this->message_c = __( 'Settings saved.', 'ab' );
47
+ }
48
+ if ( isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] != '_purchase_code' && $_GET[ 'type' ] != '_holidays'
49
+ && $_GET[ 'type' ] != '_import' && $_GET[ 'type' ] != '_general' ) {
50
+ $this->form->bind( $this->getPost(), $_FILES );
51
+ $this->form->save();
52
+ }
53
+ }
54
+
55
+ // get holidays
56
+ $this->holidays = $this->getHolidays();
57
+
58
+ $this->render( 'index' );
59
+ } // index
60
+
61
+ /**
62
+ * Ajax request for Holidays calendar
63
+ */
64
+ public function executeSettingsHoliday() {
65
+ $id = $this->getParameter( 'id', false );
66
+ $holiday = $this->getParameter( 'holiday' ) == 'true';
67
+ $repeat = $this->getParameter( 'repeat' ) == 'true';
68
+ $day = $this->getParameter( 'day', false );
69
+
70
+ // update or delete the event
71
+ if ( $id ) {
72
+ if ( $holiday ) {
73
+ $this->getWpdb()->update( 'ab_holiday', array('repeat_event' => intval( $repeat ) ), array( 'id' => $id ), array( '%d' ) );
74
+ $this->getWpdb()->update( 'ab_holiday', array( 'repeat_event' => intval( $repeat ) ), array( 'parent_id' => $id ), array( '%d' ) );
75
+ } else {
76
+ $this->getWpdb()->delete( 'ab_holiday', array( 'id' => $id ), array( '%d' ) );
77
+ $this->getWpdb()->delete( 'ab_holiday', array( 'parent_id' => $id ), array( '%d' ) );
78
+ }
79
+ // add the new event
80
+ } elseif ( $holiday && $day ) {
81
+ $day = new DateTime( $day );
82
+ $this->getWpdb()->insert( 'ab_holiday', array( 'holiday' => $day->format( 'Y-m-d H:i:s' ), 'repeat_event' => intval( $repeat ) ), array( '%s', '%d' ) );
83
+ $parent_id = $this->getWpdb()->insert_id;
84
+ $staff = $this->getWpdb()->get_results( 'SELECT id FROM ab_staff' );
85
+ foreach ( $staff as $employee ) {
86
+ $this->getWpdb()->insert( 'ab_holiday',
87
+ array(
88
+ 'holiday' => date( 'Y-m-d H:i:s', $day->format( 'U' ) ),
89
+ 'repeat_event' => intval( $repeat ),
90
+ 'staff_id' => $employee->id,
91
+ 'parent_id' => $parent_id
92
+ ),
93
+ array( '%s', '%d', '%d' )
94
+ );
95
+ }
96
+ }
97
+
98
+ // and return refreshed events
99
+ echo $this->getHolidays();
100
+ exit;
101
+ }
102
+
103
+ protected function getHolidays() {
104
+ $collection = $this->getWpdb()->get_results( "SELECT * FROM ab_holiday WHERE staff_id IS NULL" );
105
+ $holidays = array();
106
+ if ( count( $collection ) ) {
107
+ foreach ( $collection as $holiday ) {
108
+ $holidays[ $holiday->id ] = array(
109
+ 'm' => intval( date( 'm', strtotime( $holiday->holiday ) ) ),
110
+ 'd' => intval( date( 'd', strtotime( $holiday->holiday ) ) ),
111
+ 'title' => $holiday->title,
112
+ );
113
+ // if not repeated holiday, add the year
114
+ if ( ! $holiday->repeat_event ) {
115
+ $holidays[ $holiday->id ][ 'y' ] = intval( date( 'Y', strtotime( $holiday->holiday ) ) );
116
+ }
117
+ }
118
+ }
119
+
120
+ return json_encode( (object) $holidays );
121
+ }
122
+
123
+ /**
124
+ * Show admin notice about purchase code and license.
125
+ */
126
+ public function showAdminNotice() {
127
+ global $current_user;
128
+
129
+ if ( !get_user_meta( $current_user->ID, 'ab_dismiss_admin_notice', true ) &&
130
+ get_option( 'ab_envato_purchase_code' ) == '' &&
131
+ time() > get_option( 'ab_installation_time' ) + 7*24*60*60
132
+ ) {
133
+ $this->render( 'admin_notice' );
134
+ }
135
+ }
136
+
137
+ /**
138
+ * Ajax request to dismiss admin notice for current user.
139
+ */
140
+ public function executeDismissAdminNotice() {
141
+ global $current_user;
142
+
143
+ update_user_meta( $current_user->ID, 'ab_dismiss_admin_notice', 1 );
144
+ }
145
+
146
+ /**
147
+ * Override parent method to add 'wp_ajax_ab_' prefix
148
+ * so current 'execute*' methods look nicer.
149
+ */
150
+ protected function registerWpActions( $prefix = '' ) {
151
+ parent::registerWpActions( 'wp_ajax_ab_' );
152
+ }
153
+ }
backend/modules/settings/forms/AB_BusinessHoursForm.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class AB_BusinessHoursForm extends AB_Form {
6
+
7
+ public function __construct() {
8
+ $this->setFields(array(
9
+ 'ab_settings_monday_start',
10
+ 'ab_settings_monday_end',
11
+ 'ab_settings_tuesday_start',
12
+ 'ab_settings_tuesday_end',
13
+ 'ab_settings_wednesday_start',
14
+ 'ab_settings_wednesday_end',
15
+ 'ab_settings_thursday_start',
16
+ 'ab_settings_thursday_end',
17
+ 'ab_settings_friday_start',
18
+ 'ab_settings_friday_end',
19
+ 'ab_settings_saturday_start',
20
+ 'ab_settings_saturday_end',
21
+ 'ab_settings_sunday_start',
22
+ 'ab_settings_sunday_end',
23
+ ));
24
+ }
25
+
26
+ public function save() {
27
+
28
+ foreach ( $this->data as $field => $value ) {
29
+ update_option( $field, $value );
30
+ }
31
+ }
32
+
33
+ public function renderField($field_name = 'ab_settings_monday', $is_start = true) {
34
+
35
+ $time_format = get_option( 'time_format' );
36
+ $ts_length = get_option( 'ab_settings_time_slot_length' );
37
+ $time_output = new DateTime( AB_StaffScheduleItem::WORKING_START_TIME, new DateTimeZone( 'UTC' ) );
38
+ $time_end = new DateTime( AB_StaffScheduleItem::WORKING_END_TIME, new DateTimeZone( 'UTC' ) );
39
+ $ts_length = '+' . $ts_length . ' min';
40
+ $option_name = $field_name . ( $is_start ? '_start' : '_end' );
41
+ $class_name = $is_start ? 'select_start' : 'select_end';
42
+ $selected_value = get_option( $option_name );
43
+ $output = "<select name={$option_name} class={$class_name}>";
44
+
45
+ if( $is_start ) $output .= "<option value=''>" . __( 'OFF','ab' ) . "</option>";
46
+
47
+ while ( $time_output <= $time_end ) {
48
+ $value = $time_output->format( 'H:i' );
49
+ $op_name = $time_output->format( $time_format );
50
+ $selected = $value == $selected_value ? ' selected="selected"' : '';
51
+ $output .= "<option value='{$value}'{$selected}>{$op_name}</option>";
52
+ $time_output->modify( $ts_length );
53
+ }
54
+
55
+ $output .= '</select>';
56
+
57
+ return $output;
58
+ }
59
+ }
backend/modules/settings/forms/AB_CompanyForm.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class AB_CompanyForm extends AB_Form {
6
+
7
+ public function __construct() {
8
+ $this->setFields(array(
9
+ 'ab_settings_company_name',
10
+ 'ab_settings_company_logo',
11
+ 'ab_settings_company_address',
12
+ 'ab_settings_company_phone',
13
+ 'ab_settings_company_website',
14
+ 'ab_settings_company_logo_path',
15
+ 'ab_settings_company_logo_url',
16
+ ));
17
+ }
18
+
19
+ public function bind( array $post, array $files = array() ) {
20
+
21
+ parent::bind( $post, $files );
22
+
23
+ // remove the old image
24
+ if ( isset( $post['ab_remove_logo'] ) && file_exists( get_option( 'ab_settings_company_logo_path' ) ) ) {
25
+ unlink( get_option( 'ab_settings_company_logo_path' ) );
26
+ update_option( 'ab_settings_company_logo_path', '' );
27
+ update_option( 'ab_settings_company_logo_url', '' );
28
+ }
29
+
30
+ // and add new
31
+ if ( isset ($files['ab_settings_company_logo']) && $files['ab_settings_company_logo']['tmp_name'] ) {
32
+
33
+ if ( in_array( $files['ab_settings_company_logo']['type'], array( "image/gif", "image/jpeg", "image/png" ) ) ) {
34
+ $movefile = wp_handle_upload( $files['ab_settings_company_logo'], array( 'test_form' => false ) );
35
+ if ( $movefile ) {
36
+ $imageResize = new AB_ImageResize($movefile['file']);
37
+ $imageResize->resizeImage( 150, 150 );
38
+ $imageResize->saveImage($movefile['file']);
39
+
40
+ $this->data['ab_settings_company_logo_path'] = $movefile['file'];
41
+ $this->data['ab_settings_company_logo_url'] = $movefile['url'];
42
+
43
+ // remove the old image
44
+ if ( file_exists( get_option( 'ab_settings_company_logo_path' ) ) ) {
45
+ unlink( get_option( 'ab_settings_company_logo_path' ) );
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ public function save() {
53
+
54
+ foreach ( $this->data as $field => $value ) {
55
+ update_option( $field, $value );
56
+ }
57
+ }
58
+ }
backend/modules/settings/forms/AB_PaymentsForm.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class AB_PaymentsForm extends AB_Form {
6
+
7
+ public function __construct() {
8
+ $this->setFields(array(
9
+ 'ab_settings_pay_locally',
10
+ 'ab_paypal_currency'
11
+ ));
12
+ }
13
+
14
+ public function save() {
15
+ foreach ( $this->data as $field => $value ) {
16
+ update_option( $field, $value );
17
+ }
18
+ }
19
+ }
backend/modules/settings/resources/js/settings.js ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function ($) {
2
+ var $form = $('#business-hours'),
3
+ $all_tabs = $('#ab_settings_company, #ab_settings_payments, #ab_settings_hours, #ab_settings_holidays, #ab_settings_purchase_code, #ab_settings_general'),
4
+ $all_forms = $('#company-form, #payments-form, #hours-form, #holidays-form, #purchase-code-form, #general-form');
5
+ $('.select_start', $form).on('change', function () {
6
+ var $row = $(this).parent(),
7
+ $end_select = $('.select_end', $row),
8
+ $start_select = $(this);
9
+
10
+ if ($start_select.val()) {
11
+ $end_select.show();
12
+ $('span', $row).show();
13
+
14
+ var start_time = $start_select.val();
15
+
16
+ $('span > option', $end_select).each(function () {
17
+ $(this).unwrap();
18
+ });
19
+
20
+ // Hides end time options with value less than in the start time
21
+ $('option', $end_select).each(function () {
22
+ if ($(this).val() <= start_time) {
23
+ $(this).wrap("<span>").parent().hide();
24
+ }
25
+ });
26
+
27
+ if (start_time >= $end_select.val()) {
28
+ $('option:visible:first', $end_select).attr('selected', true);
29
+ }
30
+ } else { // OFF
31
+ $end_select.hide();
32
+ $('span', $row).hide();
33
+ }
34
+ }).each(function () {
35
+ var $row = $(this).parent(),
36
+ $end_select = $('.select_end', $row);
37
+
38
+ $(this).data('default_value', $(this).val());
39
+ $end_select.data('default_value', $end_select.val());
40
+
41
+ // Hides end select for "OFF" days
42
+ if (!$(this).val()) {
43
+ $end_select.hide();
44
+ $('span', $row).hide();
45
+ }
46
+ }).trigger('change');
47
+
48
+ // Reset
49
+ $('#ab-hours-reset', $form).on('click', function () {
50
+ $('.select_start', $form).each(function () {
51
+ $(this).val($(this).data('default_value'));
52
+ $(this).trigger('click');
53
+ });
54
+
55
+ $('.select_end', $form).each(function () {
56
+ $(this).val($(this).data('default_value'));
57
+ });
58
+
59
+ $('.select_start', $form).trigger('change');
60
+ });
61
+
62
+ // Tabs Onclick Handlers
63
+ $all_tabs.on('click', function() {
64
+ $('.ab-active').removeClass('ab-active');
65
+ $(this).addClass('ab-active');
66
+ });
67
+ $('#ab_settings_company').on('click', function() {
68
+ $all_forms.addClass('hidden');
69
+ $('#company-form').removeClass('hidden');
70
+ });
71
+ $('#ab_settings_payments').on('click', function() {
72
+ $all_forms.addClass('hidden');
73
+ $('#payments-form').removeClass('hidden');
74
+ });
75
+ $('#ab_settings_hours').on('click', function() {
76
+ $all_forms.addClass('hidden');
77
+ $('#hours-form').removeClass('hidden');
78
+ });
79
+ $('#ab_settings_holidays').on('click', function() {
80
+ $all_forms.addClass('hidden');
81
+ $('#holidays-form').removeClass('hidden');
82
+ });
83
+ $('#ab_settings_purchase_code').on('click', function() {
84
+ $all_forms.addClass('hidden');
85
+ $('#purchase-code-form').removeClass('hidden');
86
+ });
87
+ $('#ab_settings_general').on('click', function() {
88
+ $all_forms.addClass('hidden');
89
+ $('#general-form').removeClass('hidden');
90
+ });
91
+
92
+ // Company Tab
93
+ $('#ab-delete-logo').on('click', function() {
94
+ $('#ab-show-logo').hide(300).append('<input type="hidden" id="ab-remove-logo" name="ab_remove_logo" value="1" />');
95
+ });
96
+ $('#ab_settings_company_logo').on('change', function() { $('#ab-remove-logo').remove(); });
97
+
98
+ $('#ab-settings-company-reset').on('click', function() {
99
+ $('#ab-remove-logo').remove();
100
+ $('#ab-show-logo').show(300);
101
+ });
102
+
103
+ //Payment Tab
104
+ $('#ab_paypal_type').on('change', function() {
105
+ $('#light_notice').modal('show');
106
+ });
107
+
108
+ $('.ab-help-info').show(function () {
109
+ $(this).popover({
110
+ trigger : 'hover',
111
+ content: $('#' + $(this).data('help_id')).html(),
112
+ html: true
113
+ });
114
+ });
115
+ });
116
+
backend/modules/settings/templates/_companyForm.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <form method="post" action="<?php echo $current_url . '&type=_company' ?>" enctype="multipart/form-data" class="ab-staff-form">
3
+
4
+ <?php if (isset($message_c)) : ?>
5
+ <div id="message" style="margin: 0px!important;" class="updated below-h2">
6
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
7
+ <p><?php echo $message_c ?></p>
8
+ </div>
9
+ <?php endif ?>
10
+
11
+ <table class="form-horizontal">
12
+ <tr>
13
+ <td><?php _e('Company name','ab') ?></td>
14
+ <td><input type="text" size="33" name="ab_settings_company_name" value="<?php echo get_option('ab_settings_company_name') ?>" reset="<?php echo get_option('ab_settings_company_name') ?>"/></td>
15
+ </tr>
16
+ <tr>
17
+ <td valign="top"><?php _e('Company logo','ab') ?></td>
18
+ <td>
19
+ <?php if ( get_option( 'ab_settings_company_logo_url' ) ): ?>
20
+ <div id="ab-show-logo">
21
+ <img src="<?php echo get_option( 'ab_settings_company_logo_url' ) ?>" alt="<?php _e( 'Company logo','ab' ) ?>"/>
22
+ <a id="ab-delete-logo" href="javascript:void(0)"><?php _e( 'Delete','ab' ) ?></a>
23
+ <br/>
24
+ </div>
25
+ <?php endif ?>
26
+ <input name="ab_settings_company_logo" id="ab_settings_company_logo" type="file" />
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <td valign="top"><?php _e('Address','ab') ?></td>
31
+ <td><textarea cols="32" rows="5" name="ab_settings_company_address"><?php echo get_option('ab_settings_company_address') ?></textarea></td>
32
+ </tr>
33
+ <tr>
34
+ <td><?php _e('Phone','ab') ?></td>
35
+ <td><input type="text" size="33" name="ab_settings_company_phone" value="<?php echo get_option('ab_settings_company_phone') ?>" /></td>
36
+ </tr>
37
+ <tr>
38
+ <td><?php _e('Website','ab') ?></td>
39
+ <td><input type="text" size="33" name="ab_settings_company_website" value="<?php echo get_option('ab_settings_company_website') ?>" /></td>
40
+ </tr>
41
+ <tr>
42
+ <td></td>
43
+ <td>
44
+ <input type="submit" value="<?php _e( 'Save', 'ab' ) ?>" class="btn btn-info ab-update-button" />
45
+ <button id="ab-settings-company-reset" class="ab-reset-form" type="reset"><?php _e( ' Reset ', 'ab' ) ?></button>
46
+ </td>
47
+ </tr>
48
+ </table>
49
+ </form>
backend/modules/settings/templates/_generalForm.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <form method="post" action="<?php echo $current_url . '&type=_general' ?>" enctype="multipart/form-data" class="ab-staff-form">
3
+
4
+ <?php if (isset($message_g)) : ?>
5
+ <div id="message" style="margin: 0px!important;" class="updated below-h2">
6
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
7
+ <p><?php echo $message_g ?></p>
8
+ </div>
9
+ <?php endif ?>
10
+
11
+ <table class="form-horizontal">
12
+ <tr>
13
+ <td><?php _e('Time slot length','ab') ?></td>
14
+ <td>
15
+ <select name="ab_settings_time_slot_length" style="width: 200px;">
16
+ <?php
17
+ foreach ( array( 10, 15, 20, 30, 60 ) as $duration ) {
18
+ $duration_output = AB_Service::durationToString( $duration * 60 );
19
+ ?>
20
+ <option value="<?php echo $duration ?>" <?php selected( get_option( 'ab_settings_time_slot_length' ), $duration ); ?>>
21
+ <?php echo $duration_output ?>
22
+ </option>
23
+ <?php } ?>
24
+ </select>
25
+ </td>
26
+ <td>
27
+ <img
28
+ src="<?php echo plugins_url( 'resources/images/help.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>"
29
+ alt=""
30
+ class="ab-help-info"
31
+ data-help_id="ab-staff-slot"
32
+ rel='popover'
33
+ />
34
+ </td>
35
+ </tr>
36
+ <tr>
37
+ <td>
38
+ <label><?php _e( 'Make it impossible for users to book appointments on the current day (last minute appointments)', 'ab' ) ?></label>
39
+ </td>
40
+ <td style="vertical-align: top">
41
+ <select name="ab_settings_no_current_day_appointments" style="width: 200px;">
42
+ <?php foreach ( array( __( 'Disabled', 'ab' ) => '0', __( 'Enabled', 'ab' ) => '1' ) as $text => $mode ): ?>
43
+ <option value="<?php echo $mode ?>" <?php selected( get_option( 'ab_settings_no_current_day_appointments' ), $mode ); ?> ><?php echo $text ?></option>
44
+ <?php endforeach ?>
45
+ </select>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <td>
50
+ <label><?php _e( 'Display available time slots in client\'s time zone', 'ab' ) ?></label>
51
+ </td>
52
+ <td>
53
+ <select name="ab_settings_use_client_time_zone" style="width: 200px;">
54
+ <?php foreach ( array( __( 'Disabled', 'ab' ) => '0', __( 'Enabled', 'ab' ) => '1' ) as $text => $mode ): ?>
55
+ <option value="<?php echo $mode ?>" <?php selected( get_option( 'ab_settings_use_client_time_zone' ), $mode ); ?> ><?php echo $text ?></option>
56
+ <?php endforeach ?>
57
+ </select>
58
+ </td>
59
+ <td>
60
+ <img
61
+ src="<?php echo plugins_url( 'resources/images/help.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>"
62
+ alt=""
63
+ class="ab-help-info"
64
+ data-help_id="ab-staff-zone"
65
+ rel='popover'
66
+ />
67
+ </td>
68
+ </tr>
69
+ <tr>
70
+ <td>
71
+ <label><?php _e( 'Cancel appointment page URL', 'ab' ) ?></label>
72
+ </td>
73
+ <td>
74
+ <input type="text" name="ab_settings_cancel_page_url" value="<?php echo get_option( 'ab_settings_cancel_page_url' ) ?>" >
75
+ </td>
76
+ <td>
77
+ <img
78
+ src="<?php echo plugins_url( 'resources/images/help.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>"
79
+ alt=""
80
+ class="ab-help-info"
81
+ data-help_id="ab-staff-cancel"
82
+ rel='popover'
83
+ />
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td></td>
88
+ <td>
89
+ <input type="submit" value="<?php _e( 'Save', 'ab' ) ?>" class="btn btn-info ab-update-button" />
90
+ <button class="ab-reset-form" type="reset"><?php _e( ' Reset ', 'ab' ) ?></button>
91
+ </td>
92
+ </tr>
93
+ </table>
94
+ </form>
95
+ <div id="ab-staff-slot" style="display: none">
96
+ <p><?php _e('Select the time interval that will be used in frontend and backend, e.g. in calendar, second step of the booking process, while indicating the working hours, etc.', 'ab') ?></p>
97
+ </div>
98
+ <div id="ab-staff-zone" style="display: none">
99
+ <p><?php _e('The value is taken from client’s browser.', 'ab') ?></p>
100
+ </div>
101
+ <div id="ab-staff-cancel" style="display: none">
102
+ <p><?php _e('Insert the URL of the page that is shown to clients after they have cancelled their booking.', 'ab') ?></p>
103
+ </div>
backend/modules/settings/templates/_holidaysForm.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div id="ab-annual-calendar-scroll" style="text-align: center;">
3
+ <div class="input-prepend input-append">
4
+ <span class="ab-week-picker-arrow prev add-on col-arrow">◄</span>
5
+ <input style="width: 70px; text-align: center;background: white" class="span2 jcal_year" readonly="readonly" id="appendedPrependedInput" size="16" type="text" value="2014">
6
+ <span class="ab-week-picker-arrow next add-on col-arrow">►</span>
7
+ </div>
8
+ </div>
9
+ <div id="ab-annual-calendar"></div>
10
+
11
+ <script type="text/javascript">
12
+ jQuery(function($) {
13
+ var d = new Date();
14
+ $('#ab-annual-calendar').jCal({
15
+ day: new Date(d.getFullYear(), 0, 1),
16
+ days: 1,
17
+ showMonths: 12,
18
+ scrollSpeed: 350,
19
+ events: <?php echo $holidays ?>,
20
+ action: 'ab_settings_holiday',
21
+ dayOffset: <?php echo get_option('start_of_week', 0) ?>
22
+ });
23
+ });
24
+ </script>
backend/modules/settings/templates/_hoursForm.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <form method="post" action="<?php echo $current_url . '&type=_hours' ?>" class="ab-staff-form" id="business-hours">
3
+ <?php if (isset($message_h)) : ?>
4
+ <div class="alert">
5
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
6
+ <?php echo $message_h ?>
7
+ </div>
8
+ <?php endif ?>
9
+
10
+ <?php $form = new AB_BusinessHoursForm(); ?>
11
+
12
+ <table>
13
+ <?php foreach ( array( 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday' ) as $day ): ?>
14
+ <tr>
15
+ <td><?php _e( ucfirst( $day ) ) ?></td>
16
+ <td>
17
+ <?php echo $form->renderField( 'ab_settings_' . $day ); ?>
18
+ <span><?php _e( ' to ' ) ?></span>
19
+ <?php echo $form->renderField( 'ab_settings_' . $day, false ); ?>
20
+ </td>
21
+ </tr>
22
+ <?php endforeach; ?>
23
+ <tr>
24
+ <td></td>
25
+ <td>
26
+ <input type="submit" value="<?php _e( 'Save', 'ab' ) ?>" class="btn btn-info ab-update-button" />
27
+ <a id="ab-hours-reset" href="javascript:void(0)"><?php _e( 'Reset', 'ab' ) ?></a>
28
+ </td>
29
+ </tr>
30
+ </table>
31
+ </form>
backend/modules/settings/templates/_paymentsForm.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <form method="post" action="<?php echo $current_url . '&type=_payments' ?>" class="ab-staff-form">
3
+ <?php if (isset($message_p)) : ?>
4
+ <div id="message" style="margin: 0px!important;" class="updated below-h2">
5
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
6
+ <p><?php echo $message_p ?></p>
7
+ </div>
8
+ <?php endif ?>
9
+ <table class="form-horizontal">
10
+ <tr>
11
+ <td style="width: 170px;"><?php _e( 'Currency','ab' ) ?></td>
12
+ <td>
13
+ <select name="ab_paypal_currency" style="width: 200px;">
14
+ <?php foreach ( PayPal::getCurrencyCodes() as $code ): ?>
15
+ <option value="<?php echo $code ?>" <?php selected( get_option( 'ab_paypal_currency' ), $code ); ?> ><?php echo $code ?></option>
16
+ <?php endforeach ?>
17
+ </select>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <td colspan="2"><div class="ab-payments-title"><?php _e( 'Service paid locally','ab' ) ?></div></td>
22
+ </tr>
23
+ <tr>
24
+ <td colspan="2">
25
+ <select name="ab_settings_pay_locally" style="width: 200px;">
26
+ <?php foreach ( array( __( 'Disabled', 'ab' ) => '0', __( 'Enabled', 'ab' ) => '1' ) as $text => $mode ): ?>
27
+ <option value="<?php echo $mode ?>" <?php selected( get_option( 'ab_settings_pay_locally' ), $mode ); ?> ><?php echo $text ?></option>
28
+ <?php endforeach ?>
29
+ </select>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <td colspan="2"><div class="ab-payments-title"><?php _e( 'PayPal','ab' ) ?></div></td>
34
+ </tr>
35
+ <tr>
36
+ <td colspan="2">
37
+ <select id="ab_paypal_type" style="width: 200px;">
38
+ <?php foreach ( array( __( 'Disabled', 'ab' ) => 'disabled', 'PayPal Express Checkout' => 'ec' ) as $text => $mode ): ?>
39
+ <option value="<?php echo $mode ?>" ><?php echo $text ?></option>
40
+ <?php endforeach ?>
41
+ </select>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td colspan="2">
46
+ <input type="submit" value="<?php _e( 'Save', 'ab' ) ?>" class="btn btn-info ab-update-button" />
47
+ <button id="ab-payments-reset" class="ab-reset-form" type="reset"><?php _e( 'Reset', 'ab' ) ?></button>
48
+ </td>
49
+ <td></td>
50
+ </tr>
51
+ </table>
52
+ </form>
53
+
54
+ <div class="modal fade" id="light_notice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
55
+ <div class="modal-dialog">
56
+ <div class="modal-content">
57
+ <div class="modal-header">
58
+ <h4 class="modal-title">Notice</h4>
59
+ </div>
60
+ <div class="modal-body">
61
+ <?php _e('This function is disabled in the light verison of Bookly. If you find the plugin useful for your business please consider buying a licence for the full version. It costs just $35 and for this money you will get many useful functions, lifetime free update and excellent support! More information can be found here'); ?>: <a href="http://bookly.ladela.com" target="_blank">http://bookly.ladela.com</a>
62
+ </div>
63
+ <div class="modal-footer">
64
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
65
+ </div>
66
+ </div><!-- /.modal-content -->
67
+ </div><!-- /.modal-dialog -->
68
+ </div><!-- /.modal -->
backend/modules/settings/templates/_purchaseCodeForm.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <form enctype="multipart/form-data" method="post" action="<?php echo $current_url . '&type=_purchase_code' ?>" class="ab-staff-form" id="purchase_code">
3
+ <?php if ( isset ( $message_pc ) ) : ?>
4
+ <div class="alert">
5
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
6
+ <?php echo $message_pc ?>
7
+ </div>
8
+ <?php endif ?>
9
+
10
+ <table class="form-horizontal">
11
+ <tr>
12
+ <td><?php _e( 'Purchase Code', 'ab' ) ?></td>
13
+ <td>
14
+ <label for="purchase_code"></label>
15
+ <input class="purchase-code" type="text" size="255" name="ab_envato_purchase_code" value="<?php echo get_option( 'ab_envato_purchase_code' ) ?>" />
16
+ </td>
17
+ </tr>
18
+ <tr>
19
+ <td></td>
20
+ <td>
21
+ <input type="submit" value="<?php _e( 'Save', 'ab' ) ?>" class="btn btn-info ab-update-button" />
22
+ <button class="ab-reset-form" type="reset"><?php _e( ' Reset ', 'ab' ) ?></button>
23
+ </td>
24
+ </tr>
25
+ </table>
26
+ </form>
backend/modules/settings/templates/admin_notice.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id=ab_admin_notice class=update-nag>
2
+ <h3>Bookly</h3>
3
+ <p><?php _e( 'Please do not forget to specify your purchase code in Bookly <a href="admin.php?page=ab-system-settings">settings</a>. Upon providing the code you will have access to free updates of Bookly. Updates may contain functionality improvements and important security fixes.', 'ab' ) ?></p>
4
+ <p><?php _e( '<b>Important!</b> Please be aware that if your copy of Bookly was not downloaded from Codecanyon (the only channel of Bookly distribution), you may put your website under significant risk - it is very likely that it may contain a malicious code, a trojan or a backdoor. Please consider buying a licensed copy of Bookly <a href="http://bookly.ladela.com" target="_blank">here</a>.', 'ab' ) ?></p>
5
+ <a id="ab_dismiss" href="#"><?php _e( 'Dismiss', 'ab' ) ?></a>
6
+ </div>
7
+
8
+ <script type="text/javascript">
9
+ jQuery('a#ab_dismiss').click(function(e) {
10
+ e.preventDefault();
11
+ jQuery('div#ab_admin_notice').hide(300);
12
+ jQuery.ajax({
13
+ url : '<?php echo admin_url('admin-ajax.php'); ?>',
14
+ data : {action: 'ab_dismiss_admin_notice'}
15
+ });
16
+ });
17
+ </script>
backend/modules/settings/templates/index.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div class="ab-title"><?php _e('Settings') ?></div>
3
+ <div style="min-width: 800px;">
4
+ <div class="ab-left-bar">
5
+ <div id="ab_settings_general" class="ab-left-tab <?php echo ( ! isset( $_GET[ 'type' ] ) || $_GET[ 'type' ] == '_general' ) ? 'ab-active' : '' ?>"><?php _e( 'General','ab' ) ?></div>
6
+ <div id="ab_settings_company" class="ab-left-tab <?php echo isset( $_GET['type'] ) && $_GET['type'] == '_company' ? 'ab-active' : '' ?>"><?php _e( 'Company','ab' ) ?></div>
7
+ <div id="ab_settings_payments" class="ab-left-tab <?php echo isset( $_GET['type'] ) && $_GET['type'] == '_payments' ? 'ab-active' : '' ?>"><?php _e( 'Payments','ab' ) ?></div>
8
+ <div id="ab_settings_hours" class="ab-left-tab <?php echo isset( $_GET['type'] ) && $_GET['type'] == '_hours' ? 'ab-active' : '' ?>"><?php _e( 'Business hours','ab' ) ?></div>
9
+ <div id="ab_settings_holidays" class="ab-left-tab <?php echo isset( $_GET['type'] ) && $_GET['type'] == '_holidays' ? 'ab-active' : '' ?>"><?php _e( 'Holidays','ab' ) ?></div>
10
+ <div id="ab_settings_purchase_code" class="ab-left-tab <?php echo isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] == '_purchase_code' ? 'ab-active' : '' ?>"><?php _e( 'Purchase Code','ab' ) ?></div>
11
+ </div>
12
+ <div class="ab-right-content" id="content_wrapper">
13
+ <div id="general-form" class="<?php echo ( ! isset( $_GET[ 'type' ] ) || $_GET[ 'type' ] == '_general' ) ? '' : 'hidden' ?> ab-staff-tab-content">
14
+ <?php include '_generalForm.php' ?>
15
+ </div>
16
+ <div id="company-form" class="<?php echo ( isset( $_GET['type'] ) && $_GET['type'] == '_company' ) ? '' : 'hidden' ?>">
17
+ <?php include '_companyForm.php' ?>
18
+ </div>
19
+ <div id="payments-form" class="<?php echo ( isset( $_GET['type'] ) && $_GET['type'] == '_payments' ) ? '' : 'hidden' ?>">
20
+ <?php include '_paymentsForm.php' ?>
21
+ </div>
22
+ <div id="hours-form" class="<?php echo ( isset( $_GET['type'] ) && $_GET['type'] == '_hours' ) ? '' : 'hidden' ?>">
23
+ <?php include '_hoursForm.php' ?>
24
+ </div>
25
+ <div id="holidays-form" class="<?php echo ( isset( $_GET['type'] ) && $_GET['type'] == '_holidays' ) ? '' : 'hidden' ?> ab-staff-tab-content">
26
+ <?php include '_holidaysForm.php' ?>
27
+ </div>
28
+ <div id="purchase-code-form" class="<?php echo ( isset( $_GET[ 'type' ] ) && $_GET[ 'type' ] == '_purchase_code' ) ? '' : 'hidden' ?> ab-staff-tab-content">
29
+ <?php include '_purchaseCodeForm.php' ?>
30
+ </div>
31
+ </div>
32
+ </div>
backend/modules/staff/AB_StaffController.php ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include 'forms/AB_StaffMemberNewForm.php';
6
+ include 'forms/AB_StaffMemberEditForm.php';
7
+ include 'forms/AB_StaffServicesForm.php';
8
+ include 'forms/AB_StaffScheduleForm.php';
9
+ include 'forms/AB_StaffScheduleItemBreakForm.php';
10
+ include 'forms/widget/AB_TimeChoiceWidget.php';
11
+
12
+ /**
13
+ * Class AB_StaffController
14
+ *
15
+ * @property $form
16
+ * @property $collection
17
+ * @property $services
18
+ * @property $staff_id
19
+ * @property AB_Staff $staff
20
+ */
21
+ class AB_StaffController extends AB_Controller {
22
+
23
+ public function renderStaffMembers() {
24
+ $path = dirname( dirname( __FILE__ ) );
25
+ wp_enqueue_style( 'ab-style', plugins_url( 'resources/css/ab_style.css', $path ) );
26
+ wp_enqueue_style( 'ab-staff', plugins_url( 'resources/css/staff.css', __FILE__ ) );
27
+ wp_enqueue_style( 'ab-bootstrap', plugins_url( 'resources/bootstrap/css/bootstrap.min.css', $path ) );
28
+ wp_enqueue_script( 'ab-bootstrap', plugins_url( 'resources/bootstrap/js/bootstrap.min.js', $path ), array( 'jquery' ) );
29
+ wp_enqueue_script( 'ab-popup', plugins_url( 'resources/js/ab_popup.js', $path ), array( 'jquery' ) );
30
+ wp_enqueue_script( 'ab-system-staff', plugins_url( 'resources/js/staff.js', __FILE__ ), array( 'jquery' ) );
31
+ wp_enqueue_script( 'ab-jCal', plugins_url( 'resources/js/jCal.js', $path ), array( 'jquery' ) );
32
+ wp_enqueue_style( 'ab-jCal', plugins_url( 'resources/css/jCal.css', $path ) );
33
+ wp_localize_script( 'ab-jCal', 'BooklyL10n', array(
34
+ 'we_are_not_working' => __( 'We are not working on this day', 'ab' ),
35
+ 'repeat' => __( 'Repeat every year', 'ab' ),
36
+ 'month' => array(
37
+ 'January' => __( 'January', 'ab' ),
38
+ 'February' => __( 'February', 'ab' ),
39
+ 'March' => __( 'March', 'ab' ),
40
+ 'April' => __( 'April', 'ab' ),
41
+ 'May' => __( 'May', 'ab' ),
42
+ 'June' => __( 'June', 'ab' ),
43
+ 'July' => __( 'July', 'ab' ),
44
+ 'August' => __( 'August', 'ab' ),
45
+ 'September' => __( 'September', 'ab' ),
46
+ 'October' => __( 'October', 'ab' ),
47
+ 'November' => __( 'November', 'ab' ),
48
+ 'December' => __( 'December', 'ab' )
49
+ ),
50
+ 'day' => array(
51
+ 'Mon' => __( 'Mon', 'ab' ),
52
+ 'Tue' => __( 'Tue', 'ab' ),
53
+ 'Wed' => __( 'Wed', 'ab' ),
54
+ 'Thu' => __( 'Thu', 'ab' ),
55
+ 'Fri' => __( 'Fri', 'ab' ),
56
+ 'Sat' => __( 'Sat', 'ab' ),
57
+ 'Sun' => __( 'Sun', 'ab' )
58
+ )
59
+ ) );
60
+
61
+ wp_enqueue_script('jquery-ui-dialog');
62
+ wp_enqueue_style("wp-jquery-ui-dialog");
63
+
64
+ $this->form = new AB_StaffMemberNewForm();
65
+ $this->collection = $this->getWpdb()->get_results( "SELECT * FROM ab_staff LIMIT 1" );
66
+ if ( !isset ( $this->active_staff_id ) ) {
67
+ $this->active_staff_id = $this->collection ? $this->collection[0]->id : 0;
68
+ }
69
+
70
+ $this->render( 'list' );
71
+ }
72
+
73
+ public function executeStaffServices() {
74
+ $this->form = new AB_StaffServicesForm();
75
+ $this->form->load($this->getParameter( 'id' ));
76
+ $this->staff_id = $this->getParameter( 'id' );
77
+ $this->render( 'services' );
78
+ exit;
79
+ }
80
+
81
+ public function executeStaffSchedule() {
82
+ $staff = new AB_Staff();
83
+ $staff->load( $this->_post['id'] );
84
+ $this->schedule_list = $staff->getScheduleList();
85
+ $this->render( 'schedule' );
86
+ exit;
87
+ }
88
+
89
+ public function executeStaffScheduleUpdate() {
90
+ $this->form = new AB_StaffScheduleForm();
91
+ $this->form->bind($this->getPost());
92
+ $this->form->save();
93
+ exit;
94
+ }
95
+
96
+ public function executeStaffScheduleHandleBreak() {
97
+ $_post = $this->getPost();
98
+
99
+ $start_time = $_post['start_time'];
100
+ $end_time = $_post['end_time'];
101
+ $working_start = $_post['working_start'];
102
+ $working_end = $_post['working_end'];
103
+
104
+ if ( strtotime( date( 'Y-m-d ' . $start_time ) ) >= strtotime( date( 'Y-m-d ' . $end_time ) ) ) {
105
+ echo json_encode( array(
106
+ 'success' => false,
107
+ 'error_msg' => __( 'The start time must be less than the end one', 'ab'),
108
+ ) );
109
+ exit;
110
+ }
111
+
112
+ $staffScheduleItem = new AB_StaffScheduleItem();
113
+ $staffScheduleItem->load( $_post['staff_schedule_item_id'] );
114
+
115
+ $break_id = isset( $_post['break_id'] ) ? $_post['break_id'] : 0;
116
+
117
+ $in_working_time = $working_start <= $start_time && $start_time <= $working_end
118
+ && $working_start <= $end_time && $end_time <= $working_end;
119
+ if ( !$in_working_time || ! $staffScheduleItem->isBreakIntervalAvailable( $start_time, $end_time, $break_id ) ) {
120
+ echo json_encode( array(
121
+ 'success' => false,
122
+ 'error_msg' => __( 'The requested interval is not available', 'ab'),
123
+ ) );
124
+ exit;
125
+ }
126
+
127
+ $time_format = get_option( 'time_format' );
128
+ $formatted_interval_start = date_i18n( $time_format, strtotime( $start_time ) );
129
+ $formatted_interval_end = date_i18n( $time_format, strtotime( $end_time ) );
130
+ $formatted_interval = $formatted_interval_start . ' - ' . $formatted_interval_end;
131
+
132
+ if ( $break_id ) {
133
+ $break = new AB_ScheduleItemBreak();
134
+ $break->load( $break_id );
135
+ $break->set( 'start_time', $start_time );
136
+ $break->set( 'end_time', $end_time );
137
+ $break->save();
138
+
139
+ echo json_encode( array(
140
+ 'success' => true,
141
+ 'new_interval' => $formatted_interval,
142
+ ) );
143
+ } else {
144
+ $this->form = new AB_StaffScheduleItemBreakForm();
145
+ $this->form->bind( $this->getPost() );
146
+
147
+ $staffScheduleItemBreak = $this->form->save();
148
+ if ( $staffScheduleItemBreak ) {
149
+ $breakStart = new AB_TimeChoiceWidget( array( 'use_empty' => false ) );
150
+ $break_start_choices = $breakStart->render(
151
+ '',
152
+ $start_time,
153
+ array(
154
+ 'class' => 'break-start',
155
+ 'data-default_value' => AB_StaffScheduleItem::WORKING_START_TIME
156
+ )
157
+ );
158
+ $breakEnd = new AB_TimeChoiceWidget( array( 'use_empty' => false ) );
159
+ $break_end_choices = $breakEnd->render(
160
+ '',
161
+ $end_time,
162
+ array(
163
+ 'class' => 'break-end',
164
+ 'data-default_value' => date( 'H:i:s', strtotime( AB_StaffScheduleItem::WORKING_START_TIME . ' + 1 hour' ) )
165
+ )
166
+ );
167
+ echo json_encode(array(
168
+ 'success' => true,
169
+ 'item_content' => '<div class="break-interval-wrapper" data-break_id="' . $staffScheduleItemBreak->get( 'id' ) . '">
170
+ <div class="ab-popup-wrapper hide-on-non-working-day">
171
+ <a class="ab-popup-trigger break-interval" href="javascript:void(0)">' . $formatted_interval . '</a>
172
+ <div class="ab-popup" style="display: none">
173
+ <div class="ab-arrow"></div>
174
+ <div class="error" style="display: none"></div>
175
+ <div class="ab-content">
176
+ <table cellspacing="0" cellpadding="0">
177
+ <tr>
178
+ <td>' . $break_start_choices . ' <span class="hide-on-non-working-day">' . __( 'to', 'ab') . '</span> ' . $break_end_choices . '</td>
179
+ </tr>
180
+ <tr>
181
+ <td>
182
+ <a class="btn btn-info ab-popup-save ab-save-break">' . __('Save break','ab') . '</a>
183
+ <a class="ab-popup-close" href="#">' . __('Cancel', 'ab') . '</a>
184
+ </td>
185
+ </tr>
186
+ </table>
187
+ <a class="ab-popup-close ab-popup-close-icon" href="javascript:void(0)"></a>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <img class="delete-break" src="' . plugins_url( 'resources/images/delete_cross.png', dirname(__FILE__).'/../../AB_Backend.php' ) . '" />
192
+ </div>'
193
+ ) );
194
+ } else {
195
+ echo json_encode( array(
196
+ 'success' => false,
197
+ 'error_msg' => __( 'Error adding the break interval', 'ab'),
198
+ ) );
199
+ }
200
+ }
201
+
202
+ exit;
203
+ }
204
+
205
+ public function executeDeleteStaffScheduleBreak() {
206
+ $break = new AB_ScheduleItemBreak();
207
+ $break->load( $this->_post['id'] );
208
+ $break->delete();
209
+ exit;
210
+ }
211
+
212
+ public function executeStaffServicesUpdate() {
213
+ $this->form = new AB_StaffServicesForm();
214
+ $this->form->bind($this->getPost());
215
+ $this->form->save();
216
+ exit;
217
+ }
218
+
219
+ public function executeEditStaff() {
220
+ $this->form = new AB_StaffMemberEditForm();
221
+ $this->staff = new AB_Staff();
222
+ $this->staff->load( $this->_get['id'] );
223
+ if(isset($_SESSION['was_update'])){
224
+ unset($_SESSION['was_update']);
225
+ $this->update = true;
226
+ $this->render( 'edit');
227
+ }else{
228
+ $this->render('edit');
229
+ }
230
+ exit;
231
+ }
232
+
233
+ public function updateStaff() {
234
+ $form = new AB_StaffMemberEditForm();
235
+ $form->bind($this->getPost(), $this->getFiles());
236
+ $form->save();
237
+ // Set staff id to load the form for.
238
+ $this->active_staff_id = $_POST['id'];
239
+ $_SESSION['was_update'] = true;
240
+ }
241
+
242
+ public function executeDeleteStaffAvatar() {
243
+ $staff = new AB_Staff();
244
+ $staff->load( $this->_post['id'] );
245
+ unlink( $staff->get( 'avatar_path' ) );
246
+ $staff->set( 'avatar_url', '' );
247
+ $staff->set( 'avatar_path', '' );
248
+ $staff->save();
249
+ exit;
250
+ }
251
+
252
+ public function executeStaffHolidays() {
253
+ $this->id = isset( $this->_post['id'] ) ? intval( $this->_post['id'] ) : false;
254
+ $this->holidays = $this->getHolidays( $this->id );
255
+ $this->render('holidays');
256
+ exit;
257
+ }
258
+
259
+ public function executeStaffHolidaysUpdate() {
260
+
261
+ $id = $this->getParameter('id');
262
+ $holiday = $this->getParameter('holiday') == 'true';
263
+ $repeat = $this->getParameter('repeat') == 'true';
264
+ $day = $this->getParameter('day', false);
265
+ $staff_id = $this->getParameter('staff_id');
266
+
267
+ if ( $staff_id ) {
268
+ // update or delete the event
269
+ if ( $id ) {
270
+ if ( $holiday ) {
271
+ $this->getWpdb()->update( 'ab_holiday', array( 'repeat_event' => intval( $repeat ) ), array( 'id' => $id ), array( '%d' ) );
272
+ } else {
273
+ $this->getWpdb()->delete( 'ab_holiday', array( 'id' => $id ), array( '%d' ) );
274
+ }
275
+ // add the new event
276
+ } else if ( $holiday && $day ) {
277
+ $day = new DateTime($day);
278
+ $this->getWpdb()->insert( 'ab_holiday', array( 'holiday' => date( 'Y-m-d H:i:s', $day->format( 'U' ) ), 'repeat_event' => intval( $repeat ), 'staff_id' => $staff_id ), array( '%s', '%d', '%d' ) );
279
+ }
280
+
281
+ // and return refreshed events
282
+ echo $this->getHolidays($staff_id);
283
+ }
284
+ exit;
285
+ }
286
+
287
+
288
+
289
+ // Protected methods.
290
+
291
+ /**
292
+ * Override parent method to add 'wp_ajax_ab_' prefix
293
+ * so current 'execute*' methods look nicer.
294
+ */
295
+ protected function registerWpActions( $prefix = '' ) {
296
+ parent::registerWpActions( 'wp_ajax_ab_' );
297
+ }
298
+
299
+ protected function getHolidays($id) {
300
+ $collection = $this->getWpdb()->get_results( $this->getWpdb()->prepare( "SELECT * FROM ab_holiday WHERE staff_id = %d", $id ) );
301
+ $holidays = array();
302
+ if ( count( $collection ) ) {
303
+ foreach ( $collection as $holiday ) {
304
+ $holidays[$holiday->id] = array(
305
+ 'm' => intval(date('m', strtotime($holiday->holiday))),
306
+ 'd' => intval(date('d', strtotime($holiday->holiday))),
307
+ 'title' => $holiday->title,
308
+ );
309
+ // if not repeated holiday, add the year
310
+ if ( ! $holiday->repeat_event ) {
311
+ $holidays[$holiday->id]['y'] = intval(date('Y', strtotime($holiday->holiday)));
312
+ }
313
+ }
314
+ }
315
+
316
+ return json_encode( (object) $holidays );
317
+ }
318
+ }
backend/modules/staff/forms/AB_StaffMemberEditForm.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ if ( !function_exists( 'wp_handle_upload' ) ) require_once(ABSPATH . 'wp-admin/includes/file.php');
4
+ include dirname(__FILE__) . '/../../../../lib/AB_ImageResize.php';
5
+
6
+ class AB_StaffMemberEditForm extends AB_StaffMemberForm {
7
+
8
+ public function configure() {
9
+ $this->setFields( array(
10
+ 'wp_user_id',
11
+ 'full_name',
12
+ 'email',
13
+ 'phone',
14
+ 'avatar'
15
+ ) );
16
+ }
17
+
18
+ public function bind( array $post, array $files = array() ) {
19
+ if ( isset( $post[ 'wp_user_id' ] ) && ! $post[ 'wp_user_id' ] ) {
20
+ $post[ 'wp_user_id' ] = null;
21
+ }
22
+
23
+ parent::bind( $post );
24
+
25
+ if ( isset ( $files[ 'avatar' ] ) && $files[ 'avatar' ][ 'tmp_name' ] ) {
26
+
27
+ if ( in_array( $files[ 'avatar' ][ 'type' ], array( "image/gif", "image/jpeg", "image/png" ) ) ) {
28
+ $movefile = wp_handle_upload( $files[ 'avatar' ], array( 'test_form' => false ) );
29
+ if ( $movefile ) {
30
+ $imageResize = new AB_ImageResize( $movefile[ 'file' ] );
31
+ $imageResize->resizeImage( 80, 80 );
32
+ $imageResize->saveImage( $movefile[ 'file' ], 80 );
33
+
34
+ $this->data[ 'avatar_path' ] = $movefile[ 'file' ];
35
+ $this->data[ 'avatar_url' ] = $movefile[ 'url' ];
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
backend/modules/staff/forms/AB_StaffMemberForm.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+ include dirname(__FILE__) . '/../../../../lib/entities/AB_Staff.php';
5
+
6
+ /**
7
+ * Class AB_StaffMemberForm
8
+ *
9
+ * @property AB_Staff $staff
10
+ */
11
+ class AB_StaffMemberForm extends AB_Form {
12
+
13
+ /**
14
+ * Constructor.
15
+ */
16
+ public function __construct() {
17
+ parent::$entity_class = 'AB_Staff';
18
+ parent::__construct();
19
+ }
20
+
21
+ protected $wp_users;
22
+
23
+
24
+ // Help methods for rendering widgets.
25
+
26
+ /**
27
+ * Get list of users available for particular staff.
28
+ *
29
+ * @global string $table_prefix
30
+ * @param integer $staff_id If null then it means new staff
31
+ * @return array
32
+ */
33
+ public function getUsersForStaff($staff_id = null) {
34
+ /** @var wpdb $wpdb */
35
+ global $wpdb;
36
+ global $table_prefix;
37
+
38
+ $query = sprintf(
39
+ 'SELECT ID, user_email, display_name FROM %susers
40
+ WHERE ID NOT IN(SELECT DISTINCT IFNULL( wp_user_id, 0 ) FROM ab_staff %s)
41
+ ORDER BY display_name',
42
+ $table_prefix,
43
+ $staff_id !== null
44
+ ? "WHERE ab_staff.id <> $staff_id"
45
+ : ''
46
+ );
47
+
48
+ return $wpdb->get_results( $query );
49
+ }
50
+ }
backend/modules/staff/forms/AB_StaffMemberNewForm.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ include 'AB_StaffMemberForm.php';
4
+
5
+ /**
6
+ * Class AB_StaffMemberNewForm
7
+ */
8
+ class AB_StaffMemberNewForm extends AB_StaffMemberForm {
9
+
10
+ public function configure() {
11
+ $this->setFields( array( 'wp_user_id', 'full_name' ) );
12
+ }
13
+ }
backend/modules/staff/forms/AB_StaffScheduleForm.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ /**
6
+ * Class AB_StaffScheduleForm
7
+ */
8
+ class AB_StaffScheduleForm extends AB_Form {
9
+
10
+ /**
11
+ * Constructor.
12
+ */
13
+ public function __construct() {
14
+ parent::$entity_class = 'AB_StaffScheduleItem';
15
+ parent::__construct();
16
+ }
17
+
18
+ /**
19
+ * @var wpdb $wpdb
20
+ */
21
+ private $wpdb;
22
+
23
+ public function configure() {
24
+ global $wpdb;
25
+ $this->wpdb = $wpdb;
26
+ $this->setFields( array( 'days', 'staff_id', 'start_time', 'end_time' ) );
27
+ }
28
+
29
+ public function save() {
30
+ if ( isset($this->data['days']) ) {
31
+ foreach ( $this->data['days'] as $id => $schedule_item_id ) {
32
+ $staffScheduleItem = new AB_StaffScheduleItem();
33
+ $staffScheduleItem->load( $id );
34
+ $staffScheduleItem->set( 'schedule_item_id', $schedule_item_id );
35
+ if ($this->data['start_time'][$schedule_item_id]) {
36
+ $staffScheduleItem->set( 'start_time', $this->data['start_time'][$schedule_item_id] );
37
+ $staffScheduleItem->set( 'end_time', $this->data['end_time'][$schedule_item_id] );
38
+ } else {
39
+ $staffScheduleItem->set( 'start_time', null );
40
+ $staffScheduleItem->set( 'end_time', null );
41
+ }
42
+ $staffScheduleItem->save();
43
+ }
44
+ }
45
+ }
46
+ }
backend/modules/staff/forms/AB_StaffScheduleItemBreakForm.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include dirname(__FILE__) . '/../../../../lib/entities/AB_ScheduleItemBreak.php';
6
+
7
+ /**
8
+ * Class AB_StaffScheduleItemBreakForm
9
+ */
10
+ class AB_StaffScheduleItemBreakForm extends AB_Form {
11
+
12
+ /**
13
+ * Constructor.
14
+ */
15
+ public function __construct() {
16
+ parent::$entity_class = 'AB_ScheduleItemBreak';
17
+ parent::__construct();
18
+ }
19
+
20
+ public function configure() {
21
+ $this->setFields( array(
22
+ 'staff_schedule_item_id',
23
+ 'start_time',
24
+ 'end_time'
25
+ ) );
26
+ }
27
+ }
backend/modules/staff/forms/AB_StaffServicesForm.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ include dirname(__FILE__) . '/../../../../lib/entities/AB_Category.php';
6
+ include dirname(__FILE__) . '/../../../../lib/entities/AB_StaffService.php';
7
+
8
+ /**
9
+ * Class AB_StaffServicesForm
10
+ */
11
+ class AB_StaffServicesForm extends AB_Form {
12
+
13
+ /**
14
+ * Constructor.
15
+ */
16
+ public function __construct() {
17
+ parent::$entity_class = 'AB_StaffService';
18
+ parent::__construct();
19
+ }
20
+
21
+ /**
22
+ * @var wpdb $wpdb
23
+ */
24
+ private $wpdb;
25
+
26
+ /**
27
+ * @var AB_Category[]
28
+ */
29
+ private $collection = array();
30
+
31
+ /**
32
+ * @var array
33
+ */
34
+ private $selected = array();
35
+
36
+ /**
37
+ * @var array
38
+ */
39
+ private $category_services = array();
40
+
41
+ /**
42
+ * @var array
43
+ */
44
+ private $uncategorized_services = array();
45
+
46
+ public function configure() {
47
+ global $wpdb;
48
+ $this->wpdb = $wpdb;
49
+ $this->setFields( array( 'price', 'service', 'staff_id' ) );
50
+ }
51
+
52
+ public function load($staff_id) {
53
+ $data = $this->wpdb->get_results( '
54
+ SELECT c.name AS category_name, s.*
55
+ FROM ab_category c
56
+ INNER JOIN ab_service s ON c.id = s.category_id
57
+ ', ARRAY_A );
58
+
59
+ if ( !$data ) {
60
+ $data = array();
61
+ }
62
+
63
+ $uncategorized_services = $this->wpdb->get_results( 'SELECT * FROM ab_service WHERE category_id IS NULL' );
64
+ foreach ( $uncategorized_services as $uncategorized_service ) {
65
+ $abService = new AB_Service();
66
+ $abService->setData($uncategorized_service);
67
+
68
+ $this->uncategorized_services[] = $abService;
69
+ }
70
+
71
+ $rows = $this->wpdb->get_results( $this->wpdb->prepare('
72
+ SELECT s.service_id, s.price
73
+ FROM ab_staff_service s
74
+ WHERE s.staff_id = %d
75
+ ', $staff_id) );
76
+
77
+ if ( $rows ) {
78
+ foreach ($rows as $row) {
79
+ $this->selected[$row->service_id] = $row->price;
80
+ }
81
+ }
82
+
83
+ foreach ($data as $row) {
84
+ if ( !isset($this->collection[ $row['category_id'] ]) ) {
85
+ $abCategory = new AB_Category();
86
+ $abCategory->set( 'id', $row['category_id'] );
87
+ $abCategory->set( 'name', $row['category_name'] );
88
+ $this->collection[ $row['category_id'] ] = $abCategory;
89
+ }
90
+ unset( $row['category_name'] );
91
+
92
+ $abService = new AB_Service();
93
+ $abService->setData($row);
94
+ $this->category_services[$row['category_id']][] = $abService->get( 'id' );
95
+ $this->collection[ $row['category_id'] ]->addService($abService);
96
+ }
97
+ }
98
+
99
+ public function save() {
100
+ $staff_id = $this->data['staff_id'];
101
+ if ( $staff_id ) {
102
+ $this->wpdb->delete( 'ab_staff_service', array( 'staff_id' => $staff_id ), array( '%d' ) );
103
+ if ( isset($this->data['service']) ) {
104
+ foreach ( $this->data['service'] as $service_id ) {
105
+ $staffService = new AB_StaffService();
106
+ $staffService->set( 'service_id', $service_id );
107
+ $staffService->set( 'staff_id', $staff_id );
108
+ $staffService->set( 'price', $this->data['price'][ $service_id ] );
109
+ $staffService->save();
110
+ }
111
+ }
112
+ }
113
+ }
114
+
115
+ /**
116
+ * @return AB_Category[]|array
117
+ */
118
+ public function getCollection() {
119
+ return $this->collection;
120
+ }
121
+
122
+ /**
123
+ * @return array
124
+ */
125
+ public function getSelected() {
126
+ return is_array($this->selected) ? $this->selected : array();
127
+ }
128
+
129
+ /**
130
+ * @return array
131
+ */
132
+ public function getUncategorizedServices()
133
+ {
134
+ return $this->uncategorized_services;
135
+ }
136
+ }
backend/modules/staff/forms/widget/AB_TimeChoiceWidget.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class AB_TimeChoiceWidget {
6
+ /**
7
+ * @var array
8
+ */
9
+ protected $values = array();
10
+
11
+ /**
12
+ * Constructor.
13
+ *
14
+ * @param array $options
15
+ */
16
+ public function __construct( array $options = array() ) {
17
+ // Handle widget options.
18
+ $options = array_merge( array(
19
+ 'use_empty' => true,
20
+ 'empty_value' => null
21
+ ), $options );
22
+
23
+ // Insert empty value if required.
24
+ if ( $options[ 'use_empty' ] ) {
25
+ $this->values[ null ] = $options[ 'empty_value' ];
26
+ }
27
+
28
+ $tf = get_option( 'time_format' );
29
+ $ts_length = get_option( 'ab_settings_time_slot_length' );
30
+ $time_start = new AB_DateTime( AB_StaffScheduleItem::WORKING_START_TIME, new DateTimeZone( 'UTC' ) );
31
+ $time_end = new AB_DateTime( AB_StaffScheduleItem::WORKING_END_TIME, new DateTimeZone( 'UTC' ) );
32
+
33
+ // Run the loop.
34
+ while ( $time_start->format( 'U' ) <= $time_end->format( 'U' ) ) {
35
+ $this->values[ $time_start->format( 'H:i:s' ) ] = $time_start->format( $tf );
36
+ $time_start->modify( '+' . $ts_length . ' min' );
37
+ }
38
+ $this->values[ $time_end->format( 'H:i:s' ) ] = $time_end->format( $tf );
39
+ }
40
+
41
+ /**
42
+ * Render the widget.
43
+ *
44
+ * @param $name
45
+ * @param null $value
46
+ * @param array $attributes
47
+ *
48
+ * @return string
49
+ */
50
+ public function render( $name, $value = null, array $attributes = array() ) {
51
+ $options = array();
52
+ $attributes_str = '';
53
+ foreach ( $this->values as $option_value => $option_text ) {
54
+
55
+ $selected = strval( $value ) == strval( $option_value );
56
+ $options[ ] = sprintf(
57
+ '<option value="%s"%s>%s</option>',
58
+ $option_value,
59
+ ($selected ? ' selected="selected"' : ''),
60
+ $option_text
61
+ );
62
+ }
63
+ foreach ( $attributes as $attr_name => $attr_value ) {
64
+ $attributes_str .= sprintf( ' %s="%s"', $attr_name, $attr_value );
65
+ }
66
+
67
+ return sprintf( '<select name="%s"%s>%s</select>', $name, $attributes_str, implode( '', $options ) );
68
+ }
69
+
70
+ public function renderOptions( $start, $selected = '' ) {
71
+ $options = array();
72
+ foreach ( $this->values as $option_value => $option_text ) {
73
+ if ( $start && strval( $option_value ) < strval( $start ) ) continue;
74
+ $options[ ] = sprintf(
75
+ '<option value="%s"%s>%s</option>',
76
+ $option_value,
77
+ (strval( $selected ) == strval( $option_value ) ? 'selected="selected"' : ''),
78
+ $option_text
79
+ );
80
+ }
81
+
82
+ return $options;
83
+ }
84
+ }
backend/modules/staff/resources/css/staff.css ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ab-staff-schedule > table { width: 100% }
2
+ #ab-staff-schedule .staff-schedule-item-row > td { padding: 10px 0; border-bottom: 1px solid #DDDDDD; }
3
+ #ab-staff-schedule .staff-schedule-item-row.ab-last-row > td { border: 0; }
4
+ #ab-staff-schedule .staff-schedule-item-row > td.first { width: 115px }
5
+ #ab-staff-schedule .staff-schedule-item-row td.add-break { width: 80px }
6
+ #ab-staff-schedule .staff-schedule-item-row td.working-intervals { width: 210px }
7
+ #ab-staff-schedule .staff-schedule-item-row .break-interval-wrapper { margin-right: 7px; white-space: nowrap; float: left; }
8
+ #ab-staff-schedule .staff-schedule-item-row .break-interval-wrapper img {
9
+ border: 0 none;
10
+ cursor: pointer;
11
+ display: block;
12
+ float: left;
13
+ margin-left: 5px;
14
+ margin-top: 2px;
15
+ width: 12px;
16
+ }
17
+ #ab-staff-schedule .staff-schedule-item-row .breaks-list { width: 100% }
18
+ #ab-staff-schedule .staff-schedule-item-row .breaks-list .breaks-list-label { width: 60px }
19
+ #ab-staff-schedule .staff-schedule-item-row .ab-popup-wrapper .error { padding: 3px; margin: 5px; }
20
+ #ab-staff-schedule .staff-schedule-item-row .breaks-list .ab-popup-wrapper { float: left; margin-right: 3px; }
21
+ #ab-staff-schedule .error { margin: 0 }
22
+ #ab-staff-list { margin-left: 0; }
23
+ #ab-edit-staff .ab-nav-tabs { height: 37px; }
24
+ .ab-staff-form .control-label { text-align: left!important; }
25
+ .working-end, .working-start { margin-bottom: 0; font-size: 13px; }
26
+ .ab-content .break-end, .ab-content .break-start { width: auto; margin-bottom: 0; }
27
+ .add-break form { margin: 0; }
backend/modules/staff/resources/js/staff.js ADDED
@@ -0,0 +1,419 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+
3
+ var $name_input = $('#ab-newstaff-fullname'),
4
+ $list_item_number = $('#ab-list-item-number'),
5
+ $wp_user_select = $('#ab-newstaff-wpuser'),
6
+ $staff_member = $('.ab-staff-member'),
7
+ $edit_form = $('#ab-edit-staff-member'),
8
+ $new_form = $('#ab-new-satff');
9
+
10
+ // Saves new staff form
11
+ $('#ab-save-newstaff').bind('click', function () {
12
+ $('#light_notice').modal('show');
13
+ });
14
+
15
+ // Save new staff on enter press
16
+ $name_input.bind('keypress', function (e) {
17
+ var code = (e.keyCode ? e.keyCode : e.which);
18
+ if (code == 13) {
19
+ $('#light_notice').modal('show');
20
+ }
21
+ });
22
+
23
+ // Close new staff form on esc
24
+ $new_form.bind('keypress', function (e) {
25
+ var code = (e.keyCode ? e.keyCode : e.which);
26
+ if (code == 27) {
27
+ $('.ab-popup-wrapper').ab_popup('close');
28
+ }
29
+ });
30
+
31
+ function loadEditForm() {
32
+ // Marks selected element as active
33
+ $(this).parent().find('.ab-active').removeClass('ab-active');
34
+ $(this).addClass('ab-active');
35
+
36
+ var staff_id = $(this).data('staff-id');
37
+ var active_tab_id = $('ul.nav li.active a').attr('id');
38
+ $.get(ajaxurl, { action: 'ab_edit_staff', id: staff_id }, function (response) {
39
+ $edit_form.html(response);
40
+
41
+ // Deletes staff avatar
42
+ $('#ab-delete-avatar').bind('click', function () {
43
+ $.post(ajaxurl, { action: 'ab_delete_staff_avatar', id: staff_id }, function () {
44
+ $('#ab-staff-avatar-image', $edit_form).remove();
45
+ });
46
+ });
47
+
48
+ $('#ab-update-staff').bind('click', function (e) {
49
+ if (!validateForm($edit_form)) {
50
+ e.preventDefault(e);
51
+ e.stopPropagation(e);
52
+ }
53
+ });
54
+
55
+ $('#ab-staff-wpuser').bind('change', function () {
56
+ if ($(this).val()) {
57
+ $('#ab-staff-full-name').val($(this).find(':selected').text());
58
+ $('#ab-staff-email').val($(this).find(':selected').data('email'));
59
+ }
60
+ });
61
+
62
+ helpInit();
63
+
64
+ var service_container = $('#ab-staff-services-container'),
65
+ details_container = $('#ab-staff-details-container'),
66
+ schedule_container = $('#ab-staff-schedule-container'),
67
+ holidays_container = $('#ab-staff-holidays-container'),
68
+ $schedule_form,
69
+ services_form,
70
+ tabs = $('.ab-list-link', $edit_form);
71
+
72
+ // Opens services tab
73
+ $('#ab-staff-services-tab').bind('click', function () {
74
+ activateTab.call($(this));
75
+ service_container.show();
76
+
77
+ // Loads services form
78
+ if (!service_container.children().length) {
79
+ $.post(ajaxurl, { action: 'ab_staff_services', id: staff_id }, function (response) {
80
+ service_container.html(response);
81
+ services_form = $('form', service_container);
82
+
83
+ var auto_tick_checkboxes = function() {
84
+ // Handle 'select category' checkbox.
85
+ $('.ab-services-category .ab-category-checkbox').each(function() {
86
+ $(this).prop(
87
+ 'checked',
88
+ $('.ab-category-services .ab-service-checkbox.ab-category-' + $(this).data('category-id') + ':not(:checked)').length == 0
89
+ );
90
+ });
91
+ // Handle 'select all services' checkbox.
92
+ $('#ab-all-services').prop(
93
+ 'checked',
94
+ $('.ab-service-checkbox:not(:checked)').length == 0
95
+ );
96
+ };
97
+
98
+ // Select all services related to choosen category
99
+ $('.ab-category-checkbox', services_form).bind('click', function () {
100
+ $('.ab-category-services .ab-category-' + $(this).data('category-id')).attr('checked', $(this).is(':checked')).change();
101
+ auto_tick_checkboxes();
102
+ });
103
+
104
+ // Select all services
105
+ $('#ab-all-services').bind('click', function () {
106
+ $('.ab-service-checkbox', services_form).attr('checked', $(this).is(':checked')).change();
107
+ $('.ab-category-checkbox').attr('checked', $(this).is(':checked'));
108
+ });
109
+
110
+ // Select service
111
+ $('.ab-service-checkbox', services_form).bind('click', function () {
112
+ var $this = $(this);
113
+ var $price = $this.closest('li').find('.ab-price');
114
+ $this.is(':checked') ? $price.removeAttr('disabled') : $price.attr('disabled', true);
115
+ auto_tick_checkboxes();
116
+ });
117
+
118
+ $('.ab-service-checkbox',services_form).bind('change', function(){
119
+ var $price = $('.ab-price[name="price['+$(this).val()+']"]');
120
+ $(this).is(':checked') ? $price.removeAttr('disabled') : $price.attr('disabled', true);
121
+ });
122
+
123
+ // Saves services
124
+ $('#ab-staff-services-update').bind('click', function () {
125
+ $('.spinner', services_form).fadeIn('slow');
126
+ $.post(ajaxurl, services_form.serialize(), function (response) {
127
+ $('.spinner', services_form).fadeOut('slow');
128
+ });
129
+ });
130
+
131
+ auto_tick_checkboxes();
132
+ });
133
+ }
134
+ });
135
+
136
+ // Opens schedule tab
137
+ $('#ab-staff-schedule-tab').bind('click', function () {
138
+ activateTab.call($(this));
139
+ schedule_container.show();
140
+
141
+ // Loads schedule list
142
+ if (!schedule_container.children().length) {
143
+ $.post(ajaxurl, { action: 'ab_staff_schedule', id: staff_id }, function (response) {
144
+ // fill in the container
145
+ schedule_container.html(response);
146
+ $schedule_form = $('form', schedule_container);
147
+
148
+ // Saves initial values
149
+ $('.working-start', schedule_container).each(function () {
150
+ $(this).data('default_value', $(this).val());
151
+ });
152
+
153
+ $('.working-end', schedule_container).each(function () {
154
+ $(this).data('default_value', $(this).val());
155
+ });
156
+
157
+ // Resets initial values
158
+ $('#ab-schedule-reset').bind('click', function () {
159
+ $('.working-start', schedule_container).each(function () {
160
+ $(this).val($(this).data('default_value'));
161
+ $(this).trigger('click');
162
+ });
163
+
164
+ $('.working-end', schedule_container).each(function () {
165
+ $(this).val($(this).data('default_value'));
166
+ });
167
+ });
168
+
169
+ $('#ab-staff-schedule-update', schedule_container).bind('click', function () {
170
+ $('.spinner', $schedule_form).fadeIn('slow');
171
+ var data = {};
172
+ $('select.working-start, select.working-end, input:hidden', $schedule_form).each(function() {
173
+ data[this.name] = this.value;
174
+ });
175
+ $.post(ajaxurl, $.param(data), function (response) {
176
+ $('.spinner', $schedule_form).fadeOut('slow');
177
+ schedule_container.html('');
178
+ $('#ab-staff-schedule-tab').trigger('click');
179
+ });
180
+ });
181
+
182
+ // init "add break" functionality
183
+ schedule_container.find('.ab-popup-wrapper').ab_popup();
184
+ schedule_container.find('.ab-popup-trigger:not(.break-interval)').bind('click', function() {
185
+ var $row = $(this).parents('.staff-schedule-item-row').first(),
186
+ $working_start = $row.find('.working-start').val(),
187
+ $working_end = $row.find('.working-end').val();
188
+
189
+ // if the day is the working one - handle "add break" selected values
190
+ if ($working_start.length && $working_end.length) {
191
+ var $working_start_time = $working_start.split(':'),
192
+ $working_start_hours = parseInt($working_start_time[0], 10),
193
+ $break_end = $row.find('.add-break .break-end'),
194
+ $break_end_hours = $working_start_hours + 2;
195
+
196
+ if ($break_end_hours < 10) {
197
+ $break_end_hours = '0' + $break_end_hours;
198
+ }
199
+ var $break_end_hours_str = $break_end_hours + ':' + $working_start_time[1] + ':' + $working_start_time[2],
200
+ $break_end_option = $break_end.find('option[value="' + $break_end_hours_str + '"]'),
201
+ $break_start = $row.find('.add-break .break-start');
202
+
203
+ if ($break_end_option.length) {
204
+ var $break_start_hours = $working_start_hours + 1;
205
+ if ($break_start_hours < 10) {
206
+ $break_start_hours = '0' + $break_start_hours;
207
+ }
208
+ var $break_start_hours_str = $break_start_hours + ':' + $working_start_time[1] + ':' + $working_start_time[2];
209
+
210
+ $break_start.val($break_start_hours_str);
211
+ $break_end.val($break_end_hours_str);
212
+ } else {
213
+ // set defaults
214
+ $break_start.val($break_start.data('default_value'));
215
+ $break_end.val($break_end.data('default_value'));
216
+ }
217
+ $break_start.trigger('change');
218
+ }
219
+ });
220
+
221
+ // when the working day is disabled (working start time is set to "OFF")
222
+ // hide all the elements inside the row
223
+ schedule_container.find('.working-start').bind('click', function(){
224
+ var $this = $(this),
225
+ $row = $this.parents('.staff-schedule-item-row');
226
+
227
+ if (!$this.val()) {
228
+ $row.find('.hide-on-non-working-day').hide();
229
+ } else {
230
+ $row.find('.hide-on-non-working-day:hidden').show();
231
+ }
232
+ });
233
+
234
+ $('.working-start', schedule_container).on('change', function () {
235
+ var $row = $(this).parents('.staff-schedule-item-row').first(),
236
+ $end_select = $('.working-end', $row),
237
+ start_time = $(this).val();
238
+
239
+ $('span > option', $end_select).each(function () {
240
+ if ( start_time < $(this).val()) {
241
+ $(this).unwrap();
242
+ }
243
+ });
244
+
245
+ // Hides end time options with value less than in the start time
246
+ $('option', $end_select).each(function () {
247
+ if ($(this).val() <= start_time) {
248
+ $(this).wrap("<span>").parent().hide();
249
+ }
250
+ });
251
+ }).trigger('change');
252
+
253
+ schedule_container.find('.ab-popup-wrapper .break-interval').bind('click', function(){
254
+ markBreakIntervalActive.call($(this));
255
+ });
256
+
257
+ schedule_container.find('.break-interval-wrapper .delete-break').bind('click', function(){
258
+ deleteStaffScheduleBreakInterval.call($(this));
259
+ });
260
+
261
+ schedule_container.find('.break-start').bind('change', function(){
262
+ var start = $(this);
263
+ var end = start.parent().find('.break-end');
264
+ checkStaffScheduleBreakTimeRange(start,end);
265
+ }).trigger('change');
266
+
267
+ schedule_container.delegate('.ab-save-break', 'click', function() {
268
+ var $table = $(this).closest('table'),
269
+ $row = $table.parents('.staff-schedule-item-row').first(),
270
+ $break_list_label = $row.find('.breaks-list-label span'),
271
+ $break_interval_wrapper = $table.parents('.break-interval-wrapper').first(),
272
+ $error = $table.parents('.ab-popup-wrapper').find('.error'),
273
+ $data = {
274
+ action : 'ab_staff_schedule_handle_break',
275
+ working_start : $row.find('.working-start > option:selected').val(),
276
+ working_end : $row.find('.working-end > option:selected').val(),
277
+ start_time : $table.find('.break-start > option:selected').val(),
278
+ end_time : $table.find('.break-end > option:selected').val(),
279
+ staff_schedule_item_id : $row.data('schedule_item_id')
280
+ };
281
+
282
+ if ($break_interval_wrapper.data('break_id')) {
283
+ $data['break_id'] = $break_interval_wrapper.data('break_id');
284
+ }
285
+
286
+ $.post(
287
+ ajaxurl,
288
+ $data,
289
+ function (response) {
290
+ if (response['success']) {
291
+ if (response['item_content']) {
292
+ var $new_break_interval_item = $(response['item_content']);
293
+ $new_break_interval_item
294
+ .hide()
295
+ .appendTo($row.find('.breaks-list-content'))
296
+ .fadeIn('slow');
297
+ $new_break_interval_item.find('.break-interval').bind('click', function(){
298
+ markBreakIntervalActive.call($(this));
299
+ });
300
+ $new_break_interval_item.find('.delete-break').bind('click', function(){
301
+ deleteStaffScheduleBreakInterval.call($(this));
302
+ });
303
+ if ($break_list_label.is(':hidden')) {
304
+ $break_list_label.fadeIn('slow');
305
+ }
306
+ schedule_container.find('.ab-popup-wrapper').ab_popup();
307
+ } else if (response['new_interval']) {
308
+ $break_interval_wrapper
309
+ .find('.break-interval.active')
310
+ .text(response['new_interval'])
311
+ .removeClass('active');
312
+ }
313
+ $row.find('.ab-popup-wrapper').ab_popup('close');
314
+ } else {
315
+ $error.text(response['error_msg']);
316
+ $error.slideDown();
317
+ var t = setTimeout(function() {
318
+ $error.hide();
319
+ clearTimeout(t);
320
+ }, 3000);
321
+ }
322
+ },
323
+ 'json'
324
+ );
325
+
326
+ return false;
327
+ });
328
+ });
329
+ }
330
+ });
331
+
332
+ // Opens details tab
333
+ $('#ab-staff-details-tab').bind('click', function () {
334
+ activateTab.call($(this));
335
+ details_container.show();
336
+ });
337
+
338
+ // Opens "Days off" tab
339
+ $('#ab-staff-holidays-tab').bind('click', function () {
340
+ activateTab.call($(this));
341
+ holidays_container.show();
342
+
343
+ if (!holidays_container.children().length) {
344
+ holidays_container.load(ajaxurl, { action: 'ab_staff_holidays', id: staff_id });
345
+ }
346
+ });
347
+
348
+ function markBreakIntervalActive() {
349
+ $(this).parents('.breaks-list-content').find('.break-interval').removeClass('.active');
350
+ $(this).addClass('active');
351
+ }
352
+
353
+ function checkStaffScheduleBreakTimeRange( start, end )
354
+ {
355
+ var start_time = start.val();
356
+
357
+ $('span > option', end).each(function () {
358
+ if (start_time < $(this).val()) {
359
+ $(this).unwrap();
360
+ }
361
+ });
362
+
363
+ // Hides end time options with value less than in the start time
364
+ $('option', end).each(function () {
365
+ if ($(this).val() <= start_time) {
366
+ $(this).wrap("<span>").parent().hide();
367
+ }
368
+ });
369
+ }
370
+
371
+ function deleteStaffScheduleBreakInterval() {
372
+ var $break_interval_wrapper = $(this).parent(),
373
+ $row = $break_interval_wrapper.parents('.staff-schedule-item-row').first();
374
+ if (confirm('Are you sure?')) {
375
+ $.post(ajaxurl, { action: 'ab_delete_staff_schedule_break', id: $break_interval_wrapper.data('break_id') }, function (response) {
376
+ $break_interval_wrapper.fadeOut(700, function() {
377
+ $(this).remove();
378
+ if (!$row.find('.break-interval-wrapper').length) {
379
+ $row.find('.breaks-list-label span').hide();
380
+ }
381
+ });
382
+ });
383
+ }
384
+ }
385
+
386
+ function activateTab() {
387
+ // $('.ab-active', tabs).removeClass('ab-active');
388
+ // $(this).addClass('ab-active');
389
+ $('.ab-staff-tab-content').not(':hidden').hide();
390
+ }
391
+
392
+ $('#' + active_tab_id).click();
393
+ });
394
+ }
395
+
396
+ function helpInit() {
397
+ // Popovers initialization.
398
+ $('.ab-help-info').show(function () {
399
+ $(this).popover({
400
+ trigger : 'hover',
401
+ content: $('#' + $(this).data('help_id')).html(),
402
+ html: true
403
+ });
404
+ });
405
+ }
406
+
407
+ $wp_user_select.bind('change', function () {
408
+ if ($(this).val()) {
409
+ $name_input.val($(this).find(':selected').text());
410
+ }
411
+ });
412
+
413
+ $staff_member.click(function () {
414
+ loadEditForm.call(this);
415
+ });
416
+ $staff_member.filter('[data-active="true"]').click();
417
+
418
+ helpInit();
419
+ });
backend/modules/staff/templates/edit.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div id="ab-edit-staff">
3
+ <?php if( isset($update) ): ?>
4
+ <div class="alert">
5
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
6
+ <?php echo _e( 'Settings saved.', 'ab' )?>
7
+ </div>
8
+ <?php endif ?>
9
+ <div style="overflow: hidden; position: relative">
10
+ <h2 class="left"><?php echo $staff->get( 'full_name' ) ?></h2>
11
+ </div>
12
+ <div class="tabbable">
13
+ <ul class="nav nav-tabs ab-nav-tabs">
14
+ <li class="active"><a id="ab-staff-details-tab" href="#tab1" data-toggle="tab"><?php _e( 'Details', 'ab' ) ?></a></li>
15
+ <li><a id="ab-staff-services-tab" href="#tab2" data-toggle="tab"><?php _e( 'Services', 'ab' ) ?></a></li>
16
+ <li><a id="ab-staff-schedule-tab" href="#tab3" data-toggle="tab"><?php _e( 'Schedule', 'ab') ?></a></li>
17
+ <li><a id="ab-staff-holidays-tab" href="#tab4" data-toggle="tab"><?php _e( 'Days off', 'ab') ?></a></li>
18
+ </ul>
19
+ <div class="tab-content">
20
+ <div class="tab-pane active" id="tab1">
21
+ <div id="ab-staff-details-container" class="ab-staff-tab-content">
22
+ <form class="ab-staff-form bs-docs-example form-horizontal" action="" name="ab_staff" method="POST" enctype="multipart/form-data">
23
+ <table cellspacing="0">
24
+ <tbody>
25
+ <tr>
26
+ <td class="control-group">
27
+ <label class="control-label" for="ab-staff-wpuser"><?php _e( 'User', 'ab') ?></label>
28
+ <div class="controls">
29
+ <select name="wp_user_id" id="ab-staff-wpuser">
30
+ <option value=""><?php _e( 'Select from WP users', 'ab') ?></option>
31
+ <?php foreach ( $form->getUsersForStaff( $staff->id ) as $user ) : ?>
32
+ <option value="<?php echo $user->ID ?>" data-email="<?php echo $user->user_email ?>" <?php if ( $user->ID == $staff->get( 'wp_user_id' ) ) echo ' selected="selected"' ?>><?php echo $user->display_name ?></option>
33
+ <?php endforeach ?>
34
+ </select>
35
+ <img
36
+ src="<?php echo plugins_url( 'resources/images/help.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>"
37
+ alt=""
38
+ class="ab-help-info"
39
+ data-help_id="ab-staff-help"
40
+ rel='popover'
41
+ />
42
+ </div>
43
+ </td>
44
+ </tr>
45
+ <tr>
46
+ <td class="control-group">
47
+ <label class="control-label" for="ab-staff-full-name"><?php _e( 'Photo', 'ab') ?></label>
48
+ <div class="controls">
49
+ <div id="ab-staff-avatar-image">
50
+ <?php if ( $staff->get( 'avatar_url' ) ) : ?>
51
+ <img src="<?php echo $staff->get( 'avatar_url' ) ?>" alt="<?php _e( 'Avatar', 'ab') ?>"/>
52
+ <a id="ab-delete-avatar" href="javascript:void(0)"><?php _e( 'Delete current photo', 'ab') ?></a>
53
+ <?php endif ?>
54
+ </div>
55
+ <input id="ab-staff-avatar" name="avatar" type="file"/>
56
+ </div>
57
+ </td>
58
+ </tr>
59
+ <tr class="form-field form-required">
60
+ <td class="control-group">
61
+ <label class="control-label" for="ab-staff-full-name"><?php _e( 'Full name', 'ab') ?></label>
62
+ <div class="controls">
63
+ <input id="ab-staff-full-name" name="full_name" value="<?php esc_attr_e( $staff->get( 'full_name' ) ) ?>" type="text"/><span class="red"> *</span>
64
+ </div>
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <td class="control-group">
69
+ <label class="control-label" for="ab-staff-email"><?php _e( 'Email', 'ab') ?></label>
70
+ <div class="controls">
71
+ <input id="ab-staff-email" name="email" value="<?php esc_attr_e( $staff->get( 'email' ) ) ?>" type="text"/>
72
+ </div>
73
+ </td>
74
+ </tr>
75
+ <tr>
76
+ <td class="control-group">
77
+ <label class="control-label" for="ab-staff-phone"><?php _e( 'Phone', 'ab') ?></label>
78
+ <div class="controls">
79
+ <input id="ab-staff-phone" name="phone" value="<?php esc_attr_e( $staff->get( 'phone' ) ) ?>" type="text"/>
80
+ </div>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <td class="control-group">
85
+ <h4 style="float: left"><?php _e( 'Google Calendar integration', 'ab' ) ?></h4>
86
+ <img style="float: left;margin-top: 8px;margin-left:15px;"
87
+ src="<?php echo plugins_url( 'resources/images/help.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>"
88
+ alt=""
89
+ class="ab-help-info"
90
+ data-help_id="ab-staff-google"
91
+ rel='popover'
92
+ />
93
+ </td>
94
+ </tr>
95
+ <tr>
96
+ <td class="control-group">
97
+ <label class="control-label" for="ab-staff-google-user"><?php _e( 'Email', 'ab' ) ?></label>
98
+ <div class="controls">
99
+ <input class="ab-staff-google" value="" type="text"/>
100
+ </div>
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <td class="control-group">
105
+ <label class="control-label" for="ab-staff-google-pass"><?php _e( 'Password', 'ab' ) ?></label>
106
+ <div class="controls">
107
+ <input class="ab-staff-google" value="" type="password"/>
108
+ </div>
109
+ </td>
110
+ </tr>
111
+ <tr>
112
+ <td class="control-group">
113
+ <label class="control-label"></label>
114
+ <div class="controls">
115
+ <input id="ab-update-staff" type="submit" value="<?php _e( 'Update', 'ab') ?>" class="btn btn-info ab-update-button">
116
+ <button class="ab-reset-form" type="reset"><?php _e( 'Reset', 'ab') ?></button>
117
+ </div>
118
+ </td>
119
+ </tr>
120
+ </tbody>
121
+ </table>
122
+ <input type="hidden" name="id" value="<?php echo $staff->get( 'id' ) ?>"/>
123
+ <input type="hidden" name="action" value="ab_update_staff"/>
124
+ </form>
125
+ </div>
126
+ </div>
127
+ <div class="tab-pane" id="tab2">
128
+ <div id="ab-staff-services-container" class="ab-staff-tab-content" style="display: none"></div>
129
+ </div>
130
+ <div class="tab-pane" id="tab3">
131
+ <div id="ab-staff-schedule-container" class="ab-staff-tab-content" style="display: none"></div>
132
+ </div>
133
+ <div class="tab-pane" id="tab4">
134
+ <div id="ab-staff-holidays-container" class="ab-staff-tab-content" style="display: none"></div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ </div>
139
+
140
+
141
+ <div class="modal fade" id="light_notice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
142
+ <div class="modal-dialog">
143
+ <div class="modal-content">
144
+ <div class="modal-header">
145
+ <h4 class="modal-title">Notice</h4>
146
+ </div>
147
+ <div class="modal-body">
148
+ <?php _e('This function is disabled in the light verison of Bookly. If you find the plugin useful for your business please consider buying a licence for the full version. It costs just $35 and for this money you will get many useful functions, lifetime free update and excellent support! More information can be found here'); ?>: <a href="http://bookly.ladela.com" target="_blank">http://bookly.ladela.com</a>
149
+ </div>
150
+ <div class="modal-footer">
151
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
152
+ </div>
153
+ </div><!-- /.modal-content -->
154
+ </div><!-- /.modal-dialog -->
155
+ </div><!-- /.modal -->
156
+
157
+ <script>
158
+ jQuery('.ab-staff-google').on('focus', function(){
159
+ jQuery('#light_notice').modal('show');
160
+ });
161
+ </script>
backend/modules/staff/templates/holidays.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div id="ab-annual-calendar-scroll" style="text-align: center;">
3
+ <div class="input-prepend input-append">
4
+ <span class="ab-week-picker-arrow prev add-on col-arrow">◄</span>
5
+ <input style="width: 70px; text-align: center;background: white" class="span2 jcal_year" readonly="readonly" id="appendedPrependedInput" size="16" type="text" value="2014">
6
+ <span class="ab-week-picker-arrow next add-on col-arrow">►</span>
7
+ </div>
8
+ </div>
9
+ <div id="ab-annual-calendar"></div>
10
+
11
+ <script type="text/javascript">
12
+ jQuery(function($) {
13
+ var d = new Date();
14
+ $('#ab-annual-calendar').jCal({
15
+ day: new Date(d.getFullYear(), 0, 1),
16
+ days: 1,
17
+ showMonths: 12,
18
+ scrollSpeed: 350,
19
+ events: <?php echo $holidays ?>,
20
+ action: 'ab_staff_holidays_update',
21
+ staff_id: <?php echo $id ?>,
22
+ dayOffset: <?php echo get_option('start_of_week', 0) ?>
23
+ });
24
+ });
25
+ </script>
backend/modules/staff/templates/list.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div class="ab-title"><?php _e( 'Staff Members', 'ab') ?> (<span id="ab-list-item-number"><?php echo count($collection) ?></span>)</div>
3
+ <div id="ab-staff" class="ab-left-bar ab-static-width">
4
+
5
+ <ul id="ab-staff-list">
6
+ <?php if ( $collection ) : ?>
7
+ <?php foreach ($collection as $staff) : ?>
8
+ <li class="ab-staff-member" id="ab-list-staff-<?php echo $staff->id ?>" data-staff-id="<?php echo $staff->id ?>"<?php if ( $active_staff_id == $staff->id ): ?> data-active="true"<?php endif ?>>
9
+ <?php if ($staff->avatar_url) : ?>
10
+ <img class="left ab-avatar" src="<?php echo $staff->avatar_url ?>" />
11
+ <?php else : ?>
12
+ <img class="left ab-avatar" src="<?php echo plugins_url( 'resources/images/default-avatar.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>" />
13
+ <?php endif ?>
14
+ <div class="ab-text-align"><?php esc_html_e( $staff->full_name ) ?></div>
15
+ </li>
16
+ <?php endforeach ?>
17
+ <?php endif ?>
18
+ </ul>
19
+ <?php include 'new.php' ?>
20
+
21
+
22
+
23
+ </div>
24
+
25
+ <div id="ab-edit-staff-member" class="ab-right-content ab-full-width"></div>
26
+ <div id="ab-staff-help" style="display: none">
27
+ <p><?php _e('If this staff member requires separate login to access personal calendar, a regular WP user needs to be created for this purpose.', 'ab') ?></p>
28
+ <p><?php _e('User with "Administrator" role will have access to calendars and settings of all staff members, user with some other role will have access only to personal calendar and settings.', 'ab') ?></p>
29
+ <p><?php _e('If you will leave this field blank, this staff member will not be able to access personal calendar using WP backend.', 'ab') ?></p>
30
+ </div>
31
+ <div id="ab-staff-google" style="display: none">
32
+ <p><?php _e('Synchronizes the data of the staff member bookings with the Google Calendar.', 'ab') ?></p>
33
+ </div>
backend/modules/staff/templates/list_item.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <li class="ab-staff-member" id="ab-list-staff-<?php echo $staff->get( 'id' ) ?>" data-staff-id="<?php echo $staff->get( 'id' ) ?>">
3
+ <img class="left ab-avatar" src="<?php echo plugins_url( 'resources/images/default-avatar.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>" />
4
+ <div class="ab-text-align"><?php esc_html_e( $staff->get( 'full_name' ) ) ?></div>
5
+ </li>
backend/modules/staff/templates/new.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div class="ab-popup-wrapper">
3
+ <a class="btn btn-info ab-popup-trigger" id="ab-newstaff-member"><?php _e('New Staff Member', 'ab') ?></a>
4
+ <div class="ab-popup" style="display: none">
5
+ <div class="ab-arrow"></div>
6
+ <div id="ab-new-satff" class="ab-content">
7
+ <table class="form-horizontal" cellspacing="0">
8
+ <tbody>
9
+ <tr>
10
+ <td><label for="ab-newstaff-wpuser"><?php _e('User','ab') ?></label></td>
11
+ <td>
12
+ <select class="auto-w" name="ab_newstaff_wpuser" id="ab-newstaff-wpuser">
13
+ <option value=""><?php _e('Select from WP users', 'ab') ?></option>
14
+ <?php foreach ( $form->getUsersForStaff() as $user ) : ?>
15
+ <option value="<?php echo $user->ID ?>"><?php echo $user->display_name ?></option>
16
+ <?php endforeach ?>
17
+ </select>
18
+ <img src="<?php echo plugins_url( 'resources/images/help.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>" alt="" class="ab-help-info" data-help_id="ab-staff-help"/>
19
+ </td>
20
+ </tr>
21
+ <tr class="form-field form-required">
22
+ <td><label for="ab-newstaff-fullname"><?php _e('Full name', 'ab') ?></label></td>
23
+ <td><input class="ab-clear-text" id="ab-newstaff-fullname" name="ab_newstaff_fullname" type="text"/><span class="red" style="vertical-align: bottom;font-size: 26px;"> *</span></td>
24
+ </tr>
25
+ <tr>
26
+ <td></td>
27
+ <td>
28
+ <input id="ab-save-newstaff" type="submit" value="<?php _e( 'Save Member', 'ab') ?>" class="btn btn-info ab-update-button">
29
+ <a class="ab-popup-close" href="javascript:void(0)"><?php _e('Cancel', 'ab') ?></a>
30
+ </td>
31
+ </tbody>
32
+ </table>
33
+ <a class="ab-popup-close ab-popup-close-icon" href="javascript:void(0)"></a>
34
+ </div>
35
+ </div>
36
+ </div>
backend/modules/staff/templates/schedule.php ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+ <div id="ab-staff-schedule">
3
+ <?php if ( count( $schedule_list ) ) : ?>
4
+ <?php
5
+ $time_format = get_option( 'time_format' );
6
+ $one_hour_in_seconds = 1 * 60 * 60;
7
+
8
+ $start_time_default_value = AB_StaffScheduleItem::WORKING_START_TIME;
9
+ $end_time_default_value = date( 'H:i:s', strtotime( AB_StaffScheduleItem::WORKING_START_TIME . ' + 1 hour' ) );
10
+ ?>
11
+ <div class="alert" style="display: none">
12
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
13
+ <!-- text -->
14
+ </div>
15
+ <form>
16
+ <table cellspacing="0" cellpadding="0">
17
+ <tbody>
18
+ <?php foreach ( $schedule_list as $list_item ) : ?>
19
+ <?php $day_is_not_available = null === $list_item->start_time ?>
20
+ <tr data-id="<?php echo $list_item->id ?>" data-schedule_item_id="<?php echo $list_item->schedule_item_id ?>" class="staff-schedule-item-row">
21
+ <td class="first"><?php echo __( $list_item->name, 'ab' ) ?></td>
22
+ <td class="working-intervals">
23
+ <?php
24
+ $workingStart = new AB_TimeChoiceWidget( array( 'empty_value' => __('OFF', 'ab') ) );
25
+ $working_start_choices = $workingStart->render(
26
+ 'start_time[' . $list_item->id . ']',
27
+ $list_item->start_time,
28
+ array( 'class' => 'working-start', 'style' => 'width:auto' )
29
+ );
30
+ $workingEnd = new AB_TimeChoiceWidget( array( 'use_empty' => false ) );
31
+ $working_end_choices_attributes = array( 'class' => 'working-end hide-on-non-working-day', 'style' => 'width:auto' );
32
+ if ( $day_is_not_available ) {
33
+ $working_end_choices_attributes['style'] = 'display:none; width:auto';
34
+ }
35
+ $working_end_choices = $workingEnd->render(
36
+ 'end_time[' . $list_item->id . ']',
37
+ $list_item->end_time,
38
+ $working_end_choices_attributes
39
+ );
40
+ echo $working_start_choices . ' <span class="hide-on-non-working-day"' . ($day_is_not_available ? ' style="display: none"' : '') . '>' . __( 'to', 'ab') . '</span> ' . $working_end_choices;
41
+ ?>
42
+ <input type="hidden" name="days[<?php echo $list_item->schedule_item_id ?>]" value="<?php echo $list_item->id ?>"/>
43
+ </td>
44
+ <td class="add-break">
45
+ <div class="ab-popup-wrapper hide-on-non-working-day"<?php if ( $day_is_not_available ) : ?> style="display: none"<?php endif; ?>>
46
+ <a class="ab-popup-trigger" href="javascript:void(0)"><?php _e('add break', 'ab') ?></a>
47
+ <div class="ab-popup" style="display: none">
48
+ <div class="ab-arrow"></div>
49
+ <div class="error" style="display: none"></div>
50
+ <div class="ab-content">
51
+ <table cellspacing="0" cellpadding="0">
52
+ <tr>
53
+ <td>
54
+ <?php
55
+ $breakStart = new AB_TimeChoiceWidget( array( 'use_empty' => false ) );
56
+ $break_start_choices = $breakStart->render(
57
+ '',
58
+ null,
59
+ array(
60
+ 'class' => 'break-start',
61
+ 'data-default_value' => $start_time_default_value
62
+ )
63
+ );
64
+ $breakEnd = new AB_TimeChoiceWidget( array( 'use_empty' => false ) );
65
+ $break_end_choices = $breakEnd->render(
66
+ '',
67
+ null,
68
+ array(
69
+ 'class' => 'break-end',
70
+ 'data-default_value' => $end_time_default_value
71
+ )
72
+ );
73
+ echo $break_start_choices . ' <span>' . __( 'to','ab' ) . '</span> ' . $break_end_choices;
74
+ ?>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td>
79
+ <a class="btn btn-info ab-popup-save ab-save-break ab-update-button"><?php _e('Save break','ab') ?></a>
80
+ <a class="ab-popup-close" href="#"><?php _e('Cancel','ab') ?></a>
81
+ </td>
82
+ </tr>
83
+ </table>
84
+ <a class="ab-popup-close ab-popup-close-icon" href="javascript:void(0)"></a>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ </td>
89
+ <td class="breaks">
90
+ <?php
91
+ $staffScheduleItem = new AB_StaffScheduleItem();
92
+ $staffScheduleItem->load($list_item->schedule_item_id);
93
+
94
+ $breaks_list = $staffScheduleItem->getBreaksList();
95
+ $display = count( $breaks_list ) ? 'inline-block' : 'none;';
96
+ ?>
97
+ <table class="breaks-list hide-on-non-working-day" cellspacing="0" cellpadding="0"<?php if ( $day_is_not_available ) : ?> style="display: none"<?php endif; ?>>
98
+ <tr>
99
+ <td class="breaks-list-label">
100
+ <span style="display: <?php echo $display ?>">
101
+ <?php _e('breaks:','ab') ?>
102
+ </span>
103
+ </td>
104
+ <td class="breaks-list-content">
105
+ <?php foreach ( $breaks_list as $break_interval ) : ?>
106
+ <?php
107
+ $formatted_interval_start = date( $time_format, strtotime( $break_interval->start_time ) );
108
+ $formatted_interval_end = date( $time_format, strtotime( $break_interval->end_time ) );
109
+ $formatted_interval = $formatted_interval_start . ' - ' . $formatted_interval_end;
110
+ ?>
111
+ <div class="break-interval-wrapper" data-break_id="<?php echo $break_interval->id ?>">
112
+ <div class="ab-popup-wrapper">
113
+ <a class="ab-popup-trigger break-interval" href="javascript:void(0)"><?php echo $formatted_interval ?></a>
114
+ <div class="ab-popup" style="display: none">
115
+ <div class="ab-arrow"></div>
116
+ <div class="error" style="display: none"></div>
117
+ <div class="ab-content">
118
+ <table cellspacing="0" cellpadding="0">
119
+ <tr>
120
+ <td>
121
+ <?php
122
+ $breakStart = new AB_TimeChoiceWidget( array( 'use_empty' => false ) );
123
+ $break_start_choices = $breakStart->render(
124
+ '',
125
+ $break_interval->start_time,
126
+ array(
127
+ 'class' => 'break-start',
128
+ 'data-default_value' => $start_time_default_value
129
+ )
130
+ );
131
+ $breakEnd = new AB_TimeChoiceWidget( array( 'use_empty' => false ) );
132
+ $break_end_choices = $breakEnd->render(
133
+ '',
134
+ $break_interval->end_time,
135
+ array(
136
+ 'class' => 'break-end',
137
+ 'data-default_value' => $end_time_default_value
138
+ )
139
+ );
140
+ echo $break_start_choices . ' <span>' . __( 'to','ab' ) . '</span> ' . $break_end_choices;
141
+ ?>
142
+ </td>
143
+ </tr>
144
+ <tr>
145
+ <td>
146
+ <a class="btn btn-info ab-popup-save ab-save-break ab-update-button"><?php _e('Save break','ab') ?></a>
147
+ <a class="ab-popup-close" href="#"><?php _e('Cancel','ab') ?></a>
148
+ </td>
149
+ </tr>
150
+ </table>
151
+ <a class="ab-popup-close ab-popup-close-icon" href="javascript:void(0)"></a>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ <img class="delete-break" src="<?php echo plugins_url( 'resources/images/delete_cross.png', dirname(__FILE__).'/../../../AB_Backend.php' ) ?>" />
156
+ </div>
157
+ <?php endforeach; ?>
158
+ </td>
159
+ </tr>
160
+ </table>
161
+ </td>
162
+ </tr>
163
+ <?php endforeach ?>
164
+ <tr class="staff-schedule-item-row ab-last-row">
165
+ <td></td>
166
+ <td colspan="3">
167
+ <input type="hidden" name="action" value="ab_staff_schedule_update"/>
168
+ <span class="spinner left"></span>
169
+ <a id="ab-staff-schedule-update" href="javascript:void(0)" class="btn btn-info ab-update-button"><?php _e( 'Update', 'ab' ) ?></a>
170
+ <a id="ab-schedule-reset" class="ab-reset-form" href="javascript:void(0)"><?php _e( 'Reset', 'ab') ?></a>
171
+ </td>
172
+ </tr>
173
+ </tbody>
174
+ </table>
175
+ </form>
176
+ <?php else: ?>
177
+ <h3 align="center"><?php _e('No result','ab') ?></h3>
178
+ <?php endif; ?>
179
+ </div>
backend/modules/staff/templates/services.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ /** @var AB_Category[] $collection */
4
+ $collection = $form->getCollection();
5
+ $selected = $form->getSelected();
6
+ $uncategorized_services = $form->getUncategorizedServices();
7
+
8
+ $currentDateTime = new DateTime( 'now' );
9
+ $durationDateTime = new DateTime( 'now' );
10
+ $current_time = time();
11
+ ?>
12
+ <div id="ab-staff-services">
13
+ <?php if ( count( $collection ) ) : ?>
14
+ <form>
15
+ <ul>
16
+ <li><input id="ab-all-services" type="checkbox" /> <?php _e( 'All services', 'ab' ) ?></li>
17
+ <?php if ( count( $uncategorized_services ) ) : ?>
18
+ <li>
19
+ <ul>
20
+ <li class="ab-category-services">
21
+ <ul>
22
+ <?php foreach ( $uncategorized_services as $service ) : ?>
23
+ <li>
24
+ <div class="left ab-list-title">
25
+ <input class="ab-service-checkbox" <?php if ( array_key_exists( $service->get( 'id' ), $selected ) ) echo 'checked=checked' ?> type="checkbox" value="<?php echo $service->get( 'id' ) ?>" name="service[<?php echo $service->get( 'id' ) ?>]"/>
26
+ <?php esc_html_e( $service->get( 'title' ) ) ?>
27
+ </div>
28
+ <input class="right ab-price" type="text" <?php if ( !array_key_exists( $service->get( 'id' ), $selected ) ) echo 'disabled=disabled' ?> name="price[<?php echo $service->get( 'id' ) ?>]" value="<?php echo array_key_exists( $service->get( 'id' ), $selected ) ? $selected[ $service->get('id') ] : $service->get( 'price' )?>">
29
+ <div style="border-bottom: 1px dotted black; overflow: hidden; padding-top: 15px;"></div>
30
+ </li>
31
+ <?php endforeach; ?>
32
+ </ul>
33
+ </li>
34
+ </ul>
35
+ </li>
36
+ <?php endif; ?>
37
+ <li>
38
+ <ul>
39
+ <?php foreach ( $collection as $category ) : ?>
40
+ <li class="ab-services-category">
41
+ <input class="ab-category-checkbox ab-category-<?php echo $category->get( 'id' ) ?>" data-category-id="<?php echo $category->get( 'id' ) ?>" type="checkbox" value="" />
42
+ <span><?php esc_html_e( $category->get( 'name' ) ) ?></span>
43
+ </li>
44
+ <li class="ab-category-services">
45
+ <ul>
46
+ <?php foreach ( $category->getServices() as $service ) : ?>
47
+ <li>
48
+ <div class="left ab-list-title">
49
+ <input class="ab-service-checkbox ab-category-<?php echo $category->get( 'id' ) ?>" data-category-id="<?php echo $category->get( 'id' ) ?>" <?php if ( array_key_exists( $service->get( 'id' ), $selected )) echo 'checked=checked' ?> type="checkbox" value="<?php echo $service->get( 'id' ) ?>" name="service[<?php echo $service->get( 'id' ) ?>]"/>
50
+ <?php esc_html_e( $service->get( 'title' ) ) ?>
51
+ </div>
52
+ <input class="right ab-price" type="text" <?php if ( !array_key_exists( $service->get( 'id' ), $selected )) echo 'disabled=disabled' ?> name="price[<?php echo $service->get( 'id' ) ?>]" value="<?php echo array_key_exists( $service->get( 'id' ), $selected ) ? $selected[$service->get('id')] : $service->get('price')?>">
53
+ <div style="border-bottom: 1px dotted black; overflow: hidden; padding-top: 15px;"></div>
54
+ </li>
55
+ <?php endforeach ?>
56
+ </ul>
57
+ </li>
58
+ <?php endforeach ?>
59
+ </ul>
60
+ </li>
61
+ </ul>
62
+ <input type="hidden" name="action" value="ab_staff_services_update"/>
63
+ <input type="hidden" name="staff_id" value="<?php echo $staff_id ?>"/>
64
+ <span class="spinner"></span>
65
+ <a class="btn btn-info ab-update-button" href="javascript:void(0)" id="ab-staff-services-update"><?php _e('Update', 'ab') ?></a>
66
+ <button class="ab-reset-form" type="reset"><?php _e( 'Reset', 'ab' ) ?></button>
67
+ </form>
68
+ <?php endif; ?>
69
+ </div>
70
+
backend/modules/tinymce/AB_TinyMCE_Plugin.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+ define( 'AB_TMCE_PATH', __FILE__ );
5
+ class AB_TinyMCE_Plugin {
6
+
7
+ private $vars = array();
8
+
9
+ public function __construct() {
10
+ global $PHP_SELF;
11
+ if ( // check if we are in admin area and current page is adding/editing the post
12
+ is_admin() && ( strpos( $PHP_SELF, 'post-new.php' ) !== false || strpos( $PHP_SELF, 'post.php' ) !== false )
13
+ ) {
14
+ wp_enqueue_script( 'backbone' );
15
+ wp_enqueue_script( 'underscore' );
16
+ add_action( 'admin_footer', array( &$this, 'renderPopup' ) );
17
+ add_filter( 'media_buttons', array( &$this, 'addButton' ), 50 );
18
+
19
+ $booking = new AB_ServiceBooking();
20
+ $booking->load();
21
+
22
+ $this->vars['categoriesJson'] = $booking->getCategoriesJson();
23
+ $this->vars['staffJson'] = $booking->getStaffJson();
24
+ $this->vars['servicesJson'] = $booking->getServicesJson();
25
+ }
26
+ }
27
+
28
+ public function addButton( $buttons ) {
29
+ // don't show on dashboard (QuickPress)
30
+ $current_screen = get_current_screen();
31
+ if ( 'dashboard' == $current_screen->base )
32
+ return;
33
+
34
+ // don't display button for users who don't have access
35
+ if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
36
+ return;
37
+
38
+ // do a version check for the new 3.5 UI
39
+ $version = get_bloginfo('version');
40
+
41
+ if ($version < 3.5) {
42
+ // show button for v 3.4 and below
43
+ echo '<a href="#TB_inline?width=640&amp;inlineId=ab-tinymce-popup&amp;height=650" id="add-ap-booking" title="' . esc_attr__( 'Add Booking Form', 'ab' ) . '">' . __('Add Booking Form', 'ab' ) . '</a>';
44
+ } else {
45
+ // display button matching new UI
46
+ $img = '<span class="ab-media-icon"></span> ';
47
+ echo '<a href="#TB_inline?width=640&amp;inlineId=ab-tinymce-popup&amp;height=650" id="add-ap-booking" class="button ab-media-button" title="' . esc_attr__( 'Add Booking Form', 'ab' ) . '">' . $img . __( 'Add Booking Form', 'ab' ) . '</a>';
48
+ }
49
+ }
50
+
51
+ public function renderPopup() {
52
+ extract($this->vars);
53
+
54
+ // render
55
+ ob_start();
56
+ ob_implicit_flush(0);
57
+
58
+ try {
59
+ include 'templates/popup.php';
60
+ } catch (Exception $e) {
61
+ ob_end_clean();
62
+ throw $e;
63
+ }
64
+
65
+ echo ob_get_clean();
66
+ }
67
+ }
backend/modules/tinymce/resources/images/calendar.png ADDED
Binary file
backend/modules/tinymce/resources/images/menu-icon.png ADDED
Binary file
backend/modules/tinymce/templates/popup.php ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit; // Exit if accessed directly
4
+ }
5
+ $calendar_img = defined( 'AB_TMCE_PATH' ) ? plugins_url( 'resources/images/calendar.png' , AB_TMCE_PATH ) : '';
6
+ ?>
7
+ <div id="ab-tinymce-popup" style="display: none">
8
+ <form id="ab-shortcode-form">
9
+ <table>
10
+ <tr>
11
+ <td><label for="ab-select-category"><?php _e( 'Default value for category select', 'ab' ); ?></label></td>
12
+ <td>
13
+ <select class="select-list" id="ab-select-category">
14
+ <option value=""><?php _e( 'Select category', 'ab' ); ?></option>
15
+ </select><br/>
16
+ </td>
17
+ </tr>
18
+ <tr>
19
+ <td></td>
20
+ <td>
21
+ <input type="checkbox" id="ab-hide-categories"> <?php _e( 'Hide this field', 'ab' ); ?>
22
+ <p><?php _e( 'Please be aware that a value in this field is required in the frontend. If you choose to hide this field, please be sure to select a default value for it', 'ab' ) ?><p>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <td><label for="ab-select-service"><?php _e( 'Default value for service select', 'ab' ); ?></label></td>
27
+ <td>
28
+ <select class="select-list" id="ab-select-service">
29
+ <option value=""><?php _e('Select service') ?></option>
30
+ </select><br/>
31
+ </td>
32
+ </tr>
33
+ <tr>
34
+ <td></td>
35
+ <td>
36
+ <input type="checkbox" id="ab-hide-services"> <?php _e( 'Hide this field', 'ab' ); ?>
37
+ <p><?php _e( 'Please be aware that a value in this field is required in the frontend. If you choose to hide this field, please be sure to select a default value for it', 'ab' ) ?><p>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td><label for="ab-select-employee"><?php _e('Default value for employee select', 'ab') ?></label></td>
42
+ <td>
43
+ <select class="select-list ab-select-mobile" id="ab-select-employee">
44
+ <option value=""><?php _e('Any') ?></option>
45
+ </select><br/>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <td></td>
50
+ <td>
51
+ <input type="checkbox" id="ab-hide-employee"> <?php _e( 'Hide this field', 'ab' ); ?>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <td></td>
56
+ <td><input class="button button-primary" id="ab-insert-shortcode" type="submit" value="<?php _e( 'Insert', 'ab' ); ?>"/></td>
57
+ </tr>
58
+ </table>
59
+ </form>
60
+ </div>
61
+ <style type="text/css">
62
+ #ab-shortcode-form { margin-top: 50px; }
63
+ #ab-shortcode-form table { width: 100%; }
64
+ #ab-shortcode-form table td { padding: 5px; vertical-align: 0; }
65
+ #ab-shortcode-form table td select { width: 100%; margin-bottom: 5px; }
66
+ .ab-media-icon {
67
+ display: inline-block;
68
+ width: 16px;
69
+ height: 16px;
70
+ vertical-align: text-top;
71
+ margin: 0 2px;
72
+ background: url("<?php echo $calendar_img ?>") 0 0 no-repeat;
73
+ }
74
+ .ab-booking_form-units {
75
+ width: 17%;
76
+ margin-left: 5px;
77
+ }
78
+ </style>
79
+ <script type="text/javascript">
80
+ jQuery(function ($) {
81
+ var $select_category = $('#ab-select-category'),
82
+ $select_service = $('#ab-select-service'),
83
+ $select_employee = $('#ab-select-employee'),
84
+ $hide_categories = $('#ab-hide-categories'),
85
+ $hide_services = $('#ab-hide-services'),
86
+ $hide_staff = $('#ab-hide-employee'),
87
+ $add_button = $('#add-ap-booking'),
88
+ $insert = $('#ab-insert-shortcode'),
89
+ abCategories = <?php echo $categoriesJson ?>,
90
+ abStaff = <?php echo $staffJson ?>,
91
+ abServices = <?php echo $servicesJson ?>;
92
+
93
+ $add_button.on('click', function () {
94
+ window.parent.tb_show('Insert Appointment Booking', this.href);
95
+ });
96
+
97
+ var AB_Category = Backbone.Model.extend();
98
+ var AB_Service = Backbone.Model.extend();
99
+ var AB_Employee = Backbone.Model.extend();
100
+
101
+ var AB_Categories = Backbone.Collection.extend({
102
+ model: AB_Category
103
+ });
104
+
105
+ var AB_Services = Backbone.Collection.extend({
106
+ model: AB_Service
107
+ });
108
+
109
+ var AB_Staff = Backbone.Collection.extend({
110
+ model: AB_Employee
111
+ });
112
+
113
+ var AB_OptionView = Backbone.View.extend({
114
+ tagName: "option",
115
+
116
+ initialize: function(){
117
+ _.bindAll(this, 'render');
118
+ },
119
+ render: function(){
120
+ this.$el.attr('value', this.model.get('id')).html(this.model.get('name'));
121
+ return this;
122
+ }
123
+ });
124
+
125
+ var AB_SelectView = Backbone.View.extend({
126
+ events: {
127
+ "change": "changeSelected"
128
+ },
129
+
130
+ initialize: function() {
131
+ _.bindAll(this, 'addOne', 'addAll');
132
+ this.selectView = [];
133
+ this.collection.bind('reset', this.addAll);
134
+ },
135
+ addOne: function(location) {
136
+ var optionView = new AB_OptionView({ model: location });
137
+ this.selectView.push(optionView);
138
+ this.$el.append(optionView.render().el);
139
+ },
140
+ addAll: function() {
141
+ _.each(this.selectView, function(optionView) { optionView.remove(); });
142
+ this.selectView = [];
143
+
144
+ this.collection.each(this.addOne);
145
+
146
+ if (this.selectedId) {
147
+ this.$el.val(this.selectedId);
148
+ }
149
+ },
150
+ changeSelected: function() {
151
+ this.setSelectedId(this.$el.val());
152
+ }
153
+ });
154
+
155
+ var AB_CategoriesView = AB_SelectView.extend({
156
+ setSelectedId: function(categoryId) {
157
+ this.selectedId = categoryId;
158
+ if (this.staffView.selectedId && !this.servicesView.selectedId) {
159
+ this.servicesView.collection.reset();
160
+ this.servicesView.setCategoryEmployeeIds(categoryId, this.staffView.selectedId);
161
+ } else {
162
+ this.servicesView.selectedId = null;
163
+ this.staffView.selectedId = null;
164
+ this.servicesView.collection.reset();
165
+ this.staffView.collection.reset();
166
+ if (categoryId) {
167
+ this.servicesView.setCategoryId(categoryId);
168
+ this.staffView.setCategoryId(categoryId);
169
+ } else {
170
+ this.servicesView.setDefaultValues();
171
+ this.staffView.setDefaultValues();
172
+ }
173
+ }
174
+ },
175
+ setEmployeeId: function(employeeId) {
176
+ this.populate(abStaff[employeeId].categories);
177
+ },
178
+ populate: function(categories) {
179
+ var category;
180
+ for (var category_id in categories) {
181
+ category = new AB_Service();
182
+ category.set({
183
+ id: category_id,
184
+ name: categories[category_id].name
185
+ });
186
+ this.collection.push(category);
187
+ }
188
+ this.addAll();
189
+ },
190
+ setDefaultValues: function () {
191
+ var category;
192
+ for (var category_id in abCategories) {
193
+ category = new AB_Category();
194
+ category.set({
195
+ id: category_id,
196
+ name: abCategories[category_id].name
197
+ });
198
+ this.collection.push(category);
199
+ }
200
+ this.addAll();
201
+ }
202
+ });
203
+
204
+ var AB_ServicesView = AB_SelectView.extend({
205
+ setSelectedId: function(serviceId) {
206
+ this.selectedId = serviceId;
207
+ this.staffView.selectedId = null;
208
+ if (serviceId) {
209
+ if (!this.categoriesView.selectedId) {
210
+ this.categoriesView.selectedId = abServices[serviceId].category_id;
211
+ this.categoriesView.$el.val(this.categoriesView.selectedId);
212
+ }
213
+ this.staffView.collection.reset();
214
+ this.staffView.setServiceId(serviceId);
215
+ } else if (this.categoriesView.selectedId) {
216
+ this.staffView.$el.val('');
217
+ this.staffView.setCategoryId(this.categoriesView.selectedId)
218
+ }
219
+ },
220
+ setCategoryId: function(categoryId) {
221
+ this.populate(abCategories[categoryId].services);
222
+ },
223
+ setEmployeeId: function(employeeId) {
224
+ this.populate(abStaff[employeeId].services);
225
+ },
226
+ setCategoryEmployeeIds: function(categoryId, employeeId) {
227
+ var service, collection = this.collection, employee = abStaff[employeeId];
228
+ // It is possible that employeeId does not exist and remain only as short code argument
229
+ if (employee) {
230
+ _.each(employee.services, function(srv, serviceId) {
231
+ if (Number(srv.category_id) == categoryId) {
232
+ service = new AB_Service();
233
+ service.set({
234
+ id: serviceId,
235
+ name: employee.services[serviceId].name
236
+ });
237
+ collection.push(service);
238
+ }
239
+ });
240
+ this.addAll();
241
+ }
242
+ },
243
+ populate: function(services) {
244
+ var service;
245
+ for (var service_id in services) {
246
+ service = new AB_Service();
247
+ service.set({
248
+ id: service_id,
249
+ name: services[service_id].name
250
+ });
251
+ this.collection.push(service);
252
+ }
253
+ this.addAll();
254
+ },
255
+ setDefaultValues: function () {
256
+ var service;
257
+ for (var service_id in abServices) {
258
+ service = new AB_Service();
259
+ service.set({
260
+ id: service_id,
261
+ name: abServices[service_id].name
262
+ });
263
+ this.collection.push(service);
264
+ }
265
+ this.addAll();
266
+ }
267
+ });
268
+
269
+ var AB_StaffView = AB_SelectView.extend({
270
+ setSelectedId: function(employeeId) {
271
+ this.selectedId = employeeId;
272
+ if (employeeId) {
273
+ if (!this.categoriesView.selectedId && !this.servicesView.selectedId) {
274
+ this.categoriesView.collection.reset();
275
+ this.servicesView.collection.reset();
276
+ this.servicesView.setEmployeeId(employeeId);
277
+ this.categoriesView.setEmployeeId(employeeId);
278
+ } else if (!this.servicesView.selectedId) {
279
+ this.servicesView.collection.reset();
280
+ this.servicesView.setCategoryEmployeeIds(this.categoriesView.selectedId, employeeId);
281
+ }
282
+ } else if (!this.categoriesView.selectedId && !this.servicesView.selectedId) {
283
+ this.categoriesView.collection.reset();
284
+ this.servicesView.collection.reset();
285
+ this.categoriesView.setDefaultValues();
286
+ this.servicesView.setDefaultValues();
287
+ } else if (this.categoriesView.selectedId && !this.servicesView.selectedId) {
288
+ this.categoriesView.collection.reset();
289
+ this.categoriesView.setDefaultValues();
290
+ this.categoriesView.$el.val(this.categoriesView.selectedId);
291
+ this.servicesView.setCategoryId(this.categoriesView.selectedId);
292
+ }
293
+ },
294
+ setServiceId: function(serviceId) {
295
+ this.populate(abServices[serviceId].staff);
296
+ },
297
+ setCategoryId: function(categoryId) {
298
+ this.populate(abCategories[categoryId].staff);
299
+ },
300
+ populate: function(staff) {
301
+ var employee;
302
+ for (var employee_id in staff) {
303
+ employee = new AB_Employee();
304
+ employee.set({
305
+ id: employee_id,
306
+ name: staff[employee_id].name
307
+ });
308
+ this.collection.push(employee);
309
+ }
310
+ this.addAll();
311
+ },
312
+ setDefaultValues: function () {
313
+ var employee;
314
+ for (var employee_id in abStaff) {
315
+ employee = new AB_Employee;
316
+ employee.set({
317
+ id: employee_id,
318
+ name: abStaff[employee_id].name
319
+ });
320
+ this.collection.push(employee);
321
+ }
322
+ this.addAll();
323
+ }
324
+ });
325
+
326
+ var categoriesView = new AB_CategoriesView({el: $select_category, collection: new AB_Categories() });
327
+ var servicesView = new AB_ServicesView({el: $select_service, collection: new AB_Services() });
328
+ var staffView = new AB_StaffView({el: $select_employee, collection: new AB_Staff() });
329
+
330
+ categoriesView.servicesView = servicesView;
331
+ categoriesView.staffView = staffView;
332
+ servicesView.staffView = staffView;
333
+ servicesView.categoriesView = categoriesView;
334
+ staffView.categoriesView = categoriesView;
335
+ staffView.servicesView = servicesView;
336
+ categoriesView.setDefaultValues();
337
+ servicesView.setDefaultValues();
338
+ staffView.setDefaultValues();
339
+
340
+ $insert.on('click', function (e) {
341
+ e.preventDefault();
342
+
343
+ var insert = '[ap-booking';
344
+
345
+ if ($select_category.val()) {
346
+ insert += ' cid="' + $select_category.val() + '"';
347
+ }
348
+
349
+ if ($hide_categories.is(':checked')) {
350
+ insert += ' ch="1"';
351
+ }
352
+
353
+ if ($select_service.val()) {
354
+ insert += ' sid="' + $select_service.val() + '"';
355
+ }
356
+
357
+ if ($hide_services.is(':checked')) {
358
+ insert += ' hs="1"';
359
+ }
360
+
361
+ if ($select_employee.val()) {
362
+ insert += ' eid="' + $select_employee.val() + '"';
363
+ }
364
+
365
+ if ($hide_staff.is(':checked')) {
366
+ insert += ' he="1"';
367
+ }
368
+
369
+ insert += ']';
370
+
371
+ window.send_to_editor(insert);
372
+
373
+ $select_category.val('');
374
+ $select_service.val('');
375
+ $select_employee.val('');
376
+ $hide_categories.prop('checked', false);
377
+ $hide_services.prop('checked', false);
378
+ $hide_staff.prop('checked', false);
379
+
380
+ window.parent.tb_remove();
381
+ return false;
382
+ });
383
+ });
384
+ </script>
backend/resources/bootstrap/css/bootstrap-editable.css ADDED
@@ -0,0 +1,655 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! X-editable - v1.5.0
2
+ * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
3
+ * http://github.com/vitalets/x-editable
4
+ * Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
5
+ .editableform {
6
+ margin-bottom: 0; /* overwrites bootstrap margin */
7
+ }
8
+
9
+ .editableform .control-group {
10
+ margin-bottom: 0; /* overwrites bootstrap margin */
11
+ white-space: nowrap; /* prevent wrapping buttons on new line */
12
+ line-height: 20px; /* overwriting bootstrap line-height. See #133 */
13
+ }
14
+
15
+ .editable-buttons {
16
+ display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
17
+ vertical-align: top;
18
+ margin-left: 7px;
19
+ /* inline-block emulation for IE7*/
20
+ zoom: 1;
21
+ *display: inline;
22
+ }
23
+
24
+ .editable-buttons.editable-buttons-bottom {
25
+ display: block;
26
+ margin-top: 7px;
27
+ margin-left: 0;
28
+ }
29
+
30
+ .editable-input {
31
+ vertical-align: top;
32
+ display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
33
+ width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
34
+ white-space: normal; /* reset white-space decalred in parent*/
35
+ /* display-inline emulation for IE7*/
36
+ zoom: 1;
37
+ *display: inline;
38
+ }
39
+
40
+ .editable-buttons .editable-cancel {
41
+ margin-left: 7px;
42
+ }
43
+
44
+ /*for jquery-ui buttons need set height to look more pretty*/
45
+ .editable-buttons button.ui-button-icon-only {
46
+ height: 24px;
47
+ width: 30px;
48
+ }
49
+
50
+ .editableform-loading {
51
+ background: url('../img/loading.gif') center center no-repeat;
52
+ height: 25px;
53
+ width: auto;
54
+ min-width: 25px;
55
+ }
56
+
57
+ .editable-inline .editableform-loading {
58
+ background-position: left 5px;
59
+ }
60
+
61
+ .editable-error-block {
62
+ max-width: 300px;
63
+ margin: 5px 0 0 0;
64
+ width: auto;
65
+ white-space: normal;
66
+ }
67
+
68
+ /*add padding for jquery ui*/
69
+ .editable-error-block.ui-state-error {
70
+ padding: 3px;
71
+ }
72
+
73
+ .editable-error {
74
+ color: red;
75
+ }
76
+
77
+ /* ---- For specific types ---- */
78
+
79
+ .editableform .editable-date {
80
+ padding: 0;
81
+ margin: 0;
82
+ float: left;
83
+ }
84
+
85
+ /* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
86
+ .editable-inline .add-on .icon-th {
87
+ margin-top: 3px;
88
+ margin-left: 1px;
89
+ }
90
+
91
+
92
+ /* checklist vertical alignment */
93
+ .editable-checklist label input[type="checkbox"],
94
+ .editable-checklist label span {
95
+ vertical-align: middle;
96
+ margin: 0;
97
+ }
98
+
99
+ .editable-checklist label {
100
+ white-space: nowrap;
101
+ }
102
+
103
+ /* set exact width of textarea to fit buttons toolbar */
104
+ .editable-wysihtml5 {
105
+ width: 566px;
106
+ height: 250px;
107
+ }
108
+
109
+ /* clear button shown as link in date inputs */
110
+ .editable-clear {
111
+ clear: both;
112
+ font-size: 0.9em;
113
+ text-decoration: none;
114
+ text-align: right;
115
+ }
116
+
117
+ /* IOS-style clear button for text inputs */
118
+ .editable-clear-x {
119
+ background: url('../img/clear.png') center center no-repeat;
120
+ display: block;
121
+ width: 13px;
122
+ height: 13px;
123
+ position: absolute;
124
+ opacity: 0.6;
125
+ z-index: 100;
126
+
127
+ top: 50%;
128
+ right: 6px;
129
+ margin-top: -6px;
130
+
131
+ }
132
+
133
+ .editable-clear-x:hover {
134
+ opacity: 1;
135
+ }
136
+
137
+ .editable-pre-wrapped {
138
+ white-space: pre-wrap;
139
+ }
140
+ .editable-container.editable-popup {
141
+ max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
142
+ }
143
+
144
+ .editable-container.popover {
145
+ width: auto; /* without this rule popover does not stretch */
146
+ }
147
+
148
+ .editable-container.editable-inline {
149
+ display: inline-block;
150
+ vertical-align: middle;
151
+ width: auto;
152
+ /* inline-block emulation for IE7*/
153
+ zoom: 1;
154
+ *display: inline;
155
+ }
156
+
157
+ .editable-container.ui-widget {
158
+ font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
159
+ z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
160
+ }
161
+ .editable-click,
162
+ a.editable-click,
163
+ a.editable-click:hover {
164
+ text-decoration: none;
165
+ border-bottom: dashed 1px #0088cc;
166
+ }
167
+
168
+ .editable-click.editable-disabled,
169
+ a.editable-click.editable-disabled,
170
+ a.editable-click.editable-disabled:hover {
171
+ color: #585858;
172
+ cursor: default;
173
+ border-bottom: none;
174
+ }
175
+
176
+ .editable-empty, .editable-empty:hover, .editable-empty:focus{
177
+ font-style: italic;
178
+ color: #DD1144;
179
+ /* border-bottom: none; */
180
+ text-decoration: none;
181
+ }
182
+
183
+ .editable-unsaved {
184
+ font-weight: bold;
185
+ }
186
+
187
+ .editable-unsaved:after {
188
+ /* content: '*'*/
189
+ }
190
+
191
+ .editable-bg-transition {
192
+ -webkit-transition: background-color 1400ms ease-out;
193
+ -moz-transition: background-color 1400ms ease-out;
194
+ -o-transition: background-color 1400ms ease-out;
195
+ -ms-transition: background-color 1400ms ease-out;
196
+ transition: background-color 1400ms ease-out;
197
+ }
198
+
199
+ /*see https://github.com/vitalets/x-editable/issues/139 */
200
+ .form-horizontal .editable
201
+ {
202
+ padding-top: 5px;
203
+ display:inline-block;
204
+ }
205
+
206
+
207
+ /*!
208
+ * Datepicker for Bootstrap
209
+ *
210
+ * Copyright 2012 Stefan Petre
211
+ * Improvements by Andrew Rowls
212
+ * Licensed under the Apache License v2.0
213
+ * http://www.apache.org/licenses/LICENSE-2.0
214
+ *
215
+ */
216
+ .datepicker {
217
+ padding: 4px;
218
+ -webkit-border-radius: 4px;
219
+ -moz-border-radius: 4px;
220
+ border-radius: 4px;
221
+ direction: ltr;
222
+ /*.dow {
223
+ border-top: 1px solid #ddd !important;
224
+ }*/
225
+
226
+ }
227
+ .datepicker-inline {
228
+ width: 220px;
229
+ }
230
+ .datepicker.datepicker-rtl {
231
+ direction: rtl;
232
+ }
233
+ .datepicker.datepicker-rtl table tr td span {
234
+ float: right;
235
+ }
236
+ .datepicker-dropdown {
237
+ top: 0;
238
+ left: 0;
239
+ }
240
+ .datepicker-dropdown:before {
241
+ content: '';
242
+ display: inline-block;
243
+ border-left: 7px solid transparent;
244
+ border-right: 7px solid transparent;
245
+ border-bottom: 7px solid #ccc;
246
+ border-bottom-color: rgba(0, 0, 0, 0.2);
247
+ position: absolute;
248
+ top: -7px;
249
+ left: 6px;
250
+ }
251
+ .datepicker-dropdown:after {
252
+ content: '';
253
+ display: inline-block;
254
+ border-left: 6px solid transparent;
255
+ border-right: 6px solid transparent;
256
+ border-bottom: 6px solid #ffffff;
257
+ position: absolute;
258
+ top: -6px;
259
+ left: 7px;
260
+ }
261
+ .datepicker > div {
262
+ display: none;
263
+ }
264
+ .datepicker.days div.datepicker-days {
265
+ display: block;
266
+ }
267
+ .datepicker.months div.datepicker-months {
268
+ display: block;
269
+ }
270
+ .datepicker.years div.datepicker-years {
271
+ display: block;
272
+ }
273
+ .datepicker table {
274
+ margin: 0;
275
+ }
276
+ .datepicker td,
277
+ .datepicker th {
278
+ text-align: center;
279
+ width: 20px;
280
+ height: 20px;
281
+ -webkit-border-radius: 4px;
282
+ -moz-border-radius: 4px;
283
+ border-radius: 4px;
284
+ border: none;
285
+ }
286
+ .table-striped .datepicker table tr td,
287
+ .table-striped .datepicker table tr th {
288
+ background-color: transparent;
289
+ }
290
+ .datepicker table tr td.day:hover {
291
+ background: #eeeeee;
292
+ cursor: pointer;
293
+ }
294
+ .datepicker table tr td.old,
295
+ .datepicker table tr td.new {
296
+ color: #999999;
297
+ }
298
+ .datepicker table tr td.disabled,
299
+ .datepicker table tr td.disabled:hover {
300
+ background: none;
301
+ color: #999999;
302
+ cursor: default;
303
+ }
304
+ .datepicker table tr td.today,
305
+ .datepicker table tr td.today:hover,
306
+ .datepicker table tr td.today.disabled,
307
+ .datepicker table tr td.today.disabled:hover {
308
+ background-color: #fde19a;
309
+ background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
310
+ background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
311
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
312
+ background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
313
+ background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
314
+ background-image: linear-gradient(top, #fdd49a, #fdf59a);
315
+ background-repeat: repeat-x;
316
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
317
+ border-color: #fdf59a #fdf59a #fbed50;
318
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
319
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
320
+ color: #000;
321
+ }
322
+ .datepicker table tr td.today:hover,
323
+ .datepicker table tr td.today:hover:hover,
324
+ .datepicker table tr td.today.disabled:hover,
325
+ .datepicker table tr td.today.disabled:hover:hover,
326
+ .datepicker table tr td.today:active,
327
+ .datepicker table tr td.today:hover:active,
328
+ .datepicker table tr td.today.disabled:active,
329
+ .datepicker table tr td.today.disabled:hover:active,
330
+ .datepicker table tr td.today.active,
331
+ .datepicker table tr td.today:hover.active,
332
+ .datepicker table tr td.today.disabled.active,
333
+ .datepicker table tr td.today.disabled:hover.active,
334
+ .datepicker table tr td.today.disabled,
335
+ .datepicker table tr td.today:hover.disabled,
336
+ .datepicker table tr td.today.disabled.disabled,
337
+ .datepicker table tr td.today.disabled:hover.disabled,
338
+ .datepicker table tr td.today[disabled],
339
+ .datepicker table tr td.today:hover[disabled],
340
+ .datepicker table tr td.today.disabled[disabled],
341
+ .datepicker table tr td.today.disabled:hover[disabled] {
342
+ background-color: #fdf59a;
343
+ }
344
+ .datepicker table tr td.today:active,
345
+ .datepicker table tr td.today:hover:active,
346
+ .datepicker table tr td.today.disabled:active,
347
+ .datepicker table tr td.today.disabled:hover:active,
348
+ .datepicker table tr td.today.active,
349
+ .datepicker table tr td.today:hover.active,
350
+ .datepicker table tr td.today.disabled.active,
351
+ .datepicker table tr td.today.disabled:hover.active {
352
+ background-color: #fbf069 \9;
353
+ }
354
+ .datepicker table tr td.today:hover:hover {
355
+ color: #000;
356
+ }
357
+ .datepicker table tr td.today.active:hover {
358
+ color: #fff;
359
+ }
360
+ .datepicker table tr td.range,
361
+ .datepicker table tr td.range:hover,
362
+ .datepicker table tr td.range.disabled,
363
+ .datepicker table tr td.range.disabled:hover {
364
+ background: #eeeeee;
365
+ -webkit-border-radius: 0;
366
+ -moz-border-radius: 0;
367
+ border-radius: 0;
368
+ }
369
+ .datepicker table tr td.range.today,
370
+ .datepicker table tr td.range.today:hover,
371
+ .datepicker table tr td.range.today.disabled,
372
+ .datepicker table tr td.range.today.disabled:hover {
373
+ background-color: #f3d17a;
374
+ background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
375
+ background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
376
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
377
+ background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
378
+ background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
379
+ background-image: linear-gradient(top, #f3c17a, #f3e97a);
380
+ background-repeat: repeat-x;
381
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
382
+ border-color: #f3e97a #f3e97a #edde34;
383
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
384
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
385
+ -webkit-border-radius: 0;
386
+ -moz-border-radius: 0;
387
+ border-radius: 0;
388
+ }
389
+ .datepicker table tr td.range.today:hover,
390
+ .datepicker table tr td.range.today:hover:hover,
391
+ .datepicker table tr td.range.today.disabled:hover,
392
+ .datepicker table tr td.range.today.disabled:hover:hover,
393
+ .datepicker table tr td.range.today:active,
394
+ .datepicker table tr td.range.today:hover:active,
395
+ .datepicker table tr td.range.today.disabled:active,
396
+ .datepicker table tr td.range.today.disabled:hover:active,
397
+ .datepicker table tr td.range.today.active,
398
+ .datepicker table tr td.range.today:hover.active,
399
+ .datepicker table tr td.range.today.disabled.active,
400
+ .datepicker table tr td.range.today.disabled:hover.active,
401
+ .datepicker table tr td.range.today.disabled,
402
+ .datepicker table tr td.range.today:hover.disabled,
403
+ .datepicker table tr td.range.today.disabled.disabled,
404
+ .datepicker table tr td.range.today.disabled:hover.disabled,
405
+ .datepicker table tr td.range.today[disabled],
406
+ .datepicker table tr td.range.today:hover[disabled],
407
+ .datepicker table tr td.range.today.disabled[disabled],
408
+ .datepicker table tr td.range.today.disabled:hover[disabled] {
409
+ background-color: #f3e97a;
410
+ }
411
+ .datepicker table tr td.range.today:active,
412
+ .datepicker table tr td.range.today:hover:active,
413
+ .datepicker table tr td.range.today.disabled:active,
414
+ .datepicker table tr td.range.today.disabled:hover:active,
415
+ .datepicker table tr td.range.today.active,
416
+ .datepicker table tr td.range.today:hover.active,
417
+ .datepicker table tr td.range.today.disabled.active,
418
+ .datepicker table tr td.range.today.disabled:hover.active {
419
+ background-color: #efe24b \9;
420
+ }
421
+ .datepicker table tr td.selected,
422
+ .datepicker table tr td.selected:hover,
423
+ .datepicker table tr td.selected.disabled,
424
+ .datepicker table tr td.selected.disabled:hover {
425
+ background-color: #9e9e9e;
426
+ background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
427
+ background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
428
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
429
+ background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
430
+ background-image: -o-linear-gradient(top, #b3b3b3, #808080);
431
+ background-image: linear-gradient(top, #b3b3b3, #808080);
432
+ background-repeat: repeat-x;
433
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
434
+ border-color: #808080 #808080 #595959;
435
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
436
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
437
+ color: #fff;
438
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
439
+ }
440
+ .datepicker table tr td.selected:hover,
441
+ .datepicker table tr td.selected:hover:hover,
442
+ .datepicker table tr td.selected.disabled:hover,
443
+ .datepicker table tr td.selected.disabled:hover:hover,
444
+ .datepicker table tr td.selected:active,
445
+ .datepicker table tr td.selected:hover:active,
446
+ .datepicker table tr td.selected.disabled:active,
447
+ .datepicker table tr td.selected.disabled:hover:active,
448
+ .datepicker table tr td.selected.active,
449
+ .datepicker table tr td.selected:hover.active,
450
+ .datepicker table tr td.selected.disabled.active,
451
+ .datepicker table tr td.selected.disabled:hover.active,
452
+ .datepicker table tr td.selected.disabled,
453
+ .datepicker table tr td.selected:hover.disabled,
454
+ .datepicker table tr td.selected.disabled.disabled,
455
+ .datepicker table tr td.selected.disabled:hover.disabled,
456
+ .datepicker table tr td.selected[disabled],
457
+ .datepicker table tr td.selected:hover[disabled],
458
+ .datepicker table tr td.selected.disabled[disabled],
459
+ .datepicker table tr td.selected.disabled:hover[disabled] {
460
+ background-color: #808080;
461
+ }
462
+ .datepicker table tr td.selected:active,
463
+ .datepicker table tr td.selected:hover:active,
464
+ .datepicker table tr td.selected.disabled:active,
465
+ .datepicker table tr td.selected.disabled:hover:active,
466
+ .datepicker table tr td.selected.active,
467
+ .datepicker table tr td.selected:hover.active,
468
+ .datepicker table tr td.selected.disabled.active,
469
+ .datepicker table tr td.selected.disabled:hover.active {
470
+ background-color: #666666 \9;
471
+ }
472
+ .datepicker table tr td.active,
473
+ .datepicker table tr td.active:hover,
474
+ .datepicker table tr td.active.disabled,
475
+ .datepicker table tr td.active.disabled:hover {
476
+ background-color: #006dcc;
477
+ background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
478
+ background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
479
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
480
+ background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
481
+ background-image: -o-linear-gradient(top, #0088cc, #0044cc);
482
+ background-image: linear-gradient(top, #0088cc, #0044cc);
483
+ background-repeat: repeat-x;
484
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
485
+ border-color: #0044cc #0044cc #002a80;
486
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
487
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
488
+ color: #fff;
489
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
490
+ }
491
+ .datepicker table tr td.active:hover,
492
+ .datepicker table tr td.active:hover:hover,
493
+ .datepicker table tr td.active.disabled:hover,
494
+ .datepicker table tr td.active.disabled:hover:hover,
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
+ .datepicker table tr td.active.active,
500
+ .datepicker table tr td.active:hover.active,
501
+ .datepicker table tr td.active.disabled.active,
502
+ .datepicker table tr td.active.disabled:hover.active,
503
+ .datepicker table tr td.active.disabled,
504
+ .datepicker table tr td.active:hover.disabled,
505
+ .datepicker table tr td.active.disabled.disabled,
506
+ .datepicker table tr td.active.disabled:hover.disabled,
507
+ .datepicker table tr td.active[disabled],
508
+ .datepicker table tr td.active:hover[disabled],
509
+ .datepicker table tr td.active.disabled[disabled],
510
+ .datepicker table tr td.active.disabled:hover[disabled] {
511
+ background-color: #0044cc;
512
+ }
513
+ .datepicker table tr td.active:active,
514
+ .datepicker table tr td.active:hover:active,
515
+ .datepicker table tr td.active.disabled:active,
516
+ .datepicker table tr td.active.disabled:hover:active,
517
+ .datepicker table tr td.active.active,
518
+ .datepicker table tr td.active:hover.active,
519
+ .datepicker table tr td.active.disabled.active,
520
+ .datepicker table tr td.active.disabled:hover.active {
521
+ background-color: #003399 \9;
522
+ }
523
+ .datepicker table tr td span {
524
+ display: block;
525
+ width: 23%;
526
+ height: 54px;
527
+ line-height: 54px;
528
+ float: left;
529
+ margin: 1%;
530
+ cursor: pointer;
531
+ -webkit-border-radius: 4px;
532
+ -moz-border-radius: 4px;
533
+ border-radius: 4px;
534
+ }
535
+ .datepicker table tr td span:hover {
536
+ background: #eeeeee;
537
+ }
538
+ .datepicker table tr td span.disabled,
539
+ .datepicker table tr td span.disabled:hover {
540
+ background: none;
541
+ color: #999999;
542
+ cursor: default;
543
+ }
544
+ .datepicker table tr td span.active,
545
+ .datepicker table tr td span.active:hover,
546
+ .datepicker table tr td span.active.disabled,
547
+ .datepicker table tr td span.active.disabled:hover {
548
+ background-color: #006dcc;
549
+ background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
550
+ background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
551
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
552
+ background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
553
+ background-image: -o-linear-gradient(top, #0088cc, #0044cc);
554
+ background-image: linear-gradient(top, #0088cc, #0044cc);
555
+ background-repeat: repeat-x;
556
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
557
+ border-color: #0044cc #0044cc #002a80;
558
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
559
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
560
+ color: #fff;
561
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
562
+ }
563
+ .datepicker table tr td span.active:hover,
564
+ .datepicker table tr td span.active:hover:hover,
565
+ .datepicker table tr td span.active.disabled:hover,
566
+ .datepicker table tr td span.active.disabled:hover:hover,
567
+ .datepicker table tr td span.active:active,
568
+ .datepicker table tr td span.active:hover:active,
569
+ .datepicker table tr td span.active.disabled:active,
570
+ .datepicker table tr td span.active.disabled:hover:active,
571
+ .datepicker table tr td span.active.active,
572
+ .datepicker table tr td span.active:hover.active,
573
+ .datepicker table tr td span.active.disabled.active,
574
+ .datepicker table tr td span.active.disabled:hover.active,
575
+ .datepicker table tr td span.active.disabled,
576
+ .datepicker table tr td span.active:hover.disabled,
577
+ .datepicker table tr td span.active.disabled.disabled,
578
+ .datepicker table tr td span.active.disabled:hover.disabled,
579
+ .datepicker table tr td span.active[disabled],
580
+ .datepicker table tr td span.active:hover[disabled],
581
+ .datepicker table tr td span.active.disabled[disabled],
582
+ .datepicker table tr td span.active.disabled:hover[disabled] {
583
+ background-color: #0044cc;
584
+ }
585
+ .datepicker table tr td span.active:active,
586
+ .datepicker table tr td span.active:hover:active,
587
+ .datepicker table tr td span.active.disabled:active,
588
+ .datepicker table tr td span.active.disabled:hover:active,
589
+ .datepicker table tr td span.active.active,
590
+ .datepicker table tr td span.active:hover.active,
591
+ .datepicker table tr td span.active.disabled.active,
592
+ .datepicker table tr td span.active.disabled:hover.active {
593
+ background-color: #003399 \9;
594
+ }
595
+ .datepicker table tr td span.old,
596
+ .datepicker table tr td span.new {
597
+ color: #999999;
598
+ }
599
+ .datepicker th.datepicker-switch {
600
+ width: 145px;
601
+ }
602
+ .datepicker thead tr:first-child th,
603
+ .datepicker tfoot tr th {
604
+ cursor: pointer;
605
+ }
606
+ .datepicker thead tr:first-child th:hover,
607
+ .datepicker tfoot tr th:hover {
608
+ background: #eeeeee;
609
+ }
610
+ .datepicker .cw {
611
+ font-size: 10px;
612
+ width: 12px;
613
+ padding: 0 2px 0 5px;
614
+ vertical-align: middle;
615
+ }
616
+ .datepicker thead tr:first-child th.cw {
617
+ cursor: default;
618
+ background-color: transparent;
619
+ }
620
+ .input-append.date .add-on i,
621
+ .input-prepend.date .add-on i {
622
+ display: block;
623
+ cursor: pointer;
624
+ width: 16px;
625
+ height: 16px;
626
+ }
627
+ .input-daterange input {
628
+ text-align: center;
629
+ }
630
+ .input-daterange input:first-child {
631
+ -webkit-border-radius: 3px 0 0 3px;
632
+ -moz-border-radius: 3px 0 0 3px;
633
+ border-radius: 3px 0 0 3px;
634
+ }
635
+ .input-daterange input:last-child {
636
+ -webkit-border-radius: 0 3px 3px 0;
637
+ -moz-border-radius: 0 3px 3px 0;
638
+ border-radius: 0 3px 3px 0;
639
+ }
640
+ .input-daterange .add-on {
641
+ display: inline-block;
642
+ width: auto;
643
+ min-width: 16px;
644
+ height: 18px;
645
+ padding: 4px 5px;
646
+ font-weight: normal;
647
+ line-height: 18px;
648
+ text-align: center;
649
+ text-shadow: 0 1px 0 #ffffff;
650
+ vertical-align: middle;
651
+ background-color: #eeeeee;
652
+ border: 1px solid #ccc;
653
+ margin-left: -5px;
654
+ margin-right: -5px;
655
+ }
backend/resources/bootstrap/css/bootstrap.css ADDED
@@ -0,0 +1,6278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v2.3.1
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+ .clearfix {
11
+ *zoom: 1;
12
+ }
13
+ .clearfix:before,
14
+ .clearfix:after {
15
+ display: table;
16
+ content: "";
17
+ line-height: 0;
18
+ }
19
+ .clearfix:after {
20
+ clear: both;
21
+ }
22
+ .hide-text {
23
+ font: 0/0 a;
24
+ color: transparent;
25
+ text-shadow: none;
26
+ background-color: transparent;
27
+ border: 0;
28
+ }
29
+ .input-block-level {
30
+ display: block;
31
+ width: 100%;
32
+ min-height: 30px;
33
+ -webkit-box-sizing: border-box;
34
+ -moz-box-sizing: border-box;
35
+ box-sizing: border-box;
36
+ }
37
+ article,
38
+ aside,
39
+ details,
40
+ figcaption,
41
+ figure,
42
+ footer,
43
+ header,
44
+ hgroup,
45
+ nav,
46
+ section {
47
+ display: block;
48
+ }
49
+ audio,
50
+ canvas,
51
+ video {
52
+ display: inline-block;
53
+ *display: inline;
54
+ *zoom: 1;
55
+ }
56
+ audio:not([controls]) {
57
+ display: none;
58
+ }
59
+ html {
60
+ font-size: 100%;
61
+ -webkit-text-size-adjust: 100%;
62
+ -ms-text-size-adjust: 100%;
63
+ }
64
+ a:focus {
65
+ outline: thin dotted #333;
66
+ outline: 5px auto -webkit-focus-ring-color;
67
+ outline-offset: -2px;
68
+ }
69
+ a:hover,
70
+ a:active {
71
+ outline: 0;
72
+ }
73
+ sub,
74
+ sup {
75
+ position: relative;
76
+ font-size: 75%;
77
+ line-height: 0;
78
+ vertical-align: baseline;
79
+ }
80
+ sup {
81
+ top: -0.5em;
82
+ }
83
+ sub {
84
+ bottom: -0.25em;
85
+ }
86
+ img {
87
+ /* Responsive images (ensure images don't scale beyond their parents) */
88
+
89
+ max-width: 100%;
90
+ /* Part 1: Set a maxium relative to the parent */
91
+
92
+ width: auto\9;
93
+ /* IE7-8 need help adjusting responsive images */
94
+
95
+ height: auto;
96
+ /* Part 2: Scale the height according to the width, otherwise you get stretching */
97
+
98
+ vertical-align: middle;
99
+ border: 0;
100
+ -ms-interpolation-mode: bicubic;
101
+ }
102
+ #map_canvas img,
103
+ .google-maps img {
104
+ max-width: none;
105
+ }
106
+ button,
107
+ input,
108
+ select,
109
+ textarea {
110
+ margin: 0;
111
+ font-size: 100%;
112
+ vertical-align: middle;
113
+ }
114
+ button,
115
+ input {
116
+ *overflow: visible;
117
+ line-height: normal;
118
+ }
119
+ button::-moz-focus-inner,
120
+ input::-moz-focus-inner {
121
+ padding: 0;
122
+ border: 0;
123
+ }
124
+ button,
125
+ html input[type="button"],
126
+ input[type="reset"],
127
+ input[type="submit"] {
128
+ -webkit-appearance: button;
129
+ cursor: pointer;
130
+ }
131
+ label,
132
+ select,
133
+ button,
134
+ input[type="button"],
135
+ input[type="reset"],
136
+ input[type="submit"],
137
+ input[type="radio"],
138
+ input[type="checkbox"] {
139
+ cursor: pointer;
140
+ }
141
+ input[type="search"] {
142
+ -webkit-box-sizing: content-box;
143
+ -moz-box-sizing: content-box;
144
+ box-sizing: content-box;
145
+ -webkit-appearance: textfield;
146
+ }
147
+ input[type="search"]::-webkit-search-decoration,
148
+ input[type="search"]::-webkit-search-cancel-button {
149
+ -webkit-appearance: none;
150
+ }
151
+ textarea {
152
+ overflow: auto;
153
+ vertical-align: top;
154
+ }
155
+ @media print {
156
+ * {
157
+ text-shadow: none !important;
158
+ color: #000 !important;
159
+ background: transparent !important;
160
+ box-shadow: none !important;
161
+ }
162
+ a,
163
+ a:visited {
164
+ text-decoration: underline;
165
+ }
166
+ a[href]:after {
167
+ content: " (" attr(href) ")";
168
+ }
169
+ abbr[title]:after {
170
+ content: " (" attr(title) ")";
171
+ }
172
+ .ir a:after,
173
+ a[href^="javascript:"]:after,
174
+ a[href^="#"]:after {
175
+ content: "";
176
+ }
177
+ pre,
178
+ blockquote {
179
+ border: 1px solid #999;
180
+ page-break-inside: avoid;
181
+ }
182
+ thead {
183
+ display: table-header-group;
184
+ }
185
+ tr,
186
+ img {
187
+ page-break-inside: avoid;
188
+ }
189
+ img {
190
+ max-width: 100% !important;
191
+ }
192
+ @page {
193
+ margin: 0.5cm;
194
+ }
195
+ p,
196
+ h2,
197
+ h3 {
198
+ orphans: 3;
199
+ widows: 3;
200
+ }
201
+ h2,
202
+ h3 {
203
+ page-break-after: avoid;
204
+ }
205
+ }
206
+ body {
207
+ margin: 0;
208
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
209
+ font-size: 14px;
210
+ line-height: 20px;
211
+ color: #333333;
212
+ background-color: #ffffff;
213
+ }
214
+ a {
215
+ color: #0088cc;
216
+ text-decoration: none;
217
+ }
218
+ a:hover,
219
+ a:focus {
220
+ color: #005580;
221
+ text-decoration: underline;
222
+ }
223
+ .img-rounded {
224
+ -webkit-border-radius: 6px;
225
+ -moz-border-radius: 6px;
226
+ border-radius: 6px;
227
+ }
228
+ .img-polaroid {
229
+ padding: 4px;
230
+ background-color: #fff;
231
+ border: 1px solid #ccc;
232
+ border: 1px solid rgba(0, 0, 0, 0.2);
233
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
234
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
235
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
236
+ }
237
+ .img-circle {
238
+ -webkit-border-radius: 500px;
239
+ -moz-border-radius: 500px;
240
+ border-radius: 500px;
241
+ }
242
+ .row {
243
+ margin-left: -20px;
244
+ *zoom: 1;
245
+ }
246
+ .row:before,
247
+ .row:after {
248
+ display: table;
249
+ content: "";
250
+ line-height: 0;
251
+ }
252
+ .row:after {
253
+ clear: both;
254
+ }
255
+ [class*="span"] {
256
+ float: left;
257
+ min-height: 1px;
258
+ margin-left: 20px;
259
+ }
260
+ .container,
261
+ .navbar-static-top .container,
262
+ .navbar-fixed-top .container,
263
+ .navbar-fixed-bottom .container {
264
+ width: 940px;
265
+ }
266
+ .span12 {
267
+ width: 940px;
268
+ }
269
+ .span11 {
270
+ width: 860px;
271
+ }
272
+ .span10 {
273
+ width: 780px;
274
+ }
275
+ .span9 {
276
+ width: 700px;
277
+ }
278
+ .span8 {
279
+ width: 620px;
280
+ }
281
+ .span7 {
282
+ width: 540px;
283
+ }
284
+ .span6 {
285
+ width: 460px;
286
+ }
287
+ .span5 {
288
+ width: 380px;
289
+ }
290
+ .span4 {
291
+ width: 300px;
292
+ }
293
+ .span3 {
294
+ width: 220px;
295
+ }
296
+ .span2 {
297
+ width: 140px;
298
+ }
299
+ .span1 {
300
+ width: 60px;
301
+ }
302
+ .offset12 {
303
+ margin-left: 980px;
304
+ }
305
+ .offset11 {
306
+ margin-left: 900px;
307
+ }
308
+ .offset10 {
309
+ margin-left: 820px;
310
+ }
311
+ .offset9 {
312
+ margin-left: 740px;
313
+ }
314
+ .offset8 {
315
+ margin-left: 660px;
316
+ }
317
+ .offset7 {
318
+ margin-left: 580px;
319
+ }
320
+ .offset6 {
321
+ margin-left: 500px;
322
+ }
323
+ .offset5 {
324
+ margin-left: 420px;
325
+ }
326
+ .offset4 {
327
+ margin-left: 340px;
328
+ }
329
+ .offset3 {
330
+ margin-left: 260px;
331
+ }
332
+ .offset2 {
333
+ margin-left: 180px;
334
+ }
335
+ .offset1 {
336
+ margin-left: 100px;
337
+ }
338
+ .row-fluid {
339
+ width: 100%;
340
+ *zoom: 1;
341
+ }
342
+ .row-fluid:before,
343
+ .row-fluid:after {
344
+ display: table;
345
+ content: "";
346
+ line-height: 0;
347
+ }
348
+ .row-fluid:after {
349
+ clear: both;
350
+ }
351
+ .row-fluid [class*="span"] {
352
+ display: block;
353
+ width: 100%;
354
+ min-height: 30px;
355
+ -webkit-box-sizing: border-box;
356
+ -moz-box-sizing: border-box;
357
+ box-sizing: border-box;
358
+ float: left;
359
+ margin-left: 2.127659574468085%;
360
+ *margin-left: 2.074468085106383%;
361
+ }
362
+ .row-fluid [class*="span"]:first-child {
363
+ margin-left: 0;
364
+ }
365
+ .row-fluid .controls-row [class*="span"] + [class*="span"] {
366
+ margin-left: 2.127659574468085%;
367
+ }
368
+ .row-fluid .span12 {
369
+ width: 100%;
370
+ *width: 99.94680851063829%;
371
+ }
372
+ .row-fluid .span11 {
373
+ width: 91.48936170212765%;
374
+ *width: 91.43617021276594%;
375
+ }
376
+ .row-fluid .span10 {
377
+ width: 82.97872340425532%;
378
+ *width: 82.92553191489361%;
379
+ }
380
+ .row-fluid .span9 {
381
+ width: 74.46808510638297%;
382
+ *width: 74.41489361702126%;
383
+ }
384
+ .row-fluid .span8 {
385
+ width: 65.95744680851064%;
386
+ *width: 65.90425531914893%;
387
+ }
388
+ .row-fluid .span7 {
389
+ width: 57.44680851063829%;
390
+ *width: 57.39361702127659%;
391
+ }
392
+ .row-fluid .span6 {
393
+ width: 48.93617021276595%;
394
+ *width: 48.88297872340425%;
395
+ }
396
+ .row-fluid .span5 {
397
+ width: 40.42553191489362%;
398
+ *width: 40.37234042553192%;
399
+ }
400
+ .row-fluid .span4 {
401
+ width: 31.914893617021278%;
402
+ *width: 31.861702127659576%;
403
+ }
404
+ .row-fluid .span3 {
405
+ width: 23.404255319148934%;
406
+ *width: 23.351063829787233%;
407
+ }
408
+ .row-fluid .span2 {
409
+ width: 14.893617021276595%;
410
+ *width: 14.840425531914894%;
411
+ }
412
+ .row-fluid .span1 {
413
+ width: 6.382978723404255%;
414
+ *width: 6.329787234042553%;
415
+ }
416
+ .row-fluid .offset12 {
417
+ margin-left: 104.25531914893617%;
418
+ *margin-left: 104.14893617021275%;
419
+ }
420
+ .row-fluid .offset12:first-child {
421
+ margin-left: 102.12765957446808%;
422
+ *margin-left: 102.02127659574467%;
423
+ }
424
+ .row-fluid .offset11 {
425
+ margin-left: 95.74468085106382%;
426
+ *margin-left: 95.6382978723404%;
427
+ }
428
+ .row-fluid .offset11:first-child {
429
+ margin-left: 93.61702127659574%;
430
+ *margin-left: 93.51063829787232%;
431
+ }
432
+ .row-fluid .offset10 {
433
+ margin-left: 87.23404255319149%;
434
+ *margin-left: 87.12765957446807%;
435
+ }
436
+ .row-fluid .offset10:first-child {
437
+ margin-left: 85.1063829787234%;
438
+ *margin-left: 84.99999999999999%;
439
+ }
440
+ .row-fluid .offset9 {
441
+ margin-left: 78.72340425531914%;
442
+ *margin-left: 78.61702127659572%;
443
+ }
444
+ .row-fluid .offset9:first-child {
445
+ margin-left: 76.59574468085106%;
446
+ *margin-left: 76.48936170212764%;
447
+ }
448
+ .row-fluid .offset8 {
449
+ margin-left: 70.2127659574468%;
450
+ *margin-left: 70.10638297872339%;
451
+ }
452
+ .row-fluid .offset8:first-child {
453
+ margin-left: 68.08510638297872%;
454
+ *margin-left: 67.9787234042553%;
455
+ }
456
+ .row-fluid .offset7 {
457
+ margin-left: 61.70212765957446%;
458
+ *margin-left: 61.59574468085106%;
459
+ }
460
+ .row-fluid .offset7:first-child {
461
+ margin-left: 59.574468085106375%;
462
+ *margin-left: 59.46808510638297%;
463
+ }
464
+ .row-fluid .offset6 {
465
+ margin-left: 53.191489361702125%;
466
+ *margin-left: 53.085106382978715%;
467
+ }
468
+ .row-fluid .offset6:first-child {
469
+ margin-left: 51.063829787234035%;
470
+ *margin-left: 50.95744680851063%;
471
+ }
472
+ .row-fluid .offset5 {
473
+ margin-left: 44.68085106382979%;
474
+ *margin-left: 44.57446808510638%;
475
+ }
476
+ .row-fluid .offset5:first-child {
477
+ margin-left: 42.5531914893617%;
478
+ *margin-left: 42.4468085106383%;
479
+ }
480
+ .row-fluid .offset4 {
481
+ margin-left: 36.170212765957444%;
482
+ *margin-left: 36.06382978723405%;
483
+ }
484
+ .row-fluid .offset4:first-child {
485
+ margin-left: 34.04255319148936%;
486
+ *margin-left: 33.93617021276596%;
487
+ }
488
+ .row-fluid .offset3 {
489
+ margin-left: 27.659574468085104%;
490
+ *margin-left: 27.5531914893617%;
491
+ }
492
+ .row-fluid .offset3:first-child {
493
+ margin-left: 25.53191489361702%;
494
+ *margin-left: 25.425531914893618%;
495
+ }
496
+ .row-fluid .offset2 {
497
+ margin-left: 19.148936170212764%;
498
+ *margin-left: 19.04255319148936%;
499
+ }
500
+ .row-fluid .offset2:first-child {
501
+ margin-left: 17.02127659574468%;
502
+ *margin-left: 16.914893617021278%;
503
+ }
504
+ .row-fluid .offset1 {
505
+ margin-left: 10.638297872340425%;
506
+ *margin-left: 10.53191489361702%;
507
+ }
508
+ .row-fluid .offset1:first-child {
509
+ margin-left: 8.51063829787234%;
510
+ *margin-left: 8.404255319148938%;
511
+ }
512
+ [class*="span"].hide,
513
+ .row-fluid [class*="span"].hide {
514
+ display: none;
515
+ }
516
+ [class*="span"].pull-right,
517
+ .row-fluid [class*="span"].pull-right {
518
+ float: right;
519
+ }
520
+ .container {
521
+ margin-right: auto;
522
+ margin-left: auto;
523
+ *zoom: 1;
524
+ }
525
+ .container:before,
526
+ .container:after {
527
+ display: table;
528
+ content: "";
529
+ line-height: 0;
530
+ }
531
+ .container:after {
532
+ clear: both;
533
+ }
534
+ .container-fluid {
535
+ padding-right: 20px;
536
+ padding-left: 20px;
537
+ *zoom: 1;
538
+ }
539
+ .container-fluid:before,
540
+ .container-fluid:after {
541
+ display: table;
542
+ content: "";
543
+ line-height: 0;
544
+ }
545
+ .container-fluid:after {
546
+ clear: both;
547
+ }
548
+ p {
549
+ margin: 0 0 10px;
550
+ }
551
+ .lead {
552
+ margin-bottom: 20px;
553
+ font-size: 21px;
554
+ font-weight: 200;
555
+ line-height: 30px;
556
+ }
557
+ small {
558
+ font-size: 85%;
559
+ }
560
+ strong {
561
+ font-weight: bold;
562
+ }
563
+ em {
564
+ font-style: italic;
565
+ }
566
+ cite {
567
+ font-style: normal;
568
+ }
569
+ .muted {
570
+ color: #999999;
571
+ }
572
+ a.muted:hover,
573
+ a.muted:focus {
574
+ color: #808080;
575
+ }
576
+ .text-warning {
577
+ color: #c09853;
578
+ }
579
+ a.text-warning:hover,
580
+ a.text-warning:focus {
581
+ color: #a47e3c;
582
+ }
583
+ .text-error {
584
+ color: #b94a48;
585
+ }
586
+ a.text-error:hover,
587
+ a.text-error:focus {
588
+ color: #953b39;
589
+ }
590
+ .text-info {
591
+ color: #3a87ad;
592
+ }
593
+ a.text-info:hover,
594
+ a.text-info:focus {
595
+ color: #2d6987;
596
+ }
597
+ .text-success {
598
+ color: #468847;
599
+ }
600
+ a.text-success:hover,
601
+ a.text-success:focus {
602
+ color: #356635;
603
+ }
604
+ .text-left {
605
+ text-align: left;
606
+ }
607
+ .text-right {
608
+ text-align: right;
609
+ }
610
+ .text-center {
611
+ text-align: center;
612
+ }
613
+ h1,
614
+ h2,
615
+ h3,
616
+ h4,
617
+ h5,
618
+ h6 {
619
+ margin: 10px 0;
620
+ font-family: inherit;
621
+ font-weight: bold;
622
+ line-height: 20px;
623
+ color: inherit;
624
+ text-rendering: optimizelegibility;
625
+ }
626
+ h1 small,
627
+ h2 small,
628
+ h3 small,
629
+ h4 small,
630
+ h5 small,
631
+ h6 small {
632
+ font-weight: normal;
633
+ line-height: 1;
634
+ color: #999999;
635
+ }
636
+ h1,
637
+ h2,
638
+ h3 {
639
+ line-height: 40px;
640
+ }
641
+ h1 {
642
+ font-size: 38.5px;
643
+ }
644
+ h2 {
645
+ font-size: 31.5px;
646
+ }
647
+ h3 {
648
+ font-size: 24.5px;
649
+ }
650
+ h4 {
651
+ font-size: 17.5px;
652
+ }
653
+ h5 {
654
+ font-size: 14px;
655
+ }
656
+ h6 {
657
+ font-size: 11.9px;
658
+ }
659
+ h1 small {
660
+ font-size: 24.5px;
661
+ }
662
+ h2 small {
663
+ font-size: 17.5px;
664
+ }
665
+ h3 small {
666
+ font-size: 14px;
667
+ }
668
+ h4 small {
669
+ font-size: 14px;
670
+ }
671
+ .page-header {
672
+ padding-bottom: 9px;
673
+ margin: 20px 0 30px;
674
+ border-bottom: 1px solid #eeeeee;
675
+ }
676
+ ul,
677
+ ol {
678
+ padding: 0;
679
+ margin: 0 0 10px 25px;
680
+ }
681
+ ul ul,
682
+ ul ol,
683
+ ol ol,
684
+ ol ul {
685
+ margin-bottom: 0;
686
+ }
687
+ li {
688
+ line-height: 20px;
689
+ }
690
+ ul.unstyled,
691
+ ol.unstyled {
692
+ margin-left: 0;
693
+ list-style: none;
694
+ }
695
+ ul.inline,
696
+ ol.inline {
697
+ margin-left: 0;
698
+ list-style: none;
699
+ }
700
+ ul.inline > li,
701
+ ol.inline > li {
702
+ display: inline-block;
703
+ *display: inline;
704
+ /* IE7 inline-block hack */
705
+
706
+ *zoom: 1;
707
+ padding-left: 5px;
708
+ padding-right: 5px;
709
+ }
710
+ dl {
711
+ margin-bottom: 20px;
712
+ }
713
+ dt,
714
+ dd {
715
+ line-height: 20px;
716
+ }
717
+ dt {
718
+ font-weight: bold;
719
+ }
720
+ dd {
721
+ margin-left: 10px;
722
+ }
723
+ .dl-horizontal {
724
+ *zoom: 1;
725
+ }
726
+ .dl-horizontal:before,
727
+ .dl-horizontal:after {
728
+ display: table;
729
+ content: "";
730
+ line-height: 0;
731
+ }
732
+ .dl-horizontal:after {
733
+ clear: both;
734
+ }
735
+ .dl-horizontal dt {
736
+ float: left;
737
+ width: 160px;
738
+ clear: left;
739
+ text-align: right;
740
+ overflow: hidden;
741
+ text-overflow: ellipsis;
742
+ white-space: nowrap;
743
+ }
744
+ .dl-horizontal dd {
745
+ margin-left: 180px;
746
+ }
747
+ hr {
748
+ margin: 20px 0;
749
+ border: 0;
750
+ border-top: 1px solid #eeeeee;
751
+ border-bottom: 1px solid #ffffff;
752
+ }
753
+ abbr[title],
754
+ abbr[data-original-title] {
755
+ cursor: help;
756
+ border-bottom: 1px dotted #999999;
757
+ }
758
+ abbr.initialism {
759
+ font-size: 90%;
760
+ text-transform: uppercase;
761
+ }
762
+ blockquote {
763
+ padding: 0 0 0 15px;
764
+ margin: 0 0 20px;
765
+ border-left: 5px solid #eeeeee;
766
+ }
767
+ blockquote p {
768
+ margin-bottom: 0;
769
+ font-size: 17.5px;
770
+ font-weight: 300;
771
+ line-height: 1.25;
772
+ }
773
+ blockquote small {
774
+ display: block;
775
+ line-height: 20px;
776
+ color: #999999;
777
+ }
778
+ blockquote small:before {
779
+ content: '\2014 \00A0';
780
+ }
781
+ blockquote.pull-right {
782
+ float: right;
783
+ padding-right: 15px;
784
+ padding-left: 0;
785
+ border-right: 5px solid #eeeeee;
786
+ border-left: 0;
787
+ }
788
+ blockquote.pull-right p,
789
+ blockquote.pull-right small {
790
+ text-align: right;
791
+ }
792
+ blockquote.pull-right small:before {
793
+ content: '';
794
+ }
795
+ blockquote.pull-right small:after {
796
+ content: '\00A0 \2014';
797
+ }
798
+ q:before,
799
+ q:after,
800
+ blockquote:before,
801
+ blockquote:after {
802
+ content: "";
803
+ }
804
+ address {
805
+ display: block;
806
+ margin-bottom: 20px;
807
+ font-style: normal;
808
+ line-height: 20px;
809
+ }
810
+ code,
811
+ pre {
812
+ padding: 0 3px 2px;
813
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
814
+ font-size: 12px;
815
+ color: #333333;
816
+ -webkit-border-radius: 3px;
817
+ -moz-border-radius: 3px;
818
+ border-radius: 3px;
819
+ }
820
+ code {
821
+ padding: 2px 4px;
822
+ color: #d14;
823
+ background-color: #f7f7f9;
824
+ border: 1px solid #e1e1e8;
825
+ white-space: nowrap;
826
+ }
827
+ pre {
828
+ display: block;
829
+ padding: 9.5px;
830
+ margin: 0 0 10px;
831
+ font-size: 13px;
832
+ line-height: 20px;
833
+ word-break: break-all;
834
+ word-wrap: break-word;
835
+ white-space: pre;
836
+ white-space: pre-wrap;
837
+ background-color: #f5f5f5;
838
+ border: 1px solid #ccc;
839
+ border: 1px solid rgba(0, 0, 0, 0.15);
840
+ -webkit-border-radius: 4px;
841
+ -moz-border-radius: 4px;
842
+ border-radius: 4px;
843
+ }
844
+ pre.prettyprint {
845
+ margin-bottom: 20px;
846
+ }
847
+ pre code {
848
+ padding: 0;
849
+ color: inherit;
850
+ white-space: pre;
851
+ white-space: pre-wrap;
852
+ background-color: transparent;
853
+ border: 0;
854
+ }
855
+ .pre-scrollable {
856
+ max-height: 340px;
857
+ overflow-y: scroll;
858
+ }
859
+ .label,
860
+ .badge {
861
+ display: inline-block;
862
+ padding: 2px 4px;
863
+ font-size: 11.844px;
864
+ font-weight: bold;
865
+ line-height: 14px;
866
+ color: #ffffff;
867
+ vertical-align: baseline;
868
+ white-space: nowrap;
869
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
870
+ background-color: #999999;
871
+ }
872
+ .label {
873
+ -webkit-border-radius: 3px;
874
+ -moz-border-radius: 3px;
875
+ border-radius: 3px;
876
+ }
877
+ .badge {
878
+ padding-left: 9px;
879
+ padding-right: 9px;
880
+ -webkit-border-radius: 9px;
881
+ -moz-border-radius: 9px;
882
+ border-radius: 9px;
883
+ }
884
+ .label:empty,
885
+ .badge:empty {
886
+ display: none;
887
+ }
888
+ a.label:hover,
889
+ a.label:focus,
890
+ a.badge:hover,
891
+ a.badge:focus {
892
+ color: #ffffff;
893
+ text-decoration: none;
894
+ cursor: pointer;
895
+ }
896
+ .label-important,
897
+ .badge-important {
898
+ background-color: #b94a48;
899
+ }
900
+ .label-important[href],
901
+ .badge-important[href] {
902
+ background-color: #953b39;
903
+ }
904
+ .label-warning,
905
+ .badge-warning {
906
+ background-color: #f89406;
907
+ }
908
+ .label-warning[href],
909
+ .badge-warning[href] {
910
+ background-color: #c67605;
911
+ }
912
+ .label-success,
913
+ .badge-success {
914
+ background-color: #468847;
915
+ }
916
+ .label-success[href],
917
+ .badge-success[href] {
918
+ background-color: #356635;
919
+ }
920
+ .label-info,
921
+ .badge-info {
922
+ background-color: #3a87ad;
923
+ }
924
+ .label-info[href],
925
+ .badge-info[href] {
926
+ background-color: #2d6987;
927
+ }
928
+ .label-inverse,
929
+ .badge-inverse {
930
+ background-color: #333333;
931
+ }
932
+ .label-inverse[href],
933
+ .badge-inverse[href] {
934
+ background-color: #1a1a1a;
935
+ }
936
+ .btn .label,
937
+ .btn .badge {
938
+ position: relative;
939
+ top: -1px;
940
+ }
941
+ .btn-mini .label,
942
+ .btn-mini .badge {
943
+ top: 0;
944
+ }
945
+ table {
946
+ max-width: 100%;
947
+ background-color: transparent;
948
+ border-collapse: collapse;
949
+ border-spacing: 0;
950
+ }
951
+ .table {
952
+ width: 100%;
953
+ margin-bottom: 20px;
954
+ }
955
+ .table th,
956
+ .table td {
957
+ padding: 8px;
958
+ line-height: 20px;
959
+ text-align: left;
960
+ vertical-align: top;
961
+ border-top: 1px solid #dddddd;
962
+ }
963
+ .table th {
964
+ font-weight: bold;
965
+ }
966
+ .table thead th {
967
+ vertical-align: bottom;
968
+ }
969
+ .table caption + thead tr:first-child th,
970
+ .table caption + thead tr:first-child td,
971
+ .table colgroup + thead tr:first-child th,
972
+ .table colgroup + thead tr:first-child td,
973
+ .table thead:first-child tr:first-child th,
974
+ .table thead:first-child tr:first-child td {
975
+ border-top: 0;
976
+ }
977
+ .table tbody + tbody {
978
+ border-top: 2px solid #dddddd;
979
+ }
980
+ .table .table {
981
+ background-color: #ffffff;
982
+ }
983
+ .table-condensed th,
984
+ .table-condensed td {
985
+ padding: 4px 5px;
986
+ }
987
+ .table-bordered {
988
+ border: 1px solid #dddddd;
989
+ border-collapse: separate;
990
+ *border-collapse: collapse;
991
+ border-left: 0;
992
+ -webkit-border-radius: 4px;
993
+ -moz-border-radius: 4px;
994
+ border-radius: 4px;
995
+ }
996
+ .table-bordered th,
997
+ .table-bordered td {
998
+ border-left: 1px solid #dddddd;
999
+ }
1000
+ .table-bordered caption + thead tr:first-child th,
1001
+ .table-bordered caption + tbody tr:first-child th,
1002
+ .table-bordered caption + tbody tr:first-child td,
1003
+ .table-bordered colgroup + thead tr:first-child th,
1004
+ .table-bordered colgroup + tbody tr:first-child th,
1005
+ .table-bordered colgroup + tbody tr:first-child td,
1006
+ .table-bordered thead:first-child tr:first-child th,
1007
+ .table-bordered tbody:first-child tr:first-child th,
1008
+ .table-bordered tbody:first-child tr:first-child td {
1009
+ border-top: 0;
1010
+ }
1011
+ .table-bordered thead:first-child tr:first-child > th:first-child,
1012
+ .table-bordered tbody:first-child tr:first-child > td:first-child,
1013
+ .table-bordered tbody:first-child tr:first-child > th:first-child {
1014
+ -webkit-border-top-left-radius: 4px;
1015
+ -moz-border-radius-topleft: 4px;
1016
+ border-top-left-radius: 4px;
1017
+ }
1018
+ .table-bordered thead:first-child tr:first-child > th:last-child,
1019
+ .table-bordered tbody:first-child tr:first-child > td:last-child,
1020
+ .table-bordered tbody:first-child tr:first-child > th:last-child {
1021
+ -webkit-border-top-right-radius: 4px;
1022
+ -moz-border-radius-topright: 4px;
1023
+ border-top-right-radius: 4px;
1024
+ }
1025
+ .table-bordered thead:last-child tr:last-child > th:first-child,
1026
+ .table-bordered tbody:last-child tr:last-child > td:first-child,
1027
+ .table-bordered tbody:last-child tr:last-child > th:first-child,
1028
+ .table-bordered tfoot:last-child tr:last-child > td:first-child,
1029
+ .table-bordered tfoot:last-child tr:last-child > th:first-child {
1030
+ -webkit-border-bottom-left-radius: 4px;
1031
+ -moz-border-radius-bottomleft: 4px;
1032
+ border-bottom-left-radius: 4px;
1033
+ }
1034
+ .table-bordered thead:last-child tr:last-child > th:last-child,
1035
+ .table-bordered tbody:last-child tr:last-child > td:last-child,
1036
+ .table-bordered tbody:last-child tr:last-child > th:last-child,
1037
+ .table-bordered tfoot:last-child tr:last-child > td:last-child,
1038
+ .table-bordered tfoot:last-child tr:last-child > th:last-child {
1039
+ -webkit-border-bottom-right-radius: 4px;
1040
+ -moz-border-radius-bottomright: 4px;
1041
+ border-bottom-right-radius: 4px;
1042
+ }
1043
+ .table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
1044
+ -webkit-border-bottom-left-radius: 0;
1045
+ -moz-border-radius-bottomleft: 0;
1046
+ border-bottom-left-radius: 0;
1047
+ }
1048
+ .table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
1049
+ -webkit-border-bottom-right-radius: 0;
1050
+ -moz-border-radius-bottomright: 0;
1051
+ border-bottom-right-radius: 0;
1052
+ }
1053
+ .table-bordered caption + thead tr:first-child th:first-child,
1054
+ .table-bordered caption + tbody tr:first-child td:first-child,
1055
+ .table-bordered colgroup + thead tr:first-child th:first-child,
1056
+ .table-bordered colgroup + tbody tr:first-child td:first-child {
1057
+ -webkit-border-top-left-radius: 4px;
1058
+ -moz-border-radius-topleft: 4px;
1059
+ border-top-left-radius: 4px;
1060
+ }
1061
+ .table-bordered caption + thead tr:first-child th:last-child,
1062
+ .table-bordered caption + tbody tr:first-child td:last-child,
1063
+ .table-bordered colgroup + thead tr:first-child th:last-child,
1064
+ .table-bordered colgroup + tbody tr:first-child td:last-child {
1065
+ -webkit-border-top-right-radius: 4px;
1066
+ -moz-border-radius-topright: 4px;
1067
+ border-top-right-radius: 4px;
1068
+ }
1069
+ .table-striped tbody > tr:nth-child(odd) > td,
1070
+ .table-striped tbody > tr:nth-child(odd) > th {
1071
+ background-color: #f9f9f9;
1072
+ }
1073
+ .table-hover tbody tr:hover > td,
1074
+ .table-hover tbody tr:hover > th {
1075
+ background-color: #f5f5f5;
1076
+ }
1077
+ table td[class*="span"],
1078
+ table th[class*="span"],
1079
+ .row-fluid table td[class*="span"],
1080
+ .row-fluid table th[class*="span"] {
1081
+ display: table-cell;
1082
+ float: none;
1083
+ margin-left: 0;
1084
+ }
1085
+ .table td.span1,
1086
+ .table th.span1 {
1087
+ float: none;
1088
+ width: 44px;
1089
+ margin-left: 0;
1090
+ }
1091
+ .table td.span2,
1092
+ .table th.span2 {
1093
+ float: none;
1094
+ width: 124px;
1095
+ margin-left: 0;
1096
+ }
1097
+ .table td.span3,
1098
+ .table th.span3 {
1099
+ float: none;
1100
+ width: 204px;
1101
+ margin-left: 0;
1102
+ }
1103
+ .table td.span4,
1104
+ .table th.span4 {
1105
+ float: none;
1106
+ width: 284px;
1107
+ margin-left: 0;
1108
+ }
1109
+ .table td.span5,
1110
+ .table th.span5 {
1111
+ float: none;
1112
+ width: 364px;
1113
+ margin-left: 0;
1114
+ }
1115
+ .table td.span6,
1116
+ .table th.span6 {
1117
+ float: none;
1118
+ width: 444px;
1119
+ margin-left: 0;
1120
+ }
1121
+ .table td.span7,
1122
+ .table th.span7 {
1123
+ float: none;
1124
+ width: 524px;
1125
+ margin-left: 0;
1126
+ }
1127
+ .table td.span8,
1128
+ .table th.span8 {
1129
+ float: none;
1130
+ width: 604px;
1131
+ margin-left: 0;
1132
+ }
1133
+ .table td.span9,
1134
+ .table th.span9 {
1135
+ float: none;
1136
+ width: 684px;
1137
+ margin-left: 0;
1138
+ }
1139
+ .table td.span10,
1140
+ .table th.span10 {
1141
+ float: none;
1142
+ width: 764px;
1143
+ margin-left: 0;
1144
+ }
1145
+ .table td.span11,
1146
+ .table th.span11 {
1147
+ float: none;
1148
+ width: 844px;
1149
+ margin-left: 0;
1150
+ }
1151
+ .table td.span12,
1152
+ .table th.span12 {
1153
+ float: none;
1154
+ width: 924px;
1155
+ margin-left: 0;
1156
+ }
1157
+ .table tbody tr.success > td {
1158
+ background-color: #dff0d8;
1159
+ }
1160
+ .table tbody tr.error > td {
1161
+ background-color: #f2dede;
1162
+ }
1163
+ .table tbody tr.warning > td {
1164
+ background-color: #fcf8e3;
1165
+ }
1166
+ .table tbody tr.info > td {
1167
+ background-color: #d9edf7;
1168
+ }
1169
+ .table-hover tbody tr.success:hover > td {
1170
+ background-color: #d0e9c6;
1171
+ }
1172
+ .table-hover tbody tr.error:hover > td {
1173
+ background-color: #ebcccc;
1174
+ }
1175
+ .table-hover tbody tr.warning:hover > td {
1176
+ background-color: #faf2cc;
1177
+ }
1178
+ .table-hover tbody tr.info:hover > td {
1179
+ background-color: #c4e3f3;
1180
+ }
1181
+ form {
1182
+ margin: 0 0 20px;
1183
+ }
1184
+ fieldset {
1185
+ padding: 0;
1186
+ margin: 0;
1187
+ border: 0;
1188
+ }
1189
+ legend {
1190
+ display: block;
1191
+ width: 100%;
1192
+ padding: 0;
1193
+ margin-bottom: 20px;
1194
+ font-size: 21px;
1195
+ line-height: 40px;
1196
+ color: #333333;
1197
+ border: 0;
1198
+ border-bottom: 1px solid #e5e5e5;
1199
+ }
1200
+ legend small {
1201
+ font-size: 15px;
1202
+ color: #999999;
1203
+ }
1204
+ label,
1205
+ input,
1206
+ button,
1207
+ select,
1208
+ textarea {
1209
+ font-size: 14px;
1210
+ font-weight: normal;
1211
+ line-height: 20px;
1212
+ }
1213
+ input,
1214
+ button,
1215
+ select,
1216
+ textarea {
1217
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
1218
+ }
1219
+ label {
1220
+ display: block;
1221
+ margin-bottom: 5px;
1222
+ }
1223
+ select,
1224
+ textarea,
1225
+ input[type="text"],
1226
+ input[type="password"],
1227
+ input[type="datetime"],
1228
+ input[type="datetime-local"],
1229
+ input[type="date"],
1230
+ input[type="month"],
1231
+ input[type="time"],
1232
+ input[type="week"],
1233
+ input[type="number"],
1234
+ input[type="email"],
1235
+ input[type="url"],
1236
+ input[type="search"],
1237
+ input[type="tel"],
1238
+ input[type="color"],
1239
+ .uneditable-input {
1240
+ display: inline-block;
1241
+ height: 20px;
1242
+ padding: 4px 6px;
1243
+ margin-bottom: 10px;
1244
+ font-size: 14px;
1245
+ line-height: 20px;
1246
+ color: #555555;
1247
+ -webkit-border-radius: 4px;
1248
+ -moz-border-radius: 4px;
1249
+ border-radius: 4px;
1250
+ vertical-align: middle;
1251
+ }
1252
+ input,
1253
+ textarea,
1254
+ .uneditable-input {
1255
+ width: 206px;
1256
+ }
1257
+ textarea {
1258
+ height: auto;
1259
+ }
1260
+ textarea,
1261
+ input[type="text"],
1262
+ input[type="password"],
1263
+ input[type="datetime"],
1264
+ input[type="datetime-local"],
1265
+ input[type="date"],
1266
+ input[type="month"],
1267
+ input[type="time"],
1268
+ input[type="week"],
1269
+ input[type="number"],
1270
+ input[type="email"],
1271
+ input[type="url"],
1272
+ input[type="search"],
1273
+ input[type="tel"],
1274
+ input[type="color"],
1275
+ .uneditable-input {
1276
+ background-color: #ffffff;
1277
+ border: 1px solid #cccccc;
1278
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1279
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1280
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1281
+ -webkit-transition: border linear .2s, box-shadow linear .2s;
1282
+ -moz-transition: border linear .2s, box-shadow linear .2s;
1283
+ -o-transition: border linear .2s, box-shadow linear .2s;
1284
+ transition: border linear .2s, box-shadow linear .2s;
1285
+ }
1286
+ textarea:focus,
1287
+ input[type="text"]:focus,
1288
+ input[type="password"]:focus,
1289
+ input[type="datetime"]:focus,
1290
+ input[type="datetime-local"]:focus,
1291
+ input[type="date"]:focus,
1292
+ input[type="month"]:focus,
1293
+ input[type="time"]:focus,
1294
+ input[type="week"]:focus,
1295
+ input[type="number"]:focus,
1296
+ input[type="email"]:focus,
1297
+ input[type="url"]:focus,
1298
+ input[type="search"]:focus,
1299
+ input[type="tel"]:focus,
1300
+ input[type="color"]:focus,
1301
+ .uneditable-input:focus {
1302
+ border-color: rgba(82, 168, 236, 0.8);
1303
+ outline: 0;
1304
+ outline: thin dotted \9;
1305
+ /* IE6-9 */
1306
+
1307
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
1308
+ -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
1309
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
1310
+ }
1311
+ input[type="radio"],
1312
+ input[type="checkbox"] {
1313
+ margin: 4px 0 0;
1314
+ *margin-top: 0;
1315
+ /* IE7 */
1316
+
1317
+ margin-top: 1px \9;
1318
+ /* IE8-9 */
1319
+
1320
+ line-height: normal;
1321
+ }
1322
+ input[type="file"],
1323
+ input[type="image"],
1324
+ input[type="submit"],
1325
+ input[type="reset"],
1326
+ input[type="button"],
1327
+ input[type="radio"],
1328
+ input[type="checkbox"] {
1329
+ width: auto;
1330
+ }
1331
+ select,
1332
+ input[type="file"] {
1333
+ height: 30px;
1334
+ /* In IE7, the height of the select element cannot be changed by height, only font-size */
1335
+
1336
+ *margin-top: 4px;
1337
+ /* For IE7, add top margin to align select with labels */
1338
+
1339
+ line-height: 30px;
1340
+ }
1341
+ select {
1342
+ width: 220px;
1343
+ border: 1px solid #cccccc;
1344
+ background-color: #ffffff;
1345
+ }
1346
+ select[multiple],
1347
+ select[size] {
1348
+ height: auto;
1349
+ }
1350
+ select:focus,
1351
+ input[type="file"]:focus,
1352
+ input[type="radio"]:focus,
1353
+ input[type="checkbox"]:focus {
1354
+ outline: thin dotted #333;
1355
+ outline: 5px auto -webkit-focus-ring-color;
1356
+ outline-offset: -2px;
1357
+ }
1358
+ .uneditable-input,
1359
+ .uneditable-textarea {
1360
+ color: #999999;
1361
+ background-color: #fcfcfc;
1362
+ border-color: #cccccc;
1363
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
1364
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
1365
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
1366
+ cursor: not-allowed;
1367
+ }
1368
+ .uneditable-input {
1369
+ overflow: hidden;
1370
+ white-space: nowrap;
1371
+ }
1372
+ .uneditable-textarea {
1373
+ width: auto;
1374
+ height: auto;
1375
+ }
1376
+ input:-moz-placeholder,
1377
+ textarea:-moz-placeholder {
1378
+ color: #999999;
1379
+ }
1380
+ input:-ms-input-placeholder,
1381
+ textarea:-ms-input-placeholder {
1382
+ color: #999999;
1383
+ }
1384
+ input::-webkit-input-placeholder,
1385
+ textarea::-webkit-input-placeholder {
1386
+ color: #999999;
1387
+ }
1388
+ .radio,
1389
+ .checkbox {
1390
+ min-height: 20px;
1391
+ padding-left: 20px;
1392
+ }
1393
+ .radio input[type="radio"],
1394
+ .checkbox input[type="checkbox"] {
1395
+ float: left;
1396
+ margin-left: -20px;
1397
+ }
1398
+ .controls > .radio:first-child,
1399
+ .controls > .checkbox:first-child {
1400
+ padding-top: 5px;
1401
+ }
1402
+ .radio.inline,
1403
+ .checkbox.inline {
1404
+ display: inline-block;
1405
+ padding-top: 5px;
1406
+ margin-bottom: 0;
1407
+ vertical-align: middle;
1408
+ }
1409
+ .radio.inline + .radio.inline,
1410
+ .checkbox.inline + .checkbox.inline {
1411
+ margin-left: 10px;
1412
+ }
1413
+ .input-mini {
1414
+ width: 60px;
1415
+ }
1416
+ .input-small {
1417
+ width: 90px;
1418
+ }
1419
+ .input-medium {
1420
+ width: 150px;
1421
+ }
1422
+ .input-large {
1423
+ width: 210px;
1424
+ }
1425
+ .input-xlarge {
1426
+ width: 270px;
1427
+ }
1428
+ .input-xxlarge {
1429
+ width: 530px;
1430
+ }
1431
+ input[class*="span"],
1432
+ select[class*="span"],
1433
+ textarea[class*="span"],
1434
+ .uneditable-input[class*="span"],
1435
+ .row-fluid input[class*="span"],
1436
+ .row-fluid select[class*="span"],
1437
+ .row-fluid textarea[class*="span"],
1438
+ .row-fluid .uneditable-input[class*="span"] {
1439
+ float: none;
1440
+ margin-left: 0;
1441
+ }
1442
+ .input-append input[class*="span"],
1443
+ .input-append .uneditable-input[class*="span"],
1444
+ .input-prepend input[class*="span"],
1445
+ .input-prepend .uneditable-input[class*="span"],
1446
+ .row-fluid input[class*="span"],
1447
+ .row-fluid select[class*="span"],
1448
+ .row-fluid textarea[class*="span"],
1449
+ .row-fluid .uneditable-input[class*="span"],
1450
+ .row-fluid .input-prepend [class*="span"],
1451
+ .row-fluid .input-append [class*="span"] {
1452
+ display: inline-block;
1453
+ }
1454
+ input,
1455
+ textarea,
1456
+ .uneditable-input {
1457
+ margin-left: 0;
1458
+ }
1459
+ .controls-row [class*="span"] + [class*="span"] {
1460
+ margin-left: 20px;
1461
+ }
1462
+ input.span12,
1463
+ textarea.span12,
1464
+ .uneditable-input.span12 {
1465
+ width: 926px;
1466
+ }
1467
+ input.span11,
1468
+ textarea.span11,
1469
+ .uneditable-input.span11 {
1470
+ width: 846px;
1471
+ }
1472
+ input.span10,
1473
+ textarea.span10,
1474
+ .uneditable-input.span10 {
1475
+ width: 766px;
1476
+ }
1477
+ input.span9,
1478
+ textarea.span9,
1479
+ .uneditable-input.span9 {
1480
+ width: 686px;
1481
+ }
1482
+ input.span8,
1483
+ textarea.span8,
1484
+ .uneditable-input.span8 {
1485
+ width: 606px;
1486
+ }
1487
+ input.span7,
1488
+ textarea.span7,
1489
+ .uneditable-input.span7 {
1490
+ width: 526px;
1491
+ }
1492
+ input.span6,
1493
+ textarea.span6,
1494
+ .uneditable-input.span6 {
1495
+ width: 446px;
1496
+ }
1497
+ input.span5,
1498
+ textarea.span5,
1499
+ .uneditable-input.span5 {
1500
+ width: 366px;
1501
+ }
1502
+ input.span4,
1503
+ textarea.span4,
1504
+ .uneditable-input.span4 {
1505
+ width: 286px;
1506
+ }
1507
+ input.span3,
1508
+ textarea.span3,
1509
+ .uneditable-input.span3 {
1510
+ width: 206px;
1511
+ }
1512
+ input.span2,
1513
+ textarea.span2,
1514
+ .uneditable-input.span2 {
1515
+ width: 126px;
1516
+ }
1517
+ input.span1,
1518
+ textarea.span1,
1519
+ .uneditable-input.span1 {
1520
+ width: 46px;
1521
+ }
1522
+ .controls-row {
1523
+ *zoom: 1;
1524
+ }
1525
+ .controls-row:before,
1526
+ .controls-row:after {
1527
+ display: table;
1528
+ content: "";
1529
+ line-height: 0;
1530
+ }
1531
+ .controls-row:after {
1532
+ clear: both;
1533
+ }
1534
+ .controls-row [class*="span"],
1535
+ .row-fluid .controls-row [class*="span"] {
1536
+ float: left;
1537
+ }
1538
+ .controls-row .checkbox[class*="span"],
1539
+ .controls-row .radio[class*="span"] {
1540
+ padding-top: 5px;
1541
+ }
1542
+ input[disabled],
1543
+ select[disabled],
1544
+ textarea[disabled],
1545
+ input[readonly],
1546
+ select[readonly],
1547
+ textarea[readonly] {
1548
+ cursor: not-allowed;
1549
+ background-color: #eeeeee;
1550
+ }
1551
+ input[type="radio"][disabled],
1552
+ input[type="checkbox"][disabled],
1553
+ input[type="radio"][readonly],
1554
+ input[type="checkbox"][readonly] {
1555
+ background-color: transparent;
1556
+ }
1557
+ .control-group.warning .control-label,
1558
+ .control-group.warning .help-block,
1559
+ .control-group.warning .help-inline {
1560
+ color: #c09853;
1561
+ }
1562
+ .control-group.warning .checkbox,
1563
+ .control-group.warning .radio,
1564
+ .control-group.warning input,
1565
+ .control-group.warning select,
1566
+ .control-group.warning textarea {
1567
+ color: #c09853;
1568
+ }
1569
+ .control-group.warning input,
1570
+ .control-group.warning select,
1571
+ .control-group.warning textarea {
1572
+ border-color: #c09853;
1573
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1574
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1575
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1576
+ }
1577
+ .control-group.warning input:focus,
1578
+ .control-group.warning select:focus,
1579
+ .control-group.warning textarea:focus {
1580
+ border-color: #a47e3c;
1581
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
1582
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
1583
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
1584
+ }
1585
+ .control-group.warning .input-prepend .add-on,
1586
+ .control-group.warning .input-append .add-on {
1587
+ color: #c09853;
1588
+ background-color: #fcf8e3;
1589
+ border-color: #c09853;
1590
+ }
1591
+ .control-group.error .control-label,
1592
+ .control-group.error .help-block,
1593
+ .control-group.error .help-inline {
1594
+ color: #b94a48;
1595
+ }
1596
+ .control-group.error .checkbox,
1597
+ .control-group.error .radio,
1598
+ .control-group.error input,
1599
+ .control-group.error select,
1600
+ .control-group.error textarea {
1601
+ color: #b94a48;
1602
+ }
1603
+ .control-group.error input,
1604
+ .control-group.error select,
1605
+ .control-group.error textarea {
1606
+ border-color: #b94a48;
1607
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1608
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1609
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1610
+ }
1611
+ .control-group.error input:focus,
1612
+ .control-group.error select:focus,
1613
+ .control-group.error textarea:focus {
1614
+ border-color: #953b39;
1615
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
1616
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
1617
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
1618
+ }
1619
+ .control-group.error .input-prepend .add-on,
1620
+ .control-group.error .input-append .add-on {
1621
+ color: #b94a48;
1622
+ background-color: #f2dede;
1623
+ border-color: #b94a48;
1624
+ }
1625
+ .control-group.success .control-label,
1626
+ .control-group.success .help-block,
1627
+ .control-group.success .help-inline {
1628
+ color: #468847;
1629
+ }
1630
+ .control-group.success .checkbox,
1631
+ .control-group.success .radio,
1632
+ .control-group.success input,
1633
+ .control-group.success select,
1634
+ .control-group.success textarea {
1635
+ color: #468847;
1636
+ }
1637
+ .control-group.success input,
1638
+ .control-group.success select,
1639
+ .control-group.success textarea {
1640
+ border-color: #468847;
1641
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1642
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1643
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1644
+ }
1645
+ .control-group.success input:focus,
1646
+ .control-group.success select:focus,
1647
+ .control-group.success textarea:focus {
1648
+ border-color: #356635;
1649
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
1650
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
1651
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
1652
+ }
1653
+ .control-group.success .input-prepend .add-on,
1654
+ .control-group.success .input-append .add-on {
1655
+ color: #468847;
1656
+ background-color: #dff0d8;
1657
+ border-color: #468847;
1658
+ }
1659
+ .control-group.info .control-label,
1660
+ .control-group.info .help-block,
1661
+ .control-group.info .help-inline {
1662
+ color: #3a87ad;
1663
+ }
1664
+ .control-group.info .checkbox,
1665
+ .control-group.info .radio,
1666
+ .control-group.info input,
1667
+ .control-group.info select,
1668
+ .control-group.info textarea {
1669
+ color: #3a87ad;
1670
+ }
1671
+ .control-group.info input,
1672
+ .control-group.info select,
1673
+ .control-group.info textarea {
1674
+ border-color: #3a87ad;
1675
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1676
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1677
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1678
+ }
1679
+ .control-group.info input:focus,
1680
+ .control-group.info select:focus,
1681
+ .control-group.info textarea:focus {
1682
+ border-color: #2d6987;
1683
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
1684
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
1685
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
1686
+ }
1687
+ .control-group.info .input-prepend .add-on,
1688
+ .control-group.info .input-append .add-on {
1689
+ color: #3a87ad;
1690
+ background-color: #d9edf7;
1691
+ border-color: #3a87ad;
1692
+ }
1693
+ input:focus:invalid,
1694
+ textarea:focus:invalid,
1695
+ select:focus:invalid {
1696
+ color: #b94a48;
1697
+ border-color: #ee5f5b;
1698
+ }
1699
+ input:focus:invalid:focus,
1700
+ textarea:focus:invalid:focus,
1701
+ select:focus:invalid:focus {
1702
+ border-color: #e9322d;
1703
+ -webkit-box-shadow: 0 0 6px #f8b9b7;
1704
+ -moz-box-shadow: 0 0 6px #f8b9b7;
1705
+ box-shadow: 0 0 6px #f8b9b7;
1706
+ }
1707
+ .form-actions {
1708
+ padding: 19px 20px 20px;
1709
+ margin-top: 20px;
1710
+ margin-bottom: 20px;
1711
+ background-color: #f5f5f5;
1712
+ border-top: 1px solid #e5e5e5;
1713
+ *zoom: 1;
1714
+ }
1715
+ .form-actions:before,
1716
+ .form-actions:after {
1717
+ display: table;
1718
+ content: "";
1719
+ line-height: 0;
1720
+ }
1721
+ .form-actions:after {
1722
+ clear: both;
1723
+ }
1724
+ .help-block,
1725
+ .help-inline {
1726
+ color: #595959;
1727
+ }
1728
+ .help-block {
1729
+ display: block;
1730
+ margin-bottom: 10px;
1731
+ }
1732
+ .help-inline {
1733
+ display: inline-block;
1734
+ *display: inline;
1735
+ /* IE7 inline-block hack */
1736
+
1737
+ *zoom: 1;
1738
+ vertical-align: middle;
1739
+ padding-left: 5px;
1740
+ }
1741
+ .input-append,
1742
+ .input-prepend {
1743
+ display: inline-block;
1744
+ margin-bottom: 10px;
1745
+ vertical-align: middle;
1746
+ font-size: 0;
1747
+ white-space: nowrap;
1748
+ }
1749
+ .input-append input,
1750
+ .input-prepend input,
1751
+ .input-append select,
1752
+ .input-prepend select,
1753
+ .input-append .uneditable-input,
1754
+ .input-prepend .uneditable-input,
1755
+ .input-append .dropdown-menu,
1756
+ .input-prepend .dropdown-menu,
1757
+ .input-append .popover,
1758
+ .input-prepend .popover {
1759
+ font-size: 14px;
1760
+ }
1761
+ .input-append input,
1762
+ .input-prepend input,
1763
+ .input-append select,
1764
+ .input-prepend select,
1765
+ .input-append .uneditable-input,
1766
+ .input-prepend .uneditable-input {
1767
+ position: relative;
1768
+ margin-bottom: 0;
1769
+ *margin-left: 0;
1770
+ vertical-align: top;
1771
+ -webkit-border-radius: 0 4px 4px 0;
1772
+ -moz-border-radius: 0 4px 4px 0;
1773
+ border-radius: 0 4px 4px 0;
1774
+ }
1775
+ .input-append input:focus,
1776
+ .input-prepend input:focus,
1777
+ .input-append select:focus,
1778
+ .input-prepend select:focus,
1779
+ .input-append .uneditable-input:focus,
1780
+ .input-prepend .uneditable-input:focus {
1781
+ z-index: 2;
1782
+ }
1783
+ .input-append .add-on,
1784
+ .input-prepend .add-on {
1785
+ display: inline-block;
1786
+ width: auto;
1787
+ height: 20px;
1788
+ min-width: 16px;
1789
+ padding: 4px 5px;
1790
+ font-size: 14px;
1791
+ font-weight: normal;
1792
+ line-height: 20px;
1793
+ text-align: center;
1794
+ text-shadow: 0 1px 0 #ffffff;
1795
+ background-color: #eeeeee;
1796
+ border: 1px solid #ccc;
1797
+ }
1798
+ .input-append .add-on,
1799
+ .input-prepend .add-on,
1800
+ .input-append .btn,
1801
+ .input-prepend .btn,
1802
+ .input-append .btn-group > .dropdown-toggle,
1803
+ .input-prepend .btn-group > .dropdown-toggle {
1804
+ vertical-align: top;
1805
+ -webkit-border-radius: 0;
1806
+ -moz-border-radius: 0;
1807
+ border-radius: 0;
1808
+ }
1809
+ .input-append .active,
1810
+ .input-prepend .active {
1811
+ background-color: #a9dba9;
1812
+ border-color: #46a546;
1813
+ }
1814
+ .input-prepend .add-on,
1815
+ .input-prepend .btn {
1816
+ margin-right: -1px;
1817
+ }
1818
+ .input-prepend .add-on:first-child,
1819
+ .input-prepend .btn:first-child {
1820
+ -webkit-border-radius: 4px 0 0 4px;
1821
+ -moz-border-radius: 4px 0 0 4px;
1822
+ border-radius: 4px 0 0 4px;
1823
+ }
1824
+ .input-append input,
1825
+ .input-append select,
1826
+ .input-append .uneditable-input {
1827
+ -webkit-border-radius: 4px 0 0 4px;
1828
+ -moz-border-radius: 4px 0 0 4px;
1829
+ border-radius: 4px 0 0 4px;
1830
+ }
1831
+ .input-append input + .btn-group .btn:last-child,
1832
+ .input-append select + .btn-group .btn:last-child,
1833
+ .input-append .uneditable-input + .btn-group .btn:last-child {
1834
+ -webkit-border-radius: 0 4px 4px 0;
1835
+ -moz-border-radius: 0 4px 4px 0;
1836
+ border-radius: 0 4px 4px 0;
1837
+ }
1838
+ .input-append .add-on,
1839
+ .input-append .btn,
1840
+ .input-append .btn-group {
1841
+ margin-left: -1px;
1842
+ }
1843
+ .input-append .add-on:last-child,
1844
+ .input-append .btn:last-child,
1845
+ .input-append .btn-group:last-child > .dropdown-toggle {
1846
+ -webkit-border-radius: 0 4px 4px 0;
1847
+ -moz-border-radius: 0 4px 4px 0;
1848
+ border-radius: 0 4px 4px 0;
1849
+ }
1850
+ .input-prepend.input-append input,
1851
+ .input-prepend.input-append select,
1852
+ .input-prepend.input-append .uneditable-input {
1853
+ -webkit-border-radius: 0;
1854
+ -moz-border-radius: 0;
1855
+ border-radius: 0;
1856
+ }
1857
+ .input-prepend.input-append input + .btn-group .btn,
1858
+ .input-prepend.input-append select + .btn-group .btn,
1859
+ .input-prepend.input-append .uneditable-input + .btn-group .btn {
1860
+ -webkit-border-radius: 0 4px 4px 0;
1861
+ -moz-border-radius: 0 4px 4px 0;
1862
+ border-radius: 0 4px 4px 0;
1863
+ }
1864
+ .input-prepend.input-append .add-on:first-child,
1865
+ .input-prepend.input-append .btn:first-child {
1866
+ margin-right: -1px;
1867
+ -webkit-border-radius: 4px 0 0 4px;
1868
+ -moz-border-radius: 4px 0 0 4px;
1869
+ border-radius: 4px 0 0 4px;
1870
+ }
1871
+ .input-prepend.input-append .add-on:last-child,
1872
+ .input-prepend.input-append .btn:last-child {
1873
+ margin-left: -1px;
1874
+ -webkit-border-radius: 0 4px 4px 0;
1875
+ -moz-border-radius: 0 4px 4px 0;
1876
+ border-radius: 0 4px 4px 0;
1877
+ }
1878
+ .input-prepend.input-append .btn-group:first-child {
1879
+ margin-left: 0;
1880
+ }
1881
+ input.search-query {
1882
+ padding-right: 14px;
1883
+ padding-right: 4px \9;
1884
+ padding-left: 14px;
1885
+ padding-left: 4px \9;
1886
+ /* IE7-8 doesn't have border-radius, so don't indent the padding */
1887
+
1888
+ margin-bottom: 0;
1889
+ -webkit-border-radius: 15px;
1890
+ -moz-border-radius: 15px;
1891
+ border-radius: 15px;
1892
+ }
1893
+ /* Allow for input prepend/append in search forms */
1894
+ .form-search .input-append .search-query,
1895
+ .form-search .input-prepend .search-query {
1896
+ -webkit-border-radius: 0;
1897
+ -moz-border-radius: 0;
1898
+ border-radius: 0;
1899
+ }
1900
+ .form-search .input-append .search-query {
1901
+ -webkit-border-radius: 14px 0 0 14px;
1902
+ -moz-border-radius: 14px 0 0 14px;
1903
+ border-radius: 14px 0 0 14px;
1904
+ }
1905
+ .form-search .input-append .btn {
1906
+ -webkit-border-radius: 0 14px 14px 0;
1907
+ -moz-border-radius: 0 14px 14px 0;
1908
+ border-radius: 0 14px 14px 0;
1909
+ }
1910
+ .form-search .input-prepend .search-query {
1911
+ -webkit-border-radius: 0 14px 14px 0;
1912
+ -moz-border-radius: 0 14px 14px 0;
1913
+ border-radius: 0 14px 14px 0;
1914
+ }
1915
+ .form-search .input-prepend .btn {
1916
+ -webkit-border-radius: 14px 0 0 14px;
1917
+ -moz-border-radius: 14px 0 0 14px;
1918
+ border-radius: 14px 0 0 14px;
1919
+ }
1920
+ .form-search input,
1921
+ .form-inline input,
1922
+ .form-horizontal input,
1923
+ .form-search textarea,
1924
+ .form-inline textarea,
1925
+ .form-horizontal textarea,
1926
+ .form-search select,
1927
+ .form-inline select,
1928
+ .form-horizontal select,
1929
+ .form-search .help-inline,
1930
+ .form-inline .help-inline,
1931
+ .form-horizontal .help-inline,
1932
+ .form-search .uneditable-input,
1933
+ .form-inline .uneditable-input,
1934
+ .form-horizontal .uneditable-input,
1935
+ .form-search .input-prepend,
1936
+ .form-inline .input-prepend,
1937
+ .form-horizontal .input-prepend,
1938
+ .form-search .input-append,
1939
+ .form-inline .input-append,
1940
+ .form-horizontal .input-append {
1941
+ display: inline-block;
1942
+ *display: inline;
1943
+ /* IE7 inline-block hack */
1944
+
1945
+ *zoom: 1;
1946
+ margin-bottom: 0;
1947
+ vertical-align: middle;
1948
+ }
1949
+ .form-search .hide,
1950
+ .form-inline .hide,
1951
+ .form-horizontal .hide {
1952
+ display: none;
1953
+ }
1954
+ .form-search label,
1955
+ .form-inline label,
1956
+ .form-search .btn-group,
1957
+ .form-inline .btn-group {
1958
+ display: inline-block;
1959
+ }
1960
+ .form-search .input-append,
1961
+ .form-inline .input-append,
1962
+ .form-search .input-prepend,
1963
+ .form-inline .input-prepend {
1964
+ margin-bottom: 0;
1965
+ }
1966
+ .form-search .radio,
1967
+ .form-search .checkbox,
1968
+ .form-inline .radio,
1969
+ .form-inline .checkbox {
1970
+ padding-left: 0;
1971
+ margin-bottom: 0;
1972
+ vertical-align: middle;
1973
+ }
1974
+ .form-search .radio input[type="radio"],
1975
+ .form-search .checkbox input[type="checkbox"],
1976
+ .form-inline .radio input[type="radio"],
1977
+ .form-inline .checkbox input[type="checkbox"] {
1978
+ float: left;
1979
+ margin-right: 3px;
1980
+ margin-left: 0;
1981
+ }
1982
+ .control-group {
1983
+ margin-bottom: 10px;
1984
+ }
1985
+ legend + .control-group {
1986
+ margin-top: 20px;
1987
+ -webkit-margin-top-collapse: separate;
1988
+ }
1989
+ .form-horizontal .control-group {
1990
+ margin-bottom: 20px;
1991
+ *zoom: 1;
1992
+ }
1993
+ .form-horizontal .control-group:before,
1994
+ .form-horizontal .control-group:after {
1995
+ display: table;
1996
+ content: "";
1997
+ line-height: 0;
1998
+ }
1999
+ .form-horizontal .control-group:after {
2000
+ clear: both;
2001
+ }
2002
+ .form-horizontal .control-label {
2003
+ float: left;
2004
+ width: 160px;
2005
+ padding-top: 5px;
2006
+ text-align: right;
2007
+ }
2008
+ .form-horizontal .controls {
2009
+ *display: inline-block;
2010
+ *padding-left: 20px;
2011
+ margin-left: 180px;
2012
+ *margin-left: 0;
2013
+ }
2014
+ .form-horizontal .controls:first-child {
2015
+ *padding-left: 180px;
2016
+ }
2017
+ .form-horizontal .help-block {
2018
+ margin-bottom: 0;
2019
+ }
2020
+ .form-horizontal input + .help-block,
2021
+ .form-horizontal select + .help-block,
2022
+ .form-horizontal textarea + .help-block,
2023
+ .form-horizontal .uneditable-input + .help-block,
2024
+ .form-horizontal .input-prepend + .help-block,
2025
+ .form-horizontal .input-append + .help-block {
2026
+ margin-top: 10px;
2027
+ }
2028
+ .form-horizontal .form-actions {
2029
+ padding-left: 180px;
2030
+ }
2031
+ .btn {
2032
+ display: inline-block;
2033
+ *display: inline;
2034
+ /* IE7 inline-block hack */
2035
+
2036
+ *zoom: 1;
2037
+ padding: 4px 12px;
2038
+ margin-bottom: 0;
2039
+ font-size: 14px;
2040
+ line-height: 20px;
2041
+ text-align: center;
2042
+ vertical-align: middle;
2043
+ cursor: pointer;
2044
+ color: #333333;
2045
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
2046
+ background-color: #f5f5f5;
2047
+ background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
2048
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
2049
+ background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
2050
+ background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
2051
+ background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
2052
+ background-repeat: repeat-x;
2053
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
2054
+ border-color: #e6e6e6 #e6e6e6 #bfbfbf;
2055
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2056
+ *background-color: #e6e6e6;
2057
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2058
+
2059
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2060
+ border: 1px solid #cccccc;
2061
+ *border: 0;
2062
+ border-bottom-color: #b3b3b3;
2063
+ -webkit-border-radius: 4px;
2064
+ -moz-border-radius: 4px;
2065
+ border-radius: 4px;
2066
+ *margin-left: .3em;
2067
+ -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2068
+ -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2069
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2070
+ }
2071
+ .btn:hover,
2072
+ .btn:focus,
2073
+ .btn:active,
2074
+ .btn.active,
2075
+ .btn.disabled,
2076
+ .btn[disabled] {
2077
+ color: #333333;
2078
+ background-color: #e6e6e6;
2079
+ *background-color: #d9d9d9;
2080
+ }
2081
+ .btn:active,
2082
+ .btn.active {
2083
+ background-color: #cccccc \9;
2084
+ }
2085
+ .btn:first-child {
2086
+ *margin-left: 0;
2087
+ }
2088
+ .btn:hover,
2089
+ .btn:focus {
2090
+ color: #333333;
2091
+ text-decoration: none;
2092
+ background-position: 0 -15px;
2093
+ -webkit-transition: background-position 0.1s linear;
2094
+ -moz-transition: background-position 0.1s linear;
2095
+ -o-transition: background-position 0.1s linear;
2096
+ transition: background-position 0.1s linear;
2097
+ }
2098
+ .btn:focus {
2099
+ outline: thin dotted #333;
2100
+ outline: 5px auto -webkit-focus-ring-color;
2101
+ outline-offset: -2px;
2102
+ }
2103
+ .btn.active,
2104
+ .btn:active {
2105
+ background-image: none;
2106
+ outline: 0;
2107
+ -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2108
+ -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2109
+ box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2110
+ }
2111
+ .btn.disabled,
2112
+ .btn[disabled] {
2113
+ cursor: default;
2114
+ background-image: none;
2115
+ opacity: 0.65;
2116
+ filter: alpha(opacity=65);
2117
+ -webkit-box-shadow: none;
2118
+ -moz-box-shadow: none;
2119
+ box-shadow: none;
2120
+ }
2121
+ .btn-large {
2122
+ padding: 11px 19px;
2123
+ font-size: 17.5px;
2124
+ -webkit-border-radius: 6px;
2125
+ -moz-border-radius: 6px;
2126
+ border-radius: 6px;
2127
+ }
2128
+ .btn-large [class^="icon-"],
2129
+ .btn-large [class*=" icon-"] {
2130
+ margin-top: 4px;
2131
+ }
2132
+ .btn-small {
2133
+ padding: 2px 10px;
2134
+ font-size: 11.9px;
2135
+ -webkit-border-radius: 3px;
2136
+ -moz-border-radius: 3px;
2137
+ border-radius: 3px;
2138
+ }
2139
+ .btn-small [class^="icon-"],
2140
+ .btn-small [class*=" icon-"] {
2141
+ margin-top: 0;
2142
+ }
2143
+ .btn-mini [class^="icon-"],
2144
+ .btn-mini [class*=" icon-"] {
2145
+ margin-top: -1px;
2146
+ }
2147
+ .btn-mini {
2148
+ padding: 0 6px;
2149
+ font-size: 10.5px;
2150
+ -webkit-border-radius: 3px;
2151
+ -moz-border-radius: 3px;
2152
+ border-radius: 3px;
2153
+ }
2154
+ .btn-block {
2155
+ display: block;
2156
+ width: 100%;
2157
+ padding-left: 0;
2158
+ padding-right: 0;
2159
+ -webkit-box-sizing: border-box;
2160
+ -moz-box-sizing: border-box;
2161
+ box-sizing: border-box;
2162
+ }
2163
+ .btn-block + .btn-block {
2164
+ margin-top: 5px;
2165
+ }
2166
+ input[type="submit"].btn-block,
2167
+ input[type="reset"].btn-block,
2168
+ input[type="button"].btn-block {
2169
+ width: 100%;
2170
+ }
2171
+ .btn-primary.active,
2172
+ .btn-warning.active,
2173
+ .btn-danger.active,
2174
+ .btn-success.active,
2175
+ .btn-info.active,
2176
+ .btn-inverse.active {
2177
+ color: rgba(255, 255, 255, 0.75);
2178
+ }
2179
+ .btn-primary {
2180
+ color: #ffffff;
2181
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2182
+ background-color: #006dcc;
2183
+ background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
2184
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
2185
+ background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
2186
+ background-image: -o-linear-gradient(top, #0088cc, #0044cc);
2187
+ background-image: linear-gradient(to bottom, #0088cc, #0044cc);
2188
+ background-repeat: repeat-x;
2189
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
2190
+ border-color: #0044cc #0044cc #002a80;
2191
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2192
+ *background-color: #0044cc;
2193
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2194
+
2195
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2196
+ }
2197
+ .btn-primary:hover,
2198
+ .btn-primary:focus,
2199
+ .btn-primary:active,
2200
+ .btn-primary.active,
2201
+ .btn-primary.disabled,
2202
+ .btn-primary[disabled] {
2203
+ color: #ffffff;
2204
+ background-color: #0044cc;
2205
+ *background-color: #003bb3;
2206
+ }
2207
+ .btn-primary:active,
2208
+ .btn-primary.active {
2209
+ background-color: #003399 \9;
2210
+ }
2211
+ .btn-warning {
2212
+ color: #ffffff;
2213
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2214
+ background-color: #faa732;
2215
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
2216
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
2217
+ background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
2218
+ background-image: -o-linear-gradient(top, #fbb450, #f89406);
2219
+ background-image: linear-gradient(to bottom, #fbb450, #f89406);
2220
+ background-repeat: repeat-x;
2221
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
2222
+ border-color: #f89406 #f89406 #ad6704;
2223
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2224
+ *background-color: #f89406;
2225
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2226
+
2227
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2228
+ }
2229
+ .btn-warning:hover,
2230
+ .btn-warning:focus,
2231
+ .btn-warning:active,
2232
+ .btn-warning.active,
2233
+ .btn-warning.disabled,
2234
+ .btn-warning[disabled] {
2235
+ color: #ffffff;
2236
+ background-color: #f89406;
2237
+ *background-color: #df8505;
2238
+ }
2239
+ .btn-warning:active,
2240
+ .btn-warning.active {
2241
+ background-color: #c67605 \9;
2242
+ }
2243
+ .btn-danger {
2244
+ color: #ffffff;
2245
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2246
+ background-color: #da4f49;
2247
+ background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
2248
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
2249
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
2250
+ background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
2251
+ background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
2252
+ background-repeat: repeat-x;
2253
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
2254
+ border-color: #bd362f #bd362f #802420;
2255
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2256
+ *background-color: #bd362f;
2257
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2258
+
2259
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2260
+ }
2261
+ .btn-danger:hover,
2262
+ .btn-danger:focus,
2263
+ .btn-danger:active,
2264
+ .btn-danger.active,
2265
+ .btn-danger.disabled,
2266
+ .btn-danger[disabled] {
2267
+ color: #ffffff;
2268
+ background-color: #bd362f;
2269
+ *background-color: #a9302a;
2270
+ }
2271
+ .btn-danger:active,
2272
+ .btn-danger.active {
2273
+ background-color: #942a25 \9;
2274
+ }
2275
+ .btn-success {
2276
+ color: #ffffff;
2277
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2278
+ background-color: #5bb75b;
2279
+ background-image: -moz-linear-gradient(top, #62c462, #51a351);
2280
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
2281
+ background-image: -webkit-linear-gradient(top, #62c462, #51a351);
2282
+ background-image: -o-linear-gradient(top, #62c462, #51a351);
2283
+ background-image: linear-gradient(to bottom, #62c462, #51a351);
2284
+ background-repeat: repeat-x;
2285
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
2286
+ border-color: #51a351 #51a351 #387038;
2287
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2288
+ *background-color: #51a351;
2289
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2290
+
2291
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2292
+ }
2293
+ .btn-success:hover,
2294
+ .btn-success:focus,
2295
+ .btn-success:active,
2296
+ .btn-success.active,
2297
+ .btn-success.disabled,
2298
+ .btn-success[disabled] {
2299
+ color: #ffffff;
2300
+ background-color: #51a351;
2301
+ *background-color: #499249;
2302
+ }
2303
+ .btn-success:active,
2304
+ .btn-success.active {
2305
+ background-color: #408140 \9;
2306
+ }
2307
+ .btn-info {
2308
+ color: #ffffff;
2309
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2310
+ background-color: #49afcd;
2311
+ background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
2312
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
2313
+ background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
2314
+ background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
2315
+ background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
2316
+ background-repeat: repeat-x;
2317
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
2318
+ border-color: #2f96b4 #2f96b4 #1f6377;
2319
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2320
+ *background-color: #2f96b4;
2321
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2322
+
2323
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2324
+ }
2325
+ .btn-info:hover,
2326
+ .btn-info:focus,
2327
+ .btn-info:active,
2328
+ .btn-info.active,
2329
+ .btn-info.disabled,
2330
+ .btn-info[disabled] {
2331
+ color: #ffffff;
2332
+ background-color: #2f96b4;
2333
+ *background-color: #2a85a0;
2334
+ }
2335
+ .btn-info:active,
2336
+ .btn-info.active {
2337
+ background-color: #24748c \9;
2338
+ }
2339
+ .btn-inverse {
2340
+ color: #ffffff;
2341
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2342
+ background-color: #363636;
2343
+ background-image: -moz-linear-gradient(top, #444444, #222222);
2344
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
2345
+ background-image: -webkit-linear-gradient(top, #444444, #222222);
2346
+ background-image: -o-linear-gradient(top, #444444, #222222);
2347
+ background-image: linear-gradient(to bottom, #444444, #222222);
2348
+ background-repeat: repeat-x;
2349
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
2350
+ border-color: #222222 #222222 #000000;
2351
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2352
+ *background-color: #222222;
2353
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2354
+
2355
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2356
+ }
2357
+ .btn-inverse:hover,
2358
+ .btn-inverse:focus,
2359
+ .btn-inverse:active,
2360
+ .btn-inverse.active,
2361
+ .btn-inverse.disabled,
2362
+ .btn-inverse[disabled] {
2363
+ color: #ffffff;
2364
+ background-color: #222222;
2365
+ *background-color: #151515;
2366
+ }
2367
+ .btn-inverse:active,
2368
+ .btn-inverse.active {
2369
+ background-color: #080808 \9;
2370
+ }
2371
+ button.btn,
2372
+ input[type="submit"].btn {
2373
+ *padding-top: 3px;
2374
+ *padding-bottom: 3px;
2375
+ }
2376
+ button.btn::-moz-focus-inner,
2377
+ input[type="submit"].btn::-moz-focus-inner {
2378
+ padding: 0;
2379
+ border: 0;
2380
+ }
2381
+ button.btn.btn-large,
2382
+ input[type="submit"].btn.btn-large {
2383
+ *padding-top: 7px;
2384
+ *padding-bottom: 7px;
2385
+ }
2386
+ button.btn.btn-small,
2387
+ input[type="submit"].btn.btn-small {
2388
+ *padding-top: 3px;
2389
+ *padding-bottom: 3px;
2390
+ }
2391
+ button.btn.btn-mini,
2392
+ input[type="submit"].btn.btn-mini {
2393
+ *padding-top: 1px;
2394
+ *padding-bottom: 1px;
2395
+ }
2396
+ .btn-link,
2397
+ .btn-link:active,
2398
+ .btn-link[disabled] {
2399
+ background-color: transparent;
2400
+ background-image: none;
2401
+ -webkit-box-shadow: none;
2402
+ -moz-box-shadow: none;
2403
+ box-shadow: none;
2404
+ }
2405
+ .btn-link {
2406
+ border-color: transparent;
2407
+ cursor: pointer;
2408
+ color: #0088cc;
2409
+ -webkit-border-radius: 0;
2410
+ -moz-border-radius: 0;
2411
+ border-radius: 0;
2412
+ }
2413
+ .btn-link:hover,
2414
+ .btn-link:focus {
2415
+ color: #005580;
2416
+ text-decoration: underline;
2417
+ background-color: transparent;
2418
+ }
2419
+ .btn-link[disabled]:hover,
2420
+ .btn-link[disabled]:focus {
2421
+ color: #333333;
2422
+ text-decoration: none;
2423
+ }
2424
+ [class^="icon-"],
2425
+ [class*=" icon-"] {
2426
+ display: inline-block;
2427
+ width: 14px;
2428
+ height: 14px;
2429
+ *margin-right: .3em;
2430
+ line-height: 14px;
2431
+ vertical-align: text-top;
2432
+ background-image: url("../img/glyphicons-halflings.png");
2433
+ background-position: 14px 14px;
2434
+ background-repeat: no-repeat;
2435
+ margin-top: 1px;
2436
+ }
2437
+ /* White icons with optional class, or on hover/focus/active states of certain elements */
2438
+ .icon-white,
2439
+ .nav-pills > .active > a > [class^="icon-"],
2440
+ .nav-pills > .active > a > [class*=" icon-"],
2441
+ .nav-list > .active > a > [class^="icon-"],
2442
+ .nav-list > .active > a > [class*=" icon-"],
2443
+ .navbar-inverse .nav > .active > a > [class^="icon-"],
2444
+ .navbar-inverse .nav > .active > a > [class*=" icon-"],
2445
+ .dropdown-menu > li > a:hover > [class^="icon-"],
2446
+ .dropdown-menu > li > a:focus > [class^="icon-"],
2447
+ .dropdown-menu > li > a:hover > [class*=" icon-"],
2448
+ .dropdown-menu > li > a:focus > [class*=" icon-"],
2449
+ .dropdown-menu > .active > a > [class^="icon-"],
2450
+ .dropdown-menu > .active > a > [class*=" icon-"],
2451
+ .dropdown-submenu:hover > a > [class^="icon-"],
2452
+ .dropdown-submenu:focus > a > [class^="icon-"],
2453
+ .dropdown-submenu:hover > a > [class*=" icon-"],
2454
+ .dropdown-submenu:focus > a > [class*=" icon-"] {
2455
+ background-image: url("../img/glyphicons-halflings-white.png");
2456
+ }
2457
+ .icon-glass {
2458
+ background-position: 0 0;
2459
+ }
2460
+ .icon-music {
2461
+ background-position: -24px 0;
2462
+ }
2463
+ .icon-search {
2464
+ background-position: -48px 0;
2465
+ }
2466
+ .icon-envelope {
2467
+ background-position: -72px 0;
2468
+ }
2469
+ .icon-heart {
2470
+ background-position: -96px 0;
2471
+ }
2472
+ .icon-star {
2473
+ background-position: -120px 0;
2474
+ }
2475
+ .icon-star-empty {
2476
+ background-position: -144px 0;
2477
+ }
2478
+ .icon-user {
2479
+ background-position: -168px 0;
2480
+ }
2481
+ .icon-film {
2482
+ background-position: -192px 0;
2483
+ }
2484
+ .icon-th-large {
2485
+ background-position: -216px 0;
2486
+ }
2487
+ .icon-th {
2488
+ background-position: -240px 0;
2489
+ }
2490
+ .icon-th-list {
2491
+ background-position: -264px 0;
2492
+ }
2493
+ .icon-ok {
2494
+ background-position: -288px 0;
2495
+ }
2496
+ .icon-remove {
2497
+ background-position: -312px 0;
2498
+ }
2499
+ .icon-zoom-in {
2500
+ background-position: -336px 0;
2501
+ }
2502
+ .icon-zoom-out {
2503
+ background-position: -360px 0;
2504
+ }
2505
+ .icon-off {
2506
+ background-position: -384px 0;
2507
+ }
2508
+ .icon-signal {
2509
+ background-position: -408px 0;
2510
+ }
2511
+ .icon-cog {
2512
+ background-position: -432px 0;
2513
+ }
2514
+ .icon-trash {
2515
+ background-position: -456px 0;
2516
+ }
2517
+ .icon-home {
2518
+ background-position: 0 -24px;
2519
+ }
2520
+ .icon-file {
2521
+ background-position: -24px -24px;
2522
+ }
2523
+ .icon-time {
2524
+ background-position: -48px -24px;
2525
+ }
2526
+ .icon-road {
2527
+ background-position: -72px -24px;
2528
+ }
2529
+ .icon-download-alt {
2530
+ background-position: -96px -24px;
2531
+ }
2532
+ .icon-download {
2533
+ background-position: -120px -24px;
2534
+ }
2535
+ .icon-upload {
2536
+ background-position: -144px -24px;
2537
+ }
2538
+ .icon-inbox {
2539
+ background-position: -168px -24px;
2540
+ }
2541
+ .icon-play-circle {
2542
+ background-position: -192px -24px;
2543
+ }
2544
+ .icon-repeat {
2545
+ background-position: -216px -24px;
2546
+ }
2547
+ .icon-refresh {
2548
+ background-position: -240px -24px;
2549
+ }
2550
+ .icon-list-alt {
2551
+ background-position: -264px -24px;
2552
+ }
2553
+ .icon-lock {
2554
+ background-position: -287px -24px;
2555
+ }
2556
+ .icon-flag {
2557
+ background-position: -312px -24px;
2558
+ }
2559
+ .icon-headphones {
2560
+ background-position: -336px -24px;
2561
+ }
2562
+ .icon-volume-off {
2563
+ background-position: -360px -24px;
2564
+ }
2565
+ .icon-volume-down {
2566
+ background-position: -384px -24px;
2567
+ }
2568
+ .icon-volume-up {
2569
+ background-position: -408px -24px;
2570
+ }
2571
+ .icon-qrcode {
2572
+ background-position: -432px -24px;
2573
+ }
2574
+ .icon-barcode {
2575
+ background-position: -456px -24px;
2576
+ }
2577
+ .icon-tag {
2578
+ background-position: 0 -48px;
2579
+ }
2580
+ .icon-tags {
2581
+ background-position: -25px -48px;
2582
+ }
2583
+ .icon-book {
2584
+ background-position: -48px -48px;
2585
+ }
2586
+ .icon-bookmark {
2587
+ background-position: -72px -48px;
2588
+ }
2589
+ .icon-print {
2590
+ background-position: -96px -48px;
2591
+ }
2592
+ .icon-camera {
2593
+ background-position: -120px -48px;
2594
+ }
2595
+ .icon-font {
2596
+ background-position: -144px -48px;
2597
+ }
2598
+ .icon-bold {
2599
+ background-position: -167px -48px;
2600
+ }
2601
+ .icon-italic {
2602
+ background-position: -192px -48px;
2603
+ }
2604
+ .icon-text-height {
2605
+ background-position: -216px -48px;
2606
+ }
2607
+ .icon-text-width {
2608
+ background-position: -240px -48px;
2609
+ }
2610
+ .icon-align-left {
2611
+ background-position: -264px -48px;
2612
+ }
2613
+ .icon-align-center {
2614
+ background-position: -288px -48px;
2615
+ }
2616
+ .icon-align-right {
2617
+ background-position: -312px -48px;
2618
+ }
2619
+ .icon-align-justify {
2620
+ background-position: -336px -48px;
2621
+ }
2622
+ .icon-list {
2623
+ background-position: -360px -48px;
2624
+ }
2625
+ .icon-indent-left {
2626
+ background-position: -384px -48px;
2627
+ }
2628
+ .icon-indent-right {
2629
+ background-position: -408px -48px;
2630
+ }
2631
+ .icon-facetime-video {
2632
+ background-position: -432px -48px;
2633
+ }
2634
+ .icon-picture {
2635
+ background-position: -456px -48px;
2636
+ }
2637
+ .icon-pencil {
2638
+ background-position: 0 -72px;
2639
+ }
2640
+ .icon-map-marker {
2641
+ background-position: -24px -72px;
2642
+ }
2643
+ .icon-adjust {
2644
+ background-position: -48px -72px;
2645
+ }
2646
+ .icon-tint {
2647
+ background-position: -72px -72px;
2648
+ }
2649
+ .icon-edit {
2650
+ background-position: -96px -72px;
2651
+ }
2652
+ .icon-share {
2653
+ background-position: -120px -72px;
2654
+ }
2655
+ .icon-check {
2656
+ background-position: -144px -72px;
2657
+ }
2658
+ .icon-move {
2659
+ background-position: -168px -72px;
2660
+ }
2661
+ .icon-step-backward {
2662
+ background-position: -192px -72px;
2663
+ }
2664
+ .icon-fast-backward {
2665
+ background-position: -216px -72px;
2666
+ }
2667
+ .icon-backward {
2668
+ background-position: -240px -72px;
2669
+ }
2670
+ .icon-play {
2671
+ background-position: -264px -72px;
2672
+ }
2673
+ .icon-pause {
2674
+ background-position: -288px -72px;
2675
+ }
2676
+ .icon-stop {
2677
+ background-position: -312px -72px;
2678
+ }
2679
+ .icon-forward {
2680
+ background-position: -336px -72px;
2681
+ }
2682
+ .icon-fast-forward {
2683
+ background-position: -360px -72px;
2684
+ }
2685
+ .icon-step-forward {
2686
+ background-position: -384px -72px;
2687
+ }
2688
+ .icon-eject {
2689
+ background-position: -408px -72px;
2690
+ }
2691
+ .icon-chevron-left {
2692
+ background-position: -432px -72px;
2693
+ }
2694
+ .icon-chevron-right {
2695
+ background-position: -456px -72px;
2696
+ }
2697
+ .icon-plus-sign {
2698
+ background-position: 0 -96px;
2699
+ }
2700
+ .icon-minus-sign {
2701
+ background-position: -24px -96px;
2702
+ }
2703
+ .icon-remove-sign {
2704
+ background-position: -48px -96px;
2705
+ }
2706
+ .icon-ok-sign {
2707
+ background-position: -72px -96px;
2708
+ }
2709
+ .icon-question-sign {
2710
+ background-position: -96px -96px;
2711
+ }
2712
+ .icon-info-sign {
2713
+ background-position: -120px -96px;
2714
+ }
2715
+ .icon-screenshot {
2716
+ background-position: -144px -96px;
2717
+ }
2718
+ .icon-remove-circle {
2719
+ background-position: -168px -96px;
2720
+ }
2721
+ .icon-ok-circle {
2722
+ background-position: -192px -96px;
2723
+ }
2724
+ .icon-ban-circle {
2725
+ background-position: -216px -96px;
2726
+ }
2727
+ .icon-arrow-left {
2728
+ background-position: -240px -96px;
2729
+ }
2730
+ .icon-arrow-right {
2731
+ background-position: -264px -96px;
2732
+ }
2733
+ .icon-arrow-up {
2734
+ background-position: -289px -96px;
2735
+ }
2736
+ .icon-arrow-down {
2737
+ background-position: -312px -96px;
2738
+ }
2739
+ .icon-share-alt {
2740
+ background-position: -336px -96px;
2741
+ }
2742
+ .icon-resize-full {
2743
+ background-position: -360px -96px;
2744
+ }
2745
+ .icon-resize-small {
2746
+ background-position: -384px -96px;
2747
+ }
2748
+ .icon-plus {
2749
+ background-position: -408px -96px;
2750
+ }
2751
+ .icon-minus {
2752
+ background-position: -433px -96px;
2753
+ }
2754
+ .icon-asterisk {
2755
+ background-position: -456px -96px;
2756
+ }
2757
+ .icon-exclamation-sign {
2758
+ background-position: 0 -120px;
2759
+ }
2760
+ .icon-gift {
2761
+ background-position: -24px -120px;
2762
+ }
2763
+ .icon-leaf {
2764
+ background-position: -48px -120px;
2765
+ }
2766
+ .icon-fire {
2767
+ background-position: -72px -120px;
2768
+ }
2769
+ .icon-eye-open {
2770
+ background-position: -96px -120px;
2771
+ }
2772
+ .icon-eye-close {
2773
+ background-position: -120px -120px;
2774
+ }
2775
+ .icon-warning-sign {
2776
+ background-position: -144px -120px;
2777
+ }
2778
+ .icon-plane {
2779
+ background-position: -168px -120px;
2780
+ }
2781
+ .icon-calendar {
2782
+ background-position: -192px -120px;
2783
+ }
2784
+ .icon-random {
2785
+ background-position: -216px -120px;
2786
+ width: 16px;
2787
+ }
2788
+ .icon-comment {
2789
+ background-position: -240px -120px;
2790
+ }
2791
+ .icon-magnet {
2792
+ background-position: -264px -120px;
2793
+ }
2794
+ .icon-chevron-up {
2795
+ background-position: -288px -120px;
2796
+ }
2797
+ .icon-chevron-down {
2798
+ background-position: -313px -119px;
2799
+ }
2800
+ .icon-retweet {
2801
+ background-position: -336px -120px;
2802
+ }
2803
+ .icon-shopping-cart {
2804
+ background-position: -360px -120px;
2805
+ }
2806
+ .icon-folder-close {
2807
+ background-position: -384px -120px;
2808
+ width: 16px;
2809
+ }
2810
+ .icon-folder-open {
2811
+ background-position: -408px -120px;
2812
+ width: 16px;
2813
+ }
2814
+ .icon-resize-vertical {
2815
+ background-position: -432px -119px;
2816
+ }
2817
+ .icon-resize-horizontal {
2818
+ background-position: -456px -118px;
2819
+ }
2820
+ .icon-hdd {
2821
+ background-position: 0 -144px;
2822
+ }
2823
+ .icon-bullhorn {
2824
+ background-position: -24px -144px;
2825
+ }
2826
+ .icon-bell {
2827
+ background-position: -48px -144px;
2828
+ }
2829
+ .icon-certificate {
2830
+ background-position: -72px -144px;
2831
+ }
2832
+ .icon-thumbs-up {
2833
+ background-position: -96px -144px;
2834
+ }
2835
+ .icon-thumbs-down {
2836
+ background-position: -120px -144px;
2837
+ }
2838
+ .icon-hand-right {
2839
+ background-position: -144px -144px;
2840
+ }
2841
+ .icon-hand-left {
2842
+ background-position: -168px -144px;
2843
+ }
2844
+ .icon-hand-up {
2845
+ background-position: -192px -144px;
2846
+ }
2847
+ .icon-hand-down {
2848
+ background-position: -216px -144px;
2849
+ }
2850
+ .icon-circle-arrow-right {
2851
+ background-position: -240px -144px;
2852
+ }
2853
+ .icon-circle-arrow-left {
2854
+ background-position: -264px -144px;
2855
+ }
2856
+ .icon-circle-arrow-up {
2857
+ background-position: -288px -144px;
2858
+ }
2859
+ .icon-circle-arrow-down {
2860
+ background-position: -312px -144px;
2861
+ }
2862
+ .icon-globe {
2863
+ background-position: -336px -144px;
2864
+ }
2865
+ .icon-wrench {
2866
+ background-position: -360px -144px;
2867
+ }
2868
+ .icon-tasks {
2869
+ background-position: -384px -144px;
2870
+ }
2871
+ .icon-filter {
2872
+ background-position: -408px -144px;
2873
+ }
2874
+ .icon-briefcase {
2875
+ background-position: -432px -144px;
2876
+ }
2877
+ .icon-fullscreen {
2878
+ background-position: -456px -144px;
2879
+ }
2880
+ .btn-group {
2881
+ position: relative;
2882
+ display: inline-block;
2883
+ *display: inline;
2884
+ /* IE7 inline-block hack */
2885
+
2886
+ *zoom: 1;
2887
+ font-size: 0;
2888
+ vertical-align: middle;
2889
+ white-space: nowrap;
2890
+ *margin-left: .3em;
2891
+ }
2892
+ .btn-group:first-child {
2893
+ *margin-left: 0;
2894
+ }
2895
+ .btn-group + .btn-group {
2896
+ margin-left: 5px;
2897
+ }
2898
+ .btn-toolbar {
2899
+ font-size: 0;
2900
+ margin-top: 10px;
2901
+ margin-bottom: 10px;
2902
+ }
2903
+ .btn-toolbar > .btn + .btn,
2904
+ .btn-toolbar > .btn-group + .btn,
2905
+ .btn-toolbar > .btn + .btn-group {
2906
+ margin-left: 5px;
2907
+ }
2908
+ .btn-group > .btn {
2909
+ position: relative;
2910
+ -webkit-border-radius: 0;
2911
+ -moz-border-radius: 0;
2912
+ border-radius: 0;
2913
+ }
2914
+ .btn-group > .btn + .btn {
2915
+ margin-left: -1px;
2916
+ }
2917
+ .btn-group > .btn,
2918
+ .btn-group > .dropdown-menu,
2919
+ .btn-group > .popover {
2920
+ font-size: 14px;
2921
+ }
2922
+ .btn-group > .btn-mini {
2923
+ font-size: 10.5px;
2924
+ }
2925
+ .btn-group > .btn-small {
2926
+ font-size: 11.9px;
2927
+ }
2928
+ .btn-group > .btn-large {
2929
+ font-size: 17.5px;
2930
+ }
2931
+ .btn-group > .btn:first-child {
2932
+ margin-left: 0;
2933
+ -webkit-border-top-left-radius: 4px;
2934
+ -moz-border-radius-topleft: 4px;
2935
+ border-top-left-radius: 4px;
2936
+ -webkit-border-bottom-left-radius: 4px;
2937
+ -moz-border-radius-bottomleft: 4px;
2938
+ border-bottom-left-radius: 4px;
2939
+ }
2940
+ .btn-group > .btn:last-child,
2941
+ .btn-group > .dropdown-toggle {
2942
+ -webkit-border-top-right-radius: 4px;
2943
+ -moz-border-radius-topright: 4px;
2944
+ border-top-right-radius: 4px;
2945
+ -webkit-border-bottom-right-radius: 4px;
2946
+ -moz-border-radius-bottomright: 4px;
2947
+ border-bottom-right-radius: 4px;
2948
+ }
2949
+ .btn-group > .btn.large:first-child {
2950
+ margin-left: 0;
2951
+ -webkit-border-top-left-radius: 6px;
2952
+ -moz-border-radius-topleft: 6px;
2953
+ border-top-left-radius: 6px;
2954
+ -webkit-border-bottom-left-radius: 6px;
2955
+ -moz-border-radius-bottomleft: 6px;
2956
+ border-bottom-left-radius: 6px;
2957
+ }
2958
+ .btn-group > .btn.large:last-child,
2959
+ .btn-group > .large.dropdown-toggle {
2960
+ -webkit-border-top-right-radius: 6px;
2961
+ -moz-border-radius-topright: 6px;
2962
+ border-top-right-radius: 6px;
2963
+ -webkit-border-bottom-right-radius: 6px;
2964
+ -moz-border-radius-bottomright: 6px;
2965
+ border-bottom-right-radius: 6px;
2966
+ }
2967
+ .btn-group > .btn:hover,
2968
+ .btn-group > .btn:focus,
2969
+ .btn-group > .btn:active,
2970
+ .btn-group > .btn.active {
2971
+ z-index: 2;
2972
+ }
2973
+ .btn-group .dropdown-toggle:active,
2974
+ .btn-group.open .dropdown-toggle {
2975
+ outline: 0;
2976
+ }
2977
+ .btn-group > .btn + .dropdown-toggle {
2978
+ padding-left: 8px;
2979
+ padding-right: 8px;
2980
+ -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2981
+ -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2982
+ box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2983
+ *padding-top: 5px;
2984
+ *padding-bottom: 5px;
2985
+ }
2986
+ .btn-group > .btn-mini + .dropdown-toggle {
2987
+ padding-left: 5px;
2988
+ padding-right: 5px;
2989
+ *padding-top: 2px;
2990
+ *padding-bottom: 2px;
2991
+ }
2992
+ .btn-group > .btn-small + .dropdown-toggle {
2993
+ *padding-top: 5px;
2994
+ *padding-bottom: 4px;
2995
+ }
2996
+ .btn-group > .btn-large + .dropdown-toggle {
2997
+ padding-left: 12px;
2998
+ padding-right: 12px;
2999
+ *padding-top: 7px;
3000
+ *padding-bottom: 7px;
3001
+ }
3002
+ .btn-group.open .dropdown-toggle {
3003
+ background-image: none;
3004
+ -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
3005
+ -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
3006
+ box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
3007
+ }
3008
+ .btn-group.open .btn.dropdown-toggle {
3009
+ background-color: #e6e6e6;
3010
+ }
3011
+ .btn-group.open .btn-primary.dropdown-toggle {
3012
+ background-color: #0044cc;
3013
+ }
3014
+ .btn-group.open .btn-warning.dropdown-toggle {
3015
+ background-color: #f89406;
3016
+ }
3017
+ .btn-group.open .btn-danger.dropdown-toggle {
3018
+ background-color: #bd362f;
3019
+ }
3020
+ .btn-group.open .btn-success.dropdown-toggle {
3021
+ background-color: #51a351;
3022
+ }
3023
+ .btn-group.open .btn-info.dropdown-toggle {
3024
+ background-color: #2f96b4;
3025
+ }
3026
+ .btn-group.open .btn-inverse.dropdown-toggle {
3027
+ background-color: #222222;
3028
+ }
3029
+ .btn .caret {
3030
+ margin-top: 8px;
3031
+ margin-left: 0;
3032
+ }
3033
+ .btn-large .caret {
3034
+ margin-top: 6px;
3035
+ }
3036
+ .btn-large .caret {
3037
+ border-left-width: 5px;
3038
+ border-right-width: 5px;
3039
+ border-top-width: 5px;
3040
+ }
3041
+ .btn-mini .caret,
3042
+ .btn-small .caret {
3043
+ margin-top: 8px;
3044
+ }
3045
+ .dropup .btn-large .caret {
3046
+ border-bottom-width: 5px;
3047
+ }
3048
+ .btn-primary .caret,
3049
+ .btn-warning .caret,
3050
+ .btn-danger .caret,
3051
+ .btn-info .caret,
3052
+ .btn-success .caret,
3053
+ .btn-inverse .caret {
3054
+ border-top-color: #ffffff;
3055
+ border-bottom-color: #ffffff;
3056
+ }
3057
+ .btn-group-vertical {
3058
+ display: inline-block;
3059
+ *display: inline;
3060
+ /* IE7 inline-block hack */
3061
+
3062
+ *zoom: 1;
3063
+ }
3064
+ .btn-group-vertical > .btn {
3065
+ display: block;
3066
+ float: none;
3067
+ max-width: 100%;
3068
+ -webkit-border-radius: 0;
3069
+ -moz-border-radius: 0;
3070
+ border-radius: 0;
3071
+ }
3072
+ .btn-group-vertical > .btn + .btn {
3073
+ margin-left: 0;
3074
+ margin-top: -1px;
3075
+ }
3076
+ .btn-group-vertical > .btn:first-child {
3077
+ -webkit-border-radius: 4px 4px 0 0;
3078
+ -moz-border-radius: 4px 4px 0 0;
3079
+ border-radius: 4px 4px 0 0;
3080
+ }
3081
+ .btn-group-vertical > .btn:last-child {
3082
+ -webkit-border-radius: 0 0 4px 4px;
3083
+ -moz-border-radius: 0 0 4px 4px;
3084
+ border-radius: 0 0 4px 4px;
3085
+ }
3086
+ .btn-group-vertical > .btn-large:first-child {
3087
+ -webkit-border-radius: 6px 6px 0 0;
3088
+ -moz-border-radius: 6px 6px 0 0;
3089
+ border-radius: 6px 6px 0 0;
3090
+ }
3091
+ .btn-group-vertical > .btn-large:last-child {
3092
+ -webkit-border-radius: 0 0 6px 6px;
3093
+ -moz-border-radius: 0 0 6px 6px;
3094
+ border-radius: 0 0 6px 6px;
3095
+ }
3096
+ .nav {
3097
+ margin-left: 0;
3098
+ margin-bottom: 20px;
3099
+ list-style: none;
3100
+ }
3101
+ .nav > li > a {
3102
+ display: block;
3103
+ }
3104
+ .nav > li > a:hover,
3105
+ .nav > li > a:focus {
3106
+ text-decoration: none;
3107
+ background-color: #eeeeee;
3108
+ }
3109
+ .nav > li > a > img {
3110
+ max-width: none;
3111
+ }
3112
+ .nav > .pull-right {
3113
+ float: right;
3114
+ }
3115
+ .nav-header {
3116
+ display: block;
3117
+ padding: 3px 15px;
3118
+ font-size: 11px;
3119
+ font-weight: bold;
3120
+ line-height: 20px;
3121
+ color: #999999;
3122
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
3123
+ text-transform: uppercase;
3124
+ }
3125
+ .nav li + .nav-header {
3126
+ margin-top: 9px;
3127
+ }
3128
+ .nav-list {
3129
+ padding-left: 15px;
3130
+ padding-right: 15px;
3131
+ margin-bottom: 0;
3132
+ }
3133
+ .nav-list > li > a,
3134
+ .nav-list .nav-header {
3135
+ margin-left: -15px;
3136
+ margin-right: -15px;
3137
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
3138
+ }
3139
+ .nav-list > li > a {
3140
+ padding: 3px 15px;
3141
+ }
3142
+ .nav-list > .active > a,
3143
+ .nav-list > .active > a:hover,
3144
+ .nav-list > .active > a:focus {
3145
+ color: #ffffff;
3146
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
3147
+ background-color: #0088cc;
3148
+ }
3149
+ .nav-list [class^="icon-"],
3150
+ .nav-list [class*=" icon-"] {
3151
+ margin-right: 2px;
3152
+ }
3153
+ .nav-list .divider {
3154
+ *width: 100%;
3155
+ height: 1px;
3156
+ margin: 9px 1px;
3157
+ *margin: -5px 0 5px;
3158
+ overflow: hidden;
3159
+ background-color: #e5e5e5;
3160
+ border-bottom: 1px solid #ffffff;
3161
+ }
3162
+ .nav-tabs,
3163
+ .nav-pills {
3164
+ *zoom: 1;
3165
+ }
3166
+ .nav-tabs:before,
3167
+ .nav-pills:before,
3168
+ .nav-tabs:after,
3169
+ .nav-pills:after {
3170
+ display: table;
3171
+ content: "";
3172
+ line-height: 0;
3173
+ }
3174
+ .nav-tabs:after,
3175
+ .nav-pills:after {
3176
+ clear: both;
3177
+ }
3178
+ .nav-tabs > li,
3179
+ .nav-pills > li {
3180
+ float: left;
3181
+ }
3182
+ .nav-tabs > li > a,
3183
+ .nav-pills > li > a {
3184
+ padding-right: 12px;
3185
+ padding-left: 12px;
3186
+ margin-right: 2px;
3187
+ line-height: 14px;
3188
+ }
3189
+ .nav-tabs {
3190
+ border-bottom: 1px solid #ddd;
3191
+ }
3192
+ .nav-tabs > li {
3193
+ margin-bottom: -1px;
3194
+ }
3195
+ .nav-tabs > li > a {
3196
+ padding-top: 8px;
3197
+ padding-bottom: 8px;
3198
+ line-height: 20px;
3199
+ border: 1px solid transparent;
3200
+ -webkit-border-radius: 4px 4px 0 0;
3201
+ -moz-border-radius: 4px 4px 0 0;
3202
+ border-radius: 4px 4px 0 0;
3203
+ }
3204
+ .nav-tabs > li > a:hover,
3205
+ .nav-tabs > li > a:focus {
3206
+ border-color: #eeeeee #eeeeee #dddddd;
3207
+ }
3208
+ .nav-tabs > .active > a,
3209
+ .nav-tabs > .active > a:hover,
3210
+ .nav-tabs > .active > a:focus {
3211
+ color: #555555;
3212
+ background-color: #ffffff;
3213
+ border: 1px solid #ddd;
3214
+ border-bottom-color: transparent;
3215
+ cursor: default;
3216
+ }
3217
+ .nav-pills > li > a {
3218
+ padding-top: 8px;
3219
+ padding-bottom: 8px;
3220
+ margin-top: 2px;
3221
+ margin-bottom: 2px;
3222
+ -webkit-border-radius: 5px;
3223
+ -moz-border-radius: 5px;
3224
+ border-radius: 5px;
3225
+ }
3226
+ .nav-pills > .active > a,
3227
+ .nav-pills > .active > a:hover,
3228
+ .nav-pills > .active > a:focus {
3229
+ color: #ffffff;
3230
+ background-color: #0088cc;
3231
+ }
3232
+ .nav-stacked > li {
3233
+ float: none;
3234
+ }
3235
+ .nav-stacked > li > a {
3236
+ margin-right: 0;
3237
+ }
3238
+ .nav-tabs.nav-stacked {
3239
+ border-bottom: 0;
3240
+ }
3241
+ .nav-tabs.nav-stacked > li > a {
3242
+ border: 1px solid #ddd;
3243
+ -webkit-border-radius: 0;
3244
+ -moz-border-radius: 0;
3245
+ border-radius: 0;
3246
+ }
3247
+ .nav-tabs.nav-stacked > li:first-child > a {
3248
+ -webkit-border-top-right-radius: 4px;
3249
+ -moz-border-radius-topright: 4px;
3250
+ border-top-right-radius: 4px;
3251
+ -webkit-border-top-left-radius: 4px;
3252
+ -moz-border-radius-topleft: 4px;
3253
+ border-top-left-radius: 4px;
3254
+ }
3255
+ .nav-tabs.nav-stacked > li:last-child > a {
3256
+ -webkit-border-bottom-right-radius: 4px;
3257
+ -moz-border-radius-bottomright: 4px;
3258
+ border-bottom-right-radius: 4px;
3259
+ -webkit-border-bottom-left-radius: 4px;
3260
+ -moz-border-radius-bottomleft: 4px;
3261
+ border-bottom-left-radius: 4px;
3262
+ }
3263
+ .nav-tabs.nav-stacked > li > a:hover,
3264
+ .nav-tabs.nav-stacked > li > a:focus {
3265
+ border-color: #ddd;
3266
+ z-index: 2;
3267
+ }
3268
+ .nav-pills.nav-stacked > li > a {
3269
+ margin-bottom: 3px;
3270
+ }
3271
+ .nav-pills.nav-stacked > li:last-child > a {
3272
+ margin-bottom: 1px;
3273
+ }
3274
+ .nav-tabs .dropdown-menu {
3275
+ -webkit-border-radius: 0 0 6px 6px;
3276
+ -moz-border-radius: 0 0 6px 6px;
3277
+ border-radius: 0 0 6px 6px;
3278
+ }
3279
+ .nav-pills .dropdown-menu {
3280
+ -webkit-border-radius: 6px;
3281
+ -moz-border-radius: 6px;
3282
+ border-radius: 6px;
3283
+ }
3284
+ .nav .dropdown-toggle .caret {
3285
+ border-top-color: #0088cc;
3286
+ border-bottom-color: #0088cc;
3287
+ margin-top: 6px;
3288
+ }
3289
+ .nav .dropdown-toggle:hover .caret,
3290
+ .nav .dropdown-toggle:focus .caret {
3291
+ border-top-color: #005580;
3292
+ border-bottom-color: #005580;
3293
+ }
3294
+ /* move down carets for tabs */
3295
+ .nav-tabs .dropdown-toggle .caret {
3296
+ margin-top: 8px;
3297
+ }
3298
+ .nav .active .dropdown-toggle .caret {
3299
+ border-top-color: #fff;
3300
+ border-bottom-color: #fff;
3301
+ }
3302
+ .nav-tabs .active .dropdown-toggle .caret {
3303
+ border-top-color: #555555;
3304
+ border-bottom-color: #555555;
3305
+ }
3306
+ .nav > .dropdown.active > a:hover,
3307
+ .nav > .dropdown.active > a:focus {
3308
+ cursor: pointer;
3309
+ }
3310
+ .nav-tabs .open .dropdown-toggle,
3311
+ .nav-pills .open .dropdown-toggle,
3312
+ .nav > li.dropdown.open.active > a:hover,
3313
+ .nav > li.dropdown.open.active > a:focus {
3314
+ color: #ffffff;
3315
+ background-color: #999999;
3316
+ border-color: #999999;
3317
+ }
3318
+ .nav li.dropdown.open .caret,
3319
+ .nav li.dropdown.open.active .caret,
3320
+ .nav li.dropdown.open a:hover .caret,
3321
+ .nav li.dropdown.open a:focus .caret {
3322
+ border-top-color: #ffffff;
3323
+ border-bottom-color: #ffffff;
3324
+ opacity: 1;
3325
+ filter: alpha(opacity=100);
3326
+ }
3327
+ .tabs-stacked .open > a:hover,
3328
+ .tabs-stacked .open > a:focus {
3329
+ border-color: #999999;
3330
+ }
3331
+ .tabbable {
3332
+ *zoom: 1;
3333
+ }
3334
+ .tabbable:before,
3335
+ .tabbable:after {
3336
+ display: table;
3337
+ content: "";
3338
+ line-height: 0;
3339
+ }
3340
+ .tabbable:after {
3341
+ clear: both;
3342
+ }
3343
+ .tab-content {
3344
+ overflow: auto;
3345
+ }
3346
+ .tabs-below > .nav-tabs,
3347
+ .tabs-right > .nav-tabs,
3348
+ .tabs-left > .nav-tabs {
3349
+ border-bottom: 0;
3350
+ }
3351
+ .tab-content > .tab-pane,
3352
+ .pill-content > .pill-pane {
3353
+ display: none;
3354
+ }
3355
+ .tab-content > .active,
3356
+ .pill-content > .active {
3357
+ display: block;
3358
+ }
3359
+ .tabs-below > .nav-tabs {
3360
+ border-top: 1px solid #ddd;
3361
+ }
3362
+ .tabs-below > .nav-tabs > li {
3363
+ margin-top: -1px;
3364
+ margin-bottom: 0;
3365
+ }
3366
+ .tabs-below > .nav-tabs > li > a {
3367
+ -webkit-border-radius: 0 0 4px 4px;
3368
+ -moz-border-radius: 0 0 4px 4px;
3369
+ border-radius: 0 0 4px 4px;
3370
+ }
3371
+ .tabs-below > .nav-tabs > li > a:hover,
3372
+ .tabs-below > .nav-tabs > li > a:focus {
3373
+ border-bottom-color: transparent;
3374
+ border-top-color: #ddd;
3375
+ }
3376
+ .tabs-below > .nav-tabs > .active > a,
3377
+ .tabs-below > .nav-tabs > .active > a:hover,
3378
+ .tabs-below > .nav-tabs > .active > a:focus {
3379
+ border-color: transparent #ddd #ddd #ddd;
3380
+ }
3381
+ .tabs-left > .nav-tabs > li,
3382
+ .tabs-right > .nav-tabs > li {
3383
+ float: none;
3384
+ }
3385
+ .tabs-left > .nav-tabs > li > a,
3386
+ .tabs-right > .nav-tabs > li > a {
3387
+ min-width: 74px;
3388
+ margin-right: 0;
3389
+ margin-bottom: 3px;
3390
+ }
3391
+ .tabs-left > .nav-tabs {
3392
+ float: left;
3393
+ margin-right: 19px;
3394
+ border-right: 1px solid #ddd;
3395
+ }
3396
+ .tabs-left > .nav-tabs > li > a {
3397
+ margin-right: -1px;
3398
+ -webkit-border-radius: 4px 0 0 4px;
3399
+ -moz-border-radius: 4px 0 0 4px;
3400
+ border-radius: 4px 0 0 4px;
3401
+ }
3402
+ .tabs-left > .nav-tabs > li > a:hover,
3403
+ .tabs-left > .nav-tabs > li > a:focus {
3404
+ border-color: #eeeeee #dddddd #eeeeee #eeeeee;
3405
+ }
3406
+ .tabs-left > .nav-tabs .active > a,
3407
+ .tabs-left > .nav-tabs .active > a:hover,
3408
+ .tabs-left > .nav-tabs .active > a:focus {
3409
+ border-color: #ddd transparent #ddd #ddd;
3410
+ *border-right-color: #ffffff;
3411
+ }
3412
+ .tabs-right > .nav-tabs {
3413
+ float: right;
3414
+ margin-left: 19px;
3415
+ border-left: 1px solid #ddd;
3416
+ }
3417
+ .tabs-right > .nav-tabs > li > a {
3418
+ margin-left: -1px;
3419
+ -webkit-border-radius: 0 4px 4px 0;
3420
+ -moz-border-radius: 0 4px 4px 0;
3421
+ border-radius: 0 4px 4px 0;
3422
+ }
3423
+ .tabs-right > .nav-tabs > li > a:hover,
3424
+ .tabs-right > .nav-tabs > li > a:focus {
3425
+ border-color: #eeeeee #eeeeee #eeeeee #dddddd;
3426
+ }
3427
+ .tabs-right > .nav-tabs .active > a,
3428
+ .tabs-right > .nav-tabs .active > a:hover,
3429
+ .tabs-right > .nav-tabs .active > a:focus {
3430
+ border-color: #ddd #ddd #ddd transparent;
3431
+ *border-left-color: #ffffff;
3432
+ }
3433
+ .nav > .disabled > a {
3434
+ color: #999999;
3435
+ }
3436
+ .nav > .disabled > a:hover,
3437
+ .nav > .disabled > a:focus {
3438
+ text-decoration: none;
3439
+ background-color: transparent;
3440
+ cursor: default;
3441
+ }
3442
+ .navbar {
3443
+ overflow: visible;
3444
+ margin-bottom: 20px;
3445
+ *position: relative;
3446
+ *z-index: 2;
3447
+ }
3448
+ .navbar-inner {
3449
+ min-height: 40px;
3450
+ padding-left: 20px;
3451
+ padding-right: 20px;
3452
+ background-color: #fafafa;
3453
+ background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
3454
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
3455
+ background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
3456
+ background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
3457
+ background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
3458
+ background-repeat: repeat-x;
3459
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
3460
+ border: 1px solid #d4d4d4;
3461
+ -webkit-border-radius: 4px;
3462
+ -moz-border-radius: 4px;
3463
+ border-radius: 4px;
3464
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
3465
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
3466
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
3467
+ *zoom: 1;
3468
+ }
3469
+ .navbar-inner:before,
3470
+ .navbar-inner:after {
3471
+ display: table;
3472
+ content: "";
3473
+ line-height: 0;
3474
+ }
3475
+ .navbar-inner:after {
3476
+ clear: both;
3477
+ }
3478
+ .navbar .container {
3479
+ width: auto;
3480
+ }
3481
+ .nav-collapse.collapse {
3482
+ height: auto;
3483
+ overflow: visible;
3484
+ }
3485
+ .navbar .brand {
3486
+ float: left;
3487
+ display: block;
3488
+ padding: 10px 20px 10px;
3489
+ margin-left: -20px;
3490
+ font-size: 20px;
3491
+ font-weight: 200;
3492
+ color: #777777;
3493
+ text-shadow: 0 1px 0 #ffffff;
3494
+ }
3495
+ .navbar .brand:hover,
3496
+ .navbar .brand:focus {
3497
+ text-decoration: none;
3498
+ }
3499
+ .navbar-text {
3500
+ margin-bottom: 0;
3501
+ line-height: 40px;
3502
+ color: #777777;
3503
+ }
3504
+ .navbar-link {
3505
+ color: #777777;
3506
+ }
3507
+ .navbar-link:hover,
3508
+ .navbar-link:focus {
3509
+ color: #333333;
3510
+ }
3511
+ .navbar .divider-vertical {
3512
+ height: 40px;
3513
+ margin: 0 9px;
3514
+ border-left: 1px solid #f2f2f2;
3515
+ border-right: 1px solid #ffffff;
3516
+ }
3517
+ .navbar .btn,
3518
+ .navbar .btn-group {
3519
+ margin-top: 5px;
3520
+ }
3521
+ .navbar .btn-group .btn,
3522
+ .navbar .input-prepend .btn,
3523
+ .navbar .input-append .btn,
3524
+ .navbar .input-prepend .btn-group,
3525
+ .navbar .input-append .btn-group {
3526
+ margin-top: 0;
3527
+ }
3528
+ .navbar-form {
3529
+ margin-bottom: 0;
3530
+ *zoom: 1;
3531
+ }
3532
+ .navbar-form:before,
3533
+ .navbar-form:after {
3534
+ display: table;
3535
+ content: "";
3536
+ line-height: 0;
3537
+ }
3538
+ .navbar-form:after {
3539
+ clear: both;
3540
+ }
3541
+ .navbar-form input,
3542
+ .navbar-form select,
3543
+ .navbar-form .radio,
3544
+ .navbar-form .checkbox {
3545
+ margin-top: 5px;
3546
+ }
3547
+ .navbar-form input,
3548
+ .navbar-form select,
3549
+ .navbar-form .btn {
3550
+ display: inline-block;
3551
+ margin-bottom: 0;
3552
+ }
3553
+ .navbar-form input[type="image"],
3554
+ .navbar-form input[type="checkbox"],
3555
+ .navbar-form input[type="radio"] {
3556
+ margin-top: 3px;
3557
+ }
3558
+ .navbar-form .input-append,
3559
+ .navbar-form .input-prepend {
3560
+ margin-top: 5px;
3561
+ white-space: nowrap;
3562
+ }
3563
+ .navbar-form .input-append input,
3564
+ .navbar-form .input-prepend input {
3565
+ margin-top: 0;
3566
+ }
3567
+ .navbar-search {
3568
+ position: relative;
3569
+ float: left;
3570
+ margin-top: 5px;
3571
+ margin-bottom: 0;
3572
+ }
3573
+ .navbar-search .search-query {
3574
+ margin-bottom: 0;
3575
+ padding: 4px 14px;
3576
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
3577
+ font-size: 13px;
3578
+ font-weight: normal;
3579
+ line-height: 1;
3580
+ -webkit-border-radius: 15px;
3581
+ -moz-border-radius: 15px;
3582
+ border-radius: 15px;
3583
+ }
3584
+ .navbar-static-top {
3585
+ position: static;
3586
+ margin-bottom: 0;
3587
+ }
3588
+ .navbar-static-top .navbar-inner {
3589
+ -webkit-border-radius: 0;
3590
+ -moz-border-radius: 0;
3591
+ border-radius: 0;
3592
+ }
3593
+ .navbar-fixed-top,
3594
+ .navbar-fixed-bottom {
3595
+ position: fixed;
3596
+ right: 0;
3597
+ left: 0;
3598
+ z-index: 1030;
3599
+ margin-bottom: 0;
3600
+ }
3601
+ .navbar-fixed-top .navbar-inner,
3602
+ .navbar-static-top .navbar-inner {
3603
+ border-width: 0 0 1px;
3604
+ }
3605
+ .navbar-fixed-bottom .navbar-inner {
3606
+ border-width: 1px 0 0;
3607
+ }
3608
+ .navbar-fixed-top .navbar-inner,
3609
+ .navbar-fixed-bottom .navbar-inner {
3610
+ padding-left: 0;
3611
+ padding-right: 0;
3612
+ -webkit-border-radius: 0;
3613
+ -moz-border-radius: 0;
3614
+ border-radius: 0;
3615
+ }
3616
+ .navbar-static-top .container,
3617
+ .navbar-fixed-top .container,
3618
+ .navbar-fixed-bottom .container {
3619
+ width: 940px;
3620
+ }
3621
+ .navbar-fixed-top {
3622
+ top: 0;
3623
+ }
3624
+ .navbar-fixed-top .navbar-inner,
3625
+ .navbar-static-top .navbar-inner {
3626
+ -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1);
3627
+ -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
3628
+ box-shadow: 0 1px 10px rgba(0,0,0,.1);
3629
+ }
3630
+ .navbar-fixed-bottom {
3631
+ bottom: 0;
3632
+ }
3633
+ .navbar-fixed-bottom .navbar-inner {
3634
+ -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
3635
+ -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
3636
+ box-shadow: 0 -1px 10px rgba(0,0,0,.1);
3637
+ }
3638
+ .navbar .nav {
3639
+ position: relative;
3640
+ left: 0;
3641
+ display: block;
3642
+ float: left;
3643
+ margin: 0 10px 0 0;
3644
+ }
3645
+ .navbar .nav.pull-right {
3646
+ float: right;
3647
+ margin-right: 0;
3648
+ }
3649
+ .navbar .nav > li {
3650
+ float: left;
3651
+ }
3652
+ .navbar .nav > li > a {
3653
+ float: none;
3654
+ padding: 10px 15px 10px;
3655
+ color: #777777;
3656
+ text-decoration: none;
3657
+ text-shadow: 0 1px 0 #ffffff;
3658
+ }
3659
+ .navbar .nav .dropdown-toggle .caret {
3660
+ margin-top: 8px;
3661
+ }
3662
+ .navbar .nav > li > a:focus,
3663
+ .navbar .nav > li > a:hover {
3664
+ background-color: transparent;
3665
+ color: #333333;
3666
+ text-decoration: none;
3667
+ }
3668
+ .navbar .nav > .active > a,
3669
+ .navbar .nav > .active > a:hover,
3670
+ .navbar .nav > .active > a:focus {
3671
+ color: #555555;
3672
+ text-decoration: none;
3673
+ background-color: #e5e5e5;
3674
+ -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
3675
+ -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
3676
+ box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
3677
+ }
3678
+ .navbar .btn-navbar {
3679
+ display: none;
3680
+ float: right;
3681
+ padding: 7px 10px;
3682
+ margin-left: 5px;
3683
+ margin-right: 5px;
3684
+ color: #ffffff;
3685
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
3686
+ background-color: #ededed;
3687
+ background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
3688
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
3689
+ background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
3690
+ background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
3691
+ background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
3692
+ background-repeat: repeat-x;
3693
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
3694
+ border-color: #e5e5e5 #e5e5e5 #bfbfbf;
3695
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
3696
+ *background-color: #e5e5e5;
3697
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
3698
+
3699
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
3700
+ -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
3701
+ -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
3702
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
3703
+ }
3704
+ .navbar .btn-navbar:hover,
3705
+ .navbar .btn-navbar:focus,
3706
+ .navbar .btn-navbar:active,
3707
+ .navbar .btn-navbar.active,
3708
+ .navbar .btn-navbar.disabled,
3709
+ .navbar .btn-navbar[disabled] {
3710
+ color: #ffffff;
3711
+ background-color: #e5e5e5;
3712
+ *background-color: #d9d9d9;
3713
+ }
3714
+ .navbar .btn-navbar:active,
3715
+ .navbar .btn-navbar.active {
3716
+ background-color: #cccccc \9;
3717
+ }
3718
+ .navbar .btn-navbar .icon-bar {
3719
+ display: block;
3720
+ width: 18px;
3721
+ height: 2px;
3722
+ background-color: #f5f5f5;
3723
+ -webkit-border-radius: 1px;
3724
+ -moz-border-radius: 1px;
3725
+ border-radius: 1px;
3726
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
3727
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
3728
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
3729
+ }
3730
+ .btn-navbar .icon-bar + .icon-bar {
3731
+ margin-top: 3px;
3732
+ }
3733
+ .navbar .nav > li > .dropdown-menu:before {
3734
+ content: '';
3735
+ display: inline-block;
3736
+ border-left: 7px solid transparent;
3737
+ border-right: 7px solid transparent;
3738
+ border-bottom: 7px solid #ccc;
3739
+ border-bottom-color: rgba(0, 0, 0, 0.2);
3740
+ position: absolute;
3741
+ top: -7px;
3742
+ left: 9px;
3743
+ }
3744
+ .navbar .nav > li > .dropdown-menu:after {
3745
+ content: '';
3746
+ display: inline-block;
3747
+ border-left: 6px solid transparent;
3748
+ border-right: 6px solid transparent;
3749
+ border-bottom: 6px solid #ffffff;
3750
+ position: absolute;
3751
+ top: -6px;
3752
+ left: 10px;
3753
+ }
3754
+ .navbar-fixed-bottom .nav > li > .dropdown-menu:before {
3755
+ border-top: 7px solid #ccc;
3756
+ border-top-color: rgba(0, 0, 0, 0.2);
3757
+ border-bottom: 0;
3758
+ bottom: -7px;
3759
+ top: auto;
3760
+ }
3761
+ .navbar-fixed-bottom .nav > li > .dropdown-menu:after {
3762
+ border-top: 6px solid #ffffff;
3763
+ border-bottom: 0;
3764
+ bottom: -6px;
3765
+ top: auto;
3766
+ }
3767
+ .navbar .nav li.dropdown > a:hover .caret,
3768
+ .navbar .nav li.dropdown > a:focus .caret {
3769
+ border-top-color: #333333;
3770
+ border-bottom-color: #333333;
3771
+ }
3772
+ .navbar .nav li.dropdown.open > .dropdown-toggle,
3773
+ .navbar .nav li.dropdown.active > .dropdown-toggle,
3774
+ .navbar .nav li.dropdown.open.active > .dropdown-toggle {
3775
+ background-color: #e5e5e5;
3776
+ color: #555555;
3777
+ }
3778
+ .navbar .nav li.dropdown > .dropdown-toggle .caret {
3779
+ border-top-color: #777777;
3780
+ border-bottom-color: #777777;
3781
+ }
3782
+ .navbar .nav li.dropdown.open > .dropdown-toggle .caret,
3783
+ .navbar .nav li.dropdown.active > .dropdown-toggle .caret,
3784
+ .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
3785
+ border-top-color: #555555;
3786
+ border-bottom-color: #555555;
3787
+ }
3788
+ .navbar .pull-right > li > .dropdown-menu,
3789
+ .navbar .nav > li > .dropdown-menu.pull-right {
3790
+ left: auto;
3791
+ right: 0;
3792
+ }
3793
+ .navbar .pull-right > li > .dropdown-menu:before,
3794
+ .navbar .nav > li > .dropdown-menu.pull-right:before {
3795
+ left: auto;
3796
+ right: 12px;
3797
+ }
3798
+ .navbar .pull-right > li > .dropdown-menu:after,
3799
+ .navbar .nav > li > .dropdown-menu.pull-right:after {
3800
+ left: auto;
3801
+ right: 13px;
3802
+ }
3803
+ .navbar .pull-right > li > .dropdown-menu .dropdown-menu,
3804
+ .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
3805
+ left: auto;
3806
+ right: 100%;
3807
+ margin-left: 0;
3808
+ margin-right: -1px;
3809
+ -webkit-border-radius: 6px 0 6px 6px;
3810
+ -moz-border-radius: 6px 0 6px 6px;
3811
+ border-radius: 6px 0 6px 6px;
3812
+ }
3813
+ .navbar-inverse .navbar-inner {
3814
+ background-color: #1b1b1b;
3815
+ background-image: -moz-linear-gradient(top, #222222, #111111);
3816
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
3817
+ background-image: -webkit-linear-gradient(top, #222222, #111111);
3818
+ background-image: -o-linear-gradient(top, #222222, #111111);
3819
+ background-image: linear-gradient(to bottom, #222222, #111111);
3820
+ background-repeat: repeat-x;
3821
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
3822
+ border-color: #252525;
3823
+ }
3824
+ .navbar-inverse .brand,
3825
+ .navbar-inverse .nav > li > a {
3826
+ color: #999999;
3827
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
3828
+ }
3829
+ .navbar-inverse .brand:hover,
3830
+ .navbar-inverse .nav > li > a:hover,
3831
+ .navbar-inverse .brand:focus,
3832
+ .navbar-inverse .nav > li > a:focus {
3833
+ color: #ffffff;
3834
+ }
3835
+ .navbar-inverse .brand {
3836
+ color: #999999;
3837
+ }
3838
+ .navbar-inverse .navbar-text {
3839
+ color: #999999;
3840
+ }
3841
+ .navbar-inverse .nav > li > a:focus,
3842
+ .navbar-inverse .nav > li > a:hover {
3843
+ background-color: transparent;
3844
+ color: #ffffff;
3845
+ }
3846
+ .navbar-inverse .nav .active > a,
3847
+ .navbar-inverse .nav .active > a:hover,
3848
+ .navbar-inverse .nav .active > a:focus {
3849
+ color: #ffffff;
3850
+ background-color: #111111;
3851
+ }
3852
+ .navbar-inverse .navbar-link {
3853
+ color: #999999;
3854
+ }
3855
+ .navbar-inverse .navbar-link:hover,
3856
+ .navbar-inverse .navbar-link:focus {
3857
+ color: #ffffff;
3858
+ }
3859
+ .navbar-inverse .divider-vertical {
3860
+ border-left-color: #111111;
3861
+ border-right-color: #222222;
3862
+ }
3863
+ .navbar-inverse .nav li.dropdown.open > .dropdown-toggle,
3864
+ .navbar-inverse .nav li.dropdown.active > .dropdown-toggle,
3865
+ .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
3866
+ background-color: #111111;
3867
+ color: #ffffff;
3868
+ }
3869
+ .navbar-inverse .nav li.dropdown > a:hover .caret,
3870
+ .navbar-inverse .nav li.dropdown > a:focus .caret {
3871
+ border-top-color: #ffffff;
3872
+ border-bottom-color: #ffffff;
3873
+ }
3874
+ .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
3875
+ border-top-color: #999999;
3876
+ border-bottom-color: #999999;
3877
+ }
3878
+ .navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,
3879
+ .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,
3880
+ .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
3881
+ border-top-color: #ffffff;
3882
+ border-bottom-color: #ffffff;
3883
+ }
3884
+ .navbar-inverse .navbar-search .search-query {
3885
+ color: #ffffff;
3886
+ background-color: #515151;
3887
+ border-color: #111111;
3888
+ -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
3889
+ -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
3890
+ box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
3891
+ -webkit-transition: none;
3892
+ -moz-transition: none;
3893
+ -o-transition: none;
3894
+ transition: none;
3895
+ }
3896
+ .navbar-inverse .navbar-search .search-query:-moz-placeholder {
3897
+ color: #cccccc;
3898
+ }
3899
+ .navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
3900
+ color: #cccccc;
3901
+ }
3902
+ .navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
3903
+ color: #cccccc;
3904
+ }
3905
+ .navbar-inverse .navbar-search .search-query:focus,
3906
+ .navbar-inverse .navbar-search .search-query.focused {
3907
+ padding: 5px 15px;
3908
+ color: #333333;
3909
+ text-shadow: 0 1px 0 #ffffff;
3910
+ background-color: #ffffff;
3911
+ border: 0;
3912
+ -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
3913
+ -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
3914
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
3915
+ outline: 0;
3916
+ }
3917
+ .navbar-inverse .btn-navbar {
3918
+ color: #ffffff;
3919
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
3920
+ background-color: #0e0e0e;
3921
+ background-image: -moz-linear-gradient(top, #151515, #040404);
3922
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
3923
+ background-image: -webkit-linear-gradient(top, #151515, #040404);
3924
+ background-image: -o-linear-gradient(top, #151515, #040404);
3925
+ background-image: linear-gradient(to bottom, #151515, #040404);
3926
+ background-repeat: repeat-x;
3927
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
3928
+ border-color: #040404 #040404 #000000;
3929
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
3930
+ *background-color: #040404;
3931
+ /* Darken IE7 buttons by default so they stand out more given they won't have borders */
3932
+
3933
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
3934
+ }
3935
+ .navbar-inverse .btn-navbar:hover,
3936
+ .navbar-inverse .btn-navbar:focus,
3937
+ .navbar-inverse .btn-navbar:active,
3938
+ .navbar-inverse .btn-navbar.active,
3939
+ .navbar-inverse .btn-navbar.disabled,
3940
+ .navbar-inverse .btn-navbar[disabled] {
3941
+ color: #ffffff;
3942
+ background-color: #040404;
3943
+ *background-color: #000000;
3944
+ }
3945
+ .navbar-inverse .btn-navbar:active,
3946
+ .navbar-inverse .btn-navbar.active {
3947
+ background-color: #000000 \9;
3948
+ }
3949
+ .breadcrumb {
3950
+ padding: 8px 15px;
3951
+ margin: 0 0 20px;
3952
+ list-style: none;
3953
+ background-color: #f5f5f5;
3954
+ -webkit-border-radius: 4px;
3955
+ -moz-border-radius: 4px;
3956
+ border-radius: 4px;
3957
+ }
3958
+ .breadcrumb > li {
3959
+ display: inline-block;
3960
+ *display: inline;
3961
+ /* IE7 inline-block hack */
3962
+
3963
+ *zoom: 1;
3964
+ text-shadow: 0 1px 0 #ffffff;
3965
+ }
3966
+ .breadcrumb > li > .divider {
3967
+ padding: 0 5px;
3968
+ color: #ccc;
3969
+ }
3970
+ .breadcrumb > .active {
3971
+ color: #999999;
3972
+ }
3973
+ .pagination {
3974
+ margin: 20px 0;
3975
+ }
3976
+ .pagination ul {
3977
+ display: inline-block;
3978
+ *display: inline;
3979
+ /* IE7 inline-block hack */
3980
+
3981
+ *zoom: 1;
3982
+ margin-left: 0;
3983
+ margin-bottom: 0;
3984
+ -webkit-border-radius: 4px;
3985
+ -moz-border-radius: 4px;
3986
+ border-radius: 4px;
3987
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
3988
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
3989
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
3990
+ }
3991
+ .pagination ul > li {
3992
+ display: inline;
3993
+ }
3994
+ .pagination ul > li > a,
3995
+ .pagination ul > li > span {
3996
+ float: left;
3997
+ padding: 4px 12px;
3998
+ line-height: 20px;
3999
+ text-decoration: none;
4000
+ background-color: #ffffff;
4001
+ border: 1px solid #dddddd;
4002
+ border-left-width: 0;
4003
+ }
4004
+ .pagination ul > li > a:hover,
4005
+ .pagination ul > li > a:focus,
4006
+ .pagination ul > .active > a,
4007
+ .pagination ul > .active > span {
4008
+ background-color: #f5f5f5;
4009
+ }
4010
+ .pagination ul > .active > a,
4011
+ .pagination ul > .active > span {
4012
+ color: #999999;
4013
+ cursor: default;
4014
+ }
4015
+ .pagination ul > .disabled > span,
4016
+ .pagination ul > .disabled > a,
4017
+ .pagination ul > .disabled > a:hover,
4018
+ .pagination ul > .disabled > a:focus {
4019
+ color: #999999;
4020
+ background-color: transparent;
4021
+ cursor: default;
4022
+ }
4023
+ .pagination ul > li:first-child > a,
4024
+ .pagination ul > li:first-child > span {
4025
+ border-left-width: 1px;
4026
+ -webkit-border-top-left-radius: 4px;
4027
+ -moz-border-radius-topleft: 4px;
4028
+ border-top-left-radius: 4px;
4029
+ -webkit-border-bottom-left-radius: 4px;
4030
+ -moz-border-radius-bottomleft: 4px;
4031
+ border-bottom-left-radius: 4px;
4032
+ }
4033
+ .pagination ul > li:last-child > a,
4034
+ .pagination ul > li:last-child > span {
4035
+ -webkit-border-top-right-radius: 4px;
4036
+ -moz-border-radius-topright: 4px;
4037
+ border-top-right-radius: 4px;
4038
+ -webkit-border-bottom-right-radius: 4px;
4039
+ -moz-border-radius-bottomright: 4px;
4040
+ border-bottom-right-radius: 4px;
4041
+ }
4042
+ .pagination-centered {
4043
+ text-align: center;
4044
+ }
4045
+ .pagination-right {
4046
+ text-align: right;
4047
+ }
4048
+ .pagination-large ul > li > a,
4049
+ .pagination-large ul > li > span {
4050
+ padding: 11px 19px;
4051
+ font-size: 17.5px;
4052
+ }
4053
+ .pagination-large ul > li:first-child > a,
4054
+ .pagination-large ul > li:first-child > span {
4055
+ -webkit-border-top-left-radius: 6px;
4056
+ -moz-border-radius-topleft: 6px;
4057
+ border-top-left-radius: 6px;
4058
+ -webkit-border-bottom-left-radius: 6px;
4059
+ -moz-border-radius-bottomleft: 6px;
4060
+ border-bottom-left-radius: 6px;
4061
+ }
4062
+ .pagination-large ul > li:last-child > a,
4063
+ .pagination-large ul > li:last-child > span {
4064
+ -webkit-border-top-right-radius: 6px;
4065
+ -moz-border-radius-topright: 6px;
4066
+ border-top-right-radius: 6px;
4067
+ -webkit-border-bottom-right-radius: 6px;
4068
+ -moz-border-radius-bottomright: 6px;
4069
+ border-bottom-right-radius: 6px;
4070
+ }
4071
+ .pagination-mini ul > li:first-child > a,
4072
+ .pagination-small ul > li:first-child > a,
4073
+ .pagination-mini ul > li:first-child > span,
4074
+ .pagination-small ul > li:first-child > span {
4075
+ -webkit-border-top-left-radius: 3px;
4076
+ -moz-border-radius-topleft: 3px;
4077
+ border-top-left-radius: 3px;
4078
+ -webkit-border-bottom-left-radius: 3px;
4079
+ -moz-border-radius-bottomleft: 3px;
4080
+ border-bottom-left-radius: 3px;
4081
+ }
4082
+ .pagination-mini ul > li:last-child > a,
4083
+ .pagination-small ul > li:last-child > a,
4084
+ .pagination-mini ul > li:last-child > span,
4085
+ .pagination-small ul > li:last-child > span {
4086
+ -webkit-border-top-right-radius: 3px;
4087
+ -moz-border-radius-topright: 3px;
4088
+ border-top-right-radius: 3px;
4089
+ -webkit-border-bottom-right-radius: 3px;
4090
+ -moz-border-radius-bottomright: 3px;
4091
+ border-bottom-right-radius: 3px;
4092
+ }
4093
+ .pagination-small ul > li > a,
4094
+ .pagination-small ul > li > span {
4095
+ padding: 2px 10px;
4096
+ font-size: 11.9px;
4097
+ }
4098
+ .pagination-mini ul > li > a,
4099
+ .pagination-mini ul > li > span {
4100
+ padding: 0 6px;
4101
+ font-size: 10.5px;
4102
+ }
4103
+ .pager {
4104
+ margin: 20px 0;
4105
+ list-style: none;
4106
+ text-align: center;
4107
+ *zoom: 1;
4108
+ }
4109
+ .pager:before,
4110
+ .pager:after {
4111
+ display: table;
4112
+ content: "";
4113
+ line-height: 0;
4114
+ }
4115
+ .pager:after {
4116
+ clear: both;
4117
+ }
4118
+ .pager li {
4119
+ display: inline;
4120
+ }
4121
+ .pager li > a,
4122
+ .pager li > span {
4123
+ display: inline-block;
4124
+ padding: 5px 14px;
4125
+ background-color: #fff;
4126
+ border: 1px solid #ddd;
4127
+ -webkit-border-radius: 15px;
4128
+ -moz-border-radius: 15px;
4129
+ border-radius: 15px;
4130
+ }
4131
+ .pager li > a:hover,
4132
+ .pager li > a:focus {
4133
+ text-decoration: none;
4134
+ background-color: #f5f5f5;
4135
+ }
4136
+ .pager .next > a,
4137
+ .pager .next > span {
4138
+ float: right;
4139
+ }
4140
+ .pager .previous > a,
4141
+ .pager .previous > span {
4142
+ float: left;
4143
+ }
4144
+ .pager .disabled > a,
4145
+ .pager .disabled > a:hover,
4146
+ .pager .disabled > a:focus,
4147
+ .pager .disabled > span {
4148
+ color: #999999;
4149
+ background-color: #fff;
4150
+ cursor: default;
4151
+ }
4152
+ .thumbnails {
4153
+ margin-left: -20px;
4154
+ list-style: none;
4155
+ *zoom: 1;
4156
+ }
4157
+ .thumbnails:before,
4158
+ .thumbnails:after {
4159
+ display: table;
4160
+ content: "";
4161
+ line-height: 0;
4162
+ }
4163
+ .thumbnails:after {
4164
+ clear: both;
4165
+ }
4166
+ .row-fluid .thumbnails {
4167
+ margin-left: 0;
4168
+ }
4169
+ .thumbnails > li {
4170
+ float: left;
4171
+ margin-bottom: 20px;
4172
+ margin-left: 20px;
4173
+ }
4174
+ .thumbnail {
4175
+ display: block;
4176
+ padding: 4px;
4177
+ line-height: 20px;
4178
+ border: 1px solid #ddd;
4179
+ -webkit-border-radius: 4px;
4180
+ -moz-border-radius: 4px;
4181
+ border-radius: 4px;
4182
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
4183
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
4184
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
4185
+ -webkit-transition: all 0.2s ease-in-out;
4186
+ -moz-transition: all 0.2s ease-in-out;
4187
+ -o-transition: all 0.2s ease-in-out;
4188
+ transition: all 0.2s ease-in-out;
4189
+ }
4190
+ a.thumbnail:hover,
4191
+ a.thumbnail:focus {
4192
+ border-color: #0088cc;
4193
+ -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
4194
+ -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
4195
+ box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
4196
+ }
4197
+ .thumbnail > img {
4198
+ display: block;
4199
+ max-width: 100%;
4200
+ margin-left: auto;
4201
+ margin-right: auto;
4202
+ }
4203
+ .thumbnail .caption {
4204
+ padding: 9px;
4205
+ color: #555555;
4206
+ }
4207
+ .alert {
4208
+ padding: 8px 35px 8px 14px;
4209
+ margin-bottom: 20px;
4210
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
4211
+ background-color: #fcf8e3;
4212
+ border: 1px solid #fbeed5;
4213
+ -webkit-border-radius: 4px;
4214
+ -moz-border-radius: 4px;
4215
+ border-radius: 4px;
4216
+ }
4217
+ .alert,
4218
+ .alert h4 {
4219
+ color: #c09853;
4220
+ }
4221
+ .alert h4 {
4222
+ margin: 0;
4223
+ }
4224
+ .alert .close {
4225
+ position: relative;
4226
+ top: -2px;
4227
+ right: -21px;
4228
+ line-height: 20px;
4229
+ }
4230
+ .alert-success {
4231
+ background-color: #dff0d8;
4232
+ border-color: #d6e9c6;
4233
+ color: #468847;
4234
+ }
4235
+ .alert-success h4 {
4236
+ color: #468847;
4237
+ }
4238
+ .alert-danger,
4239
+ .alert-error {
4240
+ background-color: #f2dede;
4241
+ border-color: #eed3d7;
4242
+ color: #b94a48;
4243
+ }
4244
+ .alert-danger h4,
4245
+ .alert-error h4 {
4246
+ color: #b94a48;
4247
+ }
4248
+ .alert-info {
4249
+ background-color: #d9edf7;
4250
+ border-color: #bce8f1;
4251
+ color: #3a87ad;
4252
+ }
4253
+ .alert-info h4 {
4254
+ color: #3a87ad;
4255
+ }
4256
+ .alert-block {
4257
+ padding-top: 14px;
4258
+ padding-bottom: 14px;
4259
+ }
4260
+ .alert-block > p,
4261
+ .alert-block > ul {
4262
+ margin-bottom: 0;
4263
+ }
4264
+ .alert-block p + p {
4265
+ margin-top: 5px;
4266
+ }
4267
+ @-webkit-keyframes progress-bar-stripes {
4268
+ from {
4269
+ background-position: 40px 0;
4270
+ }
4271
+ to {
4272
+ background-position: 0 0;
4273
+ }
4274
+ }
4275
+ @-moz-keyframes progress-bar-stripes {
4276
+ from {
4277
+ background-position: 40px 0;
4278
+ }
4279
+ to {
4280
+ background-position: 0 0;
4281
+ }
4282
+ }
4283
+ @-ms-keyframes progress-bar-stripes {
4284
+ from {
4285
+ background-position: 40px 0;
4286
+ }
4287
+ to {
4288
+ background-position: 0 0;
4289
+ }
4290
+ }
4291
+ @-o-keyframes progress-bar-stripes {
4292
+ from {
4293
+ background-position: 0 0;
4294
+ }
4295
+ to {
4296
+ background-position: 40px 0;
4297
+ }
4298
+ }
4299
+ @keyframes progress-bar-stripes {
4300
+ from {
4301
+ background-position: 40px 0;
4302
+ }
4303
+ to {
4304
+ background-position: 0 0;
4305
+ }
4306
+ }
4307
+ .progress {
4308
+ overflow: hidden;
4309
+ height: 20px;
4310
+ margin-bottom: 20px;
4311
+ background-color: #f7f7f7;
4312
+ background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
4313
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
4314
+ background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
4315
+ background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
4316
+ background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);
4317
+ background-repeat: repeat-x;
4318
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
4319
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4320
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4321
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4322
+ -webkit-border-radius: 4px;
4323
+ -moz-border-radius: 4px;
4324
+ border-radius: 4px;
4325
+ }
4326
+ .progress .bar {
4327
+ width: 0%;
4328
+ height: 100%;
4329
+ color: #ffffff;
4330
+ float: left;
4331
+ font-size: 12px;
4332
+ text-align: center;
4333
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
4334
+ background-color: #0e90d2;
4335
+ background-image: -moz-linear-gradient(top, #149bdf, #0480be);
4336
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
4337
+ background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
4338
+ background-image: -o-linear-gradient(top, #149bdf, #0480be);
4339
+ background-image: linear-gradient(to bottom, #149bdf, #0480be);
4340
+ background-repeat: repeat-x;
4341
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
4342
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4343
+ -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4344
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4345
+ -webkit-box-sizing: border-box;
4346
+ -moz-box-sizing: border-box;
4347
+ box-sizing: border-box;
4348
+ -webkit-transition: width 0.6s ease;
4349
+ -moz-transition: width 0.6s ease;
4350
+ -o-transition: width 0.6s ease;
4351
+ transition: width 0.6s ease;
4352
+ }
4353
+ .progress .bar + .bar {
4354
+ -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
4355
+ -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
4356
+ box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
4357
+ }
4358
+ .progress-striped .bar {
4359
+ background-color: #149bdf;
4360
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4361
+ 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);
4362
+ background-image: -moz-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);
4363
+ background-image: -o-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);
4364
+ 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);
4365
+ -webkit-background-size: 40px 40px;
4366
+ -moz-background-size: 40px 40px;
4367
+ -o-background-size: 40px 40px;
4368
+ background-size: 40px 40px;
4369
+ }
4370
+ .progress.active .bar {
4371
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
4372
+ -moz-animation: progress-bar-stripes 2s linear infinite;
4373
+ -ms-animation: progress-bar-stripes 2s linear infinite;
4374
+ -o-animation: progress-bar-stripes 2s linear infinite;
4375
+ animation: progress-bar-stripes 2s linear infinite;
4376
+ }
4377
+ .progress-danger .bar,
4378
+ .progress .bar-danger {
4379
+ background-color: #dd514c;
4380
+ background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
4381
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));
4382
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
4383
+ background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
4384
+ background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);
4385
+ background-repeat: repeat-x;
4386
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);
4387
+ }
4388
+ .progress-danger.progress-striped .bar,
4389
+ .progress-striped .bar-danger {
4390
+ background-color: #ee5f5b;
4391
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4392
+ 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);
4393
+ background-image: -moz-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);
4394
+ background-image: -o-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);
4395
+ 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);
4396
+ }
4397
+ .progress-success .bar,
4398
+ .progress .bar-success {
4399
+ background-color: #5eb95e;
4400
+ background-image: -moz-linear-gradient(top, #62c462, #57a957);
4401
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));
4402
+ background-image: -webkit-linear-gradient(top, #62c462, #57a957);
4403
+ background-image: -o-linear-gradient(top, #62c462, #57a957);
4404
+ background-image: linear-gradient(to bottom, #62c462, #57a957);
4405
+ background-repeat: repeat-x;
4406
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);
4407
+ }
4408
+ .progress-success.progress-striped .bar,
4409
+ .progress-striped .bar-success {
4410
+ background-color: #62c462;
4411
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4412
+ 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);
4413
+ background-image: -moz-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);
4414
+ background-image: -o-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);
4415
+ 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);
4416
+ }
4417
+ .progress-info .bar,
4418
+ .progress .bar-info {
4419
+ background-color: #4bb1cf;
4420
+ background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
4421
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));
4422
+ background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
4423
+ background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
4424
+ background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
4425
+ background-repeat: repeat-x;
4426
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);
4427
+ }
4428
+ .progress-info.progress-striped .bar,
4429
+ .progress-striped .bar-info {
4430
+ background-color: #5bc0de;
4431
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4432
+ 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);
4433
+ background-image: -moz-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);
4434
+ background-image: -o-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);
4435
+ 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);
4436
+ }
4437
+ .progress-warning .bar,
4438
+ .progress .bar-warning {
4439
+ background-color: #faa732;
4440
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
4441
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
4442
+ background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
4443
+ background-image: -o-linear-gradient(top, #fbb450, #f89406);
4444
+ background-image: linear-gradient(to bottom, #fbb450, #f89406);
4445
+ background-repeat: repeat-x;
4446
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
4447
+ }
4448
+ .progress-warning.progress-striped .bar,
4449
+ .progress-striped .bar-warning {
4450
+ background-color: #fbb450;
4451
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4452
+ 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);
4453
+ background-image: -moz-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);
4454
+ background-image: -o-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);
4455
+ 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);
4456
+ }
4457
+ .hero-unit {
4458
+ padding: 60px;
4459
+ margin-bottom: 30px;
4460
+ font-size: 18px;
4461
+ font-weight: 200;
4462
+ line-height: 30px;
4463
+ color: inherit;
4464
+ background-color: #eeeeee;
4465
+ -webkit-border-radius: 6px;
4466
+ -moz-border-radius: 6px;
4467
+ border-radius: 6px;
4468
+ }
4469
+ .hero-unit h1 {
4470
+ margin-bottom: 0;
4471
+ font-size: 60px;
4472
+ line-height: 1;
4473
+ color: inherit;
4474
+ letter-spacing: -1px;
4475
+ }
4476
+ .hero-unit li {
4477
+ line-height: 30px;
4478
+ }
4479
+ .tooltip {
4480
+ position: absolute;
4481
+ z-index: 1030;
4482
+ display: block;
4483
+ visibility: visible;
4484
+ font-size: 11px;
4485
+ line-height: 1.4;
4486
+ opacity: 0;
4487
+ filter: alpha(opacity=0);
4488
+ }
4489
+ .tooltip.in {
4490
+ opacity: 0.8;
4491
+ filter: alpha(opacity=80);
4492
+ }
4493
+ .tooltip.top {
4494
+ margin-top: -3px;
4495
+ padding: 5px 0;
4496
+ }
4497
+ .tooltip.right {
4498
+ margin-left: 3px;
4499
+ padding: 0 5px;
4500
+ }
4501
+ .tooltip.bottom {
4502
+ margin-top: 3px;
4503
+ padding: 5px 0;
4504
+ }
4505
+ .tooltip.left {
4506
+ margin-left: -3px;
4507
+ padding: 0 5px;
4508
+ }
4509
+ .tooltip-inner {
4510
+ max-width: 200px;
4511
+ padding: 8px;
4512
+ color: #ffffff;
4513
+ text-align: center;
4514
+ text-decoration: none;
4515
+ background-color: #000000;
4516
+ -webkit-border-radius: 4px;
4517
+ -moz-border-radius: 4px;
4518
+ border-radius: 4px;
4519
+ }
4520
+ .tooltip-arrow {
4521
+ position: absolute;
4522
+ width: 0;
4523
+ height: 0;
4524
+ border-color: transparent;
4525
+ border-style: solid;
4526
+ }
4527
+ .tooltip.top .tooltip-arrow {
4528
+ bottom: 0;
4529
+ left: 50%;
4530
+ margin-left: -5px;
4531
+ border-width: 5px 5px 0;
4532
+ border-top-color: #000000;
4533
+ }
4534
+ .tooltip.right .tooltip-arrow {
4535
+ top: 50%;
4536
+ left: 0;
4537
+ margin-top: -5px;
4538
+ border-width: 5px 5px 5px 0;
4539
+ border-right-color: #000000;
4540
+ }
4541
+ .tooltip.left .tooltip-arrow {
4542
+ top: 50%;
4543
+ right: 0;
4544
+ margin-top: -5px;
4545
+ border-width: 5px 0 5px 5px;
4546
+ border-left-color: #000000;
4547
+ }
4548
+ .tooltip.bottom .tooltip-arrow {
4549
+ top: 0;
4550
+ left: 50%;
4551
+ margin-left: -5px;
4552
+ border-width: 0 5px 5px;
4553
+ border-bottom-color: #000000;
4554
+ }
4555
+ .popover {
4556
+ position: absolute;
4557
+ top: 0;
4558
+ left: 0;
4559
+ z-index: 1010;
4560
+ display: none;
4561
+ max-width: 276px;
4562
+ padding: 1px;
4563
+ text-align: left;
4564
+ background-color: #ffffff;
4565
+ -webkit-background-clip: padding-box;
4566
+ -moz-background-clip: padding;
4567
+ background-clip: padding-box;
4568
+ border: 1px solid #ccc;
4569
+ border: 1px solid rgba(0, 0, 0, 0.2);
4570
+ -webkit-border-radius: 6px;
4571
+ -moz-border-radius: 6px;
4572
+ border-radius: 6px;
4573
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4574
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4575
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4576
+ white-space: normal;
4577
+ }
4578
+ .popover.top {
4579
+ margin-top: -10px;
4580
+ }
4581
+ .popover.right {
4582
+ margin-left: 10px;
4583
+ }
4584
+ .popover.bottom {
4585
+ margin-top: 10px;
4586
+ }
4587
+ .popover.left {
4588
+ margin-left: -10px;
4589
+ }
4590
+ .popover-title {
4591
+ margin: 0;
4592
+ padding: 8px 14px;
4593
+ font-size: 14px;
4594
+ font-weight: normal;
4595
+ line-height: 18px;
4596
+ background-color: #f7f7f7;
4597
+ border-bottom: 1px solid #ebebeb;
4598
+ -webkit-border-radius: 5px 5px 0 0;
4599
+ -moz-border-radius: 5px 5px 0 0;
4600
+ border-radius: 5px 5px 0 0;
4601
+ }
4602
+ .popover-title:empty {
4603
+ display: none;
4604
+ }
4605
+ .popover-content {
4606
+ padding: 9px 14px;
4607
+ }
4608
+ .popover .arrow,
4609
+ .popover .arrow:after {
4610
+ position: absolute;
4611
+ display: block;
4612
+ width: 0;
4613
+ height: 0;
4614
+ border-color: transparent;
4615
+ border-style: solid;
4616
+ }
4617
+ .popover .arrow {
4618
+ border-width: 11px;
4619
+ }
4620
+ .popover .arrow:after {
4621
+ border-width: 10px;
4622
+ content: "";
4623
+ }
4624
+ .popover.top .arrow {
4625
+ left: 50%;
4626
+ margin-left: -11px;
4627
+ border-bottom-width: 0;
4628
+ border-top-color: #999;
4629
+ border-top-color: rgba(0, 0, 0, 0.25);
4630
+ bottom: -11px;
4631
+ }
4632
+ .popover.top .arrow:after {
4633
+ bottom: 1px;
4634
+ margin-left: -10px;
4635
+ border-bottom-width: 0;
4636
+ border-top-color: #ffffff;
4637
+ }
4638
+ .popover.right .arrow {
4639
+ top: 50%;
4640
+ left: -11px;
4641
+ margin-top: -11px;
4642
+ border-left-width: 0;
4643
+ border-right-color: #999;
4644
+ border-right-color: rgba(0, 0, 0, 0.25);
4645
+ }
4646
+ .popover.right .arrow:after {
4647
+ left: 1px;
4648
+ bottom: -10px;
4649
+ border-left-width: 0;
4650
+ border-right-color: #ffffff;
4651
+ }
4652
+ .popover.bottom .arrow {
4653
+ left: 50%;
4654
+ margin-left: -11px;
4655
+ border-top-width: 0;
4656
+ border-bottom-color: #999;
4657
+ border-bottom-color: rgba(0, 0, 0, 0.25);
4658
+ top: -11px;
4659
+ }
4660
+ .popover.bottom .arrow:after {
4661
+ top: 1px;
4662
+ margin-left: -10px;
4663
+ border-top-width: 0;
4664
+ border-bottom-color: #ffffff;
4665
+ }
4666
+ .popover.left .arrow {
4667
+ top: 50%;
4668
+ right: -11px;
4669
+ margin-top: -11px;
4670
+ border-right-width: 0;
4671
+ border-left-color: #999;
4672
+ border-left-color: rgba(0, 0, 0, 0.25);
4673
+ }
4674
+ .popover.left .arrow:after {
4675
+ right: 1px;
4676
+ border-right-width: 0;
4677
+ border-left-color: #ffffff;
4678
+ bottom: -10px;
4679
+ }
4680
+ .modal-backdrop {
4681
+ position: fixed;
4682
+ top: 0;
4683
+ right: 0;
4684
+ bottom: 0;
4685
+ left: 0;
4686
+ z-index: 1040;
4687
+ background-color: #000000;
4688
+ }
4689
+ .modal-backdrop.fade {
4690
+ opacity: 0;
4691
+ }
4692
+ .modal-backdrop,
4693
+ .modal-backdrop.fade.in {
4694
+ opacity: 0.8;
4695
+ filter: alpha(opacity=80);
4696
+ }
4697
+ .modal {
4698
+ position: fixed;
4699
+ top: 10%;
4700
+ left: 50%;
4701
+ z-index: 1050;
4702
+ width: 560px;
4703
+ margin-left: -280px;
4704
+ background-color: #ffffff;
4705
+ border: 1px solid #999;
4706
+ border: 1px solid rgba(0, 0, 0, 0.3);
4707
+ *border: 1px solid #999;
4708
+ /* IE6-7 */
4709
+
4710
+ -webkit-border-radius: 6px;
4711
+ -moz-border-radius: 6px;
4712
+ border-radius: 6px;
4713
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
4714
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
4715
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
4716
+ -webkit-background-clip: padding-box;
4717
+ -moz-background-clip: padding-box;
4718
+ background-clip: padding-box;
4719
+ outline: none;
4720
+ }
4721
+ .modal.fade {
4722
+ -webkit-transition: opacity .3s linear, top .3s ease-out;
4723
+ -moz-transition: opacity .3s linear, top .3s ease-out;
4724
+ -o-transition: opacity .3s linear, top .3s ease-out;
4725
+ transition: opacity .3s linear, top .3s ease-out;
4726
+ top: -25%;
4727
+ }
4728
+ .modal.fade.in {
4729
+ top: 10%;
4730
+ }
4731
+ .modal-header {
4732
+ padding: 9px 15px;
4733
+ border-bottom: 1px solid #eee;
4734
+ }
4735
+ .modal-header .close {
4736
+ margin-top: 2px;
4737
+ }
4738
+ .modal-header h3 {
4739
+ margin: 0;
4740
+ line-height: 30px;
4741
+ }
4742
+ .modal-body {
4743
+ position: relative;
4744
+ overflow-y: auto;
4745
+ max-height: 400px;
4746
+ padding: 15px;
4747
+ }
4748
+ .modal-form {
4749
+ margin-bottom: 0;
4750
+ }
4751
+ .modal-footer {
4752
+ padding: 14px 15px 15px;
4753
+ margin-bottom: 0;
4754
+ text-align: right;
4755
+ background-color: #f5f5f5;
4756
+ border-top: 1px solid #ddd;
4757
+ -webkit-border-radius: 0 0 6px 6px;
4758
+ -moz-border-radius: 0 0 6px 6px;
4759
+ border-radius: 0 0 6px 6px;
4760
+ -webkit-box-shadow: inset 0 1px 0 #ffffff;
4761
+ -moz-box-shadow: inset 0 1px 0 #ffffff;
4762
+ box-shadow: inset 0 1px 0 #ffffff;
4763
+ *zoom: 1;
4764
+ }
4765
+ .modal-footer:before,
4766
+ .modal-footer:after {
4767
+ display: table;
4768
+ content: "";
4769
+ line-height: 0;
4770
+ }
4771
+ .modal-footer:after {
4772
+ clear: both;
4773
+ }
4774
+ .modal-footer .btn + .btn {
4775
+ margin-left: 5px;
4776
+ margin-bottom: 0;
4777
+ }
4778
+ .modal-footer .btn-group .btn + .btn {
4779
+ margin-left: -1px;
4780
+ }
4781
+ .modal-footer .btn-block + .btn-block {
4782
+ margin-left: 0;
4783
+ }
4784
+ .dropup,
4785
+ .dropdown {
4786
+ position: relative;
4787
+ }
4788
+ .dropdown-toggle {
4789
+ *margin-bottom: -3px;
4790
+ }
4791
+ .dropdown-toggle:active,
4792
+ .open .dropdown-toggle {
4793
+ outline: 0;
4794
+ }
4795
+ .caret {
4796
+ display: inline-block;
4797
+ width: 0;
4798
+ height: 0;
4799
+ vertical-align: top;
4800
+ border-top: 4px solid #000000;
4801
+ border-right: 4px solid transparent;
4802
+ border-left: 4px solid transparent;
4803
+ content: "";
4804
+ }
4805
+ .dropdown .caret {
4806
+ margin-top: 8px;
4807
+ margin-left: 2px;
4808
+ }
4809
+ .dropdown-menu {
4810
+ position: absolute;
4811
+ top: 100%;
4812
+ left: 0;
4813
+ z-index: 1000;
4814
+ display: none;
4815
+ float: left;
4816
+ min-width: 160px;
4817
+ padding: 5px 0;
4818
+ margin: 2px 0 0;
4819
+ list-style: none;
4820
+ background-color: #ffffff;
4821
+ border: 1px solid #ccc;
4822
+ border: 1px solid rgba(0, 0, 0, 0.2);
4823
+ *border-right-width: 2px;
4824
+ *border-bottom-width: 2px;
4825
+ -webkit-border-radius: 6px;
4826
+ -moz-border-radius: 6px;
4827
+ border-radius: 6px;
4828
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4829
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4830
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4831
+ -webkit-background-clip: padding-box;
4832
+ -moz-background-clip: padding;
4833
+ background-clip: padding-box;
4834
+ }
4835
+ .dropdown-menu.pull-right {
4836
+ right: 0;
4837
+ left: auto;
4838
+ }
4839
+ .dropdown-menu .divider {
4840
+ *width: 100%;
4841
+ height: 1px;
4842
+ margin: 9px 1px;
4843
+ *margin: -5px 0 5px;
4844
+ overflow: hidden;
4845
+ background-color: #e5e5e5;
4846
+ border-bottom: 1px solid #ffffff;
4847
+ }
4848
+ .dropdown-menu > li > a {
4849
+ display: block;
4850
+ padding: 3px 20px;
4851
+ clear: both;
4852
+ font-weight: normal;
4853
+ line-height: 20px;
4854
+ color: #333333;
4855
+ white-space: nowrap;
4856
+ }
4857
+ .dropdown-menu > li > a:hover,
4858
+ .dropdown-menu > li > a:focus,
4859
+ .dropdown-submenu:hover > a,
4860
+ .dropdown-submenu:focus > a {
4861
+ text-decoration: none;
4862
+ color: #ffffff;
4863
+ background-color: #0081c2;
4864
+ background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
4865
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
4866
+ background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
4867
+ background-image: -o-linear-gradient(top, #0088cc, #0077b3);
4868
+ background-image: linear-gradient(to bottom, #0088cc, #0077b3);
4869
+ background-repeat: repeat-x;
4870
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
4871
+ }
4872
+ .dropdown-menu > .active > a,
4873
+ .dropdown-menu > .active > a:hover,
4874
+ .dropdown-menu > .active > a:focus {
4875
+ color: #ffffff;
4876
+ text-decoration: none;
4877
+ outline: 0;
4878
+ background-color: #0081c2;
4879
+ background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
4880
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
4881
+ background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
4882
+ background-image: -o-linear-gradient(top, #0088cc, #0077b3);
4883
+ background-image: linear-gradient(to bottom, #0088cc, #0077b3);
4884
+ background-repeat: repeat-x;
4885
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
4886
+ }
4887
+ .dropdown-menu > .disabled > a,
4888
+ .dropdown-menu > .disabled > a:hover,
4889
+ .dropdown-menu > .disabled > a:focus {
4890
+ color: #999999;
4891
+ }
4892
+ .dropdown-menu > .disabled > a:hover,
4893
+ .dropdown-menu > .disabled > a:focus {
4894
+ text-decoration: none;
4895
+ background-color: transparent;
4896
+ background-image: none;
4897
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
4898
+ cursor: default;
4899
+ }
4900
+ .open {
4901
+ *z-index: 1000;
4902
+ }
4903
+ .open > .dropdown-menu {
4904
+ display: block;
4905
+ }
4906
+ .pull-right > .dropdown-menu {
4907
+ right: 0;
4908
+ left: auto;
4909
+ }
4910
+ .dropup .caret,
4911
+ .navbar-fixed-bottom .dropdown .caret {
4912
+ border-top: 0;
4913
+ border-bottom: 4px solid #000000;
4914
+ content: "";
4915
+ }
4916
+ .dropup .dropdown-menu,
4917
+ .navbar-fixed-bottom .dropdown .dropdown-menu {
4918
+ top: auto;
4919
+ bottom: 100%;
4920
+ margin-bottom: 1px;
4921
+ }
4922
+ .dropdown-submenu {
4923
+ position: relative;
4924
+ }
4925
+ .dropdown-submenu > .dropdown-menu {
4926
+ top: 0;
4927
+ left: 100%;
4928
+ margin-top: -6px;
4929
+ margin-left: -1px;
4930
+ -webkit-border-radius: 0 6px 6px 6px;
4931
+ -moz-border-radius: 0 6px 6px 6px;
4932
+ border-radius: 0 6px 6px 6px;
4933
+ }
4934
+ .dropdown-submenu:hover > .dropdown-menu {
4935
+ display: block;
4936
+ }
4937
+ .dropup .dropdown-submenu > .dropdown-menu {
4938
+ top: auto;
4939
+ bottom: 0;
4940
+ margin-top: 0;
4941
+ margin-bottom: -2px;
4942
+ -webkit-border-radius: 5px 5px 5px 0;
4943
+ -moz-border-radius: 5px 5px 5px 0;
4944
+ border-radius: 5px 5px 5px 0;
4945
+ }
4946
+ .dropdown-submenu > a:after {
4947
+ display: block;
4948
+ content: " ";
4949
+ float: right;
4950
+ width: 0;
4951
+ height: 0;
4952
+ border-color: transparent;
4953
+ border-style: solid;
4954
+ border-width: 5px 0 5px 5px;
4955
+ border-left-color: #cccccc;
4956
+ margin-top: 5px;
4957
+ margin-right: -10px;
4958
+ }
4959
+ .dropdown-submenu:hover > a:after {
4960
+ border-left-color: #ffffff;
4961
+ }
4962
+ .dropdown-submenu.pull-left {
4963
+ float: none;
4964
+ }
4965
+ .dropdown-submenu.pull-left > .dropdown-menu {
4966
+ left: -100%;
4967
+ margin-left: 10px;
4968
+ -webkit-border-radius: 6px 0 6px 6px;
4969
+ -moz-border-radius: 6px 0 6px 6px;
4970
+ border-radius: 6px 0 6px 6px;
4971
+ }
4972
+ .dropdown .dropdown-menu .nav-header {
4973
+ padding-left: 20px;
4974
+ padding-right: 20px;
4975
+ }
4976
+ .typeahead {
4977
+ z-index: 1051;
4978
+ margin-top: 2px;
4979
+ -webkit-border-radius: 4px;
4980
+ -moz-border-radius: 4px;
4981
+ border-radius: 4px;
4982
+ }
4983
+ .accordion {
4984
+ margin-bottom: 20px;
4985
+ }
4986
+ .accordion-group {
4987
+ margin-bottom: 2px;
4988
+ border: 1px solid #e5e5e5;
4989
+ -webkit-border-radius: 4px;
4990
+ -moz-border-radius: 4px;
4991
+ border-radius: 4px;
4992
+ }
4993
+ .accordion-heading {
4994
+ border-bottom: 0;
4995
+ }
4996
+ .accordion-heading .accordion-toggle {
4997
+ display: block;
4998
+ padding: 8px 15px;
4999
+ }
5000
+ .accordion-toggle {
5001
+ cursor: pointer;
5002
+ }
5003
+ .accordion-inner {
5004
+ padding: 9px 15px;
5005
+ border-top: 1px solid #e5e5e5;
5006
+ }
5007
+ .carousel {
5008
+ position: relative;
5009
+ margin-bottom: 20px;
5010
+ line-height: 1;
5011
+ }
5012
+ .carousel-inner {
5013
+ overflow: hidden;
5014
+ width: 100%;
5015
+ position: relative;
5016
+ }
5017
+ .carousel-inner > .item {
5018
+ display: none;
5019
+ position: relative;
5020
+ -webkit-transition: 0.6s ease-in-out left;
5021
+ -moz-transition: 0.6s ease-in-out left;
5022
+ -o-transition: 0.6s ease-in-out left;
5023
+ transition: 0.6s ease-in-out left;
5024
+ }
5025
+ .carousel-inner > .item > img,
5026
+ .carousel-inner > .item > a > img {
5027
+ display: block;
5028
+ line-height: 1;
5029
+ }
5030
+ .carousel-inner > .active,
5031
+ .carousel-inner > .next,
5032
+ .carousel-inner > .prev {
5033
+ display: block;
5034
+ }
5035
+ .carousel-inner > .active {
5036
+ left: 0;
5037
+ }
5038
+ .carousel-inner > .next,
5039
+ .carousel-inner > .prev {
5040
+ position: absolute;
5041
+ top: 0;
5042
+ width: 100%;
5043
+ }
5044
+ .carousel-inner > .next {
5045
+ left: 100%;
5046
+ }
5047
+ .carousel-inner > .prev {
5048
+ left: -100%;
5049
+ }
5050
+ .carousel-inner > .next.left,
5051
+ .carousel-inner > .prev.right {
5052
+ left: 0;
5053
+ }
5054
+ .carousel-inner > .active.left {
5055
+ left: -100%;
5056
+ }
5057
+ .carousel-inner > .active.right {
5058
+ left: 100%;
5059
+ }
5060
+ .carousel-control {
5061
+ position: absolute;
5062
+ top: 40%;
5063
+ left: 15px;
5064
+ width: 40px;
5065
+ height: 40px;
5066
+ margin-top: -20px;
5067
+ font-size: 60px;
5068
+ font-weight: 100;
5069
+ line-height: 30px;
5070
+ color: #ffffff;
5071
+ text-align: center;
5072
+ background: #222222;
5073
+ border: 3px solid #ffffff;
5074
+ -webkit-border-radius: 23px;
5075
+ -moz-border-radius: 23px;
5076
+ border-radius: 23px;
5077
+ opacity: 0.5;
5078
+ filter: alpha(opacity=50);
5079
+ }
5080
+ .carousel-control.right {
5081
+ left: auto;
5082
+ right: 15px;
5083
+ }
5084
+ .carousel-control:hover,
5085
+ .carousel-control:focus {
5086
+ color: #ffffff;
5087
+ text-decoration: none;
5088
+ opacity: 0.9;
5089
+ filter: alpha(opacity=90);
5090
+ }
5091
+ .carousel-indicators {
5092
+ position: absolute;
5093
+ top: 15px;
5094
+ right: 15px;
5095
+ z-index: 5;
5096
+ margin: 0;
5097
+ list-style: none;
5098
+ }
5099
+ .carousel-indicators li {
5100
+ display: block;
5101
+ float: left;
5102
+ width: 10px;
5103
+ height: 10px;
5104
+ margin-left: 5px;
5105
+ text-indent: -999px;
5106
+ background-color: #ccc;
5107
+ background-color: rgba(255, 255, 255, 0.25);
5108
+ border-radius: 5px;
5109
+ }
5110
+ .carousel-indicators .active {
5111
+ background-color: #fff;
5112
+ }
5113
+ .carousel-caption {
5114
+ position: absolute;
5115
+ left: 0;
5116
+ right: 0;
5117
+ bottom: 0;
5118
+ padding: 15px;
5119
+ background: #333333;
5120
+ background: rgba(0, 0, 0, 0.75);
5121
+ }
5122
+ .carousel-caption h4,
5123
+ .carousel-caption p {
5124
+ color: #ffffff;
5125
+ line-height: 20px;
5126
+ }
5127
+ .carousel-caption h4 {
5128
+ margin: 0 0 5px;
5129
+ }
5130
+ .carousel-caption p {
5131
+ margin-bottom: 0;
5132
+ }
5133
+ .well {
5134
+ min-height: 20px;
5135
+ padding: 19px;
5136
+ margin-bottom: 20px;
5137
+ background-color: #f5f5f5;
5138
+ border: 1px solid #e3e3e3;
5139
+ -webkit-border-radius: 4px;
5140
+ -moz-border-radius: 4px;
5141
+ border-radius: 4px;
5142
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5143
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5144
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5145
+ }
5146
+ .well blockquote {
5147
+ border-color: #ddd;
5148
+ border-color: rgba(0, 0, 0, 0.15);
5149
+ }
5150
+ .well-large {
5151
+ padding: 24px;
5152
+ -webkit-border-radius: 6px;
5153
+ -moz-border-radius: 6px;
5154
+ border-radius: 6px;
5155
+ }
5156
+ .well-small {
5157
+ padding: 9px;
5158
+ -webkit-border-radius: 3px;
5159
+ -moz-border-radius: 3px;
5160
+ border-radius: 3px;
5161
+ }
5162
+ .close {
5163
+ float: right;
5164
+ font-size: 20px;
5165
+ font-weight: bold;
5166
+ line-height: 20px;
5167
+ color: #000000;
5168
+ text-shadow: 0 1px 0 #ffffff;
5169
+ opacity: 0.2;
5170
+ filter: alpha(opacity=20);
5171
+ }
5172
+ .close:hover,
5173
+ .close:focus {
5174
+ color: #000000;
5175
+ text-decoration: none;
5176
+ cursor: pointer;
5177
+ opacity: 0.4;
5178
+ filter: alpha(opacity=40);
5179
+ }
5180
+ button.close {
5181
+ padding: 0;
5182
+ cursor: pointer;
5183
+ background: transparent;
5184
+ border: 0;
5185
+ -webkit-appearance: none;
5186
+ }
5187
+ .pull-right {
5188
+ float: right;
5189
+ }
5190
+ .pull-left {
5191
+ float: left;
5192
+ }
5193
+ .hide {
5194
+ display: none;
5195
+ }
5196
+ .show {
5197
+ display: block;
5198
+ }
5199
+ .invisible {
5200
+ visibility: hidden;
5201
+ }
5202
+ .affix {
5203
+ position: fixed;
5204
+ }
5205
+ .fade {
5206
+ opacity: 0;
5207
+ -webkit-transition: opacity 0.15s linear;
5208
+ -moz-transition: opacity 0.15s linear;
5209
+ -o-transition: opacity 0.15s linear;
5210
+ transition: opacity 0.15s linear;
5211
+ }
5212
+ .fade.in {
5213
+ opacity: 1;
5214
+ }
5215
+ .collapse {
5216
+ position: relative;
5217
+ height: 0;
5218
+ overflow: hidden;
5219
+ -webkit-transition: height 0.35s ease;
5220
+ -moz-transition: height 0.35s ease;
5221
+ -o-transition: height 0.35s ease;
5222
+ transition: height 0.35s ease;
5223
+ }
5224
+ .collapse.in {
5225
+ height: auto;
5226
+ }
5227
+ @-ms-viewport {
5228
+ width: device-width;
5229
+ }
5230
+ .hidden {
5231
+ display: none;
5232
+ visibility: hidden;
5233
+ }
5234
+ .visible-phone {
5235
+ display: none !important;
5236
+ }
5237
+ .visible-tablet {
5238
+ display: none !important;
5239
+ }
5240
+ .hidden-desktop {
5241
+ display: none !important;
5242
+ }
5243
+ .visible-desktop {
5244
+ display: inherit !important;
5245
+ }
5246
+ @media (min-width: 768px) and (max-width: 979px) {
5247
+ .hidden-desktop {
5248
+ display: inherit !important;
5249
+ }
5250
+ .visible-desktop {
5251
+ display: none !important ;
5252
+ }
5253
+ .visible-tablet {
5254
+ display: inherit !important;
5255
+ }
5256
+ .hidden-tablet {
5257
+ display: none !important;
5258
+ }
5259
+ }
5260
+ @media (max-width: 767px) {
5261
+ .hidden-desktop {
5262
+ display: inherit !important;
5263
+ }
5264
+ .visible-desktop {
5265
+ display: none !important;
5266
+ }
5267
+ .visible-phone {
5268
+ display: inherit !important;
5269
+ }
5270
+ .hidden-phone {
5271
+ display: none !important;
5272
+ }
5273
+ }
5274
+ .visible-print {
5275
+ display: none !important;
5276
+ }
5277
+ @media print {
5278
+ .visible-print {
5279
+ display: inherit !important;
5280
+ }
5281
+ .hidden-print {
5282
+ display: none !important;
5283
+ }
5284
+ }
5285
+ @media (max-width: 767px) {
5286
+ body {
5287
+ padding-left: 20px;
5288
+ padding-right: 20px;
5289
+ }
5290
+ .navbar-fixed-top,
5291
+ .navbar-fixed-bottom,
5292
+ .navbar-static-top {
5293
+ margin-left: -20px;
5294
+ margin-right: -20px;
5295
+ }
5296
+ .container-fluid {
5297
+ padding: 0;
5298
+ }
5299
+ .dl-horizontal dt {
5300
+ float: none;
5301
+ clear: none;
5302
+ width: auto;
5303
+ text-align: left;
5304
+ }
5305
+ .dl-horizontal dd {
5306
+ margin-left: 0;
5307
+ }
5308
+ .container {
5309
+ width: auto;
5310
+ }
5311
+ .row-fluid {
5312
+ width: 100%;
5313
+ }
5314
+ .row,
5315
+ .thumbnails {
5316
+ margin-left: 0;
5317
+ }
5318
+ .thumbnails > li {
5319
+ float: none;
5320
+ margin-left: 0;
5321
+ }
5322
+ [class*="span"],
5323
+ .uneditable-input[class*="span"],
5324
+ .row-fluid [class*="span"] {
5325
+ float: none;
5326
+ display: block;
5327
+ width: 100%;
5328
+ margin-left: 0;
5329
+ -webkit-box-sizing: border-box;
5330
+ -moz-box-sizing: border-box;
5331
+ box-sizing: border-box;
5332
+ }
5333
+ .span12,
5334
+ .row-fluid .span12 {
5335
+ width: 100%;
5336
+ -webkit-box-sizing: border-box;
5337
+ -moz-box-sizing: border-box;
5338
+ box-sizing: border-box;
5339
+ }
5340
+ .row-fluid [class*="offset"]:first-child {
5341
+ margin-left: 0;
5342
+ }
5343
+ .input-large,
5344
+ .input-xlarge,
5345
+ .input-xxlarge,
5346
+ input[class*="span"],
5347
+ select[class*="span"],
5348
+ textarea[class*="span"],
5349
+ .uneditable-input {
5350
+ display: block;
5351
+ width: 100%;
5352
+ min-height: 30px;
5353
+ -webkit-box-sizing: border-box;
5354
+ -moz-box-sizing: border-box;
5355
+ box-sizing: border-box;
5356
+ }
5357
+ .input-prepend input,
5358
+ .input-append input,
5359
+ .input-prepend input[class*="span"],
5360
+ .input-append input[class*="span"] {
5361
+ display: inline-block;
5362
+ width: auto;
5363
+ }
5364
+ .controls-row [class*="span"] + [class*="span"] {
5365
+ margin-left: 0;
5366
+ }
5367
+ .modal {
5368
+ position: fixed;
5369
+ top: 20px;
5370
+ left: 20px;
5371
+ right: 20px;
5372
+ width: auto;
5373
+ margin: 0;
5374
+ }
5375
+ .modal.fade {
5376
+ top: -100px;
5377
+ }
5378
+ .modal.fade.in {
5379
+ top: 20px;
5380
+ }
5381
+ }
5382
+ @media (max-width: 480px) {
5383
+ .nav-collapse {
5384
+ -webkit-transform: translate3d(0, 0, 0);
5385
+ }
5386
+ .page-header h1 small {
5387
+ display: block;
5388
+ line-height: 20px;
5389
+ }
5390
+ input[type="checkbox"],
5391
+ input[type="radio"] {
5392
+ border: 1px solid #ccc;
5393
+ }
5394
+ .form-horizontal .control-label {
5395
+ float: none;
5396
+ width: auto;
5397
+ padding-top: 0;
5398
+ text-align: left;
5399
+ }
5400
+ .form-horizontal .controls {
5401
+ margin-left: 0;
5402
+ }
5403
+ .form-horizontal .control-list {
5404
+ padding-top: 0;
5405
+ }
5406
+ .form-horizontal .form-actions {
5407
+ padding-left: 10px;
5408
+ padding-right: 10px;
5409
+ }
5410
+ .media .pull-left,
5411
+ .media .pull-right {
5412
+ float: none;
5413
+ display: block;
5414
+ margin-bottom: 10px;
5415
+ }
5416
+ .media-object {
5417
+ margin-right: 0;
5418
+ margin-left: 0;
5419
+ }
5420
+ .modal {
5421
+ top: 10px;
5422
+ left: 10px;
5423
+ right: 10px;
5424
+ }
5425
+ .modal-header .close {
5426
+ padding: 10px;
5427
+ margin: -10px;
5428
+ }
5429
+ .carousel-caption {
5430
+ position: static;
5431
+ }
5432
+ }
5433
+ @media (min-width: 768px) and (max-width: 979px) {
5434
+ .row {
5435
+ margin-left: -20px;
5436
+ *zoom: 1;
5437
+ }
5438
+ .row:before,
5439
+ .row:after {
5440
+ display: table;
5441
+ content: "";
5442
+ line-height: 0;
5443
+ }
5444
+ .row:after {
5445
+ clear: both;
5446
+ }
5447
+ [class*="span"] {
5448
+ float: left;
5449
+ min-height: 1px;
5450
+ margin-left: 20px;
5451
+ }
5452
+ .container,
5453
+ .navbar-static-top .container,
5454
+ .navbar-fixed-top .container,
5455
+ .navbar-fixed-bottom .container {
5456
+ width: 724px;
5457
+ }
5458
+ .span12 {
5459
+ width: 724px;
5460
+ }
5461
+ .span11 {
5462
+ width: 662px;
5463
+ }
5464
+ .span10 {
5465
+ width: 600px;
5466
+ }
5467
+ .span9 {
5468
+ width: 538px;
5469
+ }
5470
+ .span8 {
5471
+ width: 476px;
5472
+ }
5473
+ .span7 {
5474
+ width: 414px;
5475
+ }
5476
+ .span6 {
5477
+ width: 352px;
5478
+ }
5479
+ .span5 {
5480
+ width: 290px;
5481
+ }
5482
+ .span4 {
5483
+ width: 228px;
5484
+ }
5485
+ .span3 {
5486
+ width: 166px;
5487
+ }
5488
+ .span2 {
5489
+ width: 104px;
5490
+ }
5491
+ .span1 {
5492
+ width: 42px;
5493
+ }
5494
+ .offset12 {
5495
+ margin-left: 764px;
5496
+ }
5497
+ .offset11 {
5498
+ margin-left: 702px;
5499
+ }
5500
+ .offset10 {
5501
+ margin-left: 640px;
5502
+ }
5503
+ .offset9 {
5504
+ margin-left: 578px;
5505
+ }
5506
+ .offset8 {
5507
+ margin-left: 516px;
5508
+ }
5509
+ .offset7 {
5510
+ margin-left: 454px;
5511
+ }
5512
+ .offset6 {
5513
+ margin-left: 392px;
5514
+ }
5515
+ .offset5 {
5516
+ margin-left: 330px;
5517
+ }
5518
+ .offset4 {
5519
+ margin-left: 268px;
5520
+ }
5521
+ .offset3 {
5522
+ margin-left: 206px;
5523
+ }
5524
+ .offset2 {
5525
+ margin-left: 144px;
5526
+ }
5527
+ .offset1 {
5528
+ margin-left: 82px;
5529
+ }
5530
+ .row-fluid {
5531
+ width: 100%;
5532
+ *zoom: 1;
5533
+ }
5534
+ .row-fluid:before,
5535
+ .row-fluid:after {
5536
+ display: table;
5537
+ content: "";
5538
+ line-height: 0;
5539
+ }
5540
+ .row-fluid:after {
5541
+ clear: both;
5542
+ }
5543
+ .row-fluid [class*="span"] {
5544
+ display: block;
5545
+ width: 100%;
5546
+ min-height: 30px;
5547
+ -webkit-box-sizing: border-box;
5548
+ -moz-box-sizing: border-box;
5549
+ box-sizing: border-box;
5550
+ float: left;
5551
+ margin-left: 2.7624309392265194%;
5552
+ *margin-left: 2.709239449864817%;
5553
+ }
5554
+ .row-fluid [class*="span"]:first-child {
5555
+ margin-left: 0;
5556
+ }
5557
+ .row-fluid .controls-row [class*="span"] + [class*="span"] {
5558
+ margin-left: 2.7624309392265194%;
5559
+ }
5560
+ .row-fluid .span12 {
5561
+ width: 100%;
5562
+ *width: 99.94680851063829%;
5563
+ }
5564
+ .row-fluid .span11 {
5565
+ width: 91.43646408839778%;
5566
+ *width: 91.38327259903608%;
5567
+ }
5568
+ .row-fluid .span10 {
5569
+ width: 82.87292817679558%;
5570
+ *width: 82.81973668743387%;
5571
+ }
5572
+ .row-fluid .span9 {
5573
+ width: 74.30939226519337%;
5574
+ *width: 74.25620077583166%;
5575
+ }
5576
+ .row-fluid .span8 {
5577
+ width: 65.74585635359117%;
5578
+ *width: 65.69266486422946%;
5579
+ }
5580
+ .row-fluid .span7 {
5581
+ width: 57.18232044198895%;
5582
+ *width: 57.12912895262725%;
5583
+ }
5584
+ .row-fluid .span6 {
5585
+ width: 48.61878453038674%;
5586
+ *width: 48.56559304102504%;
5587
+ }
5588
+ .row-fluid .span5 {
5589
+ width: 40.05524861878453%;
5590
+ *width: 40.00205712942283%;
5591
+ }
5592
+ .row-fluid .span4 {
5593
+ width: 31.491712707182323%;
5594
+ *width: 31.43852121782062%;
5595
+ }
5596
+ .row-fluid .span3 {
5597
+ width: 22.92817679558011%;
5598
+ *width: 22.87498530621841%;
5599
+ }
5600
+ .row-fluid .span2 {
5601
+ width: 14.3646408839779%;
5602
+ *width: 14.311449394616199%;
5603
+ }
5604
+ .row-fluid .span1 {
5605
+ width: 5.801104972375691%;
5606
+ *width: 5.747913483013988%;
5607
+ }
5608
+ .row-fluid .offset12 {
5609
+ margin-left: 105.52486187845304%;
5610
+ *margin-left: 105.41847889972962%;
5611
+ }
5612
+ .row-fluid .offset12:first-child {
5613
+ margin-left: 102.76243093922652%;
5614
+ *margin-left: 102.6560479605031%;
5615
+ }
5616
+ .row-fluid .offset11 {
5617
+ margin-left: 96.96132596685082%;
5618
+ *margin-left: 96.8549429881274%;
5619
+ }
5620
+ .row-fluid .offset11:first-child {
5621
+ margin-left: 94.1988950276243%;
5622
+ *margin-left: 94.09251204890089%;
5623
+ }
5624
+ .row-fluid .offset10 {
5625
+ margin-left: 88.39779005524862%;
5626
+ *margin-left: 88.2914070765252%;
5627
+ }
5628
+ .row-fluid .offset10:first-child {
5629
+ margin-left: 85.6353591160221%;
5630
+ *margin-left: 85.52897613729868%;
5631
+ }
5632
+ .row-fluid .offset9 {
5633
+ margin-left: 79.8342541436464%;
5634
+ *margin-left: 79.72787116492299%;
5635
+ }
5636
+ .row-fluid .offset9:first-child {
5637
+ margin-left: 77.07182320441989%;
5638
+ *margin-left: 76.96544022569647%;
5639
+ }
5640
+ .row-fluid .offset8 {
5641
+ margin-left: 71.2707182320442%;
5642
+ *margin-left: 71.16433525332079%;
5643
+ }
5644
+ .row-fluid .offset8:first-child {
5645
+ margin-left: 68.50828729281768%;
5646
+ *margin-left: 68.40190431409427%;
5647
+ }
5648
+ .row-fluid .offset7 {
5649
+ margin-left: 62.70718232044199%;
5650
+ *margin-left: 62.600799341718584%;
5651
+ }
5652
+ .row-fluid .offset7:first-child {
5653
+ margin-left: 59.94475138121547%;
5654
+ *margin-left: 59.838368402492065%;
5655
+ }
5656
+ .row-fluid .offset6 {
5657
+ margin-left: 54.14364640883978%;
5658
+ *margin-left: 54.037263430116376%;
5659
+ }
5660
+ .row-fluid .offset6:first-child {
5661
+ margin-left: 51.38121546961326%;
5662
+ *margin-left: 51.27483249088986%;
5663
+ }
5664
+ .row-fluid .offset5 {
5665
+ margin-left: 45.58011049723757%;
5666
+ *margin-left: 45.47372751851417%;
5667
+ }
5668
+ .row-fluid .offset5:first-child {
5669
+ margin-left: 42.81767955801105%;
5670
+ *margin-left: 42.71129657928765%;
5671
+ }
5672
+ .row-fluid .offset4 {
5673
+ margin-left: 37.01657458563536%;
5674
+ *margin-left: 36.91019160691196%;
5675
+ }
5676
+ .row-fluid .offset4:first-child {
5677
+ margin-left: 34.25414364640884%;
5678
+ *margin-left: 34.14776066768544%;
5679
+ }
5680
+ .row-fluid .offset3 {
5681
+ margin-left: 28.45303867403315%;
5682
+ *margin-left: 28.346655695309746%;
5683
+ }
5684
+ .row-fluid .offset3:first-child {
5685
+ margin-left: 25.69060773480663%;
5686
+ *margin-left: 25.584224756083227%;
5687
+ }
5688
+ .row-fluid .offset2 {
5689
+ margin-left: 19.88950276243094%;
5690
+ *margin-left: 19.783119783707537%;
5691
+ }
5692
+ .row-fluid .offset2:first-child {
5693
+ margin-left: 17.12707182320442%;
5694
+ *margin-left: 17.02068884448102%;
5695
+ }
5696
+ .row-fluid .offset1 {
5697
+ margin-left: 11.32596685082873%;
5698
+ *margin-left: 11.219583872105325%;
5699
+ }
5700
+ .row-fluid .offset1:first-child {
5701
+ margin-left: 8.56353591160221%;
5702
+ *margin-left: 8.457152932878806%;
5703
+ }
5704
+ input,
5705
+ textarea,
5706
+ .uneditable-input {
5707
+ margin-left: 0;
5708
+ }
5709
+ .controls-row [class*="span"] + [class*="span"] {
5710
+ margin-left: 20px;
5711
+ }
5712
+ input.span12,
5713
+ textarea.span12,
5714
+ .uneditable-input.span12 {
5715
+ width: 710px;
5716
+ }
5717
+ input.span11,
5718
+ textarea.span11,
5719
+ .uneditable-input.span11 {
5720
+ width: 648px;
5721
+ }
5722
+ input.span10,
5723
+ textarea.span10,
5724
+ .uneditable-input.span10 {
5725
+ width: 586px;
5726
+ }
5727
+ input.span9,
5728
+ textarea.span9,
5729
+ .uneditable-input.span9 {
5730
+ width: 524px;
5731
+ }
5732
+ input.span8,
5733
+ textarea.span8,
5734
+ .uneditable-input.span8 {
5735
+ width: 462px;
5736
+ }
5737
+ input.span7,
5738
+ textarea.span7,
5739
+ .uneditable-input.span7 {
5740
+ width: 400px;
5741
+ }
5742
+ input.span6,
5743
+ textarea.span6,
5744
+ .uneditable-input.span6 {
5745
+ width: 338px;
5746
+ }
5747
+ input.span5,
5748
+ textarea.span5,
5749
+ .uneditable-input.span5 {
5750
+ width: 276px;
5751
+ }
5752
+ input.span4,
5753
+ textarea.span4,
5754
+ .uneditable-input.span4 {
5755
+ width: 214px;
5756
+ }
5757
+ input.span3,
5758
+ textarea.span3,
5759
+ .uneditable-input.span3 {
5760
+ width: 152px;
5761
+ }
5762
+ input.span2,
5763
+ textarea.span2,
5764
+ .uneditable-input.span2 {
5765
+ width: 90px;
5766
+ }
5767
+ input.span1,
5768
+ textarea.span1,
5769
+ .uneditable-input.span1 {
5770
+ width: 28px;
5771
+ }
5772
+ }
5773
+ @media (min-width: 1200px) {
5774
+ .row {
5775
+ margin-left: -30px;
5776
+ *zoom: 1;
5777
+ }
5778
+ .row:before,
5779
+ .row:after {
5780
+ display: table;
5781
+ content: "";
5782
+ line-height: 0;
5783
+ }
5784
+ .row:after {
5785
+ clear: both;
5786
+ }
5787
+ [class*="span"] {
5788
+ float: left;
5789
+ min-height: 1px;
5790
+ margin-left: 30px;
5791
+ }
5792
+ .container,
5793
+ .navbar-static-top .container,
5794
+ .navbar-fixed-top .container,
5795
+ .navbar-fixed-bottom .container {
5796
+ width: 1170px;
5797
+ }
5798
+ .span12 {
5799
+ width: 1170px;
5800
+ }
5801
+ .span11 {
5802
+ width: 1070px;
5803
+ }
5804
+ .span10 {
5805
+ width: 970px;
5806
+ }
5807
+ .span9 {
5808
+ width: 870px;
5809
+ }
5810
+ .span8 {
5811
+ width: 770px;
5812
+ }
5813
+ .span7 {
5814
+ width: 670px;
5815
+ }
5816
+ .span6 {
5817
+ width: 570px;
5818
+ }
5819
+ .span5 {
5820
+ width: 470px;
5821
+ }
5822
+ .span4 {
5823
+ width: 370px;
5824
+ }
5825
+ .span3 {
5826
+ width: 270px;
5827
+ }
5828
+ .span2 {
5829
+ width: 170px;
5830
+ }
5831
+ .span1 {
5832
+ width: 70px;
5833
+ }
5834
+ .offset12 {
5835
+ margin-left: 1230px;
5836
+ }
5837
+ .offset11 {
5838
+ margin-left: 1130px;
5839
+ }
5840
+ .offset10 {
5841
+ margin-left: 1030px;
5842
+ }
5843
+ .offset9 {
5844
+ margin-left: 930px;
5845
+ }
5846
+ .offset8 {
5847
+ margin-left: 830px;
5848
+ }
5849
+ .offset7 {
5850
+ margin-left: 730px;
5851
+ }
5852
+ .offset6 {
5853
+ margin-left: 630px;
5854
+ }
5855
+ .offset5 {
5856
+ margin-left: 530px;
5857
+ }
5858
+ .offset4 {
5859
+ margin-left: 430px;
5860
+ }
5861
+ .offset3 {
5862
+ margin-left: 330px;
5863
+ }
5864
+ .offset2 {
5865
+ margin-left: 230px;
5866
+ }
5867
+ .offset1 {
5868
+ margin-left: 130px;
5869
+ }
5870
+ .row-fluid {
5871
+ width: 100%;
5872
+ *zoom: 1;
5873
+ }
5874
+ .row-fluid:before,
5875
+ .row-fluid:after {
5876
+ display: table;
5877
+ content: "";
5878
+ line-height: 0;
5879
+ }
5880
+ .row-fluid:after {
5881
+ clear: both;
5882
+ }
5883
+ .row-fluid [class*="span"] {
5884
+ display: block;
5885
+ width: 100%;
5886
+ min-height: 30px;
5887
+ -webkit-box-sizing: border-box;
5888
+ -moz-box-sizing: border-box;
5889
+ box-sizing: border-box;
5890
+ float: left;
5891
+ margin-left: 2.564102564102564%;
5892
+ *margin-left: 2.5109110747408616%;
5893
+ }
5894
+ .row-fluid [class*="span"]:first-child {
5895
+ margin-left: 0;
5896
+ }
5897
+ .row-fluid .controls-row [class*="span"] + [class*="span"] {
5898
+ margin-left: 2.564102564102564%;
5899
+ }
5900
+ .row-fluid .span12 {
5901
+ width: 100%;
5902
+ *width: 99.94680851063829%;
5903
+ }
5904
+ .row-fluid .span11 {
5905
+ width: 91.45299145299145%;
5906
+ *width: 91.39979996362975%;
5907
+ }
5908
+ .row-fluid .span10 {
5909
+ width: 82.90598290598291%;
5910
+ *width: 82.8527914166212%;
5911
+ }
5912
+ .row-fluid .span9 {
5913
+ width: 74.35897435897436%;
5914
+ *width: 74.30578286961266%;
5915
+ }
5916
+ .row-fluid .span8 {
5917
+ width: 65.81196581196582%;
5918
+ *width: 65.75877432260411%;
5919
+ }
5920
+ .row-fluid .span7 {
5921
+ width: 57.26495726495726%;
5922
+ *width: 57.21176577559556%;
5923
+ }
5924
+ .row-fluid .span6 {
5925
+ width: 48.717948717948715%;
5926
+ *width: 48.664757228587014%;
5927
+ }
5928
+ .row-fluid .span5 {
5929
+ width: 40.17094017094017%;
5930
+ *width: 40.11774868157847%;
5931
+ }
5932
+ .row-fluid .span4 {
5933
+ width: 31.623931623931625%;
5934
+ *width: 31.570740134569924%;
5935
+ }
5936
+ .row-fluid .span3 {
5937
+ width: 23.076923076923077%;
5938
+ *width: 23.023731587561375%;
5939
+ }
5940
+ .row-fluid .span2 {
5941
+ width: 14.52991452991453%;
5942
+ *width: 14.476723040552828%;
5943
+ }
5944
+ .row-fluid .span1 {
5945
+ width: 5.982905982905983%;
5946
+ *width: 5.929714493544281%;
5947
+ }
5948
+ .row-fluid .offset12 {
5949
+ margin-left: 105.12820512820512%;
5950
+ *margin-left: 105.02182214948171%;
5951
+ }
5952
+ .row-fluid .offset12:first-child {
5953
+ margin-left: 102.56410256410257%;
5954
+ *margin-left: 102.45771958537915%;
5955
+ }
5956
+ .row-fluid .offset11 {
5957
+ margin-left: 96.58119658119658%;
5958
+ *margin-left: 96.47481360247316%;
5959
+ }
5960
+ .row-fluid .offset11:first-child {
5961
+ margin-left: 94.01709401709402%;
5962
+ *margin-left: 93.91071103837061%;
5963
+ }
5964
+ .row-fluid .offset10 {
5965
+ margin-left: 88.03418803418803%;
5966
+ *margin-left: 87.92780505546462%;
5967
+ }
5968
+ .row-fluid .offset10:first-child {
5969
+ margin-left: 85.47008547008548%;
5970
+ *margin-left: 85.36370249136206%;
5971
+ }
5972
+ .row-fluid .offset9 {
5973
+ margin-left: 79.48717948717949%;
5974
+ *margin-left: 79.38079650845607%;
5975
+ }
5976
+ .row-fluid .offset9:first-child {
5977
+ margin-left: 76.92307692307693%;
5978
+ *margin-left: 76.81669394435352%;
5979
+ }
5980
+ .row-fluid .offset8 {
5981
+ margin-left: 70.94017094017094%;
5982
+ *margin-left: 70.83378796144753%;
5983
+ }
5984
+ .row-fluid .offset8:first-child {
5985
+ margin-left: 68.37606837606839%;
5986
+ *margin-left: 68.26968539734497%;
5987
+ }
5988
+ .row-fluid .offset7 {
5989
+ margin-left: 62.393162393162385%;
5990
+ *margin-left: 62.28677941443899%;
5991
+ }
5992
+ .row-fluid .offset7:first-child {
5993
+ margin-left: 59.82905982905982%;
5994
+ *margin-left: 59.72267685033642%;
5995
+ }
5996
+ .row-fluid .offset6 {
5997
+ margin-left: 53.84615384615384%;
5998
+ *margin-left: 53.739770867430444%;
5999
+ }
6000
+ .row-fluid .offset6:first-child {
6001
+ margin-left: 51.28205128205128%;
6002
+ *margin-left: 51.175668303327875%;
6003
+ }
6004
+ .row-fluid .offset5 {
6005
+ margin-left: 45.299145299145295%;
6006
+ *margin-left: 45.1927623204219%;
6007
+ }
6008
+ .row-fluid .offset5:first-child {
6009
+ margin-left: 42.73504273504273%;
6010
+ *margin-left: 42.62865975631933%;
6011
+ }
6012
+ .row-fluid .offset4 {
6013
+ margin-left: 36.75213675213675%;
6014
+ *margin-left: 36.645753773413354%;
6015
+ }
6016
+ .row-fluid .offset4:first-child {
6017
+ margin-left: 34.18803418803419%;
6018
+ *margin-left: 34.081651209310785%;
6019
+ }
6020
+ .row-fluid .offset3 {
6021
+ margin-left: 28.205128205128204%;
6022
+ *margin-left: 28.0987452264048%;
6023
+ }
6024
+ .row-fluid .offset3:first-child {
6025
+ margin-left: 25.641025641025642%;
6026
+ *margin-left: 25.53464266230224%;
6027
+ }
6028
+ .row-fluid .offset2 {
6029
+ margin-left: 19.65811965811966%;
6030
+ *margin-left: 19.551736679396257%;
6031
+ }
6032
+ .row-fluid .offset2:first-child {
6033
+ margin-left: 17.094017094017094%;
6034
+ *margin-left: 16.98763411529369%;
6035
+ }
6036
+ .row-fluid .offset1 {
6037
+ margin-left: 11.11111111111111%;
6038
+ *margin-left: 11.004728132387708%;
6039
+ }
6040
+ .row-fluid .offset1:first-child {
6041
+ margin-left: 8.547008547008547%;
6042
+ *margin-left: 8.440625568285142%;
6043
+ }
6044
+ input,
6045
+ textarea,
6046
+ .uneditable-input {
6047
+ margin-left: 0;
6048
+ }
6049
+ .controls-row [class*="span"] + [class*="span"] {
6050
+ margin-left: 30px;
6051
+ }
6052
+ input.span12,
6053
+ textarea.span12,
6054
+ .uneditable-input.span12 {
6055
+ width: 1156px;
6056
+ }
6057
+ input.span11,
6058
+ textarea.span11,
6059
+ .uneditable-input.span11 {
6060
+ width: 1056px;
6061
+ }
6062
+ input.span10,
6063
+ textarea.span10,
6064
+ .uneditable-input.span10 {
6065
+ width: 956px;
6066
+ }
6067
+ input.span9,
6068
+ textarea.span9,
6069
+ .uneditable-input.span9 {
6070
+ width: 856px;
6071
+ }
6072
+ input.span8,
6073
+ textarea.span8,
6074
+ .uneditable-input.span8 {
6075
+ width: 756px;
6076
+ }
6077
+ input.span7,
6078
+ textarea.span7,
6079
+ .uneditable-input.span7 {
6080
+ width: 656px;
6081
+ }
6082
+ input.span6,
6083
+ textarea.span6,
6084
+ .uneditable-input.span6 {
6085
+ width: 556px;
6086
+ }
6087
+ input.span5,
6088
+ textarea.span5,
6089
+ .uneditable-input.span5 {
6090
+ width: 456px;
6091
+ }
6092
+ input.span4,
6093
+ textarea.span4,
6094
+ .uneditable-input.span4 {
6095
+ width: 356px;
6096
+ }
6097
+ input.span3,
6098
+ textarea.span3,
6099
+ .uneditable-input.span3 {
6100
+ width: 256px;
6101
+ }
6102
+ input.span2,
6103
+ textarea.span2,
6104
+ .uneditable-input.span2 {
6105
+ width: 156px;
6106
+ }
6107
+ input.span1,
6108
+ textarea.span1,
6109
+ .uneditable-input.span1 {
6110
+ width: 56px;
6111
+ }
6112
+ .thumbnails {
6113
+ margin-left: -30px;
6114
+ }
6115
+ .thumbnails > li {
6116
+ margin-left: 30px;
6117
+ }
6118
+ .row-fluid .thumbnails {
6119
+ margin-left: 0;
6120
+ }
6121
+ }
6122
+ @media (max-width: 979px) {
6123
+ body {
6124
+ padding-top: 0;
6125
+ }
6126
+ .navbar-fixed-top,
6127
+ .navbar-fixed-bottom {
6128
+ position: static;
6129
+ }
6130
+ .navbar-fixed-top {
6131
+ margin-bottom: 20px;
6132
+ }
6133
+ .navbar-fixed-bottom {
6134
+ margin-top: 20px;
6135
+ }
6136
+ .navbar-fixed-top .navbar-inner,
6137
+ .navbar-fixed-bottom .navbar-inner {
6138
+ padding: 5px;
6139
+ }
6140
+ .navbar .container {
6141
+ width: auto;
6142
+ padding: 0;
6143
+ }
6144
+ .navbar .brand {
6145
+ padding-left: 10px;
6146
+ padding-right: 10px;
6147
+ margin: 0 0 0 -5px;
6148
+ }
6149
+ .nav-collapse {
6150
+ clear: both;
6151
+ }
6152
+ .nav-collapse .nav {
6153
+ float: none;
6154
+ margin: 0 0 10px;
6155
+ }
6156
+ .nav-collapse .nav > li {
6157
+ float: none;
6158
+ }
6159
+ .nav-collapse .nav > li > a {
6160
+ margin-bottom: 2px;
6161
+ }
6162
+ .nav-collapse .nav > .divider-vertical {
6163
+ display: none;
6164
+ }
6165
+ .nav-collapse .nav .nav-header {
6166
+ color: #777777;
6167
+ text-shadow: none;
6168
+ }
6169
+ .nav-collapse .nav > li > a,
6170
+ .nav-collapse .dropdown-menu a {
6171
+ padding: 9px 15px;
6172
+ font-weight: bold;
6173
+ color: #777777;
6174
+ -webkit-border-radius: 3px;
6175
+ -moz-border-radius: 3px;
6176
+ border-radius: 3px;
6177
+ }
6178
+ .nav-collapse .btn {
6179
+ padding: 4px 10px 4px;
6180
+ font-weight: normal;
6181
+ -webkit-border-radius: 4px;
6182
+ -moz-border-radius: 4px;
6183
+ border-radius: 4px;
6184
+ }
6185
+ .nav-collapse .dropdown-menu li + li a {
6186
+ margin-bottom: 2px;
6187
+ }
6188
+ .nav-collapse .nav > li > a:hover,
6189
+ .nav-collapse .nav > li > a:focus,
6190
+ .nav-collapse .dropdown-menu a:hover,
6191
+ .nav-collapse .dropdown-menu a:focus {
6192
+ background-color: #f2f2f2;
6193
+ }
6194
+ .navbar-inverse .nav-collapse .nav > li > a,
6195
+ .navbar-inverse .nav-collapse .dropdown-menu a {
6196
+ color: #999999;
6197
+ }
6198
+ .navbar-inverse .nav-collapse .nav > li > a:hover,
6199
+ .navbar-inverse .nav-collapse .nav > li > a:focus,
6200
+ .navbar-inverse .nav-collapse .dropdown-menu a:hover,
6201
+ .navbar-inverse .nav-collapse .dropdown-menu a:focus {
6202
+ background-color: #111111;
6203
+ }
6204
+ .nav-collapse.in .btn-group {
6205
+ margin-top: 5px;
6206
+ padding: 0;
6207
+ }
6208
+ .nav-collapse .dropdown-menu {
6209
+ position: static;
6210
+ top: auto;
6211
+ left: auto;
6212
+ float: none;
6213
+ display: none;
6214
+ max-width: none;
6215
+ margin: 0 15px;
6216
+ padding: 0;
6217
+ background-color: transparent;
6218
+ border: none;
6219
+ -webkit-border-radius: 0;
6220
+ -moz-border-radius: 0;
6221
+ border-radius: 0;
6222
+ -webkit-box-shadow: none;
6223
+ -moz-box-shadow: none;
6224
+ box-shadow: none;
6225
+ }
6226
+ .nav-collapse .open > .dropdown-menu {
6227
+ display: block;
6228
+ }
6229
+ .nav-collapse .dropdown-menu:before,
6230
+ .nav-collapse .dropdown-menu:after {
6231
+ display: none;
6232
+ }
6233
+ .nav-collapse .dropdown-menu .divider {
6234
+ display: none;
6235
+ }
6236
+ .nav-collapse .nav > li > .dropdown-menu:before,
6237
+ .nav-collapse .nav > li > .dropdown-menu:after {
6238
+ display: none;
6239
+ }
6240
+ .nav-collapse .navbar-form,
6241
+ .nav-collapse .navbar-search {
6242
+ float: none;
6243
+ padding: 10px 15px;
6244
+ margin: 10px 0;
6245
+ border-top: 1px solid #f2f2f2;
6246
+ border-bottom: 1px solid #f2f2f2;
6247
+ -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
6248
+ -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
6249
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
6250
+ }
6251
+ .navbar-inverse .nav-collapse .navbar-form,
6252
+ .navbar-inverse .nav-collapse .navbar-search {
6253
+ border-top-color: #111111;
6254
+ border-bottom-color: #111111;
6255
+ }
6256
+ .navbar .nav-collapse .nav.pull-right {
6257
+ float: none;
6258
+ margin-left: 0;
6259
+ }
6260
+ .nav-collapse,
6261
+ .nav-collapse.collapse {
6262
+ overflow: hidden;
6263
+ height: 0;
6264
+ }
6265
+ .navbar .btn-navbar {
6266
+ display: block;
6267
+ }
6268
+ .navbar-static .navbar-inner {
6269
+ padding-left: 10px;
6270
+ padding-right: 10px;
6271
+ }
6272
+ }
6273
+ @media (min-width: 980px) {
6274
+ .nav-collapse.collapse {
6275
+ height: auto !important;
6276
+ overflow: visible !important;
6277
+ }
6278
+ }
backend/resources/bootstrap/css/bootstrap.min.css ADDED
@@ -0,0 +1,865 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v2.3.1
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+ .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}
11
+ .clearfix:after{clear:both;}
12
+ .hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
13
+ .input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
14
+ article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
15
+ audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
16
+ audio:not([controls]){display:none;}
17
+ html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
18
+ a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
19
+ a:hover,a:active{outline:0;}
20
+ sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
21
+ sup{top:-0.5em;}
22
+ sub{bottom:-0.25em;}
23
+ img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
24
+ #map_canvas img,.google-maps img{max-width:none;}
25
+ button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
26
+ button,input{*overflow:visible;line-height:normal;}
27
+ button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
28
+ button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}
29
+ label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer;}
30
+ input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
31
+ input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
32
+ textarea{overflow:auto;vertical-align:top;}
33
+ @media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333333;background-color:#ffffff;}
34
+ a{color:#0088cc;text-decoration:none;}
35
+ a:hover,a:focus{color:#005580;text-decoration:underline;}
36
+ .img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
37
+ .img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);}
38
+ .img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px;}
39
+ .row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;}
40
+ .row:after{clear:both;}
41
+ [class*="span"]{float:left;min-height:1px;margin-left:20px;}
42
+ .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
43
+ .span12{width:940px;}
44
+ .span11{width:860px;}
45
+ .span10{width:780px;}
46
+ .span9{width:700px;}
47
+ .span8{width:620px;}
48
+ .span7{width:540px;}
49
+ .span6{width:460px;}
50
+ .span5{width:380px;}
51
+ .span4{width:300px;}
52
+ .span3{width:220px;}
53
+ .span2{width:140px;}
54
+ .span1{width:60px;}
55
+ .offset12{margin-left:980px;}
56
+ .offset11{margin-left:900px;}
57
+ .offset10{margin-left:820px;}
58
+ .offset9{margin-left:740px;}
59
+ .offset8{margin-left:660px;}
60
+ .offset7{margin-left:580px;}
61
+ .offset6{margin-left:500px;}
62
+ .offset5{margin-left:420px;}
63
+ .offset4{margin-left:340px;}
64
+ .offset3{margin-left:260px;}
65
+ .offset2{margin-left:180px;}
66
+ .offset1{margin-left:100px;}
67
+ .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;}
68
+ .row-fluid:after{clear:both;}
69
+ .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;}
70
+ .row-fluid [class*="span"]:first-child{margin-left:0;}
71
+ .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%;}
72
+ .row-fluid .span12{width:100%;*width:99.94680851063829%;}
73
+ .row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%;}
74
+ .row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%;}
75
+ .row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%;}
76
+ .row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%;}
77
+ .row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%;}
78
+ .row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%;}
79
+ .row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%;}
80
+ .row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%;}
81
+ .row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%;}
82
+ .row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%;}
83
+ .row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%;}
84
+ .row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%;}
85
+ .row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%;}
86
+ .row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%;}
87
+ .row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%;}
88
+ .row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%;}
89
+ .row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%;}
90
+ .row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%;}
91
+ .row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%;}
92
+ .row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%;}
93
+ .row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%;}
94
+ .row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%;}
95
+ .row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%;}
96
+ .row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%;}
97
+ .row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%;}
98
+ .row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%;}
99
+ .row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%;}
100
+ .row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%;}
101
+ .row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%;}
102
+ .row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%;}
103
+ .row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%;}
104
+ .row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%;}
105
+ .row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%;}
106
+ .row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%;}
107
+ .row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%;}
108
+ [class*="span"].hide,.row-fluid [class*="span"].hide{display:none;}
109
+ [class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right;}
110
+ .container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";line-height:0;}
111
+ .container:after{clear:both;}
112
+ .container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0;}
113
+ .container-fluid:after{clear:both;}
114
+ p{margin:0 0 10px;}
115
+ .lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px;}
116
+ small{font-size:85%;}
117
+ strong{font-weight:bold;}
118
+ em{font-style:italic;}
119
+ cite{font-style:normal;}
120
+ .muted{color:#999999;}
121
+ a.muted:hover,a.muted:focus{color:#808080;}
122
+ .text-warning{color:#c09853;}
123
+ a.text-warning:hover,a.text-warning:focus{color:#a47e3c;}
124
+ .text-error{color:#b94a48;}
125
+ a.text-error:hover,a.text-error:focus{color:#953b39;}
126
+ .text-info{color:#3a87ad;}
127
+ a.text-info:hover,a.text-info:focus{color:#2d6987;}
128
+ .text-success{color:#468847;}
129
+ a.text-success:hover,a.text-success:focus{color:#356635;}
130
+ .text-left{text-align:left;}
131
+ .text-right{text-align:right;}
132
+ .text-center{text-align:center;}
133
+ h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999;}
134
+ h1,h2,h3{line-height:40px;}
135
+ h1{font-size:38.5px;}
136
+ h2{font-size:31.5px;}
137
+ h3{font-size:24.5px;}
138
+ h4{font-size:17.5px;}
139
+ h5{font-size:14px;}
140
+ h6{font-size:11.9px;}
141
+ h1 small{font-size:24.5px;}
142
+ h2 small{font-size:17.5px;}
143
+ h3 small{font-size:14px;}
144
+ h4 small{font-size:14px;}
145
+ .page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eeeeee;}
146
+ ul,ol{padding:0;margin:0 0 10px 25px;}
147
+ ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
148
+ li{line-height:20px;}
149
+ ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
150
+ ul.inline,ol.inline{margin-left:0;list-style:none;}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;*zoom:1;padding-left:5px;padding-right:5px;}
151
+ dl{margin-bottom:20px;}
152
+ dt,dd{line-height:20px;}
153
+ dt{font-weight:bold;}
154
+ dd{margin-left:10px;}
155
+ .dl-horizontal{*zoom:1;}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0;}
156
+ .dl-horizontal:after{clear:both;}
157
+ .dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
158
+ .dl-horizontal dd{margin-left:180px;}
159
+ hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
160
+ abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999;}
161
+ abbr.initialism{font-size:90%;text-transform:uppercase;}
162
+ blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25;}
163
+ blockquote small{display:block;line-height:20px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
164
+ blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
165
+ blockquote.pull-right small:before{content:'';}
166
+ blockquote.pull-right small:after{content:'\00A0 \2014';}
167
+ q:before,q:after,blockquote:before,blockquote:after{content:"";}
168
+ address{display:block;margin-bottom:20px;font-style:normal;line-height:20px;}
169
+ code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
170
+ code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap;}
171
+ pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:20px;}
172
+ pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0;}
173
+ .pre-scrollable{max-height:340px;overflow-y:scroll;}
174
+ .label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
175
+ .label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
176
+ .badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
177
+ .label:empty,.badge:empty{display:none;}
178
+ a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer;}
179
+ .label-important,.badge-important{background-color:#b94a48;}
180
+ .label-important[href],.badge-important[href]{background-color:#953b39;}
181
+ .label-warning,.badge-warning{background-color:#f89406;}
182
+ .label-warning[href],.badge-warning[href]{background-color:#c67605;}
183
+ .label-success,.badge-success{background-color:#468847;}
184
+ .label-success[href],.badge-success[href]{background-color:#356635;}
185
+ .label-info,.badge-info{background-color:#3a87ad;}
186
+ .label-info[href],.badge-info[href]{background-color:#2d6987;}
187
+ .label-inverse,.badge-inverse{background-color:#333333;}
188
+ .label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
189
+ .btn .label,.btn .badge{position:relative;top:-1px;}
190
+ .btn-mini .label,.btn-mini .badge{top:0;}
191
+ table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
192
+ .table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
193
+ .table th{font-weight:bold;}
194
+ .table thead th{vertical-align:bottom;}
195
+ .table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
196
+ .table tbody+tbody{border-top:2px solid #dddddd;}
197
+ .table .table{background-color:#ffffff;}
198
+ .table-condensed th,.table-condensed td{padding:4px 5px;}
199
+ .table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
200
+ .table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
201
+ .table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
202
+ .table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
203
+ .table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
204
+ .table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
205
+ .table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
206
+ .table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
207
+ .table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
208
+ .table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
209
+ .table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9;}
210
+ .table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5;}
211
+ table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0;}
212
+ .table td.span1,.table th.span1{float:none;width:44px;margin-left:0;}
213
+ .table td.span2,.table th.span2{float:none;width:124px;margin-left:0;}
214
+ .table td.span3,.table th.span3{float:none;width:204px;margin-left:0;}
215
+ .table td.span4,.table th.span4{float:none;width:284px;margin-left:0;}
216
+ .table td.span5,.table th.span5{float:none;width:364px;margin-left:0;}
217
+ .table td.span6,.table th.span6{float:none;width:444px;margin-left:0;}
218
+ .table td.span7,.table th.span7{float:none;width:524px;margin-left:0;}
219
+ .table td.span8,.table th.span8{float:none;width:604px;margin-left:0;}
220
+ .table td.span9,.table th.span9{float:none;width:684px;margin-left:0;}
221
+ .table td.span10,.table th.span10{float:none;width:764px;margin-left:0;}
222
+ .table td.span11,.table th.span11{float:none;width:844px;margin-left:0;}
223
+ .table td.span12,.table th.span12{float:none;width:924px;margin-left:0;}
224
+ .table tbody tr.success>td{background-color:#dff0d8;}
225
+ .table tbody tr.error>td{background-color:#f2dede;}
226
+ .table tbody tr.warning>td{background-color:#fcf8e3;}
227
+ .table tbody tr.info>td{background-color:#d9edf7;}
228
+ .table-hover tbody tr.success:hover>td{background-color:#d0e9c6;}
229
+ .table-hover tbody tr.error:hover>td{background-color:#ebcccc;}
230
+ .table-hover tbody tr.warning:hover>td{background-color:#faf2cc;}
231
+ .table-hover tbody tr.info:hover>td{background-color:#c4e3f3;}
232
+ form{margin:0 0 20px;}
233
+ fieldset{padding:0;margin:0;border:0;}
234
+ legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:15px;color:#999999;}
235
+ label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px;}
236
+ input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
237
+ label{display:block;margin-bottom:5px;}
238
+ select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle;}
239
+ input,textarea,.uneditable-input{width:206px;}
240
+ textarea{height:auto;}
241
+ textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear .2s, box-shadow linear .2s;-moz-transition:border linear .2s, box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
242
+ input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;}
243
+ input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;}
244
+ select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px;}
245
+ select{width:220px;border:1px solid #cccccc;background-color:#ffffff;}
246
+ select[multiple],select[size]{height:auto;}
247
+ select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
248
+ .uneditable-input,.uneditable-textarea{color:#999999;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
249
+ .uneditable-input{overflow:hidden;white-space:nowrap;}
250
+ .uneditable-textarea{width:auto;height:auto;}
251
+ input:-moz-placeholder,textarea:-moz-placeholder{color:#999999;}
252
+ input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999999;}
253
+ input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999999;}
254
+ .radio,.checkbox{min-height:20px;padding-left:20px;}
255
+ .radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px;}
256
+ .controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
257
+ .radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
258
+ .radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
259
+ .input-mini{width:60px;}
260
+ .input-small{width:90px;}
261
+ .input-medium{width:150px;}
262
+ .input-large{width:210px;}
263
+ .input-xlarge{width:270px;}
264
+ .input-xxlarge{width:530px;}
265
+ input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
266
+ .input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;}
267
+ input,textarea,.uneditable-input{margin-left:0;}
268
+ .controls-row [class*="span"]+[class*="span"]{margin-left:20px;}
269
+ input.span12,textarea.span12,.uneditable-input.span12{width:926px;}
270
+ input.span11,textarea.span11,.uneditable-input.span11{width:846px;}
271
+ input.span10,textarea.span10,.uneditable-input.span10{width:766px;}
272
+ input.span9,textarea.span9,.uneditable-input.span9{width:686px;}
273
+ input.span8,textarea.span8,.uneditable-input.span8{width:606px;}
274
+ input.span7,textarea.span7,.uneditable-input.span7{width:526px;}
275
+ input.span6,textarea.span6,.uneditable-input.span6{width:446px;}
276
+ input.span5,textarea.span5,.uneditable-input.span5{width:366px;}
277
+ input.span4,textarea.span4,.uneditable-input.span4{width:286px;}
278
+ input.span3,textarea.span3,.uneditable-input.span3{width:206px;}
279
+ input.span2,textarea.span2,.uneditable-input.span2{width:126px;}
280
+ input.span1,textarea.span1,.uneditable-input.span1{width:46px;}
281
+ .controls-row{*zoom:1;}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0;}
282
+ .controls-row:after{clear:both;}
283
+ .controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left;}
284
+ .controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px;}
285
+ input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;}
286
+ input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
287
+ .control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
288
+ .control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;}
289
+ .control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;}
290
+ .control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
291
+ .control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
292
+ .control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;}
293
+ .control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;}
294
+ .control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
295
+ .control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
296
+ .control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;}
297
+ .control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;}
298
+ .control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
299
+ .control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad;}
300
+ .control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad;}
301
+ .control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;}
302
+ .control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;}
303
+ input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
304
+ .form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;}
305
+ .form-actions:after{clear:both;}
306
+ .help-block,.help-inline{color:#595959;}
307
+ .help-block{display:block;margin-bottom:10px;}
308
+ .help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
309
+ .input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap;}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px;}
310
+ .input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2;}
311
+ .input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc;}
312
+ .input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
313
+ .input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546;}
314
+ .input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
315
+ .input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
316
+ .input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
317
+ .input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px;}
318
+ .input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
319
+ .input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
320
+ .input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
321
+ .input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
322
+ .input-prepend.input-append .btn-group:first-child{margin-left:0;}
323
+ input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
324
+ .form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
325
+ .form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
326
+ .form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
327
+ .form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
328
+ .form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
329
+ .form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle;}
330
+ .form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
331
+ .form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block;}
332
+ .form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
333
+ .form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
334
+ .form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
335
+ .control-group{margin-bottom:10px;}
336
+ legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate;}
337
+ .form-horizontal .control-group{margin-bottom:20px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0;}
338
+ .form-horizontal .control-group:after{clear:both;}
339
+ .form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right;}
340
+ .form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:180px;}
341
+ .form-horizontal .help-block{margin-bottom:0;}
342
+ .form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px;}
343
+ .form-horizontal .form-actions{padding-left:180px;}
344
+ .btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333333;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9;}
345
+ .btn:active,.btn.active{background-color:#cccccc \9;}
346
+ .btn:first-child{*margin-left:0;}
347
+ .btn:hover,.btn:focus{color:#333333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
348
+ .btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
349
+ .btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
350
+ .btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
351
+ .btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
352
+ .btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px;}
353
+ .btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
354
+ .btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0;}
355
+ .btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px;}
356
+ .btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
357
+ .btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
358
+ .btn-block+.btn-block{margin-top:5px;}
359
+ input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%;}
360
+ .btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
361
+ .btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(to bottom, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0044cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#0044cc;*background-color:#003bb3;}
362
+ .btn-primary:active,.btn-primary.active{background-color:#003399 \9;}
363
+ .btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#f89406;*background-color:#df8505;}
364
+ .btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
365
+ .btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a;}
366
+ .btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
367
+ .btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249;}
368
+ .btn-success:active,.btn-success.active{background-color:#408140 \9;}
369
+ .btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0;}
370
+ .btn-info:active,.btn-info.active{background-color:#24748c \9;}
371
+ .btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#363636;background-image:-moz-linear-gradient(top, #444444, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));background-image:-webkit-linear-gradient(top, #444444, #222222);background-image:-o-linear-gradient(top, #444444, #222222);background-image:linear-gradient(to bottom, #444444, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515;}
372
+ .btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
373
+ button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
374
+ button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
375
+ button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
376
+ button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
377
+ .btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
378
+ .btn-link{border-color:transparent;cursor:pointer;color:#0088cc;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
379
+ .btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent;}
380
+ .btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333333;text-decoration:none;}
381
+ [class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;}
382
+ .icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");}
383
+ .icon-glass{background-position:0 0;}
384
+ .icon-music{background-position:-24px 0;}
385
+ .icon-search{background-position:-48px 0;}
386
+ .icon-envelope{background-position:-72px 0;}
387
+ .icon-heart{background-position:-96px 0;}
388
+ .icon-star{background-position:-120px 0;}
389
+ .icon-star-empty{background-position:-144px 0;}
390
+ .icon-user{background-position:-168px 0;}
391
+ .icon-film{background-position:-192px 0;}
392
+ .icon-th-large{background-position:-216px 0;}
393
+ .icon-th{background-position:-240px 0;}
394
+ .icon-th-list{background-position:-264px 0;}
395
+ .icon-ok{background-position:-288px 0;}
396
+ .icon-remove{background-position:-312px 0;}
397
+ .icon-zoom-in{background-position:-336px 0;}
398
+ .icon-zoom-out{background-position:-360px 0;}
399
+ .icon-off{background-position:-384px 0;}
400
+ .icon-signal{background-position:-408px 0;}
401
+ .icon-cog{background-position:-432px 0;}
402
+ .icon-trash{background-position:-456px 0;}
403
+ .icon-home{background-position:0 -24px;}
404
+ .icon-file{background-position:-24px -24px;}
405
+ .icon-time{background-position:-48px -24px;}
406
+ .icon-road{background-position:-72px -24px;}
407
+ .icon-download-alt{background-position:-96px -24px;}
408
+ .icon-download{background-position:-120px -24px;}
409
+ .icon-upload{background-position:-144px -24px;}
410
+ .icon-inbox{background-position:-168px -24px;}
411
+ .icon-play-circle{background-position:-192px -24px;}
412
+ .icon-repeat{background-position:-216px -24px;}
413
+ .icon-refresh{background-position:-240px -24px;}
414
+ .icon-list-alt{background-position:-264px -24px;}
415
+ .icon-lock{background-position:-287px -24px;}
416
+ .icon-flag{background-position:-312px -24px;}
417
+ .icon-headphones{background-position:-336px -24px;}
418
+ .icon-volume-off{background-position:-360px -24px;}
419
+ .icon-volume-down{background-position:-384px -24px;}
420
+ .icon-volume-up{background-position:-408px -24px;}
421
+ .icon-qrcode{background-position:-432px -24px;}
422
+ .icon-barcode{background-position:-456px -24px;}
423
+ .icon-tag{background-position:0 -48px;}
424
+ .icon-tags{background-position:-25px -48px;}
425
+ .icon-book{background-position:-48px -48px;}
426
+ .icon-bookmark{background-position:-72px -48px;}
427
+ .icon-print{background-position:-96px -48px;}
428
+ .icon-camera{background-position:-120px -48px;}
429
+ .icon-font{background-position:-144px -48px;}
430
+ .icon-bold{background-position:-167px -48px;}
431
+ .icon-italic{background-position:-192px -48px;}
432
+ .icon-text-height{background-position:-216px -48px;}
433
+ .icon-text-width{background-position:-240px -48px;}
434
+ .icon-align-left{background-position:-264px -48px;}
435
+ .icon-align-center{background-position:-288px -48px;}
436
+ .icon-align-right{background-position:-312px -48px;}
437
+ .icon-align-justify{background-position:-336px -48px;}
438
+ .icon-list{background-position:-360px -48px;}
439
+ .icon-indent-left{background-position:-384px -48px;}
440
+ .icon-indent-right{background-position:-408px -48px;}
441
+ .icon-facetime-video{background-position:-432px -48px;}
442
+ .icon-picture{background-position:-456px -48px;}
443
+ .icon-pencil{background-position:0 -72px;}
444
+ .icon-map-marker{background-position:-24px -72px;}
445
+ .icon-adjust{background-position:-48px -72px;}
446
+ .icon-tint{background-position:-72px -72px;}
447
+ .icon-edit{background-position:-96px -72px;}
448
+ .icon-share{background-position:-120px -72px;}
449
+ .icon-check{background-position:-144px -72px;}
450
+ .icon-move{background-position:-168px -72px;}
451
+ .icon-step-backward{background-position:-192px -72px;}
452
+ .icon-fast-backward{background-position:-216px -72px;}
453
+ .icon-backward{background-position:-240px -72px;}
454
+ .icon-play{background-position:-264px -72px;}
455
+ .icon-pause{background-position:-288px -72px;}
456
+ .icon-stop{background-position:-312px -72px;}
457
+ .icon-forward{background-position:-336px -72px;}
458
+ .icon-fast-forward{background-position:-360px -72px;}
459
+ .icon-step-forward{background-position:-384px -72px;}
460
+ .icon-eject{background-position:-408px -72px;}
461
+ .icon-chevron-left{background-position:-432px -72px;}
462
+ .icon-chevron-right{background-position:-456px -72px;}
463
+ .icon-plus-sign{background-position:0 -96px;}
464
+ .icon-minus-sign{background-position:-24px -96px;}
465
+ .icon-remove-sign{background-position:-48px -96px;}
466
+ .icon-ok-sign{background-position:-72px -96px;}
467
+ .icon-question-sign{background-position:-96px -96px;}
468
+ .icon-info-sign{background-position:-120px -96px;}
469
+ .icon-screenshot{background-position:-144px -96px;}
470
+ .icon-remove-circle{background-position:-168px -96px;}
471
+ .icon-ok-circle{background-position:-192px -96px;}
472
+ .icon-ban-circle{background-position:-216px -96px;}
473
+ .icon-arrow-left{background-position:-240px -96px;}
474
+ .icon-arrow-right{background-position:-264px -96px;}
475
+ .icon-arrow-up{background-position:-289px -96px;}
476
+ .icon-arrow-down{background-position:-312px -96px;}
477
+ .icon-share-alt{background-position:-336px -96px;}
478
+ .icon-resize-full{background-position:-360px -96px;}
479
+ .icon-resize-small{background-position:-384px -96px;}
480
+ .icon-plus{background-position:-408px -96px;}
481
+ .icon-minus{background-position:-433px -96px;}
482
+ .icon-asterisk{background-position:-456px -96px;}
483
+ .icon-exclamation-sign{background-position:0 -120px;}
484
+ .icon-gift{background-position:-24px -120px;}
485
+ .icon-leaf{background-position:-48px -120px;}
486
+ .icon-fire{background-position:-72px -120px;}
487
+ .icon-eye-open{background-position:-96px -120px;}
488
+ .icon-eye-close{background-position:-120px -120px;}
489
+ .icon-warning-sign{background-position:-144px -120px;}
490
+ .icon-plane{background-position:-168px -120px;}
491
+ .icon-calendar{background-position:-192px -120px;}
492
+ .icon-random{background-position:-216px -120px;width:16px;}
493
+ .icon-comment{background-position:-240px -120px;}
494
+ .icon-magnet{background-position:-264px -120px;}
495
+ .icon-chevron-up{background-position:-288px -120px;}
496
+ .icon-chevron-down{background-position:-313px -119px;}
497
+ .icon-retweet{background-position:-336px -120px;}
498
+ .icon-shopping-cart{background-position:-360px -120px;}
499
+ .icon-folder-close{background-position:-384px -120px;width:16px;}
500
+ .icon-folder-open{background-position:-408px -120px;width:16px;}
501
+ .icon-resize-vertical{background-position:-432px -119px;}
502
+ .icon-resize-horizontal{background-position:-456px -118px;}
503
+ .icon-hdd{background-position:0 -144px;}
504
+ .icon-bullhorn{background-position:-24px -144px;}
505
+ .icon-bell{background-position:-48px -144px;}
506
+ .icon-certificate{background-position:-72px -144px;}
507
+ .icon-thumbs-up{background-position:-96px -144px;}
508
+ .icon-thumbs-down{background-position:-120px -144px;}
509
+ .icon-hand-right{background-position:-144px -144px;}
510
+ .icon-hand-left{background-position:-168px -144px;}
511
+ .icon-hand-up{background-position:-192px -144px;}
512
+ .icon-hand-down{background-position:-216px -144px;}
513
+ .icon-circle-arrow-right{background-position:-240px -144px;}
514
+ .icon-circle-arrow-left{background-position:-264px -144px;}
515
+ .icon-circle-arrow-up{background-position:-288px -144px;}
516
+ .icon-circle-arrow-down{background-position:-312px -144px;}
517
+ .icon-globe{background-position:-336px -144px;}
518
+ .icon-wrench{background-position:-360px -144px;}
519
+ .icon-tasks{background-position:-384px -144px;}
520
+ .icon-filter{background-position:-408px -144px;}
521
+ .icon-briefcase{background-position:-432px -144px;}
522
+ .icon-fullscreen{background-position:-456px -144px;}
523
+ .btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em;}.btn-group:first-child{*margin-left:0;}
524
+ .btn-group+.btn-group{margin-left:5px;}
525
+ .btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px;}
526
+ .btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
527
+ .btn-group>.btn+.btn{margin-left:-1px;}
528
+ .btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px;}
529
+ .btn-group>.btn-mini{font-size:10.5px;}
530
+ .btn-group>.btn-small{font-size:11.9px;}
531
+ .btn-group>.btn-large{font-size:17.5px;}
532
+ .btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
533
+ .btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
534
+ .btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
535
+ .btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
536
+ .btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;}
537
+ .btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
538
+ .btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px;}
539
+ .btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px;}
540
+ .btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px;}
541
+ .btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px;}
542
+ .btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
543
+ .btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;}
544
+ .btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc;}
545
+ .btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;}
546
+ .btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;}
547
+ .btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;}
548
+ .btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;}
549
+ .btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;}
550
+ .btn .caret{margin-top:8px;margin-left:0;}
551
+ .btn-large .caret{margin-top:6px;}
552
+ .btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;}
553
+ .btn-mini .caret,.btn-small .caret{margin-top:8px;}
554
+ .dropup .btn-large .caret{border-bottom-width:5px;}
555
+ .btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
556
+ .btn-group-vertical{display:inline-block;*display:inline;*zoom:1;}
557
+ .btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
558
+ .btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px;}
559
+ .btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
560
+ .btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
561
+ .btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;}
562
+ .btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
563
+ .nav{margin-left:0;margin-bottom:20px;list-style:none;}
564
+ .nav>li>a{display:block;}
565
+ .nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee;}
566
+ .nav>li>a>img{max-width:none;}
567
+ .nav>.pull-right{float:right;}
568
+ .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
569
+ .nav li+.nav-header{margin-top:9px;}
570
+ .nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
571
+ .nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
572
+ .nav-list>li>a{padding:3px 15px;}
573
+ .nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
574
+ .nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px;}
575
+ .nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
576
+ .nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;}
577
+ .nav-tabs:after,.nav-pills:after{clear:both;}
578
+ .nav-tabs>li,.nav-pills>li{float:left;}
579
+ .nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
580
+ .nav-tabs{border-bottom:1px solid #ddd;}
581
+ .nav-tabs>li{margin-bottom:-1px;}
582
+ .nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #dddddd;}
583
+ .nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
584
+ .nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
585
+ .nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#ffffff;background-color:#0088cc;}
586
+ .nav-stacked>li{float:none;}
587
+ .nav-stacked>li>a{margin-right:0;}
588
+ .nav-tabs.nav-stacked{border-bottom:0;}
589
+ .nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
590
+ .nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
591
+ .nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
592
+ .nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2;}
593
+ .nav-pills.nav-stacked>li>a{margin-bottom:3px;}
594
+ .nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
595
+ .nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
596
+ .nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
597
+ .nav .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
598
+ .nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580;}
599
+ .nav-tabs .dropdown-toggle .caret{margin-top:8px;}
600
+ .nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;}
601
+ .nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
602
+ .nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer;}
603
+ .nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#ffffff;background-color:#999999;border-color:#999999;}
604
+ .nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
605
+ .tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999999;}
606
+ .tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;}
607
+ .tabbable:after{clear:both;}
608
+ .tab-content{overflow:auto;}
609
+ .tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;}
610
+ .tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
611
+ .tab-content>.active,.pill-content>.active{display:block;}
612
+ .tabs-below>.nav-tabs{border-top:1px solid #ddd;}
613
+ .tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;}
614
+ .tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd;}
615
+ .tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd;}
616
+ .tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;}
617
+ .tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
618
+ .tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
619
+ .tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
620
+ .tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
621
+ .tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
622
+ .tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
623
+ .tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
624
+ .tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
625
+ .tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
626
+ .nav>.disabled>a{color:#999999;}
627
+ .nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default;}
628
+ .navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2;}
629
+ .navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #ffffff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #ffffff, #f2f2f2);background-image:-o-linear-gradient(top, #ffffff, #f2f2f2);background-image:linear-gradient(to bottom, #ffffff, #f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);*zoom:1;}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0;}
630
+ .navbar-inner:after{clear:both;}
631
+ .navbar .container{width:auto;}
632
+ .nav-collapse.collapse{height:auto;overflow:visible;}
633
+ .navbar .brand{float:left;display:block;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777777;text-shadow:0 1px 0 #ffffff;}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none;}
634
+ .navbar-text{margin-bottom:0;line-height:40px;color:#777777;}
635
+ .navbar-link{color:#777777;}.navbar-link:hover,.navbar-link:focus{color:#333333;}
636
+ .navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #ffffff;}
637
+ .navbar .btn,.navbar .btn-group{margin-top:5px;}
638
+ .navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0;}
639
+ .navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0;}
640
+ .navbar-form:after{clear:both;}
641
+ .navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
642
+ .navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0;}
643
+ .navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
644
+ .navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
645
+ .navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0;}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
646
+ .navbar-static-top{position:static;margin-bottom:0;}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
647
+ .navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
648
+ .navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;}
649
+ .navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;}
650
+ .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
651
+ .navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
652
+ .navbar-fixed-top{top:0;}
653
+ .navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1);}
654
+ .navbar-fixed-bottom{bottom:0;}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1);}
655
+ .navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
656
+ .navbar .nav.pull-right{float:right;margin-right:0;}
657
+ .navbar .nav>li{float:left;}
658
+ .navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff;}
659
+ .navbar .nav .dropdown-toggle .caret{margin-top:8px;}
660
+ .navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333333;text-decoration:none;}
661
+ .navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);-moz-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);}
662
+ .navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#ededed;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9;}
663
+ .navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9;}
664
+ .navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
665
+ .btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
666
+ .navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
667
+ .navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
668
+ .navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
669
+ .navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
670
+ .navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333333;border-bottom-color:#333333;}
671
+ .navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555555;}
672
+ .navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777;}
673
+ .navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
674
+ .navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px;}
675
+ .navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px;}
676
+ .navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
677
+ .navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222222, #111111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));background-image:-webkit-linear-gradient(top, #222222, #111111);background-image:-o-linear-gradient(top, #222222, #111111);background-image:linear-gradient(to bottom, #222222, #111111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525;}
678
+ .navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#ffffff;}
679
+ .navbar-inverse .brand{color:#999999;}
680
+ .navbar-inverse .navbar-text{color:#999999;}
681
+ .navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#ffffff;}
682
+ .navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111;}
683
+ .navbar-inverse .navbar-link{color:#999999;}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#ffffff;}
684
+ .navbar-inverse .divider-vertical{border-left-color:#111111;border-right-color:#222222;}
685
+ .navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111111;color:#ffffff;}
686
+ .navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
687
+ .navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999;}
688
+ .navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
689
+ .navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc;}
690
+ .navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc;}
691
+ .navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
692
+ .navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
693
+ .navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#ffffff;background-color:#040404;*background-color:#000000;}
694
+ .navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000000 \9;}
695
+ .breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}.breadcrumb>li>.divider{padding:0 5px;color:#ccc;}
696
+ .breadcrumb>.active{color:#999999;}
697
+ .pagination{margin:20px 0;}
698
+ .pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
699
+ .pagination ul>li{display:inline;}
700
+ .pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;}
701
+ .pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5;}
702
+ .pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default;}
703
+ .pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999999;background-color:transparent;cursor:default;}
704
+ .pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
705
+ .pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
706
+ .pagination-centered{text-align:center;}
707
+ .pagination-right{text-align:right;}
708
+ .pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px;}
709
+ .pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
710
+ .pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
711
+ .pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px;}
712
+ .pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;}
713
+ .pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px;}
714
+ .pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px;}
715
+ .pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;}
716
+ .pager:after{clear:both;}
717
+ .pager li{display:inline;}
718
+ .pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
719
+ .pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5;}
720
+ .pager .next>a,.pager .next>span{float:right;}
721
+ .pager .previous>a,.pager .previous>span{float:left;}
722
+ .pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;}
723
+ .thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0;}
724
+ .thumbnails:after{clear:both;}
725
+ .row-fluid .thumbnails{margin-left:0;}
726
+ .thumbnails>li{float:left;margin-bottom:20px;margin-left:20px;}
727
+ .thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;}
728
+ a.thumbnail:hover,a.thumbnail:focus{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
729
+ .thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
730
+ .thumbnail .caption{padding:9px;color:#555555;}
731
+ .alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
732
+ .alert,.alert h4{color:#c09853;}
733
+ .alert h4{margin:0;}
734
+ .alert .close{position:relative;top:-2px;right:-21px;line-height:20px;}
735
+ .alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
736
+ .alert-success h4{color:#468847;}
737
+ .alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
738
+ .alert-danger h4,.alert-error h4{color:#b94a48;}
739
+ .alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
740
+ .alert-info h4{color:#3a87ad;}
741
+ .alert-block{padding-top:14px;padding-bottom:14px;}
742
+ .alert-block>p,.alert-block>ul{margin-bottom:0;}
743
+ .alert-block p+p{margin-top:5px;}
744
+ @-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
745
+ .progress .bar{width:0%;height:100%;color:#ffffff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
746
+ .progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);}
747
+ .progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));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);background-image:-moz-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);background-image:-o-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);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);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
748
+ .progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
749
+ .progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(to bottom, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);}
750
+ .progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));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);background-image:-moz-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);background-image:-o-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);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);}
751
+ .progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(to bottom, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);}
752
+ .progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));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);background-image:-moz-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);background-image:-o-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);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);}
753
+ .progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(to bottom, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);}
754
+ .progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));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);background-image:-moz-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);background-image:-o-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);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);}
755
+ .progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);}
756
+ .progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));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);background-image:-moz-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);background-image:-o-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);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);}
757
+ .hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
758
+ .hero-unit li{line-height:30px;}
759
+ .tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
760
+ .tooltip.top{margin-top:-3px;padding:5px 0;}
761
+ .tooltip.right{margin-left:3px;padding:0 5px;}
762
+ .tooltip.bottom{margin-top:3px;padding:5px 0;}
763
+ .tooltip.left{margin-left:-3px;padding:0 5px;}
764
+ .tooltip-inner{max-width:200px;padding:8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
765
+ .tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;}
766
+ .tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000;}
767
+ .tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000;}
768
+ .tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000;}
769
+ .tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000;}
770
+ .popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#ffffff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);white-space:normal;}.popover.top{margin-top:-10px;}
771
+ .popover.right{margin-left:10px;}
772
+ .popover.bottom{margin-top:10px;}
773
+ .popover.left{margin-left:-10px;}
774
+ .popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;}.popover-title:empty{display:none;}
775
+ .popover-content{padding:9px 14px;}
776
+ .popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;}
777
+ .popover .arrow{border-width:11px;}
778
+ .popover .arrow:after{border-width:10px;content:"";}
779
+ .popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0, 0, 0, 0.25);bottom:-11px;}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff;}
780
+ .popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0, 0, 0, 0.25);}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff;}
781
+ .popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0, 0, 0, 0.25);top:-11px;}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff;}
782
+ .popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0, 0, 0, 0.25);}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px;}
783
+ .modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
784
+ .modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
785
+ .modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:none;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
786
+ .modal.fade.in{top:10%;}
787
+ .modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
788
+ .modal-header h3{margin:0;line-height:30px;}
789
+ .modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px;}
790
+ .modal-form{margin-bottom:0;}
791
+ .modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0;}
792
+ .modal-footer:after{clear:both;}
793
+ .modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;}
794
+ .modal-footer .btn-group .btn+.btn{margin-left:-1px;}
795
+ .modal-footer .btn-block+.btn-block{margin-left:0;}
796
+ .dropup,.dropdown{position:relative;}
797
+ .dropdown-toggle{*margin-bottom:-3px;}
798
+ .dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
799
+ .caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";}
800
+ .dropdown .caret{margin-top:8px;margin-left:2px;}
801
+ .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;}.dropdown-menu.pull-right{right:0;left:auto;}
802
+ .dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
803
+ .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333333;white-space:nowrap;}
804
+ .dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{text-decoration:none;color:#ffffff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
805
+ .dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
806
+ .dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999999;}
807
+ .dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:default;}
808
+ .open{*z-index:1000;}.open>.dropdown-menu{display:block;}
809
+ .pull-right>.dropdown-menu{right:0;left:auto;}
810
+ .dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"";}
811
+ .dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;}
812
+ .dropdown-submenu{position:relative;}
813
+ .dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
814
+ .dropdown-submenu:hover>.dropdown-menu{display:block;}
815
+ .dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0;}
816
+ .dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;}
817
+ .dropdown-submenu:hover>a:after{border-left-color:#ffffff;}
818
+ .dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
819
+ .dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px;}
820
+ .typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
821
+ .accordion{margin-bottom:20px;}
822
+ .accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
823
+ .accordion-heading{border-bottom:0;}
824
+ .accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
825
+ .accordion-toggle{cursor:pointer;}
826
+ .accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
827
+ .carousel{position:relative;margin-bottom:20px;line-height:1;}
828
+ .carousel-inner{overflow:hidden;width:100%;position:relative;}
829
+ .carousel-inner>.item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1;}
830
+ .carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block;}
831
+ .carousel-inner>.active{left:0;}
832
+ .carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%;}
833
+ .carousel-inner>.next{left:100%;}
834
+ .carousel-inner>.prev{left:-100%;}
835
+ .carousel-inner>.next.left,.carousel-inner>.prev.right{left:0;}
836
+ .carousel-inner>.active.left{left:-100%;}
837
+ .carousel-inner>.active.right{left:100%;}
838
+ .carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
839
+ .carousel-control:hover,.carousel-control:focus{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
840
+ .carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none;}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255, 255, 255, 0.25);border-radius:5px;}
841
+ .carousel-indicators .active{background-color:#fff;}
842
+ .carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333333;background:rgba(0, 0, 0, 0.75);}
843
+ .carousel-caption h4,.carousel-caption p{color:#ffffff;line-height:20px;}
844
+ .carousel-caption h4{margin:0 0 5px;}
845
+ .carousel-caption p{margin-bottom:0;}
846
+ .well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
847
+ .well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
848
+ .well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
849
+ .close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
850
+ button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
851
+ .pull-right{float:right;}
852
+ .pull-left{float:left;}
853
+ .hide{display:none;}
854
+ .show{display:block;}
855
+ .invisible{visibility:hidden;}
856
+ .affix{position:fixed;}
857
+ .fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;}
858
+ .collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;}
859
+ @-ms-viewport{width:device-width;}.hidden{display:none;visibility:hidden;}
860
+ .visible-phone{display:none !important;}
861
+ .visible-tablet{display:none !important;}
862
+ .hidden-desktop{display:none !important;}
863
+ .visible-desktop{display:inherit !important;}
864
+ @media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important ;} .visible-tablet{display:inherit !important;} .hidden-tablet{display:none !important;}}@media (max-width:767px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important;} .visible-phone{display:inherit !important;} .hidden-phone{display:none !important;}}.visible-print{display:none !important;}
865
+ @media print{.visible-print{display:inherit !important;} .hidden-print{display:none !important;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-left:-20px;margin-right:-20px;} .container-fluid{padding:0;} .dl-horizontal dt{float:none;clear:none;width:auto;text-align:left;} .dl-horizontal dd{margin-left:0;} .container{width:auto;} .row-fluid{width:100%;} .row,.thumbnails{margin-left:0;} .thumbnails>li{float:none;margin-left:0;} [class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .row-fluid [class*="offset"]:first-child{margin-left:0;} .input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto;} .controls-row [class*="span"]+[class*="span"]{margin-left:0;} .modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0;}.modal.fade{top:-100px;} .modal.fade.in{top:20px;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:20px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px;} .media-object{margin-right:0;margin-left:0;} .modal{top:10px;left:10px;right:10px;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:20px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%;} .row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%;} .row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%;} .row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%;} .row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%;} .row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%;} .row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%;} .row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%;} .row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%;} .row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%;} .row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%;} .row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%;} .row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%;} .row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%;} .row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%;} .row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%;} .row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%;} .row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%;} .row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%;} .row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%;} .row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%;} .row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%;} .row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%;} .row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%;} .row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%;} .row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%;} .row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%;} .row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%;} .row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%;} .row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%;} .row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%;} .row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%;} .row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%;} .row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%;} .row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:20px;} input.span12,textarea.span12,.uneditable-input.span12{width:710px;} input.span11,textarea.span11,.uneditable-input.span11{width:648px;} input.span10,textarea.span10,.uneditable-input.span10{width:586px;} input.span9,textarea.span9,.uneditable-input.span9{width:524px;} input.span8,textarea.span8,.uneditable-input.span8{width:462px;} input.span7,textarea.span7,.uneditable-input.span7{width:400px;} input.span6,textarea.span6,.uneditable-input.span6{width:338px;} input.span5,textarea.span5,.uneditable-input.span5{width:276px;} input.span4,textarea.span4,.uneditable-input.span4{width:214px;} input.span3,textarea.span3,.uneditable-input.span3{width:152px;} input.span2,textarea.span2,.uneditable-input.span2{width:90px;} input.span1,textarea.span1,.uneditable-input.span1{width:28px;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:30px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%;} .row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%;} .row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%;} .row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%;} .row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%;} .row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%;} .row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%;} .row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%;} .row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%;} .row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%;} .row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%;} .row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%;} .row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%;} .row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%;} .row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%;} .row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%;} .row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%;} .row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%;} .row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%;} .row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%;} .row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%;} .row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%;} .row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%;} .row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%;} .row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%;} .row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%;} .row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%;} .row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%;} .row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%;} .row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%;} .row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%;} .row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%;} .row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%;} .row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%;} .row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:30px;} input.span12,textarea.span12,.uneditable-input.span12{width:1156px;} input.span11,textarea.span11,.uneditable-input.span11{width:1056px;} input.span10,textarea.span10,.uneditable-input.span10{width:956px;} input.span9,textarea.span9,.uneditable-input.span9{width:856px;} input.span8,textarea.span8,.uneditable-input.span8{width:756px;} input.span7,textarea.span7,.uneditable-input.span7{width:656px;} input.span6,textarea.span6,.uneditable-input.span6{width:556px;} input.span5,textarea.span5,.uneditable-input.span5{width:456px;} input.span4,textarea.span4,.uneditable-input.span4{width:356px;} input.span3,textarea.span3,.uneditable-input.span3{width:256px;} input.span2,textarea.span2,.uneditable-input.span2{width:156px;} input.span1,textarea.span1,.uneditable-input.span1{width:56px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;} .row-fluid .thumbnails{margin-left:0;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:static;} .navbar-fixed-top{margin-bottom:20px;} .navbar-fixed-bottom{margin-top:20px;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .nav-collapse{clear:both;} .nav-collapse .nav{float:none;margin:0 0 10px;} .nav-collapse .nav>li{float:none;} .nav-collapse .nav>li>a{margin-bottom:2px;} .nav-collapse .nav>.divider-vertical{display:none;} .nav-collapse .nav .nav-header{color:#777777;text-shadow:none;} .nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .nav-collapse .dropdown-menu li+li a{margin-bottom:2px;} .nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2;} .navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999999;} .navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111111;} .nav-collapse.in .btn-group{margin-top:5px;padding:0;} .nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:none;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .nav-collapse .open>.dropdown-menu{display:block;} .nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none;} .nav-collapse .dropdown-menu .divider{display:none;} .nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none;} .nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);} .navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111111;border-bottom-color:#111111;} .navbar .nav-collapse .nav.pull-right{float:none;margin-left:0;} .nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0;} .navbar .btn-navbar{display:block;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}}
backend/resources/bootstrap/img/clear.png ADDED
Binary file
backend/resources/bootstrap/img/glyphicons-halflings-white.png ADDED
Binary file
backend/resources/bootstrap/img/glyphicons-halflings.png ADDED
Binary file
backend/resources/bootstrap/img/loading.gif ADDED
Binary file
backend/resources/bootstrap/js/bootstrap-editable.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*! X-editable - v1.5.0
2
+ * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
3
+ * http://github.com/vitalets/x-editable
4
+ * Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
5
+ !function(a){"use strict";var b=function(b,c){this.options=a.extend({},a.fn.editableform.defaults,c),this.$div=a(b),this.options.scope||(this.options.scope=this)};b.prototype={constructor:b,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var b=this.$form.find(".editable-buttons");b.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&b.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){if(this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error)this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(a){a.preventDefault()});else{this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled");var b=null===this.value||void 0===this.value||""===this.value?this.options.defaultValue:this.value;this.input.value2input(b),this.$form.submit(a.proxy(this.submit,this))}this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var a,b;this.$form?(a=this.$form.outerWidth(),b=this.$form.outerHeight(),a&&this.$loading.width(a),b&&this.$loading.height(b),this.$form.hide()):(a=this.$loading.parent().width(),a&&this.$loading.width(a)),this.$loading.show()},showForm:function(a){this.$loading.hide(),this.$form.show(),a!==!1&&this.input.activate(),this.$div.triggerHandler("show")},error:function(b){var c,d=this.$form.find(".control-group"),e=this.$form.find(".editable-error-block");if(b===!1)d.removeClass(a.fn.editableform.errorGroupClass),e.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(b){c=b.split("\n");for(var f=0;f<c.length;f++)c[f]=a("<div>").text(c[f]).html();b=c.join("<br>")}d.addClass(a.fn.editableform.errorGroupClass),e.addClass(a.fn.editableform.errorBlockClass).html(b).show()}},submit:function(b){b.stopPropagation(),b.preventDefault();var c,d=this.input.input2value();if(c=this.validate(d))return this.error(c),this.showForm(),void 0;if(!this.options.savenochange&&this.input.value2str(d)==this.input.value2str(this.value))return this.$div.triggerHandler("nochange"),void 0;var e=this.input.value2submit(d);this.isSaving=!0,a.when(this.save(e)).done(a.proxy(function(a){this.isSaving=!1;var b="function"==typeof this.options.success?this.options.success.call(this.options.scope,a,d):null;return b===!1?(this.error(!1),this.showForm(!1),void 0):"string"==typeof b?(this.error(b),this.showForm(),void 0):(b&&"object"==typeof b&&b.hasOwnProperty("newValue")&&(d=b.newValue),this.error(!1),this.value=d,this.$div.triggerHandler("save",{newValue:d,submitValue:e,response:a}),void 0)},this)).fail(a.proxy(function(a){this.isSaving=!1;var b;b="function"==typeof this.options.error?this.options.error.call(this.options.scope,a,d):"string"==typeof a?a:a.responseText||a.statusText||"Unknown error!",this.error(b),this.showForm()},this))},save:function(b){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var c,d="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk,e=!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!==d&&void 0!==d));return e?(this.showLoading(),c={name:this.options.name||"",value:b,pk:d},"function"==typeof this.options.params?c=this.options.params.call(this.options.scope,c):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(c,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,c):a.ajax(a.extend({url:this.options.url,data:c,type:"POST"},this.options.ajaxOptions))):void 0},validate:function(a){return void 0===a&&(a=this.value),"function"==typeof this.options.validate?this.options.validate.call(this.options.scope,a):void 0},option:function(a,b){a in this.options&&(this.options[a]=b),"value"===a&&this.setValue(b)},setValue:function(a,b){this.value=b?this.input.str2value(a):a,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(c){var d=arguments;return this.each(function(){var e=a(this),f=e.data("editableform"),g="object"==typeof c&&c;f||e.data("editableform",f=new b(this,g)),"string"==typeof c&&f[c].apply(f,Array.prototype.slice.call(d,1))})},a.fn.editableform.Constructor=b,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',a.fn.editableform.loading='<div class="editableform-loading"></div>',a.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"}(window.jQuery),function(a){"use strict";a.fn.editableutils={inherit:function(a,b){var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.superclass=b.prototype},setCursorPosition:function(a,b){if(a.setSelectionRange)a.setSelectionRange(b,b);else if(a.createTextRange){var c=a.createTextRange();c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",b),c.select()}},tryParseJson:function(a,b){if("string"==typeof a&&a.length&&a.match(/^[\{\[].*[\}\]]$/))if(b)try{a=new Function("return "+a)()}catch(c){}finally{return a}else a=new Function("return "+a)();return a},sliceObj:function(b,c,d){var e,f,g={};if(!a.isArray(c)||!c.length)return g;for(var h=0;h<c.length;h++)e=c[h],b.hasOwnProperty(e)&&(g[e]=b[e]),d!==!0&&(f=e.toLowerCase(),b.hasOwnProperty(f)&&(g[e]=b[f]));return g},getConfigData:function(b){var c={};return a.each(b.data(),function(a,b){("object"!=typeof b||b&&"object"==typeof b&&(b.constructor===Object||b.constructor===Array))&&(c[a]=b)}),c},objectKeys:function(a){if(Object.keys)return Object.keys(a);if(a!==Object(a))throw new TypeError("Object.keys called on a non-object");var b,c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c},escape:function(b){return a("<div>").text(b).html()},itemsByValue:function(b,c,d){if(!c||null===b)return[];if("function"!=typeof d){var e=d||"value";d=function(a){return a[e]}}var f=a.isArray(b),g=[],h=this;return a.each(c,function(c,e){if(e.children)g=g.concat(h.itemsByValue(b,e.children,d));else if(f)a.grep(b,function(a){return a==(e&&"object"==typeof e?d(e):e)}).length&&g.push(e);else{var i=e&&"object"==typeof e?d(e):e;b==i&&g.push(e)}}),g},createInput:function(b){var c,d,e,f=b.type;return"date"===f&&("inline"===b.mode?a.fn.editabletypes.datefield?f="datefield":a.fn.editabletypes.dateuifield&&(f="dateuifield"):a.fn.editabletypes.date?f="date":a.fn.editabletypes.dateui&&(f="dateui"),"date"!==f||a.fn.editabletypes.date||(f="combodate")),"datetime"===f&&"inline"===b.mode&&(f="datetimefield"),"wysihtml5"!==f||a.fn.editabletypes[f]||(f="textarea"),"function"==typeof a.fn.editabletypes[f]?(c=a.fn.editabletypes[f],d=this.sliceObj(b,this.objectKeys(c.defaults)),e=new c(d)):(a.error("Unknown type: "+f),!1)},supportsTransitions:function(){var a=document.body||document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e<d.length;e++)if("string"==typeof b[d[e]+c])return!0;return!1}}}(window.jQuery),function(a){"use strict";var b=function(a,b){this.init(a,b)},c=function(a,b){this.init(a,b)};b.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(c,d){this.$element=a(c),this.options=a.extend({},a.fn.editableContainer.defaults,d),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",a.proxy(function(){this.destroy()},this)),a(document).data("editable-handlers-attached")||(a(document).on("keyup.editable",function(b){27===b.which&&a(".editable-open").editableContainer("hide")}),a(document).on("click.editable",function(c){var d,e=a(c.target),f=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(a.contains(document.documentElement,c.target)&&!e.is(document)){for(d=0;d<f.length;d++)if(e.is(f[d])||e.parents(f[d]).length)return;b.prototype.closeOthers(c.target)}}),a(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!a.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var b in this.options)b in this.defaults?this.containerOptions[b]=this.options[b]:this.formOptions[b]=this.options[b]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var a;return this.containerDataName&&(a=this.$element.data(this.containerDataName))?a:a=this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:a.proxy(this.save,this),nochange:a.proxy(function(){this.hide("nochange")},this),cancel:a.proxy(function(){this.hide("cancel")},this),show:a.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:a.proxy(this.setPosition,this),resize:a.proxy(this.setPosition,this),rendered:a.proxy(function(){this.$element.triggerHandler("shown",a(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(b){this.$element.addClass("editable-open"),b!==!1&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=a("<div>"),this.tip().is(this.innerCss)?this.tip().append(this.$form):this.tip().find(this.innerCss).append(this.$form),this.renderForm()},hide:function(a){if(this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")){if(this.$form.data("editableform").isSaving)return this.delayedHide={reason:a},void 0;this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",a||"manual")}},innerShow:function(){},innerHide:function(){},toggle:function(a){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(a)},setPosition:function(){},save:function(a,b){this.$element.triggerHandler("save",b),this.hide("save")},option:function(a,b){this.options[a]=b,a in this.containerOptions?(this.containerOptions[a]=b,this.setContainerOption(a,b)):(this.formOptions[a]=b,this.$form&&this.$form.editableform("option",a,b))},setContainerOption:function(a,b){this.call("option",a,b)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(b){a(".editable-open").each(function(c,d){if(d!==b&&!a(d).find(b).length){var e=a(d),f=e.data("editableContainer");f&&("cancel"===f.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===f.options.onblur&&e.data("editableContainer").tip().find("form").submit())}})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},a.fn.editableContainer=function(d){var e=arguments;return this.each(function(){var f=a(this),g="editableContainer",h=f.data(g),i="object"==typeof d&&d,j="inline"===i.mode?c:b;h||f.data(g,h=new j(this,i)),"string"==typeof d&&h[d].apply(h,Array.prototype.slice.call(e,1))})},a.fn.editableContainer.Popup=b,a.fn.editableContainer.Inline=c,a.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(a){a.handler&&a.handler()}}}(window.jQuery),function(a){"use strict";a.extend(a.fn.editableContainer.Inline.prototype,a.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=a("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,a.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})}(window.jQuery),function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.editable.defaults,c,a.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!a.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)};b.prototype={constructor:b,init:function(){var b,c=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=a.fn.editableutils.createInput(this.options),this.input){switch(void 0===this.options.value||null===this.options.value?(this.value=this.input.html2value(a.trim(this.$element.html())),c=!0):(this.options.value=a.fn.editableutils.tryParseJson(this.options.value,!0),this.value="string"==typeof this.options.value?this.input.str2value(this.options.value):this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",a.proxy(function(a){if(this.options.disabled||a.preventDefault(),"mouseenter"===this.options.toggle)this.show();else{var b="click"!==this.options.toggle;this.toggle(b)}},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":b=!0;break;case"auto":b=!a.trim(this.$element.text()).length&&null!==this.value&&void 0!==this.value&&!c;break;default:b=!1}a.when(b?this.render():!0).then(a.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var b=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",b,a.proxy(function(b){var c=a(b.target);c.data("editable")||(c.hasClass(this.options.emptyclass)&&c.empty(),c.editable(this.options).trigger(b))},this))},render:function(a){return this.options.display!==!1?this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,a):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,a):this.input.value2html(this.value,this.$element[0]):void 0},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(b,c){return b&&"object"==typeof b?(a.each(b,a.proxy(function(b,c){this.option(a.trim(b),c)},this)),void 0):(this.options[b]=c,"disabled"===b?c?this.disable():this.enable():("value"===b&&this.setValue(c),this.container&&this.container.option(b,c),this.input.option&&this.input.option(b,c),void 0))},handleEmpty:function(b){this.options.display!==!1&&(this.isEmpty=void 0!==b?b:"function"==typeof this.input.isEmpty?this.input.isEmpty(this.$element):""===a.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass)):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(b){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var c=a.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(c),this.$element.on("save.internal",a.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(b)}},hide:function(){this.container&&this.container.hide()},toggle:function(a){this.container&&this.container.tip().is(":visible")?this.hide():this.show(a)},save:function(a,b){if(this.options.unsavedclass){var c=!1;c=c||"function"==typeof this.options.url,c=c||this.options.display===!1,c=c||void 0!==b.response,c=c||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(b.newValue),c?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)}if(this.options.highlight){var d=this.$element,e=d.css("background-color");d.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===e&&(e=""),d.css("background-color",e),d.addClass("editable-bg-transition"),setTimeout(function(){d.removeClass("editable-bg-transition")},1700)},10)}this.setValue(b.newValue,!1,b.response)},validate:function(){return"function"==typeof this.options.validate?this.options.validate.call(this,this.value):void 0},setValue:function(b,c,d){this.value=c?this.input.str2value(b):b,this.container&&this.container.option("value",this.value),a.when(this.render(d)).then(a.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},a.fn.editable=function(c){var d={},e=arguments,f="editable";switch(c){case"validate":return this.each(function(){var b,c=a(this),e=c.data(f);e&&(b=e.validate())&&(d[e.options.name]=b)}),d;case"getValue":return 2===arguments.length&&arguments[1]===!0?d=this.eq(0).data(f).value:this.each(function(){var b=a(this),c=b.data(f);c&&void 0!==c.value&&null!==c.value&&(d[c.options.name]=c.input.value2submit(c.value))}),d;case"submit":var g,h=arguments[1]||{},i=this,j=this.editable("validate");return a.isEmptyObject(j)?(g=this.editable("getValue"),h.data&&a.extend(g,h.data),a.ajax(a.extend({url:h.url,data:g,type:"POST"},h.ajaxOptions)).success(function(a){"function"==typeof h.success&&h.success.call(i,a,h)}).error(function(){"function"==typeof h.error&&h.error.apply(i,arguments)})):"function"==typeof h.error&&h.error.call(i,j),this}return this.each(function(){var d=a(this),g=d.data(f),h="object"==typeof c&&c;return h&&h.selector?(g=new b(this,h),void 0):(g||d.data(f,g=new b(this,h)),"string"==typeof c&&g[c].apply(g,Array.prototype.slice.call(e,1)),void 0)})},a.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}}(window.jQuery),function(a){"use strict";a.fn.editabletypes={};var b=function(){};b.prototype={init:function(b,c,d){this.type=b,this.options=a.extend({},d,c)},prerender:function(){this.$tpl=a(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(b,c){a(c)[this.options.escape?"text":"html"](a.trim(b))},html2value:function(b){return a("<div>").html(b).text()},value2str:function(a){return a},str2value:function(a){return a},value2submit:function(a){return a},value2input:function(a){this.$input.val(a)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(b){return a("<div>").text(b).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(a){void 0!==this.options[a]&&null!==this.options[a]&&this.$input.attr(a,this.options[a])},option:function(a,b){this.options[a]=b}},b.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},a.extend(a.fn.editabletypes,{abstractinput:b})}(window.jQuery),function(a){"use strict";var b=function(){};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){var b=a.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),b.resolve()},function(){this.error=this.options.sourceError,b.resolve()}),b.promise()},html2value:function(){return null},value2html:function(b,c,d,e){var f=a.Deferred(),g=function(){"function"==typeof d?d.call(c,b,this.sourceData,e):this.value2htmlFinal(b,c),f.resolve()};return null===b?g.call(this):this.onSourceReady(g,function(){f.resolve()}),f.promise()},onSourceReady:function(b,c){var d;if(a.isFunction(this.options.source)?(d=this.options.source.call(this.options.scope),this.sourceData=null):d=this.options.source,this.options.sourceCache&&a.isArray(this.sourceData))return b.call(this),void 0;try{d=a.fn.editableutils.tryParseJson(d,!1)}catch(e){return c.call(this),void 0}if("string"==typeof d){if(this.options.sourceCache){var f,g=d;if(a(document).data(g)||a(document).data(g,{}),f=a(document).data(g),f.loading===!1&&f.sourceData)return this.sourceData=f.sourceData,this.doPrepend(),b.call(this),void 0;if(f.loading===!0)return f.callbacks.push(a.proxy(function(){this.sourceData=f.sourceData,this.doPrepend(),b.call(this)},this)),f.err_callbacks.push(a.proxy(c,this)),void 0;f.loading=!0,f.callbacks=[],f.err_callbacks=[]}var h=a.extend({url:d,type:"get",cache:!1,dataType:"json",success:a.proxy(function(d){f&&(f.loading=!1),this.sourceData=this.makeArray(d),a.isArray(this.sourceData)?(f&&(f.sourceData=this.sourceData,a.each(f.callbacks,function(){this.call()})),this.doPrepend(),b.call(this)):(c.call(this),f&&a.each(f.err_callbacks,function(){this.call()}))},this),error:a.proxy(function(){c.call(this),f&&(f.loading=!1,a.each(f.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);a.ajax(h)}else this.sourceData=this.makeArray(d),a.isArray(this.sourceData)?(this.doPrepend(),b.call(this)):c.call(this)},doPrepend:function(){null!==this.options.prepend&&void 0!==this.options.prepend&&(a.isArray(this.prependData)||(a.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=a.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),a.isArray(this.prependData)&&a.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData)))},renderList:function(){},value2htmlFinal:function(){},makeArray:function(b){var c,d,e,f,g=[];if(!b||"string"==typeof b)return null;if(a.isArray(b)){f=function(a,b){return d={value:a,text:b},c++>=2?!1:void 0};for(var h=0;h<b.length;h++)e=b[h],"object"==typeof e?(c=0,a.each(e,f),1===c?g.push(d):c>1&&(e.children&&(e.children=this.makeArray(e.children)),g.push(e))):g.push({value:e,text:e})}else a.each(b,function(a,b){g.push({value:a,text:b})});return g},option:function(a,b){this.options[a]=b,"source"===a&&(this.sourceData=null),"prepend"===a&&(this.prependData=null)}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),a.fn.editabletypes.list=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("text",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),a.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear&&this.toggleClear())},renderClear:function(){this.options.clear&&(this.$clear=a('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(a.proxy(function(b){if(!~a.inArray(b.keyCode,[40,38,9,13,27])){clearTimeout(this.t);var c=this;this.t=setTimeout(function(){c.toggleClear(b)},100)}},this)).parent().css("position","relative"),this.$clear.click(a.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(){if(this.$clear){var a=this.$input.val().length,b=this.$clear.is(":visible");a&&!b&&this.$clear.show(),!a&&b&&this.$clear.hide()}},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),a.fn.editabletypes.text=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("textarea",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(b){b.ctrlKey&&13===b.which&&a(this).closest("form").submit()})},activate:function(){a.fn.editabletypes.text.prototype.activate.call(this)}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),a.fn.editabletypes.textarea=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("select",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.list),a.extend(b.prototype,{renderList:function(){this.$input.empty();var b=function(c,d){var e;if(a.isArray(d))for(var f=0;f<d.length;f++)e={},d[f].children?(e.label=d[f].text,c.append(b(a("<optgroup>",e),d[f].children))):(e.value=d[f].value,d[f].disabled&&(e.disabled=!0),c.append(a("<option>",e).text(d[f].text)));return c};b(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(b){13===b.which&&a(this).closest("form").submit()})},value2htmlFinal:function(b,c){var d="",e=a.fn.editableutils.itemsByValue(b,this.sourceData);e.length&&(d=e[0].text),a.fn.editabletypes.abstractinput.prototype.value2html.call(this,d,c)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){a(this).closest("form").submit()})}}),b.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),a.fn.editabletypes.select=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("checklist",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.list),a.extend(b.prototype,{renderList:function(){var b;if(this.$tpl.empty(),a.isArray(this.sourceData)){for(var c=0;c<this.sourceData.length;c++)b=a("<label>").append(a("<input>",{type:"checkbox",value:this.sourceData[c].value})).append(a("<span>").text(" "+this.sourceData[c].text)),a("<div>").append(b).appendTo(this.$tpl);this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(b){return a.isArray(b)?b.sort().join(a.trim(this.options.separator)):""},str2value:function(b){var c,d=null;return"string"==typeof b&&b.length?(c=new RegExp("\\s*"+a.trim(this.options.separator)+"\\s*"),d=b.split(c)):d=a.isArray(b)?b:[b],d},value2input:function(b){this.$input.prop("checked",!1),a.isArray(b)&&b.length&&this.$input.each(function(c,d){var e=a(d);a.each(b,function(a,b){e.val()==b&&e.prop("checked",!0)})})},input2value:function(){var b=[];return this.$input.filter(":checked").each(function(c,d){b.push(a(d).val())}),b},value2htmlFinal:function(b,c){var d=[],e=a.fn.editableutils.itemsByValue(b,this.sourceData),f=this.options.escape;e.length?(a.each(e,function(b,c){var e=f?a.fn.editableutils.escape(c.text):c.text;d.push(e)}),a(c).html(d.join("<br>"))):a(c).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(b){13===b.which&&a(this).closest("form").submit()})}}),b.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),a.fn.editabletypes.checklist=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("password",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.text),a.extend(b.prototype,{value2html:function(b,c){b?a(c).text("[hidden]"):a(c).empty()},html2value:function(){return null}}),b.defaults=a.extend({},a.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),a.fn.editabletypes.password=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("email",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.text),b.defaults=a.extend({},a.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),a.fn.editabletypes.email=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("url",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.text),b.defaults=a.extend({},a.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),a.fn.editabletypes.url=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("tel",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.text),b.defaults=a.extend({},a.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),a.fn.editabletypes.tel=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("number",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.text),a.extend(b.prototype,{render:function(){b.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),b.defaults=a.extend({},a.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),a.fn.editabletypes.number=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("range",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.number),a.extend(b.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){a(this).siblings("output").text(a(this).val())})},activate:function(){this.$input.focus()}}),b.defaults=a.extend({},a.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),a.fn.editabletypes.range=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("time",a,b.defaults)
6
+ };a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){this.setClass()}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),a.fn.editabletypes.time=b}(window.jQuery),function(a){"use strict";var b=function(c){if(this.init("select2",c,b.defaults),c.select2=c.select2||{},this.sourceData=null,c.placeholder&&(c.select2.placeholder=c.placeholder),!c.select2.tags&&c.source){var d=c.source;a.isFunction(c.source)&&(d=c.source.call(c.scope)),"string"==typeof d?(c.select2.ajax=c.select2.ajax||{},c.select2.ajax.data||(c.select2.ajax.data=function(a){return{query:a}}),c.select2.ajax.results||(c.select2.ajax.results=function(a){return{results:a}}),c.select2.ajax.url=d):(this.sourceData=this.convertSource(d),c.select2.data=this.sourceData)}if(this.options.select2=a.extend({},b.defaults.select2,c.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc){var e=this.idFunc||"id";this.idFunc=function(a){return a[e]}}this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(a){return a.text})};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",a.proxy(function(a){this.sourceData=a.items.results},this)),this.isMultiple&&this.$input.on("change",function(){a(this).closest("form").parent().triggerHandler("resize")})},value2html:function(c,d){var e,f="",g=this;this.options.select2.tags?e=c:this.sourceData&&(e=a.fn.editableutils.itemsByValue(c,this.sourceData,this.idFunc)),a.isArray(e)?(f=[],a.each(e,function(a,b){f.push(b&&"object"==typeof b?g.formatSelection(b):b)})):e&&(f=g.formatSelection(e)),f=a.isArray(f)?f.join(this.options.viewseparator):f,b.superclass.value2html.call(this,f,d)},html2value:function(a){return this.options.select2.tags?this.str2value(a,this.options.viewseparator):null},value2input:function(b){if(this.$input.data("select2")?this.$input.val(b).trigger("change",!0):(this.$input.val(b),this.$input.select2(this.options.select2)),this.isRemote&&!this.isMultiple&&!this.options.select2.initSelection){var c=this.options.select2.id,d=this.options.select2.formatSelection;if(!c&&!d){var e={id:b,text:a(this.options.scope).text()};this.$input.select2("data",e)}}},input2value:function(){return this.$input.select2("val")},str2value:function(b,c){if("string"!=typeof b||!this.isMultiple)return b;c=c||this.options.select2.separator||a.fn.select2.defaults.separator;var d,e,f;if(null===b||b.length<1)return null;for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d},autosubmit:function(){this.$input.on("change",function(b,c){c||a(this).closest("form").submit()})},convertSource:function(b){if(a.isArray(b)&&b.length&&void 0!==b[0].value)for(var c=0;c<b.length;c++)void 0!==b[c].value&&(b[c].id=b[c].value,delete b[c].value);return b},destroy:function(){this.$input.data("select2")&&this.$input.select2("destroy")}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),a.fn.editabletypes.select2=b}(window.jQuery),function(a){var b=function(b,c){return this.$element=a(b),this.$element.is("input")?(this.options=a.extend({},a.fn.combodate.defaults,c,this.$element.data()),this.init(),void 0):(a.error("Combodate should be applied to INPUT element"),void 0)};b.prototype={constructor:b,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=a('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.$widget.on("change","select",a.proxy(function(){this.$element.val(this.getValue())},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var b=this.options.template;return a.each(this.map,function(a,c){c=c[0];var d=new RegExp(c+"+"),e=c.length>1?c.substring(1,2):c;b=b.replace(d,"{"+e+"}")}),b=b.replace(/ /g,"&nbsp;"),a.each(this.map,function(a,c){c=c[0];var d=c.length>1?c.substring(1,2):c;b=b.replace("{"+d+"}",'<select class="'+a+'"></select>')}),b},initCombos:function(){var b=this;a.each(this.map,function(a){var c,d,e=b.$widget.find("."+a);e.length&&(b["$"+a]=e,c="fill"+a.charAt(0).toUpperCase()+a.slice(1),d=b[c](),b["$"+a].html(b.renderItems(d)))})},initItems:function(a){var b,c=[];if("name"===this.options.firstItem){b=moment.relativeTime||moment.langData()._relativeTime;var d="function"==typeof b[a]?b[a](1,!0,a,!1):b[a];d=d.split(" ").reverse()[0],c.push(["",d])}else"empty"===this.options.firstItem&&c.push(["",""]);return c},renderItems:function(a){for(var b=[],c=0;c<a.length;c++)b.push('<option value="'+a[c][0]+'">'+a[c][1]+"</option>");return b.join("\n")},fillDay:function(){var a,b,c=this.initItems("d"),d=-1!==this.options.template.indexOf("DD");for(b=1;31>=b;b++)a=d?this.leadZero(b):b,c.push([b,a]);return c},fillMonth:function(){var a,b,c=this.initItems("M"),d=-1!==this.options.template.indexOf("MMMM"),e=-1!==this.options.template.indexOf("MMM"),f=-1!==this.options.template.indexOf("MM");for(b=0;11>=b;b++)a=d?moment().date(1).month(b).format("MMMM"):e?moment().date(1).month(b).format("MMM"):f?this.leadZero(b+1):b+1,c.push([b,a]);return c},fillYear:function(){var a,b,c=[],d=-1!==this.options.template.indexOf("YYYY");for(b=this.options.maxYear;b>=this.options.minYear;b--)a=d?b:(b+"").substring(2),c[this.options.yearDescending?"push":"unshift"]([b,a]);return c=this.initItems("y").concat(c)},fillHour:function(){var a,b,c=this.initItems("h"),d=-1!==this.options.template.indexOf("h"),e=(-1!==this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),f=d?1:0,g=d?12:23;for(b=f;g>=b;b++)a=e?this.leadZero(b):b,c.push([b,a]);return c},fillMinute:function(){var a,b,c=this.initItems("m"),d=-1!==this.options.template.indexOf("mm");for(b=0;59>=b;b+=this.options.minuteStep)a=d?this.leadZero(b):b,c.push([b,a]);return c},fillSecond:function(){var a,b,c=this.initItems("s"),d=-1!==this.options.template.indexOf("ss");for(b=0;59>=b;b+=this.options.secondStep)a=d?this.leadZero(b):b,c.push([b,a]);return c},fillAmpm:function(){var a=-1!==this.options.template.indexOf("a"),b=(-1!==this.options.template.indexOf("A"),[["am",a?"am":"AM"],["pm",a?"pm":"PM"]]);return b},getValue:function(b){var c,d={},e=this,f=!1;return a.each(this.map,function(a){if("ampm"!==a){var b="day"===a?1:0;return d[a]=e["$"+a]?parseInt(e["$"+a].val(),10):b,isNaN(d[a])?(f=!0,!1):void 0}}),f?"":(this.$ampm&&(d.hour=12===d.hour?"am"===this.$ampm.val()?0:12:"am"===this.$ampm.val()?d.hour:d.hour+12),c=moment([d.year,d.month,d.day,d.hour,d.minute,d.second]),this.highlight(c),b=void 0===b?this.options.format:b,null===b?c.isValid()?c:null:c.isValid()?c.format(b):"")},setValue:function(b){function c(b,c){var d={};return b.children("option").each(function(b,e){var f,g=a(e).attr("value");""!==g&&(f=Math.abs(g-c),("undefined"==typeof d.distance||f<d.distance)&&(d={value:g,distance:f}))}),d.value}if(b){var d="string"==typeof b?moment(b,this.options.format):moment(b),e=this,f={};d.isValid()&&(a.each(this.map,function(a,b){"ampm"!==a&&(f[a]=d[b[1]]())}),this.$ampm&&(f.hour>=12?(f.ampm="pm",f.hour>12&&(f.hour-=12)):(f.ampm="am",0===f.hour&&(f.hour=12))),a.each(f,function(a,b){e["$"+a]&&("minute"===a&&e.options.minuteStep>1&&e.options.roundTime&&(b=c(e["$"+a],b)),"second"===a&&e.options.secondStep>1&&e.options.roundTime&&(b=c(e["$"+a],b)),e["$"+a].val(b))}),this.$element.val(d.format(this.options.format)))}},highlight:function(a){a.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(a){return 9>=a?"0"+a:a},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},a.fn.combodate=function(c){var d,e=Array.apply(null,arguments);return e.shift(),"getValue"===c&&this.length&&(d=this.eq(0).data("combodate"))?d.getValue.apply(d,e):this.each(function(){var d=a(this),f=d.data("combodate"),g="object"==typeof c&&c;f||d.data("combodate",f=new b(this,g)),"string"==typeof c&&"function"==typeof f[c]&&f[c].apply(f,e)})},a.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY H : mm",value:null,minYear:1970,maxYear:2015,yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,roundTime:!0}}(window.jQuery),function(a){"use strict";var b=function(c){this.init("combodate",c,b.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),c.combodate=a.fn.editableutils.tryParseJson(c.combodate,!0),this.options.combodate=a.extend({},b.defaults.combodate,c.combodate,{format:this.options.format,template:this.options.template})};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===a.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(a,c){var d=a?a.format(this.options.viewformat):"";b.superclass.value2html.call(this,d,c)},html2value:function(a){return a?moment(a,this.options.viewformat):null},value2str:function(a){return a?a.format(this.options.format):""},str2value:function(a){return a?moment(a,this.options.format):null},value2submit:function(a){return this.value2str(a)},value2input:function(a){this.$input.combodate("setValue",a)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),a.fn.editabletypes.combodate=b}(window.jQuery),function(a){"use strict";var b=a.fn.editableform.Constructor.prototype.initInput;a.extend(a.fn.editableform.Constructor.prototype,{initTemplate:function(){this.$form=a(a.fn.editableform.template),this.$form.find(".editable-error-block").addClass("help-block")},initInput:function(){b.apply(this);var c=null===this.input.options.inputclass||this.input.options.inputclass===!1,d="input-medium",e="text,select,textarea,password,email,url,tel,number,range,time".split(",");~a.inArray(this.input.type,e)&&c&&(this.input.options.inputclass=d,this.input.$input.addClass(d))}}),a.fn.editableform.buttons='<button type="submit" class="btn btn-primary editable-submit"><i class="icon-ok icon-white"></i></button><button type="button" class="btn editable-cancel"><i class="icon-remove"></i></button>',a.fn.editableform.errorGroupClass="error",a.fn.editableform.errorBlockClass=null,a.fn.editableform.engine="bs2"}(window.jQuery),function(a){"use strict";a.extend(a.fn.editableContainer.Popup.prototype,{containerName:"popover",innerCss:a.fn.popover&&a(a.fn.popover.defaults.template).find("p").length?".popover-content p":".popover-content",defaults:a.fn.popover.defaults,initContainer:function(){a.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template});var b;this.$element.data("template")&&(b=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),b&&this.$element.data("template",b)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("destroy")},setContainerOption:function(a,b){this.container().options[a]=b},setPosition:function(){!function(){var b,c,d,e,f,g,h,i,j,k,l=this.tip();switch(f="function"==typeof this.options.placement?this.options.placement.call(this,l[0],this.$element[0]):this.options.placement,b=/in/.test(f),l.removeClass("top right bottom left").css({top:0,left:0,display:"block"}),c=this.getPosition(b),d=l[0].offsetWidth,e=l[0].offsetHeight,f=b?f.split(" ")[1]:f,i={top:c.top+c.height,left:c.left+c.width/2-d/2},h={top:c.top-e,left:c.left+c.width/2-d/2},j={top:c.top+c.height/2-e/2,left:c.left-d},k={top:c.top+c.height/2-e/2,left:c.left+c.width},f){case"bottom":i.top+e>a(window).scrollTop()+a(window).height()&&(f=h.top>a(window).scrollTop()?"top":k.left+d<a(window).scrollLeft()+a(window).width()?"right":j.left>a(window).scrollLeft()?"left":"right");break;case"top":h.top<a(window).scrollTop()&&(f=i.top+e<a(window).scrollTop()+a(window).height()?"bottom":k.left+d<a(window).scrollLeft()+a(window).width()?"right":j.left>a(window).scrollLeft()?"left":"right");break;case"left":j.left<a(window).scrollLeft()&&(f=k.left+d<a(window).scrollLeft()+a(window).width()?"right":h.top>a(window).scrollTop()?"top":h.top>a(window).scrollTop()?"bottom":"right");break;case"right":k.left+d>a(window).scrollLeft()+a(window).width()&&(j.left>a(window).scrollLeft()?f="left":h.top>a(window).scrollTop()?f="top":h.top>a(window).scrollTop()&&(f="bottom"))}switch(f){case"bottom":g=i;break;case"top":g=h;break;case"left":g=j;break;case"right":g=k}l.offset(g).addClass(f).addClass("in")}.call(this.container())}})}(window.jQuery),function(a){function b(){return new Date(Date.UTC.apply(Date,arguments))}function c(b,c){var d,e=a(b).data(),f={},g=new RegExp("^"+c.toLowerCase()+"([A-Z])"),c=new RegExp("^"+c.toLowerCase());for(var h in e)c.test(h)&&(d=h.replace(g,function(a,b){return b.toLowerCase()}),f[d]=e[h]);return f}function d(b){var c={};if(k[b]||(b=b.split("-")[0],k[b])){var d=k[b];return a.each(j,function(a,b){b in d&&(c[b]=d[b])}),c}}var e=function(b,c){this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".date")?this.element.find(".add-on, .btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(l.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};e.prototype={constructor:e,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(k[d]||(d=d.split("-")[0],k[d]||(d=i.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=l.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate=l.parseDate(c.startDate,e,c.language)),1/0!==c.endDate&&(c.endDate=l.parseDate(c.endDate,e,c.language)),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d=0;d<a.length;d++)b=a[d][0],c=a[d][1],b.on(c)},_unapplyEvents:function(a){for(var b,c,d=0;d<a.length;d++)b=a[d][0],c=a[d][1],b.off(c)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(this.update,this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(this.update,this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{mousedown:a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).size()||this.picker.is(a.target)||this.picker.find(a.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.date,e=new Date(d.getTime()+6e4*d.getTimezoneOffset());this.element.trigger({type:b,date:e,format:a.proxy(function(a){var b=a||this.o.format;return l.formatDate(d,b,this.o.language)},this)})},show:function(a){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),a&&a.preventDefault(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var a=this.getUTCDate();return new Date(a.getTime()+6e4*a.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(a){this.setUTCDate(new Date(a.getTime()-6e4*a.getTimezoneOffset()))},setUTCDate:function(a){this.date=a,this.setValue()},setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a):this.component&&this.element.find("input").val(a)},getFormattedDate:function(a){return void 0===a&&(a=this.o.format),l.formatDate(this.date,a,this.o.language)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b=parseInt(this.element.parents().filter(function(){return"auto"!=a(this).css("z-index")}).first().css("z-index"))+10,c=this.component?this.component.parent().offset():this.element.offset(),d=this.component?this.component.outerHeight(!0):this.element.outerHeight(!0);this.picker.css({top:c.top+d,left:c.left,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var a,b=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(a=arguments[0],b=!0):(a=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=l.parseDate(a,this.o.format,this.o.language),b&&this.setValue(),this.viewDate=this.date<this.o.startDate?new Date(this.o.startDate):this.date>this.o.endDate?new Date(this.o.endDate):new Date(this.date),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".datepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+k[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".datepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;12>b;)a+='<span class="month">'+k[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".datepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=this.date.valueOf(),g=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()==d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()==d&&b.getUTCMonth()>e)&&c.push("new"),this.o.todayHighlight&&b.getUTCFullYear()==g.getFullYear()&&b.getUTCMonth()==g.getMonth()&&b.getUTCDate()==g.getDate()&&c.push("today"),f&&b.valueOf()==f&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!=a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var c,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=1/0!==this.o.endDate?this.o.endDate.getUTCFullYear():1/0,j=1/0!==this.o.endDate?this.o.endDate.getUTCMonth():1/0;this.date&&this.date.valueOf(),this.picker.find(".datepicker-days thead th.datepicker-switch").text(k[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.clear").text(k[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var m=b(e,f-1,28,0,0,0,0),n=l.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var o=new Date(m);o.setUTCDate(o.getUTCDate()+42),o=o.valueOf();for(var p,q=[];m.valueOf()<o;){if(m.getUTCDay()==this.o.weekStart&&(q.push("<tr>"),this.o.calendarWeeks)){var r=new Date(+m+864e5*((this.o.weekStart-m.getUTCDay()-7)%7)),s=new Date(+r+864e5*((11-r.getUTCDay())%7)),t=new Date(+(t=b(s.getUTCFullYear(),0,1))+864e5*((11-t.getUTCDay())%7)),u=(s-t)/864e5/7+1;q.push('<td class="cw">'+u+"</td>")}p=this.getClassNames(m),p.push("day");var v=this.o.beforeShowDay(m);void 0===v?v={}:"boolean"==typeof v?v={enabled:v}:"string"==typeof v&&(v={classes:v}),v.enabled===!1&&p.push("disabled"),v.classes&&(p=p.concat(v.classes.split(/\s+/))),v.tooltip&&(c=v.tooltip),p=a.unique(p),q.push('<td class="'+p.join(" ")+'"'+(c?' title="'+c+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()==this.o.weekEnd&&q.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(q.join(""));var w=this.date&&this.date.getUTCFullYear(),x=this.picker.find(".datepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");w&&w==e&&x.eq(this.date.getUTCMonth()).addClass("active"),(g>e||e>i)&&x.addClass("disabled"),e==g&&x.slice(0,h).addClass("disabled"),e==i&&x.slice(j+1).addClass("disabled"),q="",e=10*parseInt(e/10,10);var y=this.picker.find(".datepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var z=-1;11>z;z++)q+='<span class="year'+(-1==z?" old":10==z?" new":"")+(w==e?" active":"")+(g>e||e>i?" disabled":"")+'">'+e+"</span>",e+=1;y.html(q)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),1/0!==this.o.endDate&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),1/0!==this.o.endDate&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(c){c.preventDefault();var d=a(c.target).closest("span, td, th");if(1==d.length)switch(d[0].nodeName.toLowerCase()){case"th":switch(d[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var e=l.modes[this.viewMode].navStep*("prev"==d[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,e);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,e)}this.fill();break;case"today":var f=new Date;f=b(f.getFullYear(),f.getMonth(),f.getDate(),0,0,0),this.showMode(-2);var g="linked"==this.o.todayBtn?null:"view";this._setDate(f,g);break;case"clear":var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":if(!d.is(".disabled")){if(this.viewDate.setUTCDate(1),d.is(".month")){var i=1,j=d.parent().find("span").index(d),k=this.viewDate.getUTCFullYear();this.viewDate.setUTCMonth(j),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(b(k,j,i,0,0,0,0))}else{var k=parseInt(d.text(),10)||0,i=1,j=0;this.viewDate.setUTCFullYear(k),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(b(k,j,i,0,0,0,0))}this.showMode(-1),this.fill()}break;case"td":if(d.is(".day")&&!d.is(".disabled")){var i=parseInt(d.text(),10)||1,k=this.viewDate.getUTCFullYear(),j=this.viewDate.getUTCMonth();d.is(".old")?0===j?(j=11,k-=1):j-=1:d.is(".new")&&(11==j?(j=0,k+=1):j+=1),this._setDate(b(k,j,i,0,0,0,0))}}},_setDate:function(a,b){b&&"date"!=b||(this.date=new Date(a)),b&&"view"!=b||(this.viewDate=new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&(c.change(),!this.o.autoclose||b&&"date"!=b||this.hide())},moveMonth:function(a,b){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1==h)d=-1==b?function(){return e.getUTCMonth()==g}:function(){return e.getUTCMonth()!=c},c=g+b,e.setUTCMonth(c),(0>c||c>11)&&(c=(c+12)%12);else{for(var i=0;h>i;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!=e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return 27==a.keyCode&&this.show(),void 0;var b,c,d,e=!1;switch(a.keyCode){case 27:this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37==a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.date,b),d=this.moveYear(this.viewDate,b)):a.shiftKey?(c=this.moveMonth(this.date,b),d=this.moveMonth(this.viewDate,b)):(c=new Date(this.date),c.setUTCDate(this.date.getUTCDate()+b),d=new Date(this.viewDate),d.setUTCDate(this.viewDate.getUTCDate()+b)),this.dateWithinRange(c)&&(this.date=c,this.viewDate=d,this.setValue(),this.update(),a.preventDefault(),e=!0);break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38==a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.date,b),d=this.moveYear(this.viewDate,b)):a.shiftKey?(c=this.moveMonth(this.date,b),d=this.moveMonth(this.viewDate,b)):(c=new Date(this.date),c.setUTCDate(this.date.getUTCDate()+7*b),d=new Date(this.viewDate),d.setUTCDate(this.viewDate.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.date=c,this.viewDate=d,this.setValue(),this.update(),a.preventDefault(),e=!0);break;case 13:this.hide(),a.preventDefault();break;case 9:this.hide()}if(e){this._trigger("changeDate");var f;this.isInput?f=this.element:this.component&&(f=this.element.find("input")),f&&f.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".datepicker-"+l.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var f=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).datepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("datepicker")}),this.updateDates()};f.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.date}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){var c=a(b.target).data("datepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!=e){if(d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;f>e&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates()}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().datepicker}};var g=a.fn.datepicker,h=a.fn.datepicker=function(b){var g=Array.apply(null,arguments);g.shift();var h;return this.each(function(){var j=a(this),k=j.data("datepicker"),l="object"==typeof b&&b;if(!k){var m=c(this,"date"),n=a.extend({},i,m,l),o=d(n.language),p=a.extend({},i,o,m,l);if(j.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||j.find("input").toArray()};j.data("datepicker",k=new f(this,a.extend(p,q)))}else j.data("datepicker",k=new e(this,p))}return"string"==typeof b&&"function"==typeof k[b]&&(h=k[b].apply(k,g),void 0!==h)?!1:void 0}),void 0!==h?h:this},i=a.fn.datepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},j=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=e;var k=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},l={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return 0===a%4&&0!==a%100||0===a%400},getDaysInMonth:function(a,b){return[31,l.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(c,d,f){if(c instanceof Date)return c;if("string"==typeof d&&(d=l.parseFormat(d)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(c)){var g,h,i=/([\-+]\d+)([dmwy])/,j=c.match(/([\-+]\d+)([dmwy])/g);c=new Date;for(var m=0;m<j.length;m++)switch(g=i.exec(j[m]),h=parseInt(g[1]),g[2]){case"d":c.setUTCDate(c.getUTCDate()+h);
7
+ break;case"m":c=e.prototype.moveMonth.call(e.prototype,c,h);break;case"w":c.setUTCDate(c.getUTCDate()+7*h);break;case"y":c=e.prototype.moveYear.call(e.prototype,c,h)}return b(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),0,0,0)}var n,o,g,j=c&&c.match(this.nonpunctuation)||[],c=new Date,p={},q=["yyyy","yy","M","MM","m","mm","d","dd"],r={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){for(b-=1;0>b;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!=b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};r.M=r.MM=r.mm=r.m,r.dd=r.d,c=b(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0);var s=d.parts.slice();if(j.length!=s.length&&(s=a(s).filter(function(b,c){return-1!==a.inArray(c,q)}).toArray()),j.length==s.length){for(var m=0,t=s.length;t>m;m++){if(n=parseInt(j[m],10),g=s[m],isNaN(n))switch(g){case"MM":o=a(k[f].months).filter(function(){var a=this.slice(0,j[m].length),b=j[m].slice(0,a.length);return a==b}),n=a.inArray(o[0],k[f].months)+1;break;case"M":o=a(k[f].monthsShort).filter(function(){var a=this.slice(0,j[m].length),b=j[m].slice(0,a.length);return a==b}),n=a.inArray(o[0],k[f].monthsShort)+1}p[g]=n}for(var u,m=0;m<q.length;m++)u=q[m],u in p&&!isNaN(p[u])&&r[u](c,p[u])}return c},formatDate:function(b,c,d){"string"==typeof c&&(c=l.parseFormat(c));var e={d:b.getUTCDate(),D:k[d].daysShort[b.getUTCDay()],DD:k[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:k[d].monthsShort[b.getUTCMonth()],MM:k[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m;for(var b=[],f=a.extend([],c.separators),g=0,h=c.parts.length;h>=g;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};l.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+l.headTemplate+"<tbody></tbody>"+l.footTemplate+"</table>"+"</div>"+'<div class="datepicker-months">'+'<table class="table-condensed">'+l.headTemplate+l.contTemplate+l.footTemplate+"</table>"+"</div>"+'<div class="datepicker-years">'+'<table class="table-condensed">'+l.headTemplate+l.contTemplate+l.footTemplate+"</table>"+"</div>"+"</div>",a.fn.datepicker.DPGlobal=l,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=g,this},a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),h.call(c,"show"))}),a(function(){h.call(a('[data-provide="datepicker-inline"]'))})}(window.jQuery),function(a){"use strict";a.fn.bdatepicker=a.fn.datepicker.noConflict(),a.fn.datepicker||(a.fn.datepicker=a.fn.bdatepicker);var b=function(a){this.init("date",a,b.defaults),this.initPicker(a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{initPicker:function(b,c){this.options.viewformat||(this.options.viewformat=this.options.format),b.datepicker=a.fn.editableutils.tryParseJson(b.datepicker,!0),this.options.datepicker=a.extend({},c.datepicker,b.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=a.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=a('<a href="#"></a>').html(this.options.clear).click(a.proxy(function(a){a.preventDefault(),a.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(a('<div class="editable-clear">').append(this.$clear)))},value2html:function(a,c){var d=a?this.dpg.formatDate(a,this.parsedViewFormat,this.options.datepicker.language):"";b.superclass.value2html.call(this,d,c)},html2value:function(a){return this.parseDate(a,this.parsedViewFormat)},value2str:function(a){return a?this.dpg.formatDate(a,this.parsedFormat,this.options.datepicker.language):""},str2value:function(a){return this.parseDate(a,this.parsedFormat)},value2submit:function(a){return this.value2str(a)},value2input:function(a){this.$input.bdatepicker("update",a)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(b){if(!a(b.currentTarget).is(".old")&&!a(b.currentTarget).is(".new")){var c=a(this).closest("form");setTimeout(function(){c.submit()},200)}})},parseDate:function(a,b){var c,d=null;return a&&(d=this.dpg.parseDate(a,b,this.options.datepicker.language),"string"==typeof a&&(c=this.dpg.formatDate(d,b,this.options.datepicker.language),a!==c&&(d=null))),d}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),a.fn.editabletypes.date=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("datefield",a,b.defaults),this.initPicker(a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.date),a.extend(b.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(a.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(a){this.$input.val(a?this.dpg.formatDate(a,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){a.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),b.defaults=a.extend({},a.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),a.fn.editabletypes.datefield=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("datetime",a,b.defaults),this.initPicker(a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{initPicker:function(b,c){this.options.viewformat||(this.options.viewformat=this.options.format),b.datetimepicker=a.fn.editableutils.tryParseJson(b.datetimepicker,!0),this.options.datetimepicker=a.extend({},c.datetimepicker,b.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=a.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(){var b=a(this).closest("form").parent();setTimeout(function(){b.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=a('<a href="#"></a>').html(this.options.clear).click(a.proxy(function(a){a.preventDefault(),a.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(a('<div class="editable-clear">').append(this.$clear)))},value2html:function(a,c){var d=a?this.dpg.formatDate(this.toUTC(a),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";return c?(b.superclass.value2html.call(this,d,c),void 0):d},html2value:function(a){var b=this.parseDate(a,this.parsedViewFormat);return b?this.fromUTC(b):null},value2str:function(a){return a?this.dpg.formatDate(this.toUTC(a),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(a){var b=this.parseDate(a,this.parsedFormat);return b?this.fromUTC(b):null},value2submit:function(a){return this.value2str(a)},value2input:function(a){a&&this.$input.data("datetimepicker").setDate(a)},input2value:function(){var a=this.$input.data("datetimepicker");return a.date?a.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(){var b=a(this).closest("form");setTimeout(function(){b.submit()},200)})},toUTC:function(a){return a?new Date(a.valueOf()-6e4*a.getTimezoneOffset()):a},fromUTC:function(a){return a?new Date(a.valueOf()+6e4*a.getTimezoneOffset()):a},parseDate:function(a,b){var c,d=null;return a&&(d=this.dpg.parseDate(a,b,this.options.datetimepicker.language,this.options.formatType),"string"==typeof a&&(c=this.dpg.formatDate(d,b,this.options.datetimepicker.language,this.options.formatType),a!==c&&(d=null))),d}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),a.fn.editabletypes.datetime=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("datetimefield",a,b.defaults),this.initPicker(a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.datetime),a.extend(b.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(a.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(a){this.$input.val(this.value2html(a)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){a.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),b.defaults=a.extend({},a.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),a.fn.editabletypes.datetimefield=b}(window.jQuery),function(a){"use strict";var b=function(c){this.init("typeahead",c,b.defaults),this.options.typeahead=a.extend({},b.defaults.typeahead,{matcher:this.matcher,sorter:this.sorter,highlighter:this.highlighter,updater:this.updater},c.typeahead)};a.fn.editableutils.inherit(b,a.fn.editabletypes.list),a.extend(b.prototype,{renderList:function(){this.$input=this.$tpl.is("input")?this.$tpl:this.$tpl.find('input[type="text"]'),this.options.typeahead.source=this.sourceData,this.$input.typeahead(this.options.typeahead);var b=this.$input.data("typeahead");b.render=a.proxy(this.typeaheadRender,b),b.select=a.proxy(this.typeaheadSelect,b),b.move=a.proxy(this.typeaheadMove,b),this.renderClear(),this.setClass(),this.setAttr("placeholder")},value2htmlFinal:function(b,c){if(this.getIsObjects()){var d=a.fn.editableutils.itemsByValue(b,this.sourceData);b=d.length?d[0].text:""}a.fn.editabletypes.abstractinput.prototype.value2html.call(this,b,c)},html2value:function(a){return a?a:null},value2input:function(b){if(this.getIsObjects()){var c=a.fn.editableutils.itemsByValue(b,this.sourceData);this.$input.data("value",b).val(c.length?c[0].text:"")}else this.$input.val(b)},input2value:function(){if(this.getIsObjects()){var b=this.$input.data("value"),c=a.fn.editableutils.itemsByValue(b,this.sourceData);return c.length&&c[0].text.toLowerCase()===this.$input.val().toLowerCase()?b:null}return this.$input.val()},getIsObjects:function(){if(void 0===this.isObjects){this.isObjects=!1;for(var a=0;a<this.sourceData.length;a++)if(this.sourceData[a].value!==this.sourceData[a].text){this.isObjects=!0;break}}return this.isObjects},activate:a.fn.editabletypes.text.prototype.activate,renderClear:a.fn.editabletypes.text.prototype.renderClear,postrender:a.fn.editabletypes.text.prototype.postrender,toggleClear:a.fn.editabletypes.text.prototype.toggleClear,clear:function(){a.fn.editabletypes.text.prototype.clear.call(this),this.$input.data("value","")},matcher:function(b){return a.fn.typeahead.Constructor.prototype.matcher.call(this,b.text)},sorter:function(a){for(var b,c,d=[],e=[],f=[];b=a.shift();)c=b.text,c.toLowerCase().indexOf(this.query.toLowerCase())?~c.indexOf(this.query)?e.push(b):f.push(b):d.push(b);return d.concat(e,f)},highlighter:function(b){return a.fn.typeahead.Constructor.prototype.highlighter.call(this,b.text)},updater:function(a){return this.$element.data("value",a.value),a.text},typeaheadRender:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).data("item",d),b.find("a").html(c.highlighter(d)),b[0]}),this.options.autoSelect&&b.first().addClass("active"),this.$menu.html(b),this},typeaheadSelect:function(){var a=this.$menu.find(".active").data("item");return(this.options.autoSelect||a)&&this.$element.val(this.updater(a)).change(),this.hide()},typeaheadMove:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:if(!this.$menu.find(".active").length)return;a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}}}),b.defaults=a.extend({},a.fn.editabletypes.list.defaults,{tpl:'<input type="text">',typeahead:null,clear:!0}),a.fn.editabletypes.typeahead=b}(window.jQuery);
backend/resources/bootstrap/js/bootstrap.js ADDED
@@ -0,0 +1,2170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ===================================================
2
+ * bootstrap-transition.js v2.3.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
4
+ * ===================================================
5
+ * Copyright 2012 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 ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
27
+ * ======================================================= */
28
+
29
+ $(function () {
30
+
31
+ $.support.transition = (function () {
32
+
33
+ var transitionEnd = (function () {
34
+
35
+ var el = document.createElement('bootstrap')
36
+ , transEndEventNames = {
37
+ 'WebkitTransition' : 'webkitTransitionEnd'
38
+ , 'MozTransition' : 'transitionend'
39
+ , 'OTransition' : 'oTransitionEnd otransitionend'
40
+ , 'transition' : 'transitionend'
41
+ }
42
+ , name
43
+
44
+ for (name in transEndEventNames){
45
+ if (el.style[name] !== undefined) {
46
+ return transEndEventNames[name]
47
+ }
48
+ }
49
+
50
+ }())
51
+
52
+ return transitionEnd && {
53
+ end: transitionEnd
54
+ }
55
+
56
+ })()
57
+
58
+ })
59
+
60
+ }(window.jQuery);
61
+ /* =========================================================
62
+ * bootstrap-modal.js v2.3.1
63
+ * http://twitter.github.com/bootstrap/javascript.html#modals
64
+ * =========================================================
65
+ * Copyright 2012 Twitter, Inc.
66
+ *
67
+ * Licensed under the Apache License, Version 2.0 (the "License");
68
+ * you may not use this file except in compliance with the License.
69
+ * You may obtain a copy of the License at
70
+ *
71
+ * http://www.apache.org/licenses/LICENSE-2.0
72
+ *
73
+ * Unless required by applicable law or agreed to in writing, software
74
+ * distributed under the License is distributed on an "AS IS" BASIS,
75
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
+ * See the License for the specific language governing permissions and
77
+ * limitations under the License.
78
+ * ========================================================= */
79
+
80
+
81
+ !function ($) {
82
+
83
+ "use strict"; // jshint ;_;
84
+
85
+
86
+ /* MODAL CLASS DEFINITION
87
+ * ====================== */
88
+
89
+ var Modal = function (element, options) {
90
+ this.options = options
91
+ this.$element = $(element)
92
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
93
+ this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
94
+ }
95
+
96
+ Modal.prototype = {
97
+
98
+ constructor: Modal
99
+
100
+ , toggle: function () {
101
+ return this[!this.isShown ? 'show' : 'hide']()
102
+ }
103
+
104
+ , show: function () {
105
+ var that = this
106
+ , e = $.Event('show')
107
+
108
+ this.$element.trigger(e)
109
+
110
+ if (this.isShown || e.isDefaultPrevented()) return
111
+
112
+ this.isShown = true
113
+
114
+ this.escape()
115
+
116
+ this.backdrop(function () {
117
+ var transition = $.support.transition && that.$element.hasClass('fade')
118
+
119
+ if (!that.$element.parent().length) {
120
+ that.$element.appendTo(document.body) //don't move modals dom position
121
+ }
122
+
123
+ that.$element.show()
124
+
125
+ if (transition) {
126
+ that.$element[0].offsetWidth // force reflow
127
+ }
128
+
129
+ that.$element
130
+ .addClass('in')
131
+ .attr('aria-hidden', false)
132
+
133
+ that.enforceFocus()
134
+
135
+ transition ?
136
+ that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
137
+ that.$element.focus().trigger('shown')
138
+
139
+ })
140
+ }
141
+
142
+ , hide: function (e) {
143
+ e && e.preventDefault()
144
+
145
+ var that = this
146
+
147
+ e = $.Event('hide')
148
+
149
+ this.$element.trigger(e)
150
+
151
+ if (!this.isShown || e.isDefaultPrevented()) return
152
+
153
+ this.isShown = false
154
+
155
+ this.escape()
156
+
157
+ $(document).off('focusin.modal')
158
+
159
+ this.$element
160
+ .removeClass('in')
161
+ .attr('aria-hidden', true)
162
+
163
+ $.support.transition && this.$element.hasClass('fade') ?
164
+ this.hideWithTransition() :
165
+ this.hideModal()
166
+ }
167
+
168
+ , enforceFocus: function () {
169
+ var that = this
170
+ $(document).on('focusin.modal', function (e) {
171
+ if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
172
+ that.$element.focus()
173
+ }
174
+ })
175
+ }
176
+
177
+ , escape: function () {
178
+ var that = this
179
+ if (this.isShown && this.options.keyboard) {
180
+ this.$element.on('keyup.dismiss.modal', function ( e ) {
181
+ e.which == 27 && that.hide()
182
+ })
183
+ } else if (!this.isShown) {
184
+ this.$element.off('keyup.dismiss.modal')
185
+ }
186
+ }
187
+
188
+ , hideWithTransition: function () {
189
+ var that = this
190
+ , timeout = setTimeout(function () {
191
+ that.$element.off($.support.transition.end)
192
+ that.hideModal()
193
+ }, 500)
194
+
195
+ this.$element.one($.support.transition.end, function () {
196
+ clearTimeout(timeout)
197
+ that.hideModal()
198
+ })
199
+ }
200
+
201
+ , hideModal: function () {
202
+ var that = this
203
+ this.$element.hide()
204
+ this.backdrop(function () {
205
+ that.removeBackdrop()
206
+ that.$element.trigger('hidden')
207
+ })
208
+ }
209
+
210
+ , removeBackdrop: function () {
211
+ this.$backdrop && this.$backdrop.remove()
212
+ this.$backdrop = null
213
+ }
214
+
215
+ , backdrop: function (callback) {
216
+ var that = this
217
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
218
+
219
+ if (this.isShown && this.options.backdrop) {
220
+ var doAnimate = $.support.transition && animate
221
+
222
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
223
+ .appendTo(document.body)
224
+
225
+ this.$backdrop.click(
226
+ this.options.backdrop == 'static' ?
227
+ $.proxy(this.$element[0].focus, this.$element[0])
228
+ : $.proxy(this.hide, this)
229
+ )
230
+
231
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
232
+
233
+ this.$backdrop.addClass('in')
234
+
235
+ if (!callback) return
236
+
237
+ doAnimate ?
238
+ this.$backdrop.one($.support.transition.end, callback) :
239
+ callback()
240
+
241
+ } else if (!this.isShown && this.$backdrop) {
242
+ this.$backdrop.removeClass('in')
243
+
244
+ $.support.transition && this.$element.hasClass('fade')?
245
+ this.$backdrop.one($.support.transition.end, callback) :
246
+ callback()
247
+
248
+ } else if (callback) {
249
+ callback()
250
+ }
251
+ }
252
+ }
253
+
254
+
255
+ /* MODAL PLUGIN DEFINITION
256
+ * ======================= */
257
+
258
+ var old = $.fn.modal
259
+
260
+ $.fn.modal = function (option) {
261
+ return this.each(function () {
262
+ var $this = $(this)
263
+ , data = $this.data('modal')
264
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
265
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
266
+ if (typeof option == 'string') data[option]()
267
+ else if (options.show) data.show()
268
+ })
269
+ }
270
+
271
+ $.fn.modal.defaults = {
272
+ backdrop: true
273
+ , keyboard: true
274
+ , show: true
275
+ }
276
+
277
+ $.fn.modal.Constructor = Modal
278
+
279
+
280
+ /* MODAL NO CONFLICT
281
+ * ================= */
282
+
283
+ $.fn.modal.noConflict = function () {
284
+ $.fn.modal = old
285
+ return this
286
+ }
287
+
288
+
289
+ /* MODAL DATA-API
290
+ * ============== */
291
+
292
+ $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
293
+ var $this = $(this)
294
+ , href = $this.attr('href')
295
+ , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
296
+ , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
297
+
298
+ e.preventDefault()
299
+
300
+ $target
301
+ .modal(option)
302
+ .one('hide', function () {
303
+ $this.focus()
304
+ })
305
+ })
306
+
307
+ }(window.jQuery);
308
+
309
+ /* ============================================================
310
+ * bootstrap-dropdown.js v2.3.1
311
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
312
+ * ============================================================
313
+ * Copyright 2012 Twitter, Inc.
314
+ *
315
+ * Licensed under the Apache License, Version 2.0 (the "License");
316
+ * you may not use this file except in compliance with the License.
317
+ * You may obtain a copy of the License at
318
+ *
319
+ * http://www.apache.org/licenses/LICENSE-2.0
320
+ *
321
+ * Unless required by applicable law or agreed to in writing, software
322
+ * distributed under the License is distributed on an "AS IS" BASIS,
323
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
324
+ * See the License for the specific language governing permissions and
325
+ * limitations under the License.
326
+ * ============================================================ */
327
+
328
+
329
+ !function ($) {
330
+
331
+ "use strict"; // jshint ;_;
332
+
333
+
334
+ /* DROPDOWN CLASS DEFINITION
335
+ * ========================= */
336
+
337
+ var toggle = '[data-toggle=dropdown]'
338
+ , Dropdown = function (element) {
339
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
340
+ $('html').on('click.dropdown.data-api', function () {
341
+ $el.parent().removeClass('open')
342
+ })
343
+ }
344
+
345
+ Dropdown.prototype = {
346
+
347
+ constructor: Dropdown
348
+
349
+ , toggle: function (e) {
350
+ var $this = $(this)
351
+ , $parent
352
+ , isActive
353
+
354
+ if ($this.is('.disabled, :disabled')) return
355
+
356
+ $parent = getParent($this)
357
+
358
+ isActive = $parent.hasClass('open')
359
+
360
+ clearMenus()
361
+
362
+ if (!isActive) {
363
+ $parent.toggleClass('open')
364
+ }
365
+
366
+ $this.focus()
367
+
368
+ return false
369
+ }
370
+
371
+ , keydown: function (e) {
372
+ var $this
373
+ , $items
374
+ , $active
375
+ , $parent
376
+ , isActive
377
+ , index
378
+
379
+ if (!/(38|40|27)/.test(e.keyCode)) return
380
+
381
+ $this = $(this)
382
+
383
+ e.preventDefault()
384
+ e.stopPropagation()
385
+
386
+ if ($this.is('.disabled, :disabled')) return
387
+
388
+ $parent = getParent($this)
389
+
390
+ isActive = $parent.hasClass('open')
391
+
392
+ if (!isActive || (isActive && e.keyCode == 27)) {
393
+ if (e.which == 27) $parent.find(toggle).focus()
394
+ return $this.click()
395
+ }
396
+
397
+ $items = $('[role=menu] li:not(.divider):visible a', $parent)
398
+
399
+ if (!$items.length) return
400
+
401
+ index = $items.index($items.filter(':focus'))
402
+
403
+ if (e.keyCode == 38 && index > 0) index-- // up
404
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
405
+ if (!~index) index = 0
406
+
407
+ $items
408
+ .eq(index)
409
+ .focus()
410
+ }
411
+
412
+ }
413
+
414
+ function clearMenus() {
415
+ $(toggle).each(function () {
416
+ getParent($(this)).removeClass('open')
417
+ })
418
+ }
419
+
420
+ function getParent($this) {
421
+ var selector = $this.attr('data-target')
422
+ , $parent
423
+
424
+ if (!selector) {
425
+ selector = $this.attr('href')
426
+ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
427
+ }
428
+
429
+ $parent = selector && $(selector)
430
+
431
+ if (!$parent || !$parent.length) $parent = $this.parent()
432
+
433
+ return $parent
434
+ }
435
+
436
+
437
+ /* DROPDOWN PLUGIN DEFINITION
438
+ * ========================== */
439
+
440
+ var old = $.fn.dropdown
441
+
442
+ $.fn.dropdown = function (option) {
443
+ return this.each(function () {
444
+ var $this = $(this)
445
+ , data = $this.data('dropdown')
446
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
447
+ if (typeof option == 'string') data[option].call($this)
448
+ })
449
+ }
450
+
451
+ $.fn.dropdown.Constructor = Dropdown
452
+
453
+
454
+ /* DROPDOWN NO CONFLICT
455
+ * ==================== */
456
+
457
+ $.fn.dropdown.noConflict = function () {
458
+ $.fn.dropdown = old
459
+ return this
460
+ }
461
+
462
+
463
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
464
+ * =================================== */
465
+
466
+ $(document)
467
+ .on('click.dropdown.data-api', clearMenus)
468
+ .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
469
+ .on('click.dropdown-menu', function (e) { e.stopPropagation() })
470
+ .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
471
+ .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
472
+
473
+ }(window.jQuery);
474
+
475
+ /* =============================================================
476
+ * bootstrap-scrollspy.js v2.3.1
477
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
478
+ * =============================================================
479
+ * Copyright 2012 Twitter, Inc.
480
+ *
481
+ * Licensed under the Apache License, Version 2.0 (the "License");
482
+ * you may not use this file except in compliance with the License.
483
+ * You may obtain a copy of the License at
484
+ *
485
+ * http://www.apache.org/licenses/LICENSE-2.0
486
+ *
487
+ * Unless required by applicable law or agreed to in writing, software
488
+ * distributed under the License is distributed on an "AS IS" BASIS,
489
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
490
+ * See the License for the specific language governing permissions and
491
+ * limitations under the License.
492
+ * ============================================================== */
493
+
494
+
495
+ !function ($) {
496
+
497
+ "use strict"; // jshint ;_;
498
+
499
+
500
+ /* SCROLLSPY CLASS DEFINITION
501
+ * ========================== */
502
+
503
+ function ScrollSpy(element, options) {
504
+ var process = $.proxy(this.process, this)
505
+ , $element = $(element).is('body') ? $(window) : $(element)
506
+ , href
507
+ this.options = $.extend({}, $.fn.scrollspy.defaults, options)
508
+ this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
509
+ this.selector = (this.options.target
510
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
511
+ || '') + ' .nav li > a'
512
+ this.$body = $('body')
513
+ this.refresh()
514
+ this.process()
515
+ }
516
+
517
+ ScrollSpy.prototype = {
518
+
519
+ constructor: ScrollSpy
520
+
521
+ , refresh: function () {
522
+ var self = this
523
+ , $targets
524
+
525
+ this.offsets = $([])
526
+ this.targets = $([])
527
+
528
+ $targets = this.$body
529
+ .find(this.selector)
530
+ .map(function () {
531
+ var $el = $(this)
532
+ , href = $el.data('target') || $el.attr('href')
533
+ , $href = /^#\w/.test(href) && $(href)
534
+ return ( $href
535
+ && $href.length
536
+ && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
537
+ })
538
+ .sort(function (a, b) { return a[0] - b[0] })
539
+ .each(function () {
540
+ self.offsets.push(this[0])
541
+ self.targets.push(this[1])
542
+ })
543
+ }
544
+
545
+ , process: function () {
546
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
547
+ , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
548
+ , maxScroll = scrollHeight - this.$scrollElement.height()
549
+ , offsets = this.offsets
550
+ , targets = this.targets
551
+ , activeTarget = this.activeTarget
552
+ , i
553
+
554
+ if (scrollTop >= maxScroll) {
555
+ return activeTarget != (i = targets.last()[0])
556
+ && this.activate ( i )
557
+ }
558
+
559
+ for (i = offsets.length; i--;) {
560
+ activeTarget != targets[i]
561
+ && scrollTop >= offsets[i]
562
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
563
+ && this.activate( targets[i] )
564
+ }
565
+ }
566
+
567
+ , activate: function (target) {
568
+ var active
569
+ , selector
570
+
571
+ this.activeTarget = target
572
+
573
+ $(this.selector)
574
+ .parent('.active')
575
+ .removeClass('active')
576
+
577
+ selector = this.selector
578
+ + '[data-target="' + target + '"],'
579
+ + this.selector + '[href="' + target + '"]'
580
+
581
+ active = $(selector)
582
+ .parent('li')
583
+ .addClass('active')
584
+
585
+ if (active.parent('.dropdown-menu').length) {
586
+ active = active.closest('li.dropdown').addClass('active')
587
+ }
588
+
589
+ active.trigger('activate')
590
+ }
591
+
592
+ }
593
+
594
+
595
+ /* SCROLLSPY PLUGIN DEFINITION
596
+ * =========================== */
597
+
598
+ var old = $.fn.scrollspy
599
+
600
+ $.fn.scrollspy = function (option) {
601
+ return this.each(function () {
602
+ var $this = $(this)
603
+ , data = $this.data('scrollspy')
604
+ , options = typeof option == 'object' && option
605
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
606
+ if (typeof option == 'string') data[option]()
607
+ })
608
+ }
609
+
610
+ $.fn.scrollspy.Constructor = ScrollSpy
611
+
612
+ $.fn.scrollspy.defaults = {
613
+ offset: 10
614
+ }
615
+
616
+
617
+ /* SCROLLSPY NO CONFLICT
618
+ * ===================== */
619
+
620
+ $.fn.scrollspy.noConflict = function () {
621
+ $.fn.scrollspy = old
622
+ return this
623
+ }
624
+
625
+
626
+ /* SCROLLSPY DATA-API
627
+ * ================== */
628
+
629
+ $(window).on('load', function () {
630
+ $('[data-spy="scroll"]').each(function () {
631
+ var $spy = $(this)
632
+ $spy.scrollspy($spy.data())
633
+ })
634
+ })
635
+
636
+ }(window.jQuery);
637
+ /* ========================================================
638
+ * bootstrap-tab.js v2.3.1
639
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
640
+ * ========================================================
641
+ * Copyright 2012 Twitter, Inc.
642
+ *
643
+ * Licensed under the Apache License, Version 2.0 (the "License");
644
+ * you may not use this file except in compliance with the License.
645
+ * You may obtain a copy of the License at
646
+ *
647
+ * http://www.apache.org/licenses/LICENSE-2.0
648
+ *
649
+ * Unless required by applicable law or agreed to in writing, software
650
+ * distributed under the License is distributed on an "AS IS" BASIS,
651
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
652
+ * See the License for the specific language governing permissions and
653
+ * limitations under the License.
654
+ * ======================================================== */
655
+
656
+
657
+ !function ($) {
658
+
659
+ "use strict"; // jshint ;_;
660
+
661
+
662
+ /* TAB CLASS DEFINITION
663
+ * ==================== */
664
+
665
+ var Tab = function (element) {
666
+ this.element = $(element)
667
+ }
668
+
669
+ Tab.prototype = {
670
+
671
+ constructor: Tab
672
+
673
+ , show: function () {
674
+ var $this = this.element
675
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
676
+ , selector = $this.attr('data-target')
677
+ , previous
678
+ , $target
679
+ , e
680
+
681
+ if (!selector) {
682
+ selector = $this.attr('href')
683
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
684
+ }
685
+
686
+ if ( $this.parent('li').hasClass('active') ) return
687
+
688
+ previous = $ul.find('.active:last a')[0]
689
+
690
+ e = $.Event('show', {
691
+ relatedTarget: previous
692
+ })
693
+
694
+ $this.trigger(e)
695
+
696
+ if (e.isDefaultPrevented()) return
697
+
698
+ $target = $(selector)
699
+
700
+ this.activate($this.parent('li'), $ul)
701
+ this.activate($target, $target.parent(), function () {
702
+ $this.trigger({
703
+ type: 'shown'
704
+ , relatedTarget: previous
705
+ })
706
+ })
707
+ }
708
+
709
+ , activate: function ( element, container, callback) {
710
+ var $active = container.find('> .active')
711
+ , transition = callback
712
+ && $.support.transition
713
+ && $active.hasClass('fade')
714
+
715
+ function next() {
716
+ $active
717
+ .removeClass('active')
718
+ .find('> .dropdown-menu > .active')
719
+ .removeClass('active')
720
+
721
+ element.addClass('active')
722
+
723
+ if (transition) {
724
+ element[0].offsetWidth // reflow for transition
725
+ element.addClass('in')
726
+ } else {
727
+ element.removeClass('fade')
728
+ }
729
+
730
+ if ( element.parent('.dropdown-menu') ) {
731
+ element.closest('li.dropdown').addClass('active')
732
+ }
733
+
734
+ callback && callback()
735
+ }
736
+
737
+ transition ?
738
+ $active.one($.support.transition.end, next) :
739
+ next()
740
+
741
+ $active.removeClass('in')
742
+ }
743
+ }
744
+
745
+
746
+ /* TAB PLUGIN DEFINITION
747
+ * ===================== */
748
+
749
+ var old = $.fn.tab
750
+
751
+ $.fn.tab = function ( option ) {
752
+ return this.each(function () {
753
+ var $this = $(this)
754
+ , data = $this.data('tab')
755
+ if (!data) $this.data('tab', (data = new Tab(this)))
756
+ if (typeof option == 'string') data[option]()
757
+ })
758
+ }
759
+
760
+ $.fn.tab.Constructor = Tab
761
+
762
+
763
+ /* TAB NO CONFLICT
764
+ * =============== */
765
+
766
+ $.fn.tab.noConflict = function () {
767
+ $.fn.tab = old
768
+ return this
769
+ }
770
+
771
+
772
+ /* TAB DATA-API
773
+ * ============ */
774
+
775
+ $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
776
+ e.preventDefault()
777
+ $(this).tab('show')
778
+ })
779
+
780
+ }(window.jQuery);
781
+ /* ===========================================================
782
+ * bootstrap-tooltip.js v2.3.1
783
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
784
+ * Inspired by the original jQuery.tipsy by Jason Frame
785
+ * ===========================================================
786
+ * Copyright 2012 Twitter, Inc.
787
+ *
788
+ * Licensed under the Apache License, Version 2.0 (the "License");
789
+ * you may not use this file except in compliance with the License.
790
+ * You may obtain a copy of the License at
791
+ *
792
+ * http://www.apache.org/licenses/LICENSE-2.0
793
+ *
794
+ * Unless required by applicable law or agreed to in writing, software
795
+ * distributed under the License is distributed on an "AS IS" BASIS,
796
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
797
+ * See the License for the specific language governing permissions and
798
+ * limitations under the License.
799
+ * ========================================================== */
800
+
801
+
802
+ !function ($) {
803
+
804
+ "use strict"; // jshint ;_;
805
+
806
+
807
+ /* TOOLTIP PUBLIC CLASS DEFINITION
808
+ * =============================== */
809
+
810
+ var Tooltip = function (element, options) {
811
+ this.init('tooltip', element, options)
812
+ }
813
+
814
+ Tooltip.prototype = {
815
+
816
+ constructor: Tooltip
817
+
818
+ , init: function (type, element, options) {
819
+ var eventIn
820
+ , eventOut
821
+ , triggers
822
+ , trigger
823
+ , i
824
+
825
+ this.type = type
826
+ this.$element = $(element)
827
+ this.options = this.getOptions(options)
828
+ this.enabled = true
829
+
830
+ triggers = this.options.trigger.split(' ')
831
+
832
+ for (i = triggers.length; i--;) {
833
+ trigger = triggers[i]
834
+ if (trigger == 'click') {
835
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
836
+ } else if (trigger != 'manual') {
837
+ eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
838
+ eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
839
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
840
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
841
+ }
842
+ }
843
+
844
+ this.options.selector ?
845
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
846
+ this.fixTitle()
847
+ }
848
+
849
+ , getOptions: function (options) {
850
+ options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
851
+
852
+ if (options.delay && typeof options.delay == 'number') {
853
+ options.delay = {
854
+ show: options.delay
855
+ , hide: options.delay
856
+ }
857
+ }
858
+
859
+ return options
860
+ }
861
+
862
+ , enter: function (e) {
863
+ var defaults = $.fn[this.type].defaults
864
+ , options = {}
865
+ , self
866
+
867
+ this._options && $.each(this._options, function (key, value) {
868
+ if (defaults[key] != value) options[key] = value
869
+ }, this)
870
+
871
+ self = $(e.currentTarget)[this.type](options).data(this.type)
872
+
873
+ if (!self.options.delay || !self.options.delay.show) return self.show()
874
+
875
+ clearTimeout(this.timeout)
876
+ self.hoverState = 'in'
877
+ this.timeout = setTimeout(function() {
878
+ if (self.hoverState == 'in') self.show()
879
+ }, self.options.delay.show)
880
+ }
881
+
882
+ , leave: function (e) {
883
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
884
+
885
+ if (this.timeout) clearTimeout(this.timeout)
886
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
887
+
888
+ self.hoverState = 'out'
889
+ this.timeout = setTimeout(function() {
890
+ if (self.hoverState == 'out') self.hide()
891
+ }, self.options.delay.hide)
892
+ }
893
+
894
+ , show: function () {
895
+ var $tip
896
+ , pos
897
+ , actualWidth
898
+ , actualHeight
899
+ , placement
900
+ , tp
901
+ , e = $.Event('show')
902
+
903
+ if (this.hasContent() && this.enabled) {
904
+ this.$element.trigger(e)
905
+ if (e.isDefaultPrevented()) return
906
+ $tip = this.tip()
907
+ this.setContent()
908
+
909
+ if (this.options.animation) {
910
+ $tip.addClass('fade')
911
+ }
912
+
913
+ placement = typeof this.options.placement == 'function' ?
914
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
915
+ this.options.placement
916
+
917
+ $tip
918
+ .detach()
919
+ .css({ top: 0, left: 0, display: 'block' })
920
+
921
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
922
+
923
+ pos = this.getPosition()
924
+
925
+ actualWidth = $tip[0].offsetWidth
926
+ actualHeight = $tip[0].offsetHeight
927
+
928
+ switch (placement) {
929
+ case 'bottom':
930
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
931
+ break
932
+ case 'top':
933
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
934
+ break
935
+ case 'left':
936
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
937
+ break
938
+ case 'right':
939
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
940
+ break
941
+ }
942
+
943
+ this.applyPlacement(tp, placement)
944
+ this.$element.trigger('shown')
945
+ }
946
+ }
947
+
948
+ , applyPlacement: function(offset, placement){
949
+ var $tip = this.tip()
950
+ , width = $tip[0].offsetWidth
951
+ , height = $tip[0].offsetHeight
952
+ , actualWidth
953
+ , actualHeight
954
+ , delta
955
+ , replace
956
+
957
+ $tip
958
+ .offset(offset)
959
+ .addClass(placement)
960
+ .addClass('in')
961
+
962
+ actualWidth = $tip[0].offsetWidth
963
+ actualHeight = $tip[0].offsetHeight
964
+
965
+ if (placement == 'top' && actualHeight != height) {
966
+ offset.top = offset.top + height - actualHeight
967
+ replace = true
968
+ }
969
+
970
+ if (placement == 'bottom' || placement == 'top') {
971
+ delta = 0
972
+
973
+ if (offset.left < 0){
974
+ delta = offset.left * -2
975
+ offset.left = 0
976
+ $tip.offset(offset)
977
+ actualWidth = $tip[0].offsetWidth
978
+ actualHeight = $tip[0].offsetHeight
979
+ }
980
+
981
+ this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
982
+ } else {
983
+ this.replaceArrow(actualHeight - height, actualHeight, 'top')
984
+ }
985
+
986
+ if (replace) $tip.offset(offset)
987
+ }
988
+
989
+ , replaceArrow: function(delta, dimension, position){
990
+ this
991
+ .arrow()
992
+ .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
993
+ }
994
+
995
+ , setContent: function () {
996
+ var $tip = this.tip()
997
+ , title = this.getTitle()
998
+
999
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1000
+ $tip.removeClass('fade in top bottom left right')
1001
+ }
1002
+
1003
+ , hide: function () {
1004
+ var that = this
1005
+ , $tip = this.tip()
1006
+ , e = $.Event('hide')
1007
+
1008
+ this.$element.trigger(e)
1009
+ if (e.isDefaultPrevented()) return
1010
+
1011
+ $tip.removeClass('in')
1012
+
1013
+ function removeWithAnimation() {
1014
+ var timeout = setTimeout(function () {
1015
+ $tip.off($.support.transition.end).detach()
1016
+ }, 500)
1017
+
1018
+ $tip.one($.support.transition.end, function () {
1019
+ clearTimeout(timeout)
1020
+ $tip.detach()
1021
+ })
1022
+ }
1023
+
1024
+ $.support.transition && this.$tip.hasClass('fade') ?
1025
+ removeWithAnimation() :
1026
+ $tip.detach()
1027
+
1028
+ this.$element.trigger('hidden')
1029
+
1030
+ return this
1031
+ }
1032
+
1033
+ , fixTitle: function () {
1034
+ var $e = this.$element
1035
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
1036
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1037
+ }
1038
+ }
1039
+
1040
+ , hasContent: function () {
1041
+ return this.getTitle()
1042
+ }
1043
+
1044
+ , getPosition: function () {
1045
+ var el = this.$element[0]
1046
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
1047
+ width: el.offsetWidth
1048
+ , height: el.offsetHeight
1049
+ }, this.$element.offset())
1050
+ }
1051
+
1052
+ , getTitle: function () {
1053
+ var title
1054
+ , $e = this.$element
1055
+ , o = this.options
1056
+
1057
+ title = $e.attr('data-original-title')
1058
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1059
+
1060
+ return title
1061
+ }
1062
+
1063
+ , tip: function () {
1064
+ return this.$tip = this.$tip || $(this.options.template)
1065
+ }
1066
+
1067
+ , arrow: function(){
1068
+ return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
1069
+ }
1070
+
1071
+ , validate: function () {
1072
+ if (!this.$element[0].parentNode) {
1073
+ this.hide()
1074
+ this.$element = null
1075
+ this.options = null
1076
+ }
1077
+ }
1078
+
1079
+ , enable: function () {
1080
+ this.enabled = true
1081
+ }
1082
+
1083
+ , disable: function () {
1084
+ this.enabled = false
1085
+ }
1086
+
1087
+ , toggleEnabled: function () {
1088
+ this.enabled = !this.enabled
1089
+ }
1090
+
1091
+ , toggle: function (e) {
1092
+ var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
1093
+ self.tip().hasClass('in') ? self.hide() : self.show()
1094
+ }
1095
+
1096
+ , destroy: function () {
1097
+ this.hide().$element.off('.' + this.type).removeData(this.type)
1098
+ }
1099
+
1100
+ }
1101
+
1102
+
1103
+ /* TOOLTIP PLUGIN DEFINITION
1104
+ * ========================= */
1105
+
1106
+ var old = $.fn.tooltip
1107
+
1108
+ $.fn.tooltip = function ( option ) {
1109
+ return this.each(function () {
1110
+ var $this = $(this)
1111
+ , data = $this.data('tooltip')
1112
+ , options = typeof option == 'object' && option
1113
+ if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
1114
+ if (typeof option == 'string') data[option]()
1115
+ })
1116
+ }
1117
+
1118
+ $.fn.tooltip.Constructor = Tooltip
1119
+
1120
+ $.fn.tooltip.defaults = {
1121
+ animation: true
1122
+ , placement: 'top'
1123
+ , selector: false
1124
+ , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
1125
+ , trigger: 'hover focus'
1126
+ , title: ''
1127
+ , delay: 0
1128
+ , html: false
1129
+ , container: false
1130
+ }
1131
+
1132
+
1133
+ /* TOOLTIP NO CONFLICT
1134
+ * =================== */
1135
+
1136
+ $.fn.tooltip.noConflict = function () {
1137
+ $.fn.tooltip = old
1138
+ return this
1139
+ }
1140
+
1141
+ }(window.jQuery);
1142
+
1143
+ /* ===========================================================
1144
+ * bootstrap-popover.js v2.3.1
1145
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
1146
+ * ===========================================================
1147
+ * Copyright 2012 Twitter, Inc.
1148
+ *
1149
+ * Licensed under the Apache License, Version 2.0 (the "License");
1150
+ * you may not use this file except in compliance with the License.
1151
+ * You may obtain a copy of the License at
1152
+ *
1153
+ * http://www.apache.org/licenses/LICENSE-2.0
1154
+ *
1155
+ * Unless required by applicable law or agreed to in writing, software
1156
+ * distributed under the License is distributed on an "AS IS" BASIS,
1157
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1158
+ * See the License for the specific language governing permissions and
1159
+ * limitations under the License.
1160
+ * =========================================================== */
1161
+
1162
+
1163
+ !function ($) {
1164
+
1165
+ "use strict"; // jshint ;_;
1166
+
1167
+
1168
+ /* POPOVER PUBLIC CLASS DEFINITION
1169
+ * =============================== */
1170
+
1171
+ var Popover = function (element, options) {
1172
+ this.init('popover', element, options)
1173
+ }
1174
+
1175
+
1176
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
1177
+ ========================================== */
1178
+
1179
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
1180
+
1181
+ constructor: Popover
1182
+
1183
+ , setContent: function () {
1184
+ var $tip = this.tip()
1185
+ , title = this.getTitle()
1186
+ , content = this.getContent()
1187
+
1188
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1189
+ $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
1190
+
1191
+ $tip.removeClass('fade top bottom left right in')
1192
+ }
1193
+
1194
+ , hasContent: function () {
1195
+ return this.getTitle() || this.getContent()
1196
+ }
1197
+
1198
+ , getContent: function () {
1199
+ var content
1200
+ , $e = this.$element
1201
+ , o = this.options
1202
+
1203
+ content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
1204
+ || $e.attr('data-content')
1205
+
1206
+ return content
1207
+ }
1208
+
1209
+ , tip: function () {
1210
+ if (!this.$tip) {
1211
+ this.$tip = $(this.options.template)
1212
+ }
1213
+ return this.$tip
1214
+ }
1215
+
1216
+ , destroy: function () {
1217
+ this.hide().$element.off('.' + this.type).removeData(this.type)
1218
+ }
1219
+
1220
+ })
1221
+
1222
+
1223
+ /* POPOVER PLUGIN DEFINITION
1224
+ * ======================= */
1225
+
1226
+ var old = $.fn.popover
1227
+
1228
+ $.fn.popover = function (option) {
1229
+ return this.each(function () {
1230
+ var $this = $(this)
1231
+ , data = $this.data('popover')
1232
+ , options = typeof option == 'object' && option
1233
+ if (!data) $this.data('popover', (data = new Popover(this, options)))
1234
+ if (typeof option == 'string') data[option]()
1235
+ })
1236
+ }
1237
+
1238
+ $.fn.popover.Constructor = Popover
1239
+
1240
+ $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
1241
+ placement: 'right'
1242
+ , trigger: 'click'
1243
+ , content: ''
1244
+ , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1245
+ })
1246
+
1247
+
1248
+ /* POPOVER NO CONFLICT
1249
+ * =================== */
1250
+
1251
+ $.fn.popover.noConflict = function () {
1252
+ $.fn.popover = old
1253
+ return this
1254
+ }
1255
+
1256
+ }(window.jQuery);
1257
+
1258
+ /* ==========================================================
1259
+ * bootstrap-alert.js v2.3.1
1260
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
1261
+ * ==========================================================
1262
+ * Copyright 2012 Twitter, Inc.
1263
+ *
1264
+ * Licensed under the Apache License, Version 2.0 (the "License");
1265
+ * you may not use this file except in compliance with the License.
1266
+ * You may obtain a copy of the License at
1267
+ *
1268
+ * http://www.apache.org/licenses/LICENSE-2.0
1269
+ *
1270
+ * Unless required by applicable law or agreed to in writing, software
1271
+ * distributed under the License is distributed on an "AS IS" BASIS,
1272
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1273
+ * See the License for the specific language governing permissions and
1274
+ * limitations under the License.
1275
+ * ========================================================== */
1276
+
1277
+
1278
+ !function ($) {
1279
+
1280
+ "use strict"; // jshint ;_;
1281
+
1282
+
1283
+ /* ALERT CLASS DEFINITION
1284
+ * ====================== */
1285
+
1286
+ var dismiss = '[data-dismiss="alert"]'
1287
+ , Alert = function (el) {
1288
+ $(el).on('click', dismiss, this.close)
1289
+ }
1290
+
1291
+ Alert.prototype.close = function (e) {
1292
+ var $this = $(this)
1293
+ , selector = $this.attr('data-target')
1294
+ , $parent
1295
+
1296
+ if (!selector) {
1297
+ selector = $this.attr('href')
1298
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1299
+ }
1300
+
1301
+ $parent = $(selector)
1302
+
1303
+ e && e.preventDefault()
1304
+
1305
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
1306
+
1307
+ $parent.trigger(e = $.Event('close'))
1308
+
1309
+ if (e.isDefaultPrevented()) return
1310
+
1311
+ $parent.removeClass('in')
1312
+
1313
+ function removeElement() {
1314
+ $parent
1315
+ .trigger('closed')
1316
+ .remove()
1317
+ }
1318
+
1319
+ $.support.transition && $parent.hasClass('fade') ?
1320
+ $parent.on($.support.transition.end, removeElement) :
1321
+ removeElement()
1322
+ }
1323
+
1324
+
1325
+ /* ALERT PLUGIN DEFINITION
1326
+ * ======================= */
1327
+
1328
+ var old = $.fn.alert
1329
+
1330
+ $.fn.alert = function (option) {
1331
+ return this.each(function () {
1332
+ var $this = $(this)
1333
+ , data = $this.data('alert')
1334
+ if (!data) $this.data('alert', (data = new Alert(this)))
1335
+ if (typeof option == 'string') data[option].call($this)
1336
+ })
1337
+ }
1338
+
1339
+ $.fn.alert.Constructor = Alert
1340
+
1341
+
1342
+ /* ALERT NO CONFLICT
1343
+ * ================= */
1344
+
1345
+ $.fn.alert.noConflict = function () {
1346
+ $.fn.alert = old
1347
+ return this
1348
+ }
1349
+
1350
+
1351
+ /* ALERT DATA-API
1352
+ * ============== */
1353
+
1354
+ $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
1355
+
1356
+ }(window.jQuery);
1357
+ /* ============================================================
1358
+ * bootstrap-button.js v2.3.1
1359
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
1360
+ * ============================================================
1361
+ * Copyright 2012 Twitter, Inc.
1362
+ *
1363
+ * Licensed under the Apache License, Version 2.0 (the "License");
1364
+ * you may not use this file except in compliance with the License.
1365
+ * You may obtain a copy of the License at
1366
+ *
1367
+ * http://www.apache.org/licenses/LICENSE-2.0
1368
+ *
1369
+ * Unless required by applicable law or agreed to in writing, software
1370
+ * distributed under the License is distributed on an "AS IS" BASIS,
1371
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1372
+ * See the License for the specific language governing permissions and
1373
+ * limitations under the License.
1374
+ * ============================================================ */
1375
+
1376
+
1377
+ !function ($) {
1378
+
1379
+ "use strict"; // jshint ;_;
1380
+
1381
+
1382
+ /* BUTTON PUBLIC CLASS DEFINITION
1383
+ * ============================== */
1384
+
1385
+ var Button = function (element, options) {
1386
+ this.$element = $(element)
1387
+ this.options = $.extend({}, $.fn.button.defaults, options)
1388
+ }
1389
+
1390
+ Button.prototype.setState = function (state) {
1391
+ var d = 'disabled'
1392
+ , $el = this.$element
1393
+ , data = $el.data()
1394
+ , val = $el.is('input') ? 'val' : 'html'
1395
+
1396
+ state = state + 'Text'
1397
+ data.resetText || $el.data('resetText', $el[val]())
1398
+
1399
+ $el[val](data[state] || this.options[state])
1400
+
1401
+ // push to event loop to allow forms to submit
1402
+ setTimeout(function () {
1403
+ state == 'loadingText' ?
1404
+ $el.addClass(d).attr(d, d) :
1405
+ $el.removeClass(d).removeAttr(d)
1406
+ }, 0)
1407
+ }
1408
+
1409
+ Button.prototype.toggle = function () {
1410
+ var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
1411
+
1412
+ $parent && $parent
1413
+ .find('.active')
1414
+ .removeClass('active')
1415
+
1416
+ this.$element.toggleClass('active')
1417
+ }
1418
+
1419
+
1420
+ /* BUTTON PLUGIN DEFINITION
1421
+ * ======================== */
1422
+
1423
+ var old = $.fn.button
1424
+
1425
+ $.fn.button = function (option) {
1426
+ return this.each(function () {
1427
+ var $this = $(this)
1428
+ , data = $this.data('button')
1429
+ , options = typeof option == 'object' && option
1430
+ if (!data) $this.data('button', (data = new Button(this, options)))
1431
+ if (option == 'toggle') data.toggle()
1432
+ else if (option) data.setState(option)
1433
+ })
1434
+ }
1435
+
1436
+ $.fn.button.defaults = {
1437
+ loadingText: 'loading...'
1438
+ }
1439
+
1440
+ $.fn.button.Constructor = Button
1441
+
1442
+
1443
+ /* BUTTON NO CONFLICT
1444
+ * ================== */
1445
+
1446
+ $.fn.button.noConflict = function () {
1447
+ $.fn.button = old
1448
+ return this
1449
+ }
1450
+
1451
+
1452
+ /* BUTTON DATA-API
1453
+ * =============== */
1454
+
1455
+ $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
1456
+ var $btn = $(e.target)
1457
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
1458
+ $btn.button('toggle')
1459
+ })
1460
+
1461
+ }(window.jQuery);
1462
+ /* =============================================================
1463
+ * bootstrap-collapse.js v2.3.1
1464
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
1465
+ * =============================================================
1466
+ * Copyright 2012 Twitter, Inc.
1467
+ *
1468
+ * Licensed under the Apache License, Version 2.0 (the "License");
1469
+ * you may not use this file except in compliance with the License.
1470
+ * You may obtain a copy of the License at
1471
+ *
1472
+ * http://www.apache.org/licenses/LICENSE-2.0
1473
+ *
1474
+ * Unless required by applicable law or agreed to in writing, software
1475
+ * distributed under the License is distributed on an "AS IS" BASIS,
1476
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1477
+ * See the License for the specific language governing permissions and
1478
+ * limitations under the License.
1479
+ * ============================================================ */
1480
+
1481
+
1482
+ !function ($) {
1483
+
1484
+ "use strict"; // jshint ;_;
1485
+
1486
+
1487
+ /* COLLAPSE PUBLIC CLASS DEFINITION
1488
+ * ================================ */
1489
+
1490
+ var Collapse = function (element, options) {
1491
+ this.$element = $(element)
1492
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
1493
+
1494
+ if (this.options.parent) {
1495
+ this.$parent = $(this.options.parent)
1496
+ }
1497
+
1498
+ this.options.toggle && this.toggle()
1499
+ }
1500
+
1501
+ Collapse.prototype = {
1502
+
1503
+ constructor: Collapse
1504
+
1505
+ , dimension: function () {
1506
+ var hasWidth = this.$element.hasClass('width')
1507
+ return hasWidth ? 'width' : 'height'
1508
+ }
1509
+
1510
+ , show: function () {
1511
+ var dimension
1512
+ , scroll
1513
+ , actives
1514
+ , hasData
1515
+
1516
+ if (this.transitioning || this.$element.hasClass('in')) return
1517
+
1518
+ dimension = this.dimension()
1519
+ scroll = $.camelCase(['scroll', dimension].join('-'))
1520
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
1521
+
1522
+ if (actives && actives.length) {
1523
+ hasData = actives.data('collapse')
1524
+ if (hasData && hasData.transitioning) return
1525
+ actives.collapse('hide')
1526
+ hasData || actives.data('collapse', null)
1527
+ }
1528
+
1529
+ this.$element[dimension](0)
1530
+ this.transition('addClass', $.Event('show'), 'shown')
1531
+ $.support.transition && this.$element[dimension](this.$element[0][scroll])
1532
+ }
1533
+
1534
+ , hide: function () {
1535
+ var dimension
1536
+ if (this.transitioning || !this.$element.hasClass('in')) return
1537
+ dimension = this.dimension()
1538
+ this.reset(this.$element[dimension]())
1539
+ this.transition('removeClass', $.Event('hide'), 'hidden')
1540
+ this.$element[dimension](0)
1541
+ }
1542
+
1543
+ , reset: function (size) {
1544
+ var dimension = this.dimension()
1545
+
1546
+ this.$element
1547
+ .removeClass('collapse')
1548
+ [dimension](size || 'auto')
1549
+ [0].offsetWidth
1550
+
1551
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
1552
+
1553
+ return this
1554
+ }
1555
+
1556
+ , transition: function (method, startEvent, completeEvent) {
1557
+ var that = this
1558
+ , complete = function () {
1559
+ if (startEvent.type == 'show') that.reset()
1560
+ that.transitioning = 0
1561
+ that.$element.trigger(completeEvent)
1562
+ }
1563
+
1564
+ this.$element.trigger(startEvent)
1565
+
1566
+ if (startEvent.isDefaultPrevented()) return
1567
+
1568
+ this.transitioning = 1
1569
+
1570
+ this.$element[method]('in')
1571
+
1572
+ $.support.transition && this.$element.hasClass('collapse') ?
1573
+ this.$element.one($.support.transition.end, complete) :
1574
+ complete()
1575
+ }
1576
+
1577
+ , toggle: function () {
1578
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
1579
+ }
1580
+
1581
+ }
1582
+
1583
+
1584
+ /* COLLAPSE PLUGIN DEFINITION
1585
+ * ========================== */
1586
+
1587
+ var old = $.fn.collapse
1588
+
1589
+ $.fn.collapse = function (option) {
1590
+ return this.each(function () {
1591
+ var $this = $(this)
1592
+ , data = $this.data('collapse')
1593
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
1594
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
1595
+ if (typeof option == 'string') data[option]()
1596
+ })
1597
+ }
1598
+
1599
+ $.fn.collapse.defaults = {
1600
+ toggle: true
1601
+ }
1602
+
1603
+ $.fn.collapse.Constructor = Collapse
1604
+
1605
+
1606
+ /* COLLAPSE NO CONFLICT
1607
+ * ==================== */
1608
+
1609
+ $.fn.collapse.noConflict = function () {
1610
+ $.fn.collapse = old
1611
+ return this
1612
+ }
1613
+
1614
+
1615
+ /* COLLAPSE DATA-API
1616
+ * ================= */
1617
+
1618
+ $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
1619
+ var $this = $(this), href
1620
+ , target = $this.attr('data-target')
1621
+ || e.preventDefault()
1622
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
1623
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
1624
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
1625
+ $(target).collapse(option)
1626
+ })
1627
+
1628
+ }(window.jQuery);
1629
+ /* ==========================================================
1630
+ * bootstrap-carousel.js v2.3.1
1631
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
1632
+ * ==========================================================
1633
+ * Copyright 2012 Twitter, Inc.
1634
+ *
1635
+ * Licensed under the Apache License, Version 2.0 (the "License");
1636
+ * you may not use this file except in compliance with the License.
1637
+ * You may obtain a copy of the License at
1638
+ *
1639
+ * http://www.apache.org/licenses/LICENSE-2.0
1640
+ *
1641
+ * Unless required by applicable law or agreed to in writing, software
1642
+ * distributed under the License is distributed on an "AS IS" BASIS,
1643
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1644
+ * See the License for the specific language governing permissions and
1645
+ * limitations under the License.
1646
+ * ========================================================== */
1647
+
1648
+
1649
+ !function ($) {
1650
+
1651
+ "use strict"; // jshint ;_;
1652
+
1653
+
1654
+ /* CAROUSEL CLASS DEFINITION
1655
+ * ========================= */
1656
+
1657
+ var Carousel = function (element, options) {
1658
+ this.$element = $(element)
1659
+ this.$indicators = this.$element.find('.carousel-indicators')
1660
+ this.options = options
1661
+ this.options.pause == 'hover' && this.$element
1662
+ .on('mouseenter', $.proxy(this.pause, this))
1663
+ .on('mouseleave', $.proxy(this.cycle, this))
1664
+ }
1665
+
1666
+ Carousel.prototype = {
1667
+
1668
+ cycle: function (e) {
1669
+ if (!e) this.paused = false
1670
+ if (this.interval) clearInterval(this.interval);
1671
+ this.options.interval
1672
+ && !this.paused
1673
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
1674
+ return this
1675
+ }
1676
+
1677
+ , getActiveIndex: function () {
1678
+ this.$active = this.$element.find('.item.active')
1679
+ this.$items = this.$active.parent().children()
1680
+ return this.$items.index(this.$active)
1681
+ }
1682
+
1683
+ , to: function (pos) {
1684
+ var activeIndex = this.getActiveIndex()
1685
+ , that = this
1686
+
1687
+ if (pos > (this.$items.length - 1) || pos < 0) return
1688
+
1689
+ if (this.sliding) {
1690
+ return this.$element.one('slid', function () {
1691
+ that.to(pos)
1692
+ })
1693
+ }
1694
+
1695
+ if (activeIndex == pos) {
1696
+ return this.pause().cycle()
1697
+ }
1698
+
1699
+ return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
1700
+ }
1701
+
1702
+ , pause: function (e) {
1703
+ if (!e) this.paused = true
1704
+ if (this.$element.find('.next, .prev').length && $.support.transition.end) {
1705
+ this.$element.trigger($.support.transition.end)
1706
+ this.cycle(true)
1707
+ }
1708
+ clearInterval(this.interval)
1709
+ this.interval = null
1710
+ return this
1711
+ }
1712
+
1713
+ , next: function () {
1714
+ if (this.sliding) return
1715
+ return this.slide('next')
1716
+ }
1717
+
1718
+ , prev: function () {
1719
+ if (this.sliding) return
1720
+ return this.slide('prev')
1721
+ }
1722
+
1723
+ , slide: function (type, next) {
1724
+ var $active = this.$element.find('.item.active')
1725
+ , $next = next || $active[type]()
1726
+ , isCycling = this.interval
1727
+ , direction = type == 'next' ? 'left' : 'right'
1728
+ , fallback = type == 'next' ? 'first' : 'last'
1729
+ , that = this
1730
+ , e
1731
+
1732
+ this.sliding = true
1733
+
1734
+ isCycling && this.pause()
1735
+
1736
+ $next = $next.length ? $next : this.$element.find('.item')[fallback]()
1737
+
1738
+ e = $.Event('slide', {
1739
+ relatedTarget: $next[0]
1740
+ , direction: direction
1741
+ })
1742
+
1743
+ if ($next.hasClass('active')) return
1744
+
1745
+ if (this.$indicators.length) {
1746
+ this.$indicators.find('.active').removeClass('active')
1747
+ this.$element.one('slid', function () {
1748
+ var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
1749
+ $nextIndicator && $nextIndicator.addClass('active')
1750
+ })
1751
+ }
1752
+
1753
+ if ($.support.transition && this.$element.hasClass('slide')) {
1754
+ this.$element.trigger(e)
1755
+ if (e.isDefaultPrevented()) return
1756
+ $next.addClass(type)
1757
+ $next[0].offsetWidth // force reflow
1758
+ $active.addClass(direction)
1759
+ $next.addClass(direction)
1760
+ this.$element.one($.support.transition.end, function () {
1761
+ $next.removeClass([type, direction].join(' ')).addClass('active')
1762
+ $active.removeClass(['active', direction].join(' '))
1763
+ that.sliding = false
1764
+ setTimeout(function () { that.$element.trigger('slid') }, 0)
1765
+ })
1766
+ } else {
1767
+ this.$element.trigger(e)
1768
+ if (e.isDefaultPrevented()) return
1769
+ $active.removeClass('active')
1770
+ $next.addClass('active')
1771
+ this.sliding = false
1772
+ this.$element.trigger('slid')
1773
+ }
1774
+
1775
+ isCycling && this.cycle()
1776
+
1777
+ return this
1778
+ }
1779
+
1780
+ }
1781
+
1782
+
1783
+ /* CAROUSEL PLUGIN DEFINITION
1784
+ * ========================== */
1785
+
1786
+ var old = $.fn.carousel
1787
+
1788
+ $.fn.carousel = function (option) {
1789
+ return this.each(function () {
1790
+ var $this = $(this)
1791
+ , data = $this.data('carousel')
1792
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
1793
+ , action = typeof option == 'string' ? option : options.slide
1794
+ if (!data) $this.data('carousel', (data = new Carousel(this, options)))
1795
+ if (typeof option == 'number') data.to(option)
1796
+ else if (action) data[action]()
1797
+ else if (options.interval) data.pause().cycle()
1798
+ })
1799
+ }
1800
+
1801
+ $.fn.carousel.defaults = {
1802
+ interval: 5000
1803
+ , pause: 'hover'
1804
+